Vehicle data analysis method, device, computer equipment, storage medium and vehicle

By simplifying the generation of CAN configuration files of DBC files, dynamic parsing of CAN frames is achieved, and the complex process after DBC file update is solved, which significantly shortens the process time and improves data parsing efficiency.

CN117812171BActive Publication Date: 2025-02-14CONTEMPORARY AMPEREX INTELLIGENCE TECHNOLOGY (SHANGHAI) LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311631135.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-02-14
Estimated Expiration
2043-11-30

AI Technical Summary

Technical Problem

After the DBC file is updated, the existing technology needs to modify the parsing code, which makes the process complex and time-consuming, and cannot effectively simplify the process in related technologies.

Method used

Get the CAN configuration file by pre-simplifying the DBC file, parsing the obtained CAN frames, realizing dynamic parsing, and quickly simplifying to obtain the new CAN configuration file when the DBC file is updated, avoiding modifying the parsing code.

Benefits of technology

It simplifies the complex process after DBC file updates, shortens the time-consuming process, reduces it from the day level to the minute level, and improves the efficiency of data parsing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117812171B_ABST
    Figure CN117812171B_ABST
Patent Text Reader

Abstract

The present application discloses a vehicle data parsing method, device, computer equipment, storage medium and vehicle. By pre-simplifying a DBC file to obtain a CAN configuration file, the acquired CAN frame is parsed, which not only realizes dynamic parsing of the CAN frame in a new way, but also because the CAN configuration file is used to dynamically parse the CAN frame, when the DBC file is updated, there is no need to modify the parsing code, but the updated DBC file is quickly simplified, and the new CAN configuration file can be obtained in time, thereby converting a complex process that takes several days into a simplified process of several minutes, which can significantly shorten the time spent on the entire process after the DBC file is updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle data analysis method, device, computer equipment, storage medium and vehicle. Background Art

[0002] With the development of automobile technology, the Controller Area Network (CAN) bus is widely used. The Controller Area Network Database (DBC) file is a database file that describes the data communication between the communication nodes in the CAN network. The DBC file defines the vehicle communication network, and the communication nodes use the DBC file to constrain the data format.

[0003] In the related art, if the DBC file is updated, the parsing code needs to be modified for the relevant communication nodes. After the code is modified, a series of development activities are required to update and release the version so that the updated DBC file can be used to parse the vehicle data. It can be seen that the whole process is complicated and takes several days. Therefore, it is necessary to provide a new vehicle data parsing method to simplify the process in the related art. Summary of the invention

[0004] In view of the above problems, the present application provides a vehicle data analysis method, apparatus, computer equipment, storage medium and vehicle, which can simplify the complex process after the DBC file is updated.

[0005] The present application provides a vehicle data parsing method, which includes: obtaining a target CAN frame and a CAN configuration file; wherein the CAN configuration file is obtained by simplifying a DBC file; reading message configuration information corresponding to the target CAN frame from the CAN configuration file; and parsing the target CAN frame based on the message configuration information to obtain vehicle signal data.

[0006] In the present application, the acquired CAN frames are parsed by using a CAN configuration file obtained by pre-simplifying the DBC file, which not only realizes dynamic parsing of CAN frames in a new way, but also because the CAN configuration file is used to dynamically parse the CAN frames, when the DBC file is updated, there is no need to modify the parsing code. Instead, the updated DBC file is quickly simplified and the new CAN configuration file can be obtained in time, thereby transforming a complex process that takes several days into a simplified process that takes several minutes, and shortening the time spent on the day to the minute level, which can significantly shorten the time spent on the entire process after the DBC file is updated.

[0007] In one of the embodiments, the acquiring the target CAN frame includes: acquiring an initial CAN frame; and performing cleaning and filtering based on the initial CAN frame to obtain the target CAN frame.

[0008] In an embodiment of the present application, by cleaning and filtering the initial CAN frame to obtain the target CAN frame, the system load caused by parsing the data can be reduced; further, the data volume of the target CAN frame is more suitable for deployment on the vehicle side, meeting the needs of real-time business on the vehicle side.

[0009] In one of the embodiments, the cleaning and filtering based on the initial CAN frame to obtain the target CAN frame includes: screening CAN frames matching a preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame.

[0010] In the embodiment of the present application, the CAN frame matching the preset configuration CAN identifier is screened in the initial CAN frame to obtain the target CAN frame, which can reduce the system load caused by parsing the data. Furthermore, by reducing the system load caused by parsing the data, the limited vehicle-side computing power resources are more suitable for running the vehicle data parsing method on the vehicle side.

[0011] In one of the embodiments, the screening of CAN frames matching a preset configured CAN identifier in the initial CAN frame comprises: dynamically matching a pre-configured CAN identifier with a CAN identifier of the initial CAN frame, and screening CAN frames corresponding to the pre-configured CAN identifier; wherein the pre-configured CAN identifier is determined based on a business application; and / or, dynamically matching a pre-configured CAN channel with a CAN channel of the initial CAN frame, and screening CAN frames corresponding to the pre-configured CAN channel; wherein the pre-configured CAN channel is determined based on a business application.

[0012] In the embodiment of the present application, by cleaning the initial CAN frame according to the pre-configured CAN identifier and the pre-configured CAN channel, the amount of data irrelevant to the business application (for example, 10% to 30%) can be removed to reduce the system load.

[0013] In one of the embodiments, the initial CAN frame includes a first CAN frame and a second CAN frame; the cleaning and filtering based on the initial CAN frame to obtain the target CAN frame includes: if the identifier of the first CAN frame is the same as the identifier of the second CAN frame, and the message data of the first CAN frame is the same as the message data of the second CAN frame, discarding one of the first CAN frame and the second CAN frame, retaining the other, to obtain the target CAN frame.

[0014] In the embodiment of the present application, the system load is reduced by identifying repeated CAN frames in the initial CAN frame and removing the repeated CAN frames.

[0015] In one of the embodiments, performing cleaning and filtering based on the initial CAN frame to obtain the target CAN frame includes: performing cleaning and filtering based on the initial CAN frame to obtain an intermediate CAN frame; and determining the target CAN frame based on the intermediate CAN frame.

[0016] In an embodiment of the present application, by cleaning and filtering the initial CAN frame to obtain the intermediate CAN frame, and determining the target CAN frame based on the intermediate CAN frame, the system load caused by parsing the data can be reduced; further, the data volume of the target CAN frame is more suitable for deployment on the vehicle side, meeting the needs of real-time business on the vehicle side.

[0017] In one of the embodiments, determining the target CAN frame based on the intermediate CAN frame includes: if a new CAN frame is received, cleaning the new CAN frame and the intermediate CAN frame according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0018] In an embodiment of the present application, taking into account the characteristics of CAN signal data remaining unchanged in some time periods and the collection cycle of CAN frames, the received new CAN frames and intermediate CAN frames are cleaned to further reduce the system load and avoid the computing power resources occupied by parsing duplicate CAN frames, so as to be more suitable for the computing power resources on the vehicle side and improve the stability and accuracy of vehicle data parsing.

[0019] In one of the embodiments, there is a CAN frame to be compared that is continuous with the new CAN frame in the intermediate CAN frame; the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame, including: if the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, comparing the message data of the new CAN frame with the message data of the CAN frame to be compared; if the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, discarding the new CAN frame.

[0020] In the embodiment of the present application, considering that the new CAN frame that is continuous with the initial CAN frame may be repeated with the initial CAN frame, the CAN identifiers of the two are compared first, and then the message data of the two are compared, so as to reduce the system load without missing the CAN signal data that needs to be parsed. If there are a large number of duplicate frames in the system, the duplicate frames are cleaned up in this embodiment, and the computing power resources of the duplicate frames are no longer consumed, which can reduce the system load.

[0021] In one of the embodiments, the CAN configuration file is obtained by: analyzing the DBC file to extract content data required for parsing CAN frames from the DBC file; and generating the CAN configuration file based on the extracted content data.

[0022] In the embodiment of the present application, the CAN configuration file is obtained by pre-simplifying the complex DBC file, so that the corresponding message parsing rules can be directly obtained from the CAN configuration file when parsing the CAN signal data. When the DBC file is changed, the new message parsing rules are quickly read from the CAN configuration corresponding to the changed DBC file, without modifying the parsing program, eliminating the development process of compiling, testing, and publishing after modifying the parsing program, and shortening the time spent on the entire process after the DBC file is updated.

[0023] In one of the embodiments, the CAN configuration file adopts a preset storage format; the reading of the message configuration information corresponding to the target CAN frame from the CAN configuration file includes: reading the message configuration information using a data structure corresponding to the preset storage format from the CAN configuration file.

[0024] In an embodiment of the present application, the content data required for CAN parsing is read from the DBC file in a preset storage format and stored in the CAN configuration file, so that the message configuration information of the data structure corresponding to the preset storage format can be efficiently read from the configuration file, thereby realizing real-time dynamic parsing of CAN signal data.

[0025] In one embodiment, reading the message configuration information using the data structure corresponding to the preset storage format from the CAN configuration file includes:

