Upgrading method and device based on over-the-air downloading technology, equipment, medium and product

By recording the starting position and length of redundant zero values ​​within the differential region and adding feature markers, the problem of large file size and low efficiency caused by redundant zero values ​​in the traditional BSDiff algorithm is solved, achieving efficient compression of differential files and accurate terminal upgrades.

CN121635940APending Publication Date: 2026-03-10CHINA MOBILE M2M +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The traditional BSDiff algorithm has a redundant zero value problem when generating difference files, resulting in a large patch package size and low terminal restoration efficiency. Existing improved solutions have reduced the patch package size to some extent, but still increase server-side overhead and terminal parsing difficulty. Furthermore, the boundary division is prone to errors when zero and non-zero values ​​alternate, affecting the accuracy of the terminal synthesizing new files.

Method used

By statistically recording the starting position and length of redundant zero values ​​within the differential region and adding feature markers, an updated differential region is generated. The differential region is generated based on the byte difference of similar parts, and the zero region range is quickly located on the terminal side through feature markers. Invalid difference superposition is skipped, and lightweight markers are added only for a small number of zero regions, simplifying the differential region generation process.

Benefits of technology

It significantly reduces the amount of data in the differential region, improves the compression and decompression efficiency of differential files, enhances the accuracy and restoration efficiency of the terminal to synthesize new files, and reduces the time consumption of repeated calculations and encoding overhead on the terminal side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635940A_ABST
    Figure CN121635940A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an upgrade method and device based on the over-the-air technology, equipment, a medium and a product, and belongs to the field of terminal upgrade.The method comprises the steps that a second version file and a first version file of a target terminal are obtained; performing difference processing on the second version file and the first version file to obtain a similar part and a difference part; aiming at the similar part, generating a difference region based on a byte difference value of the second version file relative to the first version file, and aiming at the difference part, extracting contents which do not exist in the first version file to generate a newly-added region; counting and recording the initial position and length of the redundant zero value in the differential region, adding a feature mark, and generating an updated differential region; generating a difference file based on the updated difference region, the newly added region and the control region; and sending the differential file to a target terminal based on an over-the-air downloading technology. The terminal synthesis accuracy can be guaranteed while the difference and reduction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of terminal upgrades, and particularly relates to an upgrade method, apparatus, equipment, medium and product based on over-the-air (OTA) download technology. Background Technology

[0002] Mobile terminals undergo multiple system upgrades and feature updates throughout their lifecycle. Over-the-Air (OTA) technology, as a core technology for remote terminal management via mobile communication air interfaces, has become the mainstream choice for terminal upgrades. In OTA differential upgrade scenarios, the BSDiff algorithm is widely used for differential packet creation and upgrade restoration due to its efficient differential capabilities for binary files. As a typical differential update algorithm, the core process of BSDiff consists of two steps: the server runs the BSDiff algorithm to compare the new and old files, locate matching and difference regions, and generate a patch package; the terminal runs the BSPatch algorithm to call the local old file and combine it with the patch package to synthesize a new file, thereby completing the upgrade. However, when generating differential files, the traditional BSDiff algorithm generally suffers from redundant zero values ​​in the differential regions, resulting in large patch package sizes and low terminal restoration efficiency.

[0003] To address this issue, existing improvement solutions propose an optimization strategy of "encoding only non-zero values ​​and defaulting to zero values ​​for unencoded regions." While this reduces the patch package size to some extent, it still has significant limitations: when there are few redundant zero values ​​in the differential region, the feature encoding logic for non-zero values ​​actually increases server-side overhead and terminal parsing difficulty; when zero and non-zero value segments appear alternately, the boundary delineation of the "default zero value" is prone to errors, directly affecting the accuracy of the terminal synthesizing new files.

[0004] Therefore, how to optimize the redundant zero-value processing logic of the BSDiff algorithm to improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis has become a key technical problem that urgently needs to be solved in the current OTA differential upgrade field. Summary of the Invention

[0005] This invention provides an upgrade method, apparatus, device, medium, and product based on over-the-air (OTA) download technology, which can improve differential and reduction efficiency while ensuring the accuracy of terminal synthesis.

[0006] In a first aspect, embodiments of the present invention provide an upgrade method based on over-the-air (OTA) download technology, applied to a server, the method comprising: Obtain the second version file and the first version file of the target terminal. The target terminal is the terminal to be upgraded, and the version of the second version file is higher than that of the first version file. Perform a difference analysis on the second version file and the first version file to obtain the similar and different parts; For similar parts, a difference region is generated based on the byte difference between the second version file and the first version file; and for the differences, content that does not exist in the first version file is extracted to generate a new region. The starting positions and lengths of redundant zeros within the difference region are statistically recorded and feature markers are added to generate an updated difference region. Generate a difference file based on the updated difference region, the newly added region, and the control region; The differential file is sent to the target terminal using over-the-air download technology, enabling the target terminal to upgrade based on the differential file and its own stored first-version file.

[0007] In some embodiments of the present invention, the starting positions and lengths of redundant zero values ​​within the difference region are statistically recorded and feature markers are added to generate an updated difference region, including: Step A: Set the control pointer p to point to the starting address of the differential region; Step B: Determine whether the value scanned by pointer p is 0, and obtain the first judgment result; Step C: If the first judgment result is yes, set the length of the current zero region to 0, save the first address currently pointed to by pointer p, increment the length of the current zero region by 1, and move pointer p one position to the right. Step D: Determine whether the value scanned by pointer p is 0, and obtain the second judgment result; Step E: If the second judgment result is yes, move the control pointer p one position to the right, increment the length of the current zero zone by 1, and return to execute step D; Step F: If the second judgment result is negative, save the first address and the current length of the zero zone; Step G: If the first judgment result is negative, determine whether pointer p scans the end of the difference region to obtain the third judgment result; Step H: If the result of the third judgment is negative, move the control pointer p one position to the right and return to step B. Step I: If the third judgment result is yes, obtain the processed data and generate the updated difference region based on the processed data.

