A vehicle data collection method, system, and electronic device

By using a CANFD analyzer to receive and classify vehicle data, the problem of low data transmission efficiency of CAN analyzers is solved, enabling efficient data acquisition and analysis, and improving user experience and system intelligence.

CN119472378BActive Publication Date: 2026-01-23CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411454494.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2026-01-23
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Existing CAN analyzers are inefficient at receiving CAN bus data and cannot effectively process large amounts of data, resulting in low data transmission efficiency.

Method used

The CANFD analyzer receives vehicle data and converts the data into a JAVA object structure through deserialization. The data is then classified according to frame ID and grouped by collection time point to form target datasets for various business types. Finally, the data is pushed to the front end.

Benefits of technology

It improves data transmission efficiency, enables the orderly organization and classification of data, enhances data analysis efficiency and user interaction experience, and supports real-time monitoring and decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472378B_ABST
    Figure CN119472378B_ABST
Patent Text Reader

Abstract

The application provides a vehicle data collection method, system and electronic equipment, relates to the technical field of data collection, and receives message data of a vehicle sent by a CANFD analyzer; the message data is subjected to deserialization processing to obtain target data satisfying a JAVA object structure; according to the structure types of various data in the target data, the frame IDs of the various data are determined; the target data is classified according to the categories of the frame IDs to obtain target data sets corresponding to various business types; the target data set corresponding to any business type is grouped according to the data collection time points to obtain business data of the business type at multiple time points, and the business data is pushed to the front end. The message data is obtained through the CANFD analyzer, the data transmission efficiency is improved, in addition, the data is classified according to the frame IDs and grouped according to the collection time points, which helps to improve the data analysis efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data acquisition technology, and in particular to a vehicle data acquisition method, system, and electronic device. Background Technology

[0002] Currently, with the widespread intelligence of passenger vehicles, the CAN (Controller Area Network) bus data of vehicles will become increasingly important. For example, the CAN bus data can be used to monitor vehicle status, diagnose faults, optimize the power system, realize autonomous driving functions, collect real-time performance data, and conduct vehicle network security analysis.

[0003] However, the mainstream data acquisition solution involves integrating a CAN analyzer using the C# language to receive data. But as the amount of data on the CAN bus increases, the CAN analyzer can only receive 8 bytes of data at a time, resulting in low data transmission efficiency.

[0004] Therefore, a new method for collecting vehicle data is urgently needed. Summary of the Invention

[0005] In view of the above problems, embodiments of this application provide a vehicle data acquisition method, system, and electronic device to overcome or at least partially solve the above problems.

[0006] In a first aspect, this application provides a vehicle data collection method applied to a client, the method comprising:

[0007] Receive vehicle message data from the CANFD analyzer;

[0008] The message data is deserialized to obtain target data that conforms to the JAVA object structure.

[0009] Based on the structure type of each piece of data in the target data, determine the frame ID of each piece of data;

[0010] The target data is classified according to the category of the frame ID to obtain target datasets corresponding to various service types.

[0011] The target dataset corresponding to any of the aforementioned business types is grouped according to the data collection time points to obtain business data for the aforementioned business type at multiple time points, and the business data is pushed to the front end.

[0012] Optionally, the service type is a first service type, and the step of classifying the target data according to the category of the frame ID to obtain target datasets corresponding to various service types includes:

[0013] Compare the frame ID of each data in the target data with the target frame ID corresponding to the first service type;

[0014] Data in the target data that is the same category as the target frame ID is retained, while data in the target data that is not the same category as the target frame ID is deleted.

[0015] Optionally, grouping the target dataset corresponding to any of the aforementioned business types according to the data collection time points to obtain business data for the business type at multiple time points includes:

[0016] Obtain the collection time points of all data in the target dataset corresponding to any of the aforementioned business types;

[0017] All data in the target dataset are grouped according to their respective collection time points to obtain the target data subset for each business type at each time point;

[0018] Each of the target data subsets is parsed to obtain the business data of the business type at multiple time points.

[0019] Optionally, grouping all data in the target dataset according to their respective collection time points to obtain a subset of target data for each business type at each time point includes:

[0020] Sort all the data in the target dataset according to their respective collection time points to obtain the sorted target dataset;

[0021] Data with the same time point in the sorted target dataset are grouped together to obtain multiple subsets of the target data.

[0022] Optionally, after obtaining the target data subset for the business type at each point in time, the method further includes:

[0023] Determine the minimum frame ID of the target data subset based on the frame IDs of all data in any given target data subset;