[0026] If the CAN configuration file adopts the JSON format, read the message configuration information in the JSON format corresponding to the target CAN frame from the CAN configuration file; or

[0027] If the CAN configuration file adopts XML format, the message configuration information in markup language format corresponding to the target CAN frame is read from the CAN configuration file.

[0028] In an embodiment of the present application, the content data required for CAN parsing is read from the DBC file and a CAN configuration file in JSON format is generated accordingly, so that the message configuration information in JSON format can be efficiently read from the CAN configuration file to achieve real-time dynamic parsing of CAN signal data.

[0029] In one of the embodiments, obtaining a CAN configuration file includes: obtaining the CAN configuration file from a vehicle-side file system.

[0030] In the embodiment of the present application, the CAN configuration file is stored in the vehicle-side file system, and the CAN configuration file is obtained from the vehicle-side file system when the CAN signal data is obtained, and the CAN signal data is parsed using the configuration file. The parsing method is adapted to the computing power and resources of the vehicle-side, and the parsing of the CAN signal data is realized on the vehicle-side. Furthermore, the CAN configuration file is obtained by simplifying the DBC file, which can save the storage space on the vehicle-side.

[0031] In one of the embodiments, the target CAN frame carries a target CAN identifier; the reading of the message configuration information corresponding to the target CAN frame from the CAN configuration file includes: reading the message configuration information corresponding to the target CAN frame from the CAN configuration file according to the target CAN identifier.

[0032] In an embodiment of the present application, by reading the message configuration information corresponding to the target CAN frame from the CAN configuration file according to the target CAN identifier of the target CAN frame, and parsing the target CAN frame using the read message configuration information, real-time dynamic parsing of CAN signal data is achieved, providing a data basis for subsequent business needs.

[0033] In one of the embodiments, the message configuration information includes a target variable, a signal data position, an offset, and a proportional coefficient; parsing the target CAN frame based on the message configuration information to obtain vehicle signal data includes: obtaining an initial value of the target variable from the target CAN frame according to the signal data position; calculating the initial value based on the offset and the proportional coefficient to obtain the signal data of the target variable.

[0034] In an embodiment of the present application, the target CAN frame is parsed through the target variable, signal data position, offset, and proportional coefficient in the message configuration information to obtain the signal data of the target variable, and accurate signal data can be parsed from the target CAN to meet the data requirements of subsequent services.

[0035] In one of the embodiments, obtaining the initial CAN frame includes: obtaining the initial CAN frame by Ethernet forwarding; and / or obtaining the initial CAN frame through a CAN interface; and / or obtaining the initial CAN frame by inter-core communication.

[0036] In an embodiment of the present application, the vehicle side obtains the initial CAN frame through multiple channels, such as at least one of Ethernet forwarding, CAN interface, inter-core communication (IPCF), etc., to receive the initial CAN frame, so as to obtain CAN signal data more comprehensively.

[0037] In one of the embodiments, the method further includes: receiving a new CAN configuration file when the DBC file is changed; wherein the new CAN configuration file is obtained by simplifying the changed DBC file.

[0038] In the embodiment of the present application, there is no need to modify the parsing code corresponding to the DBC file. Instead, the changed DBC file is simplified again to obtain a new CAN configuration file, and the DBC file is quickly and automatically converted to the CAN configuration file, which greatly reduces the development workload and can reduce the time consumption of the overall process to minutes.

[0039] The present application provides a vehicle data parsing device, which includes: an acquisition module, used to acquire a target CAN frame and a CAN configuration file; wherein the CAN configuration file is obtained by simplifying a DBC file; a reading module, used to read message configuration information corresponding to the target CAN frame from the CAN configuration file; and a parsing module, used to parse the target CAN frame based on the message configuration information to obtain vehicle signal data.

[0040] The present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements any one of the methods described in the above embodiments when executing the computer program.

[0041] The present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0042] The present application provides a vehicle, including a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements any one of the methods described in the above embodiments when executing the computer program.

[0043] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Moreover, the same reference numerals are used throughout the drawings to represent the same components. In the drawings:

[0045] Figure 1aThis is an application environment diagram of the vehicle data parsing method provided in the scenario example of this specification;

[0046] Figure 1b This is a schematic diagram of the structure of a vehicle provided in the scenario example of this manual;

[0047] Figure 2 A flowchart of a vehicle data analysis method provided in one embodiment of this specification;

[0048] Figure 3 A flowchart of obtaining a target CAN frame provided in one embodiment of this specification;

[0049] Figure 4 A flowchart of obtaining a target CAN frame provided in another embodiment of this specification;

[0050] Figure 5 A flowchart of generating a CAN configuration file provided in one embodiment of this specification;

[0051] Figure 6 A flowchart of a vehicle data parsing method provided in another embodiment of this specification;

[0052] Figure 7a A flowchart of obtaining a target CAN frame provided in another embodiment of this specification;

[0053] Figure 7b A flowchart of a new CAN frame processing method provided in one embodiment of this specification;

[0054] Figure 8 A flowchart of a vehicle data parsing method provided in another embodiment of this specification;

[0055] Fig. 9 A schematic diagram of a vehicle data analysis device provided in one embodiment of this specification;

[0056] Fig.10 A block diagram of a computer device provided for an embodiment of this specification. DETAILED DESCRIPTION

[0057] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0059] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0060] Reference to "embodiment" or "implementation method" herein means that the specific features, structures or characteristics described in conjunction with the embodiment or implementation method may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0061] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0062] In some related automotive electronic software systems, the commonly used communication interaction method is the CAN bus. The CAN protocol itself is unformatted, and the format definition of the data it carries is determined by the communicating parties. The DBC file defines the vehicle communication network. The communication nodes on the vehicle can use a unified DBC file constraint data format, and parse the relevant CAN signal frames according to this format in the parsing code. When the DBC file is updated, the parsing code needs to be updated for the relevant communication nodes to implement the parsing of the updated DBC file. In the entire process, a series of development activities such as modifying the parsing code, using the tool chain, compiling, regression testing, and integration testing are required. In addition, due to the modification of the parsing code, version updates and releases are required.

[0063] In the related art, a set of program software is generated offline for a DBC file, which is used as a parsing program for CAN signal data. If a DBC file is changed, the program software corresponding to the DBC file also needs to be changed accordingly. The change process of the program software includes modifying the software code, compiling and integrating, testing, and publishing. It can be seen that the entire change process is time-consuming and complicated.

[0064] In order to simplify and shorten the change process, the present application provides a vehicle data parsing method. The complex DBC file is simplified in advance to obtain a CAN configuration file. If the vehicle data parsing method is run on the vehicle side, the DBC file can be simplified in advance to obtain a CAN configuration file and stored on the vehicle side. When the vehicle side obtains the CAN frame to be parsed, the message configuration information corresponding to the CAN frame is read from the CAN configuration file, and the CAN frame is parsed according to the message configuration information corresponding to the CAN frame to obtain the vehicle signal data. Since the complex DBC file is simplified in advance to generate a CAN configuration file, the CAN configuration file can be directly used for parsing when the CAN frame needs to be parsed. Further, if the DBC file is updated, there is no need to modify the parsing code. The updated DBC file can be directly converted into a new CAN configuration file and stored on the vehicle side, so as to use the new CAN configuration file to parse the received CAN frame. It can be seen that the present application simplifies the complex process after the DBC file is updated in the related art, and there is no need to modify the parsing code. The simplified CAN configuration file can be used to realize the real-time dynamic parsing of the CAN frame.

[0065] See also Figure 1a , Figure 1a The schematic diagram of the application environment of the vehicle data parsing method provided in the scenario example of this application includes a vehicle 1000 and a PC (Personal Compurter). The vehicle data parsing method can be applied to the vehicle 1000, or to other devices with the function of controlling the vehicle. The simplified method of the DBC file can be applied to a PC, or other electronic devices. Since DBC is relatively complex, it includes a large amount of network configuration information, such as channels, nodes, CAN cycles and other information. However, this information is related to the network but has nothing to do with CAN frame parsing, so the DBC file is simplified to filter out configuration information that is not related to CAN frame parsing. Specifically, the PC can analyze and process the complex information in the DBC file, extract the content data required to parse the CAN frame from the DBC file, and generate a CAN configuration file based on the extracted content data. The PC can send the CAN configuration file to the vehicle-side file system of the vehicle 1000.

[0066] See also Figure 1b , Figure 1bA schematic diagram of the structure of the vehicle 1000 provided for this scenario example. The vehicle 1000 may be a fuel vehicle, a gas vehicle or a new energy vehicle, and the new energy vehicle may be a pure electric vehicle, a hybrid vehicle or an extended-range vehicle, etc. A battery 100 is provided inside the vehicle 1000, and the battery 100 may be provided at the bottom, head or tail of the vehicle 1000. The battery 100 may be used to power the vehicle 1000, for example, the battery 100 may be used as an operating power source for the vehicle 1000. The vehicle 1000 may also include a controller 200 and a motor 300, and the controller 200 is used to control the battery 100 to power the motor 300, for example, for the starting, navigation and driving power requirements of the vehicle 1000. In this scenario example, the battery 100 may not only be used as the operating power source of the vehicle 1000, but also as the driving power source of the vehicle 1000, replacing or partially replacing fuel or natural gas to provide driving power for the vehicle 1000.

