Vehicle data acquisition method and system, and electronic equipment

By receiving and processing the message data sent by the CANFD analyzer, the problem of low data transmission efficiency of the CAN analyzer is solved, more efficient data classification and packet processing is achieved, and the system intelligence and data analysis efficiency is improved.

CN119472378AActive Publication Date: 2025-02-18CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411454494.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-02-18
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the prior art, when receiving CAN bus data, the data transmission efficiency of CAN analyzers is low and cannot effectively process more and more CAN bus data.

Method used

By receiving the message data sent from the CANFD analyzer, deserialization process is performed, the data frame ID is determined, and the data is classified and grouped by frame ID, forming a target data set of various service types and pushing it to the front end.

Benefits of technology

The data transmission efficiency is improved, and data analysis and processing are simplified by classifying and grouping by frame ID, and the overall system's intelligence level and data analysis efficiency are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472378A_ABST
    Figure CN119472378A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle data acquisition method and system, and electronic equipment, and relates to the technical field of data acquisition, and the method comprises the steps: receiving vehicle message data sent by a CANFD analyzer; performing deserialization processing on the message data to obtain target data meeting a JAVA object structure; according to the structure type of each piece of data in the target data, determining the frame ID of each piece of data; classifying the target data according to the types of the frame IDs to obtain target data sets corresponding to the multiple service types; and grouping the target data set corresponding to any service type according to the data acquisition time points to obtain service data of the service type at a plurality of time points, and pushing the service data to a front end. The message data is acquired 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 acquisition time points, and the data analysis efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data collection, and in particular to a vehicle data collection method, system, and electronic device. Background Art

[0002] At present, with the widespread intelligence of household passenger vehicles, the vehicle's CAN (Controller Area Network) bus data will become increasingly important. For example, based on the vehicle's CAN bus data, the vehicle status can be monitored, fault diagnosis can be performed, the power system can be optimized, the automatic driving function can be realized, real-time performance data can be collected, and vehicle network security analysis can be performed.

[0003] However, the mainstream data acquisition solution is to integrate the CAN analyzer through the C# language to receive data. However, as the CAN bus data increases, the CAN analyzer can only receive 8 bytes of data at a time, and the data transmission efficiency is low.

[0004] Therefore, a new vehicle data collection method is urgently needed. Summary of the invention

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

[0006] In a first aspect of the present application, a vehicle data collection method is provided, which is applied to a client, and the method comprises: Receive vehicle message data sent from CANFD analyzer; Deserialize the message data to obtain target data that meets the JAVA object structure; Determine 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 categories of the frame IDs to obtain target data sets corresponding to the various service types; The target data set corresponding to any of the business types is grouped according to the data collection time point, the business data of the business type at multiple time points are obtained, and the business data is pushed to the front end.

[0007] Optionally, the service type is a first service type, and the target data is classified according to the category of the frame ID to obtain target data sets corresponding to the plurality of service types, including: Comparing the frame IDs of all data in the target data with the target frame ID corresponding to the first service type; The data in the target data having the same ID category as the target frame ID is retained, and the data in the target data having a different ID category from the target frame ID is deleted.

[0008] Optionally, grouping the target data set corresponding to any one of the business types according to the data collection time points to obtain the business data of the business type at multiple time points includes: Obtaining respective collection time points of all data in the target data set corresponding to any of the business types; Grouping all the data in the target data set according to their respective collection time points to obtain a target data subset of the business type at each time point; Each of the target data subsets is parsed to obtain business data of the business type at multiple time points.

[0009] Optionally, grouping all the data in the target data set according to their respective collection time points to obtain a target data subset of the business type at each time point includes: Sorting all the data in the target data set according to their respective collection time points to obtain a sorted target data set; The data with the same time point in the sorted target data set are grouped together to obtain a plurality of the target data subsets.

[0010] Optionally, after obtaining the target data subset of the business type at each time point, the method further includes: Determine the minimum frame ID of the target data subset according to the frame IDs of all data in any of the target data subsets; The acquisition time point corresponding to the minimum frame ID in each of the target data subsets is determined as the target data subset time point identifier.

