Directed acyclic graph generation method and device, computer device and storage medium

CN121388231BActive Publication Date: 2026-08-07BEIJING XIAOMA YIYI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMA YIYI TECH CO LTD
Filing Date
2025-11-04
Publication Date
2026-08-07

AI Technical Summary

Benefits of technology

[0018]上述有向无环图的生成方法、装置、计算机设备和存储介质,获取配置文件中的车载功能单元列表;车载功能单元列表包括依据注册顺序进行排列的各车载功能单元;而后,响应于对各车载功能单元进行数据资源注册操作,确定各车载功能单元的读集合和写集合,将注册顺序中排列第二个的车载功能单元确定为当前车载功能单元,根据当前车载功能单元和注册顺序确定各前序车载功能单元;读集合包括对应的车载功能单元的各待读数据键;写集合包括对应的车载功能单元的各待写数据键;前序车载功能单元为注册顺序在当前车载功能单元之前的车载功能单元;接着,根据各第一目标待写数据键、各前序车载功能单元的读集合和各前序车载功能单元的写集合建立当前车载功能单元的依赖边关系,存储当前车载功能单元的依赖边关系,根据注册顺序更新当前车载功能单元,并返回根据各第一目标待写数据键、各前序车载功能单元的读集合和各前序车载功能单元的写集合建立当前车载功能单元的依赖边关系的步骤进行循环处理,直至当前车载功能单元为注册顺序中排列最后一个的车载功能单元;其中,第一目标待写数据键为当前车载功能单元对应的待写数据键;最后,根据依据注册顺序进行排列的各车载功能单元和各车载功能单元对应的依赖边关系生成有向无环图。从而实现无需在配置文件中人为指定或配置各车载功能单元的依赖边关系而导致数据依赖关系错误率较高和有向无环图的生成效率较低,也降低了各车载功能单元之间出现数据冲突,提高了有向无环图的生成效率,也降低了数据依赖关系错误率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121388231B_ABST
    Figure CN121388231B_ABST
Patent Text Reader

Abstract

The application relates to a directed acyclic graph generation method and device, computer equipment and a storage medium. The method comprises the following steps: in response to a data resource registration operation of each vehicle-mounted function unit, determining a read set and a write set of each vehicle-mounted function unit, determining a vehicle-mounted function unit arranged second in a registration sequence as a current vehicle-mounted function unit, and determining each previous vehicle-mounted function unit according to the current vehicle-mounted function unit and the registration sequence; establishing a dependent edge relationship of the current vehicle-mounted function unit according to each first target to-be-written data key, the read set of each previous vehicle-mounted function unit and the write set of each previous vehicle-mounted function unit; and generating a directed acyclic graph according to each vehicle-mounted function unit arranged according to the registration sequence and the dependent edge relationship corresponding to each vehicle-mounted function unit. The method can improve the generation efficiency and reduce the data dependency error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus, computer device, and storage medium for generating directed acyclic graphs. Background Technology

[0002] Vehicle systems rely on lineage relationships to monitor and manage the operation and status of computing tasks in each onboard functional unit. When data issues arise, end-to-end data tracing is required to assess the data impact and identify the root cause of the problem. Throughout this process, a Directed Acyclic Graph (DAG) is needed to manage the relationships between objects.

[0003] However, current methods for generating directed acyclic graphs suffer from problems such as low generation efficiency or high error rates in data dependency relationships. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, and storage medium for generating directed acyclic graphs that can improve generation efficiency and reduce data dependency error rate, in order to address the aforementioned technical problems.

[0005] Firstly, a method for generating a directed acyclic graph, the method comprising: Retrieve the list of vehicle functional units from the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order; In response to the data resource registration operation for each vehicle-mounted functional unit, the read set and write set of each vehicle-mounted functional unit are determined. The vehicle-mounted functional unit that is second in the registration order is determined as the current vehicle-mounted functional unit. The preceding vehicle-mounted functional units are determined according to the current vehicle-mounted functional unit and the registration order. The read set includes the data keys to be read for each corresponding vehicle-mounted functional unit. The write set includes the data keys to be written for each corresponding vehicle-mounted functional unit. The preceding vehicle-mounted functional units are the vehicle-mounted functional units that are registered before the current vehicle-mounted functional unit. Based on the first target data keys to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit, the dependency relationships of the current vehicle functional unit are established, the dependency relationships of the current vehicle functional unit are stored, the current vehicle functional unit is updated according to the registration order, and the process of establishing the dependency relationships of the current vehicle functional unit based on the first target data keys to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit is repeated until the current vehicle functional unit is the last vehicle functional unit in the registration order; wherein, the first target data keys to be written are the data keys to be written corresponding to the current vehicle functional unit; A directed acyclic graph is generated based on the vehicle functional units arranged according to their registration order and the corresponding dependency edges of each vehicle functional unit.

[0006] In one embodiment, obtaining the list of vehicle functional units in the configuration file includes: creating a configuration file; in response to performing a functional unit registration operation on each vehicle functional unit, determining each vehicle functional unit according to the result of the functional unit registration operation, generating a list of vehicle functional units according to the registration order, and storing the list of vehicle functional units in the configuration file.

[0007] In one embodiment, the method further includes: in response to performing a unit deletion operation on the vehicle functional unit list, determining the vehicle functional unit to be deleted based on the result of the unit deletion operation; deleting the read set and write set of the vehicle functional unit to be deleted from the read set and write set of each vehicle functional unit, deleting the vehicle functional unit to be deleted from the vehicle functional unit list, and returning to the step of determining the second-ranked vehicle functional unit in the registration order as the current vehicle functional unit.

[0008] In one embodiment, the method further includes: in response to a unit addition operation on the vehicle functional unit list, determining the vehicle functional unit to be added and its order in the registration order based on the result of the unit addition operation; in response to a data resource registration operation on the vehicle functional unit to be added, adding the read set and write set of the vehicle functional unit to be added to the read set and write set of each vehicle functional unit, adding the vehicle functional unit to be added to the vehicle functional unit list according to the order, and returning to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit.

[0009] In one embodiment, before establishing the dependency edge relationship of the current vehicle functional unit based on each first target data key to be written, the read set of each preceding vehicle functional unit and the write set of each preceding vehicle functional unit, the process includes creating a vehicle computing task scheduling and processing tree, and determining the vehicle functional unit that is first in the registration order as the root node of the vehicle computing task scheduling and processing tree. The process of establishing the dependency relationship of the current vehicle functional unit based on the first target data keys to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit includes: determining the current vehicle functional unit as the current node; determining the leaf node and root node according to the vehicle computing task processing tree; obtaining the read set and write set of the preceding functional unit corresponding to the leaf node, and determining whether there is a data key that is the same as the first target data keys to be written in the read set and write set of the preceding functional unit corresponding to the leaf node; in response to the existence of a data key that is the same as the first target data keys to be written in the read set and write set of the preceding functional unit corresponding to the leaf node, establishing the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node, and updating the vehicle computing task scheduling processing tree with the current node as a child node of the leaf node; the dependency relationship of the current vehicle functional unit includes the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node.

