A task processing method and related device

Through segmented time periods and determining the processing time based on the deadline, the delay problem of OBU in task scheduling is solved, and more reasonable task scheduling and smaller total delay are achieved.

CN110895743BActive Publication Date: 2025-04-04TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201911109047.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-13
Publication Date
2025-04-04
Estimated Expiration
2039-11-13

AI Technical Summary

Technical Problem

Existing on-board units (OBUs) may experience unreasonable task scheduling when processing tasks, resulting in large delays.

Method used

By obtaining the set of tasks required to be processed in the target time period, segmenting the target time period to obtain multiple unit time periods, obtaining the deadline for each pending task, and determining the target unit time period for processing pending task based on the empty time period.

Benefits of technology

Ensure that each pending task is completed before the deadline, thereby making task scheduling as reasonable as possible and reducing the total delay in task processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110895743B_ABST
    Figure CN110895743B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a task processing method, which obtains a task set that needs to be processed in a target time period, wherein the task set includes multiple tasks to be processed. The target time period is segmented to obtain multiple unit time periods, and the number of the multiple unit time periods is the same as the number of the multiple tasks to be processed, so that one task to be processed can be scheduled for processing in one unit time period. Afterwards, the deadline of each task to be processed in the task set is obtained. For each task to be processed, if there is an empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period for processing the task to be processed is determined based on the empty time period, thereby determining a suitable processing time for each task to be processed. Since the deadline is taken into account when determining the processing time of the task to be processed, each task to be processed is completed as much as possible before the deadline, so that the task scheduling is as reasonable as possible, thereby reducing the total delay of task processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a task processing method and related devices. Background Art

[0002] Vehicle-road collaboration uses advanced wireless communications and the new generation of the Internet to implement all-round dynamic real-time information interaction between vehicles and roads, and carries out active vehicle safety control and road collaborative management based on the collection and integration of dynamic traffic information in all time and space, fully realizing the effective collaboration between people, vehicles and roads, ensuring traffic safety, and improving traffic efficiency, thus forming a safe, efficient and environmentally friendly road traffic system.

[0003] The vehicle-road cooperative system involves people, vehicles, roads, and the cloud. The data processing equipment on the vehicle, such as the on-board unit (OBU), can perform task processing, such as positioning tasks, network transmission tasks, and communication tasks with roadside equipment.

[0004] At present, the process of OBU processing tasks is to determine the total number of tasks to be processed, count the time spent on processing each type of task, and then process the tasks in ascending order of the time spent. However, this method may lead to unreasonable task scheduling, which in turn causes a large delay. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a method to ensure that each pending task is completed before the deadline as much as possible, so that the task scheduling is as reasonable as possible, thereby reducing the total delay of task processing.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a task processing method, the method comprising:

[0008] Obtaining a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed;

[0009] Segmenting the target time period to obtain a plurality of unit time periods, wherein the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed;

[0010] Obtaining the deadline of each pending task in the task set;

[0011] For each of the to-be-processed tasks, if there is an empty time period among the multiple unit time periods before the deadline of the to-be-processed task, a target unit time period for processing the to-be-processed task is determined according to the empty time period.

[0012] In a second aspect, an embodiment of the present application provides a task processing device, the device comprising a first acquisition unit, a segmentation unit, a second acquisition unit and a first determination unit:

[0013] The first acquisition unit is used to acquire a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed;

[0014] The segmentation unit is used to segment the target time period to obtain a plurality of unit time periods, and the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed;

[0015] The second acquisition unit is used to acquire the deadline of each to-be-processed task in the task set;

[0016] The first determining unit is configured to determine, for each of the to-be-processed tasks, a target unit time period for processing the to-be-processed task according to the empty time period if there is an empty time period among the multiple unit time periods before the deadline of the to-be-processed task.

[0017] In a third aspect, an embodiment of the present application provides a device for task processing, the device comprising a processor and a memory:

[0018] The memory is used to store program code and transmit the program code to the processor;