[0011] In a second aspect of the present application, a vehicle data collection method is provided, which is applied to a vehicle side, and the method comprises: Receive the vehicle's CAN bus data through the CANFD analyzer; The CAN bus data is converted into message data, and the message data is sent to the client.

[0012] Optionally, the configuration method of the CANFD analyzer includes: Calling a start instruction of the CANFD analyzer, and determining a channel address of the CANFD analyzer according to the start instruction; The setting instruction of the CANFD analyzer is called, and according to the setting instruction, the bit rate and baud rate of the CANFD analyzer are respectively set, and the channel parameters of the CANFD analyzer are initialized.

[0013] In a third aspect of the present application, a vehicle data collection system is provided, which is applied to a client, and the system includes: A first receiving module is used to receive vehicle message data sent from a CANFD analyzer; A data processing module, used for deserializing the message data to obtain target data that meets the JAVA object structure; A determination module, used for determining the frame ID of each data according to the structure type of each data in the target data; A classification module, used to classify the target data according to the category of the frame ID to obtain target data sets corresponding to multiple business types; The grouping module is used to group the target data set corresponding to any of the business types according to the data collection time point, obtain the business data of the business type at multiple time points, and push the business data to the front end.

[0014] Optionally, the service type is a first service type, and the target data is classified according to the category of the frame ID to obtain target data sets corresponding to the plurality of service types, and the classification module includes: A comparison submodule, used for comparing the frame IDs of all data in the target data with the target frame ID corresponding to the first service type; The data processing submodule is used to retain the data in the target data that has the same ID category as the target frame ID, and delete the data in the target data that has a different ID category from the target frame ID.

[0015] Optionally, the target data set corresponding to any one of the business types is grouped according to the data collection time point to obtain the business data of the business type at multiple time points, and the grouping module includes: An acquisition submodule, used to acquire the respective collection time points of all data in the target data set corresponding to any of the business types; A grouping submodule, used to group all the data in the target data set according to their respective collection time points, to obtain a target data subset of the business type at each time point; The parsing submodule is used to parse each of the target data subsets to obtain business data of the business type at multiple time points.

[0016] Optionally, all the data in the target data set are grouped according to their respective collection time points to obtain a target data subset of the business type at each time point, and the grouping submodule includes: A sorting subunit, used to sort all the data in the target data set according to their respective collection time points to obtain a sorted target data set; The grouping subunit is used to group the data with the same time point in the sorted target data set into one group to obtain a plurality of the target data subsets.

[0017] Optionally, the system further comprises: A first determination submodule, configured to determine a minimum frame ID of the target data subset according to the frame IDs of all data in any of the target data subsets; The second determination submodule is used to determine the acquisition time point corresponding to the minimum frame ID in each of the target data subsets as the target data subset time point identifier.

[0018] In a fourth aspect of the present application, a vehicle data collection system is provided, which is applied to a vehicle side, and the system comprises: The second receiving module is used to receive the CAN bus data of the vehicle through the 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.

[0019] Optionally, the system further comprises: A first calling submodule is used to call the start instruction of the CANFD analyzer, and determine the channel address of the CANFD analyzer according to the start instruction; The second calling submodule is used to call the setting instruction of the CANFD analyzer, and according to the setting instruction, respectively set the bit rate and baud rate of the CANFD analyzer and initialize the channel parameters of the CANFD analyzer.

[0020] In a fifth aspect of the present application, an electronic device is provided, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the vehicle data collection method as described in the first aspect and / or the second aspect of the present application.

[0021] Beneficial effects of this application: The present application provides a vehicle data collection method, which includes: receiving vehicle message data sent from a CANFD analyzer; deserializing the message data to obtain target data that satisfies a JAVA object structure; determining the frame ID of each data in the target 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 data sets corresponding to multiple business types; grouping the target data sets corresponding to any of the business types according to the data collection time point to obtain business data of the business type at multiple time points, and pushing the business data to the front end.