[0010] In one embodiment, establishing the dependency relationship of the current vehicle functional unit based on each first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit further includes: in response to the absence of identical data keys in the read set and write set of the preceding functional unit corresponding to the leaf node, determining the leaf node as the target node; updating the target node as the parent node of the target node, obtaining the read set and write set of the preceding functional unit corresponding to the target node, and determining whether identical data keys in the read set and write set of the preceding functional unit corresponding to the target node exist; in response to the presence of identical data keys in the read set and write set of the preceding functional unit corresponding to the target node, establishing the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the target node, and updating the current node as a child node of the target node to the vehicle computing task scheduling processing tree; the dependency relationship of the current vehicle functional unit includes the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the target node.

[0011] In one embodiment, the process of establishing the dependency relationship of the current vehicle function unit based on each first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit further includes: in response to the fact that there is no data key in each first target data key to be written in the read set and write set of the preceding function unit corresponding to the target node, returning to the step of updating the target node to the parent node of the target node for loop processing until the target node is the root node.

[0012] In one embodiment, the method further includes: controlling each on-board functional unit to perform corresponding computational processing tasks according to a directed acyclic graph.

[0013] In one embodiment, controlling each vehicle-mounted functional unit to execute corresponding computational processing tasks based on a directed acyclic graph (DAG) includes: determining the vehicle-mounted functional unit ranked first in the DAG as the target vehicle-mounted functional unit, and controlling the target vehicle-mounted functional unit to execute the corresponding computational processing task; in response to the target vehicle-mounted functional unit completing the corresponding computational processing task, updating the target vehicle-mounted functional unit to its successor vehicle-mounted functional unit in the DAG, and decrementing the in-degree of the successor vehicle-mounted functional unit by 1; and in response to the successor vehicle-mounted functional unit having an in-degree of 0, returning to the previous state. The process iterates through the steps of controlling the target vehicle-mounted functional unit to perform the corresponding computational processing task until the target vehicle-mounted functional unit is the last one in the sequence. In response to the fact that the in-degree of a subsequent vehicle-mounted functional unit is not zero, the process monitors the in-degree of the subsequent vehicle-mounted functional unit and returns to the step of controlling the target vehicle-mounted functional unit to perform the corresponding computational processing task when the in-degree of the subsequent vehicle-mounted functional unit is zero, until the target vehicle-mounted functional unit is the last one in the sequence.

[0014] Secondly, an apparatus for generating a directed acyclic graph is provided, the apparatus comprising a list acquisition module, a resource registration module, a dependency edge determination module, and an acyclic graph generation module.

[0015] The list acquisition module is used to obtain the list of vehicle functional units in the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order; the resource registration module is used to respond to the data resource registration operation of each vehicle functional unit, determine the read set and write set of each vehicle functional unit, determine the vehicle functional unit that is second in the registration order as the current vehicle functional unit, and determine each preceding vehicle functional unit according to the current vehicle functional unit and the registration order; the read set includes each data key to be read of the corresponding vehicle functional unit; the write set includes each data key to be written of the corresponding vehicle functional unit; the preceding vehicle functional unit is the vehicle functional unit that is registered before the current vehicle functional unit; the dependency edge determination module is used to determine each first target pending The system establishes the dependency relationships of the current vehicle functional unit based on the write data key, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit. It stores these dependency relationships, updates the current vehicle functional unit according to the registration order, and then iterates through the steps of establishing the dependency relationships of the current vehicle functional unit based on each first target write data key, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit until the current vehicle functional unit is the last one in the registration order. The first target write data key is the write data key corresponding to the current vehicle functional unit. The acyclic graph generation module generates a directed acyclic graph based on the vehicle functional units arranged according to the registration order and the dependency relationships corresponding to each vehicle functional unit.

[0016] Thirdly, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described in the above method embodiments.

[0017] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described in the above method embodiments.

[0018] The aforementioned method, apparatus, computer device, and storage medium for generating directed acyclic graphs obtain a list of vehicle functional units from a configuration file. This list includes vehicle functional units arranged according to their registration order. Then, in response to performing data resource registration operations on each vehicle functional unit, the read set and write set of each vehicle functional unit are determined. The vehicle functional unit second in the registration order is identified as the current vehicle functional unit. Each preceding vehicle functional unit is determined based on the current vehicle functional unit and the registration order. The read set includes each data key to be read for the corresponding vehicle functional unit; the write set includes each data key to be written for the corresponding vehicle functional unit; the preceding vehicle functional unit is the vehicle functional unit whose registration order precedes the current vehicle functional unit. Next, according to each first target... The process involves establishing dependency relationships for the current vehicle functional unit based on the data key to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit. This dependency relationship is stored, and the current vehicle functional unit is updated according to the registration order. The process then iterates through the steps of establishing dependency relationships based on the first target data key to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit until the current vehicle functional unit is the last one in the registration order. The first target data key to be written is the data key to be written corresponding to the current vehicle functional unit. Finally, a directed acyclic graph (DAG) is generated based on the vehicle functional units arranged according to the registration order and their corresponding dependency relationships. This eliminates the need to manually specify or configure the dependency relationships of each vehicle functional unit in the configuration file, thus avoiding high data dependency error rates and low DAG generation efficiency. It also reduces data conflicts between vehicle functional units, improves the generation efficiency of the DAG, and lowers the data dependency error rate. Attached Figure Description

[0019] Figure 1 This is an application environment diagram of a method for generating a directed acyclic graph in one embodiment; Figure 2 This is a first flowchart illustrating a method for generating a directed acyclic graph in one embodiment; Figure 3 Here is a block diagram of a vehicle system in a specific example; Figure 4 This is a flowchart illustrating the process of obtaining the list of vehicle functional units in a configuration file in one embodiment; Figure 5 This is a flowchart illustrating the process of establishing the dependency relationship of the current vehicle function unit based on each first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit in one embodiment. Figure 6 Here is an example graph of a directed acyclic graph for a specific example; Figure 7 This is a schematic diagram of the second process of a method for generating a directed acyclic graph in one embodiment; Figure 8 This is a schematic diagram of the third process of a method for generating a directed acyclic graph in one embodiment; Figure 9 This is a flowchart illustrating the process of controlling each on-board functional unit to execute corresponding computational processing tasks based on a directed acyclic graph in one embodiment. Figure 10 This is a structural block diagram of a directed acyclic graph generation device in one embodiment; Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0021] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0023] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.

[0024] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.

[0025] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, step, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof.

[0026] The method for generating directed acyclic graphs provided in this application can be applied to, for example, Figure 1 In the application environment shown, the vehicle-mounted terminal 102 communicates with the server 104 via a network. The vehicle-mounted terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server 104 can be a standalone server or a server cluster consisting of multiple servers.

