Data updating method, device and equipment and computer readable storage medium

Through non-complete decompression and non-complete recompression methods, differential data and intermediate data are used to solve the problems of differential data redundancy and long update time in the data update process in the prior art, and efficient and accurate data updates are achieved.

CN119311701APending Publication Date: 2025-01-14HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, during the data update process, the accuracy and efficiency of differential data are limited by compression methods and decompression tools, resulting in redundancy and long update time of differential data, affecting the user experience.

Method used

Through non-complete decompression and non-complete recompression methods, data is acquired and updated, and the differential data and intermediate data between the first and second devices are used to determine the accuracy and efficiency of the differential data, avoiding complete decompression of all data. and heavy compression.

Benefits of technology

It improves the accuracy and efficiency of data updates, reduces the size and calculation time of differential data, adapts to the compression methods of different terminals, and ensures the update integrity of data packets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311701A_ABST
    Figure CN119311701A_ABST
Patent Text Reader

Abstract

The invention discloses a data updating method, device and equipment and a computer readable storage medium, and belongs to the technical field of communication. The method comprises the steps that first data obtained by compressing third data at least in sequence in a first compression mode and a second compression mode and second data obtained by compressing fourth data at least in sequence in the first compression mode and the second compression mode are obtained, and the fourth data is obtained by updating the third data; decompressing the first data and the second data based on a first decompression mode corresponding to the second compression mode to obtain first intermediate data and second intermediate data; determining first differential data between the second intermediate data and the first intermediate data; and updating the first data according to the first differential data and the first intermediate data. According to the first intermediate data and the second intermediate data which are obtained through incomplete decompression, the first differential data are accurately determined, and efficient updating of the first data can be achieved according to the first differential data and the first intermediate data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, equipment and computer-readable storage medium for updating data. Background Art

[0002] The operation and maintenance of various functions of various devices in the communication system need to rely on data. Moreover, with the development of communication technology and the continuous changes in user needs, data needs to be continuously updated to realize the update of various functions in the communication system, so that the continuously updated functions can meet the real-time needs of users. Summary of the invention

[0003] The present application provides a data updating method, apparatus, device and computer-readable storage medium to improve the accuracy and efficiency of data updating. The technical solution is as follows:

[0004] In a first aspect, a method for updating data is provided, which is applied to a first device, and the method includes: acquiring first data and second data, the first data including data obtained by compressing third data using at least a first compression method and a second compression method in sequence, the second data including data obtained by compressing fourth data using at least the first compression method and the second compression method in sequence, the fourth data being updated based on the third data; decompressing the first data and the second data respectively based on a first decompression method corresponding to the second compression method to obtain a first decompression result and a second decompression result, the first decompression result including first intermediate data obtained based on the first data, and the second decompression result including second intermediate data obtained based on the second data; determining first differential data between the second intermediate data and the first intermediate data; and sending the first differential data, the first differential data being used to update the first data in the second device.

[0005] The present application obtains first intermediate data and second intermediate data by incompletely decompressing first data and second data, wherein the first intermediate data is data obtained by compressing third data using a first compression method, and the second intermediate data is data obtained by compressing fourth data using a first compression method. The similarity between the first intermediate data and the second intermediate data can reflect the similarity between the third data and the fourth data, so the first differential data can be accurately and efficiently determined based on the first intermediate data and the second intermediate data, and the first data can be updated based on the first differential data and the first intermediate data, thereby improving the efficiency of data updating.

[0006] In a possible implementation, the first decompression result also includes first reference data corresponding to the first data, the first reference data is the data referenced in the process of compressing the first intermediate data using the second compression method to obtain the first data, and the second decompression result also includes second reference data corresponding to the second data, the second reference data is the data referenced in the process of compressing the second intermediate data using the second compression method to obtain the second data; after determining the first differential data between the second intermediate data and the first intermediate data, it also includes: determining the reference data corresponding to the first differential data according to the first differential data, the first reference data and the second reference data; sending the reference data, the reference data is used to update the first data in the second device. Determining the reference data corresponding to the first differential data according to the first reference data and the second reference data, and sending the determined reference data, can make it possible to more accurately update the first data according to the first differential data and the reference data.

[0007] In a possible implementation, the method further includes: obtaining a first data packet including at least one first compressed data and a second data packet including at least one second compressed data, wherein the first data is first compressed data in the first data packet that is different from the at least one second compressed data, and the second data is second compressed data in the second data packet that is different from the at least one first compressed data. The data in the first data packet that is different from the data in the second data packet is determined as the first data and the second data that need to be partially decompressed, and the same data does not need to be decompressed, thereby further improving the efficiency of determining the first differential data.

[0008] In a possible implementation, after sending the first differential data, the method further includes: acquiring fifth data and sixth data, the fifth data being of a different type from the first data, and the sixth data being of a different type from the second data; determining second differential data between the fifth data and the sixth data; and sending the second differential data, the second differential data being used to update the fifth data in the second device. Determining the second differential data based on the fifth data and the sixth data enables the fifth data in the first data packet to be updated based on the second differential data, making the update of the data packet more complete.

[0009] In a second aspect, a method for updating data is provided, the method is applied to a second device, and the method includes: receiving first differential data corresponding to first data; obtaining the first data in the second device, the first data in the second device including data obtained by compressing third data by at least a first compression method and a second compression method in sequence; decompressing the first data in the second device based on a first decompression method corresponding to the second compression method to obtain a first decompression result, the first decompression result including first intermediate data obtained based on the first data; updating the first data in the second device according to the first intermediate data and the first differential data. Since the first data does not need to be completely decompressed, the update of the first data in the second device can be achieved according to the first differential data and the first intermediate data, thereby improving the efficiency of data updating.

[0010] In a possible implementation, updating the first data in the second device according to the first intermediate data and the first differential data includes: updating the first intermediate data according to the first differential data to obtain third intermediate data; compressing the third intermediate data based on the second compression method to obtain seventh data; and updating the first data in the second device to the seventh data. The present application only needs to perform non-complete recompression on the updated third intermediate data to implement the update of the first data, thereby improving the efficiency of updating the first data.

[0011] In a possible implementation, the first data in the second device is updated according to the first intermediate data and the first differential data, including: updating the first intermediate data according to the first differential data to obtain third intermediate data; compressing the third intermediate data based on the second compression method according to the reference data corresponding to the first differential data to obtain seventh data; and updating the first data in the second device to the seventh data. The third intermediate data is not completely recompressed according to the first differential data and the reference data, so that the accuracy of the updated first data can be further guaranteed while ensuring the efficiency of updating the first data.

[0012] In a possible implementation, before the third intermediate data is compressed based on the reference data and the second compression method to obtain the seventh data, the method further includes: receiving the reference data. The third intermediate data is partially recompressed by the first differential data and the reference data to further ensure successful update of the first data.

[0013] In a possible implementation, after the first data in the second device is updated to the seventh data, the method further includes: updating the fifth data in the second device according to the second differential data corresponding to the fifth data to obtain the eighth data, where the fifth data is of a different type from the first data; and updating the fifth data in the second device to the eighth data. The fifth data in the first data packet is updated according to the second differential data, so that the update of the data packet is more complete.

