Vehicle data uploading method, device and equipment and storage medium

By determining the data configuration information and retransmission mechanism in the vehicle data upload method, the loss of vehicle CAN data when the network signal is poor is solved, and the accurate upload and stable transmission of data is achieved, ensuring the integrity and security of data .

CN119232728APending Publication Date: 2024-12-31CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411438771.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

When uploading vehicle CAN data to a cloud server, the prior art may easily lead to data loss due to poor network signals, and the accurate transmission of data cannot be guaranteed.

Method used

By determining the data configuration information, including the type identification of the data to be collected, the data collection period and the data upload period, the vehicle data is obtained and uploaded again when upload failure is detected, a retransmission mechanism is used to ensure the accurate transmission of data.

Benefits of technology

Accurate data upload in case of poor network signals is realized, data loss is avoided, and network congestion is avoided by flexible control of the amount of uploaded data, and storage of unuploaded data when the vehicle is powered off to ensure that it is uploaded again.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232728A_ABST
    Figure CN119232728A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle data uploading method and device, equipment and a storage medium. When the vehicle data is uploaded, the data configuration information is firstly determined; the data configuration information comprises a type identifier of to-be-collected data, a data collection period and a data uploading period; acquiring vehicle data to be uploaded according to the type identifier and the data acquisition period; uploading the vehicle data to a cloud server by using the data uploading period; if it is detected that uploading of the vehicle data fails, the vehicle data are uploaded to the cloud server again; visibly, the type, the sampling period and the uploading period of the uploaded data can be configured through the data configuration information, so that the uploaded data volume is flexibly controlled, and network congestion caused by uploading a large amount of data in a short time is avoided; moreover, through a retransmission mechanism, the vehicle data can be ensured to be accurately uploaded to the cloud server, and the phenomenon of data loss is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When a vehicle is driving, it will generate a large amount of vehicle CAN (Controller Area Network) data, such as battery, brake, speed, turning, intelligent driving, radar and other data. With the development of Internet of Vehicles technology, in order to monitor the performance, health and safety of the vehicle, the vehicle side will collect this data and upload it to the cloud. The cloud server receives and stores all the data generated during the vehicle's driving process so that the data can be viewed online in real time. However, when uploading CAN data to the cloud server, if the data upload fails due to poor network signal, data loss will occur, and the accurate transmission of CAN data cannot be guaranteed.

[0003] Therefore, how to accurately upload CAN data to a cloud server is a problem that those skilled in the art need to solve. Summary of the invention

[0004] The present application provides a vehicle data uploading method, device, equipment and storage medium to accurately upload CAN data to a cloud server.

[0005] In a first aspect, the present application provides a method for uploading vehicle data, comprising:

[0006] Determine data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period;

[0007] Acquire vehicle data to be uploaded according to the type identifier and the data collection cycle;

[0008] Uploading the vehicle data to a cloud server using the data upload cycle;

[0009] If it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server.

[0010] Optionally, the vehicle data uploading method further includes:

[0011] Before the vehicle is powered off, if it is detected that there is unuploaded vehicle data, the unuploaded vehicle data is stored in the disk so that the unuploaded vehicle data can be re-uploaded to the cloud server when the vehicle is powered on.

[0012] Optionally, obtaining the vehicle data to be uploaded according to the type identifier and the data collection cycle includes:

[0013] Get the original CAN data sent cyclically by each controller;

[0014] Acquire CAN data corresponding to the type identifier from the original CAN data, and store it in an acquisition buffer;

[0015] According to the data collection cycle corresponding to each type identifier, the corresponding CAN data is collected from the collection buffer to generate vehicle data to be uploaded.

[0016] Optionally, uploading the vehicle data to a cloud server using the data upload cycle includes:

[0017] If data upload is currently required according to the data upload cycle, the vehicle data to be uploaded is compressed into a data packet, a packet sequence number corresponding to the data packet is assigned, and the data packet and the packet sequence number are sent to a sending buffer queue;

[0018] The target data packet and the target packet sequence number to be uploaded in the sending buffer queue are sent to the vehicle communication module, so as to upload the target data packet and the target packet sequence number to the cloud server through the vehicle communication module.

[0019] Optionally, if it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server, including:

[0020] Record the data packet sending time; the data packet sending time is the time when the target data packet and the target packet sequence number are sent to the vehicle communication module;

[0021] Determine the detection time according to the data packet sending time and the time threshold;

[0022] If no response information is received within the detection time, it is determined that the upload of the target data packet and the target packet sequence number fails, and the step of sending the target data packet and the target packet sequence number to be uploaded in the sending buffer queue to the vehicle communication module is continued;

[0023] If a response message is received within the detection time, and the response message indicates that the upload is successful, deleting the target data packet and the target packet sequence number in the sending buffer queue;

[0024] If a response message is received within the detection time, and the response message indicates that the upload has failed, the step of sending the target data packet and the target packet sequence number to be uploaded in the sending buffer queue to the vehicle communication module is continued.

[0025] Optionally, the vehicle data uploading method further includes:

[0026] If it is detected that the amount of buffered data in the sending buffer queue exceeds a data amount threshold, a predetermined number of data packets and corresponding packet sequence numbers are deleted from the sending buffer queue according to the packet sequence numbers of the data packets.