[0024] The acquisition time point corresponding to the smallest frame ID in each of the target data subsets is determined as the time point identifier of the target data subset.

[0025] A second aspect of this application provides a vehicle data collection method, applied to a vehicle, the method comprising:

[0026] Receive CAN bus data from the vehicle using a CANFD analyzer;

[0027] The CAN bus data is converted into message data, and the message data is sent to the client.

[0028] Optionally, the configuration method of the CANFD analyzer includes:

[0029] Invoke the start command of the CANFD analyzer, and determine the channel address of the CANFD analyzer according to the start command;

[0030] The setup instructions of the CANFD analyzer are invoked, and the bit rate, baud rate, and channel parameters of the CANFD analyzer are set and initialized according to the setup instructions.

[0031] A third aspect of this application provides a vehicle data acquisition system for use on a client side, the system comprising:

[0032] The first receiving module is used to receive vehicle message data sent by the CANFD analyzer;

[0033] The data processing module is used to deserialize the message data to obtain target data that conforms to the JAVA object structure.

[0034] The determining module is used to determine the frame ID of each piece of data according to the structure type of each piece of data in the target data;

[0035] The classification module is used to classify the target data according to the category of the frame ID to obtain target datasets corresponding to various business types.

[0036] The grouping module is used to group the target dataset corresponding to any of the aforementioned business types according to the data collection time points, obtain the business data of the business type at multiple time points, and push the business data to the front end.

[0037] Optionally, the business type is a first business type, and the classification module for classifying the target data according to the category of the frame ID to obtain target datasets corresponding to various business types includes:

[0038] The comparison submodule is used to compare the frame ID of each data in the target data with the target frame ID corresponding to the first service type;

[0039] The data processing submodule is used to retain data in the target data that is the same as the target frame ID category, and to delete data in the target data that is not the same as the target frame ID category.

[0040] Optionally, the grouping module for grouping the target dataset corresponding to any of the aforementioned business types according to the data collection time points to obtain business data for the business type at multiple time points includes:

[0041] The acquisition submodule is used to acquire the collection time points of all data in the target dataset corresponding to any of the aforementioned business types;

[0042] The grouping submodule is used to group all the data in the target dataset according to their respective collection time points to obtain the target data subset of the business type at each time point;

[0043] The parsing submodule is used to parse each of the target data subsets to obtain the business data of the business type at multiple time points.

[0044] Optionally, the step of grouping all data in the target dataset according to their respective collection time points to obtain a target data subset for each business type at each time point, the grouping submodule includes:

[0045] The sorting subunit is used to sort all the data in the target dataset according to their respective collection time points to obtain the sorted target dataset.

[0046] Grouping subunits are used to group data with the same time point in the sorted target dataset into multiple target data subsets.

[0047] Optionally, the system further includes:

[0048] The first determining submodule is used to determine the minimum frame ID of the target data subset based on the frame IDs of all data in any target data subset.

[0049] The second determining submodule is used to determine the acquisition time point corresponding to the smallest frame ID in each of the target data subsets as the time point identifier of the target data subset.

[0050] A fourth aspect of this application provides a vehicle data acquisition system applied to a vehicle, the system comprising:

[0051] The second receiving module is used to receive CAN bus data from the vehicle via a CANFD analyzer;

[0052] The data conversion module is used to convert the CAN bus data into message data and send the message data to the client.

[0053] Optionally, the system further includes:

[0054] The first calling submodule is used to call the start command of the CANFD analyzer and determine the channel address of the CANFD analyzer according to the start command;

[0055] The second calling submodule is used to call the setting instructions of the CANFD analyzer, and set the bit rate, baud rate and initialize the channel parameters of the CANFD analyzer according to the setting instructions.

[0056] A fifth aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the vehicle data acquisition method as described in the first and / or second aspects of this application.

[0057] The beneficial effects of this application are:

[0058] This application provides a vehicle data acquisition method, the method comprising: receiving vehicle message data sent from a CANFD analyzer; deserializing the message data to obtain target data that conforms to the JAVA object structure; determining the frame ID of each data according to the structure type of each data in the target data; classifying the target data according to the category of the frame ID to obtain target datasets corresponding to various service types; grouping the target datasets corresponding to any one of the service types according to the data acquisition time points to obtain service data of the service type at multiple time points, and pushing the service data to the front end.

[0059] This application receives message data from a CANFD analyzer and then deserializes this data into target data conforming to a JAVA object structure. Next, it determines the frame ID of each data point and categorizes the target data by frame ID, forming target datasets corresponding to multiple service types. Finally, the target datasets for any service type are grouped according to the data acquisition time point, and the service data is pushed to the front end. This application uses a CANFD analyzer to acquire message data, improving data transmission efficiency. Furthermore, by classifying the data by frame ID and grouping it according to the acquisition time point, multiple frame IDs at the same acquisition time point are processed into a group of service data, thereby contributing to improved data analysis efficiency. Attached Figure Description