[0008] In some embodiments of the present invention, differential processing is performed on the second version file and the first version file to obtain similar and different portions, including: After sorting all the strings in the first version file according to lexicographical order using the first preset algorithm, suffix data is generated. The second preset algorithm is used to find the longest matching string between the second version file and the first version file in the suffix data, and the similar part and the difference part are obtained.

[0009] In some embodiments of the present invention, the first preset algorithm is a suffix sorting algorithm, and the second preset algorithm is a binary search algorithm.

[0010] Secondly, embodiments of the present invention provide an upgrade method based on over-the-air (OTA) technology, applied to a terminal device, the method comprising: Receive differential files sent by the server using over-the-air download technology; The upgrade is based on the differential file and the first version file stored on the terminal device itself; The differential file is generated by the server in the following way: The server obtains the second version file and the first version file from the terminal device, where the terminal device is to be upgraded, and the version of the second version file is higher than that of the first version file; The server performs differential processing on the second version file and the first version file to obtain similar parts and different parts; For the similar parts, the server generates a differential region based on the byte difference between the second version file and the first version file, and for the different parts, it extracts content that does not exist in the first version file to generate a new region; The server statistically records the starting position and length of redundant zero values ​​in the differential region and adds feature markers to generate an updated differential region; The server generates a differential file based on the updated differential region, the new region, and the control region.

[0011] In some embodiments of the present invention, the upgrade is performed based on the differential file and the first version file stored by the terminal device itself, including: Parse the difference file to obtain the updated difference region, the newly added region, and the control region; Obtain the first version file; Based on the control region, the matching region in the first version file is located, and the matching region is copied and the difference is corrected by combining the updated difference region to generate the basic fragment of the second version file. Based on the control region, the non-matching region in the first version file is located, and the content in the newly added region is inserted into the specified position of the base fragment to complete the synthesis of the second version file, thus obtaining the second version file; Upgrade the terminal device based on the second version of the document.

[0012] Thirdly, embodiments of the present invention provide an upgrade device based on over-the-air (OTA) download technology, applied to a server, the device comprising: The acquisition module is used to acquire the second version file and the first version file of the target terminal. The target terminal is the terminal to be upgraded, and the version of the second version file is higher than that of the first version file. The difference module is used to perform difference processing on the second version file and the first version file to obtain the similar and different parts; The generation module is used to generate a difference region based on the byte difference between the second version file and the first version file for similar parts, and to extract content that does not exist in the first version file to generate a new region for the difference parts. An add module is used to statistically record the starting position and length of redundant zero values ​​within the difference region and add feature markers to generate an updated difference region; The generation module is also used to generate differential files based on the updated differential region, the newly added region, and the control region; The sending module is used to send the differential file to the target terminal based on over-the-air download technology, so that the target terminal can upgrade based on the differential file and its own stored first version file.

[0013] In some embodiments of the present invention, a module is added, specifically for: Step A: Set the control pointer p to point to the starting address of the differential region; Step B: Determine whether the value scanned by pointer p is 0, and obtain the first judgment result; Step C: If the first judgment result is yes, set the length of the current zero region to 0, save the first address currently pointed to by pointer p, increment the length of the current zero region by 1, and move pointer p one position to the right. Step D: Determine whether the value scanned by pointer p is 0, and obtain the second judgment result; Step E: If the second judgment result is yes, move the control pointer p one position to the right, increment the length of the current zero zone by 1, and return to execute step D; Step F: If the second judgment result is negative, save the first address and the current length of the zero zone; Step G: If the first judgment result is negative, determine whether pointer p scans the end of the difference region to obtain the third judgment result; Step H: If the result of the third judgment is negative, move the control pointer p one position to the right and return to step B. Step I: If the third judgment result is yes, obtain the processed data and generate the updated difference region based on the processed data.

[0014] In some embodiments of the present invention, the differential module includes: The generation unit is used to sort all the strings in the first version file according to the lexicographical order rule using a first preset algorithm, and then generate suffix data. The search unit is used to find the longest matching string between the second version file and the first version file in the suffix data using a second preset algorithm, and to obtain the similar part and the difference part.

[0015] In some embodiments of the present invention, the first preset algorithm is a suffix sorting algorithm, and the second preset algorithm is a binary search algorithm.

[0016] Thirdly, embodiments of the present invention provide an upgrade device based on over-the-air (OTA) download technology, applied to a terminal device, the device comprising: The receiving module is used to receive differential files sent by the server using over-the-air download technology; The upgrade module is used to perform upgrades based on the differential file and the first version file stored on the terminal device itself. The differential file is generated by the server in the following way: The server obtains the second version file and the first version file from the terminal device, where the terminal device is to be upgraded, and the version of the second version file is higher than that of the first version file; The server performs differential processing on the second version file and the first version file to obtain similar parts and different parts; For the similar parts, the server generates a differential region based on the byte difference between the second version file and the first version file, and for the different parts, it extracts content that does not exist in the first version file to generate a new region; The server statistically records the starting position and length of redundant zero values ​​in the differential region and adds feature markers to generate an updated differential region; The server generates a differential file based on the updated differential region, the new region, and the control region.