[0027] Optionally, the determining data configuration information includes:

[0028] Sending a configuration acquisition instruction to the cloud server; the configuration acquisition instruction carries a version number of the locally stored data configuration information; the cloud server determines whether the latest version of the data configuration information needs to be issued according to the version number;

[0029] If the latest version of the data configuration information sent by the cloud server is received within the predetermined time, the vehicle data is uploaded using the latest version of the data configuration information;

[0030] If the latest version of the data configuration information sent by the cloud server is not received within a predetermined period of time, the vehicle data is uploaded using the locally stored data configuration information.

[0031] In a second aspect, the present application provides a vehicle data uploading device, comprising:

[0032] A determination module, used to determine data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period;

[0033] An acquisition module, used for acquiring the vehicle data to be uploaded according to the type identification and the data collection cycle;

[0034] An uploading module, used to upload the vehicle data to a cloud server using the data uploading cycle;

[0035] The detection module is used to trigger the upload module to re-upload the vehicle data to the cloud server when detecting that the vehicle data upload fails.

[0036] In a third aspect, the present application provides an electronic device, including:

[0037] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the vehicle data uploading method described above in the present application through the computer program.

[0038] In a fourth aspect, the present application also provides a computer storage medium, which stores computer executable instructions, and the computer executable instructions are used to execute the steps of the above-mentioned vehicle data uploading method of the present application.

[0039] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: when uploading vehicle data, the present application first determines the data configuration information; the data configuration information includes the type identification of the data to be collected, as well as the data collection period and the data upload period; then, according to the type identification and the data collection period, the vehicle data to be uploaded is obtained; the vehicle data is uploaded to the cloud server using the data upload period; if it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server; it can be seen that the present application can configure the type, sampling period and upload period of the uploaded data through the data configuration information, so as to realize flexible control of the uploaded data volume and avoid network congestion caused by uploading a large amount of data in a short period of time; and the present application can ensure that the vehicle data is accurately uploaded to the cloud server through the retransmission mechanism to avoid data loss. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0043] Figure 1 A flow chart of a vehicle data uploading method provided in an embodiment of the present application;

[0044] Figure 2 A flow chart of another method for uploading vehicle data provided in an embodiment of the present application;

[0045] Figure 3 A schematic diagram of a process for re-uploading data after it is stored on a disk provided in an embodiment of the present application;

[0046] Figure 4 A schematic diagram of the data configuration information delivery process provided in the embodiment of the present application;

[0047] Figure 5 A schematic diagram of the vehicle data uploading process provided in an embodiment of the present application;

[0048] Figure 6A schematic diagram of the structure of a vehicle data uploading device provided in an embodiment of the present application;

[0049] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0051] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0052] It should be noted that when the existing solution uploads vehicle data to the cloud server, the uploaded data content, sampling period, and upload period are all fixed and cannot be flexibly controlled; and, in the case of a poor network signal, if the vehicle data upload fails, it cannot be re-uploaded. Therefore, in an embodiment of the present invention, a vehicle data upload method, device, equipment, and storage medium are provided. This solution can configure the type, sampling period, and upload period of the uploaded data through data configuration information, thereby realizing flexible control of the uploaded data volume and avoiding network congestion caused by uploading a large amount of data in a short period of time; and, through the retransmission mechanism, this application can ensure that the vehicle data is accurately uploaded to the cloud server to avoid data loss.

[0053] See also Figure 1 , Figure 1 A flow chart of a vehicle data uploading method provided in an embodiment of the present application, the method specifically comprises the following steps:

[0054] S101, determining data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period;

[0055] In this embodiment, the data configuration information is data sent from the cloud server to the vehicle. The cloud server may send the data configuration information periodically, or it may be actively sent when the cloud server detects the latest version of the data configuration information, or it may be the latest version of the data configuration information that the vehicle actively obtains from the cloud server, which is not specifically limited here. The data configuration information is used to flexibly control the type identification of the collected data, the data sampling period, and the data upload period. By adjusting the type identification of the collected data, the data collection period, and the data upload period, the amount of data uploaded at a single time and the total amount of uploaded data per unit time can be effectively controlled to avoid network congestion caused by uploading a large amount of data in a short period of time.

[0056] The type identifier of the data to be collected can specifically be CanID (Identity document, unique identification code), which is used to represent different types of data. The type of data can be battery data, brake data, speed data, turning data, etc., which is not specifically limited here, as long as it is vehicle data that needs to be uploaded to the cloud server. The data collection cycle refers to the period for collecting vehicle data to be uploaded. The data collection cycle corresponding to each type of data can be the same or different. It is not specifically limited here and can be customized according to actual needs. For example, the data collection cycle can be set to 2 seconds, that is, vehicle data is collected every 2 seconds; the data upload cycle refers to the period for uploading the collected vehicle data to the cloud server, such as: the data upload cycle can be set to 6 seconds, that is, all collected vehicle data to be uploaded is uploaded to the cloud server every 6 seconds.

[0057] S102, acquiring vehicle data to be uploaded according to the type identification and data collection cycle;

[0058] In this embodiment, the CAN data of each vehicle controller is obtained through the vehicle gateway, and the vehicle to be uploaded is obtained from the CAN data based on the type identification and data collection cycle. In addition, in order to reduce the amount of uploaded data, this solution does not need to upload all types of data to the cloud server. The cloud server can determine which types of vehicle data are uploaded to the cloud server by setting data configuration information. Therefore, when obtaining the vehicle data to be uploaded, this application needs to determine the type of data to be collected based on the type identification, and then collect the vehicle data corresponding to the data type according to the data collection cycle.

[0059] For example: the type identification of CAN data includes: Can1, Can2...Can10. If the type identification in the data configuration information is: Can1, Can2, Can7, Can8, and the data collection cycle is 2 seconds, then when executing S102, the CAN data with the type identification of Can1, Can2, Can7, Can8 is collected in a cycle of 2 seconds, and the collected CAN data is used as the vehicle data to be uploaded.

[0060] S103, uploading the vehicle data to the cloud server using a data upload cycle;

[0061] It is understandable that the data upload cycle is the cycle for uploading vehicle data to the cloud server. Therefore, when uploading vehicle data, it is necessary to determine whether the vehicle data needs to be uploaded at present according to the data upload cycle. For example, if the data upload cycle is 6 seconds, when detecting whether the vehicle data needs to be uploaded at present, it can be determined whether the interval from the last time the vehicle data was uploaded to the current time is 6 seconds; if it is 6 seconds, the vehicle data to be uploaded will be uploaded to the cloud server; if it is less than 6 seconds, it means that the vehicle data does not need to be uploaded at present.

[0062] It should be noted that after the present application uploads vehicle data periodically to the cloud server, users can view the operating status, parameter indicators, fault anomalies, etc. of each vehicle controller online in real time based on the cloud server, which greatly saves manpower and time costs, and provides basic data support for the cloud big data model.

[0063] S104: If it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server.

[0064] In this embodiment, in order to ensure the reliability of the vehicle data upload, after uploading the vehicle data to the cloud server, the application can detect whether the vehicle data is successfully uploaded to the cloud server. If the vehicle data is successfully uploaded, wait for the next data upload cycle to upload the vehicle data of the next cycle to the cloud server; if the vehicle data upload fails, re-upload the failed vehicle data to the cloud server to avoid data loss.

[0065] From the above, it can be seen that when uploading vehicle data, the present application first determines the data configuration information; the data configuration information includes the type identification of the data to be collected, as well as the data collection period and the data upload period; then, according to the type identification and the data collection period, the vehicle data to be uploaded is obtained; the vehicle data is uploaded to the cloud server using the data upload period; if it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server; it can be seen that the present application can configure the type, sampling period and upload period of the uploaded data through the data configuration information, so as to realize flexible control of the amount of uploaded data; and, through the retransmission mechanism, the present application can ensure that the vehicle data is accurately uploaded to the cloud server to avoid data loss.

[0066] See also Figure 2 , Figure 2 Another vehicle data uploading method flow chart provided in an embodiment of the present application, the method specifically comprises the following steps:

[0067] S201, determining data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period;

[0068] S202, obtaining the original CAN data cyclically sent by each controller;

[0069] S203, acquiring CAN data corresponding to the type identifier from the original CAN data, and storing it in the acquisition buffer;

[0070] S204, collecting corresponding CAN data from the collection buffer according to the data collection cycle corresponding to each type identifier, and generating vehicle data to be uploaded;

[0071] S205, if data needs to be uploaded currently according to the data upload cycle detection, the vehicle data to be uploaded is compressed into a data packet, and a packet sequence number corresponding to the data packet is assigned, and the data packet and the packet sequence number are sent to the sending buffer queue;

[0072] S206, sending the target data packet and the target packet sequence number to be uploaded in the sending cache queue to the vehicle communication module, so as to upload the target data packet and the target packet sequence number to the cloud server through the vehicle communication module;

[0073] S207, record the data packet sending time; the data packet sending time is the time when the target data packet and the target packet sequence number are sent to the vehicle communication module;

[0074] S208, determining the detection time according to the data packet sending time and the time threshold;

[0075] S209, if no response information is received within the detection time, it is determined that the target data packet and the target packet sequence number have failed to be uploaded, and S206 is continued;

[0076] S210, if a response message is received within the detection time, and the response message indicates that the upload is successful, then deleting the target data packet and the target packet sequence number in the sending buffer queue;

[0077] S211. If a response message is received within the detection time, and the response message indicates that the upload has failed, then continue to execute S206.

[0078] In this embodiment, the vehicle data upload method described in this application can be specifically implemented through a data upload service. After the on-board gateway obtains the original CAN data of each controller, it sends the original CAN data to the data upload service. The data upload service first filters out the CAN data that does not need to be uploaded according to the type identifier in the data configuration information, retains only the CAN data corresponding to the type identifier, and stores it in the acquisition cache. Then, according to the data acquisition cycle corresponding to each type identifier, the corresponding CAN data is collected from the acquisition cache to generate the vehicle data to be uploaded. Further, according to the data upload cycle, it is detected whether the data needs to be uploaded at present. If the data does not need to be uploaded, continue to wait; if the data needs to be uploaded, the vehicle data to be uploaded is compressed into a data packet through a compression algorithm to reduce the amount of uploaded data. The compression algorithm can be a gzip compression algorithm, a zip compression algorithm, a rar compression algorithm, etc., which is not specifically limited here.

[0079] After the vehicle data to be uploaded is compressed into a data packet, the present application also needs to allocate a packet number corresponding to the data packet. The packet number increases in sequence according to the order in which the data packets are generated. The packet number of each data packet is different, such as: the packet number of the first generated data packet is 1, the packet number of the second generated data packet is 2, and so on. The corresponding packet number is allocated to each data packet. The corresponding data packet can be uniquely determined according to the packet number, and the generation order of each data packet can also be determined according to the data size of the packet number. After each vehicle data to be uploaded generates a corresponding data packet and a packet number, the data packet and the packet number need to be stored in a sending cache queue. The sending cache queue is used to cache the data packets and packet numbers to be uploaded. If problems such as network congestion are encountered, the sending cache queue can be used to temporarily store each data packet and packet number to be sent, so that after the network is restored, each data packet and packet number can be obtained from the sending cache queue for uploading. When uploading data, this embodiment specifically uploads the target data packet and the target packet number to the cloud server through the vehicle-mounted communication module (Telematics Box, TBOX).

[0080] It should be noted that if a network problem occurs, resulting in a large number of historical data packets and packet sequence numbers to be sent being accumulated in the sending cache queue, after the network is restored, each historical data packet and packet sequence number needs to be sent to the vehicle communication module as a target data packet and target packet sequence number, and then uploaded to the cloud server in sequence through the vehicle communication module. At this time, the accumulated data packets and packet sequence numbers can be uploaded to the cloud server according to the accumulated data upload cycle, which is less than the data upload cycle, so as to quickly upload the historical data packets to the cloud server.

[0081] This solution not only sends the target data packet and the target packet sequence number to the vehicle-mounted communication module, but also needs to record the data packet sending time, which is used to determine whether the data packet is successfully uploaded. The time threshold in this embodiment is a detection time threshold for determining whether the data packet is successfully uploaded, and the specific value of the time threshold can be customized according to the actual situation. In addition, when the application determines the detection time based on the data packet sending time and the time threshold, it is necessary to record the target packet sequence number corresponding to the data packet sending time. If it is determined that the target data packet fails to be uploaded, the target data packet and the target packet sequence number to be uploaded are determined from the sending cache queue according to the target packet sequence number, and resent to the vehicle-mounted communication module.

[0082] In this embodiment, if the response information is not received within the detection time, it is determined that the target data packet and the target packet sequence number have failed to be uploaded. At this time, the target data packet and the target packet sequence number that failed to be uploaded need to be sent to the vehicle communication module so as to be re-uploaded to the cloud server; if the response information is received within the detection time, it is necessary to determine whether the upload is successful based on the content of the response information. The response information includes the upload status and the packet sequence number. The upload status can be a successful upload or a failed upload. If the upload status is a failed upload, the target data packet and the target packet sequence number to be uploaded are determined from the sending cache queue according to the packet sequence number in the response information, and re-sent to the vehicle communication module; it should be noted that the present application can record the number of times each data packet fails to be uploaded. If the number is greater than a predetermined threshold, an alarm message is generated to remind the user in time. If the upload status is a successful upload, the successfully uploaded target data packet is deleted from the sending cache queue according to the packet sequence number in the response information, and the next target data packet and the target packet sequence number to be sent are sent to the vehicle communication module. This method of uploading the next data packet after the current target data packet is successfully uploaded can control the data transmission process and prevent network congestion in a short time.

[0083] For example, if the time threshold is set to 3s, the target packet sequence number of the target data packet is 1, and the data packet sending time of the target data packet is 10:01:00, the detection time calculated according to the time threshold is 10:01:03, that is, if the target data packet and the target packet sequence number 1 are sent to the vehicle communication module at 10:01:00, it is determined whether the response information fed back by the vehicle communication module is received during the period from 10:01:00 to 10:01:03. If the response information fed back by the vehicle communication module is not received, it means that the vehicle communication module may not successfully upload the data packet to the cloud server due to network, equipment and other problems. At this time, the target data packet can be obtained from the sending cache queue according to the packet sequence number 1 of the data packet and resent to the vehicle communication module, so that the vehicle communication module can re-upload the target data packet to the cloud server to avoid data loss. If the response information received from the vehicle communication module is that the upload is successful and the packet sequence number is 1, it is necessary to delete the target data packet corresponding to the packet sequence number 1 in the sending cache queue so that the sending cache queue has sufficient space to store new data packets.

[0084] It should be noted that the data packets and packet sequence numbers to be uploaded are stored in the sending cache queue. However, when a network failure occurs, the old data cannot be successfully uploaded and needs to be kept in the sending cache queue, while the new data is continuously collected and stored in the sending cache queue. This phenomenon causes the sending cache queue to store a large amount of data. When the amount of data is too much, the new data cannot be successfully stored in the sending cache queue, resulting in data loss. Therefore, in this application, it is necessary to count the amount of data in the sending cache queue. Specifically, it is necessary to update the amount of cached data in the sending cache queue when the new data is stored in the sending cache queue or the old data in the sending cache queue is deleted, etc., which changes the amount of data in the sending cache queue. If it is detected that the amount of cached data in the sending cache queue exceeds the data volume threshold, a predetermined number of data packets and corresponding packet sequence numbers are deleted from the sending cache queue according to the packet sequence number of each data packet; if the amount of cached data does not exceed the data volume threshold, it is not necessary to delete the data packets in the sending cache queue, and the amount of cached data in the sending cache queue continues to be detected.

[0085] It is understandable that, since vehicle data is collected in chronological order, the importance of old data is lower than that of new data. Therefore, when there is a large amount of cached data in the sending cache queue, the old data can be deleted first. In this embodiment, the method for determining old data can be determined based on the packet sequence number of the data packet. Since the packet sequence number is set in increasing order according to the generation order of the data packet, the smaller the packet sequence number, the earlier the generation time of the data packet, that is, the old data, so the data can be deleted according to the packet sequence number. In addition, the number of data packets to be deleted in this embodiment can be set according to actual conditions. This is explained in the following two ways: 1. Set a fixed value. If it is detected that the amount of cached data in the sending cache queue exceeds the data amount threshold, delete a predetermined number of data packets and packet numbers. For example, if the predetermined number is set to 10, 10 data packets and packet numbers will be deleted. 2. Set a proportion value. If it is detected that the amount of cached data in the sending cache queue exceeds the data amount threshold, delete a predetermined proportion of data packets and packet numbers in the sending cache queue. For example, if the predetermined proportion value is set to 20%, and there are 30 data packets in the sending cache queue, the number of data packets that need to be deleted is calculated to be: 30*20%=6.

[0086] In summary, when uploading vehicle data, this application can filter out CAN data that does not need to be uploaded through the type identifier in the data configuration information to reduce the amount of data uploaded; by setting the sampling period and the upload period, the amount of data uploaded at a time can be controlled and adjusted to avoid uploading a large amount of data in a short period of time and causing network congestion; and, by setting a sending cache queue, this application can temporarily store data packets to be sent when there is a problem with the network, so that after the network is restored, each data packet and packet sequence number can be obtained from the sending cache queue for upload. This application uses the response and timeout retransmission mechanism during the data upload process to ensure the reliability of transmission.

[0087] Based on any of the above method embodiments, in the embodiment itself, in order to ensure the security of the data, before the vehicle is powered off, if the present application detects that there is vehicle data that has not been uploaded, the vehicle data that has not been uploaded will be stored on the disk so that the vehicle data that has not been uploaded can be re-uploaded to the cloud server when the vehicle is powered on.

[0088] Specifically, when the vehicle is powered off, this application needs to detect whether there is any vehicle data in the sending cache queue that has not been uploaded to the cloud server; if not, it means that all vehicle data has been uploaded to the cloud server, and the vehicle can be powered off normally. If it exists, the unuploaded vehicle data will be written to the disk in the data disk file format, so that when the vehicle is powered on, the vehicle data can be reloaded into the sending cache queue and continued to be uploaded to the cloud server. In this way, the data that has not been successfully uploaded can be re-uploaded to the cloud server to avoid loss.

[0089] See Table 1, which is a data disk file format table provided in this embodiment. It can be seen from Table 1 that the data disk file format consists of file header + data header + data + data header + data + data header + data... See Table 2, which is a file header format table provided in this embodiment, wherein the identifier is a file identification character, such as BSFD (remote smoke exhaust fire damper), which can be customized; the type is used to identify the file type, such as: CanID; the file length is used to indicate the length of the entire file (excluding the length of the file header), and MD5 (Message-Digest Algorithm5, message digest algorithm) is used to indicate the hash value of the entire file content (excluding the file header), which is used to verify the file data content; the reserved items are used for extension. See Table 3, which is a data header format table provided in this embodiment, wherein the data version is used to indicate the CAN data acquisition version, and the data types include ordinary data, event data, etc. Event data refers to data obtained when a vehicle collision occurs or other emergencies; the data length is used to indicate the length of the data collected at that time (excluding the data header), and the reserved items are used for extension, and the data is specifically CAN data.

[0090] Table 1

[0091] File Header Data Header data Data Header data Data Header data

[0092] Table 2

[0093]

[0094] Table 3

[0095]

[0096] See also Figure 3 , Figure 3 A schematic diagram of the process of re-uploading data after it is dropped to disk provided in the embodiment of the present application, through Figure 3 It can be seen that when the program is powered on, it is necessary to detect whether there is a cache file. The cache file is the vehicle data that needs to be uploaded to the cloud server. If there is a cache file, the vehicle data will be read into the sending cache queue according to the above file format, and the vehicle data will be uploaded to the cloud in sequence according to the above data upload logic.

[0097] From the above, it can be seen that the traditional solution does not cache the unsuccessfully uploaded vehicle data, which will cause data loss when the vehicle is powered off. Therefore, in this application, when the vehicle is powered off, the unsuccessfully uploaded vehicle data can be written to the disk, so that when the vehicle is powered on, the vehicle data can be re-uploaded to the cloud server to avoid data loss.

[0098] Based on any of the above method embodiments, in this embodiment, the process of determining data configuration information specifically includes the following steps:

[0099] Send a configuration acquisition instruction to the cloud server; the configuration acquisition instruction carries the version number of the locally stored data configuration information; the cloud server determines whether the latest version of the data configuration information needs to be issued according to the version number;

