A method and device for remotely acquiring CAN data
The method and device for remotely acquiring CAN data via TBOX solves the problems of flexibility and continuity in CAN data acquisition for new energy vehicles, and realizes remote data acquisition without DBC file configuration and without data loss, meeting the diverse needs of enterprises and users.
Patent Information
- Application Number
- CN202010909389.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-02
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-09-02
AI Technical Summary
In existing technologies, CAN data acquisition for new energy vehicles cannot collect data from the entire vehicle, making anomaly analysis inconvenient. TBOX devices require the configuration of DBC files, limiting flexibility. The data upload method results in discontinuous data and may miss intermediate data, affecting user experience.
By interfacing with the target vehicle's CAN system via TBOX, monitoring data storage flags and storing them in FLASH, configuring independent baud rates for multiple CAN channels, setting filters, and setting automatic upload conditions, data is stored in data packet or file format on the TSP platform or FTP server, enabling remote acquisition of CAN data.
It enables CAN data acquisition without the need for DBC file configuration, flexibly adapts to multiple scenarios, ensures data continuity, saves bandwidth, supports diverse enterprise needs, and facilitates data parsing and customer use.
Smart Images

Figure CN112073502B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile CAN data acquisition, and in particular to a method and device for remotely acquiring CAN data. Background Art
[0002] Now, as the strategic development direction of the country, new energy vehicles are accelerating their penetration into intelligence, networking, electrification and sharing. With the rapid technological changes today, many problems will arise in actual operation; in the past, the traditional method required people to go to the site to collect vehicle CAN data for analysis; and some faults were only triggered under specific conditions, which may be difficult to simulate after going to the site, and it is impossible to collect abnormal data and analyze the problem, which is time-consuming and laborious; according to the relevant national standards for new energy vehicles, TBOX equipment needs to be installed, but there are also some problems in the actual data collection and storage process: 1. The national standards stipulate that fixed data is collected and reported to the platform, and only fixed parameters set in advance can be viewed; in actual use, there will be fault information of a certain component of a single vehicle, and the standard protocol may not include the component at this time, which makes it inconvenient for users to use; 2. The existing TBOX equipment needs to configure the DBC file for CAN protocol adaptation, which limits the flexibility of TBOX reading data; 3. The existing data upload method mostly uses temporary cache, new data will overwrite old data, the acquired data is not continuous, and data will inevitably be missed in the middle, affecting the actual use of customers. Summary of the invention
[0003] In order to overcome the above-mentioned deficiencies in the prior art, the present invention proposes a method and device for remotely acquiring CAN data, which solves the technical problem that the prior art can only collect national standard data but cannot collect vehicle CAN data, causing inconvenience in vehicle abnormality analysis.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for remotely acquiring CAN data specifically comprises the following steps:
[0006] S1: The CAN channel of TBOX is connected to the CAN system of the target vehicle;
[0007] S2: TBOX is powered on for self-test. After passing the self-test, it starts to connect to the TSP platform and send national standard data.
[0008] S3: During the data transmission process, TBOX monitors the data storage start flag at any time. When TBOX receives the data storage start flag, TBOX starts to store the received vehicle CAN data into FLASH.
[0009] S4: When TBOX meets the end storage flag, the remote acquisition of CAN data ends and prepares for uploading;
[0010] S5: Upload the CAN data stored in FLASH to the TSP platform or FTP server;
[0011] S6: After receiving the data, the TSP platform parses the CAN data into plain text data and analyzes and classifies the plain text data;
[0012] After receiving the data, the FTP server saves the CAN data for use.
[0013] Furthermore, the CAN channels of the TBOX in S1 are provided with several channels, and each CAN channel is independently configured with a different CAN baud rate.
[0014] Furthermore, S1 also includes setting a CAN filter. By setting the filter conditions, the CAN data that meets the filter conditions is stored in the FLASH, and other CAN data that does not meet the filter conditions is discarded.
[0015] Furthermore, the specific process of TBOX connecting to the TSP platform and sending national standard data in S2 includes: TBOX starts to connect to the TSP platform with the set VIN, the TSP platform compares the VIN reported by TBOX with the VIN bound to the TSP platform, and starts to send national standard data after the comparison and authentication are passed.
[0016] Furthermore, the data storage start flags in S3 include three types: set condition trigger, instruction trigger, and timing trigger; when any one of the three storage start conditions is met, TBOX starts to store the received vehicle CAN data into FLASH.
[0017] Furthermore, before the CAN data in S3 is stored in FLASH, TBOX first erases the data in the corresponding storage sector of FLASH, and then starts to receive CAN data and writes the CAN data to the specified sector of FLASH in a fixed format; after the current sector is full, the remaining sectors will be written in sequence according to the sector order.
[0018] Furthermore, the CAN data written in the FLASH is stored in a data packet format or a file format.
[0019] Furthermore, there are three data storage end flags in S4: set time arrival, set capacity full, and instruction storage end; when any one of the three storage end conditions is met, remote acquisition of vehicle CAN data ends.
[0020] Furthermore, the specific steps of uploading CAN data to the TSP platform in S5 include: the MCU takes out the CAN data from the FLASH and transmits it to the communication module, and the communication module uploads it to the TSP platform in the form of data packets through the TCP / IP protocol;
[0021] The specific steps of uploading CAN data to the FTP server include: the communication module first creates a file internally, the MCU takes out the CAN data from the FLASH, stores the CAN data in the internal file of the communication module, and after the data transmission is completed, it is uploaded to the FTP server in the form of a file.
[0022] A device for remotely acquiring CAN data, comprising:
[0023] TBOX is used to collect CAN data of the target vehicle and store the collected CAN data in FLASH. After the collection is completed, the CAN data stored in FLASH is uploaded;
[0024] The TSP platform receives data uploaded by FLASH and stores it in the form of data packets, and parses and classifies the stored CAN data;
[0025] FTP server receives data uploaded by TBOX and stores it in the form of CAN files.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] The present invention proposes a method and device for remotely acquiring CAN data, which integrates national standard data and CAN data collection through TBOX, and does not require configuration of DBC files and analysis of CAN data when collecting CAN data; and does not require installation of additional collection equipment;
[0028] In the data collection stage, multiple different CAN channels are configured for TBOX, and each CAN channel is independently configured with a different CAN baud rate to flexibly adapt to more scenarios;
[0029] When the present invention stores the remotely acquired CAN data, it is a continuous CAN data frame and the CAN data will not be missed;
[0030] The present invention can flexibly set the automatic upload conditions according to the "data storage start flag" to meet the diverse needs of enterprises;
[0031] By using the automatic storage and automatic storage end flags of the present invention, only data under set conditions is collected, which can save the traffic usage of the SIM card in the TBOX;
[0032] If the data stored in FLASH is uploaded to the TSP platform in the form of data packets, the platform can parse the data in plain text and display statistics; if it is uploaded to the FTP server in the form of CAN files, it can be convenient for customers to copy files for daily use. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A flowchart of a method for remotely acquiring CAN data according to an embodiment of the present invention;
[0034] Figure 2 This is a flow chart of uploading CAN data stored in FLASH to the TSP platform according to an embodiment of the present invention;
[0035] Figure 3 This is a flow chart of uploading CAN data stored in FLASH to an FTP server according to an embodiment of the present invention;
[0036] Figure 4 This is a schematic diagram of a device for remotely acquiring CAN data according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] Examples are shown to specifically illustrate certain embodiments of the present invention and should not be construed as limiting the scope of the present invention. The disclosed content of the present invention can be improved from materials, methods and reaction conditions at the same time, and all these improvements should fall within the spirit and scope of the present invention.
[0038] In the present invention, Controller Area Network is abbreviated as CAN; Flash memory is represented as FLASH; CAN database is abbreviated as DBC; Telematics Service Provider is abbreviated as TSP; Telematics box is abbreviated as TBOX; Vehicle Identification Number is abbreviated as VIN; File Transfer Protocol is abbreviated as FTP; Battery Management System is abbreviated as BMS; Microcontroller Unit is abbreviated as MCU.
[0039] like Figure 1 As shown, a method for remotely acquiring CAN data specifically includes the following steps:
[0040] S1: The CAN channel of TBOX is connected to the CAN system of the target vehicle.
[0041] In this embodiment, in order to meet the functional requirements of different car companies, the CAN channels of TBOX can be set to several channels, and each CAN channel can be independently configured with different CAN baud rates. Users can freely choose which CAN channels to use according to actual needs, and can configure different CAN baud rates for each CAN channel; after configuration, it can meet the use requirements of multiple CAN channels and different CAN channel baud rate configurations;
[0042] For example: configure 1 CAN: CAN1 baud rate is set to 250kBit / S or 500kBit / S;
[0043] Configure 2 CAN channels: CAN1 baud rate is set to 250kBit / S or 500kBit / S, CAN2 baud rate is set to 250kBit / S or 500kBit / S;
[0044] Configure 3 CAN channels: CAN1 baud rate is set to 250kBit / S or 500kBit / S, CAN2 baud rate is set to 250kBit / S or 500kBit / S, and CAN3 baud rate is set to 250kBit / S or 500kBit / S.
[0045] In this embodiment, a CAN filter is also set in the TBOX. By setting the filtering conditions, the CAN data that meets the filtering conditions is stored in the FLASH, and the other CAN data that does not meet the filtering conditions is discarded. For example, when the vehicle data volume is large, including all data such as batteries, motors, and electronic controls, but the user only wants to obtain battery data at this time, the filter can be set to report only battery data, filter motor and electronic control data, and the data obtained by the user is finally filtered data, which is convenient for the user to accurately locate the problem.
[0046] S2: TBOX performs a self-test after power-on. After the self-test passes, TBOX starts to connect to the TSP platform with the set VIN. The TSP platform compares the VIN reported by TBOX with the VIN bound to the TSP platform. After the comparison and authentication pass, it starts to send national standard data.
[0047] S3: During the data transmission process, TBOX monitors the flag for data storage start at any time. When TBOX receives the flag for data storage start, TBOX starts to store the received vehicle CAN data into FLASH.
[0048] In this embodiment, the flags for starting data storage in S3 include three types: set condition trigger, command trigger, and timed trigger; when any one of the three start storage conditions is met, it is deemed that TBOX has received the start storage flag. The storage method corresponding to the set condition trigger is set condition storage: according to customer needs, a certain trigger condition is set in advance, such as when the "battery insulation alarm" is generated, the original vehicle CAN data is stored to facilitate users to obtain the vehicle operation status under a certain specific state; the storage method corresponding to the command trigger is command storage: the TSP platform will set a "remote acquisition of CAN data" function button. Users can click the "remote acquisition of CAN data" button at any time when any vehicle is online to remotely acquire the vehicle CAN data; the storage method corresponding to the timed trigger is timed storage: users can set a timer through TBOX, such as storing data every 1 hour, so that users do not have to run with the vehicle, and can download the original CAN data from the platform every once in a while to analyze the vehicle operation status.
[0049] In this embodiment, the specific process of TBOX storing the received vehicle CAN data into FLASH in S3 includes: TBOX will set a part of the sectors of FLASH in advance to store CAN data. After receiving the start storage flag, in order to prevent data confusion, TBOX first erases the data of the corresponding storage sector of FLASH, and then starts to receive CAN data, and writes the CAN data to the specified sector of FLASH in a fixed format; after the current sector is full, the remaining sectors will be written in sequence according to the sector order.
[0050] The fixed format for writing CAN data to FLASH is data packet format or file format; Data packet format storage: After TBOX receives CAN data, it uses the format of 4byte (CAN_ID) + 1byte (CAN channel) + 8byte (CAN_data) to write the data packets to the FLASH sector in sequence for storage. This format not only preserves the validity of CAN data, but also saves TBOX traffic usage to the maximum extent; File format storage: After TBOX receives CAN data, it first writes the header data to the file, and then writes the data according to the storage format; The default file storage format is TIME+CAN+ID+LEN+DATA, and the data is written to the corresponding sector in this format. Of course, it can also be stored in a customized format according to customer needs.
[0051] S4: When TBOX meets the end storage flag, the remote acquisition of CAN data ends and prepares for uploading.
[0052] In this embodiment, there are three types of data storage end flags in S4: set time arrival, set capacity full storage, and instruction end storage; when any of the three storage end conditions is met, the remote acquisition of vehicle CAN data ends. Set time arrival: users can freely set the storage time. For example, if the user wants to know the changes in the vehicle CAN data 5 minutes after the "battery insulation alarm" is generated, you can set it to store only 5 minutes of data. When the 5 minutes are up, the CAN data will no longer be stored; Set capacity full storage: users can freely set the storage capacity within the maximum capacity of FLASH. For example, the user wants to set it to upload 5MB of data every hour; that is, every hour, TBOX will start storing data until 5MB of data is stored. Affected by the amount of data on the current CAN bus, the time to store 5MB cannot be fixed; Instruction end storage: The TSP platform will set a "remote end CAN data" function button. Users can click the "remote end CAN data" button at any time when the vehicle is online to end the remote acquisition of vehicle CAN data.
[0053] S5: Upload the CAN data stored in FLASH to the TSP platform and FTP server.
[0054] In this embodiment, if Figure 2 As shown, the specific steps of uploading CAN data to the TSP platform in S5 include: MCU takes out CAN data from FLASH and transmits it to the communication module, and the communication module uploads it to the TSP platform in the form of data packets through the TCP / IP protocol;
[0055] like Figure 3 As shown in the figure, the specific steps of uploading CAN data to the FTP server include: the communication module first creates a file internally, the MCU takes out the CAN data from the FLASH, stores the CAN data in the internal file of the communication module, and after the data transmission is completed, it is uploaded to the FTP server in the form of a file.
[0056] S6: After receiving the data, the TSP platform parses the CAN data into plain text data and analyzes and classifies the plain text data; after receiving the data, the FTP server saves the CAN data, and the user can freely copy and transfer files from the FTP server for daily use.
[0057] like Figure 4 As shown, a device for remotely acquiring CAN data includes:
[0058] TBOX is used to collect CAN data of the target vehicle and store the collected CAN data in FLASH. After the collection is completed, the CAN data stored in FLASH is uploaded;
[0059] The TSP platform receives data uploaded by FLASH and stores it in the form of data packets, and parses and classifies the stored CAN data;
[0060] FTP server receives data uploaded by TBOX and stores it in the form of CAN files.
[0061] Embodiment 1:
[0062] Abnormal phenomenon: A customer has a batch of newly produced vehicles. When they were first delivered to the customer, it was found that the instrument could not display the total mileage information without entering READY. After entering READY, the instrument could display the total mileage information normally.
[0063] Problem analysis: After the customer fed back the information to our company, he contacted the driver to assist our company in testing. With the assistance of the on-site driver, our company used the "remote acquisition of CAN data" function button on the TSP platform to obtain the original CAN data of the vehicle from ignition - not in READY state - to entering READY state within one minute;
[0064] By comparing the original CAN data, the mileage data sent by CAN is 0xFFFFFFFF when the instrument is not in the READY state. After entering the READY state, the mileage data sent is 0x00000158, which is the normal value.
[0065] Problem solving: After the customer fed back the data and phenomenon to the instrument manufacturer, the instrument manufacturer conducted a simulation test at the company and confirmed the existence of the phenomenon. The instrument program was modified and after successful verification, personnel were sent to the site to update the instrument program.
[0066] Compared with the traditional method: people need to be sent to the site to collect CAN data, then analyze the phenomenon, confirm the problem, and finally solve the problem;
[0067] After using the present invention, CAN data can be acquired remotely, the problem can be confirmed, and then the solution can be directly brought to the site, which makes it convenient for customers to solve the problem and saves time and cost.
[0068] Example 2
[0069] Abnormal phenomenon: The customer has a batch of newly produced new energy buses. Within the first week of operation, there were many cases of throttle failure when the power steering disappeared, which seriously affected the safety of the driver and the daily operation of the fleet. However, when the manufacturer sent technicians to follow the vehicles, this phenomenon was not easy to occur. After checking the background TBOX data, no abnormal information was found in the relevant parameters, and it was an occasional abnormality, which brought great inconvenience to the problem investigation.
[0070] Problem analysis: After the car company fed back the information to our company, our company adjusted the TBOX function: 1. Speed up the upload frequency of national standard + enterprise standard data to once per second; 2. When the steering power disappears, report the original CAN data within 1 minute; After upgrading the TBOX of 20 vehicles, after the fleet arranged the vehicle operation, an abnormal phenomenon occurred on the second day;
[0071] After the manufacturer's technical staff analyzed the data, they found the following phenomenon
[0072] 1: Check the national standard + enterprise standard data. When an abnormal phenomenon occurs, the oil pump input voltage is 0, resulting in failure of the oil pump assist.
[0073] 2: Check the national standard + enterprise standard data. The oil pump input voltage is 0, which is caused by the high-voltage distribution cabinet cutting off the voltage output;
[0074] 3: Checking the uploaded original CAN data, it was found that the vehicle's "No. 9 slave positive connector collected temperature was abnormal, and the BMS cut off the high-voltage output to protect the battery safety." Further analysis of the data revealed that "No. 9 slave positive connector collected temperature was abnormal, which only appeared briefly for 1S and then returned to normal."
[0075] Problem solved: After the car company sent the data to the BMS manufacturer, the BMS optimized the algorithm of the connector sampling point, eliminated the impact of data fluctuations on the vehicle function, and solved the problem;
[0076] Compared with traditional methods:
[0077] 1: Since the fault phenomenon is accidental and unpredictable, when the car company sent people to follow the car in the early stage, no abnormal phenomenon was found for the technicians to analyze the problem;
[0078] 2. “No. 9 slave positive connector” This data is not required by the car manufacturer and is the internal data of BMS, so TBOX will not collect this data for reporting;
[0079] 3: The fault only occurs briefly for 1 second. If the traditional temporary cache and loop overwrite method is used, it is highly likely that the fault information cannot be collected;
[0080] Using the present invention: after the set conditions are triggered, TBOX will automatically and continuously collect all CAN data and report them, which provides great convenience for enterprises to analyze the overall data.
[0081] In summary, the present invention proposes a method and device for remotely acquiring CAN data, which integrates national standard data and CAN data acquisition through TBOX, and there is no need to configure DBC files and parse CAN data when acquiring CAN data; there is no need to install additional acquisition equipment; in the data acquisition stage, multiple different CAN channels are configured for TBOX, and each CAN channel is independently configured with a different CAN baud rate, which can flexibly adapt to more scenarios; when the present invention stores the remotely acquired CAN data, it is a continuous CAN data frame and will not miss the CAN data; the present invention can flexibly set the automatic upload conditions according to the "data start storage flag" to meet the diversified needs of enterprises; through the automatic storage and automatic end storage flags of the present invention, only data under the set conditions is collected, which can save the traffic usage of the SIM card in the TBOX; if the data stored in the FLASH is uploaded to the TSP platform in the form of data packets, the platform can parse the data in plain text and display statistics; if it is uploaded to the FTP server in the form of CAN files, it can be convenient for customers to copy files for daily use.
[0082] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for remotely acquiring CAN data, characterized in that: The specific steps include: S1: The CAN channel of TBOX is connected to the CAN system of the target vehicle; S2: TBOX is powered on for self-test. After passing the self-test, it starts to connect to the TSP platform and send national standard data. S3: During the data transmission process, TBOX monitors the flag of data storage start at any time. When TBOX receives the flag of data storage start, TBOX starts to store the received vehicle CAN data into FLASH. S4: When TBOX meets the end storage flag, the remote acquisition of CAN data ends and prepares for uploading; S5: Upload the CAN data stored in FLASH to the TSP platform or FTP server; S6: After receiving the data, the TSP platform parses the CAN data into plain text data and analyzes and classifies the plain text data; After receiving the data, the FTP server saves the CAN data for use; The TBOX in S1 has several CAN channels, each of which is independently configured with a different CAN baud rate. Among them, configure 1 CAN: CAN1 baud rate is set to 250kBit / S or 500kBit / S; Configure 2 CAN channels: CAN1 baud rate is set to 250kBit / S or 500kBit / S, CAN2 baud rate is set to 250kBit / S or 500kBit / S; Configure 3 CAN channels: CAN1 baud rate is set to 250kBit / S or 500kBit / S, CAN2 baud rate is set to 250kBit / S or 500kBit / S, and CAN3 baud rate is set to 250kBit / S or 500kBit / S; There are three types of data storage start flags in S3: set condition trigger, instruction trigger, and timing trigger. When any of the three storage start conditions is met, TBOX starts to store the received vehicle CAN data into FLASH. There are three data storage end flags in S4: set time reached, set storage capacity full, instruction storage end; when any of the three storage end conditions is met, remote acquisition of vehicle CAN data ends; When the vehicle is first delivered to the customer, if it is not in READY state, the instrument cannot display the total mileage information; after entering READY state, if the instrument can normally display the total mileage information, the original CAN data of the vehicle within one minute from ignition - not in READY state - entering READY state can be obtained through the "remote acquisition of CAN data" function button on the TSP platform; In the case of the occasional abnormal phenomenon that the power steering disappears and the throttle fails at the same time in new energy buses, the frequency of uploading national standard + enterprise standard data is accelerated. When the power steering disappears, the original CAN data within 1 minute is reported. After the set conditions are triggered, TBOX will automatically and continuously collect all CAN data for reporting; Before storing CAN data in FLASH in S3, TBOX first erases the data in the corresponding storage sector of FLASH, then starts to receive CAN data and writes the CAN data to the specified sector of FLASH in a fixed format; when the current sector is full, the remaining sectors will be written in sequence according to the sector order; The specific steps of uploading CAN data to the TSP platform in S5 include: MCU takes out CAN data from FLASH and transmits it to the communication module, and the communication module uploads it to the TSP platform in the form of data packets through the TCP / IP protocol; The specific steps of uploading CAN data to the FTP server include: the communication module first creates a file internally, the MCU takes out the CAN data from the FLASH, stores the CAN data in the internal file of the communication module, and after the data transmission is completed, it is uploaded to the FTP server in the form of a file.
2. A method for remotely acquiring CAN data according to claim 1, characterized in that: S1 also includes setting a CAN filter. By setting the filter conditions, the CAN data that meets the filter conditions is stored in the FLASH, and other CAN data that does not meet the filter conditions is discarded.
3. A method for remotely acquiring CAN data according to claim 1, characterized in that: The specific process of TBOX connecting to the TSP platform and sending national standard data in S2 includes: TBOX starts to connect to the TSP platform with the set VIN, the TSP platform compares the VIN reported by TBOX with the VIN bound to the TSP platform, and starts to send national standard data after the comparison and authentication are passed.
4. A method for remotely acquiring CAN data according to claim 1, characterized in that: The CAN data written in FLASH is stored in packet format or file format.
5. A device for remotely acquiring CAN data, using the method for remotely acquiring CAN data according to any one of claims 1 to 4, characterized in that: include: TBOX is used to collect CAN data of the target vehicle and store the collected CAN data in FLASH. After the collection is completed, the CAN data stored in FLASH is uploaded; The TSP platform receives data uploaded by FLASH and stores it in the form of data packets, and parses and classifies the stored CAN data; FTP server receives data uploaded by TBOX and stores it in the form of CAN files.