[0067] In this scenario example, a CAN configuration file is pre-stored in the vehicle-side file system of vehicle 1000. The CAN configuration file is obtained by simplifying the DBC file. When vehicle 1000 receives the initial CAN frame, in order to reduce the system load caused by parsing the data, the initial CAN frame can be cleaned for the first round and the second round to obtain the target CAN frame. Specifically, the initial CAN frame is cleaned for the first round to obtain an intermediate CAN frame. A second round of cleaning is performed based on the intermediate CAN frame to obtain the target CAN frame. Exemplarily, a certain business application has a pre-configured CAN identifier and a pre-configured CAN channel. The data corresponding to the pre-configured CAN identifier and the pre-configured CAN channel are the signal data required by the business application.

[0068] In the first round of cleaning process in this example, a pre-configured CAN channel is dynamically matched with the CAN channel of the initial CAN frame, a pre-configured CAN identifier is dynamically matched with the CAN identifier of the initial CAN frame, and the CAN frame corresponding to the pre-configured CAN identifier is retained to obtain an intermediate CAN frame.

[0069] In the second round of cleaning process of this example, after the intermediate CAN frame is cached, if a new CAN frame is received, the identifier of the new CAN frame is compared with the identifier of the intermediate CAN frame. If the identifier of the new CAN frame is the same as the identifier of the intermediate CAN frame, the message data of the new CAN frame and the message data of the intermediate CAN frame are compared. If the message data of the new CAN frame is the same as the message data of the intermediate CAN frame, it indicates that the repeated CAN frame identical to the new CAN frame has been parsed before, so it is no longer necessary to expend computing power to parse the new CAN frame. The vehicle parsing data of the repeated CAN frame identical to the new CAN frame can be used as the vehicle parsing data of the new CAN frame and output.

[0070] In this scenario example, after data cleaning, the target CAN frame is obtained, and the target CAN frame corresponds to a CAN identifier. The CAN identifier includes a CAN channel (such as CANCHANNEL) and a CAN identifier (CANID). According to the CANCHANNEL value and CANID value of the target CAN frame, the message configuration information (CANData) corresponding to the target CAN frame is read from the CAN configuration file. The message configuration information can be understood as the definition information of the CAN signal, including the target variable (DataName), signal data position (Position_left, Position_right), offset (Offset), proportionality factor (Factor), and signal byte order (MotoOrlntel).

[0071] In this scenario example, the vehicle data parsing method can be applied to embedded system SOC (System on Chip) chips, such as ARM A core design. In the A core, JSON pairs can be used to record CAN information, and the CAN configuration file can be in JSON file format. The CAN configuration file is shown as follows:

[0072]

[0073] In this scenario example, the target variable can be understood as the signal name (DATAName). For example, the target variable can be the current current of the battery pack (PackCurrent) or the current internal voltage of the battery pack (PackInternalVoltage). The signal data position can include a start bit (Position_left) and an end bit (Position_right). The offset (Offset) can be understood as the conversion offset of the signal. The proportional factor (Factor) can be understood as the conversion factor of the signal. The byte order (Byte Order) of the signal can be Motorola (Big Endian) or Intel (Little Endian).

[0074] In this scenario example, the target CAN frame is truncated according to the start bit and the end bit to obtain the initial value of the target variable. The initial value is calculated based on the offset and the proportional coefficient to obtain the signal data of the target variable, such as the current current value of the battery pack, the current internal voltage value, etc.

[0075] In the above scenario example, the acquired CAN frames are parsed by using the CAN configuration file obtained by pre-simplifying the DBC file, which not only realizes the real-time dynamic parsing of the CAN frames in a new way, but also because the CAN configuration file is used to perform real-time dynamic parsing of the CAN frames, when the DBC file is updated, there is no need to modify the parsing code. Instead, the updated DBC file is quickly simplified and the new CAN configuration file can be obtained in time, thereby transforming a complex process that takes several days into a simplified process of several minutes, from days to minutes, which can significantly shorten the time spent on the entire process after the DBC file is updated.

[0076] See also Figure 2 In some embodiments of the present application, a vehicle data analysis method is provided, and the vehicle data analysis method may include the following steps:

[0077] S210, obtaining a target CAN frame and a CAN configuration file, wherein the CAN configuration file is obtained by simplifying the DBC file.

[0078] Among them, CAN frames can be data frames transmitted on the CAN network, and these data frames are used to communicate between various electronic control units (ECUs) of the vehicle, so as to achieve coordinated operation of functions such as engine control, braking system, air conditioning system, etc. CAN frames usually include fields such as identifier, data length code, data, and check bits to ensure that information can be reliably transmitted in the network inside the vehicle. DBC (Database Can, controller area network database) files can be database files that describe data communication between communication nodes in the CAN network. The CAN configuration file can be generated based on data related to CAN signal data parsing in the DBC file, and is used to store the parsing rules of CAN signal data. The CAN configuration file is a reference for parsing CAN signal data.

[0079] Specifically, since the DBC file includes information such as node configuration, network configuration, CAN frame configuration, signal attributes, etc., and parsing CAN signal data does not require all the information in the DBC file, the DBC file is simplified to remove information irrelevant to the CAN signal data parsing and retain information related to the CAN signal data parsing. The CAN configuration file is generated based on the retained information.

[0080] In some embodiments, since the CAN signal data on the vehicle is diverse, the received CAN signal data can be screened in combination with actual business needs to obtain the target CAN frame. For example, the required CAN frame can be pre-configured for a certain application A, so the target CAN frame can be obtained from the CAN signal data based on the pre-configured information of application A. In some other embodiments, since the acquisition cycle of the CAN signal data is very short, and some CAN signal data does not change in the time period corresponding to multiple consecutive acquisition cycles, there is a large amount of duplicate data in the collected CAN signal data, so the duplicate data can be cleaned from the CAN signal data to obtain the target CAN frame. Furthermore, after obtaining the target CAN frame, a pre-prepared CAN configuration file is obtained to parse the target CAN frame.

[0081] S220. Read message configuration information corresponding to the target CAN frame from the CAN configuration file.

[0082] The CAN configuration file stores message configuration information corresponding to different CAN frames. The message configuration information may include the CAN frames to be parsed and their message parsing rules. The message configuration information is used to parse the target CAN frames to provide vehicle signal data used by specific services.

[0083] Specifically, since the CAN configuration file stores message configuration information corresponding to each of the multiple CAN frames, the message configuration information corresponding to the target CAN frame is read from the CAN configuration file. Exemplarily, the CAN configuration file can store the CAN frame and the message configuration information in a key-value pair manner, and the corresponding key value can be searched in the CAN configuration file according to the key corresponding to the target CAN frame as the message configuration information corresponding to the target CAN frame.

[0084] S230: Parse the target CAN frame based on the message configuration information to obtain vehicle signal data.

[0085] Among them, the target CAN frame can carry at least one variable. The message configuration information includes the message parsing rules (or variable data information) of each variable. Specifically, since the message configuration information includes the CAN frame to be parsed and its message parsing rules, the message parsing rules included in the message configuration information are used to read the signal initial value from the target CAN frame, and the read signal initial value is calculated to parse out the vehicle signal data corresponding to the target CAN frame. Exemplarily, the signal initial value of each variable is read from the target CAN frame and calculated according to the message parsing rules of each variable to obtain the signal value corresponding to each variable. For example, the target CAN frame includes two variables, battery pack current I and battery pack voltage U, and the message configuration information includes message parsing rule A of battery pack current I and message parsing rule B of battery pack voltage U. According to message parsing rule A, the battery pack current I is parsed to obtain the current value of the battery pack current I. According to message parsing rule B, the battery pack voltage U is parsed to obtain the voltage value of the battery pack voltage U.

[0086] In the above implementation, the acquired CAN frame is parsed by pre-simplifying the DBC file to obtain the CAN configuration file, which not only realizes the dynamic parsing of the CAN frame in a new way, but also because the CAN configuration file is used to dynamically parse the CAN frame, when the DBC file is updated, there is no need to modify the parsing code, but the updated DBC file is quickly simplified, and the new CAN configuration file can be obtained in time, thereby transforming a complex process that takes several days into a simplified process of several minutes, and shortening the time spent from days to minutes, which can significantly shorten the time spent on the entire process after the DBC file is updated. It can be understood that if this method is run on the vehicle side, it can meet the real-time business needs with high time sensitivity requirements.

[0087] In some implementations, in order to reduce the system load caused by parsing CAN signal data, it is necessary to clean the collected initial CAN frames to reduce the amount of data parsing. Figure 3 , get the target CAN frame, including:

[0088] S310, obtaining an initial CAN frame.

[0089] S320: Clean and filter the initial CAN frame to obtain a target CAN frame.

