Method, system and device for analyzing and comparing CAN bus data in the automotive field

By analyzing and comparing the automotive CAN bus data, effective signals are extracted and screened, solving the problem of difficult comparison between multiplexed frame signals and temperature signals, achieving efficient and accurate data analysis, and supporting fault diagnosis, performance optimization and customization functions.

CN120238594BActive Publication Date: 2025-09-16AUTOMOTIVE DATA OF CHINA (TIANJIN) CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510715635.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-16
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

In the automotive field, special data types such as multiplexed frame signals, temperature signals, and concurrent signals have large data volumes and long change cycles, making them difficult to visually observe and compare in a short period of time. This increases the complexity and workload of CAN bus data analysis.

Method used

A method for parsing and comparing CAN bus data in the automotive field is provided. By acquiring vehicle CAN bus data and diagnostic signals, the data messages of the multiplexed frame signal, the split frame signal, and the temperature frame signal are extracted. The signal data messages are used for binary expansion and splicing. Parameters such as the similarity threshold, linear correlation coefficient, and offset are set to screen out valid comparison signals. Time alignment and comparison screening are then performed to obtain the target valid signal.

Benefits of technology

It improves the processing efficiency and accuracy of CAN bus data, can quickly extract key information from massive data, accurately analyze concurrent signals, and improve the efficiency and accuracy of data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238594B_ABST
    Figure CN120238594B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, and device for parsing and comparing CAN bus data in the automotive field, relating to the field of data processing technology. The method comprises: obtaining vehicle CAN bus data and diagnostic signals; determining a multiplexed frame or split frame signal as a first signal, and extracting a data message of the first signal; extracting a data message of a temperature frame signal based on the diagnostic signal; utilizing a first extraction process to extract multiple valid comparison signals based on the data message of the first signal; utilizing a second extraction process to extract multiple valid comparison signals based on the data message of the temperature frame signal; utilizing a reference signal corresponding to the second signal to compare and screen each valid comparison signal in a standardized comparison signal set corresponding to the second signal, obtaining a target valid signal corresponding to the second signal, and broadcasting the target valid signal corresponding to the second signal. The present application improves the processing efficiency and accuracy of CAN bus data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, system and device for parsing and comparing CAN bus data in the automotive field. Background Art

[0002] Analyzing CAN bus data in the automotive industry often presents numerous challenges. Special data types such as multiplexed frame signals, temperature signals, and concurrent signals are particularly challenging. These signals are either extremely large in volume or have long changing cycles, making them difficult to visually observe and compare in a short period of time. This makes it extremely difficult to accurately locate target signals within this massive amount of data, significantly increasing the complexity and workload of CAN bus data analysis in the automotive industry.

[0003] In order to solve this problem, there is an urgent need to develop a method specifically for analyzing and comparing automotive CAN bus data to provide strong support for fault diagnosis, performance optimization and function development of automotive electronic systems. Summary of the Invention

[0004] The purpose of this application is to provide a method, system and device for parsing and comparing CAN bus data in the automotive field, so as to improve the processing efficiency and accuracy of CAN bus data.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for parsing and comparing CAN bus data in the automotive field, the method comprising:

[0007] Acquire vehicle CAN bus data and diagnostic signals; vehicle CAN bus data includes: data message of target signal; target signal is multiplexed frame signal, split frame signal or temperature frame signal;

[0008] Determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data;

[0009] Based on the diagnostic signal, the data message of the temperature frame signal is extracted from the vehicle CAN bus data;

[0010] Extracting a plurality of valid comparison signals corresponding to the first signal based on the data message of the first signal using a first extraction process;

[0011] Utilizing the second extraction process, based on the data message of the temperature frame signal, extracting a plurality of valid comparison signals corresponding to the temperature frame signal;

[0012] determining the first signal or the temperature frame signal as the second signal;

[0013] performing time alignment processing on each valid comparison signal corresponding to the second signal based on a reference signal corresponding to the second signal to obtain a standardized comparison signal set corresponding to the second signal;

[0014] Using the reference signal corresponding to the second signal, each valid comparison signal in the standardized comparison signal set corresponding to the second signal is compared and screened to obtain a target valid signal corresponding to the second signal, and the target valid signal corresponding to the second signal is broadcast.

[0015] In one embodiment, the first extraction process is used to extract multiple valid comparison signals corresponding to the first signal based on the data message of the first signal, specifically including:

[0016] Determining, based on the data message of the first signal, an extended frame data block corresponding to the first signal;

[0017] determining a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal;

[0018] Setting parameters of a comparison signal corresponding to the first signal based on a reference signal corresponding to the first signal; the parameters include: a similarity threshold, a length, a linear correlation coefficient, and an offset;

[0019] Based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal, a plurality of valid comparison signals corresponding to the first signal are determined.

[0020] In one embodiment, determining, based on the data message of the first signal, the extended frame data block corresponding to the first signal specifically includes:

[0021] Acquire multiple flag bits in the data message of the first signal, and construct a flag bit value set corresponding to the first signal;

[0022] Sort the values ​​in the flag bit value set corresponding to the first signal in ascending order to determine a sorted flag bit value sequence corresponding to the first signal;