[0060] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart illustrating the steps of a vehicle data collection method applied to a client, as provided in an embodiment of this application.

[0062] Figure 2 This is a flowchart of a vehicle data acquisition method provided in an embodiment of this application;

[0063] Figure 3 This is a flowchart illustrating the steps of a vehicle data collection method applied to a vehicle, as provided in an embodiment of this application.

[0064] Figure 4 This is a flowchart illustrating the configuration process of a CANFD analyzer provided in an embodiment of this application.

[0065] Figure 5 This is a schematic diagram of a vehicle data acquisition system applied to a client, provided in an embodiment of this application;

[0066] Figure 6 This is a schematic diagram of a vehicle data acquisition system applied to a vehicle, provided in an embodiment of this application;

[0067] Figure 7 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0068] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0069] In view of the above problems, the first aspect of the present application provides a vehicle data collection method, applied to a client, the method as follows: Figure 1 As shown, it includes:

[0070] Step S101: Receive vehicle message data sent from the CANFD analyzer.

[0071] In this step, communication is first established with the CANFD (Controller Area Network Flexible Data-rate) analyzer via the connection interface, ensuring the stability of the data transmission channel. This process typically involves selecting an appropriate connection method (such as USB, serial port, or network interface) and performing necessary authentication to ensure the analyzer can correctly recognize and receive data requests.

[0072] After successful connection, it enters continuous listening mode, receiving message data from the CANFD analyzer in real time. This message data may include various information, such as vehicle status (e.g., throttle position, brake status), sensor readings (e.g., temperature, speed, RPM), and fault codes. To ensure the integrity and accuracy of vehicle data acquisition, the received vehicle data undergoes preliminary verification and filtering to remove invalid or redundant information.

[0073] Furthermore, in practical applications, the frequency and time interval of data reception can be set to optimize data transmission efficiency and reduce potential latency. This information not only supports dynamic vehicle monitoring but also lays a solid foundation for subsequent data processing and analysis, ensuring timely identification and response to anomalies in vehicle operation, thereby improving vehicle safety and performance. Ultimately, through in-depth analysis of this data, engineers and developers can extract valuable insights to optimize vehicle design and enhance the user experience.

[0074] Step S102: Deserialize the message data to obtain target data that conforms to the JAVA object structure.

[0075] In this step, the message data is deserialized to obtain target data that conforms to the Java object structure. This process first parses the received raw message data, extracting valid information according to a predefined protocol format. Then, a deserialization algorithm is used to convert this information into Java objects, making it conform to the object structure of the Java programming language. This conversion not only ensures the structured and easily manageable data but also facilitates subsequent data processing and analysis, enabling the target data to be effectively manipulated and invoked within the Java environment. In practical applications, target data conforming to the Java object structure can be... , , Furthermore, this step fully utilizes the characteristics of JAVA in the web service field, exhibiting excellent portability. Moreover, JAVA has extensive applications in interface services, providing strong technical support for the subsequent development of data cloud migration functions.

[0076] Step S103: Determine the frame ID of each piece of data according to the structure type of each piece of data in the target data.

[0077] In this step, the frame ID of each data point is determined based on its structural type. This process begins with a detailed analysis of the deserialized target data to identify the type, content, and structure of each data field. This includes determining the name, data type (e.g., integer, floating-point, string), and position of each field within the data packet.

[0078] Next, according to the preset frame ID mapping rules, each data field is associated with its corresponding frame ID. These mapping rules are typically established during the system design phase to ensure that each frame ID accurately reflects its corresponding data meaning and source. For example, a specific frame ID might represent vehicle speed, while another frame ID might represent engine temperature. This method ensures that the source and nature of each data field are clearly identified.

[0079] Furthermore, in practical applications, integrity and consistency checks are performed on data fields to ensure there are no errors or missing data. By effectively mapping data fields to frame IDs, data can be effectively organized and categorized, laying a solid foundation for subsequent data processing and analysis. This structured data management approach enables the effective differentiation and processing of data from different business types, facilitating users to quickly locate key information and thereby improving work efficiency and decision-making accuracy in practical applications. Ultimately, this precise data classification and identification provides strong support for subsequent real-time monitoring, fault diagnosis, and performance analysis.

[0080] Step S104: Classify the target data according to the frame ID category to obtain the target datasets corresponding to various business types.