[0090] Among them, the initial CAN frame is cleaned and filtered (one round or two rounds or more rounds) to remove non-essential information therein to obtain a target CAN frame. Specifically, CAN signal data can be obtained through multiple channels, and the CAN signal data includes several initial CAN frames. There are some redundant data and data that do not need to be parsed in the initial CAN frame. Therefore, the initial CAN frame can be cleaned and filtered according to business needs to obtain the target CAN frame required by the business needs. In other embodiments, the initial CAN frame can be cleaned and filtered to remove non-essential information therein to obtain an intermediate CAN frame. By analyzing the actual situation of the CAN signal data, it is found that there is still data that does not need to be parsed in the intermediate CAN frame. Therefore, in order to further reduce the data parsing work, the intermediate CAN frame can continue to be cleaned and filtered to obtain the target CAN frame. It can be understood that if the initial CAN frame is cleaned and filtered for more than two rounds, the method used for each round of cleaning can be different.

[0091] In the above implementation, by cleaning and filtering the initial CAN frame to obtain the target CAN frame, the system load caused by parsing the data can be reduced; further, the data volume of the target CAN frame is more suitable for deployment on the vehicle side, meeting the needs of real-time services on the vehicle side.

[0092] In some implementations, performing cleaning and filtering based on the initial CAN frame to obtain the target CAN frame may include: screening CAN frames matching a preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame.

[0093] Among them, the preset configuration CAN identifier can be determined according to the business application. The CAN frames matching the preset configuration CAN identifier are retained in the initial CAN frame, and the CAN frames not matching the preset configuration CAN identifier are removed. Specifically, when the initial CAN frame is obtained, the preset configuration CAN identifier can be used to determine the CAN identification information of the CAN signal data required by the business application. The CAN frame corresponding to the CAN identification information is selected from the initial CAN frame to obtain the target CAN frame.

[0094] Exemplarily, different business applications require different CAN signal data for support, and the required CAN signal data can be configured offline for each business application. The CAN signal data corresponds to a CAN identifier, so the application identifier correspondence between the business application and the CAN identifier can be configured. The application identifier correspondence is used to describe the correspondence between the application identifier of the business application and the CAN identifier. When the initial CAN frame is obtained, the application identifier of the business application APP can be used to search in the pre-configured application identifier correspondence to obtain the CAN identifier corresponding to the business application APP. The CAN frame corresponding to the found CAN identifier in the initial CAN frame is retained to obtain the target CAN frame.

[0095] In the above implementation, the CAN frames matching the preset configuration CAN identifier are screened in the initial CAN frames to obtain the target CAN frames, which can reduce the system load caused by parsing the data. Furthermore, by reducing the system load caused by parsing the data, the vehicle data parsing method is more suitable for the limited vehicle computing resources.

[0096] In some embodiments, screening CAN frames that match a preset configured CAN identifier in an initial CAN frame may include: dynamically matching a pre-configured CAN identifier with a CAN identifier of the initial CAN frame, and screening CAN frames corresponding to the pre-configured CAN identifier; wherein the pre-configured CAN identifier is determined based on a business application.

[0097] Among them, the pre-configured CAN identifier is determined according to the business application. For example, the CAN signal data required by the business application can be configured offline. The CAN signal data corresponds to a CAN identifier (CANID). Different business applications require signal data of different CANIDs to support them, so the CANID can be pre-configured for different business applications. Therefore, for any business application, the initial CAN frame can be cleaned according to the pre-configured CAN identifier. Specifically, the pre-configured CAN identifier is dynamically matched with the CAN identifier of the initial CAN frame, and the initial CAN frames that are inconsistent with the pre-configured CAN identifier (such as CAN frames that are not related to the current business application or the current node) are removed, and the initial CAN frames that are consistent with the pre-configured CAN identifier are retained, that is, the CAN frames corresponding to the pre-configured CAN identifier.

[0098] In some embodiments, retaining CAN frames matching a preset configured CAN identifier in an initial CAN frame includes: dynamically matching a pre-configured CAN channel with a CAN channel of the initial CAN frame, and screening CAN frames corresponding to the pre-configured CAN channel; wherein the pre-configured CAN channel is determined according to a business application.

[0099] Among them, the pre-configured CAN channel is determined according to the business application. For example, the CAN signal data required by the business application can be configured offline. The CAN signal data corresponds to a CAN channel (CANCHANNEL), and different business applications require signal data of different CAN channels to support it, so the CAN channel can be pre-configured for different business applications. Therefore, for any business application, the initial CAN frame can be cleaned according to the pre-configured CAN channel. Specifically, the pre-configured CAN channel is used to dynamically match the CAN channel of the initial CAN frame, remove the initial CAN frame that is inconsistent with the pre-configured CAN channel (such as CAN frames that are not related to the current business application or the current node), and retain the initial CAN frame that is consistent with the pre-configured CAN channel, that is, the CAN frame corresponding to the pre-configured CAN channel.

[0100] In the above implementation, by cleaning the initial CAN frame according to the preconfigured CAN identifier and the preconfigured CAN channel, a portion of data irrelevant to the business application (eg, 10% to 30%) can be removed, thereby reducing the system load.

[0101] In some embodiments, the initial CAN frame includes a first CAN frame and a second CAN frame; performing cleaning and filtering based on the initial CAN frame to obtain a target CAN frame may include: if an identifier of the first CAN frame is the same as an identifier of the second CAN frame, and message data of the first CAN frame is the same as message data of the second CAN frame, discarding one of the first CAN frame and the second CAN frame to obtain the target CAN frame.

[0102] In some cases, the initial frame is obtained through multiple channels, such as repeated information obtained through forwarding and other channels. It can be seen that there will be repeated CAN frames in the initial CAN frame, and the repeated CAN frames need to be removed from the initial CAN frame. The repeated CAN frames can be CAN frames with the same CAN identifier and the same message data. Among them, the CAN identifier can be a CAN identifier (CANID) or a CAN channel (CANCHANNEL).

[0103] Specifically, the initial CAN frame includes a first CAN frame and a second CAN frame. Compare the identifier of the first CAN frame and the identifier of the second CAN frame. If the identifier of the first CAN frame and the identifier of the second CAN frame are the same, compare the message data of the first CAN frame and the message data of the second CAN frame. If the message data of the first CAN frame and the message data of the second CAN frame are the same, it indicates that the first CAN frame or the second CAN frame is a repeated CAN frame. In order to reduce the computing resources occupied by the analysis, any one of the first CAN frame and the second CAN frame can be discarded, and the other can be retained to obtain the target CAN frame. It should be noted that after receiving some CAN frames, these CAN frames can also be temporarily stored when parsing these CAN frames, and these CAN frames can include the first CAN frame. When the second CAN frame is received, the temporarily stored CAN frame is regarded as the initial CAN frame together with the second CAN frame.

[0104] In this implementation, the system load is reduced by identifying repeated CAN frames in the initial CAN frame and removing the repeated CAN frames. It should be noted that, compared with the computing resources occupied by parsing the CAN frame, the computing resources occupied by comparing the message data of the first CAN frame and the message data of the second CAN frame are very small. To compare whether the message data of the first CAN frame and the message data of the second CAN frame are the same, it is only necessary to compare the two strings of binary codes, and it is very easy to determine whether the two strings of binary codes are the same, thereby reducing the system load.

[0105] In some embodiments, the identifier of the first CAN frame is compared with the identifier of the second CAN frame. If the identifier of the first CAN frame is the same as the identifier of the second CAN frame, the message data of the first CAN frame is compared with the message data of the second CAN frame. If the message data of the first CAN frame is the same as the message data of the second CAN frame, it indicates that the first CAN frame or the second CAN frame is a repeated CAN frame. Alternatively, the CAN channel of the first CAN frame is compared with the CAN channel of the second CAN frame. If the CAN channel of the first CAN frame is the same as the CAN channel of the second CAN frame, the message data of the first CAN frame is compared with the message data of the second CAN frame. If the message data of the first CAN frame is the same as the message data of the second CAN frame, it indicates that the first CAN frame or the second CAN frame is a repeated CAN frame.

[0106] In other embodiments, the CAN channel of the first CAN frame and the CAN channel of the second CAN frame, as well as the identifier of the first CAN frame and the identifier of the second CAN frame are compared. If the CAN channel of the first CAN frame and the CAN channel of the second CAN frame are the same and the identifier of the first CAN frame and the identifier of the second CAN frame are the same, the message data of the first CAN frame and the message data of the second CAN frame are compared. If the message data of the first CAN frame and the message data of the second CAN frame are the same, it indicates that the first CAN frame or the second CAN frame is a repeated CAN frame.

