Data transmission method, vehicle-mounted electronic equipment, medium and program product

By processing vehicle condition data according to the data importance level in the on-board electronic equipment and uploading data in sequence when the vehicle is running abnormally, the problem of key data loss in data transmission during vehicle operation is solved, and data integrity and user experience are improved.

CN120236338APending Publication Date: 2025-07-01欧摩威汽车电子(芜湖)有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510384058.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

Vehicle condition data generated during vehicle operation may be lost during transmission, especially in the case of poor network signals or damaged vehicles, resulting in the loss of critical data, affecting the safe operation of the vehicle and user experience.

Method used

By collecting data in the on-board electronic device and determining its importance level according to the data type, data with an importance level higher than a preset level is preferred to upload data to the server and write it to the corresponding storage area. When receiving a read instruction from the server or detecting an abnormal vehicle operation, upload the data in turn to ensure the integrity of the critical data.

Benefits of technology

It effectively avoids the loss of key data in vehicle condition data during transmission, ensures data integrity and reliability, and improves the safe operation and user experience of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236338A_ABST
    Figure CN120236338A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, and discloses a data transmission method, vehicle-mounted electronic equipment, a medium and a program product. The data transmission method comprises the steps that when a vehicle collects key data such as emergency data, the key data are uploaded to a server, and the key data are written into a storage area with the highest importance level; and when the vehicle receives a reading instruction sent by the server or detects that the vehicle runs abnormally, uploading data in sequence from high to low according to the importance level of the storage area. In this way, the key data are uploaded to the server, so that the server can make a decision in time according to the key data; the key data is written into the storage area with the highest level, so that the key data can be uploaded again when the vehicle receives the reading instruction sent by the server or detects that the vehicle runs abnormally, the situation that part of data is lost in the process that the vehicle actively uploads the key data is avoided, and the integrity of the key data in the data transmission process is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicles, and particularly to a data transmission method, an in-vehicle electronic device, a medium, and a program product. Background Art

[0002] During the operation of a vehicle, a large amount of vehicle condition data will be generated, such as the parameter status of an electronic control unit (ECU), fault code information, system logs, summary reports of short trips, etc. The real-time monitoring and reporting of vehicle condition data are of great significance for ensuring the safe operation of the vehicle, optimizing the user experience, and improving the operation and maintenance efficiency.

[0003] When the vehicle generates vehicle condition data, the vehicle condition data can be sent to the server. However, when an emergency occurs, such as poor network signal in the area where the vehicle is located, vehicle damage, or ECU damage, the server cannot obtain all the vehicle condition data sent by the vehicle at this time. Key data in the vehicle condition data, such as data related to vehicle rear-end collisions and data of malfunctioning parts, may be lost. The loss of key data will not only affect the safe operation and maintenance of the vehicle, but may also affect the user experience. Summary of the Invention

[0004] To solve the problem that key data in vehicle condition data will be lost during transmission, embodiments of this application provide a data transmission method, an in-vehicle electronic device, a medium, and a program product.

[0005] In a first aspect, an embodiment of this application provides a data transmission method, which is applied to an in-vehicle electronic device. The data transmission method includes: collecting first data and second data; determining that the importance level of the first data is higher than that of the second data according to the data types of the first data and the second data, and determining that the importance level of the first data is higher than a preset level, and uploading the first data to the server; writing the first data into a first storage area and writing the second data into a second storage area; when receiving a read instruction sent by the server, or detecting that the vehicle is operating abnormally, uploading the first data and the second data to the server in sequence.

[0006] It can be understood that abnormal vehicle operation includes vehicle rear-end collision, malfunction of parts, and loss of key driving data. Among them, key driving data includes vehicle speed signal, braking signal, accelerator pedal opening, fault code, etc.

[0007] In the embodiment of this application, by uploading the first data with an importance level higher than the preset level to the server, the server can analyze the first data in a timely manner. Moreover, the first data is also stored in the first storage area of the vehicle, which can cope with situations such as network failures and avoid the loss of the first data during transmission, resulting in the situation where the first data cannot be retrieved.

[0008] In a possible implementation, writing the first data into the first storage area includes: determining that the free space in the first storage area is greater than the occupied space of the first data, and writing the first data into the first storage area.

[0009] In a possible implementation, writing the first data into the first storage area includes: determining that the free space in the first storage area is less than or equal to the occupied space of the first data, and writing the first data into the position of the third data in the first storage area, where the storage time of the third data is earlier than that of other data in the first storage area, and the occupied space of the third data is equal to the occupied space of the first data.

[0010] In a possible implementation, when it is determined that the importance level of the second data is lower than a preset level and the ratio of the occupied space of the second data to the storage space of the data block is less than or equal to a first security threshold, the second data is written into the second storage area based on the generation period of the second data. The data block is the smallest storage unit in the data transmission process, and the storage space of the data block is a preset size; when it is determined that the importance level of the second data is lower than a preset level and the ratio of the occupied space of the second data to the storage space of the data block is greater than the first security threshold and less than or equal to a second security threshold, the second data is written into the second storage area based on a first period, where the first period is greater than the generation period of the second data; when it is determined that the importance level of the second data is lower than a preset level and the ratio of the occupied space of the second data to the storage space of the data block is greater than the second security threshold, a preset space of data is released, and the second data is written into the second storage area based on the first period.

[0011] It can be understood that the second security threshold is greater than the first security threshold.

[0012] In a possible implementation, the first storage area and the second storage area are circular storage areas.

[0013] In a possible implementation, when receiving a read instruction sent by the server or detecting an abnormal vehicle operation, the first data and the second data are uploaded to the server in sequence, including: when receiving a read instruction sent by the server or detecting an abnormal vehicle operation, uploading the first data to the server; determining that all the data stored in the first storage area has been uploaded, and uploading the second data to the server.

[0014] In a possible implementation, the status information of the first storage area and the status information of the second storage area are written into the mirror storage area, where the status information includes the write position, read position, and free space of the storage area.

[0015] In a possible implementation, it is detected that the vehicle is operating abnormally; it is detected that the free space in the first storage area is not equal to the free space of the first storage area recorded in the mirror storage area, and the first record information in the mirror storage area is determined. The free space in the first record information = write position - read position; the read position of the first storage area is updated to the read position in the first record information, the write position of the first storage area is updated to the write position in the first record information, and the free space of the first storage area is updated to the free space in the first record information.

[0016] In a possible implementation, a clear instruction from the user is detected; the first storage area is evenly divided into N areas, and the second storage area is evenly divided into N areas; an encryption mask is generated for each area of the first storage area and the second storage area; the status information of the first storage area and the status information of the second storage area are written into the mirror storage area, and the status information includes the encryption mask of each area.