[0027] In one embodiment, such as Figure 2 As shown, a method for generating directed acyclic graphs is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 204.

[0028] Step 201: Obtain the list of vehicle functional units from the configuration file.

[0029] The vehicle functional unit list includes all vehicle functional units arranged according to their registration order. Server 104 retrieves the vehicle functional unit list from the configuration file.

[0030] In a specific example, such as Figure 3 As shown, the vehicle system includes several vehicle-mounted functional modules 100 that are sequentially connected in communication. Each vehicle-mounted functional module 100 includes several vehicle-mounted functional units 110 that are sequentially connected in communication. It is understood that the sequentially connected vehicle-mounted functional modules 100 may include, but are not limited to, a positioning module, a perception module, and a planning and control module. The perception module may include, but is not limited to, an image point cloud preprocessing unit, a target detection unit, and a target tracking unit that are sequentially connected in communication. The above is only a specific example; in actual applications, the configuration can be flexibly adjusted according to user needs, and is not described here.

[0031] In one embodiment, such as Figure 4 As shown, obtaining the list of vehicle functional units in the configuration file includes steps 401 to 402.

[0032] Step 401, create the configuration file; Step 402: In response to the function unit registration operation for each vehicle function unit, determine each vehicle function unit according to the result of the function unit registration operation, generate a vehicle function unit list according to the registration order, and store the vehicle function unit list in the configuration file.

[0033] Specifically, server 104 creates a configuration file; then, in response to the function unit registration operation for each vehicle function unit, it determines each vehicle function unit based on the result of the function unit registration operation, and generates a list of vehicle function units according to the registration order, and stores the list of vehicle function units in the configuration file. Compared with the traditional technology that requires the data dependencies of each vehicle function unit to be pre-configured in the configuration file, the complexity of creating the configuration file is reduced, thereby improving the efficiency and convenience of obtaining the configuration file, and also facilitating the subsequent adjustment of vehicle function units.

[0034] In this embodiment, a configuration file is created; then, in response to the function unit registration operation for each vehicle function unit, each vehicle function unit is determined according to the result of the function unit registration operation, and a vehicle function unit list is generated according to the registration order. The vehicle function unit list is stored in the configuration file. Compared with the traditional technology, which requires the data dependency relationship corresponding to each vehicle function unit to be pre-configured in the configuration file, the complexity of the configuration file creation is reduced, thereby improving the efficiency and convenience of obtaining the configuration file and facilitating the subsequent adjustment of the vehicle function units.

[0035] Step 202: In response to the data resource registration operation for each vehicle functional unit, determine the read set and write set of each vehicle functional unit, determine the vehicle functional unit that is second in the registration order as the current vehicle functional unit, and determine each preceding vehicle functional unit according to the current vehicle functional unit and the registration order.

[0036] The read set includes the data keys to be read for each corresponding vehicle-mounted functional unit; the write set includes the data keys to be written for each corresponding vehicle-mounted functional unit; the preceding vehicle-mounted functional unit is the vehicle-mounted functional unit whose registration order precedes the current vehicle-mounted functional unit. It can be understood that the data key to be read is the data key awaiting a read operation; the data key to be written is the data key awaiting a write operation. The data key is used to uniquely identify the corresponding data resource.

[0037] Specifically, when a data resource registration operation is detected for each vehicle-mounted functional unit, the read set and write set of each vehicle-mounted functional unit are determined, the vehicle-mounted functional unit that is second in the registration order is determined as the current vehicle-mounted functional unit, and the preceding vehicle-mounted functional units are determined according to the current vehicle-mounted functional unit and the registration order.

[0038] Step 203: Establish the dependency relationship of the current vehicle function unit based on the first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit; store the dependency relationship of the current vehicle function unit; update the current vehicle function unit according to the registration order; and return to the step of establishing the dependency relationship of the current vehicle function unit based on the first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit for iterative processing until the current vehicle function unit is the last vehicle function unit in the registration order.

[0039] The first target write key is the write key corresponding to the current vehicle-mounted functional unit. Specifically, the server 104 establishes the dependency edge relationship of the current vehicle-mounted functional unit based on each first target write key, the read set of each preceding vehicle-mounted functional unit, and the write set of each preceding vehicle-mounted functional unit. It stores the dependency edge relationship of the current vehicle-mounted functional unit, updates the current vehicle-mounted functional unit according to the registration order, and returns to the step of establishing the dependency edge relationship of the current vehicle-mounted functional unit based on each first target write key, the read set of each preceding vehicle-mounted functional unit, and the write set of each preceding vehicle-mounted functional unit. This process is repeated until the current vehicle-mounted functional unit is the last vehicle-mounted functional unit in the registration order. This eliminates the need to manually specify or configure the dependency edge relationship of each vehicle-mounted functional unit in the configuration file, which would otherwise result in a high data dependency error rate and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle-mounted functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0040] In one embodiment, such as Figure 5 As shown, before establishing the dependency relationship of the current vehicle functional unit based on the first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit, the process includes creating a vehicle computing task scheduling and processing tree, and determining the vehicle functional unit that is first in the registration order as the root node of the vehicle computing task scheduling and processing tree.

[0041] The process of establishing the dependency relationship of the current vehicle functional unit based on the first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit includes steps 501 to 504.

[0042] Step 501: Determine the current on-board functional unit as the current node; Step 502: Determine the leaf nodes and root node based on the vehicle calculation task processing tree; Step 503: Obtain the read set and write set of the preceding functional unit corresponding to the leaf node, and determine whether there is a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node. Step 504: In response to the existence of the same data key in the read set and write set of each first target data key to be written in the preceding functional unit corresponding to the leaf node, establish the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node, and update the vehicle computing task scheduling processing tree as the child node of the leaf node; the dependency edge relationship of the current vehicle functional unit includes the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node.

[0043] The dependency relationships of the current vehicle-mounted functional unit include the data dependency relationships between the current vehicle-mounted functional unit and the preceding functional units corresponding to the leaf nodes. It is understood that the number of leaf nodes can be one or more, determined specifically based on the actual situation.

[0044] Specifically, server 104 creates a vehicle computing task scheduling and processing tree, and determines the vehicle functional unit that is first in the registration order as the root node of the vehicle computing task scheduling and processing tree; then, it determines the current vehicle functional unit as the current node; then, it obtains the read set and write set of the preceding functional unit corresponding to the leaf node, and determines whether there is a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node; then, in response to the presence of a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node, it means that the data resource that the preceding functional unit corresponding to the leaf node needs to read has a common data key with the data resource that the current vehicle functional unit needs to write. Alternatively, if the data resources to be written by the preceding functional unit corresponding to the leaf node are the same as those to be written by the current vehicle functional unit, then there is a data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node. This establishes a data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node, and updates the vehicle computing task scheduling processing tree by making the current node a child node of the leaf node. This eliminates the need to manually specify or configure the dependency edge relationships of each vehicle functional unit in the configuration file, which would otherwise result in a high error rate in data dependency relationships and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the efficiency of generating directed acyclic graphs, and reduces the error rate in data dependency relationships.

