A CAN signal intelligent analysis method and system
By using an intelligent CAN signal parsing method, CAN signals are automatically parsed and verified. Combined with a vehicle-cloud collaborative architecture, this solves the problems of manual dependence and insufficient functional correlation in traditional methods, and achieves efficient and accurate signal parsing and function prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DEEPAL AUTOMOBILE NANJING RESEARCH INSTITUTE CO LTD
- Filing Date
- 2026-04-23
- Publication Date
- 2026-06-05
AI Technical Summary
Existing CAN signal parsing methods rely on manual configuration, which is cumbersome, inefficient, prone to parsing errors, and unable to achieve multi-dimensional verification and functional association.
The CAN signal intelligent parsing method is adopted. By reading CAN messages and protocols, the signal health is automatically parsed and verified, and a test report is generated. The vehicle-cloud collaborative architecture is used to realize the correlation analysis between signals and functions, reducing manual intervention.
It automates the entire process of CAN signal parsing, verification, and report generation, improving efficiency, ensuring parsing accuracy and functional analysis accuracy, and adapting to protocol changes and functional iterations.
Smart Images

Figure CN122160450A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle intelligent diagnostic technology, specifically to a method and system for intelligent parsing of CAN signals. Background Technology
[0002] CAN (Controller Area Network) bus, as a reliable and efficient serial communication bus, is widely used in the automotive, industrial control and other fields. Especially in intelligent connected vehicles, the CAN bus undertakes the data transmission tasks between various vehicle devices. The accuracy of CAN signal parsing and the comprehensiveness of verification directly affect the efficiency and reliability of equipment operation monitoring, fault diagnosis and functional verification.
[0003] Currently, most existing CAN signal parsing methods rely on manual configuration of parsing rules, requiring manual association of the CAN protocol and CAN messages. This is not only cumbersome and inefficient, but also prone to parsing errors due to human error.
[0004] Therefore, there is an urgent need for a new intelligent CAN signal parsing method and system. Summary of the Invention
[0005] In view of the shortcomings of the prior art, the purpose of this application is to provide a CAN signal intelligent parsing method and system that can realize automatic parsing and multi-dimensional verification of CAN signals.
[0006] In a first aspect, embodiments of this application provide a method for intelligent parsing of CAN signals, comprising the following steps:
[0007] Read CAN messages and CAN protocol, and parse the CAN messages according to the CAN protocol, which is used to define signal mapping and parsing criteria;
[0008] The parsed CAN signal is verified, including verifying whether the CAN signal meets the requirements of the CAN protocol and evaluating health indicators. Various data during the signal verification process are recorded to obtain the signal test results. The health indicators include at least two of the following: periodic consistency, missing detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values.
[0009] Read the preset test report template, automatically match, fill in and anomaly mark the signal test results according to the test report template, and generate a test report;
[0010] Based on the health indicators and the test report, a verification result report is generated and displayed.
[0011] In the above technical solution, this invention can automatically associate and parse CAN messages and the CAN protocol without manual intervention, adapting to protocol changes and new signal anomalies, reducing manual configuration and maintenance costs. Simultaneously, it achieves quantitative evaluation of signal quality through multi-dimensional health indicators (at least two), breaking through the limitations of traditional single-signal verification, realizing comprehensive monitoring of CAN communication status, and enabling early identification of potential anomalies. It automatically matches test report templates, fills in data, and marks anomalies, replacing manual report writing, improving testing efficiency, avoiding human error, and the generated verification result report can intuitively display the parsing and verification status, facilitating rapid problem troubleshooting. In summary, this invention solves the core defects of traditional CAN signal parsing—"reliant on manual work, static parsing rules, and single verification"—achieving full automation of the CAN signal parsing, verification, report generation, and result display process.
[0012] One possible implementation also includes:
[0013] Obtain the target function to be analyzed and its corresponding function definition document, which is used to define the function logic and verification rules;
[0014] Based on the functional definition document, key signals related to the target function are identified from historical CAN signals, and the target function is predicted and analyzed based on the key signals, and the functional analysis results are output.
[0015] The verification result report is also generated and displayed based on the functional analysis results.
[0016] In the above technical solution, this invention identifies target function-related signals through functional definition documents, establishes the association between signals and functions, and can perform specific predictions for specific functions (such as network management sleep analysis). Simultaneously, the output functional analysis results are integrated into the verification result report, ensuring that the analysis results not only include the health status of the signal itself but also reflect the operational status of vehicle functions, providing support for functional fault diagnosis and potential risk prediction. Furthermore, it expands the application scenarios of CAN signal analysis, upgrading from signal verification to integrated analysis of signal verification and functional prediction, adapting to the functional integration needs of new energy vehicles and intelligent connected vehicles. In summary, this invention overcomes the shortcomings of traditional solutions that can only verify the signal itself and cannot associate it with functional logic, achieving a deep integration of CAN signal analysis and vehicle target function analysis.
[0017] One possible implementation involves identifying key signals related to the target function from historical CAN signals based on the function definition document, specifically including:
[0018] Based on the functional definition document, rules describing key signals are obtained, and a rule base is established;
[0019] Select the target function to be analyzed, and identify the key signals related to the target function from the historical CAN signals according to the signal name rules and CAN data identification rules in the rule base.
[0020] In the above technical solution, this invention establishes a rule base through functional definition documents, standardizing the identification criteria of key signals and avoiding the subjectivity and errors of manual identification. It automatically associates target functions with CAN signals according to the rule base, eliminating the need for manual matching and improving signal identification efficiency. Simultaneously, it ensures that the identified signals are highly correlated with the target functions, providing a reliable data foundation for subsequent predictive analysis. In summary, this invention solves the problems of non-standardized and inefficient identification of function-related signals, ensuring the accuracy and repeatability of functional analysis.
[0021] One possible implementation involves parsing the CAN message according to the CAN protocol, specifically including:
[0022] Based on the signal start bit and signal length defined in the CAN protocol, determine the byte range of the corresponding signal in the CAN message;
[0023] Extract the binary bits corresponding to the signal from the byte range;
[0024] The extracted binary bits are combined into an unsigned integer according to the byte order specified in the CAN protocol;
[0025] Convert the unsigned integer into a signal value with corresponding physical meaning.
[0026] In the above technical solution, the present invention solves the problems of ambiguous parsing logic and easy parsing errors in traditional parsing methods, and ensures the accuracy and standardization of CAN signal parsing.
[0027] One possible implementation method is based on a vehicle-cloud collaborative architecture, which includes the vehicle and the cloud.
[0028] The vehicle-mounted device collects the CAN messages and uploads them to the cloud.
[0029] After receiving the CAN message, the cloud performs CAN signal parsing, CAN signal verification, and test report generation.
[0030] In the above technical solution, the vehicle-side is responsible for collecting and uploading CAN messages, while the cloud is responsible for the core parsing, CAN signal verification, and report generation, avoiding parsing delays caused by insufficient computing power on the vehicle side. This breaks the one-way model where the vehicle side only collects data and the cloud only stores it, laying the foundation for subsequent model training and iterative optimization. In summary, this invention solves the problems of disconnect and lack of collaboration between the vehicle and cloud in traditional technologies, improving the real-time performance and scalability of CAN signal parsing.
[0031] One possible implementation method is based on a vehicle-cloud collaborative architecture, which includes the vehicle and the cloud.
[0032] The vehicle-mounted device collects the CAN messages and uploads them to the cloud.
[0033] After receiving the CAN message, the cloud performs CAN signal parsing, CAN signal verification, test report generation, and functional analysis operations.
[0034] In the above technical solution, in addition to being responsible for core parsing, CAN signal verification and report generation, the cloud also adds functional analysis operations, enabling the cloud to undertake core intelligent analysis tasks, fully leverage the cloud's computing power advantages, and handle complex functional predictive analysis; the vehicle is only responsible for data collection and uploading, reducing vehicle hardware costs and computing power burden, while ensuring the real-time and completeness of the data required for cloud analysis; this invention realizes a closed loop of data collection and intelligent analysis under vehicle-cloud collaboration, adapting to the needs of rapid iteration of intelligent connected vehicles.
[0035] In one possible implementation, the cloud also performs the following: sending the predictive model used for the functional analysis operation to the vehicle.
[0036] In the above technical solutions, for situations where the prediction model consumes relatively little memory or storage resources, but the vehicle has high requirements for response time, the prediction model can be distributed to the vehicle. This enables the vehicle to respond autonomously in real time, thus solving the problems of latency in remote cloud analysis and the inability to handle emergencies in a timely manner.
[0037] In one possible implementation, the vehicle receives the prediction model sent from the cloud, inputs locally collected signals into the prediction model, and outputs prediction analysis results through the prediction model.
[0038] In the above technical solution, the present invention can realize autonomous real-time response at the vehicle end, so as to solve the problems of remote analysis delay and inability to handle emergencies in a timely manner in the cloud.
[0039] In one possible implementation, the cloud also performs the following: iterative optimization of the prediction model based on the CAN messages continuously uploaded by the vehicle.
[0040] In the above technical solution, the cloud relies on the CAN messages continuously uploaded by the vehicle to continuously update the training data and iteratively optimize the prediction model, so that the prediction model can adapt to the changes brought about by the vehicle operating environment, protocol changes, and functional iterations; it solves the problem of the static nature of traditional models and their inability to adapt to changes in vehicle operating status, and improves the accuracy and adaptability of the prediction model.
[0041] Secondly, embodiments of this application provide a CAN signal intelligent analysis system, comprising:
[0042] The message protocol reading module is used to read CAN messages and CAN protocol, and parse the CAN messages according to the CAN protocol, wherein the CAN protocol is used to define signal mapping and parsing basis;
[0043] The signal verification module is used to verify the parsed CAN signal, including verifying whether the CAN signal meets the requirements of the CAN protocol and evaluating health indicators, recording various data during the signal verification process, and obtaining signal test results; the health indicators include at least two of the following: periodic consistency, missing detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values.
[0044] The report generation module is used to read a preset test report template, automatically match, fill in, and anomaly mark the signal test results according to the test report template, and generate a test report.
[0045] The results display module is used to generate and display a verification result report based on the health index and the test report. In the above technical solution,
[0046] This invention automatically associates and parses CAN messages with the CAN protocol without manual intervention, adapting to protocol changes and new signal anomalies, reducing manual configuration and maintenance costs. Simultaneously, it achieves quantitative evaluation of signal quality through multi-dimensional health indicators (at least two), overcoming the limitations of traditional single-signal verification and enabling comprehensive monitoring of CAN communication status, allowing for early identification of potential anomalies. It automatically matches test report templates, fills in data, and marks anomalies, replacing manual report writing, improving testing efficiency, avoiding human error, and providing a clear view of the parsing and verification results for quick problem troubleshooting. In summary, this invention solves the core defects of traditional CAN signal parsing—"reliant on manual work, static parsing rules, and single verification"—achieving full automation of the entire process of CAN signal parsing, verification, report generation, and result display. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application will be described below.
[0048] Figure 1 This is a flowchart of a CAN signal intelligent parsing method disclosed in an embodiment of this application;
[0049] Figure 2 This is a block diagram of a CAN signal intelligent analysis system disclosed in an embodiment of this application;
[0050] Explanation of reference numerals in the attached figures:
[0051] 1. Message protocol reading module, 2. Signal verification module, 3. Report generation module, 4. Result display module. Detailed Implementation
[0052] The embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The detailed description of the following embodiments and the accompanying drawings are used to illustrate the principles of this application by way of example, but should not be used to limit the scope of this application, that is, this application is not limited to the described embodiments.
[0053] Please see Figure 1 , Figure 1 This is a flowchart of a CAN signal intelligent parsing method disclosed in an embodiment of this application.
[0054] This application provides a method for intelligent parsing of CAN signals, including the following steps:
[0055] Read the CAN message and CAN protocol, and parse the CAN message according to the CAN protocol, which is used to define signal mapping and parsing criteria.
[0056] The parsed CAN signal is verified, including verifying whether the CAN signal meets the requirements of the CAN protocol and evaluating the health indicators. Various data during the signal verification process are recorded to obtain the signal test results. The health indicators include at least two of the following: periodic consistency, missing detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values.
[0057] Read the preset test report template (using the existing business document format for report output), automatically match, fill in and annotate the test results according to the test report template, and generate a test report.
[0058] Based on health indicators and test reports, a verification result report is generated and displayed.
[0059] In this embodiment, automatic association and parsing of CAN messages and the CAN protocol can be completed without manual intervention, adapting to protocol changes and new signal anomalies, reducing manual configuration and maintenance costs. Simultaneously, it achieves quantitative evaluation of signal quality through multi-dimensional health indicators (at least two), breaking through the limitations of traditional single-signal verification, realizing comprehensive monitoring of CAN communication status, and enabling early identification of potential anomalies. It automatically matches test report templates, fills in data, and marks anomalies, replacing manual report writing, improving testing efficiency, avoiding human error, and the generated verification result report can intuitively display the parsing and verification status, facilitating rapid problem troubleshooting. In summary, this invention solves the core defects of traditional CAN signal parsing—"reliant on manual work, static parsing rules, and single verification"—and achieves full-process automation of CAN signal parsing, verification, report generation, and result display.
[0060] In this embodiment, based on the communication records of all ECUs uploaded by the vehicle, i.e. CAN messages, the cloud reads CAN messages, CAN protocol, function definition documents, and test report template documents and stores them in the cloud signal semantic library to achieve structured aggregation of multi-vehicle data.
[0061] In one possible embodiment, a CAN signal intelligent parsing method further includes: acquiring the target function to be analyzed and its corresponding function definition document, wherein the function definition document is used to define functional logic and verification rules; identifying key signals related to the target function from historical CAN signals based on the function definition document; performing predictive analysis on the target function based on the key signals; and outputting functional analysis results. A verification result report is also generated and displayed based on the functional analysis results. This application identifies signals related to the target function through the function definition document, establishing a correlation between signals and functions, and can perform specific predictions for specific functions (such as network management sleep analysis); simultaneously, the output functional analysis results are integrated into the verification result report, so that the parsing results not only include the health status of the signal itself, but also reflect the operating status of the vehicle function, providing support for functional fault diagnosis and potential risk prediction; furthermore, it expands the application scenarios of CAN signal parsing, upgrading from signal verification to integrated analysis of signal verification and functional prediction, adapting to the functional integration needs of new energy vehicles and intelligent connected vehicles. In summary, this invention overcomes the shortcomings of traditional solutions that can only verify the signal itself and cannot correlate functional logic, achieving a deep integration of CAN signal parsing and vehicle target function analysis.
[0062] In one possible embodiment, key signals related to the target function are identified from historical CAN signals according to a functional definition document, specifically including:
[0063] Based on the functional definition document, rules describing key signals are obtained, and a rule base is established. The target function to be analyzed is selected, and key signals related to the target function are identified from historical CAN signals according to the signal name rules and CAN data identification rules in the rule base. This application establishes a rule base through the functional definition document, standardizing the identification criteria for key signals and avoiding the subjectivity and errors of manual identification. The rule base automatically associates the target function with CAN signals, eliminating the need for manual matching and improving signal identification efficiency. Simultaneously, it ensures that the identified signals are highly correlated with the target function, providing a reliable data foundation for subsequent predictive analysis. In summary, this invention solves the problems of non-standardized and inefficient identification of function-related signals, ensuring the accuracy and repeatability of functional analysis.
[0064] In one possible embodiment, parsing CAN messages according to the CAN protocol specifically includes:
[0065] Based on the signal start bit and signal length defined in the CAN protocol, the byte range containing the corresponding signal in the CAN message is determined. The binary bits corresponding to the signal are extracted from this byte range. The extracted binary bits are combined into an unsigned integer according to the byte order specified in the CAN protocol. This unsigned integer is then converted into a signal value with corresponding physical meaning. This application solves the problems of ambiguous parsing logic and susceptibility to parsing errors in traditional parsing methods, ensuring the accuracy and standardization of CAN signal parsing.
[0066] In one possible embodiment, the method is implemented based on a vehicle-cloud collaborative architecture, which includes a vehicle and a cloud. The vehicle collects CAN messages and uploads them to the cloud. After receiving the CAN messages, the cloud performs CAN signal parsing, CAN signal verification, and test report generation. The vehicle is responsible for collecting and uploading CAN messages, while the cloud is responsible for the core parsing, CAN signal verification, and report generation, avoiding parsing delays caused by insufficient computing power on the vehicle. This breaks the one-way mode where the vehicle only collects messages and the cloud only stores them, laying the foundation for subsequent model training and iterative optimization. In summary, this invention solves the problem of disconnection and lack of collaboration between the vehicle and the cloud in traditional technologies, improving the real-time performance and scalability of CAN signal parsing.
[0067] In one possible embodiment, the method is implemented based on a vehicle-cloud collaborative architecture, which includes a vehicle-side component and a cloud-side component. The vehicle-side component collects CAN messages and uploads them to the cloud. After receiving the CAN messages, the cloud performs CAN signal parsing, CAN signal verification, test report generation, and functional analysis operations. In addition to handling the core parsing, CAN signal verification, and report generation, the cloud also performs functional analysis operations, enabling it to undertake core intelligent analysis tasks and fully leverage its computing power to handle complex functional predictive analysis. The vehicle-side component is only responsible for data collection and uploading, reducing hardware costs and computing power burden while ensuring the real-time performance and completeness of the data required for cloud analysis. This application achieves a closed loop of data collection and intelligent analysis under vehicle-cloud collaboration, adapting to the rapid iteration needs of intelligent connected vehicles.
[0068] In one possible embodiment, the cloud also performs the following: the predictive model used for functional analysis operations is distributed to the vehicle. This application addresses situations where the predictive model consumes relatively little memory or storage resources, but the vehicle has high requirements for response time. Distributing the predictive model to the vehicle enables autonomous real-time response from the vehicle, thus solving the problems of latency and inability to handle emergencies in timely cloud-based remote analysis.
[0069] In one possible embodiment, the vehicle receives a prediction model from the cloud, inputs locally collected signals into the prediction model, and outputs prediction analysis results through the prediction model. This application enables autonomous real-time response from the vehicle, solving the problems of latency in remote cloud analysis and the inability to handle emergencies in a timely manner.
[0070] In one possible embodiment, the cloud also performs the following: iterative optimization of the prediction model based on the CAN messages continuously uploaded by the vehicle. The cloud continuously updates the training data based on the CAN messages continuously uploaded by the vehicle, iteratively optimizing the prediction model to enable it to adapt to changes brought about by the vehicle's operating environment, protocol changes, and functional iterations. This solves the problem of traditional models being static and unable to adapt to changes in vehicle operating states, improving the accuracy and adaptability of the prediction model.
[0071] Please see Figure 2 , Figure 2 This is a block diagram of a CAN signal intelligent analysis system disclosed in an embodiment of this application.
[0072] This application provides a CAN signal intelligent parsing system, including a message protocol reading module 1, a signal verification module 2, a report generation module 3, and a result display module 4. The message protocol reading module 1 reads CAN messages and the CAN protocol, and parses the CAN messages according to the CAN protocol, which defines signal mapping and the basis for parsing. The signal verification module 2 verifies the parsed CAN signals, including verifying whether the CAN signals meet the requirements of the CAN protocol and evaluating health indicators, recording various data during the signal verification process, and obtaining signal test results. Health indicators include at least two of the following: periodic consistency, missing data detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and average values. The report generation module 3 reads a preset test report template, automatically matches, fills in, and annotates the test results according to the template, and generates a test report. The result display module 4 generates and displays a verification result report based on the health indicators and the test report.
[0073] This system automatically reads the CAN protocol and CAN messages, dynamically associates signal definitions and parsing rules, and adapts to protocol changes and new signal anomalies without manual intervention. It also supports custom alarm thresholds, significantly reducing manual configuration and maintenance costs. This application breaks through the limitations of traditional single-signal verification, quantitatively evaluating signal quality from multiple dimensions such as periodic consistency, value range compliance, bus load rate, and error frame statistics, achieving comprehensive monitoring of CAN communication status and early identification of potential anomalies. The introduction of the vehicle-cloud collaborative architecture breaks the traditional one-way mode of "vehicle only collects data, cloud only analyzes data," achieving dynamic collaboration between real-time vehicle response and intelligent cloud analysis, significantly improving the system's adaptability to new signal anomalies, protocol changes, and functional logic changes.
[0074] The following uses the vehicle-cloud collaborative architecture as an example to illustrate this application:
[0075] S1. The vehicle uploads CAN messages, reads the CAN messages and CAN protocol, and stores them in the cloud. The CAN protocol content to be read includes signal ID, signal name, physical unit, data type, value range, and transmission period. The CAN message content to be read includes timestamp, message ID, and raw data. The cloud parses the raw message data into signal values according to the CAN protocol standard and automatically associates them with the definitions in the CAN protocol, ensuring that subsequent analysis is based on the correct signal specifications.
[0076] For example, consider battery voltage:
[0077] A CAN signal is defined as follows:
[0078] Message ID: 0x123;
[0079] Signal name: BatteryVoltage;
[0080] Start bit: 3 (LSB 0, Intel format, i.e. little-endian mode);
[0081] Length: 12 bits;
[0082] Precision factor: 0.1 V / bit;
[0083] Offset: 0 V;
[0084] Unit: V;
[0085] Threshold range: 250-450;
[0086] Automatic association with the CAN protocol definition means parsing the original CAN message according to the above definition.
[0087] Example: Raw CAN message data (8 bytes): 0x12 0x34 0x56 0x78 0x9A 0xBC 0xDE0xF0 (hexadecimal)
[0088] Analysis steps:
[0089] To find the byte range of the CAN signal: Start bit + length (len) - 1 gives the end bit. For little-endian mode, the least significant byte is on the left; for big-endian mode, the least significant byte is on the right. Extract `len` consecutive bits from the data; combine the involved bytes in little-endian order into an integer (least significant byte on the right). If the byte spans multiple bytes, start from the start bit and sequentially extract bits to form an unsigned integer (raw); convert this to a signal value: signal value = raw × precision + offset.
[0090] For example, the extracted 12-bit original value is 1666. Applying the formula: 1666 × 0.1 + 0 = 166.6V, the signal value is 166.6V.
[0091] S2. The cloud verifies whether the parsed CAN signal (taking battery voltage as an example, the CAN signal is 166.6V) meets the protocol requirements by reading the CAN protocol definition from S1 (e.g., whether the physical unit, data type, and value range of the signal value meet the protocol requirements). Simultaneously, to suit the application scenario, it supports custom alarm thresholds (e.g., a fault tolerance mechanism that allows temporary out-of-range errors). For example, if the BatteryVolt signal suddenly changes to 200V (assuming the protocol specifies a maximum value of 150V), a verification failure is indicated, triggering an alarm.
[0092] S3. Cloud-based computing of CAN signal health indicators: periodic consistency, missing data detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values. Among these:
[0093] Periodic consistency: The consistency between the actual message period and the nominal period defined by the CAN protocol;
[0094] Missing signal detection: Count the number of unreceived signals and their temporal distribution;
[0095] Value range compliance: The proportion of abnormal signals that exceed the range specified in the protocol;
[0096] Bus load rate = (Number of valid data frame bytes / Frame interval time) × 100%;
[0097] Error frame statistics: Counted by error type (Cyclic Redundancy Check (CRC) error / bit error / Acknowledgement (ACK) error).
[0098] S4 reads the test report template from the cloud, inserts the signal test result table based on the test report template, dynamically fills in the test result data of S2, automatically marks abnormal signals (e.g., red highlights of out-of-limit values, yellow marks of near-threshold items), and generates a test report.
[0099] The cloud-based system performs specialized functional analysis based on the functional definition document: It reads the functional definition document, defines relevant signals (first by reading the functional definition document and using regular expressions to identify key signals related to the target function, clarifying the basic information of these signals (e.g., signal channel, status, physical range, sender, receiver, etc.)), and then judges the relevant signals according to the corresponding rules in the rule base. For the judged signals, a trained algorithm model is used for prediction. The trained prediction model can also be deployed to the vehicle for real-time inference.
[0100] For example, rules describing key signals are obtained from the functional definition document, and a rule base is established, specifically as follows:
[0101] The Python pandas data analysis library is used to read the function definition document; predefined information is identified using regular expressions; for example:
[0102] The regular expression (^|_)sub-net(_|$) is used to match and identify signal channel fields in the function definition document;
[0103] The regular expression (^|_)state(_|$) is used to match and identify the state field corresponding to the signal in the function definition document;
[0104] The regular expression (^|_)Physical Range(_|$) is used to match and identify the physical range or upper and lower limits of the signal in the function definition document;
[0105] The sender field of the signal is matched and identified using the regular expression (^|_)Sender(_|$);
[0106] The receiver field of the signal is matched and identified using the regular expression (^|_)Receiver(_|$).
[0107] in:
[0108] (^|_) is a capturing block that indicates the start of a string (^) or an underscore character (_).
[0109] (_|$) is another capturing group that indicates matching an underscore character (_) or the end of the string ($);
[0110] The remaining characters (such as sub-net, state, Physical Range, Sender, Receiver) are the keywords to be matched.
[0111] The above information is stored in a table according to each signal to obtain a rule base, which is then uploaded to a cloud database for easy access at any time.
[0112] Taking network management and analysis as the target function as an example, a prediction model for network node dormancy failure is constructed. The prediction model is constructed using a Long Short-Term Memory (LSTM) network model.
[0113] S4 and the cloud will summarize the health indicators of S3, the test reports of S4 and the functional analysis and display them in an HTML format verification result report.
[0114] The following example uses network management analysis to illustrate the implementation method of functional analysis. Network management analysis is used to examine the reasons for the non-sleeping behavior of all non-sleeping nodes and to predict the probability of subsequent node sleep failures.
[0115] The specific steps for constructing a predictive model for network node sleep failure are as follows:
[0116] 1. Extract multi-dimensional input features:
[0117] The following four types of features are extracted from vehicle operation data, bus data, and environmental data and used as input features for the LSTM model:
[0118] LSTM temporal sliding window features (temporal features): a total of 9 dimensions, including vehicle operating status, vehicle speed, gear, four-door status (4 paths), headlights, and tire pressure abnormality markers.
[0119] Static bus health characteristics: a total of 6 dimensions, including cycle consistency score, signal missing rate, value range compliance rate, average bus load, peak bus load, and total number of error frames.
[0120] Static signal statistical characteristics: a total of 6 dimensions, including maximum vehicle speed, minimum vehicle speed, average vehicle speed segments, maximum active duration, minimum active duration, and average active duration segments.
[0121] Static environmental characteristics: 3 dimensions in total, including ambient temperature, humidity, and weather category (after coding).
[0122] 2. Model Training and Construction:
[0123] The aforementioned multi-dimensional features are input into the LSTM model, and the model is trained using whether a network node has failed to sleep as a label. By learning the mapping relationship between temporal features (LSTM temporal sliding window features) and various static features and sleep failure, a trained network node sleep failure prediction model is obtained, which is used to predict the sleep failure of network nodes.
[0124] II. Detailed parameters of LSTM timing branches:
[0125] For the temporal sliding window features of LSTM, a temporal branch of LSTM is constructed to extract temporal depth features. Its specific structural parameters are as follows:
[0126] The input layer has the following shape: window length = 60, number of temporal features = 9, where the temporal features correspond to the aforementioned 9-dimensional LSTM temporal sliding window features, including vehicle operating status, vehicle speed, gear, four-door status (4-way), headlights, and abnormal tire pressure markers.
[0127] The first LSTM layer has 128 neurons, uses the tanh activation function, and adds layer normalization (LayerNorm) processing after this layer.
[0128] The second LSTM layer has 64 neurons, uses the tanh activation function, and sets the random dropout coefficient (Dropout) to 0.2 to prevent overfitting.
[0129] Temporal feature compression layer: The number of neurons is 32, the activation function is ReLU, and the Dropout is set to 0.15.
[0130] Temporal branch output: A 32-dimensional temporal feature vector, used for subsequent fusion with static features or directly for dormancy failure prediction.
[0131] III. Detailed Parameters of Static Feature Branches
[0132] 1. Input shape: Number of static features = 15; where the 15-dimensional static features are a summary of the aforementioned static bus health features (6-dimensional), static signal statistics features (6-dimensional), and static environment features (3-dimensional), ensuring that the source and definition of static features are consistent and unambiguous.
[0133] 2. First mapping layer: As the first core network layer for static feature extraction, this first layer has 24 neurons and uses the ReLU function for activation. It is used to perform nonlinear mapping and feature extraction on the 15-dimensional static features. At the same time, in order to improve the stability of model training and avoid feature distribution shift, a normalization layer is added after this mapping layer to normalize the output features.
[0134] 3. Second mapping layer: Further deepen static feature extraction and dimensionality reduction. The second mapping layer has 16 neurons and uses the ReLU function as the activation function. To avoid overfitting during model training, Dropout is set to 0.1.
[0135] 4. Static branch final output: Outputs a 16-dimensional static fusion vector.
[0136] IV. Detailed Parameters of Feature Fusion Layer
[0137] The feature fusion layer is used to fuse the output features of the LSTM temporal branch and the static feature branch. The detailed structure and parameters of the feature fusion layer are as follows:
[0138] First, the 32-dimensional temporal feature vector output from the LSTM temporal branch is concatenated with the 16-dimensional static fusion vector output from the static feature branch to obtain an initial fusion vector with a dimension of 48, which is used as the input to the feature fusion layer.
[0139] 1. First fusion layer: There are 32 neurons, and the activation function is ReLU, which is used to perform deep fusion and feature extraction on the 48-dimensional initial fusion vector. At the same time, in order to improve the model training stability and speed up the convergence, a normalization layer is added to normalize the output features, and Dropout is set to 0.15 to suppress overfitting.
[0140] 2. Second fusion layer: There are 16 neurons, the activation function is ReLU, and Dropout is set to 0.1 to further suppress overfitting, improve the generalization ability of the model, and output the optimized fusion feature vector.
[0141] V. Output Layer (Prediction of Sleep Failure Probability)
[0142] The output layer has one neuron, and the activation function is the sigmoid function. The sigmoid function maps the output to the range of 0 to 1. The closer the output value is to 1, the higher the probability of the network node failing to sleep; the closer the output value is to 0, the lower the probability of the network node failing to sleep, ultimately achieving accurate prediction of the probability of network node sleep failure.
[0143] VI. Prediction of Dormancy Events
[0144] (1) Extract the parameter definition rule base of the network management protocol related to the hibernation event, such as hibernation timeout = 300s.
[0145] (2) Extract key signals related to hibernation (such as vehicle operating status), then align the timestamps of the CAN messages with the vehicle hibernation event to identify non-hibernating nodes and their last active time. Using the hibernation event as the zero point, group all CAN messages within a certain period before and after it into the same event, and use the most recent CAN message to represent the node's active time.
[0146] (3) Associate other signals of the non-sleep node (such as door switch) and verify the rationality of wake-up according to the functional definition document (e.g., the controller needs to remain active when the vehicle is closed but the door is open). The rationality judgment comes from the functional definition document and varies depending on the situation.
[0147] (4) Based on the rationality verification in the previous step, the reasons for not sleeping are divided into reasonable wake-up (0) and abnormal wake-up (1), and the 0 and 1 datasets are organized (including message timestamps, other vehicle signal status, etc.).
[0148] (5) Perform time series analysis on all non-dormant events and calculate sliding window features for vehicle status signals (including key signals such as vehicle operating status, vehicle speed, gear, etc., and other signals such as door opening / closing, tire pressure monitoring, headlights, etc.) according to the node active timeline.
[0149] (6) Collect all historical non-sleep events, use 0 and 1 as labels, input sliding window features and health assessment features (mainly including: periodic consistency, missing signals and distribution, value range compliance, bus load rate, error frame statistics), related signal extreme values, mean segment statistics, and environmental data such as temperature, humidity, and weather from the cloud vehicle network platform as feature sets, and train the LSTM model to predict the probability of node sleep failure.
[0150] (7) The trained LSTM model is sent to the corresponding vehicle terminal. The vehicle terminal uses local real-time signal features to perform real-time inference of the probability of sleep failure. When the probability exceeds the threshold, the vehicle terminal actively sends a reminder to the vehicle owner or executes local policies (such as restricting unnecessary power consumption).
[0151] Cloud-based automated analysis replaces manual troubleshooting to pinpoint the cause of sleep failures, reducing the number of repeated tests and saving manpower. It is also responsible for training complex models and mining historical data. The vehicle is responsible for real-time inference and instant response to predict the probability of sleep failure, send reminders to the owner, reduce battery wear caused by sleep abnormalities, and extend the vehicle's driving range.
[0152] In this embodiment, a verification result report in HTML format is generated based on the cloud. The report is divided into a test report, a health status display, and a functional analysis display. The health status display mainly includes signal coverage, anomaly indicator distribution chart, and CAN bus load rate trend chart (supporting hourly / daily granularity). The functional analysis display mainly includes the rule base defined in the functional definition document, the accuracy rate of judgments based on the rules, and a description and prediction probability of the algorithm model trained based on the rules and signals of the rule base.
[0153] The examples are not limited to those described above. Those skilled in the art can make modifications or alterations based on the above description, and all such modifications and alterations should fall within the scope of protection of the appended claims. Those skilled in the art can understand that implementing all or part of the processes of the above embodiments and making equivalent changes according to the claims of this application still fall within the scope of this application.
Claims
1. A method for intelligent parsing of CAN signals, characterized in that, Includes the following steps: Read CAN messages and CAN protocol, and parse the CAN messages according to the CAN protocol, which is used to define signal mapping and parsing criteria; The parsed CAN signal is verified, including verifying whether the CAN signal meets the requirements of the CAN protocol and evaluating health indicators. Various data during the signal verification process are recorded to obtain the signal test results. The health indicators include at least two of the following: periodic consistency, missing detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values. Read the preset test report template, automatically match, fill in and anomaly mark the signal test results according to the test report template, and generate a test report; Based on the health indicators and the test report, a verification result report is generated and displayed.
2. The intelligent CAN signal parsing method according to claim 1, characterized in that, Also includes: Obtain the target function to be analyzed and its corresponding function definition document, which is used to define the function logic and verification rules; Based on the functional definition document, key signals related to the target function are identified from historical CAN signals, and the target function is predicted and analyzed based on the key signals, and the functional analysis results are output. The verification result report is also generated and displayed based on the functional analysis results.
3. The intelligent CAN signal parsing method according to claim 2, characterized in that, Based on the aforementioned function definition document, key signals related to the target function are identified from historical CAN signals, specifically including: Based on the functional definition document, rules describing key signals are obtained, and a rule base is established; Select the target function to be analyzed, and identify the key signals related to the target function from the historical CAN signals according to the signal name rules and CAN data identification rules in the rule base.
4. The intelligent CAN signal parsing method according to claim 1, characterized in that, Parsing the CAN message according to the CAN protocol specifically includes: Based on the signal start bit and signal length defined in the CAN protocol, determine the byte range of the corresponding signal in the CAN message; Extract the binary bits corresponding to the signal from the byte range; The extracted binary bits are combined into an unsigned integer according to the byte order specified in the CAN protocol; Convert the unsigned integer into a signal value with corresponding physical meaning.
5. The intelligent CAN signal parsing method according to claim 1, characterized in that: The method is implemented based on a vehicle-cloud collaborative architecture, which includes the vehicle end and the cloud end. The vehicle-mounted device collects the CAN messages and uploads them to the cloud. After receiving the CAN message, the cloud performs CAN signal parsing, CAN signal verification, and test report generation.
6. The intelligent CAN signal parsing method according to claim 2, characterized in that: The method is implemented based on a vehicle-cloud collaborative architecture, which includes the vehicle end and the cloud end. The vehicle-mounted device collects the CAN messages and uploads them to the cloud. After receiving the CAN message, the cloud performs CAN signal parsing, CAN signal verification, test report generation, and functional analysis operations.
7. The intelligent CAN signal parsing method according to claim 6, characterized in that: The cloud also performs the following: sending the predictive model used for the functional analysis operation to the vehicle.
8. The intelligent CAN signal parsing method according to claim 7, characterized in that: The vehicle receives the prediction model from the cloud, inputs locally collected signals into the prediction model, and outputs prediction analysis results through the prediction model.
9. The intelligent CAN signal parsing method according to claim 7, characterized in that: The cloud also performs the following: iterative optimization of the prediction model based on the CAN messages continuously uploaded by the vehicle.
10. A CAN signal intelligent analysis system, characterized in that, include: The message protocol reading module (1) is used to read CAN messages and CAN protocol, and parse the CAN messages according to the CAN protocol. The CAN protocol is used to define signal mapping and parsing basis. The signal verification module (2) is used to verify the parsed CAN signal, including verifying whether the CAN signal meets the requirements of the CAN protocol and evaluating the health index, recording various data in the signal verification process, and obtaining the signal test result; the health index includes at least two of the following: periodic consistency, missing detection, value range compliance, bus load rate, error frame statistics, and segmented statistics of signal extreme values and mean values; The report generation module (3) is used to read the preset test report template, automatically match, fill and anomaly mark the signal test results according to the test report template, and generate a test report; The results display module (4) is used to generate and display a verification result report based on the health index and the test report.