[0022] This application receives message data from a CANFD analyzer and then deserializes the data into target data that conforms to the JAVA object structure. Next, the frame ID of each data is determined, and the target data is classified by frame ID to form a target data set corresponding to multiple business types. Finally, the target data set of any business type is grouped according to the data collection time point, and the business data is pushed to the front end. This application obtains message data through a CANFD analyzer, which improves the efficiency of data transmission. In addition, by classifying the data by frame ID and grouping it according to the collection time point, multiple frame IDs at the same collection time point are processed into a group of business data, which helps to improve data analysis efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 It is a schematic diagram of the steps of a vehicle data collection method applied to a client provided in an embodiment of the present application; Figure 2 It is a flowchart of a vehicle data collection method provided in an embodiment of the present application; Figure 3 It is a schematic diagram of the steps of a vehicle data collection method applied to a vehicle end provided in an embodiment of the present application; Figure 4 It is a CANFD analyzer configuration flow chart provided in an embodiment of the present application; Figure 5 is a schematic diagram of a vehicle data collection system applied to a client provided in an embodiment of the present application; Figure 6is a schematic diagram of a vehicle data collection system applied to a vehicle side provided in an embodiment of the present application; Figure 7 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The exemplary embodiments of the present application will be described in more detail below in conjunction with the accompanying drawings in the embodiments of the present application. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to enable the scope of the present application to be fully communicated to those skilled in the art.

[0026] Based on the above problems, the first aspect of the embodiment of the present application provides a vehicle data collection method, which is applied to a client. Figure 1 As shown, including: Step S101, receiving vehicle message data sent from a CANFD analyzer.

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

[0028] After successful connection, it enters the continuous listening state and receives the message data from the CANFD analyzer in real time. These message data may include a variety of information, such as vehicle status (such as throttle position, brake status), sensor readings (such as temperature, speed, speed) and fault codes. In order to ensure the integrity and accuracy of vehicle data collection, the received vehicle data will be initially checked and filtered to eliminate invalid or redundant information.

[0029] In addition, in actual applications, the frequency and time interval of data reception can also be set to optimize data transmission efficiency and reduce potential delays. This information not only provides support for dynamic monitoring of the vehicle, but also lays a solid foundation for subsequent data processing and analysis, ensuring that abnormal conditions in vehicle operation can be identified and responded to in a timely manner, improving vehicle safety and performance. Ultimately, through in-depth analysis of these data, engineers and developers can extract valuable data to optimize vehicle design and enhance user experience.

[0030] Step S102, deserialize the message data to obtain target data that meets the JAVA object structure.

[0031] In this step, the message data is deserialized to obtain the target data that meets the JAVA object structure. In this process, the received original message data is first parsed and valid information is extracted according to the predefined protocol format. Then, the deserialization algorithm is used to convert this information into a JAVA object so that it conforms to the object structure of the JAVA programming language. This conversion not only ensures that the data is structured and easy to manage, but also facilitates subsequent data processing and analysis, so that the target data can be effectively operated and called in the JAVA environment. In practical applications, the target data that meets the JAVA object structure can be , , In addition, in this step, the characteristics of JAVA in the field of web services are fully utilized, which has excellent portability. Moreover, JAVA has a wide range of applications in interface services, which can provide good technical support for the subsequent development of data cloud functions.

[0032] Step S103, determining the frame ID of each data according to the structure type of each data in the target data.

[0033] In this step, the frame ID of each data is determined according to the structure type of each data in the target data. In this process, the deserialized target data needs to be analyzed in detail to identify the type, content and structure of each data field. This includes determining the name of each field, the data type (such as integer, floating point number, string, etc.) and its position in the data message.

[0034] Next, each data field is associated with the corresponding frame ID according to the preset frame ID mapping rule. This mapping rule is usually formulated during the system design phase to ensure that each frame ID can accurately reflect the meaning and source of its corresponding data. For example, a specific frame ID may represent the speed of the vehicle, while another frame ID may represent the temperature of the engine. In this way, the source and nature of each data field can be clearly identified.