[0017] In some embodiments of the present invention, the upgrade module includes: The parsing unit is used to parse the difference file to obtain the updated difference region, the newly added region, and the control region; The acquisition unit is used to acquire the first version file; The copying unit is used to locate the matching region in the first version file based on the control region, and perform copying and difference correction operations on the matching region in combination with the updated difference region to generate the basic fragment of the second version file. The insertion unit is used to locate the non-matching region in the first version file based on the control region, insert the content in the newly added region into the specified position of the base fragment, complete the synthesis of the second version file, and obtain the second version file; The upgrade unit is used to upgrade terminal devices based on the second version file.

[0018] Fifthly, embodiments of the present invention provide an upgrade device based on over-the-air (OTA) technology, the device comprising: a processor, and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement an upgrade method based on OTA technology as described in either the first or second aspect.

[0019] In a sixth aspect, embodiments of the present invention provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement an upgrade method based on over-the-air technology, as described in either the first or second aspect.

[0020] In a seventh aspect, embodiments of the present invention provide a computer program product, which includes a computer program that, when executed by a processor, implements an upgrade method based on over-the-air technology, as described in either the first or second aspect.

[0021] The upgrade method, apparatus, device, medium, and product based on over-the-air (OTA) technology provided in this invention generate a differential region based on the byte differences of similar parts, and statistically record the starting position and length of redundant zero values ​​in the region and add feature markers. This allows the terminal to quickly locate the zero region range and skip invalid difference superposition directly based on the feature markers during restoration, unlike existing technologies where redundant zero values ​​are numerous, thus significantly reducing the time spent on repetitive calculations on the terminal side. Furthermore, in scenarios with fewer redundant zero values, the complex encoding process for a large number of non-zero difference regions to accommodate a small number of zero values ​​is eliminated, as in existing technologies. Only a lightweight marker is added to a small number of zero regions, effectively simplifying the generation process of the differential region and reducing encoding overhead. Therefore, the upgrade method, apparatus, device, medium, and product based on OTA technology provided in this invention can improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a schematic diagram of the first process of an upgrade method based on over-the-air (OTA) download technology provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the process for updating the differential region in the upgrade method based on over-the-air download technology provided in an embodiment of the present invention; Figure 3This is a schematic diagram of a second process for an upgrade method based on over-the-air (OTA) download technology provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of a first structure of an upgrade device based on over-the-air download technology provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a second structure of an upgrade device based on over-the-air download technology provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an upgrade device based on over-the-air (OTA) download technology provided in an embodiment of the present invention. Detailed Implementation

[0024] The features and exemplary embodiments of various aspects of the present invention will now be described in detail. To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely intended to explain the present invention and not to limit the present invention. For those skilled in the art, the present invention can be practiced without some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present invention by illustrating examples of the invention.

[0025] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0026] Mobile terminals undergo multiple system upgrades and feature updates throughout their lifecycle. Over-the-Air (OTA) technology, as a core technology for remote terminal management via mobile communication air interfaces, has become the mainstream choice for terminal upgrades. In OTA differential upgrade scenarios, the BSDiff algorithm is widely used for differential packet creation and upgrade restoration due to its efficient differential capabilities for binary files. As a typical differential update algorithm, the core process of BSDiff consists of two steps: the server runs the BSDiff algorithm to compare the new and old files, locate matching and difference regions, and generate a patch package; the terminal runs the BSPatch algorithm to call the local old file and combine it with the patch package to synthesize a new file, thereby completing the upgrade. However, when generating differential files, the traditional BSDiff algorithm generally suffers from redundant zero values ​​in the differential regions, resulting in large patch package sizes and low terminal restoration efficiency.

[0027] To address this issue, existing improvement solutions propose an optimization strategy of "encoding only non-zero values ​​and defaulting to zero values ​​for unencoded regions." While this reduces the patch package size to some extent, it still has significant limitations: when there are few redundant zero values ​​in the differential region, the feature encoding logic for non-zero values ​​actually increases server-side overhead and terminal parsing difficulty; when zero and non-zero value segments appear alternately, the boundary delineation of the "default zero value" is prone to errors, directly affecting the accuracy of the terminal synthesizing new files.

[0028] For example, suppose the difference between the new file and the old file is [0, 0, 0, 5, 3, 0, 0, 7, 0, 0, 0, 0]. Using the existing improved encoding scheme, assuming the feature byte is 0xFF, and the encoding rule is feature byte + relative position + value, the final encoded data would be: 0xFF 03 05 | 0xFF 04 03 | 0xFF 07 07. Here, 0xFF indicates that the following information is non-zero. 03 05 means "byte value at index 3 is 5", 04 03 means "byte value at index 4 is 3", and 07 07 means "byte value at index 7 is 7". Unencoded areas (indexes 0-2, 5-6, 8-11) are zero by default and do not need to be stored.

[0029] Applicable scenarios and limitations: The existing improved solution is suitable for situations where the proportion of zero values ​​in the difference region is extremely high (e.g., more than 90%), in which case there are few non-zero values ​​to encode and the amount of data is small; however, if the proportion of non-zero values ​​is high (e.g., zero values ​​account for 75% and non-zero values ​​account for 25% in the example), it is necessary to judge and encode all non-zero values ​​one by one, which is cumbersome; if the proportion of non-zero values ​​reaches more than 50%, the coding workload will increase sharply and the efficiency will decrease significantly.

[0030] Therefore, how to optimize the redundant zero-value processing logic of the BSDiff algorithm to improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis has become a key technical problem that urgently needs to be solved in the current OTA differential upgrade field.

[0031] The following section first introduces the upgrade method based on over-the-air (OTA) technology provided in the embodiments of the present invention. The upgrade method is applied to a server.

[0032] Figure 1 This is a schematic diagram of the first process of an upgrade method based on over-the-air (OTA) download technology provided in an embodiment of the present invention. Figure 1 As shown, the upgrade method may include the following steps: S110, Obtain the second version file and the first version file of the target terminal. The target terminal is the terminal to be upgraded, and the version of the second version file is higher than that of the first version file. S120, perform differential processing on the second version file and the first version file to obtain the similar parts and the differences; S130, For the similar parts, generate a difference region based on the byte difference between the second version file and the first version file, and for the difference parts, extract the content that does not exist in the first version file to generate a new region; S140: Statistically record the starting position and length of redundant zero values ​​in the difference region and add feature markers to generate the updated difference region; S150 generates a differential file based on the updated differential region, the newly added region, and the control region; S160 sends a differential file to the target terminal using over-the-air download technology, enabling the target terminal to upgrade based on the differential file and its own stored first-version file.

[0033] The upgrade method based on over-the-air (OTA) technology provided in this invention generates a differential region based on the byte differences of similar parts, and statistically records the starting position and length of redundant zero values ​​in the region and adds feature markers. This allows the terminal to quickly locate the zero region range and skip invalid difference superpositions directly based on the feature markers during restoration, unlike existing technologies where redundant zero values ​​are checked byte by byte, significantly reducing the time spent on repetitive calculations on the terminal side. Furthermore, in scenarios with fewer redundant zero values, the complex encoding process for a large number of non-zero difference regions to accommodate a small number of zero values ​​is eliminated, as in existing technologies. Only a lightweight marker is added to a small number of zero regions, effectively simplifying the generation process of the differential region and reducing encoding overhead. Therefore, the upgrade method, apparatus, device, medium, and product based on OTA technology provided in this invention can improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis.

[0034] Regarding the above S110, the first version file can be an old version file, the second version file can be a new version file, and the target terminal can be a mobile phone, computer, vehicle, or other devices.

[0035] Regarding S120 above, in some embodiments of the present invention, differential processing is performed on the second version file and the first version file to obtain similar parts and different parts, including: After sorting all the strings in the first version file according to lexicographical order using the first preset algorithm, suffix data is generated. The second preset algorithm is used to find the longest matching string between the second version file and the first version file in the suffix data, and the similar part and the difference part are obtained.

[0036] Specifically, the first preset algorithm can be a suffix sorting algorithm, and the second preset algorithm can be a binary search algorithm.

[0037] The aforementioned "all strings" refers to the "all suffix sequences" (continuous data from each byte position to the end of the file) of the old version file. After being sorted lexicographically using a suffix sorting algorithm, it forms suffix data containing "sorted suffixes + original starting index". This transforms unordered file fragments into an ordered and searchable structure, laying the foundation for fast matching fragment searches and avoiding the inefficiency of brute-force traversal. Based on the ordered suffix data, a binary search algorithm is used to retrieve the longest overlapping fragment between the new and old versions of the file. The overlapping fragment is the similar part, and the unmatched fragment in the new version file is the difference part. This can quickly locate the longest match to maximize the reuse of old version file data, reduce the size of the difference part, and significantly improve search efficiency. Compared with brute-force matching, it is more suitable for large file difference scenarios.

[0038] Regarding the above S130, for the similar parts, a difference region is generated based on the byte difference between the second version file and the first version file, and for the difference parts, content that does not exist in the first version file is extracted to generate a new region.

[0039] The similar part consists of the basic segments that have been matched between the old and new files. For the locally modified bytes in this segment, the byte difference between the new version and the old version (i.e., "modified data - original data") is calculated. The set of these differences constitutes the difference region, corresponding to the diffstring. There is no need to repeatedly store the complete similar segments; only the byte differences of locally modified bytes are retained, which significantly reduces redundant data in the patch package and provides a clear processing object for subsequent zero-value optimization.

[0040] The difference section consists of segments where there is no match between the old and new files. From this, content unique to the new version and completely absent from the old version is extracted and grouped into new regions, corresponding to the extrastring. Clearly defining the boundary between modifications and new content avoids data confusion. During restoration, control words can be used to precisely insert new content, ensuring the accuracy of the new file synthesis while improving the efficiency of data parsing and restoration.

[0041] Regarding S140 above, in some embodiments of the present invention, the starting position and length of redundant zero values ​​within the difference region are statistically recorded and feature markers are added to generate an updated difference region, including: Step A: Set the control pointer p to point to the starting address of the differential region; Step B: Determine whether the value scanned by pointer p is 0, and obtain the first judgment result; Step C: If the first judgment result is yes, set the length of the current zero region to 0, save the first address currently pointed to by pointer p, increment the length of the current zero region by 1, and move pointer p one position to the right. Step D: Determine whether the value scanned by pointer p is 0, and obtain the second judgment result; Step E: If the second judgment result is yes, move the control pointer p one position to the right, increment the length of the current zero zone by 1, and return to execute step D; Step F: If the second judgment result is negative, save the first address and the current length of the zero zone; Step G: If the first judgment result is negative, determine whether pointer p scans the end of the difference region to obtain the third judgment result; Step H: If the result of the third judgment is negative, move the control pointer p one position to the right and return to step B. Step I: If the third judgment result is yes, obtain the processed data and generate the updated difference region based on the processed data.

[0042] This invention provides a precise processing flow for redundant zero values ​​in the differential region, i.e., the diffstring: The differential region is scanned byte-by-byte using a pointer to identify and record all consecutive zero-value regions. The pointer starts from the beginning address of the region; upon encountering a zero value, the starting address of the zero region is immediately saved, and the scan continues until a non-zero value appears, simultaneously accumulating and recording the zero region length. If a non-zero value is encountered, the original non-zero value is retained and skipped, repeating the scan until the end of the region. Finally, the combined data of "feature marker + zero region starting address + zero region length" is integrated with the unprocessed non-zero value data to form the updated differential region.