[0019] The processor is configured to execute the method described in the first aspect according to instructions in the program code.

[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in the first aspect.

[0021] It can be seen from the above technical solution that before scheduling tasks for processing, a set of tasks to be processed in the target time period can be obtained, and the task set includes multiple tasks to be processed. The target time period is segmented to obtain multiple unit time periods, and the number of multiple unit time periods is the same as the number of multiple tasks to be processed, so that one task to be processed can be scheduled for processing in one unit time period. Afterwards, the deadline of each task to be processed in the task set is obtained. For each task to be processed, if there is an empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period for processing the task to be processed is determined based on the empty time period, thereby determining a suitable processing time for each task to be processed. Since the deadline is taken into account when determining the processing time of the task to be processed, it is possible to ensure that each task to be processed is completed before the deadline, so that the task scheduling is as reasonable as possible, thereby reducing the total delay of task processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1a A schematic diagram of an application scenario of task processing provided in an embodiment of the present application;

[0024] Figure 1b A schematic diagram of the installation position of the OBU provided in the embodiment of the present application;

[0025] Figure 2 An implementation architecture diagram of a task processing method provided in an embodiment of the present application;

[0026] Figure 3 A flowchart of a task processing method provided in an embodiment of the present application;

[0027] Figure 4 An example diagram of a segmented target time period provided in an embodiment of the present application;

[0028] Figure 5 A flowchart of a task processing method provided in an embodiment of the present application;

[0029] Figure 6a A structural diagram of a task processing device provided in an embodiment of the present application;

[0030] Figure 6b A structural diagram of a task processing device provided in an embodiment of the present application;

[0031] Figure 6c A structural diagram of a task processing device provided in an embodiment of the present application;

[0032] Figure 6d A structural diagram of a task processing device provided in an embodiment of the present application;

[0033] Figure 7 A structural diagram of a task processing device provided in an embodiment of the present application;

[0034] Figure 8 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0036] At present, the process of OBU processing tasks is to determine the total number of tasks to be processed, count the time spent on processing each type of task, and then process the tasks in increasing order of the time spent.

[0037] However, this approach ignores the delay of OBU in processing each task, and the statistical time spent on processing various tasks will also bring large errors, resulting in large delays in the task processing process.

[0038] In order to solve the above technical problems, the embodiment of the present application provides a task processing method, which combines the expected deadline of each task to be processed, determines the appropriate time period for processing each task to be processed, and sorts the processing order of the tasks. Therefore, when the target time period begins, the tasks to be processed are scheduled in the appropriate time period according to the order for processing, thereby avoiding excessive total delay in processing the tasks.

[0039] The method can be applied to data processing equipment, which can be a terminal device, such as a mobile phone, tablet computer, laptop computer, personal digital assistant (PDA), point of sales (POS), vehicle-mounted computer and other intelligent terminals. The method can be applied to scenarios such as Internet of Vehicles, vehicle-road collaboration, safe assisted driving, and automatic driving, especially Internet of Vehicles, vehicle-road collaboration, safe assisted driving, and automatic driving products installed with OBU, so as to process OBU scheduling tasks.

[0040] In order to facilitate understanding of the technical solution of the present application, the task processing method provided in the embodiment of the present application is introduced below in combination with actual application scenarios, taking the vehicle-road collaboration scenario as an example.

[0041] See also Figure 1a , Figure 1a Schematic diagram of an application scenario of the task processing method provided in an embodiment of the present application. The application scenario includes a vehicle 101, a server 102, and a road side unit (RSU) 103. The vehicle 101 can communicate with the server 102 and the road side unit 103. An OBU is installed on the vehicle 101, wherein the OBU can be installed on the front windshield of the vehicle 101 or in other locations. The installation location of the OBU in the vehicle 101 can be as follows: Figure 1b The OBU can perform task processing, for example, processing the positioning task of the Global Positioning System (GPS), the communication task with the server 102 and the connection task with the roadside device 103.