[0017] In the embodiments of the present application, when a clear instruction from the user is detected, the storage area can be evenly divided into N areas, and an encryption mask is randomly generated for each area, resulting in the historical data stored in the storage area being unresolvable, that is, logically deleted, and destroying the validity of the historical data stored in the storage area.

[0018] In a possible implementation, writing the first data into the first storage area includes: encrypting the first data based on the first encryption mask to obtain first encrypted data; writing the first encrypted data into the first storage area.

[0019] In a possible implementation, when a read instruction sent by the server is received, or when it is detected that the vehicle is operating abnormally, uploading the first data includes: when a read instruction sent by the server is received, or when it is detected that the vehicle is operating abnormally, determining that the data at the read position of the first storage area is the first encrypted data; verifying the first encrypted data to determine that the verification of the first encrypted data is successful; decrypting the first encrypted data to obtain the first data; uploading the first data.

[0020] In a possible implementation, verifying the first encrypted data to determine that the verification of the first encrypted data is successful includes: verifying the tag of the first encrypted data to determine that the verification of the tag of the first encrypted data is successful; verifying the check code of the first encrypted data to determine that the verification of the check code of the first encrypted data is successful.

[0021] Second aspect, embodiments of the present application provide a data transmission method, which is applied to a server. The data transmission method includes: detecting first data uploaded by a vehicle-mounted electronic device, determining that the first data is not stored in a third storage area, and writing the first data into the third storage area; sending a read instruction to the vehicle-mounted electronic device; reading the first data, determining that the first data is stored in the third storage area, and deleting the first data read based on the read instruction; reading second data, determining that the second data is not stored in the third storage area, and writing the second data into the third storage area.

[0022] In this way, it is possible to avoid the server from repeatedly storing the same data and wasting the server storage space.

[0023] Third aspect, embodiments of the present application provide a vehicle-mounted electronic device, including: a memory for storing instructions executed by one or more processors of the vehicle-mounted electronic device, and a processor, which is one of the one or more processors of the electronic device, for implementing any one of the data transmission methods provided in the first aspect and various possible implementations of the first aspect.

[0024] Fourth aspect, embodiments of the present application provide a readable medium, on which instructions are stored. When the instructions are executed on a vehicle-mounted electronic device, the electronic device implements any one of the data transmission methods provided in the first aspect and various possible implementations of the first aspect.

[0025] Fifth aspect, embodiments of the present application provide a computer program product, which includes computer instructions. When executed by a vehicle-mounted electronic device, the vehicle-mounted electronic device implements any one of the data transmission methods provided in the first aspect and various possible implementations of the first aspect. Description of the Drawings

[0026] Figure 1 A schematic diagram showing a data transmission scenario is shown;

[0027] Figure 2 According to an embodiment of the present application, a flowchart of a data transmission method is shown;

[0028] Figure 3 According to an embodiment of the present application, a schematic diagram of a data type is shown;

[0029] Figure 4 According to an embodiment of the present application, a schematic diagram of a circular storage area is shown;

[0030] Figure 5 According to an embodiment of the present application, a flowchart of another data transmission method is shown;

[0031] Figure 6According to an embodiment of the present application, a schematic diagram of a data transmission method is shown;

[0032] Figure 7 According to an embodiment of the present application, a schematic diagram of uploading emergency event data to a server is shown;

[0033] Figure 8 According to an embodiment of the present application, a schematic diagram of a data storage method is shown;

[0034] Figure 9 According to an embodiment of the present application, a schematic diagram of a data classification result is shown;

[0035] Figure 10 According to an embodiment of the present application, a schematic diagram of another data storage method is shown;

[0036] Figure 11 According to an embodiment of the present application, a schematic diagram of a data reading method is shown;

[0037] Figure 12 According to an embodiment of the present application, a schematic diagram of another data reading method is shown;

[0038] Figure 13 According to an embodiment of the present application, a schematic diagram of a data recovery method is shown;

[0039] Figure 14 According to an embodiment of the present application, a schematic diagram of a data clearing method is shown;

[0040] Figure 15 According to some embodiments of the present application, a schematic diagram of the structure of an in-vehicle electronic device 10 is shown. Detailed implementation manners

[0041] The illustrative embodiments of the present application include but are not limited to a data transmission method, an in-vehicle electronic device, a medium, and a program product.

[0042] It can be understood that a large amount of vehicle condition data will be generated during the operation of the vehicle. In some embodiments, the vehicle can monitor vehicle condition data, such as fuel consumption, mileage, temperature and other data, and upload the vehicle condition data to the server in real time through the in-vehicle electronic device.

[0043] For example, as Figure 1As shown, vehicle 100 generates data A, collects data A, and uploads data A to server 200 through in-vehicle electronic devices so that server 200 can read data A; vehicle 100 generates data B, collects data B, and uploads data B to server 200 through in-vehicle electronic devices so that server 200 can read data B; vehicle 100 generates data C, collects data C, and uploads data C to server 200 through in-vehicle electronic devices so that server 200 can read data C; vehicle 100 generates data D, collects data D, and uploads data D to server 200 through in-vehicle electronic devices so that server 200 can read data D.

[0044] That is, all vehicle condition data generated by vehicle 100 are collected by vehicle 100 without difference and sent to server 200 through in-vehicle electronic devices, and server 200 stores the vehicle condition data.

[0045] In some embodiments, after collecting vehicle condition data, vehicle 100 may first store the vehicle condition data in the memory of vehicle 100. Server 200 sends a collection signal for vehicle condition data to vehicle 100 according to a triggering mechanism, such as a preset order; after receiving the collection signal, vehicle 100 sends the vehicle condition data corresponding to the collection signal to server 200.

[0046] However, whether vehicle 100 actively sends vehicle condition data to server 200 after collecting the vehicle condition data, or vehicle 100 collects the vehicle condition data and sends the vehicle condition data to server 200 after receiving the collection signal sent by server 200, when an emergency occurs, such as poor network signal in the area where the vehicle is located, vehicle damage, or ECU damage, server 200 cannot obtain all the vehicle condition data sent by vehicle 100, and key data in the vehicle condition data, such as data related to vehicle rear-end collisions and malfunctioning component data, may be lost. The loss of key data will not only affect the safe operation and maintenance of the vehicle, but may also affect the user experience.

[0047] To solve the problem that key data in vehicle condition data may be lost during transmission, an embodiment of the present application provides a data transmission method. The data transmission method includes: when the vehicle collects key data, such as emergency event data, uploading the key data to the server and writing the key data into the storage area with the highest importance level. When the vehicle receives a read instruction sent by the server or detects that the vehicle is running abnormally, the data is uploaded in order from the highest to the lowest importance level of the storage area. In this way, the key data is uploaded to the server so that the server can make decisions in a timely manner based on the key data; the key data is written into the storage area with the highest level so that when the vehicle receives a read instruction sent by the server or detects that the vehicle is running abnormally, the key data can be uploaded again, avoiding the loss of some data during the process of the vehicle actively uploading the key data and ensuring the integrity of the key data during the data transmission process.