[0035] In addition, in actual applications, it also includes integrity and consistency checks on data fields to ensure that there is no erroneous or missing data. By effectively mapping data fields with frame IDs, data can be effectively organized and classified, laying a solid foundation for subsequent data processing and analysis. This structured data management method enables data of different business types to be effectively distinguished and processed, making it easier for users to quickly locate key information, thereby improving work efficiency and decision-making accuracy in actual applications. Ultimately, this precise data classification and identification provides strong support for subsequent real-time monitoring, fault diagnosis, and performance analysis.

[0036] Step S104: classify the target data according to the categories of the frame IDs to obtain target data sets corresponding to the various business types.

[0037] In this step, the target data is classified according to the frame ID category to obtain target data sets corresponding to various business types. In this process, the target data is first effectively grouped and classified according to the previously determined frame ID. The core of this process is to ensure that each frame ID corresponds to a specific business type. For example, some frame IDs may be related to the vehicle's power system, while others are related to the in-vehicle entertainment system or security monitoring.

[0038] In the specific implementation, all target data are traversed, the frame ID of each data item is checked, and it is assigned to the corresponding business type. This classification operation not only relies on the matching of frame IDs, but may also involve additional context information to ensure accurate classification of data. In this way, multiple target data sets can be formed, each of which represents the data required for a specific business type.

[0039] This classification process ensures the orderly organization of data and provides a clear data structure, so that data of various business types can be effectively distinguished. This organization method greatly facilitates subsequent data analysis and processing, allowing data analysts to quickly obtain information related to specific businesses and conduct in-depth analysis and insights. In addition, the data flow of each business type can be monitored in real time to ensure that each business type can be accurately monitored and managed.

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

[0041] Step S105 , grouping the target data set corresponding to any business type according to the data collection time point, obtaining the business data of the business type at multiple time points, and pushing the business data to the front end.

[0042] In this step, the target data set corresponding to any business type is grouped according to the data collection time point to obtain the business data of the business type at multiple time points, and push these business data to the front end. In this process, the timestamp of each data item is first extracted. These timestamps record the data collection time and are an important basis for understanding data changes.

[0043] Next, the corresponding target data sets are grouped according to timestamps. This time dimension grouping operation not only ensures the orderliness of the data, but also effectively preserves the timing information, so that the data of each business type is clearly organized at multiple time points. Through this grouping, users can intuitively see the changes in business data over time, which is convenient for dynamic monitoring.

[0044] After grouping, the sorted business data will be formatted to ensure that it meets the requirements of the front-end display. Subsequently, the data will be pushed to the front-end interface in real time to ensure that users can obtain and monitor the dynamic changes of various business types in a timely manner. This real-time data push not only improves the visualization of data, but also greatly enhances the user's interactive experience, allowing users to respond and make decisions quickly.

[0045] In addition, by sorting out the time series of business data, users can also conduct trend analysis and historical comparison to identify potential abnormal patterns. This process not only improves the convenience of data use, but also provides a solid foundation for decision support. Ultimately, the vehicle data collection and display form a closed loop, improving the intelligence and efficiency of the overall system and providing users with more comprehensive and in-depth business insights.

[0046] This application receives message data from a CANFD analyzer and then deserializes the data into target data that conforms to the JAVA object structure. Next, the frame ID of each data is determined, and the target data is classified by frame ID to form a target data set corresponding to multiple business types. Finally, the target data set of any business type is grouped according to the data collection time point, and the business data is pushed to the front end. This application obtains message data through a CANFD analyzer, which improves the efficiency of data transmission. In addition, by classifying the data by frame ID and grouping it according to the collection time point, multiple frame IDs at the same collection time point are processed into a group of business data, which helps to improve data analysis efficiency.