[0107] In some implementations, cleaning and filtering are performed based on the initial CAN frame to obtain a target CAN frame, including: if a new CAN frame is received, cleaning the new CAN frame and the initial CAN frame according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0108] In some cases, if part of the vehicle's signal data remains unchanged for a period of time, the message data of the collected CAN frame is repeated. For example, the battery temperature remains unchanged for a period of several hundred milliseconds, and the CAN signal collection period can be 5 milliseconds or 10 milliseconds. Then the message data of the CAN frame acquired within the period of several hundred milliseconds may be the same. Since parsing repeated CAN frames requires a certain amount of computing power and resources and is unnecessary, it is necessary to clean the new CAN frame and the intermediate CAN frame, while comparing the message data of the CAN frame is relatively simple. For example, only two strings of binary codes need to be compared to easily determine whether the two strings of binary codes are the same, thereby reducing the system load.

[0109] Specifically, the initial CAN frame is stored after it is received. Afterwards, when a new CAN frame is received, the CAN identifier of the new CAN frame is determined. The CAN identifier of the new CAN frame is compared with the identifier of the stored initial CAN frame. If the two are different, no processing is performed; if the two are the same, it is necessary to further confirm whether the message data of the two are the same. Therefore, the new CAN frame and the initial CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0110] If there is a CAN frame to be compared in the initial CAN frame that is continuous with the new CAN frame. Figure 4 , cleaning the new CAN frame and the initial CAN frame according to the CAN identifier and message data of the new CAN frame, which may include:

[0111] S410: If the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, compare the message data of the new CAN frame with the message data of the CAN frame to be compared.

[0112] S420: If the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, the new CAN frame is discarded.

[0113] Among them, the initial CAN frame is received and stored. The new CAN frame received later is continuous in time with some CAN frames in the initial CAN frame. Therefore, there are CAN frames to be compared that are continuous with the new CAN frame in the initial CAN frame. As mentioned above, since the message data of the collected CAN frame may be repeated and it is unnecessary to parse the repeated CAN frame, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame.

[0114] Specifically, first compare the CAN identifier of the CAN frame to be compared with the CAN identifier of the new CAN frame. If the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, it indicates that the new CAN frame may be repeated with the CAN frame to be compared in the initial CAN frame. Next, compare the message data of the new CAN frame with the message data of the CAN frame to be compared. If the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, it indicates that the new CAN frame is repeated with the CAN frame to be compared in the initial CAN frame, and there is no need to spend computing resources again to parse the new CAN frame, so the new CAN frame is discarded. It can be understood that although the new CAN frame is discarded, the parsing result of the CAN frame to be compared can be used as the parsing result of the new CAN frame in the subsequent parsing process.

[0115] In one example, the identifier of the CAN frame to be compared is compared with the identifier of the new CAN frame. If the identifiers are the same, the message data of the CAN frame to be compared is compared with the message data of the new CAN frame. If the message data are the same, it indicates that the CAN frame to be compared and the new CAN frame are repeated CAN frames. Alternatively, the CAN channel of the CAN frame to be compared is compared with the CAN channel of the new CAN frame. If the CAN channels are the same, the message data of the CAN frame to be compared is compared with the message data of the new CAN frame. If the message data are the same, it indicates that the CAN frame to be compared and the new CAN frame are repeated CAN frames.

[0116] In another example, the CAN channel of the CAN frame to be compared and the CAN channel of the new CAN frame, as well as the identifier of the CAN frame to be compared and the identifier of the new CAN frame are compared. If the channels of the two are the same and the identifiers of the two are the same, the message data of the two are compared. If the message data of the two are the same, it indicates that the CAN frame to be compared and the new CAN frame are repeated CAN frames.

[0117] It should be noted that if the message data of the new CAN frame is different from the message data of the CAN frame to be compared, it indicates that the new CAN frame is to be parsed, and the new CAN frame is retained.

[0118] In the above implementation, considering that the new CAN frame that is continuous with the initial CAN frame may be repeated with the initial CAN frame, the CAN identifiers of the two are compared first, and then the message data of the two are compared, so as to reduce the system load without missing the CAN signal data that needs to be parsed. If there are a large number of duplicate frames in the system, the duplicate frames will be cleaned up in this implementation, and the computing resources used to parse the duplicate frames will no longer be consumed, which can reduce the system load.

[0119] In some implementations, in order to shorten the time spent on the entire process after the DBC file is updated, the collected CAN signal data is parsed using the CAN configuration file. If the DBC file is changed, the DBC file can be quickly simplified to the CAN configuration file without modifying the parsing program. For details, please refer to Figure 5 , get the CAN configuration file by:

[0120] S510: Analyze the DBC file to extract content data required for parsing the CAN frame from the DBC file.

[0121] S520: Generate a CAN configuration file based on the extracted content data.

[0122] Among them, the DBC file includes a lot of information such as node configuration, network configuration, CAN frame configuration, signal attributes, etc. For the analysis of CAN signal data, node configuration, network configuration, etc. are irrelevant to the analysis of CAN signal data, while CAN frame configuration, signal attributes, etc. are related to the analysis of CAN signal data. Therefore, it is necessary to remove information such as node configuration and network configuration, and retain information such as CAN frame configuration and signal attributes, so as to generate a CAN configuration file based on the retained information.

[0123] Specifically, since the DBC file includes a large amount of configuration information, the configuration information included in the DBC file is disassembled and analyzed one by one, and the content data required for parsing the CAN frame (such as CAN frame configuration, signal attributes, etc.) is extracted therefrom. The extracted content data is stored according to the preset configuration file format, and a CAN configuration file is generated, so that the CAN signal data can be dynamically parsed in real time in a flexible manner through the CAN configuration file. Exemplarily, Python can be used to write script code, and the encoded script code can be used to analyze and disassemble all the configuration information in the DBC file, extract the content data required for parsing the CAN information, and generate the corresponding JSON configuration file. Exemplarily, please refer to Table 1, which shows the content data extracted from the DBC file.

[0124] Table 1

[0125]

[0126] It can be seen that the content data extracted from the DBC file includes the CAN identifier (CANID), CAN channel (CANCHANNEL), number of data bytes (CANLEN), target variable (DataName), data position (Position Info), scale factor (Factor), offset (Offset), and signal byte order (MotorOrIntel).

[0127] In the above implementation, the CAN configuration file is obtained by simplifying the complex DBC file in advance, so that the corresponding message parsing rules can be directly obtained from the CAN configuration file when parsing the CAN signal data. When the DBC file is changed, the new message parsing rules are quickly read from the CAN configuration corresponding to the changed DBC file, without modifying the parsing program, eliminating the development process of compiling, testing, and publishing after modifying the parsing program, and shortening the time spent on the entire process after the DBC file is updated.

[0128] In some implementations, the CAN configuration file adopts a preset storage format. Reading the message configuration information corresponding to the target CAN frame from the CAN configuration file includes: reading the message configuration information adopting a data structure corresponding to the preset storage format from the CAN configuration file.

[0129] The preset configuration file format may be any one of JSON, XML, and ini. Specifically, the content data required for CAN parsing is extracted from the DBC file, and the extracted content data is stored in a preset storage format to obtain a CAN configuration file. The preset storage format corresponds to a preset data structure. When a target CAN frame is obtained, in order to parse the target CAN frame, the message configuration information using the preset data structure is read from the CAN configuration file according to the identification information of the target CAN frame.

[0130] In the above implementation, the content data required for CAN parsing is read from the DBC file in a preset storage format and stored in the CAN configuration file, so that the message configuration information of the data structure corresponding to the preset storage format can be efficiently read from the configuration file to achieve real-time dynamic parsing of CAN signal data.

[0131] In some embodiments, message configuration information using a data structure corresponding to a preset storage format is read from a CAN configuration file, including: if the CAN configuration file uses a JSON format, reading message configuration information using a JSON format corresponding to a target CAN frame from the CAN configuration file; or, if the CAN configuration file uses an XML format, reading message configuration information using a markup language format corresponding to the target CAN frame from the CAN configuration file.

[0132] Among them, JSON (JavaScript Object Notation) is a lightweight data exchange format, which is often used to transmit and store data between different applications. If the CAN configuration file adopts the JSON format, the data in the CAN configuration file exists in the JSON pair format. XML is called Extensible Markup Language, which is a markup language used to describe and transmit data. XML can be used to mark the structure of data. The basic grammatical structure of XML is composed of a start tag, an end tag and the content between them. If the CAN configuration file adopts the XML format, the data in the CAN configuration file exists in the markup language format. Specifically, if the CAN configuration file adopts the JSON format, the message configuration information in the JSON pair format is read from the CAN configuration file according to the identification information of the target CAN frame, so as to parse the target CAN frame. If the CAN configuration file adopts the XML format, the message configuration information in the markup language format is read from the CAN configuration file according to the identification information of the target CAN frame, so as to parse the target CAN frame.

[0133] In the above implementation, the content data required for CAN parsing is read from the DBC file and a CAN configuration file in JSON format is generated accordingly, so that the message configuration information in JSON format can be efficiently read from the CAN configuration file to achieve real-time dynamic parsing of CAN signal data.

[0134] In some implementations, obtaining the CAN configuration file includes: obtaining the CAN configuration file from a vehicle-side file system.