[0100] If the latest version of the data configuration information sent by the cloud server is received within the predetermined time, the vehicle data is uploaded using the latest version of the data configuration information;

[0101] If the latest version of the data configuration information sent by the cloud server is not received within a predetermined period of time, the vehicle data is uploaded using the locally stored data configuration information.

[0102] It should be noted that in order to ensure that the locally stored data configuration information is the latest version, before uploading the vehicle data, a configuration acquisition instruction may be sent to the cloud server. The configuration acquisition instruction carries the version number of the local data configuration information. The cloud server determines whether the local data configuration information needs to be updated through the version number. If the cloud server determines that the version number uploaded by the vehicle is the latest version, it means that the local data configuration information does not need to be updated. At this time, a notification that the data configuration information does not need to be updated may be sent to the vehicle, or no notification may be sent. At this time, the vehicle can use the locally stored data configuration information to upload the vehicle data. If the cloud server determines that the version number uploaded by the vehicle is not the latest version, the latest version of the data configuration information may be sent to the vehicle, and the vehicle can use the latest version of the data configuration information to upload the vehicle data.

[0103] And after the vehicle receives the latest version of the data configuration information, it can also verify the data configuration information. Only the data configuration information that has been successfully verified will be used. During the verification, the format of the data sent can be judged first. In this embodiment, the data format is set to json; if the data configuration information sent is not in the correct json format, the verification is determined to have failed, and the local data configuration information continues to be used; if the data configuration information sent is in the correct json format, it is determined whether the data configuration information contains the necessary configuration items and the data types of the configuration items, among which the necessary configuration items can be set to include the configuration version number, data upload cycle, type identifier CanID and data collection cycle, and the type identifier CanID, the data upload cycle of CanID, and the data type of the data upload cycle are all numbers; if the verification is successful, the latest version of the data configuration information is used, if the verification fails, the data configuration information sent this time is ignored, and the local data configuration information is used.

[0104] See Table 4, which is a table of data configuration information contents provided in this embodiment. As can be seen from Table 3, the data configuration information includes a configuration version number, a data upload cycle, a type identifier, and a data collection cycle corresponding to each type identifier; wherein the type identifier is CanID1, CanID2, CanID3...CanIDN, where N is the total number of type identifiers.

[0105] Table 4

[0106]

[0107] See also Figure 4 , Figure 4 A schematic diagram of the data configuration information delivery process provided in the embodiment of the present application; Figure 4 It can be seen that when the program starts, the data upload service needs to report the version number of the current data configuration information to the cloud server through TBOX; the cloud compares the reported configuration version number, and triggers the issuance of the data configuration information if there is new data configuration information, otherwise no processing is performed. After the vehicle receives the latest version of the data configuration information issued by the cloud server, it can verify the data configuration information. If the verification is successful, the latest version of the data configuration information is saved and the latest version of the data configuration information is enabled; if the verification fails, the previous version of the data configuration information is maintained.

[0108] pass Figure 4 The data configuration information can be updated once through the sending process. This remote configuration method can flexibly control the collected data content (the collected content can be accurately determined to CanID), data collection cycle, and data upload cycle, thereby effectively controlling the single data upload flow and the total upload flow per unit time to avoid data congestion.

[0109] See also Figure 5 , Figure 5 A specific vehicle data upload process diagram provided in the embodiment of the present application, through Figure 5 It can be seen that this solution specifically includes the following processes:

[0110] 1. The vehicle gateway sends the CAN data of each controller to the data upload service in a loop using UDP (User Datagram Protocol, transport layer protocol) data packets.

[0111] 2. After receiving the data packet, the data upload service parses the data packet and filters out the CanID data that does not need to be uploaded according to the data configuration information. The data that needs to be uploaded is updated according to the corresponding data content in the collection cache with the CanID.

[0112] 3. Check in turn according to the data collection cycle of each CanID whether the collection time has arrived. If it has arrived, take out the vehicle data from the collection cache and put it into the cloud data packet to be uploaded.

[0113] 4. Check whether the upload cycle to the cloud has arrived. If it has arrived, the cloud data packet to be uploaded will be compressed using the gzip algorithm, and a packet number will be assigned. The packet number will increase in sequence and put into the sending cache queue. At the same time, the cached data amount in the sending cache queue will be updated.

[0114] 5. The data upload thread in the data upload service takes out the data packet and the packet sequence number from the sending buffer queue and sends it to TBOX, and records the current sending time, and then TBOX uploads it to the cloud server. Among them, SSL (Secure Socket Layer) two-way authentication can be used between TBOX and the cloud server to ensure the security and reliability of information transmission.

[0115] 6. After uploading data, TBOX will send an ACK (Acknowledgement) response to the data upload service, where the ACK response contains the upload status and packet sequence number.

[0116] 7. If the data upload server receives an ACK response and the sending status is successful, the data is removed from the sending buffer queue according to the packet sequence number, and the buffered data amount in the buffer queue is updated, and the next packet of data is sent.

[0117] 8. If the data upload server receives an ACK response and the sending status is failed, it will wait until the retransmission period arrives, resend the previous packet of data, and update the current sending time again.