[0047] In some embodiments, when the service type is the first service type, in the present application, the target data is classified according to the category of the frame ID to obtain target data sets corresponding to the various service types, including: Compare the frame IDs of all data in the target data with the target frame ID corresponding to the first service type; The data in the target data that has the same ID category as the target frame is retained, and the data in the target data that has a different ID category from the target frame is deleted.

[0048] In one example, when the service type is the first service type, first, the frame IDs of all data items in the target data are compared one by one with the target frame ID corresponding to the first service type. This comparison process can ensure that each data item can accurately identify the service type to which it belongs, avoiding confusion.

[0049] Next, the data items with the same category as the target frame ID will be retained, which correspond to the first business type, forming a new target data set. At the same time, those data items with mismatched frame ID categories will be deleted to ensure that the final data set only contains information related to the first business type. Through such classification processing, data can be effectively organized and managed, providing accurate basic data for subsequent analysis and decision-making.

[0050] In actual applications, assuming that the first service type is an acceleration service, the target data matching the acceleration service is ..., therefore, according to the method of this embodiment, only all the data matching the accelerated service need to be retained. data.

[0051] In some embodiments, the target data set corresponding to any business type is grouped according to the data collection time point to obtain business data of the business type at multiple time points, including: Obtain the respective collection time points of all data in the target data set corresponding to any business type; All data in the target data set are grouped according to their respective collection time points to obtain the target data subset of the business type at each time point; Each target data subset is parsed to obtain business data of the business type at multiple time points.

[0052] In one example, first, the collection time points of all data items in the target data set corresponding to any business type are obtained. This process ensures that the time information of each data item can be fully understood, laying the foundation for subsequent grouping.

[0053] Next, all the data in the target data set are grouped according to their respective collection time points. This means that data items with the same collection time point need to be grouped together according to the timestamp to form multiple target data subsets. Each target data subset represents the data status of the business type at a specific time point.

[0054] Finally, each target data subset is parsed to extract the business information, thereby obtaining the business data of 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, allowing users to easily track and evaluate business dynamics.

[0055] In some embodiments, all data in the target data set are grouped according to their respective collection time points to obtain a target data subset of a business type at each time point, including: Sort all data in the target data set according to their respective collection time points to obtain a sorted target data set; The data with the same time point in the sorted target data set are grouped together to obtain multiple target data subsets.

[0056] In one example, first, all data in the target data set are 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.

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

[0058] In some embodiments, after obtaining the target data subset of the business type at each time point, the method further includes: Determine the minimum frame ID of the target data subset according to the frame IDs of all data in any target data subset; The acquisition time point corresponding to the minimum frame ID in each target data subset is determined as the target data subset time point identifier.

[0059] In one example, taking any target data subset as an example, first, according to the frame IDs of all data in any target data subset, these frame IDs are compared to determine the minimum frame ID in the target data subset. This minimum frame ID represents the lowest priority or earliest received data identifier of the subset.

[0060] Next, the acquisition time point corresponding to the minimum frame ID in each target data subset is determined as the time point identifier of the target data subset. This identifier not only gives each target data subset a unique time label, 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 management and analysis of data, making business dynamics at different time points clearer.

[0061] Exemplarily, the present application provides an example of a data extraction method under an acceleration service, specifically including: In step S21, the controller or underlying software sends data via the CAN bus.

[0062] In step S22, the CAN FD analyzer receives the data, converts the digital signal into message data, and then sends the message data to the channel Fc.

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

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

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

[0066] In step S26, the data set data1 is sorted according to the acquisition time point to form a sorted target data set data2, such as .

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

[0068] In step S28 , the data with the smallest frame ID is taken out from data3 , and the acquisition time point of the data is determined as the time point identifier (timestamp) of data3 .

[0069] Further, parse the data3 separately and Data, obtain business data data6 and business data data7, where data6 contains key fields {key1, key2, key3, ...}, and data7 contains key fields {key7, key8, key9, ...}.

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

[0071] Similarly, step S29 processes data4 to generate data data9 having the same structure as data8.