[0043] For example: Suppose the difference between the new file and the old file is [0, 0, 0, 5, 3, 0, 0, 7, 0, 0, 0, 0]. According to the scheme of this invention, the differential region is formed. Assuming the zero zone identifier is 0x00, the encoding rule is zero zone identifier + starting index + length, and non-zero values ​​are directly retained. Then the final encoded data is 0x00 00 03 | 05 03 | 0x00 05 02 | 07 | 0x00 08 04.

[0044] Among them, 0x00 00 03: the zero zone starts at index 0, with a length of 3, corresponding to indices 0-2; 05 03: non-zero values ​​are directly retained, corresponding to indices 3-4; 0x00 05 02: the zero zone starts at index 5, with a length of 2, corresponding to indices 5-6; 07: non-zero values ​​are directly retained, corresponding to index 7; 0x00 08 04: the zero zone starts at index 8, with a length of 4, corresponding to indices 8-11.

[0045] Applicable scenarios and advantages: Suitable for all scenarios, with both many and few zero values: As in the example above, when there are many zero values, only the "start + length" of 3 zero zones needs to be recorded, and non-zero values ​​are directly retained, making the operation simpler than existing technologies; when there are few zero values, assuming the differential region has only 1 zero zone with a length of 2 and 8 non-zero values, only the information of 1 zero zone needs to be recorded, and non-zero values ​​do not need to be encoded one by one, avoiding the cumbersome operation of "judging non-zero values ​​one by one" in existing technologies.

[0046] Key advantages: No need to traverse all bytes for "zero / non-zero judgment", only the zero area is processed, fewer operation steps, and smaller amount of encoded data.

[0047] Based on the above processing of the differential region, on the one hand, it can explicitly record the key information of the zero region, completely solve the problem of the fuzzy boundary of the "default zero value" in the existing technology, avoid the boundary division error in the scenario of alternating zero and non-zero values, and greatly improve the accuracy of the terminal to synthesize new files; on the other hand, it does not need to store the redundant zero values ​​in the differential region itself, but only records them by "start address + length", and realizes the rapid identification of the zero region by combining feature tags, which significantly reduces the amount of data in the differential region, further compresses the patch package size, and improves the compression efficiency and decompression efficiency of the differential file; furthermore, during decoding, the zero region information can be directly located by feature tags, without the need for full initialization and one-by-one replacement operations, only needing to fill the zero value and splice the non-zero value according to "start + length", which greatly reduces the decoding calculation overhead and improves the restoration efficiency.

[0048] Figure 2 This is a schematic diagram illustrating the process of updating the differential region in the upgrade method based on over-the-air (OTA) download technology provided in an embodiment of the present invention. Figure 2 As shown, generating the updated difference region may include the following steps: S210: The control pointer p points to the starting address of the differential region; S220: Determine whether the value scanned by pointer p is 0, and obtain the first judgment result; S230: If the first judgment result is determined to be yes, set the length of the current zero region to 0, save the first address currently pointed to by pointer p, control the length of the current zero region to be incremented by 1, and control pointer p to move one position to the right; S240: Determine whether the value scanned by pointer p is 0, and obtain the second judgment result; S250: If the second judgment result is determined to be yes, the control pointer p moves one position to the right, the length of the current zero zone is incremented by 1, and then S240 is executed. S260: If the second judgment result is negative, save the first address and the current length of the zero zone; S270: If the first judgment result is negative, determine whether pointer p scans the end of the difference region to obtain the third judgment result; S280: If the result of the third judgment is negative, the control pointer p moves one position to the right and returns to step B. S290: If the third judgment result is determined to be yes, the processed data is obtained, and an updated difference region is generated based on the processed data.

[0049] Regarding the aforementioned S150, a differential file is generated based on the updated differential region, the newly added region, and the control region. Specifically, the updated differential region, i.e., the diff string with optimized redundant zero values, the newly added region, i.e., the extra string, and the control region (containing the control words for copy / insert instructions) are the core components of the differential file. In addition, there is a header region. The process of generating a differential file involves structurally integrating the four components according to a preset format. First, the header region is encapsulated, then the control region is encapsulated to ensure the instruction priority during restoration. Then, the updated differential region and the newly added region are concatenated, and the encapsulated file is compressed to finally form a complete data packet in a unified format that can be parsed by the client.

[0050] Regarding the aforementioned S160, the differential file is sent to the target terminal based on over-the-air (OTA) technology, enabling the target terminal to upgrade based on the differential file and its own stored first-version file. Specifically, the structured and encapsulated differential file (including header, control area, optimized differential partition, and new addition area) is sent to the target terminal via OTA technology. After receiving the file, the terminal can first verify the legality and integrity through the header, and then, based on the control area instructions and combined with its own stored old version, parse the modification differences in the differential partition, insert the purely new content in the new addition area, and finally synthesize a complete new version file, and complete the device upgrade based on the new version file.

[0051] Figure 3 This is a schematic diagram of a second process for an upgrade method based on over-the-air (OTA) download technology provided in an embodiment of the present invention. For example... Figure 3 As shown, for the terminal device side, the upgrade method based on over-the-air (OTA) download technology provided in this embodiment of the invention includes the following steps: S310 receives differential files sent by the server using over-the-air download technology; S320 upgrades based on differential files and the first version files stored on the terminal device itself; The differential file is generated by the server in the following way: The server obtains the second version file and the first version file from the terminal device, where the terminal device is to be upgraded, and the version of the second version file is higher than that of the first version file; The server performs differential processing on the second version file and the first version file to obtain similar parts and different parts; For the similar parts, the server generates a differential region based on the byte difference between the second version file and the first version file, and for the different parts, it extracts content that does not exist in the first version file to generate a new region; The server statistically records the starting position and length of redundant zero values ​​in the differential region and adds feature markers to generate an updated differential region; The server generates a differential file based on the updated differential region, the new region, and the control region.