[0014] In a possible implementation, before the fifth data is updated according to the second differential data to obtain the eighth data, the method further includes: receiving the second differential data. By receiving the second differential data, it can be ensured that the fifth data is successfully updated according to the second differential data.

[0015] In a third aspect, a data updating apparatus is provided, which is applied to a first device, and comprises: an acquisition module, used to acquire first data and second data, the first data comprising data obtained by compressing third data using at least a first compression method and a second compression method in sequence, the second data comprising data obtained by compressing fourth data using at least the first compression method and the second compression method in sequence, the fourth data being updated based on the third data; a decompression module, used to decompress the first data and the second data respectively based on a first decompression method corresponding to the second compression method, to obtain a first decompression result and a second decompression result, the first decompression result comprising first intermediate data obtained based on the first data, and the second decompression result comprising second intermediate data obtained based on the second data; a determination module, used to determine first differential data between the second intermediate data and the first intermediate data; a sending module, used to send the first differential data, the first differential data being used to update the first data in the second device.

[0016] In a possible implementation, the first decompression result also includes first reference data corresponding to the first data, the first reference data is the data referenced in the process of compressing the first intermediate data using the second compression method to obtain the first data, and the second decompression result also includes second reference data corresponding to the second data, the second reference data is the data referenced in the process of compressing the second intermediate data using the second compression method to obtain the second data; the determination module is also used to determine the reference data corresponding to the first differential data based on the first differential data, the first reference data and the second reference data; the sending module is also used to send the reference data, and the reference data is used to update the first data in the second device.

[0017] In one possible implementation, the acquisition module is also used to acquire a first data packet including at least one first compressed data and a second data packet including at least one second compressed data, wherein the first data is first compressed data in the first data packet that is different from the at least one second compressed data, and the second data is second compressed data in the second data packet that is different from the at least one first compressed data.

[0018] In a possible implementation, the acquisition module is also used to acquire fifth data and sixth data, the fifth data is of a different type from the first data, and the sixth data is of a different type from the second data; the determination module is also used to determine the second differential data between the fifth data and the sixth data; the sending module is also used to send the second differential data, and the second differential data is used to update the fifth data in the second device.

[0019] In a fourth aspect, a data updating device is provided, which is applied to a second device, and includes: a receiving module, used to receive first differential data corresponding to first data; an acquisition module, used to acquire the first data in the second device, the first data in the second device including data obtained by compressing third data using at least a first compression method and a second compression method in sequence; a decompression module, used to decompress the first data in the second device based on a first decompression method corresponding to the second compression method, to obtain a first decompression result, the first decompression result including first intermediate data obtained based on the first data; an updating module, used to update the first data in the second device according to the first intermediate data and the first differential data.

[0020] In a possible implementation, the update module is used to update the first intermediate data according to the first differential data to obtain the third intermediate data; compress the third intermediate data based on the second compression method to obtain the seventh data; and update the first data in the second device to the seventh data.

[0021] In one possible implementation, the update module is used to update the first intermediate data according to the first differential data to obtain the third intermediate data; compress the third intermediate data based on the second compression method according to the reference data corresponding to the first differential data to obtain the seventh data; and update the first data in the second device to the seventh data.

[0022] In a possible implementation manner, the receiving module is further configured to receive reference data.

[0023] In a possible implementation, the update module is further used to update the fifth data in the second device according to the second differential data corresponding to the fifth data to obtain the eighth data, where the fifth data is of a different type from the first data; and update the fifth data in the second device to the eighth data.

[0024] In a possible implementation, the receiving module is further configured to receive second differential data.

[0025] In a fifth aspect, another communication device is provided, the device comprising: a network interface, a memory, and a processor. The network interface, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the network interface to receive signals and control the network interface to send signals, and when the processor executes the instructions stored in the memory, the processor executes the method in the first aspect and any possible implementation thereof or the second aspect and any possible implementation thereof.

[0026] Optionally, there are one or more processors and one or more memories.

[0027] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0028] In a sixth aspect, a communication system is provided, which includes the device in the third aspect and any possible implementation manner thereof and the device in the fourth aspect and any possible implementation manner thereof.

[0029] In the seventh aspect, a computer program (product) is provided, which includes: computer program code, which, when executed by a computer, enables the computer to execute the method in the first aspect and any possible implementation thereof or the second aspect and any possible implementation thereof.

[0030] In an eighth aspect, a computer-readable storage medium is provided, which stores a program or instruction. When the program or instruction runs on a computer, the method in the above-mentioned first aspect and any possible implementation thereof or the second aspect and any possible implementation thereof is executed.

[0031] In the ninth aspect, a chip is provided, comprising a processor for calling and executing instructions stored in a memory from the memory, so that a computer equipped with the chip executes the method in the above-mentioned first aspect and any possible implementation thereof or the second aspect and any possible implementation thereof.

[0032] In the tenth aspect, another chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, a computer equipped with the chip executes the method in the above-mentioned first aspect and any possible implementation thereof or the second aspect and any possible implementation thereof.

[0033] It should be understood that the beneficial effects achieved by the technical solutions of the third to tenth aspects of the present application and the corresponding possible implementation methods can be referred to the technical effects of the first and second aspects and their corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of performing differential update in a related technology 1 provided in an embodiment of the present application;

[0035] Figure 2 A schematic diagram of performing differential update in a related technology 2 provided in an embodiment of the present application;

[0036] Figure 3 An implementation scenario diagram provided for an embodiment of the present application;

[0037] Figure 4 A flowchart of a data updating method provided in an embodiment of the present application;

[0038] Figure 5 A schematic diagram of a data update process provided in an embodiment of the present application;

[0039] Figure 6 A schematic diagram of the file composition of a data packet provided in an embodiment of the present application;

[0040] Figure 7 A schematic diagram of the structure of a data updating device provided in an embodiment of the present application;

[0041] Figure 8 A schematic diagram of the structure of another data updating device provided in an embodiment of the present application;

[0042] Fig. 9 A schematic diagram of the structure of a data updating device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.

[0044] In the communication system, the operation and maintenance of various functions of various devices need to rely on data. Moreover, with the development of communication technology and the continuous changes in user needs, data needs to be continuously updated to realize the update of various functions, so that the continuously updated functions can meet the real-time needs of users. For example, various applications deployed on the terminals in the communication system need to rely on the application-related data stored in the terminals to run. Or the various functions of IoT devices also need to rely on related data to run.

[0045] Taking the case where an application deployed on a terminal needs to be updated, the terminal can update the application by receiving the updated data sent by the server and running based on the updated data. The data on which the application runs can be included in a data packet, which can be an application package (APK). However, as the types, number, and volume of applications continue to grow, the amount of data required for application updates is large, requiring greater bandwidth consumption, which brings increasing costs to the application market that provides application update services. In this case, differential update technology comes into being.