[0072] Finally, data8 and data9 are pushed to the front end through the WebSocket network protocol to meet the needs of real-time monitoring. In addition, data8 and data9 can also be persistently stored through the SQLite embedded relational database to ensure data security and traceability.

[0073] In some embodiments, the present application provides a Figure 2 The flow chart of the vehicle data collection method shown in FIG. Figure 2 As shown, including: The controller or underlying software sends data to the CANFD analyzer through the CAN bus. After receiving the CAN bus data, the CANFD analyzer sends the data to the client, where the JNI component receives the data, deserializes the received data, and stores the processed data in the data pool. The data module of the client takes out all the data from the data pool and groups them. The specific grouping process is to determine whether the data in the data pool is the data corresponding to the target business type. If so, all the data taken out are traversed, sorted according to the acquisition time point, and the sorted data are grouped according to the acquisition time point, and each group of data is parsed to obtain the parsed business data, and the parsed data is persistently stored, and the client data module returns to the step of taking out all the data from the data pool after waiting for a preset time interval (100ms); if not, the client data module returns to the step of taking out all the data from the data pool after waiting for 100ms.

[0074] Based on the same concept, the second aspect of the present application provides a vehicle data collection method, which is applied to the vehicle side. Figure 3 As shown, including: Step S201, receiving CAN bus data of the vehicle through a CANFD analyzer; Step S202: convert the CAN bus data into message data, and send the message data to the client.

[0075] In step S201, the CAN bus data of the vehicle is received by the CAN FD analyzer. During this process, the CAN FD analyzer continuously monitors the CAN bus of the vehicle to obtain and capture various information of the vehicle in real time, including but not limited to sensor data, status information and fault codes.

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

[0077] In some embodiments, a configuration method of a CAN FD analyzer includes: Call the start command of the CANFD analyzer, and determine the channel address of the CANFD analyzer according to the start command; Call the setting instructions of the CANFD analyzer, and according to the setting instructions, set the bit rate, baud rate of the CANFD analyzer and initialize the channel parameters of the CANFD analyzer.

[0078] In one example, first, a start instruction of the CAN FD analyzer is called. After receiving the start instruction, the channel address of the CAN FD analyzer is determined according to the instruction to ensure that subsequent data communication can be correctly performed through the specified channel.

[0079] Next, call the setup command of the CANFD analyzer. According to the setup command, configure the bit rate and baud rate of the CANFD analyzer respectively to meet the communication requirements of the specific application. In addition, the channel parameters of the CANFD analyzer are initialized to ensure that it runs in the correct working state. This series of configuration steps lays the foundation for the efficient operation and accurate data collection of the CANFD analyzer. In practical applications, the bit rate of the CANFD analyzer can be set to 500000, and the baud rate of the CANFD analyzer can be set to 2000000.

[0080] In some embodiments, the present application provides a CANFD analyzer configuration flow chart, such as Figure 4 As shown: S11: Get the CANFD analyzer channel address Fc by calling the CANFD analyzer start command; S12: Call the CANFD analyzer command to set the bit rate to 500000; S13: Call the command of CANFD analyzer to set the baud rate to 2000000; S14: Call CANFD analyzer command to initialize channel parameters; S15: Use the channel address Fc to start the CANFD analyzer, establish communication with the client, and establish a connection with the bus; S16: After the steps from S1 to S15, a CANFD analyzer is obtained that has established communication and can be used.

[0081] Specifically, in this embodiment, S11: obtain the CANFD analyzer channel address Fc by calling the start command of the CANFD analyzer. 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 to prepare for subsequent data transmission.

[0082] S12: Call the command of CANFD analyzer to set the bit rate to 500000. In this step, the bit rate of CANFD analyzer is configured to 500000. This parameter determines the data transmission rate and ensures that the device can work normally at the set speed.

[0083] S13: Call the CANFD analyzer command to set the baud rate to 2000000. This step involves the configuration of the baud rate, which defines the signal change frequency of data transmission. Setting it to 2000000 can support high-speed data transmission and meet the needs of high-performance applications.

