A task processing method for decision-making module
By adopting a parallel task processing mechanism in the decision module of the autonomous driving system, segmenting the task flow and creating parallel tasks, the problem of delay superposition and accuracy reduction caused by the traditional single-task processing mechanism is solved, and a higher real-time and accuracy of decisions is achieved.
Patent Information
- Application Number
- CN202211036749.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-29
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-08-29
AI Technical Summary
The traditional single-task processing mechanism has problems such as delay superposition and reduced decision accuracy in the decision-making module of the autonomous driving system.
The parallel task processing mechanism is adopted to improve the real-time and accuracy of decision-making by dividing the decision-making task flow into multiple subtask modules and processing subunits, and dynamically creating parallel tasks.
Improve the real-time and accuracy of the decision module, dynamically control the frequency of task creation, reduce the risk of memory overflow, and adjust the processing results through the latest perceived prediction data.
Smart Images

Figure CN115454593B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a task processing method for a decision module. Background Art
[0002] The decision-making planning module of the autonomous driving system is also called the decision-making module. Its upstream is the perception and prediction module, and its downstream is the control module. The traditional decision-making module uses a single-task processing mechanism to process data when working. The so-called single-task processing mechanism means that when the decision module obtains the latest perception data and prediction data from the upstream perception and prediction module, it first judges whether it is currently in an idle state; if the judgment result is an idle state, a decision processing task is created to process the decision task according to this set of perception and prediction data to obtain a planning trajectory and send it to the downstream control module, and during the processing, its own state is always kept in a non-idle state until the processing process is completed and its own state is switched back to the idle state; if the judgment result is a non-idle state, no task creation is performed until its own state is switched back to the idle state. In actual applications, we found that this traditional single-task processing mechanism has the following two obvious defects: 1) All tasks are linearly sorted, which is bound to cause delay superposition of multiple tasks, thereby reducing the real-time nature of decision-making; 2) During the execution of a single task, the newly received perception and prediction data cannot be processed in a timely manner, resulting in a decrease in the accuracy of decision-making.
[0003] In order to solve the above two technical defects, we provide a parallel task processing mechanism of a decision module through the present invention to replace the traditional single task processing mechanism. It should be noted that to realize this parallel task processing mechanism, the following settings need to be made in advance: 1) a complete decision processing task flow of the decision module is pre-divided into multiple sub-task modules, namely the interface processing units mentioned below, and a task interface is assigned to each interface processing unit; 2) the processing flow of each interface processing unit is pre-divided into three processing sub-units (a type of data processing sub-unit, a type of data processing sub-unit and an output fusion sub-unit), wherein the type of data processing sub-unit is used to perform data processing according to a set of perception and prediction data initially received by the task (hereinafter referred to as initial perception prediction data) and / or the output data of the previous interface processing unit, the type of data processing sub-unit is used to perform data processing according to a set of incremental perception prediction data obtained by comparing the latest perception and prediction data with the initial perception prediction data, and the output fusion sub-unit is specified to perform data fusion processing on the processing results of the type I and type II data processing sub-units, and the data processing flow of the three processing sub-units of each interface processing unit is pre-functionally implemented. Summary of the invention
[0004] The purpose of the present invention is to provide a task processing method, electronic device and computer-readable storage medium for a decision module in response to the defects of the prior art; through the task processing mechanism provided by the present invention, a new parallel task can be created during the task processing process of a decision processing task, thereby achieving the purpose of improving the real-time and accuracy of the decision; when creating a new task, it is created with reference to the task status of the previous task. The faster the task status of the previous task is switched, the faster the creation of the next task is, and vice versa. In this way, the purpose of dynamically controlling the frequency of task creation can be achieved, and the risk of memory overflow caused by a large number of parallel tasks can be reduced; during the execution of each decision processing task, the processing results of each interface processing unit can also be adjusted based on the latest perception prediction data, thereby achieving the purpose of further improving the accuracy of the decision.
[0005] To achieve the above object, a first aspect of an embodiment of the present invention provides a task processing method of a decision module, the method comprising:
[0006] The decision module obtains the latest perception and prediction data output by the upstream perception and prediction module at the starting time i as the corresponding first perception data D p,i and the first prediction data D f,i , i ≥ 0; and create the decision processing task at time i as the corresponding first task A i ; and for the first task A i Assign a corresponding first task state and initialize the first task state to the first state; and the first task A i According to the first perception data D p,i , the first prediction data D f,i and performing decision-making task processing with the preset task interface list; and closing the first task A when the decision-making task processing is successful i , and delete the corresponding first task state;
[0007] The decision module in the first task A i During the processing of the first task state, the first task state is monitored; when it is monitored that the first task state switches to the second state, the latest perception and prediction data output by the upstream perception and prediction module at the current time j is obtained as the corresponding second perception data D p,j and the second prediction data D f,j , j>i; and create the decision processing task at time j as the corresponding second task A j ; and for the second task A j Assign a corresponding second task state and initialize the second task state to the first state; and the second task A j According to the second perception data D p,j The second prediction data Df,j and the task interface list to perform the decision task processing; and close the second task A when the decision task processing is successful j , and delete the corresponding second task state.
[0008] Preferably, the first perception data D p,i and the second perception data D p,j The data formats of the two are the same, and are composed of multiple obstacle sensing data; each obstacle sensing data is composed of an obstacle identifier, an obstacle type, and an obstacle historical trajectory;
[0009] The first prediction data D f,i and the second prediction data D f,j The data formats of the two are the same, and are composed of a plurality of obstacle prediction data; each obstacle prediction data is composed of an obstacle identifier and an obstacle prediction trajectory;
[0010] The task interface list includes multiple task interface sequence records; the task interface sequence record includes a decision template version field and a task interface sequence field; the task interface sequence field includes multiple first task interface data; the first task interface data includes a first interface index and a first task interface.
[0011] Preferably, the decision task processing specifically includes:
[0012] Step 31: the first task A currently being processed as a decision task i Or the second task A j as the corresponding current task A; and the first task state or the second task state corresponding to the current task A is used as the corresponding current task state; and the first perception data D currently input p,i and the first prediction data D f,i or the second perception data D p,j and the second prediction data D f,j as corresponding first input perception data and first input prediction data;
[0013] Step 32, the current task A obtains local decision module version data as the corresponding first version;
[0014] Step 33: The current task A records the task interface sequence in the task interface list whose decision template version field matches the first version as the corresponding current task interface sequence record; extracts all the first task interface data in the task interface sequence field of the current task interface sequence record to form a corresponding first task interface data set; and sorts the first task interfaces in the first task interface data set in the order of the corresponding first interface index to generate a corresponding first task interface sequence.
[0015] Step 34: The current task A takes the interface processing unit corresponding to the first first task interface in the first task interface sequence as the corresponding current interface processing unit; initializes the second input perception data, the second input prediction data, and the previous unit output data to be empty; forms the corresponding current unit input data from the first input perception data, the first input prediction data, the second input perception data, the second input prediction data, and the previous unit output data; sends the current unit input data to the current interface processing unit for unit task processing to output the corresponding current unit output data; when the current unit output data is obtained, takes the current interface processing unit as the corresponding previous interface processing unit, takes the first task interface corresponding to the previous interface processing unit as the corresponding previous task interface, takes the current unit output data as the new previous unit output data, and switches the corresponding current task state from the first state to the second state.
[0016] Step 35: The current task A determines whether the previous task interface is the last first task interface in the first task interface sequence; if so, proceeds to Step 37; if not, proceeds to Step 36.
[0017] Step 36: The current task A takes the interface processing unit corresponding to the next first task interface in the first task interface sequence as the new current interface processing unit; obtains the latest perception and prediction data output by the perception and prediction module at the current moment k as the corresponding third perception data D p,k and the third prediction data D f,k , i < k; compares the third perception data D p,k with the first input perception data, and extracts the newly added data part in the third perception data D p,k as the new second input perception data; compares the third prediction data D f,k with the first input prediction data, and extracts the newly added data part in the third prediction data D f,kThe newly added data part in the output is extracted as the new second input prediction data; and the new current unit input data is composed of the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data; and the current unit input data is sent to the current interface processing unit for unit task processing to generate new current unit output data; and when the current unit output data is obtained, the current interface processing unit is used as the new previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the new previous task interface, and the current unit output data is used as the new previous unit output data; and go to step 35; wherein, the third perception data D p,k The third prediction data D is in the same data format as the first input perception data. f,k The data format is the same as that of the first input perception data;
[0018] Step 37, the current task A confirms that the decision task processing is successful, and uses the latest output data of the current unit as the output data of the current decision task processing.
[0019] Furthermore, each of the interface processing units includes a first-type data processing sub-unit, a second-type data processing sub-unit and an output fusion sub-unit.
[0020] Furthermore, the method further comprises:
[0021] When each of the interface processing units performs its own unit task processing, it extracts the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing.
[0022] A second aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0023] The processor is used to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;
[0024] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0025] A third aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.
[0026] The embodiment of the present invention provides a task processing method of a decision module, an electronic device and a computer-readable storage medium; the decision module receives a set of perception and prediction data output by an upstream perception and prediction module at a starting time i and creates a corresponding decision processing task A i , and the decision processing task A i Perform decision-making task processing based on the perception prediction data and task interface list at time i, and create a new decision-making task A when the task status of decision-making task Ai changes jDecision-making tasks are processed according to the perception prediction data and task interface list at the subsequent time j; and in the process of processing each decision processing task, multiple interface processing units are called in sequence to complete the current task processing; and each time a single interface processing unit is called, the latest perception prediction data output by the upstream perception and prediction module is obtained, and the latest perception prediction data and the initial perception prediction data are compared to extract the corresponding incremental perception prediction data, and then the previous unit output data of the current interface processing unit, the initial perception prediction data and the current incremental perception prediction data are input into the current interface processing unit for unit task processing; and when each interface processing unit performs unit task processing, a first-class data processing sub-unit is called to perform data processing according to the initial perception prediction data and the previous unit output data, a second-class data processing sub-unit is called to perform data processing according to the incremental perception prediction data, and an output fusion sub-unit is called to fuse the output results of the first and second-class data processing sub-units, thereby achieving the purpose of adjusting the processing results of the initial perception prediction data based on the processing results of the incremental perception prediction data. Through the task processing mechanism provided by the present invention, a new parallel task can be created during the task processing process of a decision processing task, thereby improving the real-time and accuracy of the decision; when creating a new task, the task status of the previous task is referred to for creation. The faster the task status of the previous task is switched, the faster the creation of the next task is, and vice versa. In this way, the task creation frequency can be dynamically controlled, reducing the risk of memory overflow caused by a large number of parallel tasks; during the execution of each decision processing task, the processing results of each interface processing unit can also be adjusted based on the latest perception prediction data, further improving the purpose of decision accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of a task processing method of a decision module provided in Embodiment 1 of the present invention;
[0028] Figure 2 A schematic diagram of the structure of an electronic device provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Embodiment 1 of the present invention provides a task processing method for a decision module. The decision module manages the decision processing tasks through the method of embodiment 1 of the present invention, which can improve the accuracy and real-time performance of the decision. It should be noted that to implement the method of embodiment 1 of the present invention, the following settings need to be made for the decision module in advance: 1) the complete decision processing task flow of each version of the decision module is pre-divided into multiple sub-task modules, namely, the interface processing units mentioned below, and a task interface is assigned to each interface processing unit, and a task interface list is created to store the task interface data of each version of the decision processing task flow; 2) the processing flow of each interface processing unit is pre-divided into multiple sub-task modules, namely, the interface processing units mentioned below, and a task interface is assigned to each interface processing unit, and a task interface list is created to store the task interface data of each version of the decision processing task flow; It is divided into three processing sub-units (a type I data processing sub-unit, a type II data processing sub-unit and an output fusion sub-unit), and the type I data processing sub-unit is used to perform data processing according to the initial perception prediction data and / or the output data of the previous interface processing unit, the type II data processing sub-unit is used to perform data processing according to the incremental perception prediction data, the output fusion sub-unit is used to perform data fusion processing on the processing results of the type I and type II data processing sub-units, and the data processing flows of the three processing sub-units of each interface processing unit of each version of the decision processing task flow are pre-implemented and locally loaded so that subsequent method steps can be directly called. Figure 1 A schematic diagram of a task processing method of a decision module provided in Embodiment 1 of the present invention is shown in FIG. Figure 1 As shown, this method mainly includes the following steps:
[0031] Step 1: The decision module obtains the latest perception and prediction data output by the upstream perception and prediction module at the starting time i as the corresponding first perception data D p,i and the first prediction data D f,i , i ≥ 0; and create the decision processing task at time i as the corresponding first task A i ; and for the first task A i Assign a corresponding first task state and initialize the first task state to the first state; and the first task A i According to the first perception data D p,i , the first prediction data D f,i Perform decision-making task processing with the preset task interface list; and close the first task A when the decision-making task processing is successful i , and delete the corresponding first task state;
[0032] Specifically, step 11, the decision module obtains the latest perception and prediction data output by the upstream perception and prediction module at the starting time i as the corresponding first perception data D p,i and the first prediction data D f,i , i≥0;
[0033] Among them, the first perception data Dp,i It is composed of multiple obstacle perception data; each obstacle perception data is composed of obstacle identification, obstacle type and obstacle historical trajectory; the first prediction data D f,i It is composed of multiple obstacle prediction data; each obstacle prediction data is composed of obstacle identification and obstacle prediction trajectory;
[0034] Here, we first briefly introduce the upstream perception module and prediction module of the decision module; the function of the perception module is to obtain real-time sensor data (such as images, lidar point clouds, millimeter-wave radar point clouds, etc.) from the perception sensors (such as cameras, lidars, millimeter-wave radars, etc.) connected to it, and perceive and identify obstacles in the vehicle's surrounding environment based on the obtained sensor data to obtain one or more obstacle identification results (including obstacle type, obstacle size, etc.), and then based on the historical identification results of all obstacles, the data of one or more obstacles obtained at that time are associated to obtain the obstacle identification of each obstacle identified at that time, and then based on each obstacle identification, the historical trajectory of each obstacle, that is, the obstacle historical trajectory, can be queried. The perception module forms corresponding obstacle perception data with the obstacle identification, obstacle type and obstacle historical trajectory of each obstacle identified at the time in each working cycle, and the obstacle perception data of multiple obstacles form the latest perception data and send it to the decision module; the function of the prediction module is to predict the movement trajectory of each obstacle in the future period according to the obstacle type, obstacle size and obstacle historical trajectory of each obstacle identified at the time, so as to obtain the corresponding obstacle prediction trajectory; the prediction module forms corresponding obstacle prediction data with the obstacle identification and obstacle prediction trajectory of each obstacle identified at the time in each working cycle, and the obstacle prediction data of multiple obstacles form the latest prediction data and send it to the decision module;
[0035] Step 12: Create the decision processing task at time i and record it as the corresponding first task A i ; and for the first task A i Allocating a corresponding first task state and initializing the first task state to the first state;
[0036] Wherein, the first task state includes a first state and a second state;
[0037] Here, the embodiment of the present invention assigns a task state to each created decision processing task; each task state has two state values, namely the first state and the second state, and its initial value is set to the first state by default; when the task state is the first state, it means that the corresponding decision processing task has not completed the task processing of the first interface processing unit under it during the running process, and the embodiment of the present invention stipulates that a new parallel decision processing task cannot be created at this time; when the task state is the second state, it means that the corresponding decision processing task has completed the task processing of the first interface processing unit under it during the running process, and the embodiment of the present invention stipulates that a new parallel decision processing task can be created at this time; the currently created task is the first task A i Then the corresponding task state is the first task state, the first task state includes the first state and the second state, and the first task state will be initialized to the first state;
[0038] Step 13, by the first task A i According to the first perception data D p,i , the first prediction data D f,i Perform decision-making task processing with the preset task interface list;
[0039] Specifically, step 131 includes: i as the corresponding current task A; and the first task state corresponding to the current task A is taken as the corresponding current task state; and the first perception data D currently input is taken as the corresponding current task state; p,i and the first prediction data D f,i as corresponding first input perception data and first input prediction data;
[0040] Here, the first input perception data and the first input prediction data are actually a set of perception and prediction data initially received for the task mentioned above, that is, the initial perception prediction data;
[0041] Step 132, the current task A obtains the local decision module version data as the corresponding first version;
[0042] Here, the local part of the decision module of the embodiment of the present invention will pre-set a system parameter, namely, decision module version data, and the decision module version data is used to identify the decision module version information currently being used;
[0043] Step 133, the current task A uses the task interface sequence record whose decision template version field in the task interface list matches the first version as the corresponding current task interface sequence record; and extracts all first task interface data in the task interface sequence field of the current task interface sequence record to form a corresponding first task interface data set; and sorts the first task interfaces in the first task interface data set in the order of the corresponding first interface indexes to generate a corresponding first task interface sequence;
[0044] The task interface list includes a plurality of task interface sequence records; the task interface sequence record includes a decision template version field and a task interface sequence field; the task interface sequence field includes a plurality of first task interface data; the first task interface data includes a first interface index and a first task interface;
[0045] Here, the decision processing task flow of the decision module of the embodiment of the present invention can have multiple versions, and each version of the decision processing task flow is pre-decomposed into multiple interface processing units that are executed in sequence, and each interface processing unit corresponds to a unique task calling interface; each task interface sequence record in the task interface list corresponds to a version of the decision processing task flow; the decision template version field in the task interface sequence record is the version information of the corresponding version; each first task interface data in the task interface sequence field in the task interface sequence record corresponds to an interface processing unit, and the first interface index of the first task interface data is the sequential execution index information of the corresponding interface processing unit, and the first task interface is the task calling interface information of the corresponding interface processing unit; after the current task A obtains the first version, the corresponding task interface sequence record, that is, the current task interface sequence record, can be located by querying the task interface list, and then the first task interfaces in the task interface sequence field of the current task interface sequence record can be sorted according to the corresponding first interface index to obtain the first task interface sequence, and the first task interface sequence reflects the sequential execution order of each interface processing unit of the decision processing task flow corresponding to the first version;
[0046] Step 134, the current task A uses the interface processing unit corresponding to the first task interface of the first task interface sequence as the corresponding current interface processing unit; and initializes the second input perception data, the second input prediction data and the previous unit output data to be empty; and the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data form the corresponding current unit input data; and sends the current unit input data to the current interface processing unit for unit task processing to output the corresponding current unit output data; and when the current unit output data is obtained, the current interface processing unit is used as the corresponding previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the corresponding previous task interface, and the current unit output data is used as the new previous unit output data, and the corresponding current task state is switched from the first state to the second state;
[0047] Specifically, it includes: step 1341, the current task A uses the interface processing unit corresponding to the first first task interface of the first task interface sequence as the corresponding current interface processing unit;
[0048] Wherein, each interface processing unit includes a first-class data processing sub-unit, a second-class data processing sub-unit and an output fusion sub-unit;
[0049] Here, as known from the foregoing, before step 1 of the embodiment of the present invention, the processing flow of each interface processing unit is pre-divided into three processing sub-units: a type-one data processing sub-unit, a type-two data processing sub-unit and an output fusion sub-unit, and the data processing flow function implementation of each processing sub-unit of each interface processing unit of each version of the decision processing task flow has been completed in advance, and the function loading of each processing sub-unit of each interface processing unit of each version of the decision processing task flow has been completed locally in the decision module in advance, and the data processing flow of each processing sub-unit can be directly called in the implementation steps of the embodiment of the present invention;
[0050] Step 1342, initializing the second input sense data, the second input prediction data and the previous unit output data to be empty; and forming the corresponding current unit input data from the first input sense data, the first input prediction data, the second input sense data, the second input prediction data and the previous unit output data;
[0051] Here, the first input perception data and the first input prediction data in the current step are the initial perception prediction data, the second input perception data and the second input prediction data are the incremental perception prediction data, and the previous unit output data are the previous interface processing unit output data; because the current interface processing unit is the first interface processing unit, there is no need to obtain incremental perception prediction data at this time, so the second input perception data and the second input prediction data are initialized to empty, and there is no previous receiving unit before the first interface processing unit, so the previous unit output data is initialized to empty at this time;
[0052] Step 1343, sending the current unit input data to the current interface processing unit for unit task processing and outputting the corresponding current unit output data;
[0053] Specifically, it includes: when the current interface processing unit performs unit task processing, the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data are extracted from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing;
[0054] Here, it is known that a type of data processing sub-unit is used to perform data processing according to the initial perception prediction data and / or the output data of the previous interface processing unit. Then, when the current interface processing unit performs unit task processing, it will call the data processing flow corresponding to the type of data processing sub-unit of the current interface processing unit to perform data processing on a type of input data consisting of the first input perception data, the first input prediction data and the output data of the previous unit to obtain the corresponding type of output data; it is known that a type of data processing sub-unit is used to perform data processing according to the incremental perception prediction data. Then, when the current interface processing unit performs unit task processing, it will call the data processing flow corresponding to the type of data processing sub-unit of the current interface processing unit to perform data processing on the type of input data consisting of the second input perception data and the second input prediction data to obtain the corresponding type of output data; it is known that the output fusion sub-unit is used to perform data fusion processing on the processing results of the type one and type two data processing sub-units. Then, when the current interface processing unit performs unit task processing, it will call the data processing flow corresponding to the output fusion sub-unit of the current interface processing unit to perform data fusion processing on the type one and type two output data;
[0055] It should be noted that, before each call of the data processing flow corresponding to the second-category data processing subunit to perform data processing, the embodiment of the present invention will judge whether the second-category input data is empty; if it is empty, it means that the incremental perception prediction data obtained at that time is empty, and at this time, there is no need to perform data processing according to the incremental perception prediction data, and the corresponding second-category output data is also empty by default; if it is not empty, it means that the incremental perception prediction data obtained at that time is not empty, and at this time, it is necessary to perform data processing according to the incremental perception prediction data;
[0056] It should also be noted that, before each call to the data processing flow corresponding to the output fusion subunit for data fusion processing, the embodiment of the present invention will determine whether the second type of output data is empty; if the second type of output data is empty, it means that either the incremental perception prediction data obtained at that time is empty, or the second type of data processing subunit at that time did not output a valid processing result based on the incremental perception prediction data that is not empty, that is, the unit task processing does not need to adjust the processing result of the initial perception prediction data based on the processing result of the incremental perception prediction data. At this time, the embodiment of the present invention will not call the output fusion subunit for processing, but directly output the first type of output data as the current unit output data; if the second type of output data is not empty, it means that the second type of data processing subunit at that time outputs a valid processing result based on the incremental perception prediction data that is not empty. At this time, it is necessary to adjust the processing result of the initial perception prediction data based on the processing result of the incremental perception prediction data. The embodiment of the present invention will correspondingly call the output fusion subunit for data fusion processing and output the processing result as the current unit output data;
[0057] Step 1344, when obtaining the current unit output data, set the current interface processing unit as the corresponding previous interface processing unit, set the first task interface corresponding to the previous interface processing unit as the corresponding previous task interface, set the current unit output data as the new previous unit output data, and switch the corresponding current task status from the first state to the second state;
[0058] Here, as known from the foregoing, in the embodiment of the present invention, the next decision processing task can be created when the previous decision processing task completes the task processing of the first interface processing unit under it, and the first task state is a status flag used to identify whether the task processing of the first interface processing unit is completed. Therefore, when obtaining the current unit output data, it indicates that the task processing of the first interface processing unit has been completed, and the first task state should be switched from the first state to the second state;
[0059] Step 135, current task A determines whether the previous task interface is the last first task interface in the first task interface sequence; if so, go to step 137; if not, go to step 136;
[0060] Step 136, current task A sets the interface processing unit corresponding to the next first task interface in the first task interface sequence as the new current interface processing unit; and obtains the latest perception and prediction data output by the perception and prediction module at the current moment k1 as the corresponding third perception data D p,k1 and third prediction data D f,k1 , i < k1; and compares the third perception data D p,k1 with the first input perception data, extracts the new data part in the third perception data D p,k1 as the new second input perception data; and compares the third prediction data D f,k1 with the first input prediction data, extracts the new data part in the third prediction data D f,k1 as the new second input prediction data; and forms the new current unit input data from the first input perception data, the first input prediction data, the second input perception data, the second input prediction data, and the previous unit output data; and sends the current unit input data to the current interface processing unit for unit task processing to generate the new current unit output data; and when obtaining the current unit output data, set the current interface processing unit as the new previous interface processing unit, set the first task interface corresponding to the previous interface processing unit as the new previous task interface, and set the current unit output data as the new previous unit output data; and go to step 135;
[0061] Among them, the data format of the third perception data D p,k1 is the same as that of the first input perception data, and the data format of the third prediction data D f,k1The data format is the same as that of the first input perception data;
[0062] Specifically, it includes: step 1361, the current task A uses the interface processing unit corresponding to the next first task interface in the first task interface sequence as the new current interface processing unit;
[0063] Step 1362: Obtain the latest perception and prediction data output by the perception and prediction module at the current time k1 as the corresponding third perception data D p,k1 and the third prediction data D f,k1 ,i <k1;
[0064] Among them, the third perception data D p,k1 The data format of the first input perception data is the same as that of the first input perception data, which is also composed of multiple obstacle perception data; each obstacle perception data is composed of an obstacle identifier, an obstacle type, and an obstacle historical trajectory; the third prediction data D f,k1 The data format is the same as that of the first input perception data, and is also composed of multiple obstacle prediction data; each obstacle prediction data is composed of an obstacle identifier and an obstacle prediction trajectory;
[0065] Here, the third perception data D in the current step p,k1 and the third prediction data D f,k1 That is, the latest perception observation data;
[0066] Step 1363, the third perception data D p,k1 Compared with the first input perception data, the third perception data D p,k1 The newly added data in is extracted as the new second input perception data; and the third prediction data D f,k1 Compared with the first input prediction data, the third prediction data D f,k1 The newly added data part is extracted as the new second input prediction data; and the new current unit input data is composed of the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data;
[0067] Here, when the third perception data D p,k1 Compared with the first input perception data, the third perception data D p,k1 When the newly added data in is extracted as the new second input perception data, only the third perception data D p,k1 Compared with the obstacle identification in the first input perception data, only the obstacle identification in the third perception data D p,k1 The obstacle identifier that exists in the first input perception data but not in the first input perception data is recorded as the corresponding newly added obstacle identifier, and the third perception data D p,k1The obstacle perception data corresponding to all newly added obstacle identifiers are extracted as new second input perception data;
[0068] Similarly, when the third prediction data D f,k1 Compared with the first input prediction data, the third prediction data D f,k1 When the newly added data in is extracted as the new second input prediction data, only the third prediction data D f,k1 The obstacle identification in the first input prediction data is compared and the obstacle identification in the third prediction data D is f,k1 The obstacle identifiers that exist in the first input prediction data but not in the first input prediction data are recorded as the corresponding newly added obstacle identifiers, and the third prediction data D f,k1 The obstacle prediction data corresponding to all newly added obstacle identifiers are extracted as new second input prediction data;
[0069] The first input perception data and the first input prediction data in the current unit input data are the initial perception prediction data, and the new second input perception data and the second input prediction data are the new incremental perception prediction data;
[0070] Step 1364, sending the current unit input data to the current interface processing unit for unit task processing to generate new current unit output data;
[0071] Specifically, it includes: when the current interface processing unit performs unit task processing, the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data are extracted from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing;
[0072] Here, the current step is similar to the implementation of the aforementioned step 1343, and will not be further described here;
[0073] Step 1365, when the current unit output data is obtained, the current interface processing unit is used as the new previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the new previous task interface, and the current unit output data is used as the new previous unit output data; and return to step 135;
[0074] Step 137, the current task A confirms that the decision task processing is successful, and uses the latest current unit output data as the output data of the current decision task processing;
[0075] Step 14: Close the first task A when the decision task is successfully processed i , and delete the corresponding first task state.
[0076] Step 2: The decision module is in the first task A i During the processing of the first task state, the first task state is monitored; when it is detected that the first task state switches to the second state, the latest perception and prediction data output by the upstream perception and prediction module at the current time j is obtained as the corresponding second perception data D p,j and the second prediction data D f,j , j>i; and create the decision processing task at time j as the corresponding second task A j ; and for the second task A j Assign a corresponding second task state and initialize the second task state to the first state; and the second task A j According to the second perception data D p,j , the second prediction data D f,j and the task interface list to process the decision task; and close the second task A when the decision task processing is successful j , and delete the corresponding second task state;
[0077] Specifically comprising: step 21, the decision module in the first task A i During the processing of the first task state, the first task state is monitored; when it is detected that the first task state switches to the second state, the latest perception and prediction data output by the upstream perception and prediction module at the current time j is obtained as the corresponding second perception data D p,j and the second prediction data D f,j , j>i;
[0078] Among them, the second perception data D p,j and the first perception data D p,i The data formats of the two are the same, and they are composed of multiple obstacle perception data; each obstacle perception data is composed of obstacle identification, obstacle type and obstacle historical trajectory; the second prediction data D f,j and the first prediction data D f,iThe data formats of the two are the same, and they are composed of multiple obstacle prediction data; each obstacle prediction data is composed of an obstacle identifier and an obstacle prediction trajectory;
[0079] Here, it is known from the foregoing that the implementation of the present invention stipulates that the next decision processing task can be created when the previous decision processing task completes the task processing of the first interface processing unit under it, and the first task status is a status mark used to identify whether the task processing of the first interface processing unit is completed. Therefore, in the previous decision processing task, that is, the first task A i In the process of processing, the first task A i The first task state is monitored in real time. Once the first task state is found to switch to the second state, the creation of a new decision processing task is started. Before the creation, the latest perception and prediction data at the current time k is obtained as the second perception data D p,j and the second prediction data D f,j ;
[0080] Step 22: Create a decision processing task at time j and record it as the corresponding second task A j ; and for the second task A j Allocating a corresponding second task state and initializing the second task state to the first state;
[0081] Wherein, the second task state includes a first state and a second state;
[0082] Here, the current step is similar to the implementation of the aforementioned step 12, and will not be further described here;
[0083] Step 23, by the second task A j According to the second perception data D p,j , the second prediction data D f,j And the task interface list performs decision-making task processing;
[0084] Specifically include: Specifically include: Step 231, the second task A currently processing the decision task j as the corresponding current task A; and the second task state corresponding to the current task A as the corresponding current task state; and the second perception data D currently input p,j and the second prediction data D f,j as corresponding first input perception data and first input prediction data;
[0085] Here, the first input perception data and the first input prediction data are actually a set of perception and prediction data initially received for the task mentioned above, that is, the initial perception prediction data;
[0086] Step 232, the current task A obtains the local decision module version data as the corresponding first version;
[0087] Here, the current step is similar to the implementation of the aforementioned step 132, and will not be further described here;
[0088] Step 233, the current task A uses the task interface sequence record whose decision template version field in the task interface list matches the first version as the corresponding current task interface sequence record; and extracts all first task interface data in the task interface sequence field of the current task interface sequence record to form a corresponding first task interface data set; and sorts the first task interfaces in the first task interface data set in the order of the corresponding first interface indexes to generate a corresponding first task interface sequence;
[0089] Here, the current step is similar to the implementation of the aforementioned step 133, and will not be further described here;
[0090] Step 234, the current task A uses the interface processing unit corresponding to the first task interface of the first task interface sequence as the corresponding current interface processing unit; and initializes the second input perception data, the second input prediction data and the previous unit output data to be empty; and the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data form the corresponding current unit input data; and sends the current unit input data to the current interface processing unit for unit task processing to output the corresponding current unit output data; and when the current unit output data is obtained, the current interface processing unit is used as the corresponding previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the corresponding previous task interface, and the current unit output data is used as the new previous unit output data, and the corresponding current task state is switched from the first state to the second state;
[0091] Here, the current step is similar to the implementation of the aforementioned step 134, and will not be further described here;
[0092] Specifically, it includes: step 2341, the current task A uses the interface processing unit corresponding to the first first task interface of the first task interface sequence as the corresponding current interface processing unit;
[0093] Here, the current step is similar to the implementation of the aforementioned step 1341, and will not be further described here;
[0094] Step 2342, initializing the second input sensed data, the second input predicted data and the previous unit output data to be empty; and forming the corresponding current unit input data from the first input sensed data, the first input predicted data, the second input sensed data, the second input predicted data and the previous unit output data;
[0095] Here, the current step is similar to the implementation of the aforementioned step 1342, and will not be further described here;
[0096] Step 2343, sending the current unit input data to the current interface processing unit for unit task processing and outputting the corresponding current unit output data;
[0097] Specifically, it includes: when the current interface processing unit performs unit task processing, the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data are extracted from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing;
[0098] Here, the current step is similar to the implementation of the aforementioned step 1343, and will not be further described here;
[0099] Step 2344, when the current unit output data is obtained, the current interface processing unit is used as the corresponding previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the corresponding previous task interface, and the current unit output data is used as the new previous unit output data, and the corresponding current task state is switched from the first state to the second state;
[0100] Here, the current step is similar to the implementation of the aforementioned step 1344, and will not be further described here;
[0101] Step 235, the current task A determines whether the previous task interface is the last first task interface of the first task interface sequence; if so, go to step 237; if not, go to step 236;
[0102] Step 236: The current task A uses the interface processing unit corresponding to the next first task interface of the first task interface sequence as the new current interface processing unit; and obtains the latest perception and prediction data output by the perception and prediction module at the current time k2 as the corresponding fourth perception data D p,k2 and the fourth prediction data D f,k2, j < k2; and compare the fourth sensed data D p,k2 with the first input sensed data, and extract the newly added data part in the fourth sensed data D p,k2 as the new second input sensed data; and compare the fourth predicted data D f,k2 with the first input predicted data, and extract the newly added data part in the fourth predicted data D f,k2 as the new second input predicted data; and form the new current unit input data from the first input sensed data, the first input predicted data, the second input sensed data, the second input predicted data, and the previous unit output data; and send the current unit input data to the current interface processing unit for unit task processing to generate the new current unit output data; and when the current unit output data is obtained, use the current interface processing unit as the new previous interface processing unit, use the first task interface corresponding to the previous interface processing unit as the new previous task interface, and use the current unit output data as the new previous unit output data; and go to step 235;
[0103] wherein, the fourth sensed data D p,k2 has the same data format as the first input sensed data, and the fourth predicted data D f,k2 has the same data format as the first input sensed data;
[0104] Here, the implementation of the current step is similar to that of the前述 step 136, and will not be further elaborated here;
[0105] Specifically including: step 2361, the current task A uses the interface processing unit corresponding to the next first task interface in the first task interface sequence as the new current interface processing unit;
[0106] Here, the implementation of the current step is similar to that of the前述 step 1361, and will not be further elaborated here;
[0107] Step 2362, obtain the latest sensed and predicted data output by the sensing and prediction module at the current moment k as the corresponding fourth sensed data D p,k2 and the fourth predicted data D f,k2 , j < k2;
[0108] wherein, the fourth sensed data D p,k2 has the same data format as the first input sensed data and is also composed of multiple obstacle sensed data; each obstacle sensed data is composed of an obstacle identifier, an obstacle type, and an obstacle historical trajectory; the fourth predicted data D f,k2 has the same data format as the first input sensed data and is also composed of multiple obstacle predicted data; each obstacle predicted data is composed of an obstacle identifier and an obstacle predicted trajectory;
[0109] Note: "前述" is directly translated as "前述" here as it's a specific term in the original text. If there is a more appropriate English equivalent in a more contextually relevant situation, it can be adjusted accordingly.Here, the current step is similar to the implementation of the aforementioned step 1362, and will not be further described here;
[0110] Step 2363, the fourth perception data D p,k2 Compared with the first input perception data, the fourth perception data D p,k2 The newly added data in is extracted as the new second input perception data; and the fourth prediction data D f,k2 Compared with the first input prediction data, the fourth prediction data D f,k2 The newly added data part is extracted as the new second input prediction data; and the new current unit input data is composed of the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data;
[0111] Here, when the fourth perception data D p,k2 Compared with the first input perception data, the fourth perception data D p,k2 When the newly added data in is extracted as the new second input perception data, only the fourth perception data D p,k2 Compared with the obstacle identification in the first input perception data, only the obstacle identification in the fourth perception data D p,k2 The obstacle identifier that exists in the first input perception data but does not exist in the first input perception data is recorded as the corresponding newly added obstacle identifier, and the fourth perception data D p,k2 The obstacle perception data corresponding to all newly added obstacle identifiers are extracted as new second input perception data;
[0112] Similarly, when the fourth prediction data D f,k2 Compared with the first input prediction data, the fourth prediction data D f,k2 When the newly added data in is extracted as the new second input prediction data, only the fourth prediction data D f,k2 Compared with the obstacle identification in the first input prediction data, only the obstacle identification in the fourth prediction data D f,k2 The obstacle identifier that exists in the first input prediction data but does not exist in the first input prediction data is recorded as the corresponding newly added obstacle identifier, and the fourth prediction data D f,k2 The obstacle prediction data corresponding to all newly added obstacle identifiers are extracted as new second input prediction data;
[0113] The first input perception data and the first input prediction data in the current unit input data are the initial perception prediction data, and the new second input perception data and the second input prediction data are the new incremental perception prediction data;
[0114] Step 2364, sending the current unit input data to the current interface processing unit for unit task processing to generate new current unit output data;
[0115] Specifically, it includes: when the current interface processing unit performs unit task processing, the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data are extracted from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing;
[0116] Here, the current step is similar to the implementation of the aforementioned step 2343, and will not be further described here;
[0117] Step 2365, when the current unit output data is obtained, the current interface processing unit is used as the new previous interface processing unit, and the first task interface corresponding to the previous interface processing unit is used as the new previous task interface, and the current unit output data is used as the new previous unit output data; and return to step 235;
[0118] Step 237, the current task A confirms that the decision task processing is successful, and uses the latest current unit output data as the output data of the current decision task processing;
[0119] Step 24, and close the second task A when the decision task is successfully processed j , and delete the corresponding second task state.
[0120] In summary, the embodiment of the present invention completes the second task A through step 2. jAfterwards, the second task state will continue to be monitored and when the second task state switches to the second state, new perception and prediction data will continue to be obtained and new parallel decision processing tasks will be created and new task states will be assigned. The newly created tasks will perform decision task processing based on the new perception, prediction data and task interface list, and when the decision task processing of the new task is successful, the task will be closed and the corresponding task state will be deleted. By analogy, the embodiment of the present invention can create multiple parallel tasks in the same period of time by continuously repeating step 2 to improve the real-time and accuracy of decision-making.
[0121] Figure 2 This is a schematic diagram of the structure of an electronic device provided in the second embodiment of the present invention. The electronic device may be the aforementioned terminal device or server, or may be a terminal device or server connected to the aforementioned terminal device or server to implement the method of the embodiment of the present invention. Figure 2 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303. Various instructions may be stored in the memory 302 to complete various processing functions and implement the processing steps described in the aforementioned method embodiment. Preferably, the electronic device involved in the embodiment of the present invention also includes: a power supply 304, a system bus 305 and a communication port 306. The system bus 305 is used to realize the communication connection between components. The above-mentioned communication port 306 is used for connecting and communicating between the electronic device and other peripherals.
[0122] exist Figure 2 The system bus 305 mentioned in the figure can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM), and may also include non-volatile memory (Non-Volatile Memory), such as at least one disk storage.
[0123] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0124] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the method and processing process provided in the above embodiments.
[0125] An embodiment of the present invention further provides a chip for executing instructions, wherein the chip is used to execute the processing steps described in the aforementioned method embodiment.
[0126] The embodiment of the present invention provides a task processing method of a decision module, an electronic device and a computer-readable storage medium; the decision module receives a set of perception and prediction data output by an upstream perception and prediction module at a starting time i and creates a corresponding decision processing task A i , and the decision processing task A i According to the perception prediction data and task interface list at time i, decision task processing is performed, and in decision processing task A i Create a new decision processing task A when the task status changes jDecision-making tasks are processed according to the perception prediction data and task interface list at the subsequent time j; and in the process of processing each decision processing task, multiple interface processing units are called in sequence to complete the current task processing; and each time a single interface processing unit is called, the latest perception prediction data output by the upstream perception and prediction module is obtained, and the latest perception prediction data and the initial perception prediction data are compared to extract the corresponding incremental perception prediction data, and then the previous unit output data of the current interface processing unit, the initial perception prediction data and the current incremental perception prediction data are input into the current interface processing unit for unit task processing; and when each interface processing unit performs unit task processing, a first-class data processing sub-unit is called to perform data processing according to the initial perception prediction data and the previous unit output data, a second-class data processing sub-unit is called to perform data processing according to the incremental perception prediction data, and an output fusion sub-unit is called to fuse the output results of the first and second-class data processing sub-units, thereby achieving the purpose of adjusting the processing results of the initial perception prediction data based on the processing results of the incremental perception prediction data. Through the task processing mechanism provided by the present invention, a new parallel task can be created during the task processing process of a decision processing task, thereby improving the real-time and accuracy of the decision; when creating a new task, the task status of the previous task is referred to for creation. The faster the task status of the previous task is switched, the faster the creation of the next task is, and vice versa. In this way, the task creation frequency can be dynamically controlled, reducing the risk of memory overflow caused by a large number of parallel tasks; during the execution of each decision processing task, the processing results of each interface processing unit can also be adjusted based on the latest perception prediction data, further improving the purpose of decision accuracy.
[0127] The professionals should further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0128] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0129] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A task processing method for a decision module, characterized in that: The method comprises: The decision module obtains the latest perception and prediction data output by the upstream perception and prediction module at the starting time i as the corresponding first perception data D p,i and the first prediction data D f,i , i ≥ 0; and create the decision processing task at time i as the corresponding first task A i ; and for the first task A i Assign a corresponding first task state and initialize the first task state to the first state; and the first task A i According to the first perception data D p,i , the first prediction data D f,i and performing decision-making task processing with the preset task interface list; and closing the first task A when the decision-making task processing is successful i , and delete the corresponding first task state; The decision module in the first task A i During the processing of the first task state, the first task state is monitored; when it is monitored that the first task state switches to the second state, the latest perception and prediction data output by the upstream perception and prediction module at the current time j is obtained as the corresponding second perception data D p,j and the second prediction data D f,j , j>i; and create the decision processing task at time j as the corresponding second task A j ; and for the second task A j Assign a corresponding second task state and initialize the second task state to the first state; and the second task A j According to the second perception data D p,j The second prediction data D f,j and the task interface list to perform the decision task processing; and close the second task A when the decision task processing is successful j , and delete the corresponding second task state; Wherein, the task interface list includes a plurality of task interface sequence records; the task interface sequence record includes a decision template version field and a task interface sequence field; the task interface sequence field includes a plurality of first task interface data; the first task interface data includes a first interface index and a first task interface; The decision processing task flow of the decision module includes multiple versions, each version of the flow is composed of multiple interface processing units executed in sequence, and each interface processing unit corresponds to a task calling interface; in the task interface list, each task interface sequence record corresponds to a version of the flow; in the task interface sequence record, the decision template version field is the version information of the current version of the flow, and each first task interface data corresponds to an interface processing unit of the current version of the flow; in each first task interface data, the first interface index is the sequential execution index information of the current interface processing unit, and the first task interface is the task calling interface information of the current interface processing unit; when processing the decision task, the decision module locates the task interface sequence record corresponding to the current version through version query of the task interface list, and sorts each first task interface of the current record according to the corresponding first interface index to obtain the corresponding task interface sequence, and uses the current task interface sequence as the execution order of the interface processing units of the current version of the flow.
2. The task processing method of the decision module according to claim 1, characterized in that: The first perception data D p,i and the second perception data D p,j The data formats of the two are the same, and are composed of multiple obstacle sensing data; each obstacle sensing data is composed of an obstacle identifier, an obstacle type, and an obstacle historical trajectory; The first prediction data D f,i and the second prediction data D f,j The data formats of the two obstacle prediction data are the same, and both are composed of multiple obstacle prediction data; each obstacle prediction data is composed of an obstacle identifier and an obstacle prediction trajectory.
3. The task processing method of the decision module according to claim 2 is characterized in that: The decision-making task processing specifically includes: Step 31: the first task A currently being processed as a decision task i Or the second task A j as the corresponding current task A; and the first task state or the second task state corresponding to the current task A is used as the corresponding current task state; and the first perception data D currently input p,i and the first prediction data D f,i or the second perception data D p,j and the second prediction data D f,j as corresponding first input perception data and first input prediction data; Step 32, the current task A obtains local decision module version data as the corresponding first version; Step 33, the current task A uses the task interface sequence record whose decision template version field in the task interface list matches the first version as the corresponding current task interface sequence record; and extracts all the first task interface data in the task interface sequence field of the current task interface sequence record to form a corresponding first task interface data set; and sorts the first task interfaces in the first task interface data set according to the order of the corresponding first interface indexes to generate a corresponding first task interface sequence; Step 34, the current task A uses the interface processing unit corresponding to the first task interface of the first task interface sequence as the corresponding current interface processing unit; and initializes the second input perception data, the second input prediction data and the previous unit output data to be empty; and the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data form the corresponding current unit input data; and sends the current unit input data to the current interface processing unit for unit task processing to output the corresponding current unit output data; and when obtaining the current unit output data, uses the current interface processing unit as the corresponding previous interface processing unit, and uses the first task interface corresponding to the previous interface processing unit as the corresponding previous task interface, and uses the current unit output data as the new previous unit output data, and switches the corresponding current task state from the first state to the second state; Step 35, the current task A determines whether the previous task interface is the last of the first task interface in the first task interface sequence; if so, go to step 37; if not, go to step 36; Step 36, the current task A takes the interface processing unit corresponding to the next first task interface in the first task interface sequence as the new current interface processing unit; and obtains the latest perception and prediction data output by the perception and prediction module at the current moment k as the corresponding third perception data D p,k and the third prediction data D f,k , i < k; and compares the third perception data D p,k with the first input perception data, and extracts the newly added data part in the third perception data D p,k as the new second input perception data; and compares the third prediction data D f,k with the first input prediction data, and extracts the newly added data part in the third prediction data D f,k as the new second input prediction data; and forms the new current unit input data from the first input perception data, the first input prediction data, the second input perception data, the second input prediction data, and the previous unit output data; and sends the current unit input data to the current interface processing unit for unit task processing to generate the new current unit output data; and when the current unit output data is obtained, takes the current interface processing unit as the new previous interface processing unit, takes the first task interface corresponding to the previous interface processing unit as the new previous task interface, and takes the current unit output data as the new previous unit output data; and goes to step 35; where the data format of the third perception data D p,k is the same as that of the first input perception data, and the data format of the third prediction data D f,k is the same as that of the first input perception data; Step 37, the current task A confirms that the decision task processing is successful, and uses the latest output data of the current unit as the output data of the current decision task processing.
4. The task processing method of the decision module according to claim 3 is characterized in that: Each of the interface processing units includes a first-type data processing sub-unit, a second-type data processing sub-unit and an output fusion sub-unit.
5. The task processing method of the decision module according to claim 4 is characterized in that: The method further comprises: When each of the interface processing units performs its own unit task processing, it extracts the first input perception data, the first input prediction data, the second input perception data, the second input prediction data and the previous unit output data from the current unit input data received at that time; and the first input perception data, the first input prediction data and the previous unit output data constitute the corresponding first-class input data; and the second input perception data and the second input prediction data constitute the corresponding second-class input data; and the first-class input data is input into the first-class data processing subunit for data processing to generate the corresponding first-class output data; and when the second-class input data is not empty, the second-class input data is input into the second-class data processing subunit for processing to generate the corresponding second-class output data; if the second-class output data is empty, the first-class output data is used as the current unit output data output by the current unit task processing; if the second-class output data is not empty, the first-class and second-class output data are input into the output fusion subunit for data fusion processing, and the output data of the data fusion processing is used as the current unit output data output by the current unit task processing.
6. An electronic device, characterized in that: include: memory, processors, and transceivers; The processor is used to couple with the memory, read and execute instructions in the memory, so as to implement the method steps described in any one of claims 1 to 5; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed by a computer, enable the computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Automatic driving method, device and equipment, and vehicle
CN110406530A
Parallel processing method for periodic tasks by automatic driving decision-making system
CN113386789A