[0081] In this step, the target data is categorized according to the frame ID, resulting in target datasets corresponding to various business types. This process begins with effectively grouping and classifying the target data based on the previously determined frame IDs. The core of this process is ensuring that each frame ID corresponds to a specific business type; for example, some frame IDs may be related to a vehicle's powertrain, while others may be related to in-vehicle entertainment systems or security monitoring.

[0082] In practice, all target data is traversed, the frame ID of each data item is checked, and it is assigned to the corresponding business type. This classification operation relies not only on frame ID matching but may also involve additional contextual information to ensure accurate data classification. In this way, multiple target datasets can be formed, each representing the data required for a specific business type.

[0083] This classification process ensures the orderly organization of data, providing a clear data structure that allows for the effective differentiation of data across various business types. This organizational approach greatly facilitates subsequent data analysis and processing, enabling data analysts to quickly obtain information relevant to specific business areas for in-depth analysis and insight. Furthermore, it allows for real-time monitoring of data flow for each business type, ensuring precise monitoring and management of each.

[0084] This orderly data classification not only improves data processing efficiency but also provides a reliable basis for decision-making, enabling faster and more accurate business responses. In practical applications, this classification mechanism helps enhance the overall system's intelligence level, optimize vehicle performance, improve user experience, and increase operational management flexibility. Ultimately, through effective data management and analysis, users can better understand vehicle status, identify potential problems in a timely manner, and thus improve safety and efficiency.

[0085] Step S105: Group the target dataset corresponding to any business type according to the data collection time point to obtain business data of the business type at multiple time points, and push the business data to the front end.

[0086] In this step, the target dataset corresponding to any business type is grouped according to the data collection time point to obtain business data for that business type at multiple time points, and this business data is then pushed to the front end. During this process, the timestamp of each data item is first extracted. These timestamps record the time the data was collected and are crucial for understanding data changes.

[0087] Next, the corresponding target datasets are grouped according to timestamps. This time-dimensional grouping not only ensures the orderliness of the data but also effectively preserves temporal information, allowing data of each business type to be clearly organized across multiple time points. Through this grouping, users can intuitively see how business data changes over time, facilitating dynamic monitoring.

[0088] After grouping, the organized business data is formatted to ensure it meets the requirements of the front-end display. This data is then pushed to the front-end interface in real time, ensuring users can promptly access and monitor dynamic changes across various business types. This real-time data push not only enhances data visualization but also significantly improves the user experience, enabling users to respond and make decisions quickly.

[0089] Furthermore, by organizing business data over time, users can perform trend analysis and historical comparisons to identify potential anomalies. This process not only improves the ease of data use but also provides a solid foundation for decision support. Ultimately, this creates a closed loop for vehicle data collection and display, enhancing the overall system's intelligence and efficiency, and providing users with more comprehensive and in-depth business insights.

[0090] This application receives message data from a CANFD analyzer and then deserializes this data into target data conforming to a JAVA object structure. Next, it determines the frame ID of each data point and categorizes the target data by frame ID, forming target datasets corresponding to multiple service types. Finally, the target datasets for any service type are grouped according to the data acquisition time point, and the service data is pushed to the front end. This application uses a CANFD analyzer to acquire message data, improving data transmission efficiency. Furthermore, by classifying the data by frame ID and grouping it according to the acquisition time point, multiple frame IDs at the same acquisition time point are processed into a group of service data, thereby contributing to improved data analysis efficiency.

[0091] In some embodiments, when the service type is a first service type, in this application, the target data is classified according to the category of frame ID to obtain target datasets corresponding to various service types, including:

[0092] Compare the frame ID of each data in the target data with the target frame ID corresponding to the first service type;

[0093] Retain data in the target data that is the same as the target frame ID category, and delete data in the target data that is not the same as the target frame ID category.

[0094] In one example, when the service type is the first service type, the frame ID of all data items in the target data is first compared with the target frame ID corresponding to the first service type. This comparison process ensures that each data item can accurately identify its service type, avoiding confusion.

[0095] Next, data items that match the target frame ID category will be retained; these data items correspond to the first business type, forming a new target dataset. Simultaneously, data items whose frame ID categories do not match will be deleted to ensure that the final dataset contains only information related to the first business type. This classification process effectively organizes and manages the data, providing accurate foundational data for subsequent analysis and decision-making.

[0096] In practical applications, assuming the first business type is acceleration service, the target data matching the acceleration service is: Therefore, according to the method of this embodiment, it is only necessary to retain all those that match the acceleration service. data.