[0023] Based on the sorted flag bit value sequence corresponding to the first signal, all data bits in the data message of the first signal are spliced ​​to obtain an extended frame data block corresponding to the first signal.

[0024] In one embodiment, determining a reference signal corresponding to the first signal based on an extended frame data block corresponding to the first signal specifically includes:

[0025] Performing binary expansion on the extended frame data block corresponding to the first signal to obtain a binary expanded extended frame data block corresponding to the first signal;

[0026] According to the first preset starting position and the first preset signal length, a corresponding extended frame data block is intercepted from the extended frame data block after binary expansion corresponding to the first signal to obtain a reference signal.

[0027] In one embodiment, determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal specifically includes:

[0028] Segmenting the binary-expanded extended frame data block corresponding to the first signal according to the length of the comparison signal corresponding to the first signal to obtain a plurality of segmented extended frame data blocks corresponding to the first signal;

[0029] The divided extended frame data blocks corresponding to each first signal are all used as valid comparison signals to obtain multiple valid comparison signals corresponding to the first signal.

[0030] In one embodiment, the second extraction process is used to extract multiple valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal, specifically including:

[0031] In the data message of the temperature frame signal, a temperature change point is identified; the number of the temperature change points is multiple;

[0032] Intercepting data messages within a preset time window length before and after the temperature change point to obtain intercepted messages corresponding to multiple temperature frame signals;

[0033] splicing the intercepted messages corresponding to the multiple temperature frame signals to obtain a spliced ​​message corresponding to the temperature frame signal;

[0034] Performing binary expansion on the spliced ​​message corresponding to the temperature frame signal to obtain a spliced ​​message after binary expansion corresponding to the temperature frame signal;

[0035] According to the second preset starting position and the second preset length, intercepting the corresponding spliced ​​message from the spliced ​​message after binary expansion corresponding to the temperature frame signal to obtain a reference signal corresponding to the temperature frame signal;

[0036] Setting parameters of a comparison signal corresponding to the temperature frame signal based on a reference signal corresponding to the temperature frame signal;

[0037] Based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal, a plurality of valid comparison signals corresponding to the temperature frame signal are determined.

[0038] In one embodiment, determining a plurality of valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal specifically includes:

[0039] Perform binary expansion on the data message of the temperature frame signal to obtain a binary expanded data message corresponding to the temperature frame signal;

[0040] Segmenting the binary expanded data message corresponding to the temperature frame signal according to the length of the comparison signal corresponding to the temperature frame signal to obtain a plurality of segmented data messages corresponding to the temperature frame signal;

[0041] Obtaining timestamps corresponding to preset time window lengths before and after multiple temperature change points, filtering out data segments corresponding to each of the timestamps in each segmented data message, and obtaining multiple valid data segments corresponding to each segmented data message; one segmented data message corresponds to multiple valid data segments;

[0042] Multiple valid data segments corresponding to each segmented data message are spliced ​​together to obtain valid comparison signals corresponding to each segmented data message, and further obtain multiple valid comparison signals corresponding to the temperature frame signal.

[0043] In one embodiment, using a reference signal corresponding to the second signal, comparing and screening each valid comparison signal in a standardized comparison signal set corresponding to the second signal to obtain a target valid signal corresponding to the second signal specifically includes:

[0044] Calculating the Pearson correlation coefficient, linear correlation coefficient, and offset between the reference signal corresponding to the second signal and each valid comparison signal to obtain multiple waveform similarities, linear correlation coefficients, and offsets corresponding to the second signal;

[0045] Based on the similarity threshold of the comparison signal and the multiple waveform similarities corresponding to the second signal, each valid comparison signal is screened to obtain multiple valid comparison signals after one screening;

[0046] Based on the linear correlation coefficient of the contrast signal and the multiple linear correlation coefficients corresponding to the second signal, the effective contrast signals after each primary screening are screened to obtain multiple effective contrast signals after secondary screening;

[0047] Based on the offset of the comparison signal and multiple offsets corresponding to the second signal, each valid comparison signal after the secondary screening is screened to obtain multiple valid comparison signals after the tertiary screening, and the multiple valid comparison signals after the tertiary screening are used as the target valid signals corresponding to the second signal.

[0048] In a second aspect, the present application provides a system for parsing and comparing CAN bus data in the automotive field, wherein the system is used to implement the method for parsing and comparing CAN bus data in the automotive field, and the system comprises:

[0049] A data acquisition unit is used to acquire vehicle CAN bus data and diagnostic signals; the vehicle CAN bus data includes: data messages of target signals; the target signals are multiplexed frame signals, split frame signals or temperature frame signals;

[0050] A data message extraction unit for the first signal, configured to determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data;

[0051] A temperature frame signal data message extraction unit is used to extract the temperature frame signal data message from the vehicle CAN bus data based on the diagnostic signal;

[0052] a first valid comparison signal determination unit, configured to extract, based on the data message of the first signal, a plurality of valid comparison signals corresponding to the first signal by using a first extraction process;

[0053] a second valid comparison signal determination unit, configured to extract, by a second extraction process, a plurality of valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal;