[0052] The upgrade method based on over-the-air (OTA) technology provided in this invention involves a server generating a differential region based on the byte differences of similar parts, statistically recording the starting position and length of redundant zero values, and adding feature markers. This allows the terminal to quickly locate the zero-zone range and skip invalid difference superpositions directly based on the feature markers during restoration, unlike existing technologies where redundant zero values ​​are checked byte-by-byte. This significantly reduces the time spent on repetitive calculations on the terminal side. Furthermore, in scenarios with fewer redundant zero values, the complex encoding process for a large number of non-zero difference regions to accommodate a small number of zero values ​​is eliminated. Only a lightweight marker is added to a small number of zero regions, effectively simplifying the generation process of the differential region and reducing encoding overhead. Therefore, the upgrade method, apparatus, device, medium, and product based on OTA technology provided in this invention can improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis.

[0053] In some embodiments of the present invention, regarding the above-described S320, the upgrade based on the differential file and the first version file stored by the terminal device itself includes: Parse the difference file to obtain the updated difference region, the newly added region, and the control region; Obtain the first version file; Based on the control region, the matching region in the first version file is located, and the matching region is copied and the difference is corrected by combining the updated difference region to generate the basic fragment of the second version file. Based on the control region, the non-matching region in the first version file is located, and the content in the newly added region is inserted into the specified position of the base fragment to complete the synthesis of the second version file, thus obtaining the second version file; Upgrade the terminal device based on the second version of the document.

[0054] The terminal device first parses the received differential file, extracting the optimized differential region, the newly added region, and the control region containing operation instructions. Next, it retrieves the old version file stored locally on the terminal. Then, based on the instructions in the control region, it locates the matching region in the old version file that overlaps with the new version file. By copying the data in this region and combining it with the difference correction from the differential region (completing local modifications), it generates the basic fragment of the new version file. Then, according to the guidance of the control region, it finds the non-matching regions in the old file that do not have corresponding content, and precisely inserts the content of the newly added region into the specified position of the basic fragment, completing the complete synthesis of the new version file. Finally, it replaces the old version file with the synthesized new version file, thus upgrading the terminal device.

[0055] This invention, by recording the starting position and length of redundant zero values ​​within the differential region and adding feature markers, instead of storing the zero values ​​themselves or processing non-zero values ​​one by one, significantly reduces redundant data in the differential region, substantially compresses the patch packet size, and lowers the bandwidth consumption and terminal storage overhead of OTA transmission, making it suitable for resource-constrained scenarios of IoT devices. Furthermore, during decoding, there is no need to fully traverse and initialize or replace zero values; instead, the zero region is quickly located and filled using feature markers. Combined with the logic of directly reusing non-zero values, this significantly reduces terminal computing power consumption and improves the efficiency of differential parsing and new file synthesis. Simultaneously, explicitly recording the zero region boundaries avoids boundary division errors caused by "default zero values." Even if zero and non-zero values ​​alternate, differential data can be accurately restored, significantly improving the accuracy and stability of OTA upgrades and reducing the risk of upgrade failure due to data deviations.

[0056] Figure 4 This is a schematic diagram of a first structure of an upgrade device based on over-the-air download technology provided in an embodiment of the present invention, as shown below. Figure 4 As shown in the figure, the upgrade device based on over-the-air (OTA) download technology provided in this embodiment of the invention is applied to a server, and the device includes: The acquisition module 401 is used to acquire the second version file and the first version file of the target terminal. The target terminal is the terminal to be upgraded, and the version of the second version file is higher than that of the first version file. The difference module 402 is used to perform difference processing on the second version file and the first version file to obtain the similar parts and the differences. The generation module 403 is used to generate a difference region based on the byte difference between the second version file and the first version file for similar parts, and to extract content that does not exist in the first version file to generate a new region for the difference parts. Add module 404 to statistically record the starting position and length of redundant zero values ​​in the difference region and add feature markers to generate the updated difference region; The generation module 403 is also used to generate a differential file based on the updated differential region, the newly added region, and the control region; The sending module 405 is used to send the differential file to the target terminal based on over-the-air download technology, so that the target terminal can upgrade based on the differential file and its own stored first version file.

[0057] In some embodiments of the present invention, module 404 is added, specifically for: Step A: Set the control pointer p to point to the starting address of the differential region; Step B: Determine whether the value scanned by pointer p is 0, and obtain the first judgment result; Step C: If the first judgment result is yes, set the length of the current zero region to 0, save the first address currently pointed to by pointer p, increment the length of the current zero region by 1, and move pointer p one position to the right. Step D: Determine whether the value scanned by pointer p is 0, and obtain the second judgment result; Step E: If the second judgment result is yes, move the control pointer p one position to the right, increment the length of the current zero zone by 1, and return to execute step D; Step F: If the second judgment result is negative, save the first address and the current length of the zero zone; Step G: If the first judgment result is negative, determine whether pointer p scans the end of the difference region to obtain the third judgment result; Step H: If the result of the third judgment is negative, move the control pointer p one position to the right and return to step B. Step I: If the third judgment result is yes, obtain the processed data and generate the updated difference region based on the processed data.

[0058] In some embodiments of the present invention, the differential module 402 includes: The generation unit is used to sort all the strings in the first version file according to the lexicographical order rule using a first preset algorithm, and then generate suffix data. The search unit is used to find the longest matching string between the second version file and the first version file in the suffix data using a second preset algorithm, and to obtain the similar part and the difference part.