[0042] In this scenario, in order to reduce the delay of the OBU processing task on the vehicle 101, the embodiment of the present application provides a task processing method, see Figure 2 As shown, the method can be executed by the terminal device 201 on the vehicle 101, and the terminal device 201 can obtain a task set to be processed in the target time period, and the task set includes multiple tasks to be processed. The tasks to be processed can be, for example, positioning tasks, communication tasks with the server 102, and connection tasks with the roadside device 103.

[0043] The terminal device 201 segments the target time period into multiple unit time periods, the number of which is the same as the number of the tasks to be processed. For each task to be processed, the terminal device 201 can determine in which unit time period each task to be processed is processed by the OBU.

[0044] The terminal device 201 obtains the deadline of each pending task in the task set, and each pending task is expected to be processed by the OBU before the corresponding deadline. If there is an empty time period in multiple unit time periods before the deadline of the pending task, and the empty time period is a unit time period not occupied by the pending task, the target unit time period for processing the pending task is determined according to the empty time period. Thereby determining the appropriate processing time for each pending task. Since the deadline is taken into consideration when determining the processing time of the pending task, each pending task is guaranteed to be completed before the deadline as much as possible, so that the task scheduling is as reasonable as possible, thereby reducing the total delay of task processing.

[0045] Next, the task processing method provided in the embodiment of the present application will be described in detail with reference to the accompanying drawings.

[0046] See also Figure 3 , Figure 3 A flowchart of a task processing method is shown, the method comprising:

[0047] S301: Obtain a task set that needs to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed.

[0048] In the embodiment of the present application, a development platform is first built to implement the task processing method provided by the embodiment of the present application based on the development platform. Taking the terminal device as a notebook as an example, the way to build the development platform can be to configure the development environment, install auxiliary libraries and packages, wherein this example can use the python development environment, python is a cross-platform computer programming language, and the auxiliary libraries and packages can be, for example, a math library, a time library, an extension library of the Python language (Numerical Python, NumPy), etc. This embodiment can also use other hardware and software platforms and computer programming languages, which are not limited in this embodiment.

[0049] The target time period is determined based on actual needs. The target time period usually needs to ensure that as many pending tasks as possible are processed within the target time period. The selection of the target time period is related to many factors, such as the frequency of task processing, the number of tasks to be processed, and the expected processing time for each task.

[0050] In the embodiment of the present application, each pending task processed by the OBU can be regarded as an event. The i-th pending task is processed as event a i The number of pending tasks that need to be processed by the OBU within the target time period is limited. The total number of pending tasks in the task set is recorded as n, and the n pending tasks are numbered 1, 2, ..., n. The task set within the target time period is recorded as S = {a1, a2, ..., a i}.

[0051] S302: Segment the target time period to obtain a plurality of unit time periods, where the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed.

[0052] If the total number of pending tasks is n, in the target time period, since the OBU consumes one unit time period to process each pending task, the target time period has n unit time periods. The start and end time of the i-th unit time period are respectively regarded as time i-1 and i, where i = 1, 2, ..., n. The segmented target time period can be referred to as Figure 4 As shown, the target time period is divided into 8 unit time periods, the first unit time period is marked as 1, the start time and the end time of the first unit time period are respectively regarded as time 0 and time 1, and the same applies to the remaining unit time periods.

[0053] It can be understood that in this embodiment, there are many ways to segment the target time period. One way is to call the average time required for the OBU to process each pending task a unit time period. In this case, the time required for the OBU to process each pending task is roughly the same. The unit time period can be determined through historical data statistics to avoid large errors caused by calculating the time spent on processing each pending task.

[0054] In some cases, the target time period can be further segmented according to the deadline of each task to be processed, so that the deadline corresponds to the start and end times of the unit time period, thereby ensuring that when the target unit time period for processing the task to be processed is determined based on the deadline, a more reasonable target unit time period can be determined to reduce the delay in processing the task to be processed.