[0046] The following is an explanation of the differential update process. The server of the application market determines the data packet of the new version and the data packet of the old version on the terminal, compares the data in the data packets of the two versions, and determines the differential data for the terminal update data packet based on the different data in the data packets of the two versions. The differential data includes the updated part of the data packet of the new version relative to the data packet of the old version. The server sends the differential data to the terminal, and the terminal updates the data in the data packet of the old version stored on the terminal based on the differential data, synthesizing the data packet of the new version, so that the application deployed on the terminal runs on the basis of the data of the new version, thereby realizing the update of the application. Since the data included in the differential data is the updated part of the data of the new version relative to the data of the old version, the volume of the differential data is smaller than the volume of all the data of the new version. Therefore, the differential update technology reduces the bandwidth consumption required for application updates and reduces the expenses of the application market for application updates.

[0047] For example, see Figure 1 , showing a schematic diagram of differential update in a related technology 1. Related technology 1 may be, for example, bsdiff (a binary incremental encoding algorithm), the old version of the data packet stored in the server and the terminal includes data 1 to data n, and the new version of the data packet stored in the server also includes data 1 to data n. The data packet can save data in different ways. For example, the old version of the data packet directly saves data 1, and saves the original data 1 of data 1. The old version of the data packet saves data 2 after compression, that is, the original data 2 corresponding to data 2 is compressed to obtain compressed data 2, and the compressed data 2 is saved.

[0048] The new version of the data packet stored in the server is updated based on the old version of the data packet according to the update requirements. Therefore, data 1 to data n in the old version of the data packet and data 1 to data n in the new version of the data packet can be one-to-one corresponding data. For the data in the old version of the data packet and the data in the new version of the data packet corresponding to each other, not only the data itself is the same or similar, but also the data storage method is the same. For example, the storage method for data 1 in the old version of the data packet is to directly store the original data 1. Correspondingly, the storage method for data 1 in the new version of the data packet is also to directly store the original data 1.

[0049] When determining differential data based on the old version of data and the new version of data, the first related technology determines the differential data between the two corresponding data by comparing the corresponding data in the old version of the data packet and the new version of the data packet, without considering the type of data. That is, regardless of whether the data in the data packet is original data or compressed data, the first related technology directly performs differential calculation to determine the differential data between the two corresponding data. For example, see Figure 1 When determining the differential data between the compressed data 2 in the old version of the data packet and the compressed data 2 in the new version of the data packet, the related technology does not decompress the two compressed data 2, but directly compares the two compressed data 2 and determines the differential data between the two compressed data 2 based on the difference between the two compressed data 2.

[0050] However, compression will destroy the similarity between data, that is, after compressing two data with large similarity, the similarity between the two compressed data may decrease, or even become two completely dissimilar data. Therefore, if the compressed data is not decompressed, the differential data determined based on the two compressed data will be inaccurate, and the size of the differential data may change.

[0051] Exemplarily, the original data 2 of the new version is 1234123123, and the original data 2 of the old version is 123123123. The original data 2 of the new version has only one more character 4 than the original data 2 of the old version. If the two original data 2 are directly differentially calculated, the differential data between the two original data 2 can only include one character 4. For example, the data is divided into multiple data segments, and each data segment is compressed accordingly, and 3 characters are one data segment. Since the 3 data segments of the original data 2 of the old version are the same, the 3 data segments 123 can be compressed into A respectively, and the compressed data 2 of the old version is AAA. When compressing the original data 2 of the new version, the first data segment 123 is compressed into A, the second data segment 412 is compressed into B, the third data segment 312 is compressed into C, and the fourth data segment 3 is compressed into D, then the compressed data 2 of the new version is ABCD. The data that is the same between the compressed data 2 of the new version and the compressed data 2 of the old version only includes one character A, and the remaining characters are all determined as differential data. It can be seen from this that the similarity between the two data is destroyed after compression, the performance of the differential algorithm is affected, and the size of the differential data is increased, resulting in redundancy of the differential data.

[0052] In addition, when the terminal synthesizes a new version of the data packet based on the differential data sent by the server and the old version of the data packet stored in the terminal, the time required to synthesize the new version of the data packet is long and the synthesis efficiency is low due to the large volume of the differential data.

[0053] In order to solve the problems existing in the related technology 1, the related technology 2 comes into being. The related technology 2 may be, for example, archive-patcher technology, which may also be called archive file patch technology, and is a differential algorithm technology based on the Zip (a compression algorithm) file format. The archive-patcher technology decompresses the compressed data based on the zlib library (a resource library for compression and decompression), and then uses the bsdiff algorithm on the original data obtained after decompression to obtain differential data.

[0054] For example, see Figure 2, shows a schematic diagram of differential update in the related technology 2. For compressed data, the server in the related technology 2 can first completely decompress the compressed data to obtain the original data before compression. For example, the server completely decompresses the compressed data 2 in the data packet of the old version to obtain the original data 2 of the old version, and completely decompresses the compressed data 2 in the data packet of the new version to obtain the original data 2 of the new version. Then the server performs differential calculation on the corresponding original data in the new version and the old version, determines the differential data between the corresponding two original data, and obtains the differential data between the data packet of the old version and the data packet of the new version. The terminal can also completely decompress the compressed data in the data packet of the old version stored in the terminal to obtain the corresponding original data, synthesize the original data of the new version according to the original data obtained by decompression and the differential data sent by the server, and then completely re-compress the original data that needs to be compressed in the new version to obtain the compressed data of the new version, complete the update of the data packet of the old version, and obtain the data packet of the new version.

[0055] Since different terminals may use different methods for data compression and decompression, and different compression and decompression methods may rely on different compression and decompression tools, the server in the related technology 2 needs to use the same compression and decompression method as the terminal for different compression and decompression methods of different terminals, and completely decompress the data in the old version of the data packet and the new version of the data packet to obtain differential data, so as to ensure that the terminal can correctly identify the differential data, completely decompress the old version of the data packet in the terminal according to the differential data, and update the data in the old version of the data packet according to the original data and differential data obtained by the complete decompression. In other words, only when the compression and decompression methods used by the server and the terminal are the same can the content and bytes of the data in the new version of the data packet of the server and the new version of the data packet synthesized by the terminal through differential data be consistent, and the signature used to identify the version be consistent.

[0056] However, the full decompression and compression technology used by the archive-patcher technology relies on the zlib library, that is, the archive-patcher technology is limited by the compression method and can only fully decompress the compressed data in the data packet compressed by the zlib library. If the old version of the data packet stored in the terminal contains compressed data compressed by other methods, the server cannot fully decompress the old version of the data packet through the archive-patcher technology, nor can it obtain the differential data that the terminal can recognize.

[0057] It can be seen that if the compression and decompression method used by the server is not a method that can be used by all terminals, the differential data sent by the server to the terminal cannot be recognized by the terminal, and the terminal cannot complete the data update according to the differential data. If the server is to ensure that the differential data can be recognized by different terminals, the server needs to have a variety of different compression and decompression methods, and a variety of compression and decompression tools that the different compression and decompression methods rely on, which increases the burden on the server. In addition, although the compressed data can be completely decompressed to ensure the accuracy of the differential data determined by the server, the time required for complete decompression is long, and the time required for complete decompression using different decompression methods is different, resulting in the server determining the efficiency of differential data difficult to ensure, the terminal also needs to completely decompress the data to be updated, and after updating the original data according to the differential data, the new version of the original data is completely recompressed, which makes the time required for data update longer and the efficiency lower, affecting the user experience.

