With the high flexibility and low cost of the deployment of UAVs, the application of UAV-assisted data collection has become widespread in the Internet of Things (IoT) systems. Meanwhile, the age of information (AoI) has been adopted as a key metric to evaluate the quality of the collected data. Most of the literature generally focuses on minimizing the age of all information. However, minimizing the overall AoI may lead to high costs and massive energy consumption. In addition, not all types of data need to be updated highly frequently. In this paper, we consider both the diversity of different tasks in terms of the data update period and the AoI of the collected sensing information. An efficient data collection method is proposed to maximize the system utility while ensuring the freshness of the collected information relative to their respective update periods. This problem is NP-hard. With the decomposition, we optimize the upload strategy of sensor nodes at each time slot, as well as the hovering positions and flight speeds of UAVs. Simulation results show that our method ensures the relative freshness of all information and reduces the time-averaged AoI by 96.5%, 44%, 90.4%, and 26% when the number of UAVs is 1 compared to the corresponding EMA, AOA, DROA, and DRL-eFresh, respectively.