[0135] In some cases, a communication connection is established between the vehicle and the cloud server to transmit vehicle information such as vehicle status, location, and driving data to the cloud server so that the cloud server can provide corresponding information services. Since the transmission of data collected by the vehicle to the cloud server will generate a delay of seconds, for some real-time business, the vehicle data collected locally needs to be parsed and processed in real time on the vehicle, rather than transmitted to the cloud server for parsing and processing. Therefore, the real-time dynamic parsing function of vehicle data also needs to be implemented in the vehicle software development.

[0136] Furthermore, the cloud server can obtain sufficient computing power and resource support when performing vehicle data analysis tasks, but the computing power and resources that the vehicle can provide are very limited. Therefore, the vehicle data analysis method implemented on the cloud server in the related art is no longer applicable to the vehicle-side software, so a new vehicle data analysis method for the vehicle-side needs to be provided.

[0137] Specifically, the DBC file is simplified to obtain a CAN configuration file, and the CAN configuration file is pre-stored in the vehicle-side file system of the vehicle. After the target CAN frame is obtained, the pre-stored CAN configuration file can be read from the vehicle-side file system, and the message configuration information corresponding to the target CAN frame can be read from the CAN configuration file, so as to parse the target CAN frame using the message configuration information to obtain the vehicle signal data.

[0138] In the above implementation, the CAN configuration file is stored in the vehicle-side file system, and when the CAN signal data is obtained, the CAN configuration file is obtained from the vehicle-side file system, and the CAN signal data is parsed using the configuration file. This parsing method is adapted to the computing power and resources of the vehicle-side, and the parsing of the CAN signal data is realized on the vehicle-side. Furthermore, the CAN configuration file is obtained by simplifying the DBC file, which can save storage space on the vehicle-side.

[0139] The vehicle data parsing method implemented on the cloud server is no longer applicable to the vehicle-side software. In the related art, a CAN data collection requirement file is formulated according to the business data requirements, which indicates the information of the CAN signal required for business collection. The CAN data collection requirement file is usually in Excel format, and the CAN data collection requirement file in Excel format is uploaded to the CAN parsing configuration management platform. If the vehicle data parsing method is executed on the vehicle side, the parsing code for implementing the vehicle data parsing method needs to be deployed in a chip with extremely limited computing power, such as an embedded SOC chip, and an ARM A core design can be used. It is understandable that the CAN data collection requirement file in Excel format in the related art is not applicable to vehicle-side chips (such as embedded SOC chips). Therefore, according to the type of vehicle-side chip running the vehicle data parsing method, the preset storage format (such as JSON or XML) of the CAN configuration file is determined, the content data required for CAN parsing is extracted from the DBC file, and the extracted content data is stored to obtain a CAN configuration file in JSON format or XML format.

[0140] In some implementations, the target CAN frame carries a target CAN identifier. Reading the message configuration information corresponding to the target CAN frame from the CAN configuration file includes: reading the message configuration information corresponding to the target CAN frame from the CAN configuration file according to the target CAN identifier.

[0141] The CAN frame has a CAN identifier, which may be a CAN identifier (CANID) or a CAN channel (CANCHANNEL). The target CAN frame carries a target CAN identifier, which may be a CANCHANNEL value of the target CAN frame or a CANID value of the target CAN frame.

[0142] Specifically, in some implementations, the CAN configuration file may store the correspondence between the CANID and the message configuration information. The CAN configuration file may be searched according to the CANID value of the target CAN frame to obtain the message configuration information (CANData) corresponding to the target CAN frame.

[0143] In some other implementations, the CAN configuration file may store the correspondence between the CAN channel and the message configuration information. The CAN configuration file may be searched according to the CANCHANNEL value of the target CAN frame to obtain the message configuration information corresponding to the target CAN frame.

[0144] In other embodiments, the CAN configuration file may store the correspondence between the CAN channel, the CAN identifier and the message configuration information. The message configuration information corresponding to the target CAN frame may be obtained by searching the CAN configuration file according to the CANCHANNEL value and / or CANID value of the target CAN frame.

[0145] In the above implementation, by reading the message configuration information corresponding to the target CAN frame from the CAN configuration file according to the target CAN identifier of the target CAN frame, and parsing the target CAN frame using the read message configuration information, real-time dynamic parsing of CAN signal data is achieved, providing a data basis for subsequent business needs.

[0146] In some implementations, the message configuration information includes a target variable, a signal data location, an offset, and a proportionality factor. Figure 6 , parse the target CAN frame based on the message configuration information to obtain vehicle signal data, including:

[0147] S610. Obtain an initial value of a target variable from a target CAN frame according to a signal data position.

[0148] S620: Calculate the initial value based on the offset and the proportional coefficient to obtain signal data of the target variable.

[0149] Specifically, when the target CAN frame needs to be parsed, the message configuration information corresponding to the target CAN frame is read from the CAN configuration file according to the target CAN identifier of the target CAN frame. Because the message configuration information contains the target variable, signal data position, offset, and proportional coefficient, the initial data of the target variable is first truncated from the target CAN frame according to the signal data position to obtain the initial value of the target variable. Then, the initial value is calculated using the offset and the proportional coefficient to obtain the actual physical value of the target variable, that is, the signal data of the target variable. Exemplarily, the actual physical value V of the target variable can be calculated using the following formula:

[0150] V=V0*Factor+Offset

[0151] Among them, V0 is the initial value of the target variable, Factor is the proportional coefficient, and Offset is the offset.

[0152] In the above implementation, the target CAN frame is parsed through the target variable, signal data position, offset, and proportional coefficient in the message configuration information to obtain the signal data of the target variable. Accurate signal data can be parsed from the target CAN to meet the data requirements of subsequent services.

[0153] In some implementations, in order to reduce the system load caused by parsing CAN signal data, it is necessary to clean the initial CAN frame to reduce the amount of data parsing. Figure 7a , get the target CAN frame by:

[0154] S710a, obtain an initial CAN frame.

[0155] S720a, clean and filter the initial CAN frame to obtain an intermediate CAN frame.

[0156] S730a. Determine a target CAN frame based on the intermediate CAN frame.

[0157] Specifically, CAN signal data can be obtained through multiple channels, and CAN signal data includes several initial CAN frames. There are some redundant data and data that do not need to be parsed in the initial CAN frame. Therefore, the initial CAN frame can be cleaned and filtered according to business needs to obtain the intermediate CAN frame required by the business needs. By analyzing the actual situation of CAN signal data, it is found that there is still data that does not need to be parsed in the intermediate CAN frame obtained by cleaning and filtering. Therefore, in order to further reduce the data parsing work, the intermediate CAN frame can continue to be cleaned and filtered to obtain the target CAN frame.

[0158] Exemplarily, after the initial CAN frame is cleaned and filtered for the first time using the CAN identification information, the intermediate CAN frame is obtained and stored. The intermediate CAN frame can be cleaned and filtered for the second time to obtain the target CAN frame. For example, when a new CAN frame is received, the CAN identifier of the new CAN frame is determined. The CAN identifier of the new CAN frame is compared with the identifier of the stored intermediate CAN frame. If the two are different, no processing is performed; if the two are the same, it is necessary to further confirm whether the message data of the two are the same. Therefore, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame. It should be noted that if the vehicle data parsing method in this embodiment runs on the vehicle side, the computing power and resources of the vehicle side are limited, and it is more necessary to reduce the system load caused by parsing the data. Therefore, the initial CAN frame is cleaned and filtered (once or twice) to obtain the target CAN frame.

[0159] In the above implementation, by cleaning and filtering the initial CAN frame to obtain the intermediate CAN frame, the amount of data irrelevant to the business application (for example, 10% to 30%) can be removed to reduce the system load.

[0160] In some implementations, determining the target CAN frame based on the intermediate CAN frame includes: if a new CAN frame is received, cleaning the new CAN frame and the intermediate CAN frame according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0161] Specifically, the initial CAN frame is cleaned and filtered to obtain and store the intermediate CAN frame. After that, when a new CAN frame is received, the CAN identifier of the new CAN frame is determined. The CAN identifier of the new CAN frame is compared with the identifier of the stored intermediate CAN frame. If the two are different, no processing is performed; if the two are the same, it is necessary to further confirm whether the message data of the two are the same. Therefore, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0162] In the above implementation, taking into account the characteristics that CAN signal data remains unchanged in some time periods and the collection cycle of CAN frames, the received new CAN frames and intermediate CAN frames are cleaned to further reduce the system load and release the computing power resources occupied by parsing repeated CAN frames, which is more suitable for the computing power resources on the vehicle side and improves the stability and accuracy of vehicle data analysis.

[0163] In some implementations, there are CAN frames to be compared that are continuous with the new CAN frame in the intermediate CAN frame. Figure 7b , cleaning the new CAN frame and the intermediate CAN frame according to the CAN identifier and message data of the new CAN frame, which may include:

[0164] S710b, if the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, compare the message data of the new CAN frame with the message data of the CAN frame to be compared.

[0165] S720b: If the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, the new CAN frame is discarded.