[0054] a second signal determining unit, configured to determine the first signal or the temperature frame signal as the second signal;

[0055] a comparison signal set determining unit, configured to perform time alignment processing on each valid comparison signal corresponding to the second signal based on a reference signal corresponding to the second signal, to obtain a standardized comparison signal set corresponding to the second signal;

[0056] The target valid signal determination unit is used to use the reference signal corresponding to the second signal to compare and screen each valid comparison signal in the standardized comparison signal set corresponding to the second signal, obtain the target valid signal corresponding to the second signal, and broadcast the target valid signal corresponding to the second signal.

[0057] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-mentioned methods for parsing and comparing CAN bus data in the automotive field.

[0058] According to the specific embodiments provided in this application, this application has the following technical effects:

[0059] The present application discloses a method, system and device for parsing and comparing CAN bus data in the automotive field. When dealing with the situation where concurrent signals exist, a first extraction process is used to extract multiple valid comparison signals from multiplexed frame signals and split frame signals, thereby eliminating concurrent signals and retaining the signals to be analyzed, effectively coping with the challenges brought by concurrent signals and making signal parsing more accurate and effective. In addition, the first extraction process can be used to quickly determine multiple valid comparison signals, and then quickly obtain corresponding target valid signals, thereby improving data processing efficiency. Finally, the second extraction process is used to extract multiple valid comparison signals corresponding to the temperature frame signal, which helps to extract key information from massive data and improve the efficiency and accuracy of data analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0061] Figure 1 A flowchart of a method for parsing and comparing CAN bus data in the automotive field provided by one embodiment of the present application;

[0062] Figure 2 A flowchart of a method for parsing and comparing multiplexed frame signals in CAN bus data in the automotive field is provided for one embodiment of the present application;

[0063] Figure 3 A flowchart of a method for parsing and comparing split frame signals in CAN bus data in the automotive field provided by one embodiment of the present application;

[0064] Figure 4 A flowchart of a method for parsing and comparing temperature frame signals in CAN bus data in the automotive field provided by one embodiment of the present application;

[0065] Figure 5 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0067] Explanation of terms:

[0068] Diagnostic signal: After the vehicle control unit (ECU) sends a diagnostic service request message to the diagnostic instrument, the diagnostic instrument's reply message contains a set of binary bit data, which is the diagnostic signal.

[0069] Comparison signal: Specific binary data of all broadcast data sent by the ECU is intercepted according to specific length parameters and rules.

[0070] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0071] In an exemplary embodiment, Figure 1 As shown, a method for parsing and comparing CAN bus data in the automotive field is provided. The method is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to a server as an example for description, and includes the following steps. Among them:

[0072] Step S1, obtain vehicle CAN bus data and diagnostic signals; vehicle CAN bus data includes: data message of target signal; target signal is multiplexed frame signal, split frame signal or temperature frame signal. When the target signal is a multiplexed frame signal, the flow chart of the method for parsing and comparing CAN bus data in the automotive field is as follows: Figure 2 As shown; when the target signal is a split frame signal, the flow chart of the analysis and comparison method of CAN bus data in the automotive field is as follows Figure 3 As shown; when the target signal is a temperature frame signal, the flow chart of the analysis and comparison method of CAN bus data in the automotive field is as follows Figure 4 shown.

[0073] Specifically, there are two methods for acquiring vehicle CAN bus data: 1) extracting vehicle CAN bus data offline by parsing CAN log files in standard ASC format. 2) using a CAN analyzer to collect vehicle CAN bus data in real time via the vehicle's OBD-II interface (ISO 15765-4). This requires a 500kbps baud rate and support for multi-channel simultaneous triggering. Diagnostic signals can be acquired offline by parsing CAN log files in standard ASC format.

[0074] Step S2: determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data.

[0075] Specifically, when the target signal is a multiplexed frame signal / split frame signal, the ID number corresponding to the multiplexed frame signal / split frame signal is selected from the vehicle CAN bus data, and the data message corresponding to the ID is output to the memory as the data message of the target signal.

[0076] Step S3: extracting the data message of the temperature frame signal from the vehicle CAN bus data based on the diagnostic signal.

[0077] Specifically, the ID number and data message corresponding to the diagnostic signal are screened out from the vehicle CAN bus data, and the complete frame data associated with the ID number is cached in the memory as the data message of the temperature frame signal to be processed subsequently.

[0078] Step S4: using the first extraction process, based on the data message of the first signal, extract a plurality of valid comparison signals corresponding to the first signal.

[0079] As an optional implementation, step S4 specifically includes:

[0080] Step S41: determining an extended frame data block corresponding to the first signal based on the data message of the first signal.

[0081] As an optional implementation, step S41 specifically includes:

[0082] Step S411: Acquire multiple flag bits in a data message of a first signal, and construct a flag bit value set corresponding to the first signal.

[0083] Specifically, when the target signal is a multiplexed frame signal, step S411 includes:

[0084] Step S4111: construct an 8×8 bit matrix data structure based on the target ID in the data message of the first signal, corresponding to the 64-bit data domain space distribution.