[0045] In this embodiment, a vehicle computing task scheduling and processing tree is created, and the vehicle functional unit that is first in the registration order is determined as the root node of the vehicle computing task scheduling and processing tree; then, the current vehicle functional unit is determined as the current node; next, the leaf node and the root node are determined according to the vehicle computing task scheduling and processing tree; and, the read set and write set of the preceding functional unit corresponding to the leaf node are obtained, and it is determined whether there is a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node; finally, in response to the existence of a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node, the system proceeds as planned. Based on the key, establish the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node, and update the vehicle computing task scheduling processing tree by making the current node a child node of the leaf node. The dependency edge relationship of the current vehicle functional unit includes the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node. This eliminates the need to manually specify or configure the dependency edge relationship of each vehicle functional unit in the configuration file, which would otherwise lead to a high data dependency error rate and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0046] In one embodiment, such as Figure 5 As shown, the dependency relationship of the current vehicle function unit is established based on the first target data key to be written, the read set of each preceding vehicle function unit and the write set of each preceding vehicle function unit, and also includes steps 505 to 507.

[0047] Step 505: In response to the fact that there is no identical data key in each first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node, the leaf node is determined as the target node. Step 506: Update the target node to the parent node of the target node, obtain the read set and write set of the preceding functional unit corresponding to the target node, and determine whether there is the same data key in each first target data key to be written in the read set and write set of the preceding functional unit corresponding to the target node. Step 507: In response to the existence of the same data key in each first target data key to be written in the read set and write set of the preceding functional unit corresponding to the target node, establish the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the target node, and update the vehicle computing task scheduling processing tree by making the current node a child node of the target node; the dependency edge relationship of the current vehicle functional unit includes the data dependency edge relationship between the current vehicle functional unit and the preceding functional unit corresponding to the target node.

[0048] The dependency relationships of the current vehicle-mounted functional unit include the data dependency relationships between the current vehicle-mounted functional unit and the preceding functional units corresponding to the target node. Specifically, server 104 responds to the fact that there are no identical data keys in the read and write sets of the preceding functional units corresponding to the leaf node, which means that the data resources that the preceding functional units corresponding to the leaf node need to read and the data resources that the preceding functional units corresponding to the leaf node need to write do not have the same data resources as the data resources that the current vehicle-mounted functional unit needs to write. Therefore, there is a data dependency relationship between the current vehicle-mounted functional unit and the preceding functional units corresponding to the leaf node, and the leaf node is determined as the target node. Then, the target node is updated to the parent node of the target node, the read and write sets of the preceding functional units corresponding to the target node are obtained, and it is determined whether there are identical data keys in the read and write sets of the preceding functional units corresponding to the target node. Then, in response to the fact that there are identical data keys in the read and write sets of the preceding functional units corresponding to the target node, which means that there are identical data keys in the preceding functional units corresponding to the target node, the current vehicle-mounted functional unit and the preceding functional units corresponding to the leaf node have a data dependency relationship. If the data resources that the preceding functional unit corresponding to the parent node of the original leaf node needs to read are the same as the data resources that the current vehicle functional unit needs to write, or if the data resources that the preceding functional unit corresponding to the parent node of the original leaf node needs to write are the same as the data resources that the current vehicle functional unit and the preceding functional unit corresponding to the parent node of the original leaf node have a data dependency relationship, then a data dependency edge relationship is established between the current vehicle functional unit and the preceding functional unit corresponding to the target node. The current node is then updated to the vehicle computing task scheduling processing tree as a child node of the target node. This eliminates the need to manually specify or configure the dependency edge relationship of each vehicle functional unit in the configuration file, which would otherwise result in a high data dependency error rate and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0049] In this embodiment, in response to the absence of identical data keys in the read and write sets of the preceding functional units corresponding to the leaf node, the leaf node is determined as the target node. Then, the target node is updated to be the parent node of the target node. The read and write sets of the preceding functional units corresponding to the target node are obtained, and it is determined whether identical data keys exist in the read and write sets of the preceding functional units corresponding to the target node. Next, in response to the presence of identical data keys in the read and write sets of the preceding functional units corresponding to the target node, a data dependency relationship is established between the current vehicle functional unit and the preceding functional unit corresponding to the target node. The current node is then updated as a child node of the target node to the vehicle computing task scheduling processing tree. This eliminates the need to manually specify or configure the dependency relationships of each vehicle functional unit in the configuration file, thus avoiding high data dependency error rates and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0050] In one embodiment, such as Figure 5 As shown, the dependency relationship of the current vehicle functional unit is established based on the first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit, and step 508 is also included.

[0051] Step 508: In response to the fact that no data key is found in the same data key as the first target data key in the read set and write set of the preceding functional unit corresponding to the target node, return to the step of updating the target node to the parent node of the target node for loop processing until the target node is the root node.

[0052] Specifically, server 104 responds that the read set and write set of the preceding functional unit corresponding to the target node do not contain the same data key as the first target data key to be written. This means that the data resources that the preceding functional unit corresponding to the parent node of the original leaf node needs to read and the data resources that the preceding functional unit corresponding to the parent node of the original leaf node needs to write do not have the same data resources as the data resources that the current vehicle-mounted functional unit needs to write. Therefore, there is a data dependency relationship between the current vehicle-mounted functional unit and the preceding functional unit corresponding to the parent node of the original leaf node. It is necessary to return to the step of updating the target node to the parent node of the target node for loop processing until the target node is the root node. This achieves the goal of eliminating the need to manually specify or configure the dependency edge relationship of each vehicle-mounted functional unit in the configuration file, which would otherwise result in a high data dependency error rate and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle-mounted functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0053] In this embodiment, in response to the fact that there is no data key in the read set and write set of the preceding functional unit corresponding to the target node that is the same as the data key to be written in each first target, the process returns to the step of updating the target node to the parent node of the target node and performs loop processing until the target node is the root node. This eliminates the need to manually specify or configure the dependency edge relationship of each vehicle functional unit in the configuration file, which would otherwise lead to a high data dependency error rate and low efficiency in generating directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the efficiency of generating directed acyclic graphs, and reduces the data dependency error rate.

[0054] Step 204: Generate a directed acyclic graph based on the vehicle functional units arranged according to the registration order and the dependency relationships of each vehicle functional unit.

[0055] Specifically, server 104 generates a directed acyclic graph based on the vehicle functional units arranged according to the registration order and the corresponding dependency edge relationships of each vehicle functional unit. This eliminates the need to manually specify or configure the dependency edge relationships of each vehicle functional unit in the configuration file, thus avoiding high data dependency error rates and low generation efficiency of directed acyclic graphs. It also reduces data conflicts between vehicle functional units, improves the generation efficiency of directed acyclic graphs, and reduces the data dependency error rate.

