CN114942790A - Task processing method, device, equipment and storage medium - Google Patents
Task processing method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN114942790A CN114942790A CN202210611782.7A CN202210611782A CN114942790A CN 114942790 A CN114942790 A CN 114942790A CN 202210611782 A CN202210611782 A CN 202210611782A CN 114942790 A CN114942790 A CN 114942790A
- Authority
- CN
- China
- Prior art keywords
- task
- initialization
- tasks
- initialization tasks
- execution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 18
- 230000006870 function Effects 0.000 claims description 14
- 230000007717 exclusion Effects 0.000 claims description 13
- 238000001514 detection method Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000007689 inspection Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4405—Initialisation of multiprocessor systems
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application relates to a task processing method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object; identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task objects of the initialization tasks and the execution operation information corresponding to the task objects, wherein the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel; executing a plurality of first initialization tasks in a parallel operation mode; and determining the operation logic of the plurality of second initialization tasks according to the execution operation information of the second initialization tasks, and executing the plurality of second initialization tasks according to the operation logic. The method and the device can improve the efficiency of processing a plurality of tasks and improve the starting speed of the system.
Description
Technical Field
The present application relates to the field of automatic driving technologies, and in particular, to a task processing method, apparatus, device, and storage medium.
Background
At present, the field of automatic driving is rapidly developed, and automatic driving of automobiles becomes an important development trend of automobile technology and industry. Before the automatic driving system is started, a series of task initialization preparation work needs to be carried out, including preparation of data and inspection of sensors. Such as detection of vehicle lidar, inspection of camera configuration, data preparation for maps, navigation, etc.
However, since many initialization tasks need to be executed in the starting process of the automatic driving system, and the workload of task processing is large, the task processing method of the existing vehicle generally executes a plurality of tasks in series one by one in sequence, which results in low task processing efficiency and slow starting of the automatic driving system.
Disclosure of Invention
Based on this, the present application provides a task processing method, apparatus, device and storage medium, so as to solve the problems existing in the prior art.
In a first aspect, a task processing method is provided, and the method includes:
acquiring a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object;
identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task objects of the initialization tasks and the execution operation information corresponding to the task objects, wherein the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel;
executing the plurality of first initialization tasks in a parallel running mode;
and determining the operation logic of the plurality of second initialization tasks according to the execution operation information of the second initialization tasks, and executing the plurality of second initialization tasks according to the operation logic.
According to an implementation manner in the embodiment of the present application, identifying a plurality of second initialization tasks in the plurality of initialization tasks according to the task object of each initialization task and the execution operation information corresponding to each task object includes:
identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object;
or identifying a plurality of second initialization tasks with a mutually exclusive relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object.
According to an implementation manner in the embodiment of the present application, the identifying, according to the task object of each initialization task and the execution operation information corresponding to each task object, a plurality of second initialization tasks for which there is a dependency relationship in task execution includes:
identifying task input information and task output information of each initialization task according to the task object of each initialization task and the execution operation information corresponding to each task object;
and identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task input information and the task output information of each initialization task.
According to an implementation manner in the embodiment of the present application, the identifying task input information and task output information of each initialization task according to the task object of each initialization task and the execution operation information corresponding to each task object includes:
reading task codes of the initialization tasks;
identifying a task object and a code set of execution operation information corresponding to the task object from the task code;
identifying a code block of a calling function from the code set;
and identifying the task input information and the task output information of each initialization task according to the code block of the calling function.
According to an implementation manner in the embodiment of the present application, the mutual exclusion relationship is that task objects of any plurality of initialization tasks are the same, or execution operation information of any plurality of initialization tasks indicates the same execution operation on the same task object.
According to an implementation manner in the embodiment of the present application, the identifying, according to the task object of each initialization task and the execution operation information corresponding to each task object, that multiple second initialization tasks have a mutual exclusion relationship in task execution includes:
identifying a plurality of initialization tasks to be selected of the same task object according to the task object of each initialization task;
and identifying a plurality of second initialization tasks with mutually exclusive execution operations from the plurality of initialization tasks to be selected according to the execution operation information of each initialization task to be selected.
According to an implementation manner in the embodiment of the present application, the task object is data of a device or a call started when the automated driving is started.
In a second aspect, a task processing apparatus is provided, the apparatus comprising:
an acquisition module: the method comprises the steps of obtaining a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object;
an identification module: the device comprises a task object and execution operation information corresponding to the task object, wherein the task object is used for identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task object of each initialization task and the execution operation information corresponding to each task object, the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel;
a first execution module: the system comprises a plurality of first initialization tasks, a plurality of second initialization tasks and a plurality of control modules, wherein the plurality of first initialization tasks are executed in a parallel running mode;
a second execution module: and the operation logic is used for determining the plurality of second initialization tasks according to the execution operation information of the second initialization tasks and executing the plurality of second initialization tasks according to the operation logic.
According to an implementable manner in an embodiment of the present application, the identification module is further configured to:
identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object;
or identifying a plurality of second initialization tasks with a mutually exclusive relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object.
In a third aspect, a computer device is provided, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method referred to in the first aspect above.
In a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored, wherein the computer instructions are configured to cause a computer to perform the method according to the first aspect.
According to the technical content provided by the embodiment of the application, the task object of each initialization task in a plurality of initialization tasks to be executed and the execution operation information corresponding to the task object are obtained, the tasks which can run in parallel and the tasks which cannot run in parallel are identified, so that the tasks which can run in parallel are executed in parallel, other tasks are processed in sequence according to the running logic, the efficiency of processing the plurality of tasks can be improved, the stability of executing the tasks is ensured, the problem of low execution efficiency caused by the fact that all tasks are connected in series and executed one by one is solved, and the starting speed of a system is improved.
Drawings
FIG. 1 is a flowchart illustrating a task processing method according to an embodiment;
FIG. 2 is a block diagram showing a configuration of a task processing device according to an embodiment;
FIG. 3 is a schematic block diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail below with reference to the drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a flowchart of a task processing method provided in an embodiment of the present application, and as shown in fig. 1, the method may include the following steps:
step 101: the method comprises the steps of obtaining a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object.
Specifically, during the start-up of an autonomous system or other system, first, a series of initialization tasks need to be performed. For example, at the time of starting the automatic driving system, it is necessary to perform a task of detecting a vehicle laser radar, a task of checking a camera configuration, a task of preparing map data, a task of preparing navigation data, a task of preparing a log file, and the like. The task object refers to an object for task execution in the initialization task. For example, if the initialization task is to detect the performance of the laser radar, the task object is the laser radar. For another example, if the initialization task is to call a certain target data, the task object is the target data. Specifically, the task object may be the device (e.g., sensor) that needs to be started, the data that needs to be called, or the like, which is started by the automatic driving system. The execution operation information corresponding to the task object refers to the operation logic of the task object in the task operation set in the initialization task, and includes, but is not limited to, execution sequence information, task input information, and task output information of the task object.
Step 102: and identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task object of each initialization task and the execution operation information corresponding to each task object, wherein the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel.
Specifically, in the process of starting the system, the number of initialization tasks to be started is multiple, and is assumed to be N, a task object and execution operation information in each initialization task are identified, and the N initialization tasks are divided into a first initialization task which can be processed in parallel and a second initialization task which cannot be processed in parallel based on the task object and the execution operation information. For example, if the initialization task 1 is a preparation log file, the initialization task 2 is a preparation map, and the task objects of the initialization task 1 and the initialization task 2 are different, the initialization task 1 and the initialization task 2 are tasks that can be processed in parallel, that is, the initialization task 1 and the initialization task 2 are both the first initialization task. If the same equipment is called by the initialization task 3 and the initialization task 4, and the same task object is called by the initialization task 3 and the initialization task 4 according to the task objects of the initialization task 3 and the initialization task 4, whether the initialization task 3 and the initialization task 4 call the same equipment at the same time is further identified from the execution operation information of the initialization task 3 and the initialization task 4, if so, the initialization task 3 and the initialization task 4 are tasks which cannot be processed in parallel, namely, the initialization task 3 and the initialization task 4 are second initialization tasks.
Step 103: and executing a plurality of first initialization tasks in a parallel running mode.
Specifically, for the first initialization tasks which can be processed in parallel, such as the initialization task 1 and the initialization task 2, a parallel running mode is adopted, and a plurality of first initialization tasks are executed simultaneously, so that the efficiency of executing the tasks is improved, the problem of low execution efficiency caused by the fact that all the tasks are executed in series one by one is solved, and the starting speed of the system is improved.
Step 104: and determining the operation logic of the plurality of second initialization tasks according to the execution operation information of the second initialization tasks, and executing the plurality of second initialization tasks according to the operation logic.
Specifically, the execution operation information of the second initialization task includes information such as the execution sequence and the execution priority of the tasks, the execution logic, that is, the execution sequence, among the plurality of initialization tasks can be determined based on the execution operation information of the initialization tasks, and the plurality of second initialization tasks which cannot be processed in parallel are sequentially executed in sequence based on the execution logic, so that the stability of the execution of the initialization tasks is ensured.
It can be seen that, in the embodiment of the present application, by obtaining the task object of each initialization task in the plurality of initialization tasks to be executed and the execution operation information corresponding to the task object, and identifying the initialization tasks that can be processed in parallel and the initialization tasks that cannot be processed in parallel, the initialization tasks that can be processed in parallel are processed in parallel, and other initialization tasks are processed in sequence according to the operation logic, so that the processing efficiency of the plurality of initialization tasks can be improved, the stability of the execution of the initialization tasks is ensured, the problem of low execution efficiency caused by the fact that all the initialization tasks are executed in series one by one is solved, and the starting speed of the system is improved.
The following describes in detail the above step 101, that is, "acquiring a task object of each initialization task of a plurality of initialization tasks to be executed and execution operation information corresponding to the task object", with reference to an embodiment.
In one embodiment of the present application, the task object in step 101 is data of a device or call started at the start of automated driving.
Specifically, at the time of starting the automated driving system, a series of device inspection and data preparation tasks need to be performed, and the plurality of initialization tasks include a device inspection task and/or a data preparation task at the time of starting the automated driving. The task objects of the initialization tasks are equipment sensors needing to be started or data needing to be called. For example, the task object of the laser radar detection task is the laser radar device, the map navigation data that the task object of the map navigation preparation task needs to call is, and the like.
The following describes, in detail, the above step 102, that is, "a plurality of first initialization tasks and a plurality of second initialization tasks are identified from the task object of each initialization task and the execution operation information corresponding to each task object, the plurality of first initialization tasks may be processed in parallel, and the plurality of second initialization tasks may not be processed in parallel" in conjunction with the embodiment.
In an embodiment of the present application, the identifying, in step 102, a plurality of second initialization tasks from among the plurality of initialization tasks according to the task object of each initialization task and the execution operation information corresponding to each task object includes: identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object; or identifying a plurality of second initialization tasks with the task execution mutual exclusion relationship according to the task object of each initialization task and the execution operation information corresponding to each task object.
Specifically, a plurality of second initialization tasks in the plurality of initialization tasks are identified according to the task object of each initialization task and the execution operation information corresponding to each task object, and the plurality of second initialization tasks include initialization tasks with task execution dependency and/or initialization tasks with task execution mutual exclusion. The task execution dependency relationship means that there is a relationship between a plurality of initialization tasks, that is, the execution of one or more initialization tasks may affect the execution of one or more other initialization tasks, and if the initialization tasks with the dependency relationship are executed simultaneously or in a wrong order, an execution error may be caused; the mutual exclusion relationship in task execution means that several tasks cannot run simultaneously, and if the tasks are executed simultaneously, conflicts can be caused.
The second initialization tasks whose task execution has dependency relationship are identified according to the task object of each initialization task and the execution operation information corresponding to each task object, and may be: if the execution operation information corresponding to the task object of the first sub-initialization task and the execution operation information corresponding to the task object of the second sub-initialization task have dependency information, identifying that the task execution of the first sub-initialization task and the second sub-initialization task has dependency relationship, and taking the first sub-initialization task and the second sub-initialization task as the second initialization task, wherein the plurality of initialization tasks comprise the first sub-initialization task and the second sub-initialization task.
For example, the first sub-initialization task is task a, and the second sub-initialization task is task b. And the execution operation information corresponding to the task object of the task a comprises output information to the task b, and the execution operation information corresponding to the task object of the task b comprises output information of the received task a, so that the task a and the task b are both the second initialization task. Examples are: task a is a task of detecting the laser radar sensor, and the execution operation information of the laser radar sensor in task a includes a detection result output to task b. And the task b is a task of initializing the positioning system, and the execution operation information of the task b comprises a detection result of the receiving laser radar sensor. Thereby, the plurality of second initialization tasks having the dependency relationship between the task a and the task b.
The multiple second initialization tasks with the mutually exclusive relationship in task execution are identified according to the task object of each initialization task and the execution operation information corresponding to each task object, and may be: and if the task object and the corresponding execution operation information of the third sub-initialization task and the task object and the corresponding execution operation information of the fourth sub-initialization task have mutual exclusion information which cannot occur simultaneously, recognizing that the mutual exclusion relationship exists between the task execution of the third sub-initialization task and the task execution of the fourth sub-initialization task, and taking the third sub-initialization task and the fourth sub-initialization task as the second initialization task, wherein the plurality of initialization tasks comprise the third sub-initialization task and the fourth sub-initialization task.
Examples are as follows: and the task c and the task d both need to call keyboard equipment, namely, the task objects of the task c and the task d are both keyboard equipment, and the calling time of the task c and the task d to the keyboard equipment is determined to be the same according to the execution operation information of the task c and the task d, so that the task objects of the task c and the task d and the corresponding execution operation information have mutual exclusion information which cannot occur simultaneously. Thus, task c and task d are a plurality of second initialization tasks having a mutually exclusive relationship.
In an embodiment of the present application, identifying, according to a task object of each initialization task and execution operation information corresponding to each task object, a plurality of second initialization tasks for which there is a dependency relationship in task execution includes: identifying task input information and task output information of each initialization task according to the task object of each initialization task and the execution operation information corresponding to each task object; and identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task input information and the task output information of each initialization task.
Specifically, for example, it is recognized that the input and the output of the task a are p and q, the input and the output of the task B are q and w, that is, the output of the task a is the input of the task B, according to the task object and the execution operation information of the initialization task, the execution of the task a and the task B needs to be in order, the execution of the task a affects the execution of the task B, that is, the task a and the task B have a dependency relationship, and the task a and the task B are second initialization tasks that cannot be executed simultaneously.
In an embodiment of the present application, identifying task input information and task output information of each initialization task according to a task object of each initialization task and execution operation information corresponding to each task object includes: reading task codes of all initialization tasks; identifying a task object and a code set of execution operation information corresponding to the task object from task codes; identifying a code block of a calling function from a code set; and identifying the task input information and the task output information of each initialization task according to the code block of the calling function.
Specifically, in the prior art, identifying input and output of a certain task requires setting an additional configuration file, and input and output of the task are obvious in the configuration file, however, when system tasks increase, the number of the configuration files increases, which results in large occupied system memory space and additional maintenance of the configuration files required by a developer. In the embodiment, the task code of each initialization task is read, the task object corresponding to the task and the corresponding code set for executing the operation information are identified from the task code, the code block for calling the function is identified from the code set, and the function calling relationship of the code is determined according to the code block, so that the task input information and the task output information of each initialization task are identified according to the function calling relationship in the code block.
According to the method and the device, the input information and the output information of each initialization task are identified according to the function call relation in the code block, no configuration file needs to be additionally arranged, the input and the output of the tasks can be automatically analyzed through the function call relation of the code, and the memory occupation of a system and the maintenance cost of a developer are reduced.
In an embodiment of the present application, the mutual exclusion relationship is that task objects of any plurality of initialization tasks are the same, or the execution operation information of any plurality of initialization tasks indicates the same execution operation on the same task object.
Specifically, the task objects of any plurality of initialization tasks are the same, for example: several initialization tasks use the same sensor, call the same data interface, use the same piece of memory, use the same on-screen keyboard, etc. The execution operation information of any plurality of initialization tasks represents the same execution operation on the same task object, for example, the execution operation information of task a and task B represents simultaneous execution of use operations on the keyboard device. In an embodiment of the present application, identifying, according to the task object of each initialization task and the execution operation information corresponding to each task object, a plurality of second initialization tasks with a mutually exclusive relationship in task execution includes: identifying a plurality of initialization tasks to be selected of the same task object according to the task object of each initialization task; and identifying a plurality of second initialization tasks with mutually exclusive execution operations from the plurality of initialization tasks to be selected according to the execution operation information of each initialization task to be selected.
Specifically, multiple initialization tasks to be selected of the same task object are identified according to the task object of each initialization task, for example, if the task objects of task a and task B are the same, for example, the same device is called, the same data interface is called, the same chip memory space is used, and the like, then the two initialization tasks are the initialization tasks to be selected. Further, a plurality of second initialization tasks with mutually exclusive execution operation are identified from the plurality of initialization tasks to be selected according to the execution operation information of the initialization tasks to be selected. The execution operation information may include execution sequence information or operation time information of the initialization task on the task object, and a plurality of second initialization tasks, which are mutually exclusive in execution operation, of the plurality of initialization tasks to be selected are identified according to the execution sequence information or the operation time information. For example, if the operation time of the task a and the operation time of the task B on the same task object are the same, it means that the task a and the task B are the second initialization task that executes the operation mutual exclusion.
According to the embodiment of the application, the task object of each initialization task in the plurality of initialization tasks to be executed and the execution operation information corresponding to the task object are obtained, and the tasks which can be processed in parallel and the tasks which cannot be processed in parallel are identified, so that the tasks which can be operated in parallel are processed in parallel, other tasks are processed in sequence according to the operation logic, the efficiency of processing the plurality of tasks can be improved, the stability of task execution is ensured, the problem of low execution efficiency caused by the fact that all tasks are connected in series and executed one by one is solved, and the starting speed of the system is improved.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 2 is a schematic structural diagram of a task processing device according to an embodiment of the present application, and as shown in fig. 2, the task processing device may include: the system comprises an acquisition module 201, an identification module 202, a first execution module 203 and a second execution module 204. The main functions of each component module are as follows:
the acquisition module 201: the method comprises the steps of acquiring a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object;
the identification module 202: the device comprises a plurality of initialization tasks and a plurality of executing operation information corresponding to the initialization tasks, wherein the plurality of initialization tasks are used for identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task objects of the initialization tasks and the executing operation information corresponding to the task objects;
the first execution module 203: the system comprises a plurality of first initialization tasks, a plurality of second initialization tasks and a plurality of control modules, wherein the first initialization tasks are executed in a parallel running mode;
the second execution module 204: and the operation logic is used for determining a plurality of second initialization tasks according to the execution operation information of the second initialization tasks and executing the plurality of second initialization tasks according to the operation logic.
In one embodiment of the present application, the identification module is further configured to: identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object; or, identifying a plurality of second initialization tasks with a mutual exclusion relation in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object.
In one embodiment of the present application, the identification module is further configured to: identifying task input information and task output information of each initialization task according to the task object of each initialization task and the execution operation information corresponding to each task object; and identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task input information and the task output information of each initialization task.
In one embodiment of the application, the identification module is further configured to: reading task codes of all initialization tasks; identifying a task object and a code set of execution operation information corresponding to the task object from task codes; identifying a code block of a calling function from a code set; and identifying the task input information and the task output information of each initialization task according to the code block of the calling function.
In one embodiment of the present application, the identification module is further configured to: identifying a plurality of initialization tasks to be selected of the same task object according to the task object of each initialization task; and identifying a plurality of second initialization tasks with mutually exclusive execution operations from the plurality of initialization tasks to be selected according to the execution operation information of each initialization task to be selected.
In one embodiment of the application, the task object is equipment needing to be started or data needing to be called when the automatic driving is started.
According to the specific embodiment provided by the application, the technical scheme provided by the application can have the following advantages:
the method comprises the steps of acquiring task objects of all initialization tasks in a plurality of initialization tasks to be executed and execution operation information corresponding to the task objects, and identifying tasks which can be processed in parallel and tasks which cannot be processed in parallel, so that the tasks which can be operated in parallel are processed in parallel, and other tasks are processed in sequence according to operation logic, the efficiency of processing the plurality of tasks can be improved, the stability of task execution is ensured, the problem of low execution efficiency caused by the fact that all tasks are connected in series and executed one by one in the prior art is solved, and the starting speed of the system is improved.
The same and similar parts among the various embodiments are referred to each other, and each embodiment focuses on differences from other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
It should be noted that, in the embodiments of the present application, the use of user data may be involved, and in practical applications, the user-specific personal data may be used in the scheme described herein within the scope permitted by applicable laws and regulations, under the condition of meeting the requirements of applicable laws and regulations in the country (for example, the user explicitly agrees, the user is informed, the user explicitly authorizes, etc.).
According to an embodiment of the present application, a computer device and a computer-readable storage medium are also provided. The present application further provides a computer device comprising at least one processor, and a memory communicatively coupled to the at least one processor; wherein the memory stores computer instructions executable by the at least one processor, the computer instructions being executable by the at least one processor to enable the at least one processor to perform the method of task processing as described in any of the above embodiments.
Fig. 3 is a block diagram of a computer device according to an embodiment of the present application. Computer apparatus is intended to represent various forms of digital computers or mobile devices. Which may include desktop computers, laptop computers, workstations, personal digital assistants, servers, mainframe computers, and other suitable computers. The mobile device may include a tablet, smartphone, wearable device, and the like.
As shown in fig. 3, the computer apparatus 300 includes a computing unit 301, a ROM 302, a RAM 303, a bus 304, and an input/output (I/O) interface 305, the computing unit 301, the ROM 302, and the RAM 303 being connected to each other via the bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
The calculation unit 301 may perform various processes in the method embodiments of the present application according to computer instructions stored in a Read Only Memory (ROM)302 or computer instructions loaded from a storage unit 308 into a Random Access Memory (RAM) 303. The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. The computing unit 301 may include, but is not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. In some embodiments, the methods provided by the embodiments of the present application may be implemented as a computer software program tangibly embodied in a computer-readable storage medium, such as storage unit 308.
The RAM 303 may also store various programs and data required for the operation of the device 300. Part or all of the computer program may be loaded and/or installed onto the device 300 via the ROM 302 and/or the communication unit 309.
An input unit 306, an output unit 307, a storage unit 308, and a communication unit 309 in the computer device 300 may be connected to the I/O interface 305. The input unit 306 may be, for example, a keyboard, a mouse, a touch screen, a microphone, or the like; the output unit 307 may be, for example, a display, a speaker, an indicator lamp, or the like. The device 300 can exchange information, data, and the like with other devices through the communication unit 309.
It should be noted that the device may also include other components necessary to achieve proper operation. It may also contain only the components necessary to implement the solution of the present application and not necessarily all of the components shown in the figures.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof.
Computer instructions for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer instructions may be provided to the computing unit 301 such that the computer instructions, when executed by the computing unit 301, such as a processor, cause the steps involved in embodiments of the method of the present application to be performed.
The present application also provides a computer-readable storage medium, on which computer instructions are stored, the computer instructions being used for causing a computer to execute the task processing method according to any one of the above embodiments.
The computer-readable storage medium provided herein may be a tangible medium that may contain, or store, computer instructions for performing the steps involved in the method embodiments of the present application. The computer readable storage medium may include, but is not limited to, storage media in the form of electronic, magnetic, optical, electromagnetic, and so forth.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A method for processing a task, the method comprising:
acquiring a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object;
identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task objects of the initialization tasks and the execution operation information corresponding to the task objects, wherein the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel;
executing the plurality of first initialization tasks in a parallel running mode;
and determining the operation logic of the plurality of second initialization tasks according to the execution operation information of the second initialization tasks, and executing the plurality of second initialization tasks according to the operation logic.
2. The task processing method according to claim 1, wherein identifying a plurality of second initialization tasks among the plurality of initialization tasks based on the task object of each initialization task and the execution operation information corresponding to each task object includes:
identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object;
or identifying a plurality of second initialization tasks with a mutually exclusive relationship in task execution according to the task object of each initialization task and the execution operation information corresponding to each task object.
3. The task processing method according to claim 2, wherein the identifying, based on the task object of each initialization task and the execution operation information corresponding to each task object, a plurality of second initialization tasks for which there is a dependency relationship in task execution includes:
identifying task input information and task output information of each initialization task according to the task object of each initialization task and the execution operation information corresponding to each task object;
and identifying a plurality of second initialization tasks with dependency relationship in task execution according to the task input information and the task output information of each initialization task.
4. The task processing method according to claim 3, wherein the identifying task input information and task output information of each initialization task from the task object of each initialization task and the execution operation information corresponding to each task object includes:
reading task codes of the initialization tasks;
identifying a task object and a code set of execution operation information corresponding to the task object from the task code;
identifying a code block of a calling function from the code set;
and identifying the task input information and the task output information of each initialization task according to the code block of the calling function.
5. The method according to claim 2, wherein the mutual exclusion relationship is that task objects of any plurality of initialization tasks are the same, or execution operation information of any plurality of initialization tasks indicates the same execution operation on the same task object.
6. The task processing method according to claim 2, wherein the identifying, according to the task object of each initialization task and the execution operation information corresponding to each task object, a plurality of second initialization tasks whose task execution has a mutual exclusion relationship includes:
identifying a plurality of initialization tasks to be selected of the same task object according to the task object of each initialization task;
and identifying a plurality of second initialization tasks with mutually exclusive execution operations from the plurality of initialization tasks to be selected according to the execution operation information of each initialization task to be selected.
7. The task processing method according to claim 1, wherein the task object is data of a device or a call started at the start of automated driving.
8. A task processing apparatus, characterized in that the apparatus comprises:
an acquisition module: the method comprises the steps of obtaining a task object of each initialization task in a plurality of initialization tasks to be executed and execution operation information corresponding to the task object;
an identification module: the system comprises a plurality of initialization tasks, a plurality of execution operation information and a plurality of first initialization tasks, wherein the execution operation information is used for identifying a plurality of first initialization tasks and a plurality of second initialization tasks in the plurality of initialization tasks according to the task objects of the initialization tasks and the execution operation information corresponding to the task objects, the plurality of first initialization tasks can be processed in parallel, and the plurality of second initialization tasks cannot be processed in parallel;
a first execution module: the system comprises a plurality of first initialization tasks, a plurality of second initialization tasks and a plurality of control modules, wherein the plurality of first initialization tasks are executed in a parallel running mode;
a second execution module: and the operation logic is used for determining the plurality of second initialization tasks according to the execution operation information of the second initialization tasks and executing the plurality of second initialization tasks according to the operation logic.
9. A computer device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores computer instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer-readable storage medium having computer instructions stored thereon for causing a computer to perform the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210611782.7A CN114942790A (en) | 2022-05-31 | 2022-05-31 | Task processing method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210611782.7A CN114942790A (en) | 2022-05-31 | 2022-05-31 | Task processing method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114942790A true CN114942790A (en) | 2022-08-26 |
Family
ID=82908907
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210611782.7A Pending CN114942790A (en) | 2022-05-31 | 2022-05-31 | Task processing method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114942790A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255602A (en) * | 2017-11-01 | 2018-07-06 | 平安普惠企业管理有限公司 | Task combined method and terminal device |
CN109144695A (en) * | 2018-08-30 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | A kind of processing method, device, equipment and the medium of task topological relation |
CN110134499A (en) * | 2019-03-29 | 2019-08-16 | 新智云数据服务有限公司 | Method for scheduling task, task scheduling system, storage medium and computer equipment |
CN112748993A (en) * | 2019-10-31 | 2021-05-04 | 北京国双科技有限公司 | Task execution method and device, storage medium and electronic equipment |
CN112988362A (en) * | 2021-05-14 | 2021-06-18 | 南京蓝洋智能科技有限公司 | Task processing method and device, electronic equipment and storage medium |
-
2022
- 2022-05-31 CN CN202210611782.7A patent/CN114942790A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255602A (en) * | 2017-11-01 | 2018-07-06 | 平安普惠企业管理有限公司 | Task combined method and terminal device |
CN109144695A (en) * | 2018-08-30 | 2019-01-04 | 百度在线网络技术(北京)有限公司 | A kind of processing method, device, equipment and the medium of task topological relation |
CN110134499A (en) * | 2019-03-29 | 2019-08-16 | 新智云数据服务有限公司 | Method for scheduling task, task scheduling system, storage medium and computer equipment |
CN112748993A (en) * | 2019-10-31 | 2021-05-04 | 北京国双科技有限公司 | Task execution method and device, storage medium and electronic equipment |
CN112988362A (en) * | 2021-05-14 | 2021-06-18 | 南京蓝洋智能科技有限公司 | Task processing method and device, electronic equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
苏曙光 等: "《嵌入式系统原理与设计》", 31 July 2011, 武汉:华中科技大学出版社, pages: 103 - 105 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019161619A1 (en) | Automatic interface test method and apparatus, and device and computer-readable storage medium | |
JP2023507024A (en) | Defect detection method and device, electronic device and storage medium | |
CN114168222B (en) | Method and device for acquiring time consumption during starting, terminal equipment and storage medium | |
US20240045787A1 (en) | Code inspection method under weak memory ordering architecture and corresponding device | |
US9870314B1 (en) | Update testing by build introspection | |
CN107179982B (en) | Cross-process debugging method and device | |
CN111949513A (en) | Configuration file loading method and device, electronic equipment and readable storage device | |
CN111897711A (en) | Method and device for positioning bug in code, electronic equipment and readable storage medium | |
CN109388564B (en) | Test method and device and electronic equipment | |
US11994977B2 (en) | Test case generation apparatus, test case generation method, and computer readable medium | |
US10055341B2 (en) | To-be-stubbed target determining apparatus, to-be-stubbed target determining method and non-transitory recording medium storing to-be-stubbed target determining program | |
CN114942790A (en) | Task processing method, device, equipment and storage medium | |
CN114238980A (en) | Industrial control equipment vulnerability mining method, system, equipment and storage medium | |
CN116401113B (en) | Environment verification method, device and medium for heterogeneous many-core architecture acceleration card | |
CN114428694A (en) | Error detection method and related device | |
CN106445949A (en) | Method and device for detecting data change in data table | |
US20230087569A1 (en) | Automatic test generation for highly complex existing software | |
CN112988558B (en) | Test execution method, device, electronic equipment and storage medium | |
CN110515653B (en) | Document generation method and device, electronic equipment and computer readable storage medium | |
CN114425787A (en) | Control method and device for robot automatic test, server and storage medium | |
CN114077538A (en) | Program debugging method and device and readable storage medium | |
JP2021005379A (en) | Method for detecting deep learning chip, device, electronic apparatus, and computer storage medium | |
CN112527660B (en) | Static detection method and device for codes | |
CN114115763B (en) | Configuration device and configuration method for printer platform product | |
CN114942885A (en) | Software integration test method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |