Vehicle Bus Data Acquisition Method, Device, Acquisition Equipment and Storage Medium

Through voltage testing and automatic identification of communication protocols and baud rates, the problem of vehicle bus data acquisition speed caused by manual settings in the prior art is solved, and fast and accurate data acquisition is achieved.

CN118011910BActive Publication Date: 2025-07-08SHENZHEN CHAOYUE TECH DEV CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410152605.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-03
Publication Date
2025-07-08
Estimated Expiration
2044-02-03

AI Technical Summary

Technical Problem

In the prior art, it is necessary to manually select the communication protocol of the vehicle bus data acquisition device and set the baud rate, which leads to the slow data acquisition speed and is difficult to meet the requirements of modern vehicle maintenance.

Method used

Through voltage testing, determine the target pin set used by the vehicle data bus, perform data pre-acquisition based on the target pin set, automatically identify the target communication protocol and baud rate, and realize automatic data acquisition.

Benefits of technology

It improves the speed and accuracy of vehicle bus data acquisition, reduces the steps of manual setup, and meets the needs of modern vehicle maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118011910B_ABST
    Figure CN118011910B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data acquisition, and provides a method, device, acquisition device and storage medium for vehicle bus data acquisition. The present application determines a set of target pins used by the vehicle data bus through voltage testing; pre-acquires vehicle bus data for each target pin in the set of target pins to obtain a first data set; determines a target communication protocol corresponding to each target pin according to the first data set; determines the target baud rate of the corresponding target pin according to the target communication protocol; and thus acquires vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set. By analyzing the vehicle bus data, the present application automatically adjusts the communication protocol and baud rate of the data interface of the acquisition device, and solves the technical problem in the prior art that the acquisition of vehicle bus data is too slow due to the need to manually select the communication protocol of the acquisition device and set the baud rate of the pins.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicle data acquisition, and in particular to a method, device, acquisition equipment and storage medium for acquiring vehicle bus data. Background Art

[0002] During the development of vehicle diagnostic products, developers often need to understand the communication data between the diagnostic equipment and the vehicle. By viewing this data and combining it with the prompt information of the diagnostic equipment, in the case of some abnormalities, they can quickly analyze, locate, and solve problems, which helps to develop diagnostic products more quickly.

[0003] Currently, the method for collecting these diagnostic data is to use a dedicated device combined with acquisition software to collect data on the bus. However, it requires the user to manually set the protocol on the acquisition software, and only one protocol and one baud rate can be selected each time, resulting in only being able to collect data of one protocol each time, causing the collection of vehicle communication data to be too slow to meet the requirements of modern vehicle maintenance. Summary of the Invention

[0004] In view of this, the embodiments of this application provide a method, device, acquisition equipment and storage medium for acquiring vehicle bus data, which are used to solve the technical problem in the prior art that the collection of vehicle bus data is too slow because the communication protocol of the acquisition equipment needs to be manually selected and the baud rate of the pins needs to be set.

[0005] In a first aspect, this application provides a method for acquiring vehicle bus data, adopting the following technical solution:

[0006] Determine a set of target pins used by the vehicle data bus through voltage testing;

[0007] Based on each target pin in the set of target pins, pre-acquire vehicle bus data to obtain a first data set;

[0008] According to the first data set, determine the target communication protocol corresponding to each target pin;

[0009] Determine the target baud rate of the corresponding target pin according to the target communication protocol;

[0010] According to the target communication protocol and the corresponding target baud rate, acquire the vehicle bus data to obtain a second data set.

[0011] In an optional implementation manner, the determining a set of target pins used by the vehicle data bus through voltage testing includes:

[0012] Perform voltage testing on each pin in the vehicle to obtain the test voltage of each pin;

[0013] Determine the target test voltage as the test voltage greater than the preset test voltage threshold;

[0014] Determine the set of target pins used by the vehicle according to the pins corresponding to the target test voltage.

[0015] In an optional implementation manner, the determining the target communication protocol corresponding to each target pin according to the first data set includes:

[0016] Obtain the voltage waveform, pulse width, and signal frequency of each target pin in the first data set;

[0017] Perform weighted calculation on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol to obtain multiple feature matching scores;

[0018] Determine whether each of the feature matching scores is greater than the preset feature matching score threshold;

[0019] When the feature matching score is greater than the preset feature matching score threshold, determine the corresponding communication protocol as the target communication protocol.

[0020] In an optional implementation manner, the performing weighted calculation on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol to obtain multiple feature matching scores includes:

[0021] Perform matching calculation on the voltage waveform and the voltage waveform supported by the communication protocol to obtain a voltage waveform matching score;

[0022] Perform matching calculation on the pulse width and the pulse width supported by the communication protocol to obtain a pulse width matching score;

[0023] Perform matching calculation on the signal frequency and the signal frequency supported by the communication protocol to obtain a signal frequency matching score;

[0024] Obtain the weight ratios of the voltage waveform, the pulse width, and the signal frequency;

[0025] Perform weighted calculation according to the weight ratios, the voltage waveform matching score, the pulse width matching score, and the signal frequency matching score to obtain the feature matching score.

[0026] In an optional implementation manner, the determining the target baud rate of the corresponding target pin according to the target communication protocol includes:

[0027] Obtain the set of standard baud rates of the target communication protocol;

[0028] Send synchronization frames to each baud rate node in the set of standard baud rates to obtain the bit error rate corresponding to each baud rate node;

[0029] Determine the target baud rate of the target pin corresponding to the target communication protocol as the baud rate node with the lowest bit error rate.

[0030] In an alternative embodiment, the data acquisition of the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set includes:

[0031] Automatically call the corresponding data acquisition bus according to the target communication protocol;

[0032] Automatically adjust the data acquisition baud rate of the data acquisition bus according to the target baud rate;

[0033] Through the data acquisition bus, acquire the vehicle bus data at the data acquisition baud rate to obtain a second data set.

[0034] In an alternative embodiment, the method further includes:

[0035] Synchronize the second data set to the data memory;

[0036] Determine whether the amount of data stored in the data memory is greater than a preset data volume threshold;

[0037] When the amount of data stored in the data memory is greater than the preset data volume threshold, upload the amount of data stored in the data memory to the server.

[0038] In a second aspect, the present application provides a vehicle bus data acquisition device, the device includes:

[0039] A pin determination module for determining a set of target pins used by the vehicle data bus through voltage testing.

[0040] A first acquisition module for pre-acquiring vehicle bus data based on each target pin in the set of target pins to obtain a first data set.

[0041] A first determination module for determining the target communication protocol corresponding to each target pin according to the first data set.

[0042] A second determination module for determining the target baud rate of the corresponding target pin according to the target communication protocol.

[0043] A second acquisition module for acquiring vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set.

[0044] In a third aspect, the present application provides a collection device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the vehicle bus data collection method are implemented.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed, the steps of the vehicle bus data collection method are implemented.

[0046] The present application determines a set of target pins used by the vehicle data bus through voltage testing; pre-collects vehicle bus data for each target pin in the set of target pins to obtain a first data set; determines the target communication protocol corresponding to each target pin according to the first data set; determines the target baud rate of the corresponding target pin according to the target communication protocol; and thus collects vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set. By analyzing the vehicle bus data, the present application automatically adjusts the communication protocol and baud rate of the data interface of the collection device, solving the technical problem in the prior art that the collection of vehicle bus data is too slow because the communication protocol of the collection device needs to be manually selected and the baud rate of the pins needs to be set. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 is a flowchart of the vehicle bus data collection method shown in an embodiment of the present application;

[0048] Figure 2 is a structural diagram of the vehicle bus data collection device shown in an embodiment of the present application;

[0049] Figure 3 is a structural diagram of the collection device shown in an embodiment of the present application;

[0050] Figure 4 is a field usage diagram of the collection device shown in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0051] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification of the present application, the singular forms "a", "an", "the", "above", "said", "this" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term " / and / " used in the present application refers to any or all possible combinations including one or more of the listed items.

[0052] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and should not be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0053] Refer to Figure 1 As shown, it is a flowchart of a vehicle bus data acquisition method shown in an embodiment of the present application. The vehicle bus data acquisition method is executed by an acquisition device, and the vehicle bus data acquisition method specifically includes the following steps.

[0054] S11. Determine a set of target pins used by the vehicle data bus through voltage testing.

[0055] Voltage testing refers to testing the voltage of each pin on the on-board diagnostics (OBD) system of the vehicle through the processor of the acquisition device to obtain the voltage value of each pin. Among them, the on-board diagnostics system is an electronic system on the vehicle used to monitor and report the operating conditions of the vehicle. Currently, the OBD-II detection standard is mainly used in vehicles on the market. The set of target pins refers to the set of target pins composed of target pins whose voltage values meet the requirements after voltage testing.

[0056] After the acquisition device is connected to the vehicle bus, the processor in the acquisition device will perform voltage testing on each pin of the on-board diagnostics system in the vehicle bus. According to the OBD-II detection standard, each pin of the vehicle is scanned to obtain the test voltage value of each pin, and the test voltage value of each pin is tested to obtain all the target pins that meet the voltage value test requirements, thereby obtaining the set of target pins.

[0057] In an optional embodiment, the determining a set of target pins used by the vehicle data bus through voltage testing includes:

[0058] Perform voltage testing on each pin in the vehicle to obtain the test voltage of each pin;

[0059] Determine the test voltage greater than the preset test voltage threshold as the target test voltage;

[0060] Determine the set of target pins used by the vehicle according to the pins corresponding to the target test voltage.

[0061] The processor of the acquisition device tests the voltage of each pin on the vehicle bus to obtain the test voltage value corresponding to each pin, and compares each test voltage value with a preset test voltage threshold. The preset test voltage threshold is used to determine whether the corresponding pin is in a valid state. A test voltage value higher than the preset test voltage threshold indicates that the device or circuit connected to the corresponding pin is operating normally, and a test voltage value lower than the preset test voltage threshold indicates that the device or circuit connected to the corresponding pin is not operating or is abnormal. Mark the test voltage values greater than the preset test voltage threshold as target predicted voltages; mark the pins corresponding to the target predicted voltages as target pins, and traverse all target pins with predicted voltage values greater than the preset test voltage threshold to obtain a target pin set.

[0062] By testing the voltage of each pin on the vehicle bus and setting a preset test voltage to obtain the target test voltage, the acquisition device can effectively distinguish abnormal pins from normal pins, helping maintenance personnel quickly locate the range of abnormal pins. The acquisition device can obtain data from the target pins corresponding to the target test voltage, improving the accuracy of collecting vehicle bus data.

[0063] S12, based on each target pin in the target pin set, pre-collect vehicle bus data to obtain a first data set.

[0064] Pre-collection means that the acquisition device collects data in the vehicle bus according to a preset data collection frequency and collection time period. The acquisition device can arrange the collected data frame by frame in the collection time period according to the collection frequency, facilitating subsequent analysis and calculation of the obtained data. The first data set mainly includes the voltage waveform, pulse width, and signal frequency on the corresponding vehicle bus obtained from the target pins.

[0065] The acquisition device collects data for each target pin within the collection time period, and obtains the voltage change situation, pulse duration, and signal frequency of each frame of the pin according to the sampling frequency, that is, the first data set.

[0066] S13, according to the first data set, determine the target communication protocol corresponding to each target pin.

[0067] A communication protocol refers to a set of rules for data exchange between computers or devices. It defines the format, sequence, error detection and correction methods of data transmission, as well as other details related to data communication. There is a communication protocol matching module in the acquisition device processor, which contains different types of communication protocols in the vehicle field, such as CAN bus communication protocol, LIN communication protocol, MOST communication protocol, etc. In different communication protocols, different standard voltage waveforms, standard pulse widths and standard signal frequencies are specified to regulate the normal transmission of signal data in the vehicle bus. The corresponding communication protocol of the target pin can be determined by matching in the communication protocol matching module according to the first data set obtained from the vehicle bus.

[0068] After the acquisition device obtains the first data set, it extracts the voltage waveform, pulse width and signal frequency of each pin in the first data set. According to the extracted voltage waveform, pulse width and signal frequency, in the communication protocol matching module, perform matching calculations with the standard voltage waveform, standard pulse width and standard signal frequency of each communication protocol to obtain the similarity degree between the target pin voltage waveform and the standard voltage waveform of each communication protocol, the similarity degree between the target pin pulse width and the standard pulse width of each communication protocol, and the similarity degree between the target pin signal frequency and the standard signal frequency of each communication protocol. The communication protocol with the highest comprehensive similarity degree of voltage waveform, pulse width and signal frequency is the target communication protocol corresponding to the target pin.

[0069] In an alternative embodiment, determining the target communication protocol corresponding to each target pin according to the first data set includes:

[0070] Obtain the voltage waveform, pulse width and signal frequency of each target pin in the first data set;

[0071] Based on the voltage waveform, pulse width and signal frequency of each target pin, perform weighted calculations with each communication protocol to obtain multiple feature matching scores;

[0072] Judge whether each of the feature matching scores is greater than a preset feature matching score threshold;

[0073] When the feature matching score is greater than the preset feature matching score threshold, determine the corresponding communication protocol as the target communication protocol.