[0058] The embodiment of the present application provides a method for updating data, which can improve the efficiency of determining differential data and ensure the accuracy of the determined differential data, thereby ensuring accurate and efficient completion of data updating. Figure 3 , showing an implementation scenario diagram of the method. The implementation scenario includes a first device 31 and a second device 32. The first device 31 includes a non-complete decompression module 311, a difference module 312 and a sending module 313, and the second device 32 includes a non-complete recompression module 321, a synthesis module 322 and a receiving module 323. The first device 31 and the second device 32 are connected in communication through the sending module 313 and the receiving module 323. The first device 31 can be a device for data update in the application market, such as a server or a service end, and the second device 32 can be a client or an Internet of Things terminal, such as a smart device such as a mobile phone, a tablet computer, a personal computer, etc.

[0059] The non-complete decompression module 311 is used to perform non-complete decompression on the compressed data, that is, the non-complete decompression module 311 does not completely decompress the compressed data into the original data, but decompresses the compressed data into intermediate data. Correspondingly, the non-complete re-compression module 321 is used to perform non-complete re-compression on the intermediate data, that is, the non-complete re-compression module 321 does not completely compress the original data into the compressed data, but further compresses the compressed intermediate data to obtain the compressed data.

[0060] See also Figure 4 , which shows a flow chart of a method for updating data provided by an embodiment of the present application, and which can be applied to Figure 3 In the implementation scenario shown, the method includes but is not limited to the following S401 to S408.

[0061] S401, a first device obtains first data and second data, the first data includes data obtained by compressing third data by at least using the first compression method and the second compression method in sequence, the second data includes data obtained by compressing fourth data by at least using the first compression method and the second compression method in sequence, and the fourth data is updated based on the third data. The first data may also be referred to as a first file, the first data includes at least one data segment, and accordingly, the second data may also be referred to as a second file, the second data includes at least one data segment.

[0062] In a possible implementation, the first data and the second data may be acquired by acquiring a first data packet including at least one first compressed data and a second data packet including at least one second compressed data. The first data may be first compressed data in the first data packet that is different from the at least one second compressed data, and the second data may be second compressed data in the second data packet that is different from the at least one first compressed data.

[0063] Optionally, the first data packet may be an old version data packet of the second device, and the second data packet may be a new version data packet. The embodiment of the present application does not limit the method for the first device to obtain the first data packet and the second data packet. For example, the first device may receive an update request sent by the second device, and the update request carries the version number of the old version data packet on the second device. The first device determines the old version data packet of the second device from multiple versions of data packets stored in the first device based on the version number of the old version data packet on the second device, and determines the new version data packet, and determines the old version data packet of the second device as the first data packet, and determines the new version data packet as the second data packet.

[0064] The first data packet includes at least one first compressed data, and the second data packet includes at least one second compressed data. The first device can determine the first compressed data in the first data packet that is different from the second compressed data as the first data, and determine the second compressed data in the second data packet that is different from the first compressed data as the second data by comparing the first compressed data and the second compressed data. For the first compressed data that is the same as the second compressed data, it can be considered that when updating the data, the first compressed data does not need to be updated, and therefore, the first compressed data may not be determined as the first data.

[0065] The determined first data may be data obtained by compressing the third data using the first compression method and the second compression method in sequence. The embodiment of the present application does not limit the first compression method and the second compression method. The first compression method and the second compression method may also include one or more compression methods respectively. Compressing the data using the first compression method may be compressing the data once or multiple times using the first compression method, and compressing the data using the second compression method may be compressing the data once or multiple times using the second compression method. Optionally, before or after the third data and the fourth data are compressed using the first compression method and the second compression method in sequence, other compression methods other than the first compression method and the second compression method may be used to compress the third data and the fourth data.

[0066] Below, taking deflate compression as an example, the process of obtaining the first data is described. Deflate compression can be a lossless data compression method that uses both LZ77 (a compression method that uses a dictionary for data compression) compression method and Huffman compression method based on a Huffman coding tree. The compressed data obtained by using the deflate compression method can be called a deflate compressed stream, deflate compressed data or a deflate file. The LZ77 compression method is the first compression method, and the Huffman compression method is the second compression method.

[0067] After acquiring the third data, the first device performs LZ77 compression on the third data, that is, compresses the third data using the first compression method to obtain the first intermediate data. Afterwards, the first device can perform Huffman compression on the first intermediate data, that is, compress the first intermediate data using the second compression method to obtain the first data. The process of the first device compressing the fourth data in accordance with the first compression method and the second compression method in sequence is the same as the process of the first device compressing the third data once in accordance with the first compression method and the second compression method, and will not be repeated here.

[0068] The process of compressing the third data to obtain the first data and the process of compressing the fourth data to obtain the second data are both processes before the first device obtains the first data packet and the second data packet. Therefore, the first data and the second data obtained by the first device through the first data packet and the second data packet are compressed data. In other words, the process of the first device obtaining the first data and the second data does not involve the process of compressing the third data to obtain the first data and the process of compressing the fourth data to obtain the second data.

[0069] S402, the first device decompresses the first data and the second data respectively based on the first decompression method corresponding to the second compression method to obtain a first decompression result and a second decompression result, the first decompression result includes first intermediate data obtained based on the first data, and the second decompression result includes second intermediate data obtained based on the second data.

[0070] After determining the first data to be updated and the second data corresponding to the first data, the first device can decompress the first data and the second data respectively according to the first decompression method to obtain a first decompression result including the first intermediate data and a second decompression result including the second intermediate data. The first intermediate data is data obtained by compressing the third data according to the first compression method, and correspondingly, the second intermediate data is data obtained by compressing the fourth data according to the first compression method.

[0071] Still taking the first data and the second data as deflate compressed data as an example, the first decompression method is the decompression method corresponding to the second compression method, that is, the first decompression method is the Huffman decompression method corresponding to the Huffman compression method, and the Huffman decompression method can also be called Huffman decoding. After decompressing the first data according to the Huffman decompression method, a first decompression result is obtained, and the first decompression result includes first intermediate data, and the first intermediate data is the data compressed by the third data according to the LZ77 compression method. After decompressing the second data according to the Huffman decompression method, a second decompression result is obtained, and the second decompression result includes second intermediate data, and the second intermediate data is the data compressed by the fourth data according to the LZ77 compression method. The first intermediate data and the second intermediate data may include a list (LIST) bit segment and an offset (DIST) bit segment.

[0072] For example, see Figure 5 , showing a schematic diagram of a data update process. The first data packet acquired by the first device includes first data 11, first data 12 and Figure 5 The other first data not shown in the figure, the obtained second data packet includes the second data 21, the second data 22 and Figure 5 Other second data not shown in the figure. The non-complete decompression module in the first device performs non-complete decompression on the first data 11 in the first data packet, that is, decompresses the first data 11 according to the first decompression method, and can obtain the first intermediate data 11. The non-complete decompression module performs non-complete decompression on the first data 12 to obtain the first intermediate data 12. The non-complete decompression module in the first device performs non-complete decompression on the second data 21 in the second data packet, that is, decompresses the second data 21 according to the first decompression method, and can obtain the second intermediate data 21. The non-complete decompression module performs non-complete decompression on the second data 22 to obtain the second intermediate data 22.