[0048] In an embodiment of the present application, after the server reads the data, it can check the repeatability of the data. If it is determined that the currently read data has been stored, the currently read data will not be stored again.

[0049] The data transmission method provided by the embodiment of the present application will be described in detail below. The data transmission method of the embodiment of the present application is applied to an in-vehicle electronic device. Among them, Figure 2 shows a schematic diagram of a data transmission method according to an embodiment of the present application. The data transmission method includes:

[0050] 101: Collect the first data and the second data.

[0051] In an embodiment of the present application, the in-vehicle electronic device can collect vehicle condition data through at least one of the vehicle's telematics unit, on-board diagnostics (OBD), and sensors. The vehicle condition data includes the first data and the second data.

[0052] 102: According to the data type of the first data and the data type of the second data, determine that the importance level of the first data is higher than that of the second data, and determine that the importance level of the first data is higher than the preset level, and upload the first data to the server.

[0053] In an embodiment of the present application, the vehicle condition data is divided into four types, such as Figure 3As shown, they are emergency event data, key driving data, general driving data, and ordinary log data respectively. Among them, the importance level of emergency event data is level one, the storage area of emergency event data is the first storage area, and emergency event data includes data indicating abnormal vehicle operation, such as acceleration greater than the acceleration threshold, and data indicating malfunction of vehicle components. The importance level of key driving data is level two, the storage area of key driving data is the second storage area, and key driving data includes data indirectly indicating abnormal vehicle operation, such as vehicle speed, power consumption, fuel consumption, etc. The importance level of general driving data is level three, the storage area of general driving data is the fourth storage area, and general driving data includes auxiliary monitoring data of the vehicle, such as door status, window status, left shift status, engine temperature, coolant temperature, etc. The importance level of ordinary log data is level four, the storage area of ordinary log data is the fifth storage area, and ordinary log data includes auxiliary data of the advanced driver assistance system (ADAS), such as the distance and speed of the vehicle ahead, lane line detection, pedestrian detection, etc.

[0054] It can be understood that the lower the numerical value of the importance level, the higher the represented importance. The first storage area, the second storage area, the fourth storage area, and the fifth storage area are circular buffer storage areas as Figure 4 shown.

[0055] It can be understood that a circular buffer is a fixed-size first in first out (FIFO) data structure. It manages the insertion and deletion operations of data by using two pointers (a head pointer and a tail pointer), and forms a ring at both ends of the buffer, thereby effectively utilizing the buffer space. Among them, the head pointer (head): points to the starting address position of the written data. The tail pointer (tail): points to the starting address position of the read data. It can be understood that each time vehicle condition data is produced (data is written at the vehicle end), the head pointer increases (occupying the storage space of the circular buffer). Each time vehicle condition data is consumed (data is read by the server), the tail pointer increases (releasing the storage space of the circular buffer).

[0056] In an embodiment of the present application, the data types of the first data and the second data may be determined first. For example, it is determined that the first data is emergency event data and the second data is emergency event data, that is, the importance level of the first data is level one and the importance level of the second data is level two. Secondly, it is judged whether the importance of the first data and the second data is higher than a preset level, where the preset level is level two. Since the importance level of the first data is level one, that is, the importance level of the first data is higher than the preset level, the first data is uploaded to the server. Since it is determined that the importance level of the second data is level two, that is, the importance level of the second data is equal to the preset level, the second data does not need to be uploaded to the server.

[0057] In an embodiment of the present application, by uploading the data with an importance level higher than the preset level to the server, the server can analyze the obtained vehicle condition data in a timely manner. The server can dynamically adjust resource allocation, optimize system performance, and can also provide personalized services and suggestions in a timely manner according to the vehicle usage situation and driving habits.

[0058] 103: Write the first data into the first storage area and the second data into the second storage area.

[0059] The methods of writing the first data into the first storage area and the second data into the second storage area are introduced separately below.

[0060] For writing the first data into the first storage area, it can be understood that the first data is emergency event data, the importance level of the first data is level one, and the storage area of the first data is the first storage area.

[0061] In an embodiment of the present application, since the first data is emergency event data, it can be first judged whether the free space in the first storage area is less than or equal to the occupied space of the first data. If it is determined that the free space in the first storage area is less than or equal to the occupied space of the first data, the first data is written into the position of the third data in the first storage area, the storage time of the third data is earlier than that of other data in the first storage area, and the occupied space of the third data is equal to the occupied space of the first data; if it is determined that the free space in the first storage area is greater than the occupied space of the first data, the first data is directly written into the write position of the first storage area.

[0062] In an embodiment of the present application, writing the first data into the first storage area includes: encrypting the first data based on the first encryption mask to obtain the first encrypted data; writing the first encrypted data into the first storage area.

[0063] In an embodiment of the present application, after writing the first data into the first storage area, the status information of the first storage area may also be written into the mirror storage area, where the status information includes the write position (RbHead), read position (RbTail), and free space (RbFree) of the first storage area.

[0064] In this way, the first data is not only uploaded to the server but also stored in the first storage area of the vehicle, which can handle situations such as network failures and avoid the loss of the first data during transmission, resulting in the inability to retrieve the first data.

[0065] Regarding writing the second data into the second storage area, it can be understood that the second data is critical driving data, the importance level of the second data is secondary, and the storage area of the second data is the second storage area.

[0066] It can be understood that in some other embodiments, the second data may be general driving data. In still other embodiments, the second data may be ordinary log data.

[0067] In an embodiment of the present application, it may first be determined whether the ratio of the occupied space of the second data to the data block storage space is less than or equal to the first safety threshold. If it is determined that the ratio of the occupied space of the second data to the data block storage space is less than or equal to the first safety threshold, the second data is written to the write position of the second storage area based on the generation period of the second data. If it is determined that the ratio of the occupied space of the second data to the data block storage space is greater than the first safety threshold, it is then determined whether the ratio of the occupied space of the second data to the data block storage space is less than or equal to the second safety threshold.

[0068] If it is determined that the ratio of the occupied space of the second data to the data block storage space is less than or equal to the second safety threshold, the second data is written to the second storage area based on the first period, where the first period is greater than the generation period of the second data.

[0069] For example, if the generation period of the second data is 300 ms, the first period may be set to 500 ms.