[0074] The feature matching score is an index used to evaluate the similarity between a target signal and predefined features. By calculating the matching scores between multiple different target signals and predefined features, the feature matching score can be obtained by performing weighted calculations according to the weight ratios of multiple different signals in the predefined features. The higher the feature matching score, the higher the similarity between the evaluated target signal and the predefined features.

[0075] Extract the voltage waveform, pulse width, and signal frequency of each target pin in the first data set. By calculating the voltage waveform of the target pin and the standard voltage waveform of the communication protocol, a voltage waveform matching score can be obtained; by calculating the pulse width of the target pin and the standard pulse width of the communication protocol, a pulse width matching score can be obtained; by calculating the signal frequency of the target pin and the standard signal frequency of the communication protocol, a signal frequency matching score can be obtained. Among them, the voltage pulse matching score is used to measure the similarity between the voltage waveform of the signal under test and the voltage waveform of the predefined communication protocol; the pulse width matching score is used to measure the similarity between the pulse width of the signal under test and the pulse width of the predefined communication protocol; the signal frequency matching score is used to measure the similarity between the signal frequency of the signal under test and the signal frequency of the predefined communication protocol. The higher the matching score, the better the matching degree, and the higher the matching degree with the corresponding communication protocol.

[0076] In different communication protocols, the importance of the standard voltage waveform, standard pulse width, and standard signal frequency is different, and there are different weight ratios for the standard voltage waveform, standard pulse width, and standard signal frequency. The obtained voltage waveform matching score, pulse width matching score, and signal frequency matching score are weighted and calculated according to the corresponding weight ratios to obtain the characteristic matching score of the target pin for the corresponding communication protocol.

[0077] By calculating the characteristic matching score for each target pin, if the obtained characteristic matching score is greater than the preset matching score threshold, it indicates that the voltage waveform, pulse width, and signal frequency of the target pin have a very high matching degree with the standard voltage waveform, standard pulse width, and standard signal frequency of the corresponding communication protocol. Then, the communication protocol with the highest characteristic matching score corresponding to the target pin is the target communication protocol. For example, assume that the characteristic matching score of the target pin with communication protocol A is 0.93, and the characteristic matching score with communication protocol B is 0.73. Assume that the preset characteristic matching score threshold is 0.90. Since the characteristic matching score with communication protocol A is greater than the preset characteristic matching score threshold, communication protocol A is the target communication protocol.

[0078] By performing characteristic matching and weighted calculation on the voltage waveform, pulse width, and signal frequency of each target pin with the standard voltage waveform, standard pulse width, and standard signal frequency in the communication protocol, the accuracy of matching the target pin to the corresponding communication protocol is improved, and the accurate recognition ability of the acquisition device for the communication protocol corresponding to the target pin in the automotive bus is improved.

[0079] In an alternative embodiment, the weighted calculation of each target pin's voltage waveform, pulse width, and signal frequency with each communication protocol to obtain multiple characteristic matching scores includes:

[0080] Perform a matching calculation based on the voltage waveform and the voltage waveform supported by the communication protocol to obtain a voltage waveform matching score;

[0081] Perform a matching calculation based on the pulse width and the pulse width supported by the communication protocol to obtain a pulse width matching score;

[0082] Perform a matching calculation based on the signal frequency and the signal frequency supported by the communication protocol to obtain a signal frequency matching score;

[0083] Obtain the weight ratios of the voltage waveform, the pulse width, and the signal frequency;

[0084] Perform a weighted calculation based on the weight ratios, the voltage waveform matching score, the pulse width matching score, and the signal frequency matching score to obtain the feature matching score.

[0085] The matching calculation refers to the calculation by the correlation coefficient method, which is a calculation method used to measure the linear relationship between two variables. The correlation coefficient method is used to calculate based on the voltage waveform of the target pin and the standard protocol of the communication protocol to obtain the voltage waveform matching score. Similarly, the pulse width matching score and the signal frequency matching score are obtained.

[0086] Exemplarily, assume that there is a communication protocol A and a communication protocol B in the communication protocol matching module. In communication protocol A, the weight of the standard voltage waveform is 0.6, the weight of the standard pulse width is 0.3, and the weight of the standard signal frequency is 0.1. In communication protocol B, the weight of the standard voltage waveform is 0.4, the weight of the standard pulse width is 0.4, and the weight of the standard signal frequency is 0.2. Taking the voltage waveform as an example, assume that the voltage waveform of a target pin is {0.2, 0.5, 0.8, 1.0, 0.7, 0.4, 0.1}, the standard voltage waveform in communication protocol A is {0.1, 0.4, 0.7, 1.0, 0.6, 0.3, 0.0}, and the standard voltage waveform specified by communication protocol B is {0.0, 0.3, 0.6, 0.9, 0.5, 0.2, 0.1}. Calculate the correlation score by the correlation coefficient method. The voltage waveform matching score between the target pin and communication protocol A is 0.95, and the voltage matching score with communication protocol B is 0.72. Similarly, assume that the pulse width matching score between the target pin and communication protocol A is 0.87, and the signal frequency matching score is 0.92 by calculating the correlation coefficient method. The pulse width matching score with communication protocol B is 0.77, and the signal frequency matching score is 0.65. Then, according to the corresponding weight ratios in communication protocol A and communication protocol B, the feature matching score between the target pin and communication protocol A is 0.93, and the feature matching score with communication protocol B is 0.73.

[0087] By performing weighted calculations on the voltage waveform matching score, pulse width matching score, and signal frequency matching score, an effective judgment is made on whether the pin meets the corresponding communication protocol standard, ensuring the recognition ability of the acquisition device for the communication protocol corresponding to the target interface. By introducing the weight ratio for the communication protocol, the accurate recognition of the communication protocol is further improved, ensuring that the acquisition device obtains the target communication protocol through multi-level recognition of the communication protocol corresponding to the target pin.

[0088] S14. Determine the target baud rate of the corresponding target pin according to the target communication protocol.

[0089] The baud rate is an index to measure the data transmission rate, indicating the number of bits transmitted per second. Different communication protocols support different baud rates to determine the data transmission speed in the communication channel. The acquisition device obtains multiple baud rates supported by the target communication protocol according to the target communication protocol of the target pin, and obtains the baud rate with the most stable data transmission as the target baud rate.

[0090] In an optional implementation manner, the determining the target baud rate of the corresponding target pin according to the target communication protocol includes:

[0091] Obtain the standard baud rate set of the target communication protocol;

[0092] Send synchronization frames to each baud rate node in the standard baud rate set to obtain the bit error rate corresponding to each baud rate node;

[0093] Determine the baud rate node with the lowest bit error rate as the target baud rate of the corresponding target pin of the target communication protocol.

[0094] Different communication protocols can support multiple different standard baud rates. For example, in the CAN protocol, there are multiple standard baud rates, including 250 kbit / s, 500 kbit / s, 1 Mbit / s, and 125 kbit / s. The standard baud rate set of the CAN protocol is composed of these four standard baud rate nodes.

[0095] A synchronization frame is a special data frame, usually including a frame header, a clock synchronization field, and a frame tail. The frame header is used to identify the start of the frame and contains the start flag of the synchronization frame; the clock synchronization field contains synchronization information to help the receiving end synchronize the clock; the frame tail is used to identify the end of the frame. By ensuring that the structure of the synchronization frame remains consistent at the transmitting end and the receiving end, it is ensured that the receiving end can correctly parse the data of the synchronization frame.

[0096] After the acquisition device confirms the target communication protocol corresponding to the target pin, it will obtain the set of standard baud rates supported by the target communication protocol, send synchronization frames to each baud rate node in the set of standard baud rates. At each baud rate node, receive the synchronization frame, compare the received data with the sent expected data to calculate the bit error rate of each baud rate node, and evaluate the communication quality of the baud rate node by calculating the bit error rate.

[0097] Exemplarily, assume that the vehicle bus uses the UART communication protocol, and the corresponding set of standard baud rates is {9600bps, 19200 bps, 38400 bps, 115200 bps}. At each baud rate node, send a synchronization frame. The content of the synchronization frame is designed in a pattern that can be easily detected and synchronized at the receiving end. At the receiving end, receive the synchronization frame and detect the frame header and frame tail to ensure correct identification of the synchronization frame. Count the number of synchronization frames sent and received at each baud rate node. Count the number of errors in the received synchronization frames to calculate the bit error rate. Assume that we send 100 synchronization frames at the baud rate node 9600bps, and the receiving end receives 95 synchronization frames, among which 2 synchronization frames have errors. Then the corresponding bit error rate is 2 / 95 ≈ 0.021, that is, 2.1%. If the bit error rates of other nodes are higher, then 9600 bps is the target baud rate.

[0098] The acquisition device obtains the baud rate node with the lowest bit error rate as the target baud rate according to the bit error rates corresponding to each different baud rate node, reducing the possibility of data errors during transmission and improving the stability during the data acquisition process.

[0099] S15, according to the target communication protocol and the corresponding target baud rate, perform data acquisition on the vehicle bus data to obtain a second data set.

[0100] The acquisition device obtains the target communication protocol and the target baud rate corresponding to the target pin, and the acquisition device performs data acquisition on the corresponding pin according to the corresponding communication protocol and target baud rate. The acquired data includes engine information, vehicle speed information, vehicle status information, fault code information, etc., that is, the second data set.

[0101] In an alternative embodiment, the performing data acquisition on the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set includes:

[0102] Automatically call the corresponding data acquisition bus according to the target communication protocol;

[0103] Automatically adjust the data acquisition baud rate of the data acquisition bus according to the target baud rate;

[0104] Collect the vehicle bus data at the data collection baud rate through the data collection bus to obtain a second data set.

[0105] The collection device automatically calls the data collection bus with the corresponding target protocol in the device according to the target communication protocol, and automatically adjusts the data collection baud rate of the corresponding data collection bus according to the target baud rate. Collect the vehicle bus data through the same communication protocol and bit rate. Obtain a second data set. The second data set contains real-time information on the vehicle bus. The collection device can monitor the vehicle status, detect faults and generate diagnostic information based on the real-time information on the vehicle bus, facilitating vehicle maintenance or repair by maintenance personnel. Especially after the vehicle is sold, continuous maintenance, repair and other work are still required. At this time, a diagnostic device is needed to read and set data of the vehicle. Using this device will automatically collect and record the communication data between them. When diagnostic product developers need to collect data, this device can also be used to collect the communication data between the diagnostic device and the vehicle.

[0106] In an alternative embodiment, the method further includes:

[0107] Synchronize the second data set to the data memory;

[0108] Determine whether the amount of data stored in the data memory is greater than a preset data volume threshold;

[0109] When the amount of data stored in the data memory is greater than the preset data volume threshold, upload the amount of data stored in the data memory to the server.

[0110] After the collection device obtains the second data set from the corresponding bus pin at the target data collection baud rate through the data collection bus, it will synchronize the data in the second data set to the data memory in the collection device. There is a preset data volume threshold in the data memory. When the obtained second data set in the data memory is greater than the preset data volume threshold, the collection device will upload the amount of data stored in the data memory to the server.

[0111] By synchronizing the second data set obtained by the acquisition device from the target pins to the data memory, the vehicle status can be monitored in real time. When the amount of data in the data memory reaches the threshold, the corresponding data is uploaded to the corresponding target server, reducing the broadband overhead of frequent uploads to the server, helping to save costs and improve efficiency. At the same time, the data memory can act as a buffer. In the case of unstable network or unreachable server, the data can still be saved. When the connection is restored, the system will upload the accumulated data to ensure reliable operation in an unstable network environment and prevent the acquired data from being lost.

[0112] This application determines the set of target pins used by the vehicle data bus through voltage testing; pre-collects vehicle bus data for each target pin in the set of target pins to obtain a first data set; determines the target communication protocol corresponding to each target pin according to the first data set; determines the target baud rate of the corresponding target pin according to the target communication protocol; and collects the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set.

[0113] This application determines the set of target pins used by the vehicle data bus through voltage testing; pre-collects vehicle bus data for each target pin in the set of target pins to obtain a first data set; determines the target communication protocol corresponding to each target pin according to the first data set; determines the target baud rate of the corresponding target pin according to the target communication protocol; and then collects the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set. By analyzing the vehicle bus data, this application automatically adjusts the communication protocol and baud rate of the data interface of the acquisition device, solving the technical problem in the prior art that the acquisition of vehicle bus data is too slow because the communication protocol of the acquisition device needs to be manually selected and the baud rate of the pins needs to be set.

[0114] Figure 2 It is a functional module diagram of a vehicle bus data acquisition device provided by an embodiment of this application.

[0115] In some embodiments, the vehicle bus data acquisition device 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the vehicle bus data acquisition device 20 can be stored in the memory of the industrial control computer and executed by at least one processor to execute (see details in Figure 1 the description) the functions of the vehicle bus data acquisition method.

[0116] In this embodiment, the vehicle bus data acquisition device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include a pin determination module 201, a first acquisition module 202, a first determination module 203, a second determination module 204, a second acquisition module 205, and a data upload module 206. The module referred to in the present invention means a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in a memory.

[0117] The pin determination module 201 is configured to determine a target pin set used by the vehicle data bus through voltage testing.