[0085] Step S4112: Use the little-endian encoding rule to fill the bit index values ​​0-63 from right to left and from top to bottom.

[0086] Step S4113: Generate a visual bitfield map, distinguish different functional domain blocks by color gradient, use different colors to distinguish the first 8 bits as flag bits, and use the rest as data bits.

[0087] Step S4114, locate the matrix area where the flag bit is located through the human-computer interaction interface, and support rectangular box selection and bit mask generation.

[0088] Step S4115, extract the bit field values ​​of all frames in the selected area, limit the selected area to the first 8 bits, and construct a flag bit value set.

[0089] When the target signal is a split frame signal, the difference between step S411 corresponding to the split frame signal and the above steps of the multiplexed frame signal is only step S4115. Step S4115 of the split frame signal is: extract the bit field values ​​of all frames in the selected area, the selected area can be any area, the data length is limited to 16 bits, and construct a flag bit value set.

[0090] Step S412: sort the values ​​in the flag value set corresponding to the first signal in ascending order to determine a sorted flag value sequence corresponding to the first signal.

[0091] Specifically, a quick sort is performed on the values ​​in the flag bit value set corresponding to the first signal to establish an increasing index sequence.

[0092] Step S413: Based on the sorted flag bit value sequence corresponding to the first signal, all data bits in the data message of the first signal are spliced ​​to obtain an extended frame data block corresponding to the first signal.

[0093] Specifically, the data stream is reorganized according to the sorted flag bit sequence, and the part of the data message of the first signal except the flag bit is used as the data bit through bit splicing. The data bits of all frames are spliced ​​to generate an extended frame data block that complies with the J1939 standard.

[0094] Step S42: Determine a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal.

[0095] As an optional implementation, step S42 specifically includes:

[0096] Step S421 : performing binary expansion on the extended frame data block corresponding to the first signal to obtain a binary expanded extended frame data block corresponding to the first signal.

[0097] Step S422 : According to the first preset starting position and the first preset signal length, a corresponding extended frame data block is intercepted from the extended frame data block after binary expansion corresponding to the first signal to obtain a reference signal.

[0098] Specifically, after binary expansion of the extended frame data block corresponding to the first signal, the first preset starting position is first selected, and then the first preset signal length value is input. The starting position is used as a reference to intercept the binary data bits of the first preset signal length backward as the final reference signal.

[0099] Step S43: setting parameters of a comparison signal corresponding to the first signal based on a reference signal corresponding to the first signal; the parameters include: similarity threshold, length, linear correlation coefficient, and offset.

[0100] Specifically, when configuring parameters, it is necessary to set the parameters of the reference signal and the comparison signal corresponding to the first signal at the same time. These parameters will act together in the subsequent signal comparison and analysis process.

[0101] Step S44 : determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal.

[0102] As an optional implementation, step S44 specifically includes:

[0103] Step S441 : dividing the binary expanded extended frame data block corresponding to the first signal according to the length of the comparison signal corresponding to the first signal to obtain a plurality of divided extended frame data blocks corresponding to the first signal.

[0104] Step S442 : Taking the divided extended frame data blocks corresponding to each first signal as valid comparison signals, and obtaining a plurality of valid comparison signals corresponding to the first signal.

[0105] Specifically, the extended frame data block after binary expansion corresponding to the first signal is standardized and segmented according to the length value of the comparison signal corresponding to the first signal. The new data block obtained after segmentation (i.e., the segmented extended frame data block) is used as a valid comparison signal and automatically classified and stored in the comparison signal data set for subsequent analysis.

[0106] Step S5: using a second extraction process, based on the data message of the temperature frame signal, extract a plurality of valid comparison signals corresponding to the temperature frame signal.

[0107] As an optional implementation, step S5 specifically includes:

[0108] Step S51 : identifying temperature change points in a data message of a temperature frame signal; the number of temperature change points is multiple.

[0109] Step S52 , intercepting data messages within a preset time window length before and after the temperature change point to obtain intercepted messages corresponding to multiple temperature frame signals.

[0110] Specifically, the data packets within the preset time window length before and after the temperature change point and the duration parameter (unit: seconds) corresponding to the preset time window length are obtained. The duration parameter is used to define the time range of data that needs to be retained before and after the temperature mutation point.

[0111] Step S53: splicing the intercepted messages corresponding to the multiple temperature frame signals to obtain a spliced ​​message corresponding to the temperature frame signal.

[0112] Step S54 , performing binary expansion on the spliced ​​message corresponding to the temperature frame signal to obtain a spliced ​​message corresponding to the temperature frame signal after binary expansion.

[0113] Step S55 , according to the second preset starting position and the second preset length, intercepting the corresponding spliced ​​message from the spliced ​​message corresponding to the temperature frame signal after binary expansion, to obtain a reference signal corresponding to the temperature frame signal.

[0114] Specifically, for the binary expanded spliced ​​message corresponding to the temperature frame signal, continuous binary data bits of corresponding length are intercepted in the corresponding binary expanded spliced ​​message according to the second preset starting position and the second preset length to generate a reference signal corresponding to the temperature frame signal.