[0056] Based on this, the above-mentioned method for generating a directed acyclic graph obtains the list of vehicle functional units in the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order; then, in response to performing data resource registration operations on each vehicle functional unit, the read set and write set of each vehicle functional unit are determined, the vehicle functional unit ranked second in the registration order is determined as the current vehicle functional unit, and each preceding vehicle functional unit is determined according to the current vehicle functional unit and the registration order; the read set includes each data key to be read of the corresponding vehicle functional unit; the write set includes each data key to be written of the corresponding vehicle functional unit; the preceding vehicle functional unit is the vehicle functional unit whose registration order precedes the current vehicle functional unit; then, according to each first target data key to be written... The process involves establishing dependency relationships for the current vehicle functional unit based on the read and write sets of each preceding vehicle functional unit, storing these dependency relationships, updating the current vehicle functional unit according to the registration order, and iteratively returning to the previous steps of establishing dependency relationships based on the first target write key, the read and write sets of each preceding vehicle functional unit. This process continues until the current vehicle functional unit is the last one in the registration order. The first target write key is the write key corresponding to the current vehicle functional unit. Finally, a directed acyclic graph (DAG) is generated based on the vehicle functional units arranged according to the registration order and their corresponding dependency relationships. This eliminates the need to manually specify or configure dependency relationships for each vehicle functional unit in the configuration file, thus avoiding high data dependency error rates and low DAG generation efficiency. It also reduces data conflicts between vehicle functional units, improves DAG generation efficiency, and lowers the data dependency error rate.

[0057] In a specific example, the list of vehicle functional units in the obtained configuration file may include, but is not limited to, vehicle functional units A, B, and C arranged according to their registration order. Through the data resource registration operation for vehicle functional unit A, it is determined that the read set of vehicle functional unit A is empty, and the write set of vehicle functional unit A includes data key 1. Through the data resource registration operation for vehicle functional unit B, it is determined that the read set of vehicle functional unit B is data key 2, and the write set of vehicle functional unit B includes data key 1. Through the data resource registration operation for vehicle functional unit C, it is determined that the read set of vehicle functional unit C is data key 2. Because the write set of vehicle functional unit B includes data key 1, and the write set of vehicle functional unit A, the predecessor of vehicle functional unit B, includes data key 1, the write operation of vehicle functional unit A to data key 1 during the calculation process will affect the write operation of vehicle functional unit B, the successor of vehicle functional unit A, to data key 1. Therefore, it is necessary to establish a data dependency relationship between vehicle functional unit A and vehicle functional unit B. Because the write set of vehicle functional unit C includes data key 2, and the read set of its predecessor vehicle functional unit, vehicle functional unit B, also includes data key 2, during the computation process, the read operation of vehicle functional unit B on data key 2 will affect the read operation of its successor vehicle functional unit, vehicle functional unit C, on data key 2. Therefore, it is necessary to establish the data dependency relationship between vehicle functional units B and C. This allows the generation of directed acyclic loops based on the vehicle functional units A, B, and C arranged according to their registration order, as well as the data dependencies between vehicle functional units A and B, and between vehicle functional units B and C. Figure 1 An example graph of a directed acyclic graph is shown below. Figure 6 As shown above. The above are just specific examples. In actual applications, the settings should be flexibly adjusted according to user needs, and no restrictions are imposed here.

[0058] In one embodiment, such as Figure 7 As shown, the method further includes steps 701 to 702.

[0059] Step 701: In response to the unit deletion operation on the vehicle functional unit list, determine the vehicle functional unit to be deleted based on the result of the unit deletion operation. Step 702: Remove the read set and write set of the vehicle functional unit to be deleted from the read set and write set of each vehicle functional unit, remove the vehicle functional unit to be deleted from the vehicle functional unit list, and return to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit.

[0060] Specifically, server 104 responds to a unit deletion operation on the vehicle functional unit list, determines the vehicle functional unit to be deleted based on the result of the deletion operation, then removes the read and write sets of the vehicle functional unit to be deleted from the read and write sets of each vehicle functional unit, removes the vehicle functional unit to be deleted from the vehicle functional unit list, and returns to the step of determining the second-ranked vehicle functional unit in the registration order as the current vehicle functional unit. Compared to traditional technologies that require pre-configuring the data dependencies of each vehicle functional unit in a configuration file, this reduces the complexity of configuration file creation, thereby improving the convenience, efficiency, and accuracy of vehicle functional unit adjustments.

[0061] In this embodiment, in response to a unit deletion operation on the vehicle functional unit list, the vehicle functional unit to be deleted is determined based on the result of the unit deletion operation. Then, the read and write sets of the vehicle functional unit to be deleted are removed from the read and write sets of each vehicle functional unit, the vehicle functional unit to be deleted is removed from the vehicle functional unit list, and the process returns to the step of determining the second-ranked vehicle functional unit in the registration order as the current vehicle functional unit. Compared with traditional technologies that require pre-configuring the data dependencies of each vehicle functional unit in a configuration file, this reduces the complexity of configuration file creation, thereby improving the convenience, efficiency, and accuracy of vehicle functional unit adjustments, and improving the generation efficiency and accuracy of directed acyclic graphs.

[0062] In one embodiment, such as Figure 7 As shown, the method further includes steps 703 to 704.

[0063] Step 703: In response to the unit addition operation in the vehicle functional unit list, determine the vehicle functional unit to be added and the order of the vehicle functional units to be added in the registration order based on the result of the unit addition operation. Step 704: In response to the data resource registration operation for the new vehicle functional unit, add the read set and write set of the new vehicle functional unit to the read set and write set of each vehicle functional unit, add the new vehicle functional unit to the vehicle functional unit list according to the sorting, and return to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit.

[0064] Specifically, in response to the addition operation of the vehicle functional unit list, server 104 determines the vehicle functional unit to be added and its order in the registration order based on the result of the addition operation. Then, in response to the data resource registration operation of the vehicle functional unit to be added, the read set and write set of the vehicle functional unit to be added are added to the read set and write set of each vehicle functional unit. The vehicle functional unit to be added is added to the vehicle functional unit list according to the order, and the process returns to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit. Compared with the traditional technology that requires the data dependencies of each vehicle functional unit to be pre-configured in the configuration file, this reduces the complexity of configuration file creation, thereby improving the convenience, efficiency and accuracy of vehicle functional unit adjustment, and improving the generation efficiency and accuracy of directed acyclic graphs.