[0097] In some embodiments, the target dataset corresponding to any business type is grouped according to the data collection time point to obtain business data for the business type at multiple time points, including:

[0098] Obtain the collection time points of all data in the target dataset corresponding to any business type;

[0099] All data in the target dataset are grouped according to their respective collection time points to obtain the target data subset for each business type at each time point;

[0100] Each subset of target data is parsed to obtain business data for the business type at multiple points in time.

[0101] In one example, the first step is to obtain the collection time points of all data items in the target dataset corresponding to any given business type. This process ensures a comprehensive understanding of the timing information of each data item, laying the foundation for subsequent grouping.

[0102] Next, all data in the target dataset is grouped according to their respective collection time points. This means that data items with the same collection time point need to be clustered together based on their timestamps, forming multiple target data subsets. Each target data subset represents the data status of that business type at a specific point in time.

[0103] Finally, each target data subset is parsed to extract business information, thus obtaining business data for the business type at multiple time points. This parsing process not only ensures the effective use of data but also provides clear time-series information for real-time monitoring and subsequent data analysis, enabling users to easily track and evaluate business dynamics.

[0104] In some embodiments, all data in the target dataset are grouped according to their respective collection time points to obtain a subset of the target data for each business type at each time point, including:

[0105] Sort all the data in the target dataset according to their respective collection time points to obtain the sorted target dataset;

[0106] Data from the sorted target dataset that have the same time point are grouped together to obtain multiple subsets of the target data.

[0107] In one example, all data in the target dataset is first sorted according to their respective collection time points. This sorting process ensures that the data items are arranged in chronological order, making subsequent grouping more efficient and orderly.

[0108] Next, data from the sorted target dataset that share the same time point are grouped together to form multiple target data subsets. Each target data subset corresponds to a specific collection time point and includes all relevant data collected at that time point. This grouping method not only facilitates subsequent data analysis and processing but also clearly demonstrates the dynamic changes in business types at different time points, helping users to perform real-time monitoring and decision-making.

[0109] In some embodiments, after obtaining the target data subset for each business type at each point in time, the method further includes:

[0110] Determine the minimum frame ID of the target data subset based on the frame IDs of all data in any target data subset;

[0111] The acquisition time point corresponding to the smallest frame ID in each target data subset is determined as the target data subset time point identifier.

[0112] In one example, taking any subset of target data as an example, firstly, based on the frame IDs of all data in any subset of target data, these frame IDs are compared to determine the smallest frame ID in the subset. This smallest frame ID represents the lowest priority or earliest received data identifier for that subset.

[0113] Next, the acquisition time point corresponding to the smallest frame ID in each target data subset is determined as the time point identifier of the target data subset. This identifier not only assigns a unique time label to each target data subset, but also helps users quickly identify and locate the data status at each time point, thereby providing a more accurate basis for real-time analysis and decision-making. This method ensures efficient data management and analysis, making the business dynamics at different time points clearer.

[0114] For example, this application provides an example of a method for accelerating data extraction in business operations, specifically including:

[0115] In step S21, the controller or underlying software sends data via the CAN bus.

[0116] In step S22, the CANFD analyzer receives this data, converts the digital signals into message data, and then sends the message data to channel Fc.

[0117] In step S23, the JAVA JNI (Java Native Interface, JAVA programming framework) component receives message data from the Fc channel, deserializes the message data into target data of JAVA object structure, and stores this target data into the data pool.

[0118] In step S24, all current target data are extracted from the data pool every 100ms to ensure the real-time nature of the data.

[0119] In step S25, the extracted data is processed and grouped. For example, for acceleration services, the required frame IDs are 0x100 and 0x101, so all corresponding frame IDs are retained to form the target dataset data1, while other frame IDs are discarded.

[0120] In step S26, the data set data1 is sorted according to the collection time point to form the sorted target dataset data2, such as... .

[0121] In step S27, the data set data2 is grouped according to 0x100 and 0x101 to obtain multiple target data subsets data3: and data4: wait.

[0122] In step S28, the data with the smallest frame ID is extracted from data3, and the acquisition time of this data is determined as the time stamp of data3.

[0123] Furthermore, analyze data3 separately. and The data yields business data6 and business data7. Data6 contains key fields {key1, key2, key3, ...}, and data7 contains key fields {key7, key8, key9, ...}.

[0124] Finally, data6, data7, and the timestamp are merged to form a complete business data data8 with the structure {timestamp, key1, key2, key3, key4, key7, key8, key9}.

[0125] Similarly, step S29 processes data4 to generate data9 with the same structure as data8.