[0070] It can be understood that since the first period is greater than the generation period of the second data, writing the second data to the second storage area based on the first period can reduce the storage pressure on the first storage area and avoid overload caused by frequent writing.

[0071] If it is determined that the ratio of the occupied space of the second data to the data block storage space is greater than the second safety threshold, the data in the preset space is released, and the second data is written to the second storage area based on the first period.

[0072] It can be understood that the second safety threshold is greater than the first safety threshold.

[0073] In an embodiment of the present application, writing the second data into the second storage area includes: determining whether the free space in the second storage area is greater than the occupied space of the second data. If it is determined that the free space in the second storage area is less than or equal to the occupied space of the second data, then write the second data to the position of the fourth data in the second storage area, where the storage time of the fourth data is earlier than the storage time of other data in the second storage area, and the occupied space of the fourth data is equal to the occupied space of the second data; if it is determined that the free space in the second storage area is greater than the occupied space of the second data, then write the second data to the writing position in the second storage area based on the generation period of the second data.

[0074] Wherein, a data block is the smallest storage unit in the data transmission process, and the storage space of the data block is a preset size.

[0075] In an embodiment of the present application, writing the second data into the second storage area includes: encrypting the second data based on a second encryption mask to obtain second encrypted data; writing the second encrypted data into the second storage area.

[0076] In an embodiment of the present application, writing the second data into the second storage area based on a first period includes: encrypting the second data based on a second encryption mask to obtain second encrypted data; writing the second encrypted data into the second storage area based on the first period.

[0077] In an embodiment of the present application, after writing the second data into the second storage area, the status information of the second storage area may also be written into the mirror storage area, and the status information includes the writing position, reading position, and free space of the second storage area.

[0078] In an embodiment of the present application, when the second data has not been uploaded to the server, it can be temporarily stored in the second storage area of the vehicle as a temporary backup of the second data to prevent data loss in case of network failure or server problems. Even if the network connection is interrupted, the second data is still safely stored in the second storage area.

[0079] 104: When receiving a reading instruction sent by the server or detecting an abnormal vehicle operation, upload the first data and the second data to the server in sequence.

[0080] In an embodiment of the present application, when the in-vehicle electronic device receives a reading instruction sent by the server or detects an abnormal vehicle operation, upload the first data to the server; determine that all the data stored in the first storage area has been uploaded, and then upload the second data to the server.

[0081] In an embodiment of the present application, when receiving a read instruction sent by a server or detecting an abnormal vehicle operation, the first data is uploaded to the server, including: when receiving a read instruction sent by the server or detecting an abnormal vehicle operation, determining the data at the first storage area reading position as the first encrypted data; verifying the first encrypted data to determine that the verification of the first encrypted data is successful; decrypting the first encrypted data to obtain the first data; and uploading the first data to the server.

[0082] Among them, verifying the first encrypted data to determine that the verification of the first encrypted data is successful includes: verifying the tag of the first encrypted data to determine that the verification of the tag of the first encrypted data is successful; and verifying the checksum of the first encrypted data to determine that the verification of the checksum of the first encrypted data is successful.

[0083] In an embodiment of the present application, when detecting an abnormal vehicle operation, the vehicle can obtain the upload right of the vehicle condition data, and then upload the first data to the server; when determining that all the data stored in the first storage area has been uploaded, upload the second data to the server.

[0084] It can be understood that the abnormal vehicle operation includes vehicle rear-end collision, component failure, and loss of key driving data. Among them, the key driving data includes vehicle speed signal, braking signal, accelerator pedal opening, fault code, etc.

[0085] In an embodiment of the present application, when determining that all the data stored in the first storage area has been uploaded, upload the second data to the server, including: determining the data at the second storage area reading position as the third encrypted data; verifying the third encrypted data to determine that the verification of the third encrypted data is successful; decrypting the third encrypted data to obtain the second data; and uploading the second data to the server.

[0086] Among them, verifying the third encrypted data to determine that the verification of the third encrypted data is successful includes: verifying the tag of the third encrypted data to determine that the verification of the tag of the third encrypted data is successful; and verifying the checksum of the third encrypted data to determine that the verification of the checksum of the third encrypted data is successful.

[0087] In an embodiment of the present application, when detecting a user's clearing instruction; dividing the first storage area into N regions on average and dividing the second storage area into N regions on average; generating an encryption mask for each region of the first storage area and the second storage area; and writing the status information of the first storage area and the status information of the second storage area into the mirror storage area, where the status information includes the writing position, reading position, free space, and encryption mask (RbMask) of each region.

[0088] In an embodiment of the present application, when a clear instruction of a user is detected, the storage area can be evenly divided into N regions, and an encryption mask is randomly generated for each region, so that the historical data stored in the storage area cannot be parsed, that is, a logical deletion is formed, and the validity of the historical data stored in the storage area is destroyed. Moreover, the vehicle condition data of the vehicle is finally stored in the server, with relatively low cost and high security.

[0089] In an embodiment of the present application, when the in-vehicle electronic device detects that the vehicle is operating abnormally, in order to avoid data anomalies, it is possible to sequentially determine whether the free space of each storage area is equal to the free space of the storage area recorded in the mirror storage area according to the levels of the storage areas.

[0090] For example, for the first storage area, it is possible to determine whether the free space of the first storage area is equal to the free space of the first storage area recorded in the mirror storage area. If it is determined that the free space of the first storage area is not equal to the free space of the first storage area recorded in the mirror storage area, then it is determined whether the mirror storage area records the first record information, where the free space in the first record information = write position - read position. If the mirror storage area has the first record information, then the status information of the first storage area is restored based on the first record information. If the mirror storage area does not have the first record information, then the status information of the first storage area is cleared.

[0091] If it is determined that the free space of the first storage area is equal to the free space of the first storage area recorded in the mirror storage area, the processing flow ends.

[0092] It can be understood that when the in-vehicle electronic device detects that the vehicle is operating abnormally and the free space of the storage area is not equal to the free space of the storage area recorded in the mirror storage area, it indicates that there may be abnormal data in the vehicle condition data stored in the storage area. Restoring the status information in the storage area based on the status information of the storage area synchronously stored in the mirror storage area can ensure the accuracy of the data stored in the storage area.

[0093] In an embodiment of the present application, restoring the status information of the first storage area based on the first record information includes: updating the read position of the first storage area to the read position in the first record information, updating the write position of the first storage area to the write position in the first record information, and updating the free space of the first storage area to the free space in the first record information.

[0094] In this way, updating the status information of the first storage area can ensure the accuracy of the data in the first storage area.

[0095] Next, another data transmission method provided by an embodiment of the present application will be described in detail. Another data transmission method provided by an embodiment of the present application is applied to a server. Among them,Figure 5 The figure shows a schematic diagram of a data transmission method according to an embodiment of the present application. The data transmission method includes:

[0096] 201: Detect the first data uploaded by the in-vehicle electronic device, determine that the first data is not stored in the third storage area, and write the first data into the third storage area.

[0097] In the embodiment of the present application, when the server detects the first data uploaded by the in-vehicle electronic device of the vehicle, it can determine whether the first data is stored in the third storage area of the server. If the determination result is no, the first data is written into the third storage area; if the determination result is yes, the first data uploaded by the in-vehicle electronic device is deleted.

[0098] 202: Send a read instruction to the in-vehicle electronic device.

[0099] In the embodiment of the present application, the server can send a read instruction to the in-vehicle electronic device of the vehicle based on a preset rule.

[0100] 203: Read the first data, determine that the first data is stored in the third storage area, and delete the first data read based on the read instruction.

[0101] In the embodiment of the present application, when the server reads the first data, it can determine whether the first data is stored in the third storage area of the server. If the determination result is no, the first data is written into the third storage area; if the determination result is yes, the first data read based on the read instruction is deleted.

[0102] 204: Read the second data, determine that the second data is not stored in the third storage area, and write the second data into the third storage area.

[0103] In the embodiment of the present application, when the server reads the second data in the second storage area, it can determine whether the second data is stored in the third storage area of the server. If the determination result is no, the second data is written into the third storage area; if the determination result is yes, the second data read based on the read instruction is deleted.

[0104] In this way, it is possible to avoid the server from storing the same data repeatedly and avoid wasting the storage space of the server.

[0105] The embodiment of the present application provides a data transmission method. As Figure 6 shown, when the vehicle generates vehicle condition data, the type of the vehicle condition data can be determined, and then the vehicle condition data is encrypted and stored in the storage device of the vehicle. After the vehicle receives the instruction to read the vehicle condition data sent by the server, the vehicle sends the vehicle condition data read by the server to the server. After the server obtains the vehicle condition data, the vehicle condition data is stored in the storage device on the server side.

[0106] In the embodiments of the present application, as Figure 7 shown, if the vehicle determines that the vehicle condition data is emergency event data, it actively uploads the vehicle condition data to the server so that the server can make decisions in a timely manner based on the vehicle condition data.

[0107] Figure 8 shows a schematic flow chart of the method for the vehicle to write the vehicle condition data into the vehicle memory after obtaining the vehicle condition data. As Figure 8 shown, after the vehicle generates metadata (i.e., the vehicle condition data of the present application), the metadata can be classified according to the data type of the metadata.

[0108] For example, at time t1, the vehicle obtains the first data, the second data, the third data, and the fourth data, and determines that the first data is emergency event data, the second data is critical driving data, the third data is general driving data, and the fourth data is ordinary log data. At time t2, the vehicle obtains the fifth data, the sixth data, the seventh data, and the eighth data, and determines that the fifth data is emergency event data, the sixth data is critical driving data, the seventh data is general driving data, and the eighth data is ordinary log data. At time t3, the vehicle obtains the ninth data, the tenth data, the eleventh data, and the twelfth data, and determines that the ninth data is emergency event data, the tenth data is critical driving data, the eleventh data is general driving data, and the twelfth data is ordinary log data. At time t4, the vehicle obtains the thirteenth data, the fourteenth data, the fifteenth data, and the sixteenth data, and determines that the thirteenth data is emergency event data, the fourteenth data is critical driving data, the fifteenth data is general driving data, and the sixteenth data is ordinary log data.

[0109] In some embodiments, as Figure 9 shown, the first data can be recorded as emergency event data 1, the second data can be recorded as critical driving data 1, the third data can be recorded as general driving data 1, the fourth data can be recorded as ordinary log data 1, the fifth data can be recorded as emergency event data 2, the sixth data can be recorded as critical driving data 2, the seventh data can be recorded as general driving data 2, the eighth data can be recorded as ordinary log data 2, the ninth data can be recorded as emergency event data 3, the tenth data can be recorded as critical driving data 3, the eleventh data can be recorded as general driving data 3, the twelfth data can be recorded as ordinary log data 3, the thirteenth data can be recorded as emergency event data 4, the fourteenth data can be recorded as critical driving data 4, the fifteenth data can be recorded as general driving data 4, and the sixteenth data can be recorded as ordinary log data 4.

[0110] It can be understood that among them, the importance level of emergency event data is level one, the storage area of emergency event data is the first storage area, and the emergency event data includes data indicating abnormal vehicle operation, such as acceleration greater than the acceleration threshold, and data indicating malfunction of vehicle components. The importance level of critical driving data is level two, the storage area of critical driving data is the second storage area, and the critical driving data includes data indirectly indicating abnormal vehicle operation, such as vehicle speed, power consumption, fuel consumption, etc. The importance level of general driving data is level three, the storage area of general driving data is the fourth storage area, and the general driving data includes auxiliary monitoring data of the vehicle, such as door status, window status, shift status, engine temperature, coolant temperature, etc. The importance level of ordinary log data is level four, the storage area of ordinary log data is the fifth storage area, and the ordinary log data includes ADAS auxiliary data, such as the distance and speed of the vehicle ahead, lane line detection, pedestrian detection, etc.

[0111] It can be understood that the lower the numerical value of the importance level, the higher the represented importance. The first storage area, the second storage area, the fourth storage area, and the fifth storage area are Figure 4 the circular storage areas as shown.

[0112] After classifying the metadata, the metadata can be processed in order from high to low according to the importance level. The processing process includes: determining whether the metadata is emergency event data. If it is determined that the metadata is emergency event data, the metadata is stored in the storage area corresponding to the importance level of the metadata, and the metadata is sent to the server. If the sending fails, continue to send until the number of sending times is greater than N, and stop sending the metadata. If it is determined that the metadata is not emergency event data, determine the occupied space of the metadata, and determine the ratio of the occupied space of the metadata to the storage space of a single data block (block). If the ratio of the metadata to a single block is less than or equal to the first safety threshold, that is, it has not reached the danger threshold, the metadata is stored in the storage area corresponding to the importance level of the metadata; if the ratio of the metadata to a single block is greater than the first safety threshold, that is, it has reached the danger threshold, determine whether the network is normal. If it is determined that the network is normal, write the metadata into the storage area corresponding to the importance level of the metadata based on a frequency greater than the metadata generation period. For example, if the generation period of the metadata is 200 ms, the metadata can be written into the storage area corresponding to the importance level of the metadata based on 400 ms. If it is determined that the network is abnormal, update the importance level of the metadata to the highest level, and write the metadata into the storage area of the highest level, that is, write the metadata into the first storage area.