[0065] In this embodiment, in response to the addition operation of the vehicle functional unit list, the vehicle functional unit to be added and its registration order are determined according to the result of the addition operation. Then, in response to the data resource registration operation of the vehicle functional unit to be added, the read set and write set of the vehicle functional unit to be added are added to the read set and write set of each vehicle functional unit. The vehicle functional unit to be added is added to the vehicle functional unit list according to the order, and the process returns to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit. Compared with the traditional technology, which requires the data dependency relationship of each vehicle functional unit to be pre-configured in the configuration file, the complexity of the configuration file creation is reduced, thereby improving the convenience, efficiency and accuracy of vehicle functional unit adjustment, and improving the generation efficiency and accuracy of directed acyclic graph.

[0066] In one embodiment, such as Figure 8 As shown, the method further includes step 801.

[0067] Step 801: Control each on-board functional unit to execute the corresponding computational processing task according to the directed acyclic graph.

[0068] Specifically, server 104 controls each on-board functional unit to perform corresponding computational processing tasks based on the directed acyclic graph, thereby improving the execution efficiency and accuracy of the directed acyclic graph.

[0069] In this embodiment, the execution of corresponding computational processing tasks by each on-board functional unit is controlled according to the directed acyclic graph, which improves the execution efficiency and accuracy of the directed acyclic graph.

[0070] In one embodiment, such as Figure 9 As shown, each on-board functional unit is controlled to perform corresponding computational processing tasks according to the directed acyclic graph, including steps 901 to 904.

[0071] Step 901: Determine the vehicle functional unit that ranks first in the order of the directed acyclic graph as the target vehicle functional unit, and control the target vehicle functional unit to execute the corresponding computational processing task. Step 902: In response to the completion of the corresponding computational processing task by the target vehicle functional unit, update the target vehicle functional unit to the vehicle functional unit that succeeds the target vehicle functional unit in the directed acyclic graph, and decrement the in-degree of the successor vehicle functional unit by 1. Step 903: In response to the in-degree of the subsequent vehicle functional unit being 0, return to the step of controlling the target vehicle functional unit to execute the corresponding calculation and processing task in a loop until the target vehicle functional unit is the last vehicle functional unit in the sorting order. Step 904: In response to the fact that the in-degree of the subsequent vehicle functional unit is not zero, monitor the in-degree of the subsequent vehicle functional unit, and when the in-degree of the subsequent vehicle functional unit is zero, return to the step of controlling the target vehicle functional unit to perform the corresponding calculation and processing task when the in-degree of the subsequent vehicle functional unit is zero, and repeat the process until the target vehicle functional unit is the last vehicle functional unit in the order.

[0072] Specifically, server 104 identifies the first vehicle-mounted functional unit in the directed acyclic graph (DAG) as the target vehicle-mounted functional unit and controls it to execute the corresponding computational processing task. Then, in response to the completion of the target vehicle-mounted functional unit's computational processing task, the server updates the target vehicle-mounted functional unit to its successor in the DAG, decrementing the in-degree of the successor vehicle-mounted functional unit by 1. Next, in response to the successor vehicle-mounted functional unit having an in-degree of 0, the server returns to controlling the target vehicle-mounted functional unit to execute the corresponding computational processing task. The process iterates through the steps until the target vehicle functional unit is the last one in the sequence. Finally, in response to the fact that the in-degree of the subsequent vehicle functional unit is not zero, the process monitors the in-degree of the subsequent vehicle functional unit and returns to the step where the in-degree of the subsequent vehicle functional unit is zero. This iterative process continues until the target vehicle functional unit is the last one in the sequence, thus improving the execution efficiency and accuracy of the directed acyclic graph.

[0073] In this embodiment, the vehicle functional unit that ranks first in the directed acyclic graph is determined as the target vehicle functional unit, and the target vehicle functional unit is controlled to execute the corresponding computational processing task. Then, in response to the completion of the corresponding computational processing task by the target vehicle functional unit, the target vehicle functional unit is updated to the vehicle functional unit that succeeds the target vehicle functional unit in the directed acyclic graph, and the in-degree of the succeeding vehicle functional unit is decremented by 1. Next, in response to the in-degree of the succeeding vehicle functional unit being 0, the process returns to the step of controlling the target vehicle functional unit to execute the corresponding computational processing task. The process iterates through the target vehicle functional unit until it is the last vehicle functional unit in the sequence. Finally, in response to the fact that the in-degree of the subsequent vehicle functional unit is not zero, the process monitors the in-degree of the subsequent vehicle functional unit and returns to the step of controlling the target vehicle functional unit to perform the corresponding computational processing task when the in-degree of the subsequent vehicle functional unit is zero. This iterative process continues until the target vehicle functional unit is the last vehicle functional unit in the sequence, thus improving the execution efficiency and accuracy of the directed acyclic graph.

[0074] It should be understood that, although Figures 1-2 , Figures 4-5 and Figures 7-9 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 1-2 , Figures 4-5 and Figures 7-9 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0075] Secondly, a device for generating directed acyclic graphs is provided, such as... Figure 10 As shown, the device includes a list acquisition module 1010, a resource registration module 1020, a dependency edge determination module 1030, and an acyclic graph generation module 1040.

[0076] The list acquisition module 1010 is used to acquire the list of vehicle functional units in the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order; the resource registration module 1020 is used to respond to the data resource registration operation of each vehicle functional unit, determine the read set and write set of each vehicle functional unit, determine the vehicle functional unit that is second in the registration order as the current vehicle functional unit, and determine each preceding vehicle functional unit according to the current vehicle functional unit and the registration order; the read set includes each data key to be read of the corresponding vehicle functional unit; the write set includes each data key to be written of the corresponding vehicle functional unit; the preceding vehicle functional unit is the vehicle functional unit that is registered before the current vehicle functional unit; the dependency edge determination module 1030 is used to determine each... The process involves establishing the dependency relationships of the current vehicle functional unit based on the first target data key to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit. This dependency relationship is stored, and the current vehicle functional unit is updated according to the registration order. The process then iterates through the steps of establishing the dependency relationships of the current vehicle functional unit based on the first target data key to be written, the read sets of each preceding vehicle functional unit, and the write sets of each preceding vehicle functional unit until the current vehicle functional unit is the last one in the registration order. The first target data key to be written is the data key to be written corresponding to the current vehicle functional unit. The acyclic graph generation module 1040 generates a directed acyclic graph based on the vehicle functional units arranged according to the registration order and the dependency relationships corresponding to each vehicle functional unit.

[0077] In one embodiment, the list acquisition module 1010 includes a list acquisition unit.

[0078] The list retrieval unit is used to create a configuration file. In response to the function unit registration operation for each vehicle function unit, the list retrieval unit determines each vehicle function unit according to the result of the function unit registration operation, generates a list of vehicle function units according to the registration order, and stores the list of vehicle function units in the configuration file.

[0079] In one embodiment, the device further includes a unit removal module.