[0126] Finally, data8 and data9 are pushed to the front end via the WebSocket network protocol to meet the needs of real-time monitoring. Furthermore, data8 and data9 can be persistently stored using an embedded SQLite relational database to ensure data security and traceability.

[0127] In some embodiments, this application provides a method such as Figure 2 The flowchart of the vehicle data acquisition method shown is as follows: Figure 2As shown, it includes:

[0128] The controller or underlying software sends data to the CANFD analyzer via the CAN bus. After receiving the CAN bus data, the CANFD analyzer sends the data to the client. The JNI component receives the data, deserializes it, and stores the processed data in a data pool. The client's data module retrieves all data from the data pool and groups it. Specifically, the grouping process involves determining if the data in the data pool corresponds to the target service type. If so, it iterates through all retrieved data, sorts it by acquisition time, groups the sorted data by acquisition time, parses each group to obtain the parsed service data, persists the parsed data, and waits a preset time interval (100ms) before returning to the step where the client's data module retrieves all data from the data pool. If not, it waits 100ms before returning to the step where the client's data module retrieves all data from the data pool.

[0129] Based on the same concept, a second aspect of this application provides a vehicle data acquisition method applied to a vehicle, the method as follows: Figure 3 As shown, it includes:

[0130] Step S201: Receive CAN bus data from the vehicle using a CANFD analyzer;

[0131] Step S202: Convert the CAN bus data into message data and send the message data to the client.

[0132] In step S201, the vehicle's CAN bus data is received via a CANFD analyzer. During this process, the CANFD analyzer continuously monitors the vehicle's CAN bus to acquire and capture various vehicle information in real time, including but not limited to sensor data, status information, and fault codes.

[0133] Next, in step S202, the received CAN bus data is converted into message data. This conversion process includes parsing and formatting the raw data to ensure it conforms to the requirements of the communication protocol. Subsequently, the converted message data is sent to the client to ensure that the client can receive real-time vehicle data in a timely manner, providing support for subsequent processing and analysis.

[0134] In some embodiments, the configuration method of the CANFD analyzer includes:

[0135] Call the CANFD analyzer's start command and determine the CANFD analyzer's channel address based on the start command;

[0136] Call the CANFD analyzer's setup instructions, and according to the setup instructions, set the CANFD analyzer's bit rate, baud rate, and initialize the CANFD analyzer's channel parameters.

[0137] In one example, the CANFD analyzer's enable command is first invoked. Upon receiving the enable command, the channel address of the CANFD analyzer is determined according to the command to ensure that subsequent data communication can be correctly performed through the specified channel.

[0138] Next, the CANFD analyzer's setup commands are invoked. Based on these commands, the CANFD analyzer's bit rate and baud rate are configured to meet the communication requirements of the specific application. Furthermore, the CANFD analyzer's channel parameters are initialized to ensure it operates in the correct working condition. This series of configuration steps lays the foundation for the efficient operation and accurate data acquisition of the CANFD analyzer. In practical applications, the CANFD analyzer's bit rate can be set to 500,000, and its baud rate to 2,000,000.

[0139] In some embodiments, this application provides a CANFD analyzer configuration flowchart, such as... Figure 4 As shown:

[0140] S11: Obtain the CANFD analyzer channel address Fc by calling the CANFD analyzer start command;

[0141] S12: Call the CANFD analyzer's instruction to set the bit rate to 500000;

[0142] S13: Call the CANFD analyzer's command to set the baud rate to 2000000;

[0143] S14: Call the CANFD analyzer command to initialize channel parameters;

[0144] S15: Use channel address Fc to start the CANFD analyzer, establish communication with the client, and establish a connection with the bus;

[0145] S16: After completing steps S1 to S15, a CANFD analyzer with established communication and ready for use is obtained.

[0146] Specifically, in this embodiment, S11: The CANFD analyzer channel address Fc is obtained by calling the CANFD analyzer's start command. This step is the starting point of the configuration process. The CANFD analyzer is activated by sending the start command, and its channel address Fc is obtained, preparing for subsequent data transmission.

[0147] S12: Call the CANFD analyzer's instruction to set the bit rate to 500000. In this step, the CANFD analyzer's bit rate is configured to 500000. This parameter determines the data transmission rate, ensuring that the device can operate normally at the set speed.

[0148] S13: Call the CANFD analyzer's command to set the baud rate to 2000000. This step involves baud rate configuration. The baud rate defines the frequency of signal changes in data transmission. Setting it to 2000000 supports high-speed data transmission, meeting the needs of high-performance applications.