[0115] Step S56 : setting parameters of a comparison signal corresponding to the temperature frame signal based on a reference signal corresponding to the temperature frame signal.

[0116] Step S57 : determining a plurality of valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal.

[0117] As an optional implementation, step S57 specifically includes:

[0118] Step S571 , performing binary expansion on the data message of the temperature frame signal to obtain a binary expanded data message corresponding to the temperature frame signal.

[0119] Step S572 : Segment the binary expanded data message corresponding to the temperature frame signal according to the length of the comparison signal corresponding to the temperature frame signal to obtain a plurality of segmented data messages corresponding to the temperature frame signal.

[0120] Step S573, obtain the timestamps corresponding to the preset time window length before and after multiple temperature change points, filter out the data segments corresponding to each of the timestamps in each segmented data message, and obtain multiple valid data segments corresponding to each segmented data message; one segmented data message corresponds to multiple valid data segments.

[0121] Specifically, according to the duration parameter (i.e., the timestamp corresponding to the preset time window length before and after the temperature change point) and the second preset starting position, the data message within the preset time window length before and after the temperature change point is processed: the valid data segment of the preset time window length before and after the temperature change point is retained, and after removing the redundant data, two key outputs are generated synchronously. The first output is a time stamp array composed of the timestamps of the valid data segments for subsequent signal comparison area positioning, and the second output is the reference signal corresponding to the temperature frame signal.

[0122] In step S574 , multiple valid data segments corresponding to each segmented data message are spliced ​​together to obtain valid comparison signals corresponding to each segmented data message, and further obtain multiple valid comparison signals corresponding to the temperature frame signal.

[0123] Specifically, the data message of the temperature frame signal is first binary expanded, and then the binary expanded data message is segmented into the comparison signal original data set (i.e., multiple segmented data messages) based on the length of the comparison signal corresponding to the temperature frame signal. Then, the valid data segments are filtered according to the time stamp array, and after automatically eliminating invalid data, the multiple valid data segments corresponding to each segmented data message are re-joined and integrated, and finally multiple valid comparison signals are obtained. They are automatically classified and stored in the comparison signal data set for subsequent analysis.

[0124] Step S6: determine the first signal or the temperature frame signal as the second signal.

[0125] Step S7 : performing time alignment processing on each valid comparison signal corresponding to the second signal based on the reference signal corresponding to the second signal to obtain a standardized comparison signal set corresponding to the second signal.

[0126] Step S8: using the reference signal corresponding to the second signal, compare and screen the valid comparison signals in the standardized comparison signal set corresponding to the second signal to obtain the target valid signal corresponding to the second signal, and broadcast the target valid signal corresponding to the second signal.

[0127] As an optional implementation, in step S8, using a reference signal corresponding to the second signal, comparing and screening each valid comparison signal in the standardized comparison signal set corresponding to the second signal to obtain a target valid signal corresponding to the second signal specifically includes:

[0128] Step S81 , calculating the Pearson correlation coefficient, linear correlation coefficient and offset between the reference signal corresponding to the second signal and each valid comparison signal, and obtaining multiple waveform similarities, linear correlation coefficients and offsets corresponding to the second signal respectively.

[0129] Step S82 , screening each valid comparison signal based on the similarity threshold of the comparison signal and the similarities of multiple waveforms corresponding to the second signal, to obtain multiple valid comparison signals after one screening.

[0130] Step S83 , screening each primary screened valid contrast signal based on the linear correlation coefficient of the contrast signal and multiple linear correlation coefficients corresponding to the second signal to obtain multiple secondary screened valid contrast signals.

[0131] Step S84, based on the offset of the comparison signal and multiple offsets corresponding to the second signal, the valid comparison signals after each secondary screening are screened to obtain multiple valid comparison signals after tertiary screening, and the multiple valid comparison signals after tertiary screening are used as the target valid signals corresponding to the second signal.

[0132] Specifically, before step S81 , the method further includes: unifying the dimensions through a data normalization algorithm, and normalizing each effective comparison signal and the reference signal.

[0133] After obtaining multiple valid comparison signals after three-time screening, continue to detect the inclusion relationship between the valid comparison signals after each three-time screening, eliminate the redundant small signals in the nested large signals, and finally use the signal set after eliminating the redundant small signals as the final target valid signal, and output it to the broadcast signal pool to complete the entire processing flow.

[0134] When dealing with concurrent signals, this application distinguishes different signals based on the vehicle CAN bus data ID number and signal starting position. By setting a split interval, the vehicle CAN bus data message is split into multiple signals according to the rules within the interval. These signals are then spliced ​​together to form a continuous data sequence. From this continuous data sequence, we can more clearly extract the signal information we need. This method effectively addresses the challenges posed by concurrent signals and makes signal analysis more accurate and effective.

[0135] When dealing with situations where concurrent signals exist, the present application sets a splitting interval for the multiplexed frame signal and the split frame signal, and splits the vehicle CAN bus data message into multiple signals according to the rules within the interval. These signals are spliced ​​together to form continuous data blocks (i.e., extended frame data blocks). The split signals eliminate concurrent signals and retain the signals to be analyzed, effectively dealing with the challenges brought by concurrent signals and making signal analysis more accurate and effective. In addition, by utilizing the first extraction process, multiple valid comparison signals can be quickly determined, and then the corresponding target valid signals can be quickly obtained, thereby improving data processing efficiency.