[0084] S14: Call the CANFD analyzer command to initialize the channel parameters. In this step, all necessary channel parameters are initialized and configured to ensure that the CANFD analyzer can operate normally in a specific application scenario. These parameters may include data format, data filtering rules, etc.

[0085] S15: Use the channel address Fc to start the CANFD analyzer, establish communication with the client, and establish a connection with the bus. In this key step, the CANFD analyzer is started using the channel address Fc, and ensures that it establishes a valid connection with the client and the data CAN bus. The successful execution of this step lays the foundation for subsequent data transmission.

[0086] S16: After the steps from S1 to S15, a CANFD analyzer with established communication and ready for use is obtained. This summary step indicates that after the previous configuration, communication with the CANFD analyzer has been successfully established, and data collection and analysis operations can be started.

[0087] Through the above steps, the configuration process of the CANFD analyzer is not only systematic and clear, but also can ensure that the equipment operates efficiently and stably under the set conditions. This process provides a solid foundation for subsequent data processing and analysis, and improves the work efficiency and performance of the entire system.

[0088] Based on the same concept, the third aspect of the present application provides a vehicle data collection system, which is applied to a client. Figure 5 As shown, including: The first receiving module 101 is used to receive vehicle message data sent from a CANFD analyzer; The data processing module 102 is used to deserialize the message data to obtain target data that meets the JAVA object structure; A determination module 103, configured to determine a frame ID of each data according to a structure type of each data in the target data; A classification module 104, configured to classify the target data according to the categories of the frame IDs to obtain target data sets corresponding to the various service types; The grouping module 105 is used to group the target data set corresponding to any of the business types according to the data collection time point, obtain the business data of the business type at multiple time points, and push the business data to the front end.

[0089] Optionally, the service type is a first service type, and the target data is classified according to the category of the frame ID to obtain target data sets corresponding to the multiple service types, and the classification module 104 includes: A comparison submodule, used for comparing the frame IDs of all data in the target data with the target frame ID corresponding to the first service type; The data processing submodule is used to retain the data in the target data that has the same ID category as the target frame ID, and delete the data in the target data that has a different ID category from the target frame ID.

[0090] Optionally, the target data set corresponding to any of the business types is grouped according to the data collection time point to obtain the business data of the business type at multiple time points, and the grouping module 105 includes: An acquisition submodule, used to acquire the respective collection time points of all data in the target data set corresponding to any of the business types; A grouping submodule, used to group all the data in the target data set according to their respective collection time points, to obtain a target data subset of the business type at each time point; The parsing submodule is used to parse each of the target data subsets to obtain business data of the business type at multiple time points.

[0091] Optionally, all the data in the target data set are grouped according to their respective collection time points to obtain a target data subset of the business type at each time point, and the grouping submodule includes: A sorting subunit, used to sort all the data in the target data set according to their respective collection time points to obtain a sorted target data set; The grouping subunit is used to group the data with the same time point in the sorted target data set into one group to obtain a plurality of the target data subsets.

[0092] Optionally, the system further comprises: A first determination submodule, configured to determine a minimum frame ID of the target data subset according to the frame IDs of all data in any of the target data subsets; The second determination submodule is used to determine the acquisition time point corresponding to the minimum frame ID in each of the target data subsets as the target data subset time point identifier.

[0093] Based on the same inventive concept, in a fourth aspect of the present application, a vehicle data acquisition system is provided, which is applied to a vehicle end. Figure 6 As shown, including: The second receiving module 201 is used to receive CAN bus data of the vehicle through a CANFD analyzer; The data conversion module 202 is used to convert the CAN bus data into message data and send the message data to the client.

[0094] Optionally, the system further comprises: A first calling submodule is used to call the start instruction of the CANFD analyzer, and determine the channel address of the CANFD analyzer according to the start instruction; The second calling submodule is used to call the setting instruction of the CANFD analyzer, and according to the setting instruction, respectively set the bit rate and baud rate of the CANFD analyzer and initialize the channel parameters of the CANFD analyzer.