[0080] The unit deletion module is used to respond to the unit deletion operation of the vehicle functional unit list, and to determine the vehicle functional unit to be deleted based on the result of the unit deletion operation. The unit deletion module is used to delete the read set and write set of the vehicle functional unit to be deleted from the read set and write set of each vehicle functional unit, delete the vehicle functional unit to be deleted from the vehicle functional unit list, and return to the step of determining the second vehicle functional unit in the registration order as the current vehicle functional unit.

[0081] In one embodiment, the square device further includes a unit addition module.

[0082] The unit addition module is used to respond to the unit addition operation of the vehicle function unit list, and to determine the vehicle function unit to be added and the order of the vehicle function units to be added in the registration order based on the result of the unit addition operation; the unit addition module is used to respond to the data resource registration operation of the vehicle function unit to be added, to add the read set and write set of the vehicle function unit to be added to the read set and write set of each vehicle function unit, to add the vehicle function unit to be added to the vehicle function unit list according to the order, and return to the step of determining the vehicle function unit ranked second in the registration order as the current vehicle function unit.

[0083] In one embodiment, the dependency edge establishment unit is used to create a vehicle computing task scheduling and processing tree, and to determine the vehicle functional unit that is first in the registration order as the root node of the vehicle computing task scheduling and processing tree. The dependency edge determination module 1030 includes a dependency edge establishment unit. The dependency edge establishment unit is used to determine the current vehicle-mounted functional unit as the current node; the dependency edge establishment unit is used to determine the leaf node and root node based on the vehicle computing task processing tree; the dependency edge establishment unit is used to obtain the read set and write set of the preceding functional unit corresponding to the leaf node, and determine whether there are identical data keys in the read set and write set of each first target data key to be written; the dependency edge establishment unit is used to establish a data dependency edge relationship between the current vehicle-mounted functional unit and the preceding functional unit corresponding to the leaf node in response to the existence of identical data keys in the read set and write set of the preceding functional unit corresponding to the leaf node, and update the vehicle computing task scheduling processing tree by making the current node a child node of the leaf node; the dependency edge relationship of the current vehicle-mounted functional unit includes the data dependency edge relationship between the current vehicle-mounted functional unit and the preceding functional unit corresponding to the leaf node.

[0084] In one embodiment, the dependency edge establishment unit is used to determine the leaf node as the target node in response to the absence of identical data keys in the read and write sets of the preceding functional units corresponding to the leaf node. The dependency edge establishment unit is used to update the target node as the parent node of the target node, obtain the read and write sets of the preceding functional units corresponding to the target node, and determine whether identical data keys in the read and write sets of the preceding functional units corresponding to the target node exist. The dependency edge establishment unit is used to establish a data dependency edge relationship between the current vehicle functional unit and the preceding functional units corresponding to the target node in response to the presence of identical data keys in the read and write sets of the preceding functional units corresponding to the target node, and update the current node as a child node of the target node to the vehicle computing task scheduling processing tree. The dependency edge relationship of the current vehicle functional unit includes the data dependency edge relationship between the current vehicle functional unit and the preceding functional units corresponding to the target node.

[0085] In one embodiment, the dependency edge establishment unit is used to return to the step of updating the target node to the parent node of the target node in a loop in response to the fact that there is no data key in the read set and write set of the preceding functional unit corresponding to the target node. This process continues until the target node is the root node.

[0086] In one embodiment, the device further includes an execution module.

[0087] The execution module is used to control each on-board functional unit to perform corresponding computational processing tasks based on the directed acyclic graph.

[0088] In one embodiment, the execution module includes an execution unit.

[0089] The execution unit is configured to identify the first vehicle-mounted functional unit in the directed acyclic graph (DAG) as the target vehicle-mounted functional unit and control the target vehicle-mounted functional unit to execute the corresponding computational processing task. In response to the completion of the corresponding computational processing task by the target vehicle-mounted functional unit, the execution unit updates the target vehicle-mounted functional unit to its successor vehicle-mounted functional unit in the DAG and decrements the in-degree of the successor vehicle-mounted functional unit by 1. In response to the successor vehicle-mounted functional unit having an in-degree of 0, the execution unit returns to controlling the target vehicle-mounted functional unit to execute the corresponding computational processing task. The corresponding computational processing task is processed cyclically until the target vehicle functional unit is the last vehicle functional unit in the sequence. The execution unit is used to monitor the in-degree of the subsequent vehicle functional unit when the in-degree of the subsequent vehicle functional unit is not zero, and to return to the step of controlling the target vehicle functional unit to execute the corresponding computational processing task when the in-degree of the subsequent vehicle functional unit is zero, and to process the corresponding computational processing task cyclically until the target vehicle functional unit is the last vehicle functional unit in the sequence.

[0090] Specific limitations regarding the apparatus for generating directed acyclic graphs (DAGs) can be found in the limitations on the methods for generating DAGs described above, and will not be repeated here. Each module in the aforementioned apparatus for generating DAGs can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the operations corresponding to each module.

[0091] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores configuration files. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for generating a directed acyclic graph.

[0092] Those skilled in the art will understand that Figure 11The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0093] Thirdly, a computer device is provided, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods described in the above method embodiments.

[0094] Fourthly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described in the above method embodiments.

[0095] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0096] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0097] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for generating a directed acyclic graph, the method comprising: Obtain the list of vehicle functional units from the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order; In response to the data resource registration operation for each of the vehicle-mounted functional units, a read set and a write set for each of the vehicle-mounted functional units are determined. The vehicle-mounted functional unit that is second in the registration order is determined as the current vehicle-mounted functional unit. Each preceding vehicle-mounted functional unit is determined according to the current vehicle-mounted functional unit and the registration order. The read set includes each data key to be read for the corresponding vehicle-mounted functional unit. The write set includes each data key to be written for the corresponding vehicle-mounted functional unit. The preceding vehicle-mounted functional units are the vehicle-mounted functional units whose registration order precedes that of the current vehicle-mounted functional unit. Based on each first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit, the dependency edge relationship of the current vehicle functional unit is established, the dependency edge relationship of the current vehicle functional unit is stored, the current vehicle functional unit is updated according to the registration order, and the step of establishing the dependency edge relationship of the current vehicle functional unit based on each first target data key to be written, the read set of each preceding vehicle functional unit, and the write set of each preceding vehicle functional unit is returned for iterative processing until the current vehicle functional unit is the last vehicle functional unit in the registration order; wherein, the first target data key to be written is the data key to be written corresponding to the current vehicle functional unit; A directed acyclic graph is generated based on the vehicle functional units arranged according to the registration order and the dependency relationships corresponding to each vehicle functional unit.

2. The method according to claim 1, characterized in that, The list of in-vehicle functional units obtained from the configuration file includes: Create the configuration file; In response to performing a function unit registration operation on each of the vehicle-mounted functional units, each of the vehicle-mounted functional units is determined according to the result of the function unit registration operation, and a vehicle-mounted functional unit list is generated according to the registration order, and the vehicle-mounted functional unit list is stored in the configuration file.