[0055] S303: Obtain the deadline of each to-be-processed task in the task set.

[0056] In the target time period, each pending task is expected to be processed by the OBU before the deadline. Figure 4 As shown, the i-th pending task is expected to be completed on the d i , d i ∈{1,2,……,n} unit time periods ago, the deadline of the i-th pending task corresponds to the deadline of the d-th task. i The starting time of the unit time period is expected to be i Complete event a before unit time period i .

[0057] S304: For each of the pending tasks, if there is an empty time period in the multiple unit time periods before the deadline of the pending task, determine a target unit time period for processing the pending task according to the empty time period.

[0058] It is understandable that when multiple pending tasks in a task set need to be processed, it is possible to first determine in which unit time period each pending task needs to be processed, thereby sorting the pending tasks. When the target time period begins, when a certain unit time period is reached according to the sorting, the corresponding pending tasks are scheduled to be processed by the OBU.

[0059] Therefore, in the embodiment of the present application, the target unit time period for processing each task to be processed can be determined according to the deadline of the task to be processed, so as to achieve the sorting of the tasks to be processed. Figure 4At time 0, no pending tasks are processed in each unit time period, and the n unit time periods at this time are regarded as n empty time periods. If there are empty time periods in multiple unit time periods before the deadline of the pending tasks, the target unit time period for processing the pending tasks is determined based on the empty time periods.

[0060] Among them, the characteristic factor δ can be used i Indicates whether the i-th unit time period is an empty time period, that is, whether there are pending tasks to be processed by OUB in this unit time period. Specifically, δ i =1 and δ i =0 respectively indicates that the i-th unit time period is an empty time period and a non-empty time period.

[0061] If there are multiple empty time periods before the deadline of the pending task, any of the empty time periods can be used as the target unit time period for processing the pending task. Figure 4 As shown, if the deadline for processing pending task 1 corresponds to moment 5 (i.e., completing pending task 1 before the 6th unit time period), there are two empty time periods before the deadline, such as the 3rd and 5th unit time periods. If the 3rd unit time period is determined as the target unit time period for processing pending task 1, and the deadline for pending task 2 corresponds to moment 3 (i.e., completing pending task 2 before the 4th unit time period), at this time, for pending task 2, it may be determined that pending task 1 is processed in the 3rd unit time period, resulting in no empty time period before the deadline, and thus selecting the empty time period after the deadline to process pending task 2, resulting in a delay in processing pending task 2, thereby increasing the total delay in task processing.

[0062] Therefore, if it is determined that there are multiple empty time periods before the deadline, the target unit time period for processing the pending task may be determined by taking the empty time period closest to the deadline as the target unit time period for processing the pending task.

[0063] For example, for each a i , i∈{1,2,……,n}, if there exists j∈{1,2,……,d i} makes δ i = 0; that is, there is an empty time period before the deadline, then in the kth time = max{j|j∈{1,2,……,d i},δ i =0} unit time periods (i.e., the empty time periods closest to the deadline) as target unit time periods to process event a i .

[0064] In some cases, if there is no empty time period among the multiple unit time periods before the deadline of the task to be processed, the target unit time period is determined according to the empty time period after the deadline. In one implementation, the unit time period farthest from the deadline after the deadline can be selected as the target unit time period. This avoids the time delay of processing the remaining tasks to be processed, which in turn causes the total delay to be too large.

[0065] For example, if there is no j∈{1,2,…,d i} makes δ i = 0, that is, there is no empty time period before the deadline, then in the kth time = max{j|δ i =0} empty time periods as target unit time periods to process event a i .

[0066] By the above method, it is possible to determine which unit time period in the target time period each task to be processed is to be processed, thereby determining the processing order of the tasks to be processed. In this way, when the target time period begins, the corresponding tasks to be processed can be scheduled for processing when the target unit time period is reached according to the determined target unit time period of each task to be processed.