[0118] 9. If the data upload service does not receive an ACK response from the TBOX end within the specified time (such as TBOX end service abnormality, data loss, etc.), the resend logic will be triggered to resend the previous data packet and update the current sending time again.

[0119] 10. The data upload thread will loop through steps 5 to 9 above in order to upload each data packet to the cloud server successfully as much as possible.

[0120] 11. If the amount of cached data in the send cache queue exceeds the data volume threshold, the data packets with the smallest to largest sequence numbers are removed from the send cache queue in order to ensure that new data can be queued normally. The size of the send cache queue can be flexibly configured according to actual conditions.

[0121] 12. When the vehicle is powered off, if there is unsent data in the sending cache queue, it will be written to the disk according to the data disk file format. When the vehicle is powered on, the file will be loaded to continue uploading the last historical data to the cloud server.

[0122] From the above, it can be seen that this solution can upload the CAN data of the whole vehicle to the cloud periodically, and can flexibly control the amount of uploaded data according to the data configuration information; during the data upload process, the response and timeout retransmission mechanism are used to ensure the reliability of transmission; the vehicle data that has not been uploaded is stored on the disk when the vehicle is powered off, and the vehicle continues to upload when it is started next time to ensure that the data is not lost; and this application only sends the next data packet after the previous data packet is transmitted, which can control the data transmission process and prevent network congestion in a short time; this embodiment uses gzip compression when uploading data to reduce traffic consumption; further, this application uses SSL two-way authentication between TBOX and the cloud when transmitting vehicle-cloud data to ensure that the information is secure and reliable. The implementation method of this application is simple and efficient, with clear links, safe and reliable, and adaptable to many scenarios. It can effectively control the content of collected data and upload traffic, and is convenient for transplantation to various different system platforms and different models.

[0123] See also Figure 6 , Figure 6 A schematic diagram of the structure of a vehicle data uploading device provided in an embodiment of the present application, the device specifically comprises:

[0124] The determination module 11 is used to determine data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period;

[0125] An acquisition module 12, used to acquire the vehicle data to be uploaded according to the type identification and the data collection cycle;

[0126] An uploading module 13, used to upload the vehicle data to a cloud server using the data uploading cycle;

[0127] The detection module 14 is used to trigger the upload module to re-upload the vehicle data to the cloud server when detecting that the vehicle data upload fails.

[0128] As an optional embodiment, the vehicle data uploading device further includes:

[0129] The storage module is used to store the unuploaded vehicle data to the disk if it is detected that there is unuploaded vehicle data before the vehicle is powered off, so that the unuploaded vehicle data can be re-uploaded to the cloud server when the vehicle is powered on.

[0130] As an optional embodiment, the acquisition module includes:

[0131] A first acquisition unit is used to acquire the original CAN data cyclically sent by each controller;

[0132] A second acquisition unit, used for acquiring CAN data corresponding to the type identifier from the original CAN data, and storing the CAN data in an acquisition buffer;

[0133] The collection unit is used to collect corresponding CAN data from the collection buffer according to the data collection cycle corresponding to each type identifier, and generate vehicle data to be uploaded.

[0134] As an optional embodiment, the upload module includes:

[0135] A compression unit, used for compressing the vehicle data to be uploaded into a data packet when detecting that data needs to be uploaded currently according to the data upload cycle;

[0136] An allocating unit, configured to allocate a packet sequence number corresponding to the data packet;

[0137] A first sending unit, used for sending the data packet and the packet sequence number to a sending buffer queue;

[0138] The second sending unit is used to send the target data packet and the target packet sequence number to be uploaded in the sending buffer queue to the vehicle communication module, so as to upload the target data packet and the target packet sequence number to the cloud server through the vehicle communication module.

[0139] As an optional embodiment, the detection module includes:

[0140] A recording unit, used to record the data packet sending time; the data packet sending time is the time when the target data packet and the target packet sequence number are sent to the vehicle communication module;

[0141] A determination unit, configured to determine a detection time according to the data packet sending time and a time threshold;

[0142] A determination unit, configured to determine that the upload of the target data packet and the target packet sequence number fails when no response information is received within the detection time, and trigger a second sending unit;

[0143] a deleting unit, configured to delete the target data packet and the target packet sequence number in the sending buffer queue when a response message is received within the detection time and the response message indicates that the upload is successful;

[0144] The second sending unit is specifically used to: when a response message is received within the detection time and the response message indicates that the upload fails, send the target data packet and the target packet sequence number to be uploaded in the sending cache queue to the vehicle communication module.

[0145] As an optional embodiment, the vehicle data uploading device further includes:

[0146] The deleting module is used to delete a predetermined number of data packets and corresponding packet sequence numbers from the sending cache queue according to the packet sequence numbers of each data packet when detecting that the amount of cached data in the sending cache queue exceeds a data amount threshold.

[0147] As an optional embodiment, the determining module includes:

[0148] A third sending unit is used to send a configuration acquisition instruction to the cloud server; the configuration acquisition instruction carries a version number of the locally stored data configuration information; the cloud server determines whether it is necessary to send the latest version of the data configuration information according to the version number;

[0149] The determination module is used to upload vehicle data using the latest version of the data configuration information when the latest version of the data configuration information sent by the cloud server is received within a predetermined time period; and to upload vehicle data using the locally stored data configuration information when the latest version of the data configuration information sent by the cloud server is not received within the predetermined time period.

