Vehicle-mounted real-time causal graph incremental causal discovering device and discovering method
By using an onboard real-time causal graph incremental causal discoverer, and leveraging Laplace matrix perturbation theory and attention pruning controller, local updates and sparse matrix storage of the causal graph are achieved. This solves the problems of causal graph generation latency and excessive memory consumption, and meets the real-time and low-power requirements of onboard devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
- Filing Date
- 2026-01-09
- Publication Date
- 2026-05-08
AI Technical Summary
Existing causal discovery techniques cannot meet the requirements of real-time performance and low power consumption in automotive devices, especially due to the high computational latency and memory consumption of causal graph generation, making it difficult to deploy on automotive-grade embedded processors with limited resources.
An in-vehicle real-time causal graph incremental causal discoverer is adopted. Through an incremental causal discovery engine and a hardware processing layer, the Laplace matrix perturbation theory and attention pruning controller are used to realize the local update of the causal graph and sparse matrix storage. Combined with a customized hybrid storage format and bit operation acceleration instruction sequence, the computational complexity and memory usage are reduced.
It reduces the latency of causal graph generation from minutes to milliseconds, reduces memory usage from GB to <100MB, and reduces power consumption to <1W, meeting the real-time requirements and resource constraints of the vehicle environment.
Smart Images