[0067] For example, the task set includes pending tasks 1, 2 and 3, and the target time period is segmented into the first unit time period, the second unit time period and the third unit time period. Through the above method, it is determined that the target unit time period for processing pending task 1 is the second unit time period, the target unit time period for processing pending task 2 is the third unit time period, and the target unit time period for processing pending task 3 is the first unit time period. Then, within the target time period, when the first unit time period is reached, the corresponding pending task 3 is scheduled for processing, when the second unit time period is reached, the corresponding pending task 1 is scheduled for processing, and when the third unit time period is reached, the corresponding pending task 2 is scheduled for processing.

[0068] It can be seen from the above technical solution that before scheduling tasks for processing, a set of tasks to be processed in the target time period can be obtained, and the task set includes multiple tasks to be processed. The target time period is segmented to obtain multiple unit time periods, and the number of multiple unit time periods is the same as the number of multiple tasks to be processed, so that one task to be processed can be scheduled for processing in one unit time period. Afterwards, the deadline of each task to be processed in the task set is obtained. For each task to be processed, if there is an empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period for processing the task to be processed is determined based on the empty time period, thereby determining a suitable processing time for each task to be processed. Since the deadline is taken into account when determining the processing time of the task to be processed, it is possible to ensure that each task to be processed is completed before the deadline, so that the task scheduling is as reasonable as possible, thereby reducing the total delay of task processing.

[0069] It should be noted that, in some cases, each task to be processed may have an expected delay, which is the expected possible delay in processing the task to be processed, and the expected delay may be pre-set according to the actual situation. Before executing S304, the expected delay of each task to be processed in the task set may also be obtained, so as to sort the multiple tasks to be processed in the monotonically decreasing order of the expected delay. In this way, it can be preliminarily considered that the multiple tasks to be processed are processed in the monotonically decreasing order of the expected delay. Then, on the basis of the processing order, the target unit time period for processing each task to be processed is determined in combination with the deadline.

[0070] Furthermore, after completing the processing of the plurality of pending tasks, the negative impact of processing the plurality of pending tasks may be determined, wherein the negative impact may be a combination of one or more of delay, driving risk error, positioning error, and the like.

[0071] By determining the negative impact, the performance of the OBU can be tested so that the OBU with better performance can be selected. In addition, when the OBU is used for task processing, the data can also be corrected based on the negative impact.

[0072] If the negative impact is determined to be a delay, the delay can be used to compensate for the delay, thereby obtaining accurate data. For example, when using the OBU to collect the vehicle speed at the target time, due to the delay, the actual collected vehicle speed may be the vehicle speed at a certain time before the target time. Therefore, through delay compensation, a more accurate vehicle speed at the target time can be obtained.

[0073] Next, the task processing method provided by the embodiment of the present application will be introduced in combination with actual application scenarios. Figure 5 As shown, the method includes:

[0074] S501: Determine a plurality of pending tasks that need to be processed in a target time period.

[0075] S502: Segment the target time period to obtain multiple unit time periods.

[0076] S503: Determine the deadline for each pending task to be processed by the OBU.

[0077] S504: Determine the expected delay of the OBU in processing each task to be processed.

[0078] S505: Consider multiple unit time periods at the initial moment as empty time periods.

[0079] S506. For each pending task, the OBU processes the pending task in a monotonically decreasing order of expected delay and checks whether there is an empty time period before the deadline of the pending task. If so, execute S507; if not, execute S508.

[0080] S507: Use the empty time period before the deadline that is closest to the deadline as the target unit time period for processing the task to be processed.

[0081] S508: Use the empty time period after the deadline that is farthest from the deadline as the target unit time period.

[0082] S509: Calculate delay.

[0083] Based on the task processing method provided in the above embodiment, the present application embodiment also provides a task processing device, see Figure 6a , the device includes a first acquisition unit 601, a segmentation unit 602, a second acquisition unit 603 and a first determination unit 604:

[0084] The first acquisition unit 601 is used to acquire a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed;

[0085] The segmentation unit 602 is used to segment the target time period to obtain a plurality of unit time periods, where the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed;