[0150] See also Figure 7 , Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, the electronic device specifically includes:

[0151] The processor 21, the memory 22 and the computer program stored in the memory 22 and executable on the processor 21, the processor 21 executes the steps of the vehicle data uploading method described in any of the above method embodiments through the computer program.

[0152] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0153] The memory 22 may include one or more computer-readable storage media, which may be non-transitory. The memory 22 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 22 is at least used to store the following computer program 221, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps in the vehicle data uploading method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 22 may also include an operating system 222 and data 223, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 222 may include Windows, Unix, Linux, etc.

[0154] In some embodiments, the electronic device may further include a display screen 23 , an input / output interface 24 , a communication interface 25 , a sensor 26 , a power source 27 , and a communication bus 28 .

[0155] certainly, Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of the present application. In actual applications, the electronic device may include Figure 7 More or fewer components than shown, or combinations of certain components.

[0156] In another exemplary embodiment, a computer storage medium is also provided, and when the program instructions are executed by a processor, the steps of the vehicle data uploading method described in any of the above method embodiments are implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0157] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0158] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0159] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A vehicle data uploading method, characterized in that: include: Determine data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period; Acquire vehicle data to be uploaded according to the type identifier and the data collection cycle; Uploading the vehicle data to a cloud server using the data upload cycle; If it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server.

2. The vehicle data uploading method according to claim 1, characterized in that: The vehicle data uploading method further includes: Before the vehicle is powered off, if it is detected that there is unuploaded vehicle data, the unuploaded vehicle data is stored in the disk so that the unuploaded vehicle data can be re-uploaded to the cloud server when the vehicle is powered on.

3. The vehicle data uploading method according to claim 1, characterized in that: According to the type identifier and the data collection cycle, the vehicle data to be uploaded is obtained, including: Get the original CAN data sent cyclically by each controller; Acquire CAN data corresponding to the type identifier from the original CAN data, and store it in an acquisition buffer; According to the data collection cycle corresponding to each type identifier, the corresponding CAN data is collected from the collection buffer to generate vehicle data to be uploaded.

4. The vehicle data uploading method according to claim 1, characterized in that: The vehicle data is uploaded to the cloud server using the data upload cycle, including: If data upload is currently required according to the data upload cycle, the vehicle data to be uploaded is compressed into a data packet, a packet sequence number corresponding to the data packet is assigned, and the data packet and the packet sequence number are sent to a sending buffer queue; The target data packet and the target packet sequence number to be uploaded in the sending buffer queue are sent to the vehicle communication module, so as to upload the target data packet and the target packet sequence number to the cloud server through the vehicle communication module.

5. The vehicle data uploading method according to claim 4, characterized in that: If it is detected that the vehicle data upload fails, the vehicle data is re-uploaded to the cloud server, including: Record the data packet sending time; the data packet sending time is the time when the target data packet and the target packet sequence number are sent to the vehicle communication module; Determine the detection time according to the data packet sending time and the time threshold; If no response information is received within the detection time, it is determined that the upload of the target data packet and the target packet sequence number fails, and the step of sending the target data packet and the target packet sequence number to be uploaded in the sending buffer queue to the vehicle communication module is continued; If a response message is received within the detection time, and the response message indicates that the upload is successful, deleting the target data packet and the target packet sequence number in the sending buffer queue; If a response message is received within the detection time, and the response message indicates that the upload has failed, the step of sending the target data packet and the target packet sequence number to be uploaded in the sending buffer queue to the vehicle communication module is continued.

6. The vehicle data uploading method according to claim 4, characterized in that: The vehicle data uploading method further includes: If it is detected that the amount of buffered data in the sending buffer queue exceeds a data amount threshold, a predetermined number of data packets and corresponding packet sequence numbers are deleted from the sending buffer queue according to the packet sequence numbers of the data packets.

7. The vehicle data uploading method according to any one of claims 1 to 6, characterized in that: The determining of data configuration information includes: Sending a configuration acquisition instruction to the cloud server; the configuration acquisition instruction carries a version number of the locally stored data configuration information; the cloud server determines whether the latest version of the data configuration information needs to be issued according to the version number; If the latest version of the data configuration information sent by the cloud server is received within the predetermined time, the vehicle data is uploaded using the latest version of the data configuration information; If the latest version of the data configuration information sent by the cloud server is not received within a predetermined period of time, the vehicle data is uploaded using the locally stored data configuration information.

8. A vehicle data uploading device, characterized in that: include: A determination module, used to determine data configuration information; wherein the data configuration information includes a type identifier of the data to be collected, as well as a data collection period and a data upload period; An acquisition module, used for acquiring the vehicle data to be uploaded according to the type identification and the data collection cycle; An uploading module, used to upload the vehicle data to a cloud server using the data uploading cycle; The detection module is used to trigger the upload module to re-upload the vehicle data to the cloud server when detecting that the vehicle data upload fails.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the steps of the vehicle data uploading method described in any one of claims 1 to 7 of the present application through the computer program.

10. A computer storage medium, characterized in that: The computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the steps of the vehicle data uploading method described in any one of claims 1 to 7 of the present application.