[0073] S403: The first device determines first differential data between the second intermediate data and the first intermediate data.

[0074] Since there is a corresponding relationship between the first data and the second data, that is, the second data is updated based on the corresponding first data, there are identical partial data and different partial data between the first data and the second data, and the first device can determine the different partial data between the first data and the second data as the first differential data for the second device to perform differential update on the first data, or can also determine the offset corresponding to the different partial data between the first data and the second data as the first differential data. The differential update can also be called an incremental update.

[0075] For example, see Figure 5 The differential module in the first device can differentiate the first data 11 and the second data 21 corresponding to the first data 11 to determine the first differential data between the first data 11 and the second data 21.

[0076] In a possible implementation, the first decompression result also includes first reference data corresponding to the first data, the first reference data being data referenced in the process of compressing the first intermediate data using the second compression method to obtain the first data, and the second decompression result also includes second reference data corresponding to the second data, the second reference data being data referenced in the process of compressing the second intermediate data using the second compression method to obtain the second data. Exemplarily, the first reference data may include data indicating the correspondence between each data segment in the first intermediate data and each data segment in the first data, and the second reference data may include data indicating the correspondence between each data segment in the second intermediate data and each data segment in the second data.

[0077] In this case, the first device may also determine the reference data corresponding to the first differential data based on the first differential data, the first reference data, and the second reference data after determining the first differential data between the second intermediate data and the first intermediate data. Exemplarily, the first decompression result obtained after the first device performs incomplete decompression on the first data includes the first intermediate data and the first reference data, and the second decompression result obtained after the first device performs incomplete decompression on the second data includes the second intermediate data and the second reference data. The first intermediate data has a corresponding relationship with the first reference data, and the second intermediate data has a corresponding relationship with the second reference data. After determining the first differential data between the first intermediate data and the second intermediate data, the first device may determine the reference data corresponding to the first differential data in the first reference data and the second reference data based on the first differential data.

[0078] Taking the first data and the second data as data obtained by deflate compression as an example, in the process of Huffman decompression of the first data, the first device can not only obtain the first intermediate data, but also obtain the first reference data corresponding to the first intermediate data. The first reference data may include the Huffman code table referenced when the third data is Huffman compressed. The Huffman code table includes the bit segments referenced when the Huffman compression is performed on each data segment in the first intermediate data. For example, the Huffman code table may include a header (HEADER) bit segment, a code length (code-code lengths, CCL) bit segment, a sequence (sequence, SQ) 1 bit segment and an SQ2 bit segment. Correspondingly, the Huffman code table included in the second reference data may also include the bit segments referenced when the Huffman compression is performed on each data segment in the second intermediate data. The first reference data and the second reference data may be the same or different, and the embodiment of the present application does not limit this.

[0079] The first device can determine the bit segments corresponding to the data segments included in the first differential data in the first reference data and the second reference data based on the data segments included in the first differential data. The bit segments corresponding to the data segments included in the first differential data are the reference data corresponding to the first differential data.

[0080] S404: The first device sends first differential data, where the first differential data is used to update the first data in the second device.

[0081] The first device may send the first differential data to the second device through the sending module. For example, the first device may encapsulate the first differential data corresponding to the first intermediate data and the second intermediate data into the same differential packet and send the packet to the second device. Figure 5 The first device may encapsulate the first differential data 1 between the first intermediate data 11 and the second intermediate data 21 and the first differential data 2 between the first intermediate data 12 and the second intermediate data 22 into the same differential packet, and send it to the second device through the sending module.

[0082] Optionally, the first device may also send reference data to the second device, the reference data being used to update the first data in the second device. Exemplarily, the first device may send reference data to the second device alone, or may encapsulate the reference data and the first differential data into the same differential packet and send it to the second device.

[0083] In a possible implementation, the first device may also obtain fifth data and sixth data, the fifth data and the first data are of different types, and the sixth data and the second data are of different types; and determine the second differential data between the fifth data and the sixth data. The fifth data and the first data may belong to the same first data packet, the sixth data and the second data may belong to the same second data packet, and the fifth data and the sixth data may be uncompressed original data, that is, the fifth data and the sixth data are directly stored in the first data packet and the second data packet. Since the sixth data may be data updated based on the fifth data, the first device may also perform a differential operation on the fifth data and the sixth data to obtain the second differential data between the fifth data and the sixth data.

[0084] For example, see Figure 5 In addition to the first data 11 and the first data 12, the first data packet also includes fifth data 11 to fifth data 1n, and in addition to the second data 21 and the second data 22, the second data packet also includes sixth data 21 to sixth data 2n. The first device can compare the fifth data 11 and the sixth data 21, and determine the different partial data between the fifth data 11 and the sixth data 21 as the second differential data between the fifth data 11 and the sixth data 21.

[0085] Optionally, after determining the second differential data, the first device may send the second differential data to the second device, and the second differential data is used to update the fifth data in the second device. In addition, the first device may send the second differential data to the second device alone, or encapsulate the second differential data and the first differential data into the same differential packet and send it to the second device.

[0086] S405: The second device receives first differential data corresponding to the first data.

[0087] After the first device sends the first differential data to the second device through the sending module, the second device can receive the first differential data through the receiving module. Exemplarily, the second device can receive the differential packet including the first differential data sent by the first device to achieve reception of the first differential data.

[0088] S406, the second device obtains first data in the second device, where the first data in the second device includes data obtained by compressing third data by at least sequentially using the first compression method and the second compression method.

[0089] The embodiment of the present application does not limit the method for the second device to obtain the first data. For example, the second device can determine the first data packet that needs to be updated from the stored multiple data packets, and determine at least one first compressed data in the first data packet. Then, the second device can determine the first data that needs to be updated corresponding to the first differential data from the at least one first compressed data according to the first differential data.

[0090] S407: The second device decompresses the first data in the second device based on the first decompression method corresponding to the second compression method to obtain a first decompression result, where the first decompression result includes first intermediate data obtained based on the first data.

[0091] For example, see Figure 5 , the second device may perform incomplete decompression on the first data 11 in the first data packet, that is, decompress the first data 11 according to the first decompression method to obtain the first intermediate data 11, and perform incomplete decompression on the first data 12 to obtain the first intermediate data 12. The first intermediate data 11 and the first intermediate data 12 may be included in the same first decompression result, or may be included in two first decompression results respectively, which is not limited in the embodiment of the present application.

[0092] S408: The second device updates the first data in the second device according to the first intermediate data and the first differential data.

[0093] The embodiment of the present application does not limit the process of the second device updating the first data according to the first intermediate data and the first differential data. By way of example, the embodiment of the present application takes the following two different situations, situation A1 and situation A2, as examples to illustrate the process of updating the first data.

[0094] Case A1: the first intermediate data is updated according to the first differential data to obtain the third intermediate data; the third intermediate data is compressed based on the second compression method to obtain the seventh data; and the first data in the second device is updated to the seventh data.

[0095] The embodiment of the present application does not limit the method for updating the first intermediate data according to the first differential data. For example, the data in the first differential data that needs to be added to the first intermediate data can be added to the first intermediate data, or part of the data in the first intermediate data can be replaced with part of the data in the first differential data. The third intermediate data synthesized by updating the first intermediate data according to the first differential data is the same as the second intermediate data.

[0096] After obtaining the third intermediate data, the non-complete re-compression module of the second device can perform non-complete re-compression on the third intermediate data, that is, compress the third intermediate data based on the second compression method to obtain the seventh data. Taking the third intermediate data as data compressed by LZ77 as an example, the second compression method is Huffman compression, and the non-complete re-compression module can perform Huffman compression on the third intermediate data to obtain the seventh data. The seventh data is the updated first data, and the seventh data is the same as the second data in the second data packet in the first device. The second device can update the first data in the first data packet to the seventh data to implement the update of the first data packet.

[0097] For example, see Figure 5 The non-complete re-compression module of the second device may perform non-complete re-compression on the synthesized third intermediate data 21 to obtain seventh data 21, which is the same as the second data 21. The non-complete re-compression module of the second device may perform non-complete re-compression on the third intermediate data 22 to obtain seventh data 22, which is the same as the second data 22.

[0098] Case A2: the first intermediate data is updated according to the first differential data to obtain the third intermediate data; the third intermediate data is compressed based on the second compression method according to the reference data corresponding to the first differential data to obtain the seventh data; the first data in the second device is updated to the seventh data.

[0099] In case A2, the process of obtaining the third intermediate data according to the first differential data and the first intermediate data may be the same as the process of obtaining the third intermediate data according to the first differential data and the first intermediate data in case A1, and will not be repeated here.

[0100] When the second device performs non-complete recompression on the third intermediate data, it can refer to the reference data corresponding to the first differential data to further ensure that the seventh data obtained by the non-complete recompression is the same as the second data. The reference data can be, for example, a Huffman code table corresponding to the first differential data. Therefore, before compressing the third intermediate data based on the second compression method according to the reference data to obtain the seventh data, the second device can also receive the reference data. Exemplarily, the second device can receive the reference data sent separately by the first device, and can also receive the reference data by receiving a differential packet including the reference data sent by the first device.

[0101] The seventh data is the updated first data, and the seventh data is the same as the second data in the second data packet in the first device. The second device can update the first data in the first data packet to the seventh data to implement the update of the first data packet.

[0102] In a possible implementation, the second device may also update the fifth data in the second device according to the second differential data corresponding to the fifth data to obtain the eighth data, the fifth data and the first data belong to the same first data packet, and the fifth data in the second device is of a different type from the first data in the second device; and the fifth data in the second device is replaced with the eighth data. The process of obtaining the eighth data according to the second differential data and the fifth data may be the same as the process of obtaining the third intermediate data according to the first differential data and the first intermediate data in situation A1, and will not be described in detail here.

[0103] Optionally, before updating the fifth data according to the second differential data to obtain the eighth data, the second device may also receive the second differential data corresponding to the fifth data. For example, the second device may receive the second differential data sent by the first device alone, or may receive the second differential data by receiving a differential packet including the second differential data sent by the first device.

[0104] For example, see Figure 5 The second device can synthesize the eighth data 21 according to the fifth data 11 and the second differential data, and synthesize the eighth data 2n according to the fifth data 1n and the second differential data. The eighth data is the updated fifth data, and the eighth data is the same as the sixth data in the second data packet in the first device. The second device can update the fifth data in the first data packet to the eighth data to implement the update of the first data packet.

[0105] See also Figure 6, shows a schematic diagram of the file composition of a data packet, which is obtained by analyzing the composition of multiple different data packets. The .dex file occupies 33.94% of the total size of the data packet, and the deflate compressed data in the .dex file occupies 33.94% of the total size of the data packet, that is, the data in the .dex file is stored in the data packet in the form of deflate compressed data. The .so file occupies 38.64% of the total size of the data packet, and the deflate compressed data in the .so file occupies 38.63% of the total size of the data packet, that is, the data in the .so file is almost all stored in the data packet in the form of deflate compressed data, and only 0.01% of the data in the .so file is stored in the data packet in the form of other types of data. Other files occupy 27.42% of the total size of the data packet, and the deflate compressed data in other files occupies 11.43% of the total size of the data packet, and 15.99% of the data in other files is stored in the data packet in the form of other types of data. Analysis shows that an average of 84% of the data in the data packet is stored in the data packet in the form of deflate compressed data, and only an average of 16% of the data in the data packet is stored in the data packet in the form of other types of data. That is, if the data in the data packet is updated using the method provided in the embodiment of the present application, the updating efficiency and accuracy of most of the data in the data packet can be improved, thereby improving the efficiency and accuracy of the data packet update.

[0106] In addition, the data updating method provided in the embodiment of the present application can also effectively reduce the compression rate of the differential data. Wherein, the compression rate of the differential data can be the ratio of the size of the differential data to the size of the data packet of the new version. Through statistical analysis, the average compression rate of the differential data obtained without using the data updating method provided in the embodiment of the present application is 66.80%, and the average compression rate of the differential data obtained using the data updating method provided in the embodiment of the present application is 51.79%. It can be seen that, using the data updating method provided in the embodiment of the present application, the size of the differential data can be reduced by an average of 22.47% relative to the case where it is not used.

[0107] Related technology 1 generates differential data by comparing the new and old versions of data. The compressed data is not decompressed, resulting in inaccurate differential data determined based on the two compressed data, and the size of the differential data is increased, resulting in redundancy of the differential data.

[0108] Related technology 2 takes a long time to determine differential data, and different compression methods or tools take different times to completely decompress, which makes it difficult to ensure the efficiency of the first device in determining differential data. The second device also needs to completely decompress the data that needs to be updated, and after updating the original data based on the differential data, completely re-compress the original data of the new version, which takes a long time to update data and is inefficient, affecting the user experience.

[0109] The present application can accurately and efficiently determine the first differential data based on the similarity between the first intermediate data and the second intermediate data obtained by incomplete decompression, without completely decompressing the first data. The first data can be updated based on the first differential data and the first intermediate data, thereby improving the efficiency and stability of data updating.

[0110] Since the similarity between the first intermediate file and the second intermediate file is slightly different from the similarity between the first data and the second data before compression, the present application can ensure the accuracy of the determined differential data, give full play to the ability of the differential algorithm, reduce the size of the differential data and the time and space consumed by calculating the differential data. The data determination method provided in the embodiment of the present application avoids dependence on non-universal compression tools and solves the problem of being unable to update due to different compression methods and tools.

[0111] In addition, the first compression method and the second compression method used in the embodiment of the present application can be compression methods that can be used by different second devices, without relying on additional compression tools or compression databases. Therefore, the data update method provided in the embodiment of the present application has good versatility and can ensure that the new version of the data packet of the first device and the new version of the data packet obtained by differential data synthesis of the second device are consistent in data content and bytes, and the signature used to identify the version is consistent.