[0095] Based on the same inventive concept, in the fifth aspect of the present application, there is provided a Figure 7 The electronic device 100 shown includes a memory 110, a processor 120 and a computer program stored in the memory 110, and the processor 120 executes the computer program to implement the vehicle data collection method as described in the first aspect and / or the second aspect of the present application.

[0096] Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.

[0097] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product 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 codes.

[0098] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0099] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0101] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0102] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0103] The vehicle data collection method, system, vehicle and electronic device provided are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A vehicle data collection method, characterized in that: Applied to a client, the method comprises: Receive vehicle message data sent from CANFD analyzer; Deserialize the message data to obtain target data that meets the JAVA object structure; Determine 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 categories of the frame IDs to obtain target data sets corresponding to the various service types; The target data set corresponding to any of the business types is grouped according to the data collection time point, the business data of the business type at multiple time points are obtained, and the business data is pushed to the front end.

2. The vehicle data collection method according to claim 1, characterized in that: The service type is a first service type, and the target data is classified according to the category of the frame ID to obtain target data sets corresponding to multiple service types, including: Comparing the frame IDs of all data in the target data with the target frame ID corresponding to the first service type; The data in the target data having the same ID category as the target frame ID is retained, and the data in the target data having a different ID category from the target frame ID is deleted.

3. The vehicle data collection method according to claim 1, characterized in that: The target data set corresponding to any one of the business types is grouped according to the data collection time point to obtain the business data of the business type at multiple time points, including: Obtaining respective collection time points of all data in the target data set corresponding to any of the business types; Grouping all the data in the target data set according to their respective collection time points to obtain a target data subset of the business type at each time point; Each of the target data subsets is parsed to obtain business data of the business type at multiple time points.

4. The vehicle data collection method according to claim 3, characterized in that: The method of grouping all the data in the target data set according to their respective collection time points to obtain a target data subset of the business type at each time point includes: Sorting all the data in the target data set according to their respective collection time points to obtain a sorted target data set; The data with the same time point in the sorted target data set are grouped together to obtain a plurality of the target data subsets.

5. The vehicle data collection method according to claim 3 or 4, characterized in that: After obtaining the target data subset of the business type at each time point, the method further includes: Determine the minimum frame ID of the target data subset according to the frame IDs of all data in any of the target data subsets; The acquisition time point corresponding to the minimum frame ID in each of the target data subsets is determined as the target data subset time point identifier.

6. A vehicle data collection method, characterized in that: Applied to the vehicle side, the method includes: Receive the vehicle's CAN bus data through the CANFD analyzer; The CAN bus data is converted into message data, and the message data is sent to the client.

7. The vehicle data collection method according to claim 6, characterized in that: The configuration method of the CANFD analyzer includes: Calling a start instruction of the CANFD analyzer, and determining a channel address of the CANFD analyzer according to the start instruction; The setting instruction of the CANFD analyzer is called, and according to the setting instruction, the bit rate and baud rate of the CANFD analyzer are respectively set, and the channel parameters of the CANFD analyzer are initialized.

8. A vehicle data collection system, characterized in that: Applied to a client, the system comprises: A first receiving module is used to receive vehicle message data sent from a CANFD analyzer; A data processing module, used for deserializing the message data to obtain target data that meets the JAVA object structure; A determination module, used for determining the frame ID of each data according to the structure type of each data in the target data; A classification module, used to classify the target data according to the category of the frame ID to obtain target data sets corresponding to multiple business types; The grouping module is used to group the target data set corresponding to any of the business types according to the data collection time point, obtain the business data of the business type at multiple time points, and push the business data to the front end.

9. A vehicle data collection system, characterized in that: Applied to the vehicle side, the system includes: The second receiving module is used to receive the CAN bus data of the vehicle through the 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.

10. 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 collection method according to any one of claims 1 to 7.

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

  • Message transmission time estimation method for automobile CANFD network

    CN116055248A

  • User data management method and device, equipment and storage medium

    CN116975154A