[0166] Among them, the initial CAN frame is cleaned and filtered to obtain the intermediate CAN frame and store it. The new CAN frame received later is continuous in time with some CAN frames in the intermediate CAN frame. Therefore, there are CAN frames to be compared that are continuous with the new CAN frame in the intermediate CAN frame. As mentioned above, since the message data of the collected CAN frame may be repeated and it is unnecessary to parse the repeated CAN frame, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier of the new CAN frame.

[0167] Specifically, first compare the CAN identifier of the CAN frame to be compared with the CAN identifier of the new CAN frame. If the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, it indicates that the new CAN frame may be repeated with the CAN frame to be compared in the intermediate CAN frame. Next, compare the message data of the new CAN frame with the message data of the CAN frame to be compared. If the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, it indicates that the new CAN frame is repeated with the CAN frame to be compared in the intermediate CAN frame, and there is no need to spend computing resources to parse the new CAN frame again, so the new CAN frame is discarded. It should be noted that if the message data of the new CAN frame is different from the message data of the CAN frame to be compared, it indicates that the new CAN frame is to be parsed, and the new CAN frame is retained.

[0168] It should be noted that compared with the computing resources occupied by parsing the CAN frames, the computing resources occupied by comparing the message data of the CAN frame to be compared with the message data of the new CAN frame are very small. To compare whether the message data of the CAN frame to be compared and the message data of the new CAN frame are the same, it is only necessary to compare the two strings of binary codes. It can be very easy to determine whether the two strings of binary codes are the same, thereby reducing the system load.

[0169] In the above implementation, considering that the new CAN frame that is continuous with the middle CAN frame may be repeated with the middle CAN frame, the CAN identifiers of the two are compared first, and then the message data of the two are compared, so as to reduce the system load without missing the CAN signal data that needs to be parsed. If there are a large number of duplicate frames in the system, the duplicate frames are cleaned up in this implementation, and the computing power resources of the duplicate frames are no longer consumed, which can reduce the system load.

[0170] In some embodiments, obtaining the initial CAN frame includes: obtaining the initial CAN frame by Ethernet forwarding; and / or obtaining the initial CAN frame through a CAN interface; and / or obtaining the initial CAN frame by inter-core communication.

[0171] In the above implementation, the vehicle side obtains the initial CAN frame through multiple channels, such as at least one of Ethernet forwarding, CAN interface, inter-core communication (IPCF), etc., so as to obtain CAN signal data more comprehensively.

[0172] In some implementations, the method may further include: receiving a new CAN configuration file when the DBC file is changed, wherein the new CAN configuration file is obtained by simplifying the changed DBC file.

[0173] Specifically, if the DBC file is changed, in order to accurately parse the CAN signal data, the corresponding CAN configuration file needs to be updated in time. Therefore, the changed DBC file is simplified again to obtain a new CAN configuration file.

[0174] In some implementations, the new CAN configuration file can be sent to the vehicle end, the vehicle end receives the new CAN configuration file and stores it in the vehicle end file system. When CAN signal data is received later, the new CAN configuration file is obtained from the vehicle end file system, and the received CAN signal data is parsed using the new CAN configuration file.

[0175] In the related art, when a DBC file is changed, the parsing code corresponding to the DBC file needs to be modified, and the development process such as compilation, testing, and release needs to be performed. However, in the present embodiment, the parsing code corresponding to the DBC file does not need to be modified, but the changed DBC file is simplified again to obtain a new CAN configuration file, and the DBC file is automatically converted to the CAN configuration file quickly. Accordingly, the subsequent development process such as compilation, testing, and release is no longer required, which greatly reduces the development workload and can reduce the time consumption of the overall process to minutes.

[0176] This specification provides a vehicle data analysis method, which is applied to the vehicle side. Figure 8 , the vehicle data parsing method comprises the following steps:

[0177] S802, obtaining an initial CAN frame;

[0178] Specifically, the initial CAN frame is obtained by Ethernet forwarding; and / or, the initial CAN frame is obtained through a CAN interface; and / or, the initial CAN frame is obtained through inter-core communication.

[0179] S804, cleaning and filtering the initial CAN frame to obtain and store the intermediate CAN frame;

[0180] Specifically, a preconfigured CAN identifier is dynamically matched with a CAN identifier of an initial CAN frame to obtain an intermediate CAN frame corresponding to the preconfigured CAN identifier; wherein the preconfigured CAN identifier is determined according to a business application; and / or, a preconfigured CAN channel is dynamically matched with a CAN channel of an initial CAN frame to obtain an intermediate CAN frame corresponding to the preconfigured CAN channel; wherein the preconfigured CAN channel is determined according to a business application; and / or, CAN frames with the same CAN identifier are removed from the initial CAN frame to obtain intermediate CAN frames.

[0181] S806: If a new CAN frame is received, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame to obtain a target CAN frame.

[0182] Specifically, there is a CAN frame to be compared that is continuous with the new CAN frame in the intermediate CAN frame; if the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, compare the message data of the new CAN frame with the message data of the CAN frame to be compared; if the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, discard the new CAN frame.

[0183] S808. Obtain a CAN configuration file from the vehicle-side file system.

[0184] The CAN configuration file is obtained by simplifying the DBC file, and the CAN configuration file adopts the JSON format. Specifically, the DBC file is analyzed to extract the content data required for parsing the CAN frame from the DBC file; and the CAN configuration file in the JSON format is generated based on the extracted content data.

[0185] S810. Read message configuration information corresponding to the target CAN frame from the CAN configuration file.

[0186] Wherein, the CAN configuration file adopts JSON format, and the message configuration information in the CAN configuration file adopts JSON pair format. Specifically, since the target CAN frame has a target CAN identifier, the message configuration information in JSON pair format corresponding to the target CAN frame is read from the CAN configuration file according to the target CAN identifier of the target CAN frame.

[0187] S812. Parse the target CAN frame based on the message configuration information to obtain vehicle signal data.

[0188] The message configuration information includes the target variable, signal data position, offset, and proportional coefficient. Specifically, according to the signal data position, the initial value of the target variable is obtained from the target CAN frame; the initial value is calculated based on the offset and the proportional coefficient to obtain the signal data of the target variable.

[0189] S814. When the DBC file is changed, a new CAN configuration file is received and stored in the vehicle-side file system.

[0190] The new CAN configuration file is obtained by simplifying the changed DBC file. Specifically, after the DBC file is changed, if a new target CAN frame is received, the new CAN configuration file is used to parse the new target CAN frame to obtain corresponding vehicle signal data.

[0191] In the above implementation, on the one hand, the initial CAN frame is cleaned for the first time to obtain the intermediate CAN frame, which can reduce the system load by about 10% to 30%. If a new CAN frame is received, the new CAN frame and the intermediate CAN frame are cleaned for the second time according to the CAN identifier and message data of the new CAN frame, which can reduce the system load by about 40%. On the other hand, the complex DBC file is analyzed to generate the CAN configuration file required for CAN frame parsing, and it is pre-stored in the vehicle-side file system. The above two aspects can realize real-time dynamic parsing of vehicle-side CAN data.

[0192] This specification provides a vehicle data analysis device. Fig. 9 The vehicle data analysis device 900 includes: an acquisition module 910, a reading module 920, and a analysis module 930.

[0193] The acquisition module 910 is used to acquire a target CAN frame and a CAN configuration file; wherein the CAN configuration file is obtained by simplifying the DBC file;

[0194] A reading module 920, configured to read message configuration information corresponding to the target CAN frame from the CAN configuration file;

[0195] The parsing module 930 is used to parse the target CAN frame based on the message configuration information to obtain vehicle signal data.

[0196] In some implementations, the acquisition module 910 is further configured to acquire an initial CAN frame; and perform cleaning and filtering based on the initial CAN frame to obtain the target CAN frame.

[0197] In some implementations, the acquisition module 910 is further configured to filter the CAN frames that match the preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame.

[0198] In some embodiments, the acquisition module 910 is also used to dynamically match the CAN identifier of the initial CAN frame using a preconfigured CAN identifier, and filter the CAN frames corresponding to the preconfigured CAN identifier; wherein the preconfigured CAN identifier is determined based on the business application; and / or, dynamically match the CAN channel of the initial CAN frame using a preconfigured CAN channel, and filter the CAN frames corresponding to the preconfigured CAN channel; wherein the preconfigured CAN channel is determined based on the business application.

[0199] In some embodiments, the initial CAN frame includes a first CAN frame and a second CAN frame; the acquisition module 910 is also used to discard one of the first CAN frame and the second CAN frame and retain the other to obtain the target CAN frame if the identifier of the first CAN frame is the same as the identifier of the second CAN frame, and the message data of the first CAN frame is the same as the message data of the second CAN frame.

[0200] In some implementations, the acquisition module 910 is further configured to, if a new CAN frame is received, clean the new CAN frame and the initial CAN frame according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0201] In some embodiments, there is a CAN frame to be compared that is continuous with the new CAN frame in the initial CAN frame; the acquisition module 910 is also used to compare the message data of the new CAN frame with the message data of the CAN frame to be compared if the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame; if the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, discard the new CAN frame.