[0112] The above describes the data updating method provided by the embodiment of the present application. Corresponding to the above method, the embodiment of the present application also provides a data updating device. The device is applied to a first device. The device is used to Figure 7 The modules shown above perform the Figure 4 The method for updating data executed by the first device in the embodiment. Figure 7 As shown, the data updating device provided in the embodiment of the present application includes the following modules.

[0113] An acquisition module 701 is used to acquire first data and second data, wherein the first data includes data obtained by compressing third data using at least a first compression method and a second compression method in sequence, and the second data includes data obtained by compressing fourth data using at least a first compression method and a second compression method in sequence, and the fourth data is updated based on the third data; a decompression module 702 is used to decompress the first data and the second data respectively based on a first decompression method corresponding to the second compression method, to obtain a first decompression result and a second decompression result, the first decompression result includes first intermediate data obtained based on the first data, and the second decompression result includes second intermediate data obtained based on the second data; a determination module 703 is used to determine first differential data between the second intermediate data and the first intermediate data; a sending module 704 is used to send the first differential data, and the first differential data is used to update the first data in the second device.

[0114] In a possible implementation, the first decompression result also includes first reference data corresponding to the first data, the first reference data being data referenced in a process of compressing the first intermediate data using the second compression method to obtain the first data, and the second decompression result also includes second reference data corresponding to the second data, the second reference data being data referenced in a process of compressing the second intermediate data using the second compression method to obtain the second data; the determination module 703 is also used to determine the reference data corresponding to the first differential data based on the first differential data, the first reference data and the second reference data; the sending module 704 is also used to send reference data, and the reference data is used to update the first data in the second device.

[0115] In one possible implementation, the acquisition module 701 is also used to acquire a first data packet including at least one first compressed data and a second data packet including at least one second compressed data, wherein the first data is first compressed data in the first data packet that is different from the at least one second compressed data, and the second data is second compressed data in the second data packet that is different from the at least one first compressed data.

[0116] In a possible implementation, the acquisition module 701 is also used to acquire fifth data and sixth data, the fifth data is of a different type from the first data, and the sixth data is of a different type from the second data; the determination module 703 is also used to determine second differential data between the fifth data and the sixth data; the sending module 704 is also used to send the second differential data, and the second differential data is used to update the fifth data in the second device.

[0117] The embodiment of the present application also provides a data updating device. The device is applied to a second device. The device is used to update the data by Figure 8 The modules shown above perform the Figure 4 A method for updating data executed by a second device in the embodiment of the present invention. Figure 8 As shown, the data updating device provided in the embodiment of the present application includes the following modules.

[0118] A receiving module 801 is used to receive first differential data corresponding to first data; an acquiring module 802 is used to acquire first data in a second device, the first data in the second device including data obtained by compressing third data using at least a first compression method and a second compression method in sequence; a decompression module 803 is used to decompress the first data based on a first decompression method corresponding to the second compression method to obtain a first decompression result, the first decompression result including first intermediate data obtained based on the first data; an updating module 804 is used to update the first data in the second device according to the first intermediate data and the first differential data.

[0119] In a possible implementation, the update module 804 is used to update the first intermediate data according to the first differential data to obtain third intermediate data; compress the third intermediate data based on the second compression method to obtain seventh data; and update the first data in the second device to the seventh data.

[0120] In one possible implementation, the update module 804 is used to update the first intermediate data according to the first differential data to obtain third intermediate data; compress the third intermediate data based on the second compression method according to the reference data corresponding to the first differential data to obtain seventh data; and update the first data in the second device to the seventh data.

[0121] In a possible implementation, the receiving module 801 is further configured to receive reference data.

[0122] In a possible implementation, the update module 804 is further used to update the fifth data in the second device according to the second differential data corresponding to the fifth data to obtain the eighth data, where the fifth data is of a different type from the first data; and update the fifth data in the second device to the eighth data.

[0123] In a possible implementation, the receiving module 801 is further configured to receive second differential data.

[0124] It should be understood that the above Figure 7 or Figure 8 The device provided has the following beneficial effects when achieving its function: Figure 4 The data updating method provided has the same beneficial effects, which will not be described here. Figure 7 or Figure 8When the device provided realizes its functions, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0125] See also Fig. 9 , Fig. 9 A schematic structural diagram of an exemplary data updating device 900 of the present application is shown. The data updating device 900 includes at least one processor 901 , a memory 903 , and at least one network interface 904 .

[0126] The processor 901 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a neural-network processing units (NPU), a data processing unit (DPU), a microprocessor or one or more integrated circuits or application-specific integrated circuits (ASICs) for implementing the solution of the present application, a programmable logic device (PLD), other general-purpose processors or other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components or any combination thereof. PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture. It may implement or execute various logic blocks, modules and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.

[0127] Optionally, the data updating device 900 further includes a bus 902. The bus 902 is used to transmit information between the components of the data updating device 900. The bus 902 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus 902 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.

[0128] The memory 903 is, for example, a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache.

[0129] By way of example but not limitation, many forms of ROM and RAM are available. For example, ROM is a compact disc read-only memory (CD-ROM). RAM includes, but is not limited to, static RAM (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0130] The memory 903 may also be other types of storage devices that can store static information and instructions. Or it may be other types of dynamic storage devices that can store information and instructions. Or it may be other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, blue-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by the computer, but is not limited to this. The memory 903, for example, exists independently and is connected to the processor 901 through the bus 902. The memory 903 may also be integrated with the processor 901.

[0131] The network interface 904 uses any transceiver-like device to communicate with other devices or communication networks, and the communication network can be Ethernet, radio access network (RAN) or wireless local area network (WLAN), etc. The network interface 904 may include a wired network interface and may also include a wireless network interface. Specifically, the network interface 904 may be an Ethernet interface, such as a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network interface or a combination thereof. The Ethernet interface may be an optical interface, an electrical interface or a combination thereof. In some embodiments of the present application, the network interface 904 may be used for the data updated device 900 to communicate with other devices.

[0132] In a specific implementation, as some embodiments, the processor 901 may include one or more CPUs, such as Fig. 9 0 and CPU1 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0133] In a specific implementation, as some implementation methods, the data updating device 900 may include multiple processors, such as Fig. 9 901 and processor 905 shown in FIG. Each of these processors may be a single-core processor or a multi-core processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).

[0134] In some implementations, the memory 903 is used to store program instructions 910 for executing the solution of the present application, and the processor 901 can execute the program instructions 910 stored in the memory 903. That is, the data updating device 900 can implement the method provided in the method embodiment through the processor 901 and the program instructions 910 in the memory 903, that is, Figure 4 The method shown. The program instruction 910 may include one or more software modules. Optionally, the processor 901 itself may also store program instructions for executing the solution of the present application.

[0135] In a specific implementation process, the data updating device 900 of the present application may correspond to a first network element device for executing the above method, and the processor 901 in the data updating device 900 reads the instruction in the memory 903, so that Fig. 9 The data updating device 900 shown can execute all or part of the steps in the method embodiment.