Figure CN121998064A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive control technology, specifically to an in-vehicle real-time causal graph incremental causal discoverer and discovery method. Background Technology
[0002] Current causal discovery techniques primarily rely on offline batch processing on cloud servers, employing classic methods such as PC algorithms and LiNGAM, with a typical time complexity of O(n log n). to The computational latency reaches the minute level, and the memory consumption exceeds the GB level. Such solutions cannot meet the stringent requirements of automotive devices for real-time performance (<20ms) and low power consumption (<1W). Although some studies have reduced the generation time of causal graphs to the second level through GPU acceleration, they are still based on cloud computing architecture, which suffers from high data transmission latency, strong network dependence, and high privacy leakage risks. In addition, traditional causal graphs use dense adjacency matrices for storage, which is problematic when the variable scale is large. At larger scales, memory consumption increases quadratically, making deployment difficult on the limited resources of automotive-grade embedded processors (typically <100MB of available memory). While existing sparse matrix optimization techniques can employ CSR format or bitmap representation, they lack hardware-level optimizations for the dynamic update characteristics of causal graphs, resulting in frequent weight update operations still requiring... The computational complexity becomes a real-time bottleneck. Therefore, there is an urgent need for a cause-effect graph generator for in-vehicle environments, implemented on embedded hardware. Incremental updates to complexity, while simultaneously meeting hard constraints on memory, latency, and power consumption. Summary of the Invention
[0003] To address the problems existing in the prior art, this invention provides an in-vehicle real-time causal graph incremental causal discoverer and discovery method, reducing computational complexity from traditional... Significantly reduced to This reduces the latency of causal graph generation from minutes to milliseconds.
[0004] Other features and advantages of this application will become apparent from the following detailed description, or may be learned in part from practice of this application.
[0005] According to a first aspect of this application, an in-vehicle real-time causal graph incremental causal discoverer is provided, comprising: The data stream interface layer is used to receive newly introduced sensor data; An incremental causal discovery engine is used to build a causal graph from existing sensor data and obtain the weight matrix of the causal graph. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is locally updated according to the newly introduced sensor data to obtain an updated weight matrix, and the causal graph is updated based on the updated weight matrix.
[0006] In some embodiments of this application, based on the foregoing scheme, the incremental causal discovery engine includes: The causal graph building unit is used to build a causal graph from existing sensor data. The causal graph includes several nodes and several edges connecting every pair of nodes. The weight matrix of the causal graph is obtained. The selection unit is used to receive candidate edges; The Laplace spectral decomposition unit establishes a Laplace matrix for all edges, performs Laplace spectral decomposition on the Laplace matrix exactly once, and obtains the basic feature pairs of each edge, wherein the basic feature pairs include eigenvalues and eigenvectors. The Laplace perturbation acquisition unit is used to traverse all candidate edges based on the difference between existing sensor data and newly introduced sensor data, calculate the partial correlation coefficient of each candidate edge, and acquire the local Laplace perturbation based on all the partial correlation coefficients. The incremental spectral update unit is used to update the basic feature pairs of each candidate edge based on the local Laplace perturbation. The weight matrix update unit is used to obtain a locally updated weight matrix based on the updated eigenvalues and eigenvectors, and to locally update the weight matrix based on the locally updated weight matrix to obtain the updated weight matrix. The cause-effect graph update unit updates the cause-effect graph based on the updated weight matrix.
[0007] In some embodiments of this application, based on the foregoing scheme, the edges include candidate edges and non-candidate edges, and the calculation formula for updating the basic feature pairs of each candidate edge based on the local Laplace perturbation is as follows:
[0008]
[0009] in, For local Laplace perturbations, and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. non-candidate edge number The updated eigenvalues and eigenvectors.
[0010] In some embodiments of this application, based on the foregoing scheme, the following further methods are also included: Attention pruning controller, including: The causal attention score acquisition subunit is used to calculate the causal attention score between each pair of nodes based on the neural network attention mechanism. The calculation formula is as follows:
[0011] in, For the first The node and the first Causal attention scores between nodes For the first The node and the first Causal strength scores between nodes In order to be with the first A learnable attention vector associated with each node. For learnable attention vectors, For the first The node and the first Causal strength score between nodes; The preset score threshold adjustment subunit is used to mark a pair of nodes as a candidate node pair if the causal attention score between them reaches a preset score threshold, and to obtain the edges between the candidate node pairs as candidate edges. The preset score threshold is adaptively adjusted using the following formula:
[0012] in, As a smoothing factor, , To find the arithmetic mean, for The preset score threshold for the next iteration for The preset score threshold for the next iteration.
[0013] In some embodiments of this application, based on the foregoing scheme, the attention pruning controller further includes: Bitmap mask generation subunit is used to mark candidate edges and generate a bitmap mask. The calculation formula is:
[0014] in, Expressing percentages, This indicates the total number of nodes.
[0015] In some embodiments of this application, based on the foregoing scheme, the following further methods are also included: The hardware processing layer includes: The storage format setting subunit is used to set a customized hybrid storage format, including: Row pointers are set to locate the physical position of the weight matrix, and the physical position is represented by a multi-bit fixed-length array; The column index is set to store the edges of a predetermined length and their corresponding weight values, wherein the weight values are represented by fixed-point numbers; Use a bitmap to mark columns with candidate edges.
[0016] In some embodiments of this application, based on the foregoing scheme, the hardware processing layer further includes: The acceleration setting subunit is used to set the bitwise operation acceleration instruction sequence, including: By utilizing the channel masking function of the Single Instruction Multiple Data Vector Unit and the Packing Single Instruction Multiple Data function based on the RISC-V architecture, 4 to 8 weight values in the local update weight matrix are updated every cycle. A hardware-accelerated sparse matrix manager is used to eliminate zero values by bitwise XOR and bitwise AND operations when performing local updates on a weight matrix based on a locally updated weight matrix.
[0017] According to a second aspect of this application, an incremental causal discovery method for real-time causal graphs in vehicles is provided, comprising: Receive data from newly introduced sensors; A causal graph is established based on existing sensor data, and the weight matrix of the causal graph is obtained. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is updated according to the newly introduced sensor data to obtain an updated weight matrix. The causal graph is then updated based on the updated weight matrix.
[0018] According to a third aspect of this application, a computer-readable storage medium is provided that stores a computer program thereon, the computer program including executable instructions that, when executed by a processor, implement the method described above.
[0019] According to a fourth aspect of this application, an electronic device is provided, comprising: One or more processors; A memory for storing executable instructions of the processor, which, when executed by the one or more processors, cause the one or more processors to implement the method described above.
[0020] The beneficial effects of this application are as follows: (1) This application provides an in-vehicle real-time causal graph incremental causal discoverer and discovery method. In the incremental causal discovery engine, based on the Laplace matrix perturbation theory, the complexity of updating causal edge weights is reduced from... Down to The causal structure stability can be maintained using only the first few spectral components, and spectral theory is applied to vehicle-mounted real-time causal discovery for the first time.
[0021] (2) This application provides an in-vehicle real-time causal graph incremental causal discoverer and discovery method, with an attention-guided dynamic Top-K pruning mechanism: a learnable preset score threshold is pre-calculated and solidified into a lookup table, combined with runtime adaptation, to achieve hardware-level bitmap mask control, reducing the adjacency matrix storage complexity from Compress to Memory usage <100MB.
[0022] (3) The present application provides an in-vehicle real-time causal graph incremental causal discoverer and discovery method, which accelerates the instruction sequence by customizing the hybrid storage format and bit operation: a sparse matrix format is customized for automotive embedded processors, and SIMD lane masking, popcount and hardware bitmap management unit (BMU) are used to achieve a processing speed of 1-2 edges per cycle, inference latency <20ms and power consumption <1W.
[0023] (4) This application provides an in-vehicle real-time causal graph incremental causal discoverer and discovery method, an event-driven WCET analyzable architecture: a state machine combining time slice rotation and priority ceiling protocol is designed, and a cycle-accurate monitoring and timeout degradation mechanism is integrated to meet the stringent requirements of automotive functional safety ISO 26262 for deterministic real-time performance. It can be deployed and verified on Renesas R-Car V3H / M3, NXP i.MX8 and other platforms.
[0024] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit this application. Attached Figure Description
[0025] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and are intended to explain the invention, but do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a schematic diagram of an incremental causal discovery device for real-time causal graphs in vehicles according to the present invention; Figure 2 This is a schematic diagram of the incremental causal discovery engine of the present invention; Figure 3 This is a schematic diagram of the attention pruning controller of the present invention; Figure 4 This is a schematic diagram of the hardware processing layer of the present invention; Figure 5 This is a schematic diagram of an incremental causal discovery method for real-time causal graphs in vehicles according to the present invention; Figure 6 This is a schematic diagram of an electronic device according to the present invention. Detailed Implementation
[0026] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0027] It should be understood that the terms "comprising" and other similar expressions in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, apparatus, or device that includes a series of steps or units and is not limited to the listed steps or units. Furthermore, "first" and "second" are used to distinguish different objects and are not intended to describe a specific order.
[0028] According to the first aspect of this application, Figure 1 As shown, this embodiment provides an in-vehicle real-time causal graph incremental causal discoverer, including: The data stream interface layer is used to receive newly introduced sensor data.
[0029] In some embodiments of this example, the newly introduced sensor data is high-frequency sensor data received from the vehicle bus by the data stream interface layer. The sensor data includes radar data, camera data, IMU data, etc. This example does not limit this.
[0030] An incremental causal discovery engine is used to build a causal graph from existing sensor data and obtain the weight matrix of the causal graph. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is locally updated according to the newly introduced sensor data to obtain an updated weight matrix, and the causal graph is updated based on the updated weight matrix.
[0031] In some embodiments of this example, a causal graph of existing sensor data is assumed. The adjacency matrix is Weight matrix , Nodes represent sensor data points. Let be the edges, indicating a correlation between any two sensor data points. Define a normalized Laplacian matrix. ,in For degree matrix, It is an identity matrix. When newly introduced sensor data... Upon arrival, it will cause a local Laplace perturbation. This leads to changes in the weight matrix, resulting in a sparse perturbation matrix for the local Laplace perturbation. Causality strength score of the causal graph. This can be expressed as spectral distance:
[0032] in, For the first The node and the first Causal strength scores between nodes and These are the Laplace matrices. eigenvalues and eigenvectors This is a local Laplace perturbation.
[0033] Thus, when a local Laplace perturbation occurs, the causal strength score of the causal graph changes; for example, a local Laplace perturbation... Indicates when the first The node and the first The change in the Laplace matrix when an edge is added or removed between nodes (i.e., changing their causal relationship). In other words, Completely aimed at the first The node and the first The formula is determined by the operations on the first node. It calculates the operation on the first node for a specific node. The node and the first Local Laplace perturbation of each node The overall degree of influence on the characteristic patterns of the entire system, therefore Ultimately, the measure is the first The node and the first The strength of the causal relationship between nodes.
[0034] Traditional methods require recalculating the feature decomposition of the entire causal graph of existing sensor data. To transpose, Represents the total number of nodes, and the complexity is... .
[0035] In some implementations of this embodiment, such as Figure 2 As shown, the incremental causal discovery engine includes: The causal graph building unit is used to build a causal graph from existing sensor data. The causal graph includes several nodes and several edges connecting each pair of nodes, and the weight matrix of the causal graph is obtained.
[0036] The selection unit is used to receive candidate edges.
[0037] In some embodiments of this example, the candidate edges are the first edges of all edges in the causal graph. One side, complexity After receiving a candidate edge, the other edges in the edge are considered non-candidate edges.
[0038] The Laplacian spectral decomposition unit establishes a Laplacian matrix for all edges, performs Laplacian spectral decomposition on the Laplacian matrix exactly once, and obtains the basic feature pairs of each edge, wherein the basic feature pairs include eigenvalues and eigenvectors.
[0039] In some implementations of this embodiment, initially, when the local Laplacian matrix undergoes only one Laplacian spectral decomposition, the initial eigenvalues are obtained. With the initial feature vector , For the first Candidate edges, Subsequently, as new sensor data continues to be introduced, local Laplace perturbations are continuously acquired, and eigenvalues and eigenvectors are continuously updated.
[0040] The Laplace perturbation acquisition unit is used to traverse all candidate edges based on the difference between existing sensor data and newly introduced sensor data, calculate the partial correlation coefficient of each candidate edge, and acquire the local Laplace perturbation based on all the partial correlation coefficients.
[0041] The incremental spectral update unit is used to update the basic feature pairs of each candidate edge based on the local Laplace perturbation.
[0042] In some implementations of this embodiment, the edges include candidate edges and non-candidate edges. Based on the local Laplace perturbation, the formula for updating the basic feature pairs of each candidate edge is as follows:
[0043]
[0044] in, For local Laplace perturbations, and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. non-candidate edge number The updated eigenvalues and eigenvectors.
[0045] The weight matrix update unit is used to obtain a locally updated weight matrix based on the updated eigenvalues and eigenvectors, and to locally update the weight matrix based on the locally updated weight matrix to obtain the updated weight matrix.
[0046] The cause-effect graph update unit updates the cause-effect graph based on the updated weight matrix.
[0047] Thus, the incremental causal discovery engine, based on spectral theory, utilizes the spectral properties of the Laplace matrix to treat newly introduced sensor data as a local Laplace perturbation of existing sensor data, thereby achieving local updates to the weight matrix. Furthermore, because... It is sparse (involving only the Top-K edges), and calculating eigenvalues and updating eigenvectors only requires... This operation, through pre-calculated perturbation propagation paths, reduces the complexity of each update to a minimum. (because (is a constant).
[0048] In some implementations of this embodiment, to avoid storage, this embodiment introduces attention-driven dynamic Top-K pruning, which borrows from the attention mechanism of neural networks, and also includes an attention pruning controller, such as... Figure 3 As shown, the attention pruning controller includes: The causal attention score acquisition subunit is used to calculate the causal attention score between each pair of nodes based on the neural network attention mechanism. The calculation formula is as follows:
[0049] in, For the first The node and the first Causal attention scores between nodes For the first The node and the first Causal strength scores between nodes In order to be with the first A learnable attention vector associated with each node. The attention vector is a learnable vector (pre-trained and embedded in a lookup table in an embedded device). For the first The node and the first Causal strength score between nodes; The preset score threshold adjustment subunit is used to mark a pair of nodes as candidate node pairs if the causal attention score between them reaches a preset score threshold, and to obtain the edges between the candidate node pairs as candidate edges. To adapt to changes in driving scenarios (such as urban / highway driving), the preset score threshold is adaptively adjusted using the following formula:
[0050] in, As a smoothing factor, , To find the arithmetic mean, for The preset score threshold for the next iteration for The preset score threshold for each iteration is calculated using a single SIMD cycle.
[0051] Thus, the causal attention score acquisition subunit can dynamically adjust the first... The degree to which each node contributes to the causal influence of other nodes is learned through training, thus determining the appropriate level of influence. This allows us to determine which nodes have more important causal signals, thus providing a basis for setting subsequent score thresholds.
[0052] In some embodiments of this example, the attention pruning controller further includes: Bitmap mask generation sub-units are used to mark candidate edges.
[0053] Specifically, for each batch of data processed, only the data with the highest causal attention score is retained. Strip edge ( Generate bitmap mask The calculation formula is:
[0054] in, It represents a percentage.
[0055] The bitmap mask is stored as a compressed bitmap using a hardware bitmap management unit (BMU), requiring only a few bits per row. Bytes. After pruning, the storage complexity of the adjacency matrix is reduced from... Down to ,when , At that time, memory usage decreased from 8MB (dense) to 40KB (sparse), meeting the <100MB requirement.
[0056] In this way, the compressed sensor data is stored and allocated to obtain the allocated sensor data.
[0057] In some implementations of this embodiment, the instruction set characteristics of automotive-grade embedded processors (ARM Cortex-A53 core) are taken into account, such as... Figure 4 As shown, it also includes a hardware processing layer, which includes: The storage format setting subunit is used to set a customized hybrid storage format. In setting the customized hybrid storage format, a row pointer is set to locate the physical position of the weight matrix. The physical position is represented by a multi-bit fixed-length array and stored in TCM (Tightly Coupled Memory) high-speed memory. A column index is set to store candidate edges of a predetermined length. The weight value of each candidate edge in the weight matrix is represented by a fixed-point number. Each row maintains a bitmap and supports fast bit counting (popcount) statistics.
[0058] In one specific embodiment, the row pointer is a 16-bit fixed-length array (maximum supported). ), stored in TCM high-speed memory; column index: only stores Top-K edges, at most per row Each, using 8-bit or 16-bit fixed length (as determined by...). (Decision); Weight values: represented by fixed-point INT16 (Q8.7 format) to avoid high power consumption of floating-point units (FPU); Bitmap mask: each row maintains a 64-bit bitmap, marking columns with candidate edges, and supports fast bit counting (popcount) statistics.
[0059] An acceleration setting subunit is used to set the bit operation acceleration instruction sequence. In setting the bit operation acceleration instruction sequence, the bit operation acceleration instruction sequence is set by utilizing the lanemasking function of the Single Instruction, Multiple Data (SIMD) vector unit and the packetized SIMD function based on the RISC-V (Fifth Generation Reduced Instruction Set Architecture) architecture to achieve the local update of 4 to 8 weight values in the weight matrix every cycle.
[0060] In some implementations of this embodiment, a hardware-accelerated sparse matrix manager is also included, which eliminates zero values by bit XOR and bit AND operations when performing local updates on the weight matrix based on the local update weight matrix. In this way, branch prediction failure can be completely avoided, and the control flow overhead is reduced to 1 to 2 cycles per candidate edge by using processor zero-overhead loops and bit scan instructions.
[0061] Thus, the data flow interface layer receives high-frequency sensor data (such as radar, camera, IMU) from the vehicle bus and writes it to the pre-allocated TCM memory area in a circular buffer manner. The incremental causal discovery engine is implemented based on spectral graph theory. Complexity updates only process the Laplace perturbation caused by newly introduced sensor data each time, rather than recalculating the entire graph. The hardware-accelerated sparse matrix manager utilizes the Bitmap Management Unit (BMU) and SIMD Vector Unit built into the automotive-grade processor to store the adjacency matrix in a hardware-friendly CSR-SIMD format, reducing memory footprint from... Compress to ,in Top-K sparsity (typically) The attention pruning controller dynamically calculates causal attention scores and generates bitmasks to control the storage allocation of HASMM.
[0062] This embodiment achieves real-time causal discovery in a vehicle environment, reducing computational complexity from traditional... Significantly reduced to This reduces the latency of causal graph generation from minutes to milliseconds (<20ms). Through attention-guided Top-K dynamic pruning and CSR-SIMD sparse representation, memory usage is compressed from GB to <100MB, meeting the resource constraints of automotive-grade embedded platforms. Employing hardware-friendly bitwise operations and fixed-point quantization, power consumption is reduced to <1W, an order of magnitude lower than cloud-based CPU / GPU solutions. The system supports incremental updates of streaming data without requiring full graph recalculation, making it suitable for deterministic real-time systems meeting ISO 26262 functional safety requirements. Comparative tests show that in typical automotive scenarios (n=200), this invention maintains an F1 accuracy >0.9 while achieving a 22-fold improvement in latency and a 50-fold reduction in power consumption compared to traditional cloud-based PC algorithms, providing efficient causal reasoning capabilities for automotive fault diagnosis and ADAS decision optimization.
[0063] In one specific embodiment, this cause-effect graph generator is deployed on a Renesas R-Car M3 (quad-core Cortex-A53, 1.2GHz, 2MB L2 cache) to monitor 200 state variables of the engine, motor, and battery. The goal is to diagnose powertrain failures and their root causes in real time.
[0064] Configuration parameters: (Retain the top-5 causal edges for each variable); Preset dynamic range of score threshold: 0.01-0.1; Data sampling rate: 100Hz (per 10ms batch); TCM memory: 96MB (used to store weight matrix, eigenvalues, eigenvectors and CSR (Compressed SparseRow) structure); Actual measured data of the running results: Inference latency: average 12.3ms (maximum 18.7ms), meeting the <20ms requirement. This includes 2.1ms for causal attention score calculation, 7.5ms for spectral update (eigenvalue update, eigenvector update), and 2.7ms for pruning and I / O.
[0065] Power consumption: Measured by the on-chip power sensor of the R-CarM3, the average power consumption is 0.87W (peak 0.96W), meeting the <1W requirement. The main power consumption comes from the SIMD unit (0.6W) and TCM access (0.2W).
[0066] Memory usage: Total memory is 78MB, including the weight matrix (200×5×4B=4MB), eigenvalues λ (5×4B=20B), CSR structure (row pointer 400B + column index 200×5×2B=2KB + weight value 200×5×2B=2KB) and bitmap mask (200×8B=1.6KB), which is far below the 100MB limit.
[0067] Accuracy: Compared to cloud-based PC algorithms The causal edge F1 score reached 0.92, a decrease of only 3%, but the latency decreased by three orders of magnitude.
[0068] Thus, it is possible to implement [the technology] on resource-constrained automotive-grade embedded processors. arrive Breakthrough in complexity. The system achieves this by using Top-K dynamic pruning guided by an attention mechanism and adjacency matrix sparsification accelerated by bit operations, keeping inference latency below 20ms, power consumption below 1W, and memory usage below 100MB.
[0069] According to the second aspect of this application, such as Figure 5 As shown, this embodiment provides an incremental causality discovery method for real-time causality graphs in vehicles, including: Receive data from newly introduced sensors; A causal graph is established based on existing sensor data, and the weight matrix of the causal graph is obtained. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is updated according to the newly introduced sensor data to obtain an updated weight matrix. The causal graph is then updated based on the updated weight matrix.
[0070] Specifically, the method in this embodiment corresponds one-to-one with the above-described device embodiments. The functions of each module have been described in detail in the corresponding method embodiments, so they will not be repeated here.
[0071] According to a third aspect of this application, this embodiment provides a computer-readable storage medium having a computer program stored thereon, the computer program including executable instructions that, when executed by a processor, implement the method described above.
[0072] The present invention can implement all or part of the processes in the above methods, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0073] According to the fourth aspect of this application, such as Figure 6 As shown, an electronic device is provided, comprising: One or more processors; Memory is used to store executable instructions for the processor, which, when executed by one or more processors, cause one or more processors to implement the methods described above.
[0074] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and a bus connecting different device components (including memory and processor).
[0075] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting all parts of the computer device through various interfaces and lines.
[0076] Memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area stores application programs required for operating the device and at least one function (e.g., sound playback, image playback, etc.); the data storage area stores data created based on the use of the mobile phone (e.g., audio data, video data, etc.). Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMedia Cards (SMC), Secure Digital (SD) cards, Flash Cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0077] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, servers, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and memory) containing computer-usable program code.
[0078] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), servers, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0082] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0083] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle-mounted real-time causal graph incremental causal discoverer, characterized in that, include: The data stream interface layer is used to receive newly introduced sensor data; An incremental causal discovery engine is used to build a causal graph from existing sensor data and obtain the weight matrix of the causal graph. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is locally updated according to the newly introduced sensor data to obtain an updated weight matrix, and the causal graph is updated based on the updated weight matrix.
2. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 1, characterized in that, The incremental causal discovery engine includes: The causal graph building unit is used to build a causal graph from existing sensor data. The causal graph includes several nodes and several edges connecting every pair of nodes. The weight matrix of the causal graph is obtained. The selection unit is used to receive candidate edges; The Laplace spectral decomposition unit establishes a Laplace matrix for all edges, performs Laplace spectral decomposition on the Laplace matrix exactly once, and obtains the basic feature pairs of each edge, wherein the basic feature pairs include eigenvalues and eigenvectors. The Laplace perturbation acquisition unit is used to traverse all candidate edges based on the difference between existing sensor data and newly introduced sensor data, calculate the partial correlation coefficient of each candidate edge, and acquire the local Laplace perturbation based on all the partial correlation coefficients. The incremental spectral update unit is used to update the basic feature pairs of each candidate edge based on the local Laplace perturbation. The weight matrix update unit is used to obtain a locally updated weight matrix based on the updated eigenvalues and eigenvectors, and to locally update the weight matrix based on the locally updated weight matrix to obtain the updated weight matrix. The cause-effect graph update unit updates the cause-effect graph based on the updated weight matrix.
3. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 2, wherein the edges include candidate edges and non-candidate edges, characterized in that, The formula for updating the basic feature pairs of each candidate edge based on the local Laplace perturbation is as follows: in, For local Laplace perturbations, and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. Candidate edge number The updated eigenvalues and eigenvectors and These are the first and second digits of the Laplace matrix. non-candidate edge number The updated eigenvalues and eigenvectors.
4. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 1, characterized in that, Also includes: Attention pruning controller, including: The causal attention score acquisition subunit is used to calculate the causal attention score between each pair of nodes based on the neural network attention mechanism. The calculation formula is as follows: in, For the first The node and the first Causal attention scores between nodes For the first The node and the first Causal strength scores between nodes In order to be with the first A learnable attention vector associated with each node. For learnable attention vectors, For the first The node and the first Causal strength score between nodes; The preset score threshold adjustment subunit is used to mark a pair of nodes as a candidate node pair if the causal attention score between them reaches a preset score threshold, and to obtain the edges between the candidate node pairs as candidate edges. The preset score threshold is adaptively adjusted using the following formula: in, As a smoothing factor, , To find the arithmetic mean, for The preset score threshold for the next iteration for The preset score threshold for the next iteration.
5. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 4, characterized in that, The attention pruning controller also includes: Bitmap mask generation subunit is used to mark candidate edges and generate a bitmap mask. The calculation formula is: in, Expressing percentages, This indicates the total number of nodes.
6. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 2, characterized in that, Also includes: The hardware processing layer includes: The storage format setting subunit is used to set a customized hybrid storage format, including: Row pointers are set to locate the physical position of the weight matrix, and the physical position is represented by a multi-bit fixed-length array; The column index is set to store the edges of a predetermined length and their corresponding weight values, wherein the weight values are represented by fixed-point numbers; Use a bitmap to mark columns with candidate edges.
7. The vehicle-mounted real-time causal graph incremental causal discoverer according to claim 4, characterized in that, The hardware processing layer also includes: The acceleration setting subunit is used to set the bitwise operation acceleration instruction sequence, including: By utilizing the channel masking function of the Single Instruction Multiple Data Vector Unit and the Packing Single Instruction Multiple Data function based on the RISC-V architecture, 4 to 8 weight values in the local update weight matrix are updated every cycle. A hardware-accelerated sparse matrix manager is used to eliminate zero values by bitwise XOR and bitwise AND operations when performing local updates on a weight matrix based on a locally updated weight matrix.
8. A vehicle-mounted real-time causal graph incremental causal discovery method, characterized in that, include: Receive data from newly introduced sensors; A causal graph is established based on existing sensor data, and the weight matrix of the causal graph is obtained. If newly introduced sensor data causes a Laplace perturbation, the weight matrix is updated according to the newly introduced sensor data to obtain an updated weight matrix. The causal graph is then updated based on the updated weight matrix.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program includes executable instructions that, when executed by a processor, implement the method of claim 8.
10. An electronic device, characterized in that, include: One or more processors; A memory for storing executable instructions of the processor, which, when executed by the one or more processors, cause the one or more processors to implement the method of claim 8.