[0149] S14: Invoke CANFD analyzer commands to initialize channel parameters. In this step, all necessary channel parameters are initialized and configured to ensure the CANFD analyzer can function correctly in the specific application scenario. These parameters may include data format, data filtering rules, etc.

[0150] S15: Start the CANFD analyzer using channel address Fc and establish communication with the client and connection to the bus. In this crucial step, the CANFD analyzer is started using channel address Fc, ensuring a valid connection is established with the client and the data CAN bus. Successful execution of this step lays the foundation for subsequent data transmission.

[0151] S16: After completing steps S1 to S15, a CANFD analyzer with established communication is obtained and ready for use. This summary step indicates that, after the preceding configuration, communication with the CANFD analyzer has been successfully established, and data acquisition and analysis operations can begin.

[0152] Through the above steps, the configuration process for the CANFD analyzer is not only systematic and clear, but also ensures that the equipment operates efficiently and stably under the set conditions. This process provides a solid foundation for subsequent data processing and analysis, thereby improving the overall system efficiency and performance.

[0153] Based on the same concept, a third aspect of this application provides a vehicle data acquisition system for use on a client side, the system as follows: Figure 5 As shown, it includes:

[0154] The first receiving module 101 is used to receive vehicle message data sent from the CANFD analyzer;

[0155] Data processing module 102 is used to deserialize the message data to obtain target data that meets the JAVA object structure;

[0156] The determining module 103 is used to determine the frame ID of each piece of data according to the structure type of each piece of data in the target data;

[0157] The classification module 104 is used to classify the target data according to the category of the frame ID to obtain target datasets corresponding to various business types.

[0158] The grouping module 105 is used to group the target dataset corresponding to any of the business types according to the data collection time points, obtain the business data of the business type at multiple time points, and push the business data to the front end.

[0159] Optionally, the business type is a first business type, and the classification module 104, which classifies the target data according to the category of the frame ID to obtain target datasets corresponding to various business types, includes:

[0160] The comparison submodule is used to compare the frame ID of each data in the target data with the target frame ID corresponding to the first service type;

[0161] The data processing submodule is used to retain data in the target data that is the same as the target frame ID category, and to delete data in the target data that is not the same as the target frame ID category.

[0162] Optionally, the grouping module 105, which groups the target dataset corresponding to any of the aforementioned business types according to the data collection time points to obtain business data of the business type at multiple time points, includes:

[0163] The acquisition submodule is used to acquire the collection time points of all data in the target dataset corresponding to any of the aforementioned business types;

[0164] The grouping submodule is used to group all the data in the target dataset according to their respective collection time points to obtain the target data subset of the business type at each time point;

[0165] The parsing submodule is used to parse each of the target data subsets to obtain the business data of the business type at multiple time points.

[0166] Optionally, the step of grouping all data in the target dataset according to their respective collection time points to obtain a target data subset for each business type at each time point, the grouping submodule includes:

[0167] The sorting subunit is used to sort all the data in the target dataset according to their respective collection time points to obtain the sorted target dataset.

[0168] Grouping subunits are used to group data with the same time point in the sorted target dataset into multiple target data subsets.

[0169] Optionally, the system further includes:

[0170] The first determining submodule is used to determine the minimum frame ID of the target data subset based on the frame IDs of all data in any target data subset.

[0171] The second determining submodule is used to determine the acquisition time point corresponding to the smallest frame ID in each of the target data subsets as the time point identifier of the target data subset.

[0172] Based on the same inventive concept, a fourth aspect of this application provides a vehicle data acquisition system applied to a vehicle, the system as follows: Figure 6 As shown, it includes:

[0173] The second receiving module 201 is used to receive CAN bus data of the vehicle through the CANFD analyzer;

[0174] The data conversion module 202 is used to convert the CAN bus data into message data and send the message data to the client.

[0175] Optionally, the system further includes:

[0176] The first calling submodule is used to call the start command of the CANFD analyzer and determine the channel address of the CANFD analyzer according to the start command;

[0177] The second calling submodule is used to call the setting instructions of the CANFD analyzer, and set the bit rate, baud rate and initialize the channel parameters of the CANFD analyzer according to the setting instructions.

[0178] Based on the same inventive concept, the fifth aspect of this application provides a method as follows: Figure 7 The electronic device 100 shown includes a memory 110, a processor 120, and a computer program stored on the memory 110. The processor 120 executes the computer program to implement the vehicle data acquisition method as described in the first and / or second aspects of this application.

[0179] Each embodiment in this specification focuses on the differences from other embodiments. For the same or similar parts between the embodiments, please refer to each other.