[0136] The data updating device 900 may also correspond to the above Figure 7 or Figure 8 The device shown, Figure 7 or Figure 8 Each functional module in the device shown is implemented by software of the data updating device 900. In other words, Figure 7 or Figure 8 The functional modules included in the device shown are generated after the processor 901 of the data updating device 900 reads the program instructions 910 stored in the memory 903 .

[0137] in, Figure 4 Each step of the method shown is completed by an integrated logic circuit of hardware or software instructions in the processor of the data update device 900. The steps of the method embodiment disclosed in the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory, and completes the steps of the above method embodiment in combination with its hardware. To avoid repetition, it is not described in detail here.

[0138] In an exemplary embodiment, a data updating system is provided, the system comprising a first device and a second device, the first device being configured to execute Figure 4 The method executed by the first device in the second device is used to execute Figure 4 A method performed by a second device in.

[0139] In an exemplary embodiment, a computer program (product) is provided, the computer program (product) comprising: a computer program code, when the computer program code is executed by a computer, the computer executes Figure 4 The method shown.

[0140] In an exemplary embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing a program or instruction, when the program or instruction is executed on a computer, the computer executes the above Figure 4 The method shown.

[0141] In an exemplary embodiment, a chip is provided, including a processor for calling and executing instructions stored in a memory, so that a computer equipped with the chip executes Figure 4 The method shown.

[0142] In an exemplary embodiment, another chip is provided, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the computer equipped with the chip executes Figure 4 The method shown.

[0143] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk), etc.

[0144] In this application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limitation on the quantity and execution order. It should also be understood that although the following description uses the terms first, second, etc. to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another element.

[0145] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0146] The term "at least one" in this application means one or more, and the term "multiple" in this application means two or more, for example, multiple second devices means two or more second devices. The terms "system" and "network" are often used interchangeably herein.

[0147] It should be understood that the terms used in the description of various examples herein are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0148] It should also be understood that the term "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" is a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.

[0149] It should also be understood that the terms "if" and "if" may be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting." Similarly, the phrases "if it is determined that ..." or "if [a stated condition or event] is detected" may be interpreted to mean "upon determining that ..." or "in response to determining that ..." or "upon detecting [a stated condition or event]" or "in response to detecting [a stated condition or event]," depending on the context.

[0150] The above description is only an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for updating data, characterized in that: The method is applied to a first device, and the method includes: Acquire first data and second data, the first data comprising data obtained by compressing third data by at least a first compression method and a second compression method in sequence, the second data comprising data obtained by compressing fourth data by at least the first compression method and the second compression method in sequence, the fourth data being updated based on the third data; Decompress the first data and the second data respectively based on a first decompression method corresponding to the second compression method to obtain a first decompression result and a second decompression result, wherein the first decompression result includes first intermediate data obtained based on the first data, and the second decompression result includes second intermediate data obtained based on the second data; determining first differential data between the second intermediate data and the first intermediate data; The first differential data is sent, where the first differential data is used to update the first data in the second device.

2. The method according to claim 1, characterized in that: The first decompression result also includes first reference data corresponding to the first data, the first reference data being data referenced in a process of compressing the first intermediate data using the second compression method to obtain the first data, and the second decompression result also includes second reference data corresponding to the second data, the second reference data being data referenced in a process of compressing the second intermediate data using the second compression method to obtain the second data; After determining the first difference data between the second intermediate data and the first intermediate data, the method further includes: Determining reference data corresponding to the first differential data according to the first differential data, the first reference data, and the second reference data; The reference data is sent, where the reference data is used to update the first data in the second device.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtain a first data packet including at least one first compressed data and a second data packet including at least one second compressed data, wherein the first data is first compressed data in the first data packet that is different from the at least one second compressed data, and the second data is second compressed data in the second data packet that is different from the at least one first compressed data.

4. The method according to any one of claims 1 to 3, characterized in that: After sending the first differential data, the method further includes: Acquire fifth data and sixth data, wherein the fifth data is of a different type from the first data, and the sixth data is of a different type from the second data; determining second differential data between the fifth data and the sixth data; The second differential data is sent, where the second differential data is used to update fifth data in the second device.

5. A method for updating data, characterized in that: The method is applied to a second device, and the method includes: receiving first differential data corresponding to the first data; Acquire first data in the second device, where the first data in the second device includes data obtained by compressing third data by at least sequentially using a first compression method and a second compression method; decompressing the first data in the second device based on a first decompression method corresponding to the second compression method to obtain a first decompression result, wherein the first decompression result includes first intermediate data obtained based on the first data in the second device; The first data in the second device is updated according to the first intermediate data and the first differential data.

6. The method according to claim 5, characterized in that The updating of the first data in the second device according to the first intermediate data and the first differential data includes: updating the first intermediate data according to the first differential data to obtain third intermediate data; compressing the third intermediate data based on the second compression method to obtain seventh data; The first data in the second device is updated to the seventh data.

7. The method according to claim 5, characterized in that The updating of the first data in the second device according to the first intermediate data and the first differential data includes: updating the first intermediate data according to the first differential data to obtain third intermediate data; According to the reference data corresponding to the first differential data, the third intermediate data is compressed based on the second compression method to obtain seventh data; The first data in the second device is updated to the seventh data.

8. The method according to claim 6 or 7, characterized in that: After the first data in the second device is updated to the seventh data, the method further includes: updating the fifth data in the second device according to the second differential data corresponding to the fifth data to obtain the eighth data, wherein the fifth data in the second device is of a different type from the first data in the second device; The fifth data in the second device is updated to the eighth data.

9. A data updating device, characterized in that: The device is applied to a first device, and includes: an acquisition module, configured to acquire first data and second data, wherein the first data includes data obtained by compressing third data by at least a first compression method and a second compression method in sequence, and the second data includes data obtained by compressing fourth data by at least the first compression method and the second compression method in sequence, and the fourth data is updated based on the third data; a decompression module, configured to decompress the first data and the second data respectively based on a first decompression method corresponding to the second compression method, to obtain a first decompression result and a second decompression result, wherein the first decompression result includes first intermediate data obtained based on the first data, and the second decompression result includes second intermediate data obtained based on the second data; A determination module, configured to determine first differential data between the second intermediate data and the first intermediate data; The sending module is used to send the first differential data, where the first differential data is used to update the first data in the second device.

10. A data updating device, characterized in that: The device is applied to a second device, and includes: A receiving module, used for receiving first differential data corresponding to the first data; an acquisition module, configured to acquire first data in the second device, wherein the first data in the second device includes data obtained by compressing third data by at least sequentially using a first compression method and a second compression method; a decompression module, configured to decompress the first data in the second device based on a first decompression method corresponding to the second compression method to obtain a first decompression result, wherein the first decompression result includes first intermediate data obtained based on the first data in the second device; An updating module is used to update the first data in the second device according to the first intermediate data and the first differential data.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the instruction is loaded and executed by the processor to implement the data updating method described in any one of claims 1-8.

12. A computer program product, characterized in that The computer program product includes a computer program or instructions, and the computer program or instructions are executed by a processor to enable a computer to implement the data updating method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Data update method, apparatus and device, and computer-readable storage medium

    EP4730112A1

  • Data update method, apparatus and device, and computer-readable storage medium

    WO2025015921A1