[0059] In some embodiments of the present invention, the first preset algorithm is a suffix sorting algorithm, and the second preset algorithm is a binary search algorithm.

[0060] The upgrade device based on over-the-air (OTA) technology provided in this invention involves a server generating a differential region based on the byte differences of similar parts, statistically recording the starting position and length of redundant zero values, and adding feature markers. This allows the terminal to quickly locate the zero-zone range and skip invalid difference superpositions directly based on the feature markers during restoration, unlike existing technologies where redundant zero values ​​are checked byte-by-byte. This significantly reduces the time spent on repetitive calculations on the terminal side. Furthermore, in scenarios with fewer redundant zero values, the complex encoding process for a large number of non-zero difference regions to accommodate a small number of zero values ​​is eliminated. Only a lightweight marker is added to a small number of zero regions, effectively simplifying the generation process of the differential region and reducing encoding overhead. Therefore, the upgrade method, device, equipment, medium, and product based on OTA technology provided in this invention can improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis.

[0061] Figure 5 This is a schematic diagram of a second structure of the upgrade device based on over-the-air download technology provided in an embodiment of the present invention, as shown below. Figure 5 As shown in the figure, the upgrade device based on over-the-air (OTA) download technology provided in this embodiment of the invention is applied to a terminal device, and the device includes: The receiving module 501 is used to receive differential files sent by the server based on over-the-air download technology; Upgrade module 502 is used to perform upgrades based on the differential file and the first version file stored in the terminal device itself; The differential file is generated by the server in the following way: The server obtains the second version file and the first version file from the terminal device, where the terminal device is to be upgraded, and the version of the second version file is higher than that of the first version file; The server performs differential processing on the second version file and the first version file to obtain similar parts and different parts; For the similar parts, the server generates a differential region based on the byte difference between the second version file and the first version file, and for the different parts, it extracts content that does not exist in the first version file to generate a new region; The server statistically records the starting position and length of redundant zero values ​​in the differential region and adds feature markers to generate an updated differential region; The server generates a differential file based on the updated differential region, the new region, and the control region.

[0062] In some embodiments of the present invention, the upgrade module 502 includes: The parsing unit is used to parse the difference file to obtain the updated difference region, the newly added region, and the control region; The acquisition unit is used to acquire the first version file; The copying unit is used to locate the matching region in the first version file based on the control region, and perform copying and difference correction operations on the matching region in combination with the updated difference region to generate the basic fragment of the second version file. The insertion unit is used to locate the non-matching region in the first version file based on the control region, insert the content in the newly added region into the specified position of the base fragment, complete the synthesis of the second version file, and obtain the second version file; The upgrade unit is used to upgrade terminal devices based on the second version file.

[0063] The upgrade device based on over-the-air (OTA) technology provided in this invention involves a server generating a differential region based on the byte differences of similar parts, statistically recording the starting position and length of redundant zero values, and adding feature markers. This allows the terminal to quickly locate the zero-zone range and skip invalid difference superpositions directly based on the feature markers during restoration, unlike existing technologies where redundant zero values ​​are checked byte-by-byte. This significantly reduces the time spent on repetitive calculations on the terminal side. Furthermore, in scenarios with fewer redundant zero values, the complex encoding process for a large number of non-zero difference regions to accommodate a small number of zero values ​​is eliminated. Only a lightweight marker is added to a small number of zero regions, effectively simplifying the generation process of the differential region and reducing encoding overhead. Therefore, the upgrade method, device, equipment, medium, and product based on OTA technology provided in this invention can improve the efficiency of differential and restoration while ensuring the accuracy of terminal synthesis.

[0064] Figure 6 This is a schematic diagram of the structure of an upgrade device based on over-the-air (OTA) download technology provided in an embodiment of the present invention.

[0065] An upgrade device based on over-the-air (OTA) technology may include a processor 601 and a memory 602 storing computer program instructions.

[0066] Specifically, the processor 601 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.

[0067] Memory 602 may include mass storage for data or instructions. For example, and not limitingly, memory 602 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one instance, memory 602 may include removable or non-removable (or fixed) media, or memory 602 may be non-volatile solid-state memory. Memory 602 may be internal or external to the integrated gateway disaster recovery device.

[0068] In one instance, memory 602 may be read-only memory (ROM). In one instance, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0069] Memory 602 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.

[0070] The processor 601 reads and executes computer program instructions stored in the memory 602 to achieve... Figures 1 to 3 The upgrade method based on over-the-air (OTA) download technology in the illustrated embodiment.

[0071] In one example, the upgrade device based on over-the-air (OTA) technology may also include a communication interface 603 and a bus 604. For example, Figure 6 As shown, the processor 601, memory 602, and communication interface 603 are connected through bus 604 and complete communication with each other.

[0072] The communication interface 603 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of the present invention.

[0073] Bus 604 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 304 may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.

[0074] This upgrade device, based on over-the-air download technology, can achieve integration Figures 1 to 3 The upgrade method described is based on over-the-air (OTA) download technology.

[0075] Furthermore, in conjunction with the upgrade method based on over-the-air (OTA) technology in the above embodiments, this invention can be implemented using a computer storage medium. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the OTA-based upgrade methods described in the above embodiments.

[0076] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the upgrade methods based on over-the-air (OTA) technology described in the above embodiments.

[0077] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0078] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memory (ROM), flash memory, erasable read-only memory (EROM), floppy disks, compact disc read-only memory (CD-ROM), optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0079] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0080] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0081] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.

Claims