[0086] The second acquisition unit 603 is used to acquire the deadline of each to-be-processed task in the task set;

[0087] The first determining unit 604 is configured to determine, for each of the pending tasks, a target unit time period for processing the pending task according to the empty time period if there is an empty time period in the multiple unit time periods before the deadline of the pending task.

[0088] In one possible implementation, see Figure 6b , the device further includes a scheduling unit 605:

[0089] The scheduling unit 605 is used for scheduling the corresponding to-be-processed task for processing when the target time period starts according to the determined target unit time period of each to-be-processed task when the target unit time period is reached.

[0090] In a possible implementation manner, if the idle time period includes multiple ones, the first determining unit 604 is configured to:

[0091] The empty time period before the deadline and closest to the deadline is used as the target unit time period for processing the task to be processed.

[0092] In a possible implementation manner, the first determining unit 604 is further configured to:

[0093] If there is no empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period is determined according to the empty time period after the deadline.

[0094] In a possible implementation manner, the first determining unit 604 is configured to:

[0095] The empty time period after the deadline and farthest from the deadline is used as the target unit time period.

[0096] In one possible implementation, see Figure 6c , the device further includes a third obtaining unit 606:

[0097] The third acquisition unit 606 is used to acquire the expected delay of each to-be-processed task in the task set, and sort the multiple to-be-processed tasks in a monotonically decreasing order of the expected delay.

[0098] In one possible implementation, see Figure 6d , the device further includes a second determining unit 607:

[0099] The second determining unit 607 is used to determine the negative impact of processing the multiple tasks to be processed after completing the processing of the multiple tasks to be processed.

[0100] The present application also provides a device for task processing, which is described below in conjunction with the accompanying drawings. Figure 7As shown, the embodiment of the present application provides a device 700 for task processing, and the device 700 may also be a terminal device, and the terminal device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a vehicle-mounted computer, etc., and the terminal device is a mobile phone as an example:

[0101] Figure 7 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Figure 7 The mobile phone includes: a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. Those skilled in the art will understand that Figure 7 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0102] Combine the following Figure 7 A detailed introduction to the various components of the mobile phone:

[0103] The RF circuit 710 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 780 for processing; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, referred to as LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0104] The memory 720 can be used to store software programs and modules. The processor 780 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 720 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0105] The input unit 730 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 731 or near the touch panel 731 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch panel 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0106] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), etc. Further, the touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event. Subsequently, the processor 780 provides a corresponding visual output on the display panel 741 according to the type of touch event. Although in Figure 7 In the embodiment, the touch panel 731 and the display panel 741 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.

[0107] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 741 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0108] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the mobile phone. The audio circuit 760 can transmit the received audio data to the speaker 761 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another mobile phone through the RF circuit 710, or the audio data is output to the memory 720 for further processing.

[0109] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 770. It provides users with wireless broadband Internet access. Figure 7 A WiFi module 770 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0110] The processor 780 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 780 may include one or more processing units; preferably, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 780.

[0111] The mobile phone also includes a power supply 790 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.

[0112] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0113] In this embodiment, the processor 780 included in the terminal device also has the following functions:

[0114] Obtaining a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed;

[0115] Segmenting the target time period to obtain a plurality of unit time periods, wherein the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed;

[0116] Obtaining the deadline of each pending task in the task set;

[0117] For each of the to-be-processed tasks, if there is an empty time period among the multiple unit time periods before the deadline of the to-be-processed task, a target unit time period for processing the to-be-processed task is determined according to the empty time period.

[0118] This application embodiment also provides a server, see Figure 8 As shown, Figure 8 The structural diagram of the server 800 provided in the embodiment of the present application, the server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 822 (for example, one or more processors) and a memory 832, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 can be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 can be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the server 800.

[0119] The server 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858, and / or one or more operating systems 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0120] The steps performed by the server in the above embodiment can be based on the Figure 8 The server structure shown.

