Intelligent automobile CAN bus communication signal analysis method and device
Through the intelligent automotive CAN bus communication signal analysis method, combined with CAN message data and on-board sensor data, the analysis of dynamic and static control signals and verification signals is realized, solving the problems of low resolution efficiency and difficult dynamic signals in the existing technology, and improving the analysis efficiency and accuracy.
Patent Information
- Application Number
- CN202411944475.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art requires manual participation when analyzing CAN bus communication signals, making it difficult to analyze dynamic signals, and the operation is cumbersome, which affects the analysis efficiency and accuracy.
The intelligent automobile CAN bus communication signal analysis method is adopted, and the CAN message data and vehicle sensor data are collected, preprocessed and synchronized comparison is performed, key signals are identified and extracted, converted into physical values, and communication verification signals are analyzed to realize the closed loop of message reception and transmission.
It realizes accurate analysis of dynamic and static control signals and calibration signals on the CAN bus, improves analysis efficiency and accuracy, reduces manual participation, and is suitable for a wider range of scenarios.
Smart Images

Figure CN119854391A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of automobile control, and in particular relates to a method and a device for analyzing CAN bus communication signals of an intelligent automobile. Background Art
[0002] With the rapid development of automotive electronic technology, the number of electronic control units (ECUs) inside cars continues to increase. These units communicate through the vehicle network to achieve vehicle control and management. Among the many vehicle network standards, the controller area network (CAN) bus is widely used in automotive electronic systems due to its high reliability and real-time performance. The CAN bus allows efficient and real-time data exchange between different ECUs, which is essential for vehicle performance optimization, fault diagnosis and safety control.
[0003] The analysis of CAN bus communication signals mainly depends on hardware interfaces and software decoding tools. The hardware interface is responsible for data transmission at the physical layer, while the software decoding tool is responsible for parsing this data and converting it into readable information.
[0004] The traditional method is to observe the information displayed on the instrument when performing manual operations, or to obtain diagnostic information through diagnostic instrumentation to compare with the messages collected by the CAN bus. The traditional method requires manual observation of the changing rules of message data during analysis, manual screening of target message IDs and key signals therein, and mainly analyzes discrete static signals that are easy to analyze, such as door switch status, light on / off control, and gear position signals, etc. It is difficult to analyze continuous dynamic signals with large data volumes, such as the distance and speed signals of the detected target in front.
[0005] In the prior art, the multi-channel analysis method of the CAN bus of electric vehicles (Zhang Yongsheng, Guan Jing, Yang Xinru, "Journal of Automotive Engineering", Vol. 7, No. 5, pp. 368-373) first analyzes the network structure and network nodes, then analyzes the basic attributes of the message, and preliminarily selects the key messages. Design specific test verification conditions, compare the CAN bus signal with the information collected from multiple channels such as the data acquisition system, the on-board diagnostic instrument, and the dashboard display value, and accelerate the signal analysis process by analyzing the correlation of data collected from different channels, and verify some of the analysis results.
[0006] The multi-channel parsing method of the CAN bus of electric vehicles requires manual selection of key messages during parsing, manual observation to find the data area that conforms to the change law of the signal to be parsed, and manual summary of the signal correlation analysis table to control the source, transmission path, signal characteristics and signal purpose of each key control signal. At the same time, the analysis results of a specific case are difficult to generalize to other cases. When facing different cases, manual observation, analysis and judgment based on actual conditions and personal experience are still required. This process has high technical requirements for operators, and the operation is cumbersome, requiring a lot of time and effort. Secondly, with the complexity of CAN communication inside new energy vehicles, the CAN data capacity on the bus is large, which further increases the cumbersomeness of the data area search work and the difficulty of real vehicle test operation, resulting in increased difficulty in parsing. In addition, this method may be affected by various factors during the parsing process, such as signal interference, data loss, etc., which may affect the accuracy and reliability of the parsing results to a certain extent.
[0007] In the prior art, Chinese patent CN102710656A discloses a communication protocol reverse parsing method based on an automobile gateway system, which uses a gateway system to receive a message signal from a control node in an automobile control network, processes its signal value, and sends the processed message signal to other network nodes. The core of this method is that the gateway system modifies the value of each byte in each message data field in turn, sends the modified message to the original target network node, and receives the diagnostic signal message of the on-board diagnostic system at the same time, and determines whether the automobile control network has an effective change according to the diagnostic message, or determines the specific physical meaning of the modified byte according to whether the automobile components have an action according to human observation.
[0008] CN102710656A uses a method similar to exhaustive enumeration to modify the message transmitted by the communication protocol at the byte or even bit level. Since this method needs to be bridged in the network node for online modification and analysis, and lacks reference to the past recorded message data, when processing certain complex combined control signals, it may require a large amount of computing resources and online time to solve. CN102710656A judges whether the control network has produced effective changes based on the diagnostic message and artificial observation of whether the automobile parts have produced actions. This method is difficult to apply to the analysis of control signals without relevant diagnostic messages or obvious control action changes, and this analysis method for discrete control signals is not suitable for the analysis of continuous dynamic control signals, and the range of information that can be analyzed is limited. In addition, CN102710656A sends the modified message to the original network node, and then observes whether the automobile control network has produced effective changes after the corresponding network node receives the message with modified bytes. However, there are often check bytes in important message data. For message data with check bytes, the data field needs to be re-checked after the data field is modified, and a new check byte is generated to cover the original check byte. CN102710656A does not consider the message data verification problem during the sending process, which may cause the modified sending data to be judged as failed verification after being received by the corresponding network node, and the corresponding network node does not produce effective control changes, resulting in parsing failure. These defects limit the application and promotion of CN102710656A in a wider range of scenarios. Summary of the invention
[0009] The present invention aims to provide a method and device for analyzing CAN bus communication signals of an intelligent vehicle, aiming at solving the technical problem that static signals that are easy to analyze need manual intervention, while dynamic signals are difficult to analyze.
[0010] In order to solve the above technical problems, the first aspect of the present invention provides a method for analyzing a CAN bus communication signal of an intelligent vehicle, the method comprising:
[0011] S1, collecting CAN message data and vehicle-mounted sensor data, analyzing the vehicle-mounted sensor data, and obtaining target data;
[0012] S2, preprocessing the CAN message data and the target data for synchronous comparison of the data;
[0013] S3, identifying and extracting a plurality of key signals in the CAN message data, wherein the key signals include control signals, synchronously comparing the target data with the key signals, and selecting the target signal from the plurality of key signals;
[0014] S4, converting the control signal in the target signal into a corresponding physical value.
[0015] Optionally, in the smart car CAN bus communication signal analysis method as described above, in step S1, a preset data acquisition tool is connected between the target ECU and the vehicle-side CAN bus, and CAN message data related to the target ECU is collected by means of a bridge relay.
[0016] Optionally, in the above-mentioned intelligent automobile CAN bus communication signal parsing method, in step S1, the vehicle-mounted sensor data comes from a plurality of vehicle-mounted sensors, and the vehicle-mounted sensors include at least one of one or more cameras, millimeter-wave radars, and inertial navigation sensors;
[0017] The target data includes at least one of the vehicle speed, the relative speed between the vehicle and the preceding vehicle, the vehicle distance, the acceleration, the pitch angle and the driving trajectory.
[0018] Optionally, in the above-mentioned intelligent automobile CAN bus communication signal parsing method, in step S2, the CAN message data and the target data are pre-processed, including time synchronization processing:
[0019] On the same time axis, the CAN message data and the target data are synchronized to obtain a corresponding relationship between the time of data collection and the actual running state of the vehicle.
[0020] Optionally, in the above-mentioned intelligent automobile CAN bus communication signal analysis method, in step S2, the CAN message data and the target data are preprocessed, and at least one of noise removal and data formatting is also included;
[0021] The noise removal process includes removing delayed or repeated data frames appearing in the CAN message data.
[0022] Optionally, in the above-mentioned intelligent automobile CAN bus communication signal analysis method, in step S3, the target data is synchronously compared with the key signal, and the target signal is screened out from the key signals, including:
[0023] Use one or a combination of preset signal recognition rules and artificial intelligence analysis methods to screen out the target signal from several key signals.
[0024] Optionally, in the smart car CAN bus communication signal parsing method as described above, the signal identification rule is based on at least one of the signal's message ID, data length, data format, and periodic characteristics of the signal.
[0025] Optionally, in the intelligent automobile CAN bus communication signal analysis method as described above, the artificial intelligence analysis method adopts a combination of at least one or more of correlation analysis, principal component analysis, cluster analysis and neural network.
[0026] Optionally, in the above-mentioned intelligent automobile CAN bus communication signal analysis method, in step S3, the key signal also includes a communication verification signal;
[0027] In step S4, when the communication verification signal exists in the message ID to which the target signal belongs, the specific bytes in the message ID are verified according to one or a combination of several candidate verification methods and artificial intelligence classification methods, and the target verification method and verification parameters are obtained. Therefore, when other signal data changes, a new verification byte is generated according to the target verification method and verification parameters to overwrite the original verification byte, and the correctly verified message data corresponding to the signal change is output.
[0028] Optionally, in the smart car CAN bus communication signal parsing method as described above, if the message data of the message ID contains message data that changes periodically within a preset range with a preset counter, the message data corresponding to the values of each counter are collected in turn for verification and validation, and the target verification method and verification parameters that change with the counter values are obtained.
[0029] Optionally, in the smart car CAN bus communication signal parsing method as described above, the candidate verification methods include at least one or more combinations of cyclic redundancy check (CRC), end-to-end (E2E) verification defined by the Automotive Open System Architecture (AutoSAR), and manufacturer-defined verification methods.
[0030] Optionally, in the intelligent automobile CAN bus communication signal analysis method as described above, the artificial intelligence classification method is a combination of at least one or more of a multi-layer perceptron (Multi Layer Perception, MLP) and a support vector machine (Support Vector Machine, SVM).
[0031] Optionally, in the smart car CAN bus communication signal parsing method as described above, the smart car CAN bus communication signal parsing method further includes:
[0032] S5, displaying the physical quantity value as analyzed signal data.
[0033] Optionally, in the smart car CAN bus communication signal analysis method as described above, in step S5, the signal data is displayed in the form of graphics or charts, and user-defined display parameters and display types are received through a preset user interaction interface.
[0034] Optionally, in the smart car CAN bus communication signal parsing method as described above, in step S5, the signal data is compared with historical signal data, the real-time change trend of the signal data is analyzed, and the signal data is compared with a preset signal range to obtain a signal difference value. Based on the analysis of the signal difference value and the prediction of the real-time change trend, it is identified whether the signal data is an abnormal signal. If it is an abnormal signal, a corresponding action is triggered.
[0035] In order to solve the above technical problems, the second aspect of the present invention provides a smart car CAN bus communication signal parsing device, the smart car CAN bus communication signal parsing device comprising:
[0036] Data acquisition tool, used to collect CAN message data;
[0037] A sensor data collection and analysis module is used to collect vehicle-mounted sensor data, analyze the vehicle-mounted sensor data, and obtain target data;
[0038] A preprocessing module, used for preprocessing the CAN message data and the target data for synchronous comparison of the data;
[0039] A target signal identification module is used to identify and extract several key signals in the CAN message data, wherein the key signals include control signals, synchronously compare the target data with the key signals, and select the target signal from the key signals;
[0040] The decoding signal module is used to convert the control signal in the target signal into a corresponding physical quantity value.
[0041] The positive and progressive effects of the present invention are:
[0042] 1. The present invention can parse key signals on the CAN bus, including dynamic and static control signals, and verification signals, realize message receiving and sending closed loop and corresponding business logic processing link, provide accurate data support for real-time monitoring and fault diagnosis of vehicles, provide basis for vehicle performance optimization and maintenance decision-making, thereby improving the operation efficiency and safety of vehicles, and has good practical value and market application prospects.
[0043] 2. The present invention solves the problem of low signal analysis efficiency in traditional CAN communication signal analysis systems due to the need for manual observation of data patterns to identify target signals.
[0044] 3. The present invention solves the problem of lack of analyzable information in the traditional CAN communication signal analysis system because the system fails to obtain surrounding perception information and vehicle operation status information by combining the data of vehicle-mounted sensors such as cameras and inertial measurement units.
[0045] 4. The present invention solves the problem that the traditional CAN communication signal analysis system is difficult to achieve a closed loop between receiving and sending messages due to the failure to perform communication verification signal analysis.
[0046] 5. The present invention integrates the data synchronization comparison strategy of multi-source vehicle sensor data and CAN bus communication signals. When performing synchronization comparison, it is preferred to combine artificial intelligence analysis methods such as signal recognition rules, correlation analysis and neural network technology. The present invention also considers the diversity of verification methods, periodic verification analysis and verification methods, and performs corresponding processing. Through the above strategies, an excellent closed loop of message transmission and reception and business logic processing are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The disclosure of the present invention will become more apparent with reference to the accompanying drawings. It should be understood that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. In the drawings:
[0048] Figure 1 A schematic diagram of a process of the method of the present invention;
[0049] Figure 2 A schematic diagram of an application of the device of the present invention;
[0050] Figure 3 This is a diagram of an analysis process for analyzing vehicle-mounted sensor data in Example 1 of the present invention;
[0051] Figure 4 This is a comparison result diagram of the synchronous comparison between the target data and the key signal in Example 1 of the present invention;
[0052] Figure 5 This is a diagram of the feature extraction process of the multi-layer perceptron in Embodiment 1 of the present invention;
[0053] Figure 6 This is a process diagram for analyzing the communication verification signal in Example 1 of the present invention. DETAILED DESCRIPTION
[0054] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.
[0055] It should be noted that the following embodiments and features therein may be combined with each other if there is no conflict.
[0056] In the description of the present invention, it should be noted that directional words such as the terms "outside", "middle", "inside", "outside", etc., which indicate directions and positional relationships, are based on the directions or positional relationships shown in the drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and cannot be understood as limiting the specific protection scope of the present invention.
[0057] In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features. Therefore, the definition of "first" and "second" features can explicitly or implicitly include one or more of the features. In the description of the present invention, "several" and "a number" mean two or more, unless otherwise clearly and specifically defined.
[0058] The embodiment of the present invention provides a method for analyzing the communication signal of the CAN bus of an intelligent vehicle, and the method for analyzing the communication signal of the CAN bus of an intelligent vehicle realizes accurate and rapid analysis of the communication signal of the CAN bus. Figure 1 The intelligent vehicle CAN bus communication signal analysis method includes the following specific steps:
[0059] S1, collects CAN message data and vehicle sensor data, analyzes the vehicle sensor data, and obtains target data.
[0060] In this step, CAN message data comes from the target ECU and the vehicle-side CAN bus, and the CAN message data is classified into send data and receive data. These data usually contain multiple message IDs, each message ID contains multiple signal fields, and each field corresponds to a specific vehicle control signal or communication verification signal. Generally, the communication verification signal is 8-bit data, and the first byte of the message ID is the 8-bit communication verification signal.
[0061] In this step, the vehicle sensor data refers to a number of vehicle sensors pre-arranged on the vehicle, which collect driving vehicle status and driving scene data. When analyzing the vehicle sensor data, different existing analysis methods can be used according to different sensors to obtain corresponding environmental perception and vehicle status data.
[0062] In this step, while collecting CAN message data, the vehicle status and driving scene data are collected using the vehicle-mounted sensor as the vehicle-mounted sensor data.
[0063] In some embodiments, in step S1, when collecting CAN message data, a CAN bus data collection tool, that is, a data collection tool, is used to collect CAN message data during vehicle operation. Specifically, the data collection tool is connected between the target ECU and the vehicle-side CAN bus, and the CAN message data related to the target ECU is collected by bridge relay.
[0064] In some embodiments, in step S1, the vehicle sensor data comes from a plurality of vehicle sensors, and the vehicle sensors include at least one of one or more cameras, millimeter wave radars, and inertial navigation sensors. The target data includes at least one of the vehicle speed, the relative speed between the vehicle and the preceding vehicle, the vehicle distance, the acceleration, the pitch angle, and the vehicle trajectory.
[0065] In this embodiment, there are usually several on-board sensors. When analyzing the sensor data corresponding to the several on-board sensors, the corresponding environment perception and vehicle status data can be obtained by fusing multiple sensor data according to the key signals to be analyzed later. The environment perception and vehicle status data are also target data. The methods for fusing multiple sensor data include but are not limited to Kalman filtering and Bayesian estimation.
[0066] S2, preprocessing: preprocess the CAN message data and target data for synchronous comparison of the data.
[0067] Since the subsequent steps require synchronous comparison of the key signals in the CAN message data with the target data, this step requires preprocessing of the two types of data in advance to ensure the accuracy and consistency of the synchronous comparison of the two types of data.
[0068] The method for preprocessing the two types of data can adopt the data processing method used for data synchronization comparison in the prior art.
[0069] In some embodiments, in step S2, the CAN message data and the target data are preprocessed, including noise removal, time synchronization and data formatting, which at least includes time synchronization, and preferably also includes at least one of noise removal and data formatting.
[0070] Time synchronization processing includes time synchronization of CAN message data and target data under the same time axis to obtain the corresponding relationship between the time of data collection and the actual operating status of the vehicle.
[0071] The noise removal process includes removing delayed or repeated data frames appearing in the CAN message data, thereby ensuring the continuity of the CAN message data used subsequently between different frames.
[0072] S3, identifying target signals: identifying and extracting several key signals in the CAN message data, the key signals including control signals, synchronously comparing the target data with the key signals, and selecting the target signal from the several key signals.
[0073] CAN message data usually contains multiple signal fields, which are key signals. In this step, the existing message data identification and extraction methods can be used to analyze the CAN message data and extract several key signals. For example, the signal identification rules corresponding to the message data can be used to identify and extract the CAN message data. The signal identification rules are based on the message ID, data length, data format and periodic characteristics of the signal.
[0074] In some embodiments, in step S3, the target data is synchronously compared with the key signal, and the target signal is screened out from a number of key signals, including: using one or a combination of preset signal recognition rules and artificial intelligence analysis methods to screen out the target signal from a number of key signals.
[0075] In this embodiment, a preset signal recognition rule and / or artificial intelligence analysis method can be used for synchronous comparison to filter out the target signal of interest from a large amount of message data. Preferably, an artificial intelligence analysis method or an artificial intelligence analysis method combined with a signal recognition rule is used for synchronous comparison.
[0076] The signal identification rule is preferably based on at least one of the message ID, data length, data format and periodic characteristics of the signal.
[0077] The artificial intelligence analysis method preferably adopts a combination of at least one or more of correlation analysis, principal component analysis, cluster analysis and neural network.
[0078] In some embodiments, the artificial intelligence analysis method uses a correlation analysis method to calculate the correlation between the target data and the key signal through the Pearson correlation coefficient in the correlation analysis method. The calculation formula is as follows:
[0079]
[0080] Among them, x i and i Represent the i-th observation value of the target data and the CAN message data, respectively. and They represent the means of the two respectively, and n is the number of observations.
[0081] The Pearson correlation coefficient can help us understand the strength of the relationship between variables, and thus guide decision-making and research. Specifically, through the above calculation formula, we can get the strength of the relationship between two variables, and thus determine the correlation between them. For example, if the calculated correlation coefficient is close to 1 or -1, it can be considered that there is a strong relationship between the two variables; if the correlation coefficient is close to 0, it can be considered that there is no relationship between the two variables.
[0082] By presetting the corresponding relationship threshold, the Pearson correlation coefficient is used to screen out the key signal whose correlation coefficient between the target data and the key signal is greater than the relationship threshold as the target signal.
[0083] Of course, the synchronization comparison between the target data and the key signal is not limited to using the Pearson correlation coefficient.
[0084] S4, decoding signal: converting the control signal in the target signal into the corresponding physical value.
[0085] For the identified control signal, the hexadecimal signal value in the CAN message data is converted into the corresponding physical quantity value.
[0086] The conversion method is, for example, to multiply the hexadecimal signal value by the scaling factor obtained by analysis, add the offset value obtained by analysis, and finally perform a hexadecimal to decimal conversion to obtain the corresponding physical quantity value.
[0087] When the CAN message data collected on the CAN bus is identified and extracted, the message information including message meaning, message ID, data length and data format can be obtained. It also includes the information of each signal field contained in the message, including signal meaning, start bit, length, sorting format, whether there is a sign, scaling factor, offset value, minimum value, maximum value, unit, sending node and other information.
[0088] Therefore, the hexadecimal signal value can be first adjusted and then converted into decimal using the two pieces of information, the scaling factor and the offset value.
[0089] In some embodiments, in step S3, the critical signal also includes a communication verification signal.
[0090] Reference Figure 1 In step S4, when there is a communication verification signal in the message ID to which the target signal belongs, the specific bytes in the message ID are verified according to one or a combination of several candidate verification methods and artificial intelligence classification methods, and the target verification method and verification parameters are obtained. Therefore, when other signal data changes, a new verification byte is generated according to the target verification method and verification parameters to overwrite the original verification byte, and the correctly verified message data corresponding to the signal change is output.
[0091] The present invention not only parses the control signal, but also parses the communication verification signal, realizes the closed loop of message reception and transmission and the corresponding business logic processing link, provides accurate data support for real-time monitoring and fault diagnosis of the vehicle, provides a basis for vehicle performance optimization and maintenance decision-making, thereby improving the operation efficiency and safety of the vehicle, and has good practical value and market application prospects.
[0092] Taking into account the diversity of verification methods, this embodiment identifies several candidate verification methods to determine the verification method and verification parameters corresponding to the message ID. After obtaining the correct verification method, the message ID is modified to output correctly verified message data, thereby realizing the analysis closed-loop process of receiving data-analyzing data-modifying data-sending data.
[0093] When identifying the verification method, this embodiment adopts one or a combination of several candidate verification methods and artificial intelligence classification methods, and preferably adopts an artificial intelligence classification method or a combination of an artificial intelligence classification method and several candidate verification methods to determine the target verification method and verification parameters from a large number of candidate verification methods.
[0094] When verifying the target verification method, the message data with changes in the data field can be used to verify the identified target verification method and verification parameters to ensure the accuracy of the analysis results, that is, the data field and the plaintext bytes are combined and input into the verification formula to calculate the verification value. The verification value is compared with the communication verification signal. If they are consistent, the verification method is correct. The verification method and the corresponding verification parameters are the target verification method and verification parameters. If they are inconsistent, the error data can be recorded, and the verification analysis step can be returned to adjust the verification method and other processing measures.
[0095] Among them, the candidate verification methods preferably include at least one or more combinations of cyclic redundancy check (CRC), end-to-end (E2E) verification defined by Automotive Open System Architecture (AutoSAR), and manufacturer-defined verification methods.
[0096] The artificial intelligence classification method is preferably a combination of at least one or more of a multi-layer perceptron (MLP) and a support vector machine (SVM).
[0097] In some embodiments, if the message data of the message ID contains message data that changes periodically within a preset range with a preset counter, the message data corresponding to each counter value is collected in turn for verification and validation to obtain a target verification method and verification parameters that change with the counter value.
[0098] This embodiment takes into account the periodic change of the verification method, and at this time adopts the method of collecting the message data corresponding to a certain counter value to perform verification and validation.
[0099] For example, for message data with counters that change periodically within the range of 0 to 15, collect all message data with counter values of 1 under the target message ID, and verify the specific bytes in the collected message data according to one or a combination of several candidate verification methods and artificial intelligence classification methods to obtain the target verification method and verification parameters. Perform the verification analysis steps for other counter values from 0 to 15 in turn to obtain the target verification methods and verification parameters corresponding to different counter values.
[0100] In some embodiments, the intelligent vehicle CAN bus communication signal analysis method of the present invention further includes:
[0101] S5, signal post-processing: display the physical quantity value as parsed signal data.
[0102] Step S5 implements the signal visualization function.
[0103] In some embodiments, in step S5, the signal data is displayed in the form of a graph or a chart, and user-defined display parameters and display types are received through a preset user interaction interface.
[0104] The analyzed signal data is displayed in the form of graphs or charts to intuitively understand and analyze the changing state of the physical value corresponding to the signal.
[0105] The user interface can be used to customize display parameters and chart types to suit different analysis needs.
[0106] In some embodiments, in step S5, the signal data is compared with the historical signal data, the real-time change trend of the signal data is analyzed, and the signal data is compared with the preset signal range to obtain a signal difference value. Based on the analysis of the signal difference value and the prediction of the real-time change trend, it is identified whether the signal data is an abnormal signal. If it is an abnormal signal, the corresponding action is triggered.
[0107] This embodiment also analyzes the real-time change trend of the signal data and compares it with the expected signal range, identifies abnormal signals through statistical analysis and trend prediction, and triggers corresponding alarms or control actions.
[0108] In this embodiment, the real-time change trend of the signal data can be extracted and analyzed by at least one time series analysis technique such as moving average method, exponential smoothing method and time series decomposition. The distribution characteristics and significance of the signal difference values can be evaluated by performing descriptive statistics (such as mean, standard deviation, maximum value, minimum value, etc.) and inferential statistics (such as hypothesis testing, variance analysis, etc.) on the signal difference values. At least one judgment method such as threshold judgment, statistical judgment and machine learning is combined to identify whether the signal data is an abnormal signal.
[0109] The embodiment of the present invention further provides a smart car CAN bus communication signal parsing device, the smart car CAN bus communication signal parsing device comprising:
[0110] Data acquisition tool, used to collect CAN message data;
[0111] The sensor data acquisition and analysis module is used to collect and analyze vehicle-mounted sensor data to obtain target data;
[0112] A preprocessing module is used to preprocess the CAN message data and target data for synchronous comparison of the data;
[0113] The target signal identification module is used to identify and extract several key signals in the CAN message data. The key signals include control signals, and the target data is synchronously compared with the key signals to filter out the target signal from the key signals.
[0114] The decoding signal module is used to convert the control signal in the target signal into a corresponding physical value.
[0115] Reference Figure 2 The device of the present invention is added to a system having a smart car, multiple vehicle-mounted sensors, a target ECU to which a target signal belongs, and a CAN bus. The device of the present invention respectively collects CAN message data and vehicle-mounted sensor signals and performs analysis.
[0116] In some embodiments, the data acquisition tool is used to connect between the target ECU and the vehicle-side CAN bus, and collect CAN message data related to the target ECU through a bridge relay.
[0117] In some embodiments, the intelligent vehicle CAN bus communication signal analysis device further includes:
[0118] The signal post-processing module is used to display the physical quantity value as parsed signal data.
[0119] Embodiment 1:
[0120] Taking the analysis of radar sensor signals on the vehicle CAN bus as an example, the effectiveness and accuracy of the intelligent vehicle CAN bus communication signal analysis method and device proposed in the present invention are explained.
[0121] CAN bus data acquisition tool between the ECU and CAN bus to which the radar sensor signal belongs. Cameras are arranged in all directions of the test vehicle, including the front, left front, right front, left rear, right rear, and rear. Each camera is calibrated separately, specifically to measure the installation information of each camera on the vehicle, such as the height of each camera from the ground, the pitch angle, and the relative position of each camera. Each camera is used to take a set of pictures of a chessboard drawing at 9 different angles, and imported into Matlab for calibration calculation. Inertial navigation sensors and external antennas are arranged on the central axis of the test vehicle, and corresponding calibration correction operations are performed. The test vehicle is driven on the test section, and the CAN message data and vehicle-mounted sensor data are recorded at the same time. Various working conditions are covered during driving to achieve various changes in data, which is convenient for subsequent offline analysis.
[0122] After data recording, the CAN message data and vehicle sensor data are exported for offline analysis. By performing image processing on the camera data, the distance between the vehicle and the surrounding vehicles and the relative speed are obtained. Figure 3 As shown in the figure, a computer vision multi-target tracking algorithm is used to input a video sequence, and the YOLOv8 algorithm is used for target detection. The target motion state is estimated through Kalman filtering, and the Hungarian algorithm is used to form the front-to-back matching relationship of the target in different time series to achieve target tracking, thereby outputting the detected target and motion information, and obtaining the corresponding vehicle distance and relative speed. Using the inertial navigation sensor data, the vehicle's driving acceleration, speed, pitch angle, and driving trajectory information are calculated and obtained as target data.
[0123] The collected CAN message data and the target data obtained by analyzing and converting the on-board sensor data are fused and preprocessed, including noise removal, time synchronization and data formatting, to ensure the accuracy and consistency of the fusion of the two data.
[0124] Combining the signal recognition rules preset in the database with artificial intelligence analysis methods such as correlation analysis, principal component analysis, cluster analysis or neural networks, the target signals of interest are screened out from a large amount of message data, and the target signal values are converted into physical quantities.
[0125] Figure 4 The following is a comparison chart of the relative distance signal recognition results obtained according to the above steps. Specifically, three vehicles appear in front of the vehicle one after another. The relative distance between the vehicle and the front vehicle at different times is extracted through the video, and the CAN message data corresponding to the same period is calculated through correlation analysis. The recognition effect is shown in Figure 2. Figure 4It can be seen that the vehicle sensor data and the CAN message data have a high degree of similarity, that is, the signal is a relative distance signal.
[0126] The message ID to which the relative distance signal belongs contains a communication verification signal, so the communication verification signal is analyzed. Figure 5 , a multi-layer perceptron is used to extract features from the input signal (i.e., the message data under the message ID). Considering that the signal verification process is actually a combination of bitwise operations on the specified bits, the input signal and its corresponding check code (i.e., communication check signal) are first converted from hexadecimal to binary representation, and each is used as the input and label of the multi-layer perceptron, and the data set is divided into a training set and a test set at a ratio of 7:3. In terms of model design, it can be divided into six parts: input layer, hidden layer, output layer, loss function, optimizer, and regularization method. The number of neurons in the input layer is set to 40, corresponding to the number of bits after the input signal is converted to binary representation; the hidden layer has two layers, namely hidden layer one and hidden layer two. The number of neurons in hidden layer one is 160, and the number of neurons in hidden layer two is 320. The activation function is ReLU. At the same time, in order to avoid overfitting of the model, a Dropout layer is added between hidden layer one and hidden layer two, and its value is set to 0.2; the number of neurons in the output layer is 8, corresponding to the number of bits after the check code is converted to binary representation; since the decoding process is regarded as a multi-classification task, the loss function adopts binary cross entropy loss, as shown in the following formula:
[0127]
[0128] Among them, y is a binary label 0 or 1, p(y) is the probability that the output belongs to the label, and N represents the number of groups of objects predicted by the model; the optimizer is Adam; the regularization method is L2 regularization, and the corresponding weight decay coefficient is 1e-3.
[0129] According to the preliminary feature extraction results of the multi-layer perceptron, the optional applicable verification method is matched.
[0130] For the message data of counters with periodic changes in the range of 0 to 15, collect the message data of a certain counter value in turn for verification test, and parse out the verification method that changes with the counter value. For example, collect the message data when all counter values under the target message ID are 1, set the selectable value range of parameters such as polynomial, initial value, input inversion, output inversion, and result XOR respectively according to the E2E verification mode, and solve the plaintext bytes corresponding to the CRC check when the counter value is 1. Perform the verification and analysis steps for other counter values from 0 to 15 in turn to obtain the plaintext bytes corresponding to different counter values.
[0131] Reference Figure 6For example, for the message data with a counter value of 0, the identified verification method is verified using the message data with a changed data field to ensure the accuracy of the parsing result, that is, the data field is combined with the plaintext bytes and input into the verification formula corresponding to the target verification method to calculate the verification value. Through the above steps, the calculated verification signal is consistent with the communication verification signal recorded in the corresponding collected data, indicating that the verification method is parsed correctly, so that the correctly verified message data can be output according to other signal modification requirements, realizing the closed-loop parsing process of receiving data-parsing data-modifying data-sending data.
[0132] Through the above steps, the present invention can parse key signals on the CAN bus, including dynamic and static control signals, and communication verification signals, realize a closed loop of message reception and transmission and a corresponding business logic processing link, provide accurate data support for real-time monitoring and fault diagnosis of vehicles, provide a basis for vehicle performance optimization and maintenance decisions, and thus improve the operating efficiency and safety of the vehicle, and has good practical value and market application prospects.
[0133] The present invention is described in detail above in conjunction with the embodiments of the accompanying drawings. A person skilled in the art can make various variations of the present invention according to the above description. Therefore, some details in the embodiments should not be construed as limiting the present invention, and the present invention shall be protected by the scope defined by the attached claims.
Claims
1. A method for analyzing CAN bus communication signals of an intelligent vehicle, characterized in that: The intelligent automobile CAN bus communication signal analysis method comprises: S1, collecting CAN message data and vehicle-mounted sensor data, analyzing the vehicle-mounted sensor data, and obtaining target data; S2, preprocessing the CAN message data and the target data for synchronous comparison of the data; S3, identifying and extracting a plurality of key signals in the CAN message data, wherein the key signals include control signals, synchronously comparing the target data with the key signals, and selecting the target signal from the plurality of key signals; S4, converting the control signal in the target signal into a corresponding physical value.
2. The intelligent vehicle CAN bus communication signal analysis method according to claim 1, characterized in that: In step S1, a preset data acquisition tool is connected between the target ECU and the vehicle-side CAN bus, and CAN message data related to the target ECU is collected by means of a bridge relay; In step S1, the vehicle-mounted sensor data comes from a plurality of vehicle-mounted sensors, and the vehicle-mounted sensors include at least one of one or more cameras, millimeter-wave radars, and inertial navigation sensors; The target data includes at least one of the vehicle speed, the relative speed between the vehicle and the preceding vehicle, the vehicle distance, the acceleration, the pitch angle and the driving trajectory.
3. The intelligent vehicle CAN bus communication signal analysis method according to claim 1, characterized in that: In step S2, the CAN message data and the target data are preprocessed, including at least one of time synchronization processing, noise removal and data formatting; Among them, the time synchronization processing includes time synchronization of the CAN message data and the target data under the same time axis to obtain the correspondence between the time of data collection and the actual operating status of the vehicle; the noise removal processing includes removing delayed or repeated data frames appearing in the CAN message data.
4. The intelligent vehicle CAN bus communication signal analysis method according to claim 1, characterized in that: In step S3, the target data is synchronously compared with the key signal, and the target signal is screened out from the key signals, including: Use one or a combination of preset signal recognition rules and artificial intelligence analysis methods to screen out the target signal from several key signals.
5. The intelligent vehicle CAN bus communication signal analysis method according to any one of claims 1 to 4, characterized in that: In step S3, the key signal also includes a communication verification signal; In step S4, when the communication verification signal exists in the message ID to which the target signal belongs, the specific bytes in the message ID are verified according to one or a combination of several candidate verification methods and artificial intelligence classification methods, and the target verification method and verification parameters are obtained. Therefore, when other signal data changes, a new verification byte is generated according to the target verification method and verification parameters to overwrite the original verification byte, and the correctly verified message data corresponding to the signal change is output.
6. The intelligent vehicle CAN bus communication signal analysis method according to claim 5, characterized in that: If the message data of the message ID contains message data that changes periodically within a preset range with a preset counter, the message data corresponding to the values of each counter are collected in turn for verification and validation to obtain a target verification method and verification parameters that change with the counter values.
7. The intelligent vehicle CAN bus communication signal analysis method according to claim 1, characterized in that: The intelligent vehicle CAN bus communication signal analysis method further includes: S5, displaying the physical quantity value as analyzed signal data.
8. The intelligent vehicle CAN bus communication signal analysis method according to claim 7, characterized in that: In step S5, the signal data is displayed in the form of a graph or a chart, and user-defined display parameters and display types are received through a preset user interaction interface.
9. The intelligent vehicle CAN bus communication signal analysis method according to claim 7, characterized in that: In step S5, the signal data is compared with historical signal data, the real-time change trend of the signal data is analyzed, and the signal data is compared with a preset signal range to obtain a signal difference value. Based on the analysis of the signal difference value and the prediction of the real-time change trend, it is identified whether the signal data is an abnormal signal. If it is an abnormal signal, the corresponding action is triggered.
10. A smart car CAN bus communication signal analysis device, characterized in that: The intelligent automobile CAN bus communication signal parsing device comprises: Data acquisition tool, used to collect CAN message data; A sensor data acquisition and analysis module is used to acquire vehicle-mounted sensor data, analyze the vehicle-mounted sensor data, and obtain target data; A preprocessing module, used for preprocessing the CAN message data and the target data for synchronous comparison of the data; A target signal identification module is used to identify and extract several key signals in the CAN message data, wherein the key signals include control signals, synchronously compare the target data with the key signals, and select the target signal from the key signals; The decoding signal module is used to convert the control signal in the target signal into a corresponding physical quantity value.
Citation Information
Patent Citations
Communication protocol inverse analysis method based on automotive gateway system
CN102710656A
Cited By
Method, system and equipment for analyzing and comparing CAN (Controller Area Network) bus data in automobile field
CN120238594A
Automobile control method and device, computer equipment and storage medium
CN121050412A