[0136] Current temperature data usually requires a long time period to observe changes. This application splices and analyzes data packets with a preset time window length before and after multiple temperature change points filtered out by the temperature frame signal. It directly analyzes the key positions of the data packets with temperature change points, rather than directly analyzing massive temperature frame signals. This method helps to extract key information from massive data and improve the efficiency and accuracy of data analysis.

[0137] This application provides automotive engineers and technicians with more technologically advanced data support, helping them to gain a deeper understanding and analysis of CAN bus communication data, and effectively supporting key tasks such as vehicle diagnosis, network optimization, and performance debugging.

[0138] This application can be applied in the following scenarios:

[0139] 1. Fault Diagnosis: Vehicle CAN bus data parsing is widely used in the automotive industry for fault diagnosis. Analyzing data transmitted on the vehicle CAN bus using the methods described in this application can monitor communication between various vehicle subsystems and help identify sensor failures, actuator anomalies, or electronic control unit issues. By parsing vehicle CAN bus data, real-time data from various vehicle components can be obtained, including parameters such as vehicle speed, engine speed, throttle position, and wheel speed, helping to diagnose problems and locate faults.

[0140] 2. Performance Optimization: Using the methods described in this application, the performance parameters of various vehicle components are monitored and recorded, and then optimized. By parsing the vehicle's CAN bus data, data sent by the engine control unit (ECU), such as air flow, engine load, and throttle input, can be obtained to help adjust engine performance parameters, improving fuel economy, driving responsiveness, and power output.

[0141] 3. Customization: Utilizing the methods described in this application, enthusiasts and professionals have implemented numerous custom features for vehicles. By parsing the vehicle's CAN bus data, data from modules such as the instrument panel, onboard computer, chassis control, and autonomous driving systems can be obtained, enabling vehicle modification to meet individual needs. These capabilities include customizing the instrument panel display, personalizing onboard computer functions, adjusting the vehicle's suspension system, and even modifying vehicle powertrain parameters.

[0142] 4. Debugging and Reverse Engineering: Automotive modification manufacturers and automotive electronic system suppliers need to thoroughly study the communication protocols between various automotive modules in order to conduct debugging and reverse engineering. By parsing vehicle CAN bus data using the methods described in this application, it is possible to understand the internal communication methods of automotive electronic systems, debug and optimize software and hardware, and even develop customized automotive electronic control systems, providing technical support for the innovation and development of automotive electronic systems.

[0143] Based on the same inventive concept, embodiments of the present application further provide a system for parsing and comparing CAN bus data in the automotive field, which is used to implement the aforementioned method for parsing and comparing CAN bus data in the automotive field. The implementation solution provided by this system is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the system for parsing and comparing CAN bus data in the automotive field provided below can be found in the aforementioned method for parsing and comparing CAN bus data in the automotive field, and will not be repeated here.

[0144] In an exemplary embodiment, a system for parsing and comparing CAN bus data in the automotive field is provided, comprising:

[0145] The data acquisition unit is used to acquire vehicle CAN bus data and diagnostic signals; the vehicle CAN bus data includes: data messages of target signals; the target signals are multiplexed frame signals, split frame signals or temperature frame signals.

[0146] The data message extraction unit of the first signal is used to determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data.

[0147] The temperature frame signal data message extraction unit is used to extract the temperature frame signal data message from the vehicle CAN bus data based on the diagnostic signal.

[0148] The first valid comparison signal determination unit is configured to extract a plurality of valid comparison signals corresponding to the first signal based on the data message of the first signal by utilizing a first extraction process.

[0149] The second valid comparison signal determination unit is configured to extract a plurality of valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal by utilizing the second extraction process.

[0150] The second signal determining unit is configured to determine the first signal or the temperature frame signal as the second signal.

[0151] The comparison signal set determination unit is configured to perform time alignment processing on each valid comparison signal corresponding to the second signal based on a reference signal corresponding to the second signal to obtain a standardized comparison signal set corresponding to the second signal.

[0152] The target valid signal determination unit is used to use the reference signal corresponding to the second signal to compare and screen each valid comparison signal in the standardized comparison signal set corresponding to the second signal, obtain the target valid signal corresponding to the second signal, and broadcast the target valid signal corresponding to the second signal.

[0153] In an exemplary embodiment, a computer device is provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for parsing and comparing CAN bus data in the automotive field.

[0154] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a method for parsing and comparing CAN bus data in the automotive field.

[0155] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0157] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0158] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0159] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0160] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method, system, and core concept of this application. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of this application. In summary, the contents of this specification should not be construed as limiting this application.

Claims