[0113] To better understand the process of writing metadata into the storage area corresponding to the importance level of the metadata, the storage structure of data in the circular storage area will be introduced below with reference to Table 1 first.

[0114] Table 1

[0115] RbTag RbHead RbTail RbFree RbMask DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad DtTag DtCrc DtLen DtLoad -- -- -- -- -- -- --

[0116] Among them, RbTag represents the start of a valid ring storage area data segment, which can be composed of fixed numbers, such as AA5555AA. RbHead represents the storage location of the next data. RbTail represents the reading location of the next data. RbFree represents the available write space size of the ring storage area, or the free space size. RbMask represents the encryption mask corresponding to the metadata, and a random RbMask will be regenerated each time an erase operation is performed. DtTag represents the start of a piece of metadata, which can be composed of fixed numbers, such as 55AA. DtCrc represents the Crc checksum of the metadata. DtLen represents the length of the metadata. DtLoad represents the metadata.

[0117] It can be understood that a piece of data can be represented as DtTag, DtCrc, DtLen, DtLoad.

[0118] Next, in combination with Figure 10 and Table 1, a method for writing metadata into the storage area corresponding to the importance level of the metadata will be introduced. As Figure 10 shown, in the process of writing metadata into the storage area corresponding to the importance level of the metadata, the metadata can be written into the storage area corresponding to the importance level of the metadata in sequence according to the importance level of the metadata, that is, starting from the data with the highest importance level, the metadata with different importance levels are written into the storage area corresponding to the importance level of the metadata.

[0119] In the process of writing metadata to the storage area corresponding to the importance level of the metadata, first obtain relevant information of the storage area corresponding to the importance level of the metadata, such as RbHead, RbTail, RbFree, and RbMask. For example, if the importance level of the metadata is level one, then obtain RbHead, RbTail, RbFree, and RbMask of the first storage area. Secondly, encrypt the metadata according to the RbMask of the storage area to obtain the encrypted data DtLoad. Calculate the byte length of DtLoad to obtain DtLen. Determine whether RbFree is greater than DtLen + X% × RbSize; where RbFree represents the size of the free space in the storage area corresponding to the importance level of the metadata, RbSize is the physical size of the storage area corresponding to the importance level of the metadata, and X% × RbSize is a protection interval set to avoid frequent space release in the circular buffer storage area in extreme cases such as poor network communication quality. If RbFree is less than or equal to DtLen + X% × RbSize, calculate the position of the address space consumed by metadata storage + X% × RbSize starting from the RbTail position, delete the data of the address space consumed by metadata storage + X% × RbSize starting from RbTail, and move RbTail to the deleted position, and write DtTag, DtCrc, DtLen, and DtLoad of the metadata in sequence starting from the positions of RbHead, DtTag, and RbFree. If RbFree is greater than DtLen + X% × RbSize, write DtTag, DtCrc, DtLen, and DtLoad of the metadata in sequence starting from the positions of RbHead, DtTag, and RbFree. Update RbHead and RbFree, where RbHead = RbHead + DtLen + X% × RbSize; RbFree = Space(RbHead, RbTail). After writing the metadata to the storage area corresponding to the importance level of the metadata, back up RbHead, RbTail, and RbFree of the storage area corresponding to the importance level of the metadata to the mirror storage area (Mirror).

[0120] For example, if there are a total of N metadata, after the first metadata is stored in the first storage area, back up RbHead, RbTail, and RbFree of the first storage area to position 1 in the mirror storage area. After the second metadata is stored in the first storage area, back up RbHead, RbTail, and RbFree of the first storage area to position 2 in the mirror storage area, and so on, until after the Nth metadata is stored in the first storage area, back up RbHead, RbTail, and RbFree of the first storage area to position N in the mirror storage area.

[0121] Figure 11 It shows a schematic flow diagram of a server reading metadata from a vehicle. In the embodiments of the present application, the server can read data in sequence according to the importance priority of the data, that is, it can read the data stored in the first storage area, the second storage area, the fourth storage area, and the fifth storage area of the vehicle in sequence. When reading the data in each storage area, the metadata can be read according to the storage time of each data in the storage area. After reading the current metadata, it can be determined whether the metadata of the current storage area has been read completely. If the determination result is no, then continue to read the next metadata of the current metadata stored in the current storage area; if the determination result is yes, then read the metadata stored in the storage area of the next importance level.

[0122] For example, the vehicle includes a first storage area, a second storage area, a fourth storage area, and a fifth storage area. The first storage area is used to store emergency event data, the second storage area is used to store critical driving data, the fourth storage area is used to store general driving data, and the fifth storage area is used to store ordinary log data; then the level of the first storage area is the first level, the level of the second storage area is the second level, the level of the fourth storage area is the third level, and the level of the fifth storage area is the fourth level. The server can read the vehicle condition data stored in the first storage area, the second storage area, the third storage area, and the fourth storage area in sequence.

[0123] For the vehicle condition data stored in each storage area, the server can upload it according to the storage time of the vehicle condition data stored in each storage area. For example, the first storage area includes the first data and the fifth data. The storage time of the first data is the first time, and the storage time of the fifth data is the second time, and the first time is earlier than the second time. Then, for the first data and the fifth data in the first storage area, the first data can be read first, and then the fifth data can be read.

[0124] In the embodiments of the present application, the server can read data in sequence according to the classification priority of the data. The following combines Figure 12 to introduce the method for the server to read the vehicle condition data stored in each storage area. As Figure 12As shown, the server can first obtain relevant information of the storage area through the vehicle's on-board electronic device, such as RbHead, RbTail, RbFree, RbMask, and set ReadStart = RbTail. For example, if the server wants to read the data in the first storage area, the vehicle's on-board electronic device can obtain RbHead, RbTail, RbFree, RbMask of the first storage area, and set ReadStart = RbTail. Then, read the data with the length of the DtTag storage space from ReadStart. It can be understood that a piece of data can be represented as DtTag, DtCrc, DtLen, DtLoad.

[0125] First, verify the tag of the data, that is, determine whether DataTag is the same as the fixed data tag. For example, determine whether DataTag is the same as 55AA. If the judgment result is no, that is, the tag verification fails, then ReadStart = ReadStart + 1, and read the data with the length of the DtTag storage space from ReadStart. If the judgment result is yes, that is, the tag verification is successful, then read the data of DtCrc and DtLen after ReadStart + DtTag. After reading the data with the length of DataLen, that is, after reading the metadata, verify the checksum of the data, that is, calculate the Crc of the metadata and compare the Crc of the metadata with DtCrc. If the Crc of the metadata is inconsistent with DtCrc, that is, the checksum verification fails, then discard the data, and set RbTail = the starting address of the next data, and loop to back up RbHead, RbTail, and RbFree. If the Crc of the metadata is consistent with DtCrc, that is, the checksum verification is successful, then determine that the metadata is correct, decrypt the metadata using RbMask, and return the decrypted metadata to the server, set RbTail = the starting address of the next data, and loop to back up RbHead, RbTail, and RbFree.