3. The method according to claim 1, characterized in that, The method further includes: In response to performing a unit deletion operation on the list of vehicle functional units, the vehicle functional unit to be deleted is determined based on the result of the unit deletion operation; Remove the read set and write set of the vehicle functional unit to be deleted from the read set and write set of each of the vehicle functional units, remove the vehicle functional unit to be deleted from the vehicle functional unit list, and return to the step of determining the vehicle functional unit that is second in the registration order as the current vehicle functional unit.

4. The method according to claim 1, characterized in that, The method further includes: In response to a unit addition operation on the vehicle functional unit list, the vehicle functional unit to be added and its order in the registration order are determined based on the result of the unit addition operation. In response to the data resource registration operation performed on the vehicle functional unit to be added, the read set and write set of the vehicle functional unit to be added are added to the read set and write set of each vehicle functional unit. The vehicle functional unit to be added is added to the vehicle functional unit list according to the sorting, and the process returns to the step of determining the vehicle functional unit that is second in the registration order as the current vehicle functional unit.

5. The method according to claim 1, characterized in that, Before establishing the dependency edge relationship of the current vehicle function unit based on each of the first target data keys to be written, the read set of each of the preceding vehicle function units, and the write set of each of the preceding vehicle function units, the process includes creating a vehicle computing task scheduling and processing tree, and determining the vehicle function unit that is first in the registration order as the root node of the vehicle computing task scheduling and processing tree. The step of establishing the dependency relationship of the current vehicle functional unit based on each of the first target data keys to be written, the read sets of each of the preceding vehicle functional units, and the write sets of each of the preceding vehicle functional units includes: The current vehicle-mounted functional unit is designated as the current node; The leaf nodes and root node are determined based on the vehicle computation task processing tree; Obtain the read set and write set of the preceding functional unit corresponding to the leaf node, and determine whether there is a data key that is the same as the first target data key to be written in the read set and write set of the preceding functional unit corresponding to the leaf node; In response to the existence of identical data keys in the read set and write set of the preceding functional unit corresponding to the leaf node, a data dependency relationship is established between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node, and the current node is updated to the vehicle computing task scheduling processing tree as a child node of the leaf node; the dependency relationship of the current vehicle functional unit includes the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the leaf node.

6. The method according to claim 5, characterized in that, The step of establishing the dependency edge relationship of the current vehicle functional unit based on each of the first target data keys to be written, the read sets of each of the preceding vehicle functional units, and the write sets of each of the preceding vehicle functional units further includes: In response to the fact that there is no data key in the same data key as each of the first target data keys to be written in the read set and the write set of the preceding functional unit corresponding to the leaf node, the leaf node is determined as the target node; Update the target node to the parent node of the target node, obtain the read set and the write set of the preceding functional unit corresponding to the target node, and determine whether there is the same data key in each of the first target data keys to be written in the read set and the write set of the preceding functional unit corresponding to the target node; In response to the existence of identical data keys in the read set and write set of the preceding functional unit corresponding to the target node, a data dependency relationship is established between the current vehicle functional unit and the preceding functional unit corresponding to the target node, and the current node is updated as a child node of the target node to the vehicle computing task scheduling processing tree; the dependency relationship of the current vehicle functional unit includes the data dependency relationship between the current vehicle functional unit and the preceding functional unit corresponding to the target node.

7. The method according to claim 6, characterized in that, The step of establishing the dependency edge relationship of the current vehicle functional unit based on each of the first target data keys to be written, the read sets of each of the preceding vehicle functional units, and the write sets of each of the preceding vehicle functional units further includes: If no data key is found in the read set and write set of the preceding functional unit corresponding to the target node that is the same as the first target data key to be written, the process returns to the step of updating the target node to the parent node of the target node and repeats until the target node is the root node.

8. The method according to claim 1, characterized in that, The method further includes: The on-board functional units are controlled to perform corresponding computational processing tasks according to the directed acyclic graph.

9. The method according to claim 8, characterized in that, The step of controlling each of the vehicle-mounted functional units to execute corresponding computational processing tasks according to the directed acyclic graph includes: The vehicle-mounted functional unit that is first in the order of the directed acyclic graph is determined as the target vehicle-mounted functional unit, and the target vehicle-mounted functional unit is controlled to execute the corresponding computational processing task. In response to the completion of the corresponding computational processing task by the target vehicle functional unit, the target vehicle functional unit is updated to the vehicle functional unit that succeeds the target vehicle functional unit in the directed acyclic graph, and the in-degree of the succeeding vehicle functional unit is decremented by 1. In response to the in-degree of the subsequent vehicle-mounted functional unit being 0, the process returns to the step of controlling the target vehicle-mounted functional unit to execute the corresponding computational processing task, and repeats until the target vehicle-mounted functional unit is the last vehicle-mounted functional unit in the arrangement order. In response to the fact that the in-degree of the subsequent vehicle-mounted functional unit is not zero, the in-degree of the subsequent vehicle-mounted functional unit is monitored, and when the in-degree of the subsequent vehicle-mounted functional unit is zero, the process returns to the step of controlling the target vehicle-mounted functional unit to execute the corresponding computational processing task, and repeats this process until the target vehicle-mounted functional unit is the last vehicle-mounted functional unit in the arrangement order.

10. An apparatus for generating a directed acyclic graph, characterized in that, The device includes: The list retrieval module is used to retrieve the list of vehicle functional units in the configuration file; the list of vehicle functional units includes each vehicle functional unit arranged according to the registration order. The resource registration module is used to respond to data resource registration operations for each of the vehicle-mounted functional units, determine the read set and write set of each of the vehicle-mounted functional units, determine the vehicle-mounted functional unit that is second in the registration order as the current vehicle-mounted functional unit, and determine each preceding vehicle-mounted functional unit according to the current vehicle-mounted functional unit and the registration order; the read set includes each data key to be read for the corresponding vehicle-mounted functional unit; the write set includes each data key to be written for the corresponding vehicle-mounted functional unit; the preceding vehicle-mounted functional units are the vehicle-mounted functional units whose registration order precedes that of the current vehicle-mounted functional unit. The dependency edge determination module is used to establish the dependency edge relationship of the current vehicle function unit based on each first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit; store the dependency edge relationship; update the current vehicle function unit according to the registration order; and return to the step of establishing the dependency edge relationship of the current vehicle function unit based on each first target data key to be written, the read set of each preceding vehicle function unit, and the write set of each preceding vehicle function unit for iterative processing until the current vehicle function unit is the last vehicle function unit in the registration order; wherein, the first target data key to be written is the data key to be written corresponding to the current vehicle function unit; An acyclic graph generation module is used to generate a directed acyclic graph based on the vehicle functional units arranged according to the registration order and the dependency edge relationships corresponding to each vehicle functional unit.

11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Component processing method and device, server and storage medium

    CN112214219A

  • Task scheduling method and device, computer equipment and storage medium

    CN115729687A