[0121] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0122] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0123] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0125] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0127] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A task processing method, characterized in that: The method is applied to a data processing device on a vehicle, and the method comprises: Acquire a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed, and the tasks to be processed include a positioning task, a communication task with a server, and a connection task with a roadside device; Segmenting the target time period to obtain a plurality of unit time periods, wherein the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed; Obtaining the deadline of each pending task in the task set; For each of the pending tasks, if there is an empty time period among the multiple unit time periods before the deadline of the pending task, determine a target unit time period for processing the pending task according to the empty time period; If the empty time period includes multiple ones, determining the target unit time period for processing the to-be-processed task according to the empty time period includes: The empty time period before the deadline and closest to the deadline is used as the target unit time period for processing the task to be processed.

2. The method according to claim 1, characterized in that The method further comprises: When the target time period begins, according to the determined target unit time period of each task to be processed, the corresponding task to be processed is scheduled for processing when the target unit time period is reached.

3. The method according to claim 1, characterized in that The method further comprises: If there is no empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period is determined according to the empty time period after the deadline.

4. The method according to claim 3, characterized in that: The determining the target unit time period according to the empty time period after the deadline includes: The empty time period after the deadline and farthest from the deadline is used as the target unit time period.

5. The method according to claim 1 or 2, characterized in that: For each of the pending tasks, if there is an empty time period in the multiple unit time periods before the deadline of the pending task, before determining a target unit time period for processing the pending task according to the empty time period, the method further includes: The expected delay of each to-be-processed task in the task set is obtained, and the multiple to-be-processed tasks are sorted in a monotonically decreasing order of the expected delays.

6. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After completing the processing of the plurality of tasks to be processed, determining the negative impact of processing the plurality of tasks to be processed.

7. A task processing device, characterized in that: The device is applied to a data processing device on a vehicle, and comprises a first acquisition unit, a segmentation unit, a second acquisition unit and a first determination unit: The first acquisition unit is used to acquire a task set to be processed in a target time period, wherein the task set includes a plurality of tasks to be processed, and the tasks to be processed include a positioning task, a communication task with a server, and a connection task with a roadside device; The segmentation unit is used to segment the target time period to obtain a plurality of unit time periods, and the number of the plurality of unit time periods is the same as the number of the plurality of tasks to be processed; The second acquisition unit is used to acquire the deadline of each to-be-processed task in the task set; The first determining unit is configured to determine, for each of the to-be-processed tasks, a target unit time period for processing the to-be-processed task according to the empty time period if there is an empty time period among the multiple unit time periods before the deadline of the to-be-processed task; If the empty time period includes multiple ones, the first determining unit is used to: The empty time period before the deadline and closest to the deadline is used as the target unit time period for processing the task to be processed.

8. The device according to claim 7, characterized in that The device also includes a scheduling unit: The scheduling unit is used for scheduling the corresponding to-be-processed task for processing when the target time period starts according to the determined target unit time period of each to-be-processed task when the target unit time period is reached.

9. The device according to claim 7, characterized in that The first determining unit is further configured to: If there is no empty time period in the multiple unit time periods before the deadline of the task to be processed, the target unit time period is determined according to the empty time period after the deadline.

10. The device according to claim 9, characterized in that The first determining unit is configured to: The empty time period after the deadline and farthest from the deadline is used as the target unit time period.

11. The device according to claim 7 or 8, characterized in that: The device also includes a third acquisition unit: The third acquisition unit is used to acquire the expected delay of each to-be-processed task in the task set, and sort the multiple to-be-processed tasks in a monotonically decreasing order of the expected delays.

12. The device according to any one of claims 7 to 10, characterized in that: The device also includes a second determining unit: The second determining unit is used to determine the negative impact of processing the multiple tasks to be processed after completing the processing of the multiple tasks to be processed.

13. A device for task processing, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 6 according to the instructions in the program code.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Control device, program update method, and computer program

    CN109922998A

  • Mobile communication device and communication control method

    JP2010141434A