[0126] The following combines Figure 13 , and introduces the recovery method of the data in the first storage area for data anomalies, such as data anomalies caused by abnormal power-off. As Figure 13As shown, when abnormal power failure causes data abnormality, it is determined whether RbFree==RbFree_Mirror, RbHead==RbHead_Mirror, RbTail==RbTail_Mirror. If RbFree==RbFree_Mirror, RbHead==RbHead_Mirror, RbTail==RbTail_Mirror, then it is determined whether RbFree==Space(RbHead, RbTail). If RbFree==Space(RbHead, RbTail), it is determined that there is a slight amount of data loss, but the lost data is acceptable, and the data recovery process ends. If at least one of RbFree==RbFree_Mirror, RbHead==RbHead_Mirror, RbTail==RbTail_Mirror is different, or RbFree is different from Space(RbHead, RbTail), then find a recently stored set of records that satisfy RbFree_Mirror=Space(RbHead_Mirror, RbTail_Mirror). If a record that satisfies RbFree_Mirror=Space(RbHead_Mirror, RbTail_Mirror) is found, then restore the data in the first storage area based on the record that satisfies RbFree_Mirror=Space(RbHead_Mirror, RbTail_Mirror). If no record that satisfies RbFree_Mirror=Space(RbHead_Mirror, RbTail_Mirror) is found, then set RbFree=RbSize, RbHead=0, RbTail=0. Wherein, "==" means equal.

[0127] Combine the following Figure 14 Taking the first storage area as an example, the method for the vehicle to clear the read data after the server has read the data is introduced. Figure 14 As shown, first set RbHead=0, RbTail=0, RbFree=RbSize, and RbMask=new randomly generated Mask of the first storage area. Divide the first storage area into N equal parts, and forge a metadata at the beginning of each part. The forged metadata only modifies the DtCrc and DtLen of the originally stored data; where DtCrc=randomly generated, DtLen=RbSize / N. Then save the key information of the first storage area to the mirror storage space, where the key information of the first storage area includes RbHead, RbTail, RbFree, and RbMask.

[0128] RbHead_Mirror = RbHead, RbTail_Mirror = RbTail, RbFree_Mirror = RbFree, RbMask_Mirror = RbMask.

[0129] In this way, when the present application detects a user's clearing instruction, it can evenly divide the storage area into N regions, and randomly generate an encryption mask for each region, thereby making the historical data stored in the storage area unresolvable, that is, forming a logical deletion and destroying the validity of the historical data stored in the storage area. Moreover, the vehicle condition data of the vehicle is finally stored in the server, with relatively low cost and high security.

[0130] It can be understood that the technical solution of the present application is applicable to in-vehicle electronic devices. For example, it includes, but is not limited to, laptop computers, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. The specific types of electronic devices are not restricted in the embodiments of the present invention.

[0131] An embodiment of the present application provides an in-vehicle electronic device, including: a memory for storing instructions executed by one or more processors of the in-vehicle electronic device, and a processor, which is one of the one or more processors of the in-vehicle electronic device, for executing the above data transmission method.

[0132] An embodiment of the present application provides a readable medium, on which instructions are stored. When the instructions are executed on the in-vehicle electronic device, the in-vehicle electronic device executes the above data transmission method.

[0133] An embodiment of the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed by the in-vehicle electronic device, the in-vehicle electronic device executes the above data transmission method.

[0134] According to the embodiments of the present application, Figure 15 According to some embodiments of the present application, a schematic structural diagram of an in-vehicle electronic device 10 is shown. As Figure 15 shown, the in-vehicle electronic device 10 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, a communication interface 104, an input / output (I / O) device 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 104, and the input / output (I / O) device 105. Among them:

[0135] The processor 101 can be used to control an electronic device to execute the data transmission method of this application. Among them, the processor 101 can include one or more processing units. For example, it can include a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a micro-programmed control unit (MCU), an artificial intelligence (AI) processor, or a processing module or processing circuit of a field programmable gate array (FPGA). The processing module or processing circuit can include one or more single-core or multi-core processors. The system memory 102 is a volatile memory, such as a random-access memory (RAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), etc. The system memory is used to temporarily store data and / or instructions.

[0136] The non-volatile memory 103 can include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 can include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 can also be a removable storage medium, such as a secure digital (SD) memory card, etc.

[0137] In particular, the system memory 102 and the non-volatile memory 103 can respectively include: a temporary copy and a permanent copy of the instruction 107. The instruction 107 can include: when executed by the processor 101, enabling the vehicle-mounted electronic device 10 to implement the data transmission methods provided in the embodiments of this application.

[0138] The communication interface 104 may include a transceiver for providing a wired or wireless communication interface for the vehicle-mounted electronic device 10, and further communicating with any other suitable device through one or more networks. In some embodiments, the communication interface 104 may be integrated with other components of the vehicle-mounted electronic device 10. For example, the communication interface 104 may be integrated in the processor 101. In some embodiments, the vehicle-mounted electronic device 10 may communicate with other devices through the communication interface 104. For example, the vehicle-mounted electronic device 10 may obtain a data transmission method to be run from other electronic devices through the communication interface 104.

[0139] The input / output (I / O) device 105 may include input devices such as keyboards, mice, etc., and output devices such as displays, etc. Users can interact with the vehicle-mounted electronic device 10 through the input / output (I / O) device 105.

[0140] The system control logic 106 may include any suitable interface controller to provide any suitable interface for other modules of the vehicle-mounted electronic device 10. For example, in some embodiments, the system control logic 106 may include one or more memory controllers to provide an interface connected to the system memory 102 and the non-volatile memory 103.

[0141] In some embodiments, at least one of the processors 101 may be logically packaged with one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may also be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system on chip (SoC).

[0142] Embodiments of the mechanisms disclosed in this application may be implemented in hardware, software, firmware, or combinations of these implementation methods. Embodiments of this application may be implemented as computer programs or program codes executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device.

[0143] Program code can be applied to input instructions to perform the various functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0144] The program code can be implemented in a high-level procedural language or an object-oriented programming language in order to communicate with the processing system. When needed, the program code can also be implemented in assembly language or machine language. In fact, the mechanisms described in this application are not limited to the scope of any particular programming language. In any case, the language can be a compiled language or an interpreted language.

