A message encoding method to improve frame loss during OTA upgrade process
By improving the message encoding method in the OTA upgrade process and utilizing time synchronization data and restoration function libraries to restore lost frame data, the problem of frame loss during vehicle OTA upgrades has been solved, achieving automatic restoration and resource saving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DONGFENG MOTOR GRP
- Filing Date
- 2023-11-08
- Publication Date
- 2026-05-26
AI Technical Summary
In the current process of vehicle OTA upgrade, due to the frame loss problem caused by the long data transmission link, the existing technology cannot achieve automatic frame replacement, and the complementary verification method leads to a large increase in the data packet volume.
An improved message encoding method for OTA upgrade process is adopted, which divides a single-frame write message into three parts: two-bit write data, time synchronization number, and checksum. Using hexadecimal encoding and CRC algorithm, lost frame data is restored through a restoration function library, and lost frames are identified and located using the time synchronization number.
It enables automatic restoration of lost frame data without consuming additional resources, reducing repeated flushing time and packet size.
Smart Images

Figure CN117545015B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of OTA upgrade technology, and specifically to a message encoding method for improving frame loss during the OTA upgrade process. Background Technology
[0002] Currently, relevant in-vehicle OTA data transmission systems are typically designed to utilize cellular networks (4G, 5G) for remote data transmission. When customers perform OTA upgrades and invoke remote data transmission, frame loss is inevitable due to the long data transmission link between the mobile phone, the cloud, and the vehicle gateway controller.
[0003] Current technical solutions or trends involve error detection through repeated checksums or complementary checksums. These methods cannot automatically patch frames; repeated checksums only rewrite the data segment after frame loss is detected, meaning that after a segment of data transmission is complete, verification is performed by calculating checksums, and if a problem is found, the segment is rewritten. Complementary checksums lead to a significant increase in data packet size. Summary of the Invention
[0004] The purpose of this invention is to provide a message encoding method to improve the handling of lost frames during OTA upgrades, so as to recover the data from lost frames without consuming additional transmission and computing resources.
[0005] To address the aforementioned technical problems, this invention provides a technical solution: a message encoding method to improve frame loss during OTA upgrades, wherein the single-frame write message of an OTA upgrade is configured to include a first message group, a second message group, and a third message group; wherein the first message group, the second message group, and the third message group are all two bits; the first message group contains two bits of write data; the second message group includes one bit of time synchronization data and one bit of first restoration data; the third message group includes one bit of checksum data and one bit of second restoration data.
[0006] The time synchronization number is set sequentially and cyclically within a certain range as the single-frame write messages are sent frame by frame; the check number is obtained by calculating the write data of this frame after passing through a set check algorithm; the first restoration number and the second restoration number are the corresponding numbers of different functions in a preset restoration function library, and the first restoration number and the second restoration number of this frame write message are obtained based on the write data of this frame write message, the write data of the next frame write message, and the function library;
[0007] The two-bit write data, the first restoration number, and the second restoration number are obtained by the receiving end when a frame is lost. The receiving end finds the corresponding two restoration functions in the restoration function library based on the first restoration number and the second restoration number. The two bits of the two-bit write data of the previous frame are input into the two restoration functions respectively to obtain the write data corresponding to the lost frame.
[0008] According to the above scheme, the number system of the writing message is hexadecimal.
[0009] According to the above scheme, the verification algorithm is the CRC algorithm.
[0010] According to the above scheme, the first restoration number is used to restore the most significant bit of the flush message of the lost frame, and the second restoration number is used to restore the least significant bit of the flush message of the lost frame.
[0011] According to the above scheme, the time synchronization number can be set in the range of 0 to F.
[0012] A method for restoring lost frames during an OTA upgrade process using the message encoding method described above, comprising:
[0013] When the current frame's write message is lost, obtain the two-bit write data, the first restore number, and the second restore number from the previous frame's write message of the lost frame;
[0014] Based on the first and second restore numbers of the previous frame's write message, find the corresponding two restore functions in the preset restore function library;
[0015] By inputting two bits of the write data from the previous frame into two restoration functions, the write data corresponding to the lost frame can be obtained.
[0016] According to the above scheme, the number system of the writing message is hexadecimal.
[0017] According to the above scheme, the first restoration number is used to restore the most significant bit of the flush message of the lost frame, and the second restoration number is used to restore the least significant bit of the flush message of the lost frame.
[0018] An OTA upgrade method to prevent frame loss utilizes the frame loss restoration method described above. Specifically, it determines whether frame loss has occurred based on the change in the time synchronization number of adjacent frames. When frame loss occurs, the lost frame is located based on the missing time synchronization number, and then the frame loss restoration method is executed.
[0019] An in-vehicle intelligent device, when undergoing OTA upgrade and experiencing frame drops, executes the frame drop restoration method described above.
[0020] The beneficial effects of this invention are as follows: A first restoration number and a second restoration number are set in each frame's write message. Since the write data of this frame can be used to obtain the write data of the next frame through the restoration functions corresponding to the first and second restoration numbers, when the write message of the next frame is lost, the receiving end can restore the write data of the lost frame based on the write data of this frame and the two restoration numbers. This method can directly restore the data when a single frame is lost. Compared with the prior art, which requires rewriting the data segment containing the lost frame, this scheme saves the time of repeated writing. Compared with the prior art, which uses complementary checksum for transmission, the encoding method of this scheme greatly reduces the size of the transmitted data packets. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the existing technology's brush message format;
[0022] Figure 2 This is a schematic diagram of the message encoding and frame loss restoration method according to Embodiment 1 of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.
[0024] Example 1:
[0025] The message encoding method for improving frame loss during OTA upgrades described in this embodiment is an improvement upon existing message encoding designs. For existing message encoding methods, please refer to [link to existing methods]. Figure 1 The first message group 0x66 contains two bits of write data (i.e., data used to carry the information required by the receiving end); the least significant bit of the second message group 0x08 is the time synchronization number, and the most significant bit has no meaning and is kept at 0; the third message group 0x15 contains two bits of checksum.
[0026] The following table represents several adjacent frames of the existing write message:
[0027]
[0028]
[0029] Based on the existing message encoding design described above, this embodiment proposes an improved message encoding method to address frame loss during OTA upgrades as follows: The single-frame write message for OTA upgrades is configured to include a first message group, a second message group, and a third message group, each with a hexadecimal value. Each of these three message groups consists of two bits. The first message group contains two bits of write data. The second message group includes a time synchronization number and a first restoration number, with the time synchronization number ranging from 0 to F. The third message group includes a checksum number and a second restoration number.
[0030] The time synchronization number is set sequentially within a certain range as each frame of the single-frame write message is sent. The time synchronization number is used for time alignment between different messages and for checking whether frames are lost during message transmission. If the time synchronization number of the adjacent frame message received by the receiving end changes, it indicates that a frame loss has occurred. The lost frame can then be located based on the lost time synchronization number. The check number is obtained by calculating the write data of this frame using the CRC check algorithm. The first restoration number and the second restoration number are the corresponding numbers of different functions in the preset restoration function library. The first restoration number and the second restoration number of this frame's write message are obtained based on the write data of this frame's write message, the write data of the next frame's write message, and the function library. The first restoration number is used to restore the most significant bit of the write message of the lost frame, and the second restoration number is used to restore the least significant bit of the write message of the lost frame.
[0031] For example, in Figure 1 Based on the write message, the encoding method described in this embodiment is modified, and the resulting single-frame illustration of the write message is as follows. Figure 2 As shown;
[0032] The first message group is the same as the existing technology, still using two bits to write data; in the second message group, the original least significant bit of the time synchronization number is moved to the most significant bit, and the least significant bit is used as the representation bit of the first restored number; in the third message group, the two-bit check number is reduced to one bit and placed in the most significant bit, and the least significant bit is used as the representation bit of the second restored number.
[0033] Example 2:
[0034] The principle and method of this embodiment are basically the same as those of Embodiment 1. Based on Embodiment 1, a method for restoring lost frames during OTA upgrades is also proposed, including:
[0035] S1. When the current frame's write message is lost, obtain the two-bit write data, the first restore number, and the second restore number from the previous frame's write message of the lost frame.
[0036] S2. Based on the first and second restore numbers of the previous frame's write message, find the corresponding two restore functions in the preset restore function library respectively;
[0037] S3. Input the two bits of the write data of the previous frame into the two restoration functions respectively to obtain the write data corresponding to the lost frame.
[0038] join Figure 2 The method for restoring lost frame messages, exemplified by the encoding method in Embodiment 1, is as follows:
[0039] When the next frame of the current frame is lost, the most significant bit "6" of the first packet group of the current frame is input into the restoration function represented by the first restoration number "3" of the least significant bit of the second packet group to obtain the most significant bit "7" of the lost frame data. The least significant bit "6" of the first packet group of the current frame is input into the restoration function represented by the first restoration number "7" of the least significant bit of the second packet group to obtain the least significant bit "7" of the lost frame data. This completes the restoration of the data written in the lost frame.
[0040] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A message encoding method for improving frame loss during OTA upgrades, characterized in that: The single-frame flash message for OTA upgrade is set to include a first message group, a second message group, and a third message group; each of the first, second, and third message groups is two bits; the first message group contains two bits of flash data; the second message group includes one bit of time synchronization data and one bit of first restore data; the third message group includes one bit of checksum data and one bit of second restore data. The time synchronization number is set sequentially and cyclically within a certain range as the single-frame write messages are sent frame by frame; the check number is obtained by calculating the write data of this frame after passing through a set check algorithm; the first restoration number and the second restoration number are the corresponding numbers of different functions in a preset restoration function library, and the first restoration number and the second restoration number of this frame write message are obtained based on the write data of this frame write message, the write data of the next frame write message, and the function library; The two-bit write data, the first restoration number, and the second restoration number are obtained by the receiving end when a frame is lost. The receiving end finds the corresponding two restoration functions in the restoration function library based on the first restoration number and the second restoration number. The two bits of the two-bit write data of the previous frame are input into the two restoration functions respectively to obtain the write data corresponding to the lost frame.
2. The message encoding method for improving frame loss during OTA upgrades according to claim 1, characterized in that: The number system for the write message is hexadecimal.
3. The message encoding method for improving frame loss during OTA upgrades according to claim 1, characterized in that: The verification algorithm mentioned is the CRC algorithm.
4. The message encoding method for improving frame loss during OTA upgrades according to claim 1, characterized in that: The first restoration number is used to restore the most significant bit of the flush message of the lost frame, and the second restoration number is used to restore the least significant bit of the flush message of the lost frame.
5. The message encoding method for improving frame loss during OTA upgrades according to claim 2, characterized in that: The time synchronization number can be set from 0 to F.
6. A method for restoring lost frames during an OTA upgrade process using the message encoding method described in any one of claims 1-5, characterized in that: include, When the current frame's write message is lost, obtain the two-bit write data, the first restore number, and the second restore number from the previous frame's write message of the lost frame; Based on the first and second restore numbers of the previous frame's write message, find the corresponding two restore functions in the preset restore function library; By inputting two bits of the write data from the previous frame into two restoration functions, the write data corresponding to the lost frame can be obtained.
7. The method for restoring lost frames during an OTA upgrade process according to claim 6, characterized in that: The number system for the write message is hexadecimal.
8. The method for restoring lost frames during an OTA upgrade process according to claim 7, characterized in that: The first restoration number is used to restore the most significant bit of the flush message of the lost frame, and the second restoration number is used to restore the least significant bit of the flush message of the lost frame.
9. An OTA upgrade method to prevent frame loss, characterized in that: This method utilizes the frame loss restoration method described in claim 7; specifically, it determines whether frame loss has occurred based on the change in the time synchronization number of adjacent frames, and when frame loss occurs, it locates the lost frame based on the missing time synchronization number, and then executes the frame loss restoration method.
10. A vehicle-mounted intelligent device, characterized in that: When the device undergoes an OTA upgrade and experiences frame drops, the frame drop restoration method described in claim 7 is executed.