[0118] The first acquisition module 202 is configured to perform pre-data acquisition on the vehicle bus data based on each target pin in the target pin set to obtain a first data set.

[0119] The first determination module 203 is a first determination module, configured to determine a target communication protocol corresponding to each target pin according to the first data set.

[0120] The second determination module 204 is configured to determine a target communication protocol corresponding to each target pin according to the first data set.

[0121] The second acquisition module 205 is configured to perform data acquisition on the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set.

[0122] The data upload module 206 is configured to synchronize the second data set to a data memory; determine whether the amount of data stored in the data memory is greater than a preset data amount threshold; when the amount of data stored in the data memory is greater than the preset data amount threshold, upload the amount of data stored in the data memory to a server.

[0123] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, all or part of the steps of the vehicle bus data acquisition method are implemented.

[0124] Refer to Figure 3 As shown, it is a schematic structural diagram of the acquisition device provided by an embodiment of the present application. In a preferred embodiment of the present application, the acquisition device 3 includes a memory 31, at least one processor 32, and at least one communication bus 33.

[0125] Those skilled in the art should understand, Figure 3The structure of the acquisition device shown does not constitute a limitation on the embodiments of this application. It can be either a bus structure or a star structure. The industrial control computer may also include more or fewer other hardware components or different component arrangements than those shown in the figure.

[0126] In some embodiments, the acquisition device 3 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, processors, application-specific integrated circuits, programmable gate arrays, digital signal processors, and embedded devices, etc. The acquisition device 3 may also include a client device, which includes, but is not limited to, any electronic product that can interact with a client through means such as a keyboard, mouse, remote control, touchpad, or voice control device. For example, personal computers, tablet computers, smart phones, digital scanning devices, etc.

[0127] In some embodiments, a computer program is stored in the memory 31, and when the computer program is executed by the at least one processor 32, all or part of the steps in the vehicle bus data acquisition method as described are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically-erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disc memories, magnetic disk memories, tape memories, or any other computer-readable medium capable of carrying or storing data. Further, the computer-readable storage medium mainly includes a storage program area and a storage data area. Among them, the storage program area can store an operating system, application programs required for at least one function, etc.

[0128] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the acquisition device 3, connecting various components of the entire acquisition device 3 through various interfaces and lines. By running or executing programs or modules stored in the memory 31, and by invoking data stored in the memory 31, it performs various functions of the acquisition device 3 and processes data. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the vehicle bus data acquisition method described in the embodiments of the present application; or implements all or part of the functions of the vehicle bus data acquisition method. The at least one processor 32 may be composed of integrated circuits. For example, it may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same or different functions, including a combination of one or more central processing units (CPUs), processors, digital processing chips, graphics processors, and various control chips, etc.

[0129] In some embodiments, the at least one communication bus 33 is arranged to enable connection communication between the memory 31 and the at least one processor 32, etc. Although not shown, the acquisition device 3 may further include a power source (such as a battery) for supplying power to each component. Preferably, the power source can be logically connected to the at least one processor 32 through a power management device, so as to implement functions such as management of charging, discharging, and power consumption management through the power management device. The power source may also include any components such as one or more DC or AC power sources, a recharge device, a power failure detection circuit, a power converter or inverter, a power status indicator, etc. The acquisition device 3 may also include various sensors, a Bluetooth module, a Wi-Fi module, etc., which will not be elaborated here.

[0130] The above-mentioned integrated unit implemented in the form of software function modules can be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, including several instructions for causing a processor to execute part of the methods described in the various embodiments of the present application.

[0131] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0132] The module described as a separation component may or may not be physically separated. The component shown as a module may or may not be a physical unit, and it may be located in one place or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0133] The above content is only a specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application.

Claims