[0202] In some implementations, the acquisition module 910 is further configured to perform cleaning and filtering based on the initial CAN frame to obtain an intermediate CAN frame; and determine the target CAN frame based on the intermediate CAN frame.

[0203] In some implementations, the acquisition module 910 is further configured to, if a new CAN frame is received, clean the new CAN frame and the intermediate CAN frame according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame.

[0204] In some embodiments, there is a CAN frame to be compared that is continuous with the new CAN frame in the intermediate CAN frame; the acquisition module 910 is also used to compare the message data of the new CAN frame with the message data of the CAN frame to be compared if the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame; if the message data of the new CAN frame is the same as the message data of the CAN frame to be compared, discard the new CAN frame.

[0205] In some implementations, the CAN configuration file is obtained by: analyzing the DBC file to extract content data required for parsing CAN frames from the DBC file; and generating the CAN configuration file based on the extracted content data.

[0206] In some implementations, the CAN configuration file adopts a preset storage format; the reading module 920 is further used to read message configuration information in a data structure corresponding to the preset storage format from the CAN configuration file.

[0207] In some embodiments, the reading module 920 is also used to read the message configuration information in the JSON format corresponding to the target CAN frame from the CAN configuration file if the CAN configuration file adopts the JSON format; or, if the CAN configuration file adopts the XML format, read the message configuration information in the markup language format corresponding to the target CAN frame from the CAN configuration file.

[0208] In some implementations, the acquisition module 910 is further configured to acquire the CAN configuration file from the vehicle-side file system.

[0209] In some implementations, the target CAN frame carries a target CAN identifier; the reading module 920 is further configured to read the message configuration information corresponding to the target CAN frame from the CAN configuration file according to the target CAN identifier.

[0210] In some embodiments, the message configuration information includes a target variable, a signal data position, an offset, and a proportional coefficient; the parsing module 930 is also used to obtain an initial value of the target variable from the target CAN frame according to the signal data position; and calculate the initial value based on the offset and the proportional coefficient to obtain the signal data of the target variable.

[0211] In some embodiments, the acquisition module 910 is also used to obtain the initial CAN frame through Ethernet forwarding; and / or, to obtain the initial CAN frame through a CAN interface; and / or, to obtain the initial CAN frame through inter-core communication.

[0212] In some embodiments, the vehicle data analysis device 900 also includes a configuration file receiving module, which is used to receive a new CAN configuration file and store it in the vehicle-side file system when the DBC file changes; wherein the new CAN configuration file is obtained by simplifying the changed DBC file.

[0213] It should be noted that, for the description of the vehicle data analysis device in the implementation manner of this specification, please refer to the description of the vehicle data analysis method in this specification, and the details will not be repeated here.

[0214] An embodiment of the present specification provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the method described in any of the above embodiments is implemented.

[0215] In some embodiments, a computer device is provided, whose internal structure diagram can be as follows: Fig.10 As shown. The electronic device includes a processor, a memory, and a communication interface connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores a computer program. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, the method in any of the above embodiments is implemented.

[0216] Those skilled in the art will understand that Fig.10 The structure shown in the figure is merely a block diagram of a portion of the structure related to the scheme disclosed in this specification, and does not constitute a limitation on the electronic device to which the scheme disclosed in this specification is applied. Specifically, the electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0217] An embodiment of the present specification provides an electronic device, including: a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above embodiments is implemented.

[0218] The present specification also provides a computer program product, which includes instructions. The instructions can be executed by a processor of an electronic device to implement the method steps in the above-mentioned embodiment.

[0219] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0220] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.

Claims

1. A vehicle data analysis method, characterized in that: The method comprises: Obtain a target CAN frame and a CAN configuration file; wherein the CAN configuration file is obtained by simplifying the DBC file; Reading message configuration information corresponding to the target CAN frame from the CAN configuration file; Parsing the target CAN frame based on the message configuration information to obtain vehicle signal data; Wherein, the acquiring of the target CAN frame comprises: Get the initial CAN frame; Filtering the CAN frames matching the preset configuration CAN identifier in the initial CAN frames to obtain the target CAN frames; The obtaining of the CAN configuration file comprises: obtaining the CAN configuration file from a vehicle-side file system, wherein the CAN configuration file is pre-stored in the vehicle-side file system of the vehicle; The screening of CAN frames matching the preset configuration CAN identifier in the initial CAN frame includes: Dynamically matching a preconfigured CAN identifier with the CAN identifier of the initial CAN frame to screen a CAN frame corresponding to the preconfigured CAN identifier; wherein the preconfigured CAN identifier is determined according to a business application; and / or The pre-configured CAN channel is dynamically matched with the CAN channel of the initial CAN frame to filter the CAN frame corresponding to the pre-configured CAN channel; wherein the pre-configured CAN channel is determined according to the business application.

2. The method according to claim 1, characterized in that The initial CAN frame includes a first CAN frame and a second CAN frame; the step of screening a CAN frame matching a preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame includes: If the identifier of the first CAN frame is the same as the identifier of the second CAN frame, and the message data of the first CAN frame is the same as the message data of the second CAN frame, one of the first CAN frame and the second CAN frame is discarded and the other is retained to obtain the target CAN frame; the identifier is a CAN identifier or a CAN channel.

3. The method according to claim 1, characterized in that The step of screening the CAN frame matching the preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame includes: Perform cleaning and filtering based on the initial CAN frame to obtain an intermediate CAN frame; The target CAN frame is determined based on the intermediate CAN frame.

4. The method according to claim 3, characterized in that The determining the target CAN frame based on the intermediate CAN frame comprises: If a new CAN frame is received, the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame to obtain the target CAN frame; the identifier is a CAN identifier or a CAN channel.

5. The method according to claim 4, characterized in that The intermediate CAN frame contains a CAN frame to be compared that is continuous with the new CAN frame; and the new CAN frame and the intermediate CAN frame are cleaned according to the CAN identifier and message data of the new CAN frame, including: If the CAN identifier of the CAN frame to be compared is the same as the CAN identifier of the new CAN frame, comparing the message data of the new CAN frame with the message data of the CAN frame to be compared; If the message data of the new CAN frame is identical to the message data of the CAN frame to be compared, the new CAN frame is discarded.

6. The method according to any one of claims 1 to 5, characterized in that: The CAN configuration file is obtained in the following way: Analyzing the DBC file to extract content data required for parsing the CAN frame from the DBC file; The CAN configuration file is generated based on the extracted content data.

7. The method according to any one of claims 1 to 5, characterized in that: The CAN configuration file adopts a preset storage format; the reading of the message configuration information corresponding to the target CAN frame from the CAN configuration file includes: Message configuration information using a data structure corresponding to the preset storage format is read from the CAN configuration file.

8. The method according to claim 7, characterized in that The step of reading the message configuration information using the data structure corresponding to the preset storage format from the CAN configuration file includes: If the CAN configuration file adopts the JSON format, read the message configuration information in the JSON format corresponding to the target CAN frame from the CAN configuration file; or If the CAN configuration file adopts XML format, the message configuration information in markup language format corresponding to the target CAN frame is read from the CAN configuration file.

9. The method according to any one of claims 1 to 5, characterized in that: The target CAN frame carries a target CAN identifier; the reading of message configuration information corresponding to the target CAN frame from the CAN configuration file includes: According to the target CAN identifier, the message configuration information corresponding to the target CAN frame is read from the CAN configuration file.

10. The method according to any one of claims 1 to 5, characterized in that: Get the initial CAN frame, including: Acquire the initial CAN frame by forwarding through Ethernet; and / or Acquire the initial CAN frame via a CAN interface; and / or The initial CAN frame is obtained by means of inter-core communication.

11. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the DBC file is changed, a new CAN configuration file is received; wherein the new CAN configuration file is obtained by simplifying the changed DBC file.

12. A vehicle data analysis device, characterized in that: The device comprises: An acquisition module is used to acquire a target CAN frame and a CAN configuration file; wherein the CAN configuration file is obtained by simplifying the DBC file; The acquisition module is further used to acquire an initial CAN frame, and select a CAN frame matching a preset configuration CAN identifier in the initial CAN frame to obtain the target CAN frame; The acquisition module is further used to acquire the CAN configuration file from the vehicle-side file system, wherein the CAN configuration file is pre-stored in the vehicle-side file system of the vehicle; A reading module, used for reading the message configuration information corresponding to the target CAN frame from the CAN configuration file; A parsing module, used for parsing the target CAN frame based on the message configuration information to obtain vehicle signal data; The acquisition module is further used to dynamically match the CAN identifier of the initial CAN frame using a pre-configured CAN identifier, and filter the CAN frame corresponding to the pre-configured CAN identifier; wherein the pre-configured CAN identifier is determined according to the business application; and / or, dynamically match the CAN channel of the initial CAN frame using a pre-configured CAN channel, and filter the CAN frame corresponding to the pre-configured CAN channel; wherein the pre-configured CAN channel is determined according to the business application.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.

15. A vehicle, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Automobile CAN data automatic analysis method and system, computer readable storage medium and electronic equipment

    CN114979314A