1. A method for analyzing and comparing CAN bus data in the automotive field, characterized in that: The method for analyzing and comparing CAN bus data in the automotive field includes: Acquire vehicle CAN bus data and diagnostic signals; vehicle CAN bus data includes: data message of target signal; target signal is multiplexed frame signal, split frame signal or temperature frame signal; Determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data; Based on the diagnostic signal, the data message of the temperature frame signal is extracted from the vehicle CAN bus data; Extracting a plurality of valid comparison signals corresponding to the first signal based on the data message of the first signal using a first extraction process; Utilizing the second extraction process, based on the data message of the temperature frame signal, extracting a plurality of valid comparison signals corresponding to the temperature frame signal; determining the first signal or the temperature frame signal as the second signal; performing time alignment processing on each valid comparison signal corresponding to the second signal based on a reference signal corresponding to the second signal to obtain a standardized comparison signal set corresponding to the second signal; Using a reference signal corresponding to the second signal, performing comparison and screening on each valid comparison signal in a standardized comparison signal set corresponding to the second signal to obtain a target valid signal corresponding to the second signal, and broadcasting the target valid signal corresponding to the second signal; The first extraction process is used to extract multiple valid comparison signals corresponding to the first signal based on the data message of the first signal, specifically including: Determining, based on the data message of the first signal, an extended frame data block corresponding to the first signal; determining a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal; Setting parameters of a comparison signal corresponding to the first signal based on a reference signal corresponding to the first signal; the parameters include: a similarity threshold, a length, a linear correlation coefficient, and an offset; determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal; Determining, based on the data message of the first signal, an extended frame data block corresponding to the first signal, specifically includes: Acquire multiple flag bits in the data message of the first signal, and construct a flag bit value set corresponding to the first signal; Sort the values ​​in the flag bit value set corresponding to the first signal in ascending order to determine a sorted flag bit value sequence corresponding to the first signal; Based on the sorted flag bit value sequence corresponding to the first signal, all data bits in the data message of the first signal are spliced ​​to obtain an extended frame data block corresponding to the first signal; Determining a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal specifically includes: Performing binary expansion on the extended frame data block corresponding to the first signal to obtain a binary expanded extended frame data block corresponding to the first signal; According to the first preset starting position and the first preset signal length, a corresponding extended frame data block is intercepted from the extended frame data block after binary expansion corresponding to the first signal to obtain a reference signal; Determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal specifically includes: Segmenting the binary-expanded extended frame data block corresponding to the first signal according to the length of the comparison signal corresponding to the first signal to obtain a plurality of segmented extended frame data blocks corresponding to the first signal; Taking the divided extended frame data blocks corresponding to each first signal as valid comparison signals, and obtaining multiple valid comparison signals corresponding to the first signal; The second extraction process is used to extract multiple valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal, specifically including: In the data message of the temperature frame signal, a temperature change point is identified; the number of the temperature change points is multiple; Intercepting data messages within a preset time window length before and after the temperature change point to obtain intercepted messages corresponding to multiple temperature frame signals; splicing the intercepted messages corresponding to the multiple temperature frame signals to obtain a spliced ​​message corresponding to the temperature frame signal; Performing binary expansion on the spliced ​​message corresponding to the temperature frame signal to obtain a spliced ​​message after binary expansion corresponding to the temperature frame signal; According to the second preset starting position and the second preset length, intercepting the corresponding spliced ​​message from the spliced ​​message after binary expansion corresponding to the temperature frame signal to obtain a reference signal corresponding to the temperature frame signal; Setting parameters of a comparison signal corresponding to the temperature frame signal based on a reference signal corresponding to the temperature frame signal; Based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal, a plurality of valid comparison signals corresponding to the temperature frame signal are determined.

2. The method for analyzing and comparing CAN bus data in the automotive field according to claim 1, characterized in that: Determining multiple valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal, specifically including: Perform binary expansion on the data message of the temperature frame signal to obtain a binary expanded data message corresponding to the temperature frame signal; Segmenting the binary expanded data message corresponding to the temperature frame signal according to the length of the comparison signal corresponding to the temperature frame signal to obtain a plurality of segmented data messages corresponding to the temperature frame signal; Obtaining timestamps corresponding to preset time window lengths before and after multiple temperature change points, filtering out data segments corresponding to each of the timestamps in each segmented data message, and obtaining multiple valid data segments corresponding to each segmented data message; one segmented data message corresponds to multiple valid data segments; Multiple valid data segments corresponding to each segmented data message are spliced ​​together to obtain valid comparison signals corresponding to each segmented data message, and further obtain multiple valid comparison signals corresponding to the temperature frame signal.

3. The method for analyzing and comparing CAN bus data in the automotive field according to claim 2, characterized in that: Using a reference signal corresponding to the second signal, comparing and screening each valid comparison signal in a standardized comparison signal set corresponding to the second signal to obtain a target valid signal corresponding to the second signal specifically includes: Calculating the Pearson correlation coefficient, linear correlation coefficient, and offset between the reference signal corresponding to the second signal and each valid comparison signal to obtain multiple waveform similarities, linear correlation coefficients, and offsets corresponding to the second signal; Based on the similarity threshold of the comparison signal and the multiple waveform similarities corresponding to the second signal, each valid comparison signal is screened to obtain multiple valid comparison signals after one screening; Based on the linear correlation coefficient of the contrast signal and the multiple linear correlation coefficients corresponding to the second signal, the effective contrast signals after each primary screening are screened to obtain multiple effective contrast signals after secondary screening; Based on the offset of the comparison signal and multiple offsets corresponding to the second signal, each valid comparison signal after the secondary screening is screened to obtain multiple valid comparison signals after the tertiary screening, and the multiple valid comparison signals after the tertiary screening are used as the target valid signals corresponding to the second signal.