[0145] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried or stored on one or more transient or non-transient machine-readable (e.g., computer-readable) storage media, which can be read and executed by one or more processors. For example, the instructions can be distributed via a network or via other computer-readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical discs, compact disc-read only memories (CD-ROMs), magneto-optical discs, read only memories (ROMs), random access memories (RAMs), erasable programmable read only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) in electrical, optical, acoustic, or other forms via the Internet. Thus, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0146] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or ordering may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. Additionally, the inclusion of a structural or method feature in a particular figure does not imply that such a feature is required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0147] It should be noted that each unit / module mentioned in the device embodiments of this application is a logical unit / module. Physically, a logical unit / module can be a physical unit / module, a part of a physical unit / module, or can be implemented as a combination of multiple physical units / module. The physical implementation manner of these logical units / module themselves is not the most important. The combination of the functions implemented by these logical units / module is the key to solving the technical problems proposed in this application. In addition, to highlight the innovative part of this application, the above device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems proposed in this application. This does not mean that there are no other units / modules in the above device embodiments.

[0148] It should be noted that in the examples and descriptions of this patent, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising one" does not exclude the presence of additional identical elements in the process, method, article or device comprising the element. Although this application has been illustrated and described by reference to certain preferred embodiments thereof, those of ordinary skill in the art should understand that various changes in form and detail may be made therein without departing from the spirit and scope of this application.

Claims

1. A data transmission method, characterized in that: Applied to vehicle-mounted electronic equipment, the data transmission method includes: collecting first data and second data; Determining, according to the data type of the first data and the data type of the second data, that the importance level of the first data is higher than the importance level of the second data, and determining that the importance level of the first data is higher than a preset level, and uploading the first data to a server; Writing the first data into a first storage area, and writing the second data into a second storage area; When a read instruction sent by the server is received or abnormal operation of the vehicle is detected, the first data and the second data are uploaded to the server in sequence.

2. The data transmission method according to claim 1, characterized in that: The step of writing the first data into the first storage area comprises: It is determined that the free space of the first storage area is larger than the occupied space of the first data, and the first data is written into the first storage area.

3. The data transmission method according to claim 1, characterized in that: The step of writing the first data into the first storage area comprises: Determine that the free space of the first storage area is less than or equal to the occupied space of the first data, write the first data into the position of the third data in the first storage area, the storage time of the third data is earlier than the storage time of other data in the first storage area, and the occupied space of the third data is equal to the occupied space of the first data.

4. The data transmission method according to claim 1, characterized in that: The method further comprises: Determining that the importance level of the second data is lower than the preset level and the ratio of the occupied space of the second data to the data block storage space is less than or equal to the first security threshold, and writing the second data into the second storage area based on the generation cycle of the second data, the data block is the smallest storage unit in the data transmission process, and the storage space of the data block is a preset size; Determining that the importance level of the second data is lower than the preset level, and the ratio of the occupied space of the second data to the data block storage space is greater than the first security threshold and less than or equal to the second security threshold, writing the second data into the second storage area based on a first cycle, and the first cycle is greater than a generation cycle of the second data; Determine that the importance level of the second data is lower than the preset level, and the ratio of the occupied space of the second data to the data block storage space is greater than the second security threshold, release the data in the preset space, and write the second data into the second storage area based on the first cycle.

5. The data transmission method according to any one of claims 1 to 4, characterized in that: The first storage area and the second storage area are annular storage areas.

6. The data transmission method according to claim 1, characterized in that: The method of uploading the first data and the second data to the server in sequence upon receiving a read instruction sent by the server or detecting abnormal operation of the vehicle comprises: When receiving a read instruction sent by the server or detecting abnormal operation of the vehicle, uploading the first data to the server; Determine that all data stored in the first storage area has been uploaded, and upload the second data to the server.

7. The data transmission method according to claim 1, characterized in that: The method further comprises: The state information of the first storage area and the state information of the second storage area are written into the mirror storage area, wherein the state information includes a write position, a read position and free space of the storage area.

8. The data transmission method according to claim 7, characterized in that: The method further comprises: Abnormal vehicle operation is detected; It is detected that the free space of the first storage area is not equal to the free space of the first storage area recorded in the mirror storage area, and first record information in the mirror storage area is determined, where the free space in the first record information = the write position - the read position; The read position of the first storage area is updated to the read position in the first record information, the write position of the first storage area is updated to the write position in the first record information, and the free space of the first storage area is updated to the free space in the first record information.

9. The data transmission method according to claim 7, characterized in that: The method further comprises: A clear instruction from the user is detected; Divide the first storage area into N areas, and divide the second storage area into N areas; generating an encryption mask for each area of ​​the first storage area and the second storage area; Writing status information of the first storage area and status information of the second storage area into the mirror storage area, the status information including an encryption mask of each area.

10. The data transmission method according to claim 1, characterized in that: The step of writing the first data into the first storage area comprises: Encrypting the first data based on a first encryption mask to obtain first encrypted data; The first encrypted data is written into the first storage area.

11. The data transmission method according to claim 10, characterized in that: When receiving a read instruction sent by the server or detecting abnormal operation of the vehicle, uploading the first data includes: When receiving a read instruction sent by the server or detecting abnormal operation of the vehicle, determining that the data at the read position of the first storage area is the first encrypted data; Verifying the first encrypted data to determine that the verification of the first encrypted data succeeds; decrypting the first encrypted data to obtain the first data; Upload the first data.

12. The data transmission method according to claim 11, characterized in that: The verifying the first encrypted data to determine that the verification of the first encrypted data succeeds includes: Verifying the label of the first encrypted data to determine that the verification of the label of the first encrypted data succeeds; The verification code of the first encrypted data is verified to determine whether the verification code of the first encrypted data is successfully verified.

13. A data transmission method, characterized in that: Applied to a server, the data transmission method includes: detecting first data uploaded by the in-vehicle electronic device, determining that the first data is not stored in the third storage area, and writing the first data into the third storage area; Sending a read instruction to the vehicle-mounted electronic device; Reading the first data, determining that the first data has been stored in the third storage area, and deleting the first data read based on the read instruction; The second data is read, it is determined that the third storage area does not store the second data, and the second data is written into the third storage area.

14. An in-vehicle electronic device, characterized in that: include: A memory for storing instructions executed by one or more processors of the on-board electronic device, and the processor, which is one of the one or more processors of the on-board electronic device, is used to execute the data transmission method described in any one of claims 1 to 12.

15. A readable medium, characterized in that The readable medium stores instructions, which, when executed on the onboard electronic device, enable the onboard electronic device to execute the data transmission method according to any one of claims 1 to 12.

16. A computer program product, characterized in that The computer program product comprises computer instructions, and when executed by an onboard electronic device, the onboard electronic device performs the data transmission method according to any one of claims 1 to 12.