1. An upgrade method based on over-the-air download technology, characterized in that, Applied to a server, the method comprises: obtaining a first version file and a second version file of a target terminal, the target terminal being a terminal to be upgraded, the second version file being higher than the first version file; differentially processing the second version file and the first version file to obtain a similar part and a difference part; for the similar part, generating a differential area based on the byte difference value of the second version file relative to the first version file, and for the difference part, extracting content not existing in the first version file to generate an added area; statistically recording the starting position and length of redundant zero values in the differential area and adding a feature mark to generate an updated differential area; generating a differential file based on the updated differential area, the added area and a control area; sending the differential file to the target terminal based on over-the-air download technology, so that the target terminal upgrades based on the differential file and the first version file stored by itself.

2. The upgrade method of claim 1, wherein, The statistical recording of the starting position and length of redundant zero values in the differential area and the addition of a feature mark to generate an updated differential area comprise: Step A: controlling a pointer p to point to the first address of the differential area; Step B: determining whether the value scanned by the pointer p is 0 to obtain a first determination result; Step C: in the case where the first determination result is yes, setting the length of the current zero area to 0, saving the first address currently pointed to by the pointer p, controlling the length of the current zero area to be added by 1, and controlling the pointer p to move one bit backward; Step D: determining whether the value scanned by the pointer p is 0 to obtain a second determination result; Step E: in the case where the second determination result is yes, controlling the pointer p to move one bit backward and controlling the length of the current zero area to be added by 1, and returning to Step D; Step F: in the case where the second determination result is no, saving the first address and the length of the current zero area; Step G: in the case where the first determination result is no, determining whether the pointer p scans the end of the differential area to obtain a third determination result; Step H: in the case where the third determination result is no, controlling the pointer p to move one bit backward and returning to Step B; Step I: in the case where the third determination result is yes, obtaining processed data and generating an updated differential area based on the processed data.

3. The upgrading method according to claim 1 or 2, characterized by, The differential processing of the second version file and the first version file to obtain a similar part and a difference part comprises: generating suffix data by sorting all strings in the first version file according to a lexicographic rule through a first preset algorithm; finding the longest matching string between the second version file and the first version file in the suffix data through a second preset algorithm to obtain the similar part and the difference part.

4. The upgrade method of claim 3, wherein, The first preset algorithm is a suffix sorting algorithm, and the second preset algorithm is a binary search algorithm.

5. An upgrade method based on over-the-air download technology, characterized by, Applied to a terminal device, the method comprises: receiving a differential file sent by a server based on over-the-air download technology; upgrade based on the differential file and the first version file stored by the terminal device itself; The differential file is generated by the server in the following manner: the server acquires a second version file of the terminal device and the first version file, the terminal device being a terminal to be upgraded, the second version file being of a higher version than the first version file; the server performs differential processing on the second version file and the first version file to obtain a similar part and a difference part; the server generates a differential region based on a byte difference value of the second version file relative to the first version file for the similar part and extracts content not present in the first version file to generate an added region for the difference part; the server records and adds a feature mark to a start position and a length of redundant zero values in the differential region, and generates an updated differential region; and the server generates a differential file based on the updated differential region, the added region and a control region.

6. The upgrade method of claim 5, wherein, The upgrade based on the differential file and the first version file stored by the terminal device itself comprises: parsing the differential file to obtain the updated differential region, the added region and the control region; acquiring the first version file; locating a matching region in the first version file based on the control region, performing a copy operation and a difference correction operation on the matching region in combination with the updated differential region to generate a base segment of the second version file; locating a non-matching region in the first version file based on the control region, inserting content in the added region into a specified position of the base segment to complete synthesis of the second version file, and obtaining the second version file; upgrading the terminal device based on the second version file.

7. An upgrading apparatus based on over-the-air download technology, characterized by comprising: The apparatus applied to a server comprises: an acquisition module configured to acquire a second version file and a first version file of a target terminal, the target terminal being a terminal to be upgraded, the second version file being of a higher version than the first version file; a differential module configured to perform differential processing on the second version file and the first version file to obtain a similar part and a difference part; a generation module configured to generate a differential region based on a byte difference value of the second version file relative to the first version file for the similar part and extract content not present in the first version file to generate an added region for the difference part; an addition module configured to record and add a feature mark to a start position and a length of redundant zero values in the differential region, and generate an updated differential region; the generation module is further configured to generate a differential file based on the updated differential region, the added region and a control region; a sending module configured to send the differential file to the target terminal based on over-the-air download technology, so that the target terminal upgrades based on the differential file and the first version file stored by the target terminal itself.

8. An upgrading apparatus based on over-the-air download technology, characterized by comprising: The apparatus applied to a terminal device comprises: a receiving module configured to receive a differential file sent by a server based on over-the-air download technology; An upgrading module is configured to upgrade based on the differential file and the first version file stored in the terminal device itself; The server obtains the second version file and the first version file of the terminal device, the terminal device being a terminal to be upgraded, and the version of the second version file being higher than that of the first version file; the server performs differential processing on the second version file and the first version file to obtain a similar part and a difference part; the server generates a differential region based on a byte difference value of the second version file relative to the first version file for the similar part and extracts content not existing in the first version file to generate an added region for the difference part; the server records and adds a feature mark to a start position and a length of redundant zero values in the differential region to generate an updated differential region; and the server generates a differential file based on the updated differential region, the added region, and a control region.

9. An upgrade device based on over-the-air (OTA) download technology, characterized in that, The device comprises a processor and a memory storing computer program instructions; the processor reads and executes the computer program instructions to implement the upgrading method based on over-the-air download technology according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the upgrading method based on over-the-air download technology according to any one of claims 1 to 6.

11. A computer program product, characterised in that, The computer program is executed by the processor to implement the upgrading method based on over-the-air download technology according to any one of claims 1 to 6.