4. A CAN bus data analysis and comparison system in the automotive field, characterized in that: The system for parsing and comparing CAN bus data in the automotive field is used to implement the method for parsing and comparing CAN bus data in the automotive field according to any one of claims 1 to 3, and the system for parsing and comparing CAN bus data in the automotive field includes: A data acquisition unit is used to acquire vehicle CAN bus data and diagnostic signals; the vehicle CAN bus data includes: data messages of target signals; the target signals are multiplexed frame signals, split frame signals or temperature frame signals; A data message extraction unit for the first signal, configured to determine the multiplexed frame signal or the split frame signal as the first signal, and extract the data message of the first signal from the vehicle CAN bus data; A temperature frame signal data message extraction unit is used to extract the temperature frame signal data message from the vehicle CAN bus data based on the diagnostic signal; a first valid comparison signal determination unit, configured to extract, based on the data message of the first signal, a plurality of valid comparison signals corresponding to the first signal by using a first extraction process; a second valid comparison signal determination unit, configured to extract, by a second extraction process, a plurality of valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal; a second signal determining unit, configured to determine the first signal or the temperature frame signal as the second signal; a comparison signal set determining unit, configured to perform time alignment processing on each valid comparison signal corresponding to the second signal based on a reference signal corresponding to the second signal, to obtain a standardized comparison signal set corresponding to the second signal; a target valid signal determining unit, configured to compare and screen the valid comparison signals in the standardized comparison signal set corresponding to the second signal using the reference signal corresponding to the second signal, obtain the target valid signal corresponding to the second signal, and broadcast the target valid signal corresponding to the second signal; The first extraction process is used to extract multiple valid comparison signals corresponding to the first signal based on the data message of the first signal, specifically including: Determining, based on the data message of the first signal, an extended frame data block corresponding to the first signal; determining a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal; Setting parameters of a comparison signal corresponding to the first signal based on a reference signal corresponding to the first signal; the parameters include: a similarity threshold, a length, a linear correlation coefficient, and an offset; determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal; Determining, based on the data message of the first signal, an extended frame data block corresponding to the first signal, specifically includes: Acquire multiple flag bits in the data message of the first signal, and construct a flag bit value set corresponding to the first signal; Sort the values ​​in the flag bit value set corresponding to the first signal in ascending order to determine a sorted flag bit value sequence corresponding to the first signal; Based on the sorted flag bit value sequence corresponding to the first signal, all data bits in the data message of the first signal are spliced ​​to obtain an extended frame data block corresponding to the first signal; Determining a reference signal corresponding to the first signal based on the extended frame data block corresponding to the first signal specifically includes: Performing binary expansion on the extended frame data block corresponding to the first signal to obtain a binary expanded extended frame data block corresponding to the first signal; According to the first preset starting position and the first preset signal length, a corresponding extended frame data block is intercepted from the extended frame data block after binary expansion corresponding to the first signal to obtain a reference signal; Determining a plurality of valid comparison signals corresponding to the first signal based on the extended frame data block corresponding to the first signal and the parameters of the comparison signal specifically includes: Segmenting the binary-expanded extended frame data block corresponding to the first signal according to the length of the comparison signal corresponding to the first signal to obtain a plurality of segmented extended frame data blocks corresponding to the first signal; Taking the divided extended frame data blocks corresponding to each first signal as valid comparison signals, and obtaining multiple valid comparison signals corresponding to the first signal; The second extraction process is used to extract multiple valid comparison signals corresponding to the temperature frame signal based on the data message of the temperature frame signal, specifically including: In the data message of the temperature frame signal, a temperature change point is identified; the number of the temperature change points is multiple; Intercepting data messages within a preset time window length before and after the temperature change point to obtain intercepted messages corresponding to multiple temperature frame signals; splicing the intercepted messages corresponding to the multiple temperature frame signals to obtain a spliced ​​message corresponding to the temperature frame signal; Performing binary expansion on the spliced ​​message corresponding to the temperature frame signal to obtain a spliced ​​message after binary expansion corresponding to the temperature frame signal; According to the second preset starting position and the second preset length, intercepting the corresponding spliced ​​message from the spliced ​​message after binary expansion corresponding to the temperature frame signal to obtain a reference signal corresponding to the temperature frame signal; Setting parameters of a comparison signal corresponding to the temperature frame signal based on a reference signal corresponding to the temperature frame signal; Based on the data message of the temperature frame signal and the parameters of the comparison signal corresponding to the temperature frame signal, a plurality of valid comparison signals corresponding to the temperature frame signal are determined.

5. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for parsing and comparing CAN bus data in the automotive field according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • CAN bus signal analysis method and system

    CN113259216A

  • Image recognition and analysis method and system for CAN bus data in automobile field

    CN119832395A