1. A method for collecting vehicle bus data, characterized in that The method includes: Determining a set of target pins used by the vehicle data bus through voltage testing; Pre-collecting vehicle bus data based on each target pin in the set of target pins to obtain a first data set; Determining a target communication protocol corresponding to each target pin according to the first data set; Determining a target baud rate of the corresponding target pin according to the target communication protocol; Collecting the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set; The determining a target communication protocol corresponding to each target pin according to the first data set includes: Obtaining the voltage waveform, pulse width, and signal frequency of each target pin in the first data set; Performing weighted calculation based on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol to obtain multiple feature matching scores; Judging whether each feature matching score is greater than a preset feature matching score threshold; When the feature matching score is greater than the preset feature matching score threshold, determining the corresponding communication protocol as the target communication protocol; The performing weighted calculation based on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol to obtain multiple feature matching scores includes: Performing matching calculation based on the voltage waveform and the voltage waveform supported by the communication protocol to obtain a voltage waveform matching score; performing matching calculation based on the pulse width and the pulse width supported by the communication protocol to obtain a pulse width matching score; performing matching calculation based on the signal frequency and the signal frequency supported by the communication protocol to obtain a signal frequency matching score; obtaining the weight ratio of the voltage waveform, the pulse width, and the signal frequency; Performing weighted calculation according to the weight ratio, the voltage waveform matching score, the pulse width matching score, and the signal frequency matching score to obtain the feature matching score; The determining a target baud rate of the corresponding target pin according to the target communication protocol includes: Obtaining a set of standard baud rates of the target communication protocol; Sending a synchronization frame to each baud rate node in the set of standard baud rates to obtain the bit error rate corresponding to each baud rate node; Determining the baud rate node with the lowest bit error rate as the target baud rate of the corresponding target pin of the target communication protocol.

2. The vehicle bus data acquisition method according to claim 1, wherein The determining a set of target pins used by the vehicle data bus through voltage testing includes: Performing voltage testing on each pin in the vehicle to obtain the test voltage of each pin; Determining the test voltage greater than a preset test voltage threshold as the target test voltage; Determining the set of target pins used by the vehicle according to the pins corresponding to the target test voltage.

3. The vehicle bus data acquisition method according to claim 1, wherein The collecting the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set includes: automatically invoking the corresponding data collection bus according to the target communication protocol; Automatically adjusting the data collection baud rate of the data collection bus according to the target baud rate; Data collection of the vehicle bus data is performed at the data collection baud rate through the data collection bus to obtain a second data set.

4. The vehicle bus data acquisition method according to claim 3, characterized in that, The method further includes: Synchronizing the second data set to a data memory; Determining whether the amount of data stored in the data memory is greater than a preset data amount threshold; When the amount of data stored in the data memory is greater than the preset data amount threshold, uploading the amount of data stored in the data memory to a server.

5. A vehicle bus data acquisition device, characterized in that, The apparatus includes: A pin determination module, configured to determine a set of target pins used by a vehicle data bus through voltage testing; A first acquisition module, configured to perform data pre-acquisition on vehicle bus data based on each target pin in the set of target pins to obtain a first data set; A first determination module, configured to determine a target communication protocol corresponding to each target pin according to the first data set; A second determination module, configured to determine a target baud rate of a corresponding target pin according to the target communication protocol; A second acquisition module, configured to perform data collection on the vehicle bus data according to the target communication protocol and the corresponding target baud rate to obtain a second data set; Specifically, the first determination module is configured to: Obtain the voltage waveform, pulse width, and signal frequency of each target pin in the first data set; Perform weighted calculation on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol to obtain a plurality of feature matching scores; Determine whether each of the feature matching scores is greater than a preset feature matching score threshold; When the feature matching score is greater than the preset feature matching score threshold, determine the corresponding communication protocol as the target communication protocol; The first determination module obtaining a plurality of feature matching scores by performing weighted calculation on the voltage waveform, pulse width, and signal frequency of each target pin and each communication protocol includes: Performing matching calculation on the voltage waveform and the voltage waveform supported by the communication protocol to obtain a voltage waveform matching score; performing matching calculation on the pulse width and the pulse width supported by the communication protocol to obtain a pulse width matching score; performing matching calculation on the signal frequency and the signal frequency supported by the communication protocol to obtain a signal frequency matching score; obtaining the weight ratio of the voltage waveform, the pulse width, and the signal frequency; Performing weighted calculation according to the weight ratio, the voltage waveform matching score, the pulse width matching score, and the signal frequency matching score to obtain the feature matching score; Specifically, the second determination module is configured to: Obtain a set of standard baud rates of the target communication protocol; Sending a synchronization frame to each baud rate node of the set of standard baud rates to obtain a bit error rate corresponding to each baud rate node; Determining the baud rate node with the lowest bit error rate as the target baud rate of the corresponding target pin of the target communication protocol.

6. A data acquisition device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the vehicle bus data collection method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the vehicle bus data acquisition method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Communication protocol deciphering method and device

    CN101425876A

  • OBD detection method and related equipment

    CN111158347A

  • Rapid collection method and device for vehicle data and electronic equipment

    CN116095190A

  • Systems and Methods for Detection of Vehicle Bus Protocol Using Signal Analysis

    US20210266193A1