[0180] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0181] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0182] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0184] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0185] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0186] The above provides a detailed description of the vehicle data acquisition method, system, vehicle, and electronic equipment. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for collecting vehicle data, characterized in that, Applied to a client, the method includes: Receive vehicle message data from the CANFD analyzer; The message data is deserialized to obtain target data that conforms to the JAVA object structure. Based on the structure type of each piece of data in the target data, determine the frame ID of each piece of data; The target data is classified according to the category of the frame ID to obtain target datasets corresponding to various service types. The target dataset corresponding to any of the aforementioned business types is grouped according to the data collection time points to obtain business data of the aforementioned business type at multiple time points, and the business data is pushed to the front end; The target dataset corresponding to any of the aforementioned business types is grouped according to the data collection time points to obtain business data for the aforementioned business type at multiple time points, including: Obtain the collection time points of all data in the target dataset corresponding to any of the aforementioned business types; All data in the target dataset are grouped according to their respective collection time points to obtain the target data subset for each business type at each time point; After obtaining the target data subset for the business type at each point in time, the method further includes: Determine the minimum frame ID of the target data subset based on the frame IDs of all data in any given target data subset; The acquisition time point corresponding to the smallest frame ID in each of the target data subsets is determined as the time point identifier of the target data subset.

2. The vehicle data acquisition method according to claim 1, characterized in that, The business type is the first business type. The step of classifying the target data according to the category of the frame ID yields target datasets corresponding to various business types, including: Compare the frame ID of each data in the target data with the target frame ID corresponding to the first service type; Data in the target data that is the same category as the target frame ID is retained, while data in the target data that is not the same category as the target frame ID is deleted.

3. The vehicle data acquisition method according to claim 1, characterized in that, The step of grouping the target dataset corresponding to any of the aforementioned business types according to the data collection time points to obtain business data for the aforementioned business type at multiple time points further includes: Each of the target data subsets is parsed to obtain the business data of the business type at multiple time points.

4. The vehicle data acquisition method according to claim 1, characterized in that, The step of grouping all data in the target dataset according to their respective collection time points to obtain the target data subset for each business type at each time point includes: Sort all the data in the target dataset according to their respective collection time points to obtain the sorted target dataset; Data with the same time point in the sorted target dataset are grouped together to obtain multiple subsets of the target data.

5. A method for collecting vehicle data, characterized in that, Applied to the vehicle end, the method includes: Receive CAN bus data from the vehicle using a CANFD analyzer; The CAN bus data is converted into message data and the message data is sent to the client; the client is used to execute the data acquisition method as described in claim 1.

6. The vehicle data acquisition method according to claim 5, characterized in that, The configuration method of the CANFD analyzer includes: Invoke the start command of the CANFD analyzer, and determine the channel address of the CANFD analyzer according to the start command; The setup instructions of the CANFD analyzer are invoked, and the bit rate, baud rate, and channel parameters of the CANFD analyzer are set and initialized according to the setup instructions.

7. A vehicle data acquisition system, characterized in that, The system, applied to a client, includes: The first receiving module is used to receive vehicle message data sent by the CANFD analyzer; The data processing module is used to deserialize the message data to obtain target data that conforms to the JAVA object structure. The determining module is used to determine the frame ID of each piece of data according to the structure type of each piece of data in the target data; The classification module is used to classify the target data according to the category of the frame ID to obtain target datasets corresponding to various business types. The grouping module is used to group the target dataset corresponding to any of the aforementioned business types according to the data collection time points, obtain the business data of the business type at multiple time points, and push the business data to the front end; The grouping module includes: The acquisition submodule is used to acquire the collection time points of all data in the target dataset corresponding to any of the aforementioned business types; The grouping submodule is used to group all the data in the target dataset according to their respective collection time points to obtain the target data subset of the business type at each time point; The system also includes: The first determining module is used to determine the minimum frame ID of the target data subset based on the frame IDs of all data in any target data subset. The second determining module is used to determine the acquisition time point corresponding to the smallest frame ID in each of the target data subsets as the time point identifier of the target data subset.

8. A vehicle data acquisition system, characterized in that, The system, applied to vehicles, includes: The second receiving module is used to receive CAN bus data from the vehicle via a CANFD analyzer; The data conversion module is used to convert the CAN bus data into message data and send the message data to the client; the client is used to execute the data acquisition method as described in claim 1.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the vehicle data acquisition method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Database processing method and database processing device

    CN106293887A

  • Vehicle CAN data processing method, system and device and readable storage medium

    CN114116281A

  • Vehicle network data transmission method and device, storage medium and vehicle

    CN115633331A