[go: up one dir, main page]

WO2015074467A1 - Data update method, apparatus, and system and storage medium - Google Patents

Data update method, apparatus, and system and storage medium Download PDF

Info

Publication number
WO2015074467A1
WO2015074467A1 PCT/CN2014/088424 CN2014088424W WO2015074467A1 WO 2015074467 A1 WO2015074467 A1 WO 2015074467A1 CN 2014088424 W CN2014088424 W CN 2014088424W WO 2015074467 A1 WO2015074467 A1 WO 2015074467A1
Authority
WO
WIPO (PCT)
Prior art keywords
package
resource
identifier
updated
update
Prior art date
Application number
PCT/CN2014/088424
Other languages
French (fr)
Chinese (zh)
Inventor
伍星秦
夏盛新
陈彬
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2015074467A1 publication Critical patent/WO2015074467A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of computer data update technologies, and in particular, to a data update method, apparatus, system, and storage medium.
  • Hybrid App is an app between Native App and Web App, which is more easily accepted by developers.
  • the Hybrid App is implemented by embedding a web container in the Native App to load and display web pages.
  • the file composed of the loaded web page becomes a file on the web side.
  • Native App can open the system and even the underlying interface to the Web page in an interface, so that the Web page has more capabilities.
  • the Hybrid App looks the same as the Native App, but it combines the advantages of the Native App and the Web App. The overall features are closer to the Native App, and the Web App is quite different. Although its core has only one Web container, the Web page loaded by this container can use this container to interact with the local information, thus calling the underlying functions to implement complex functions and making up for the defects in Web App capabilities.
  • Hybrid App has more flexibility in web pages loaded through the web container, and it is easier to control the version update.
  • most Hybrid App will store these Web-side files locally, and obtain a new version of the file through a channel, and store the new version of the file locally to complete the update process.
  • One of them is to update the version by means of resource bundles.
  • the resource package refers to a compressed package obtained by packaging the files on the web side.
  • the new version resource package corresponding to the file to be updated can be placed on the CDN (Content Delivery Network), and the App can download and obtain the new version resource package by using the download method. Extract the new version of the resource package to get The new version of the file to overwrite the local original file to complete the file update.
  • the App needs to download a resource package including all the contents of the new version file, which occupies more network bandwidth of the update end, and consumes more time to complete the download.
  • Embodiments of the present invention provide a data update method, apparatus, system, and storage medium, which can complete data update faster when bandwidth requirements are low.
  • an embodiment of the present invention provides a data update method, including:
  • the incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
  • the embodiment of the present invention further provides another data update method, including:
  • the resource package identifier of the to-be-updated version of the file to be updated is generated
  • the received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm.
  • the new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
  • an embodiment of the present invention further provides a data updating apparatus, including:
  • a calculation module configured to calculate, according to the difference algorithm, a difference portion between the new version resource package and each stored historical version resource package according to the difference algorithm, and use the difference part as each historical version resource package Incremental differential package;
  • a storage module configured to store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address
  • a processing module configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the resource pack identifier to be updated; and perform an increment according to the determined packet identifier
  • the differential packet stores the address and responds to the update request to return the found incremental differential packet storage address.
  • the embodiment of the present invention further provides another data updating apparatus, including:
  • a generating module configured to generate a version resource package identifier of the to-be-updated file to be updated when the file to be updated is detected on the local end;
  • a requesting module configured to send an update request to the server, where the update request carries version information of the file to be updated and a version resource package identifier to be updated;
  • a processing module configured to receive a resource package storage address returned by the server according to the version information and the package identifier in the update request, and initiate a download request according to the resource package storage address to obtain a resource package;
  • An update module configured to update the to-be-updated file according to the obtained resource package
  • the received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm.
  • the new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
  • the embodiment of the present invention further provides a data processing system, including: a server and an update end, where
  • the server is configured to calculate, according to the difference algorithm, a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package. Storing each incremental differential packet, and recording the mapping relationship between the packet identifier of each historical version resource bundle and the corresponding incremental differential packet storage address;
  • the update end is configured to send an update request to the server, where the update request includes a version resource package identifier to be updated;
  • the server is further configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; Finding an incremental differential packet storage address and responding to the update request to return the found incremental differential packet storage address;
  • the update end is further configured to issue a download request to download an incremental differential packet according to the returned incremental differential packet storage address, and update the resource package of the file to be updated.
  • embodiments of the present invention also provide a storage medium containing computer executable instructions for performing a data update method when executed by a computer processor, the method comprising the steps of:
  • the incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
  • an embodiment of the present invention further provides another storage medium containing computer executable instructions for performing a data update method when executed by a computer processor, the method comprising the following steps :
  • the resource package identifier of the to-be-updated version of the file to be updated is generated
  • the received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm.
  • the new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
  • the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner.
  • the implementation can only change the corresponding files when the user needs to update the corresponding files. Part of the update to the end, reducing the amount of data required for updates, is conducive to fast downloads, saves bandwidth resources and energy consumption, and saves users' download time.
  • FIG. 1 is a schematic flow chart of a data updating method according to an embodiment of the present invention.
  • FIG. 2 is a schematic flow chart of another data updating method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flow chart of still another data updating method according to an embodiment of the present invention.
  • FIG. 4 is a schematic flow chart of still another data update method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a data update system according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of a data updating apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of one of the specific structures of the memory module of FIG. 7;
  • FIG. 9 is a schematic view showing one of the specific structures of the processing module of Figure 7;
  • FIG. 10 is a schematic structural diagram of still another data updating apparatus according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of still another data updating apparatus according to an embodiment of the present invention.
  • FIG. 12 is a schematic diagram showing one specific structure of the update module in FIG. 11.
  • FIG. 1 is a schematic flowchart of a data update method according to an embodiment of the present invention.
  • the method in the embodiment of the present invention may be applied to a server, for example, an application server or a data server that can provide a data update service.
  • a server for example, an application server or a data server that can provide a data update service.
  • Implement relevant data in the update side of a user terminal or other server The update, specifically, the method includes:
  • the new version resource package includes a compressed package obtained by compressing each file data in the new version, for example, HTML (Hypertext Markup Language) corresponding data in the new version file, JS (JavaScript, A prototype-inherited object-oriented dynamic type client-side scripting language) is a compressed package obtained by compressing data, CSS (Cascading Style Sheet) corresponding data, and/or Image corresponding data.
  • HTML Hypertext Markup Language
  • JS JavaScript, A prototype-inherited object-oriented dynamic type client-side scripting language
  • the server after receiving the new version resource package uploaded by the developer or the new version resource package received by the other manner, receives the new version resource package according to a preset difference algorithm (such as a binary difference algorithm).
  • the calculation process is performed on each historical version resource package of the local storage, and the calculated difference portion of each historical version resource package is used as an incremental difference package of each historical version resource package with respect to the new version resource package.
  • the incremental difference packet includes a different part of the historical version resource package and the new version resource package, and the data amount thereof is significantly smaller than the data amount of the new version resource package.
  • the binary difference algorithm compares the binary of the two files, extracts the difference part and compresses it into a differential packet algorithm
  • the specific implementation can refer to the open source component bsdiff (Binary diff utility).
  • the reference open source component bspatch (Binary patch utility, binary merge tool, corresponding to bsdiff) is used.
  • the received version of the resource package is P
  • the historical version resource package includes: the first version resource package A, the second version resource package B, and the third version resource package C.
  • Three incremental differential packets a first incremental differential packet ⁇ A with a first version of resource bundle A, a second incremental differential packet ⁇ B with a second version of resource B, and a third increase with a third version of resource bundle C
  • S102 Store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address.
  • the calculated incremental differential packets may be stored in the CDN, and the storage address (Uniform Resource Locator) of each incremental differential packet in the CDN is determined.
  • the form stores the packet identifier of the historical version resource bundle and the mapping relationship for the incremental differential packet storage address.
  • the incremental difference packet corresponding to the storage address may update the resource package corresponding to the package identifier of the mapped historical version resource package.
  • the packet identifier of each historical version resource package can be calculated by the MD5 (Message Digest Algorithm Fifth Edition) algorithm.
  • S104 Search for the incremental differential packet storage address according to the determined packet identifier, and return the found incremental differential packet storage address in response to the update request.
  • the update end may initiate an update request to the server by means of a timing update or a user manually triggering the update.
  • the update end is connected to the corresponding server and the update request is sent by the prior art.
  • the packet identifier of the resource package corresponding to the corresponding application file in the update end is carried in the update request, so that the server can determine the historical version of the resource package of the update end.
  • the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update end adopts the same calculation method as the packet identifier of the historical version resource package on the server side, and all of them are negotiated in the form of MD5 and the like. Calculation.
  • the server After receiving the update request of the update end, the server searches for the same historical version of the package identifier in the update request in the mapping relationship recorded in the S102 by using the packet identifier in the update request as a key.
  • the packet identifier of the resource package if the packet identifier of the same historical version resource bundle is found, the incremental differential packet storage address of the packet identifier mapping of the same historical version resource bundle is returned to the update terminal;
  • the same historical version resource package indicates that the resource package of the update side is too old, and the new version resource package is directly returned to the update end.
  • the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner.
  • the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
  • FIG. 2 it is a schematic flowchart of another data update method according to an embodiment of the present invention.
  • the method in the embodiment of the present invention may be applied to an application server to implement update of application data and the like in the update terminal.
  • the version information of the update request and the version information of the new version resource package are added.
  • the same judging operation is used to identify whether the update is required; on the other hand, in the resource mapping library, the package identifier of the historical version resource pack having the same identification value as the update resource pack identifier in the update request is not determined.
  • an operation of returning a new version of the resource package storage address to the update end is added to instruct the update terminal to download the complete new version resource package according to this, thereby improving the success rate of the data update; on the other hand, adding a new version is added.
  • the package of the resource package is identified to the operation of the update end, so that the update end can perform update check according to this. Specifically, the method includes:
  • S201 After receiving the new version resource package, calculate a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package.
  • the difference algorithm may use the above-mentioned binary difference algorithm to calculate and process the new version resource package and the locally stored historical version resource package, and obtain the incremental difference package corresponding to each historical version resource package.
  • S202 Store each incremental differential packet, and determine a storage address of each incremental differential packet.
  • the incremental differential packets can be stored in a server such as a CDN, and the storage address of each incremental differential packet in a server such as a CDN can be determined.
  • S203 Add a delta differential packet storage address corresponding to the packet identifier of each historical version resource package in the preset resource mapping library including the packet identifier of each historical version resource package and the resource package storage address.
  • the resource mapping library is configured to store a mapping relationship between a package identifier of a resource package of each version of the target application and a resource packet storage address, so as to find a corresponding resource package according to the package identifier of the resource package.
  • the package identifier of each historical version resource package can be calculated by the MD5 algorithm.
  • the storage address of the corresponding incremental differential packet is stored, so that the server can not only find the resource packet corresponding to the resource packet identifier, but also Can find the corresponding incremental differential package.
  • the server can not only find the resource packet corresponding to the resource packet identifier, but also Can find the corresponding incremental differential package.
  • S204 Receive an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a version resource package identifier to be updated.
  • the update end may initiate an update request to the server by means of a timing update or a user manually triggering the update.
  • the update end is connected to the corresponding server and the update request is sent by the prior art.
  • the update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end.
  • the file to be updated is an application file to be updated on the local end of the update end.
  • the update request includes not only the version resource package identifier to be updated, but also the historical version of the resource package of the update end,
  • the version information of the file to be updated can be carried.
  • the version information of the file to be updated is the version information corresponding to the file to be updated on the current update end.
  • the version information can identify the current version status of the file to be updated.
  • the server first determines whether the file to be updated on the update end needs to be updated according to the version information of the file to be updated in the update request; if the update needs to be performed, the server receives the update according to the received information.
  • the resource package identifier of the to-be-updated version determines the historical version of the resource package of the update end, so that it can further determine whether the update mode can adopt the incremental update mode according to the determined historical version.
  • the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update terminal is the same as the method of calculating the packet identifier of the historical version resource package on the server side, and all of them are performed by using the identifier code calculation manner in the form of negotiation MD5 or the like. Calculation.
  • S205 Determine whether the version information in the update request is the same as the version information of the new version resource package.
  • the version information in the update request may also be a version identification code (ie, a specific identifier value) obtained by the update end according to the MD5 algorithm for calculating the version number of the target application in the update end, and the version information of the new version resource package.
  • the version identifier of the new version resource package obtained by the server according to the MD5 algorithm for calculating the version number of the new version may also be used.
  • the two version identification codes are compared. If the same, the version information in the update request is the same as the version information of the new version resource package, and the target application of the update end is already the latest version. If the two version identification codes are not the same, it indicates that the update terminal needs to perform subsequent update, and S206 described below is executed.
  • the version identifier of the new version resource package is added in a preset version mapping library including each historical version identifier and its corresponding version number.
  • the S205 may include: determining whether the version identification code in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determining the version information in the update request and the The version information of the new version of the resource bundle is different.
  • S206 If not, determine a packet identifier of the historical version resource package in the resource mapping library that is the same as the identifier value of the version resource resource identifier to be updated in the update request. If the packet identification of the same historical version resource bundle is determined, the following S207 is performed.
  • the packet identifier of the historical version resource package that is the same as the packet identifier in the update request, by using the identifier value of the packet identifier in the update request, if the same history is found.
  • the package identifier of the version resource package the incremental differential package storage address of the package identifier mapping of the same historical version resource package to the update terminal; if the same historical version resource package is not found, the new The storage address of the version resource bundle is directly returned to the update terminal.
  • the update end may initiate an HTTP download request to download a corresponding incremental differential packet or a new version resource bundle according to the incremental differential packet storage address returned by the server or the storage address of the new version resource package, to be used in the target application in the update terminal.
  • Related files are updated.
  • S209 Generate a package identifier of the new version resource package, and return a package identifier of the new version resource package to the update end.
  • the S209 is an optional step.
  • the server may further calculate a packet identifier of the new version resource package by using an algorithm such as MD5, and The package identifier of the version resource package is sent to the update end, so that the update end verifies whether the update is successful according to the package identifier of the new version resource package returned by the server after updating the related file of the target application.
  • the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner.
  • the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
  • marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
  • FIG. 3 it is a schematic flowchart of a data update method according to an embodiment of the present invention.
  • the method in the embodiment of the present invention may be applied to an update terminal, such as a smart phone, a tablet computer, a personal computer, or an intelligent device.
  • an update terminal such as a smart phone, a tablet computer, a personal computer, or an intelligent device.
  • terminal devices such as wearable devices.
  • This embodiment can be applied to the server on the server side.
  • the data update method works in conjunction with it. Specifically, the method includes:
  • S301 Generate a to-be-updated version resource package identifier of the to-be-updated file when detecting the update of the file to be updated on the local end;
  • the related file of the target application of the local end may be updated by means of a timing update or a user manually triggering an update.
  • the update end detects the timing or manually triggers, the update end calculates the packet identifier of the resource package corresponding to the file to be updated corresponding to the target application by using the MD5 algorithm.
  • the update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end.
  • the version information in the update request may also be a version identification code obtained by the update end to the version number of the target application as calculated by the MD5 algorithm.
  • S302 Send an update request to the server, where the update request carries version information of the file to be updated and a version resource package identifier to be updated;
  • the update end connects to the corresponding server and sends an update request can be implemented by the prior art.
  • the version information carried in the update request is used to enable the server to determine whether it needs to respond to the update request to return the corresponding data to complete the update; and the package identifier of the file resource package to be updated carried in the update request is used to indicate the service.
  • Which update resource packet is sent that is, whether the incremental differential packet is sent to complete the data update in incremental differential manner, or whether a complete new version resource resource packet is sent to complete the data update in an alternate manner.
  • the received resource packet storage address that is received includes an incremental differential packet storage address or a new version resource resource storage address.
  • the incremental differential packet is a difference portion between the new version resource package corresponding to the file to be updated and the stored historical version resource package in the server according to the difference algorithm.
  • the server selects the corresponding resource package (incremental differential packet or new version resource package) according to the version information and the package identifier in the update request, and returns the storage address to the update terminal.
  • 1 to FIG. 2 correspond to the description of the embodiment, and details are not described herein.
  • the server can determine the packet identifier of the historical version resource bundle that is the same as the identifier value of the version resource bundle identifier to be updated in the update request
  • the resource packet storage address received by the update terminal is the incremental differential packet storage address.
  • the incremental differential packet is: the server calculates the pending according to the difference algorithm
  • the new version resource package corresponding to the new file and the stored package identifier are the difference parts of the historical version resource package identified by the resource pack to be updated.
  • the resource packet storage address received by the update terminal is the new version resource resource storage address.
  • the embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time.
  • FIG. 4 it is a schematic flowchart of another method for updating data according to an embodiment of the present invention.
  • the method in the embodiment of the present invention may be applied to an update terminal, such as a smart phone, a tablet computer, a personal computer, or an intelligent device.
  • terminal devices such as wearable devices.
  • the embodiment is based on the foregoing data update method applied on the update end: on the one hand, the operation of updating the file to be updated according to the resource package storage address returned by the server is added; on the other hand, the service according to the service is added.
  • the packet identifier of the new version of the resource bundle sent by the terminal is updated and verified.
  • the method includes:
  • S401 Generate a to-be-updated version resource package identifier of the to-be-updated file when detecting the update of the file to be updated on the local end;
  • S402 Send an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
  • the receiving server sends a download request according to the resource package storage address to obtain a resource package according to the version information in the update request and the resource package storage address returned by the package identifier.
  • the S404 includes: adding the incremental differential packet according to a preset merging algorithm, if the resource packet that is obtained by downloading the resource packet according to the resource packet storage address is an incremental differential packet, The resource package of the update file is merged to obtain the resource package of the updated file to be updated; and the obtained resource package of the updated file to be updated is decompressed, and the updated file is obtained.
  • the S404 includes: decompressing the obtained new version resource package, and obtaining the updated file.
  • S405 Receive a packet identifier of a new version resource package returned by the server.
  • the server After the server sends the storage address of the corresponding resource package, the server can also calculate its new value by using the MD5 algorithm.
  • the package ID of the version resource bundle, and then the package ID of the new version resource bundle is sent to the update side.
  • S406 Perform calculation on the resource package of the file after the update is completed, and obtain an update package identifier of the updated file resource package.
  • the file is compressed to obtain the updated file resource package, and the package identifier of the updated file resource package is calculated by using the MD5 algorithm or the like.
  • S407 Compare the received package identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails.
  • the update failure prompt may be sent in S407, so that the user can re-initiate the update. .
  • the update check may be performed first, and if the update check is successful, the file to be updated is updated according to the obtained resource package.
  • the method further includes: receiving a package identifier of the new version resource package returned by the server;
  • the method further includes:
  • the method further includes: receiving a package identifier of the new version resource package returned by the server;
  • Embodiments of the present invention make the update end related to the target application When the file is updated, it can download only the different parts, which reduces the amount of data required for the update, facilitates quick download, saves bandwidth resources and energy consumption, and saves the user's download time. Moreover, marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
  • FIG. 5 is a schematic structural diagram of a data update system according to an embodiment of the present invention.
  • the system in the embodiment of the present invention includes: a server 1 and an update terminal 2, where the server 1 can provide data for various types.
  • An application server or a data server that updates a service such as a terminal device such as a smartphone, a tablet, a personal computer, or a smart wearable device, or another server that needs to update data. specific,
  • the server 1 is configured to calculate, according to a difference algorithm, a difference part between a new version resource package and each stored historical version resource package according to a difference algorithm, and use the difference part as an incremental difference of each historical version resource package.
  • a packet storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
  • the update end 2 is configured to send an update request to the server 1 , where the update request includes a file version resource package identifier to be updated;
  • the server 1 is further configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; Identifying an incremental differential packet storage address and responding to the update request to return the found incremental differential packet storage address;
  • the update terminal 2 is further configured to issue a download request to download an incremental differential packet according to the returned incremental differential packet storage address, to update the file to be updated.
  • FIG. 6 is a schematic structural diagram of a data updating apparatus according to an embodiment of the present invention.
  • the apparatus in the embodiment of the present invention may be configured in a server that performs data update for various applications, and may be specifically configured in the foregoing.
  • the device includes:
  • the calculating module 11 is configured to: after receiving the new version resource package, calculate a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package;
  • the storage module 12 is configured to store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
  • the processing module 13 is configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; The amount differential packet stores the address and responds to the update request to return the found incremental differential packet storage address.
  • the update of the related data in the update terminal may be implemented by the server releasing a new version of the resource package.
  • the new version resource package includes a compressed package obtained by compressing each file data in the new version, for example, compressing HTML corresponding data, JS corresponding data, CSS corresponding data, and Image corresponding data in the new version file. Compressed package.
  • the calculation module 11 after receiving the new version resource package uploaded by the developer or the new version resource package received by the other method, performs a new version according to a preset difference algorithm (such as a binary difference algorithm).
  • the resource package is calculated and processed by each historical version resource package of the local storage, and the calculated difference portion of each historical version resource package is used as an incremental difference package of each historical version resource package with respect to the new version resource package.
  • the incremental difference packet includes a different part of the historical version resource package and the new version resource package, and the data amount thereof is significantly smaller than the data amount of the new version resource package.
  • the binary difference algorithm compares the binary of the two files, extracts the difference part and compresses it, and becomes a differential packet algorithm.
  • the specific implementation can refer to the open source components bsdiff and bspatch.
  • the storage module 12 may store the calculated incremental differential packets into the CDN, and determine a storage address, ie, a URL, of each incremental differential packet in the CDN.
  • the packet identifier of the historical version resource package and the mapping for the incremental differential packet storage address may be stored in the form of a resource mapping library or a mapping table. relationship.
  • the incremental difference packet corresponding to the storage address may update the resource package corresponding to the package identifier of the mapped historical version resource package.
  • the packet identifier of each historical version resource package can be calculated by the MD5 (Message Digest Algorithm Fifth Edition) algorithm.
  • the update end may initiate an update request to the server by means of a timing update or a user manually triggering the update.
  • the update end is connected to the corresponding server and the update request is sent by the prior art.
  • the packet identifier of the resource package corresponding to the corresponding application file in the update end is carried in the update request, so that the server can determine the historical version of the resource package of the update end.
  • the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update end adopts the same calculation method as the packet identifier of the historical version resource package on the server side, and all of them are negotiated in the form of MD5 and the like. Calculation.
  • the processing module 13 After receiving the update request of the update end, the processing module 13 searches for the identifier value and the package in the update request in the mapping relationship recorded in the storage module 12 by using the packet identifier in the update request as a key. Identifying the packet identifier of the same historical version resource package, if the packet identifier of the same historical version resource package is found, the processing module 13 returns the incremental differential packet storage address of the package identifier mapping of the same historical version resource package to If the resource pack of the update end is too old, the processing module 13 directly returns the new version resource package to the update end.
  • the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner.
  • the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
  • FIG. 7 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention.
  • the apparatus in the embodiment of the present invention may be configured in a server in the foregoing system embodiment, and includes the corresponding embodiment in FIG.
  • the device further includes: a recording module 14 and an identifier sending module 15 in the computing module 11, the storage module 12, and the processing module 13.
  • the storage module 12 includes:
  • the storage unit 121 is configured to store each incremental differential packet and determine a storage address of each incremental differential packet.
  • the storage unit 121 may store the incremental differential packet into a server such as a CDN, and determine each increment.
  • the recording unit 122 is configured to add an incremental differential packet storage address corresponding to the package identifier of each historical version resource package in the preset resource mapping library including the packet identifier of each historical version resource package and the resource package storage address.
  • the resource mapping library is configured to store a mapping relationship between a package identifier of a resource package of each version of the target application and a resource packet storage address, so as to find a corresponding resource package according to the package identifier of the resource package.
  • the package identifier of each historical version resource package can be calculated by the MD5 algorithm.
  • the recording unit 122 stores the storage address of the corresponding incremental differential packet, so that not only the resource packet corresponding to the resource packet identifier but also the resource packet corresponding to the resource packet identifier can be found. Can find the corresponding incremental differential package.
  • the processing module 13 may include:
  • the receiving unit 131 is configured to receive an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a version resource package identifier to be updated.
  • the update request received by the receiving unit 131 may be that the update end may initiate an update request to the server by means of a timing update or a user manually triggering an update.
  • the determining unit 132 is configured to determine whether the version information in the update request is the same as the version information of the new version resource package.
  • the version information in the update request may also be a version identification code (ie, a specific identifier value) obtained by the update end according to the MD5 algorithm for calculating the version number of the target application in the update end, and the version information of the new version resource package.
  • the version identifier of the new version resource package obtained by the server according to the MD5 algorithm for calculating the version number of the new version may also be used.
  • the determining unit 132 compares the two version identification codes.
  • the version information in the update request is the same as the version information of the new version resource package, and indicates that the target application of the update end is already the latest version; If the two version identification codes are different, it indicates that the update end needs to perform subsequent update, and the determining unit 133 described below is notified.
  • a determining unit 133 configured to determine, if not identical, a package identifier of a historical version resource package in the resource mapping library that is the same as an identifier value of the version resource resource identifier to be updated in the update request;
  • the first sending unit 134 is configured to return, to the update end, an incremental differential packet storage address corresponding to the packet identifier of the same historical version resource package in the resource mapping library.
  • the determining unit 132 is specifically configured to determine whether the version identifier in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determine the update request.
  • the version information in the version is different from the version information of the new version resource package.
  • processing module 13 may further include:
  • a second sending unit 135, configured to: if the packet identifier of the historical version resource package that is the same as the identifier value of the version resource resource identifier to be updated in the update request is not determined in the resource mapping library, the new The storage address of the version resource bundle is returned to the update terminal.
  • the recording module 14 of the embodiment of the present invention is configured to: when receiving a new version resource package, add the new version in a preset version mapping library including each historical version identifier and its corresponding version number. The mapping between the version identifier of the resource bundle and the new version number.
  • the identifier sending module 15 is configured to generate a packet identifier of the new version resource bundle, and return a packet identifier of the new version resource bundle to the update terminal.
  • the identifier sending module 15 may further calculate a packet identifier of the new version resource package by using an algorithm such as MD5, and the new version resource package is The package identifier is sent to the update end, so that the update end verifies whether the update is successful according to the package identifier of the new version resource package returned by the server after updating the related file of the target application.
  • the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner.
  • the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
  • marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
  • FIG. 10 is a schematic structural diagram of another data update apparatus according to an embodiment of the present invention.
  • the apparatus according to the embodiment of the present invention may be applied to various types of intelligent terminal equipment, and may be specifically configured in the foregoing system implementation.
  • the device includes:
  • the generating module 21 is configured to generate a version resource package identifier of the to-be-updated file to be updated when the file to be updated is detected on the local end;
  • the requesting module 22 is configured to send an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
  • the processing module 23 is configured to receive, by the server, a resource package storage address that is returned according to the version information and the packet identifier in the update request, and initiate a download request according to the resource package storage address to obtain the resource package;
  • An update module 24, configured to update the to-be-updated file resource package according to the obtained resource package
  • the received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, where the incremental differential packet is a new one corresponding to the file to be updated in the server according to the difference algorithm calculation server The difference between the version resource bundle and the stored historical version resource bundle.
  • the related file of the target application of the local end may be updated by means of a timing update or a user manually triggering an update.
  • the detecting module 21 calculates the packet identifier of the file resource package to be updated corresponding to the target application by means of the MD5 algorithm or the like when the timing is detected or manually triggered.
  • the update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end.
  • the update end connects to the corresponding server and sends an update request can be implemented by the prior art.
  • the version information carried by the requesting module 22 in the update request is used to enable the server to determine whether it needs to respond to the update request to return the corresponding data to complete the update; and the package identifier of the file resource package to be updated carried in the update request is Used to indicate which update resource package the server wants to send.
  • the version information in the update request may also be a version identification code obtained by the generating module 21 after the version number of the target application is calculated by the MD5 algorithm.
  • the resource packet storage address received by the update terminal is the incremental differential packet storage address.
  • the incremental differential packet is: the server calculates a new version of the resource package corresponding to the file to be updated according to the difference algorithm, and the difference between the stored version of the resource identifier and the historical version resource package of the resource package to be updated.
  • the resource packet storage address received by the update terminal is the new version resource resource storage address.
  • the embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time.
  • FIG. 11 is a schematic structural diagram of another data update apparatus according to an embodiment of the present invention.
  • the apparatus according to the embodiment of the present invention may be applied to various types of intelligent terminal devices, including the generation module in the corresponding embodiment of FIG.
  • the requesting module 22, the processing module 23, and the updating module 24, in the embodiment of the present invention, the apparatus further includes: a receiving module 25 and a prompting module 26.
  • the update module 24 in the embodiment of the present invention may include:
  • the calculating unit 241 is configured to combine the incremental differential package and the resource package of the file to be updated according to a preset merging algorithm to obtain a resource package of the updated file to be updated;
  • the updating unit 242 is configured to decompress the obtained resource package of the updated file to be updated, and obtain the updated file.
  • the update module 24 may further include: if the resource request is generated according to the resource package storage address, and the resource package obtained by the resource package download is a new version resource package, the update module 24 may further include:
  • the decompressing unit 243 is configured to decompress the obtained new version resource package, and obtain the updated file.
  • the receiving module 25 is configured to receive a packet identifier of a new version resource package returned by the server;
  • the generating module 21 is further configured to calculate, by using the resource package of the file that is updated, to obtain an update package identifier of the resource package of the updated file;
  • the prompting module 26 is configured to compare the received package identifier of the new version resource package with the generated update package identifier, and if not, issue a prompt for indicating that the update fails.
  • the server may also use the MD5 algorithm to calculate the package identifier of the new version resource package, and then send the package identifier of the new version resource package to the update end.
  • the receiving module 25 receives the packet identifier of the new version resource package returned by the server.
  • the update unit After the update unit obtains the updated file by the update unit 242 or the decompression unit 243, the update unit compresses the file to obtain the updated file resource package, and calculates the package identifier of the updated file resource package by using the MD5 algorithm or the like.
  • the device further includes: a first receiving module, if the resource request according to the resource package storage address is initiated to obtain a resource packet downloaded by the resource package as an incremental differential packet, the device further includes: (not shown) and a first prompting module (not shown); wherein:
  • the first receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
  • the generating module is further configured to: after the calculating unit 241 obtains the updated resource package of the file to be updated, before the updating unit 242 decompresses the obtained resource package of the updated file to be updated And calculating a resource package of the updated file to be updated, to obtain an update package identifier;
  • the first prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication
  • the updating unit performs an operation of decompressing the updated resource package of the file to be updated obtained by the decompression.
  • the device further includes: a second receiving module, if the resource request is generated by the resource package storage address to obtain the resource package downloaded by the resource package, And a second prompt module; wherein:
  • the second receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
  • the generating module is further configured to: after the processing module 23 obtains the new version resource package, calculate the acquired new version resource package before the decompressing unit decompresses the obtained new version resource package , get the update package identifier;
  • the second prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication
  • the decompression unit performs an operation of decompressing the resource package of the updated file to be updated obtained by the decompression.
  • the embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time.
  • marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
  • an embodiment of the present invention provides a storage medium including computer executable instructions for executing a data update method when executed by a computer processor, the method comprising the following steps:
  • the incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
  • the method may specifically include the data update method applied to the server provided by any embodiment of the present invention.
  • an embodiment of the present invention provides another storage medium including computer executable instructions for executing a data update method when executed by a computer processor, the method comprising the following steps:
  • the resource package identifier of the to-be-updated version of the file to be updated is generated
  • the received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm.
  • the new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
  • the method may specifically include the data update method applied to the update end provided by any embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

Embodiments of the present invention provide a data update method, apparatus, system, and storage medium. The method applied on a serving end comprises: after a new-version resource package is received, computing a differential portion between the new-version resource package and each stored historical version resource package according to a differential algorithm, and using the differential portion as an incremental differential package of each historical version resource package; storing each incremental differential package, and recording a mapping relationship between a package identifier of each historical version resource package and a storage address of a corresponding incremental differential package; if an update request carrying an identifier of a version resource package to be updated is received, determining a package identifier of a historical version resource package having a same identifier value as that of the identifier of the version resource package to be updated; and searching for a storage address of an incremental differential package according to the determined package identifier, and returning the found storage address of the incremental differential package in response to the update request. By means of the technical solutions provided in the embodiments of the present invention, data update can be completed more rapidly in a case where a bandwidth requirement is relatively low, thereby saving bandwidth resources and energy consumption, and saving download time of a user.

Description

一种数据更新方法、装置、系统及存储介质Data update method, device, system and storage medium
本专利申请要求于2013年11月25日提交的、申请号为201310603835.1、申请人为腾讯科技(上海)有限公司、发明名称为“一种数据更新方法、装置及系统”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中。This patent application claims priority from Chinese patent application filed on November 25, 2013, the application number is 201310603835.1, the applicant is Tencent Technology (Shanghai) Co., Ltd., and the invention name is "a data update method, device and system". The entire content of this application is incorporated herein by reference.
技术领域Technical field
本发明涉及计算机数据更新技术领域,尤其涉及一种数据更新方法、装置、系统及存储介质。The present invention relates to the field of computer data update technologies, and in particular, to a data update method, apparatus, system, and storage medium.
背景技术Background technique
在实际应用开发中,Hybrid App(混合应用)是一种介于Native App(本地应用)与Web App(网络应用)之间的一种App(应用),更容易被开发者接受。Hybrid App的实现原理是:在Native App里面嵌入一个Web容器,来加载和展示Web页面。其中,所加载的Web页面所组成的文件成为Web端的文件。Native App可以以接口的方式向Web页面开放系统甚至底层的接口,让Web页面拥有更多能力。Hybrid App从外观看起来和Native App无异,但它兼有Native App和Web App的优点,总体特性更接近Native App,而和Web App区别较大。虽然它的核心只有一个Web容器,但是通过这个容器加载的Web页面能够借助这个容器和本地进行信息交互,从而调用底层的功能实现复杂的功能,弥补了Web App能力上的缺陷。In real-world application development, Hybrid App is an app between Native App and Web App, which is more easily accepted by developers. The Hybrid App is implemented by embedding a web container in the Native App to load and display web pages. The file composed of the loaded web page becomes a file on the web side. Native App can open the system and even the underlying interface to the Web page in an interface, so that the Web page has more capabilities. The Hybrid App looks the same as the Native App, but it combines the advantages of the Native App and the Web App. The overall features are closer to the Native App, and the Web App is quite different. Although its core has only one Web container, the Web page loaded by this container can use this container to interact with the local information, thus calling the underlying functions to implement complex functions and making up for the defects in Web App capabilities.
Hybrid App通过Web容器加载的Web页面有更高的灵活性,对于版本的更新控制也更加简便。但是由于Hybrid App存在离线使用的需求,大部分Hybrid App会把这些Web端的文件存放在本地,而通过一个渠道来获取新版本的文件,将新版本的文件存放到本地以完成更新的过程。通过资源包的方式来进行版本的更新就是其中的一种。其中,资源包指的是:将Web端的文件打包之后得到的压缩包。在目前的资源包更新过程中,需要更新的文件所对应的新版本资源包可以放在CDN(Content Delivery Network,内容分发网络)上,App可以通过下载的方式下载得到新版本资源包,进而使用对所述新版资源包解压后得到 的新版本文件来覆盖本地的原文件即可完成文件更新。Hybrid App has more flexibility in web pages loaded through the web container, and it is easier to control the version update. However, due to the need for offline use of Hybrid App, most Hybrid App will store these Web-side files locally, and obtain a new version of the file through a channel, and store the new version of the file locally to complete the update process. One of them is to update the version by means of resource bundles. The resource package refers to a compressed package obtained by packaging the files on the web side. In the current resource package update process, the new version resource package corresponding to the file to be updated can be placed on the CDN (Content Delivery Network), and the App can download and obtain the new version resource package by using the download method. Extract the new version of the resource package to get The new version of the file to overwrite the local original file to complete the file update.
在现有技术中,App需要下载包括新版本文件的所有内容的资源包,这会占用更新端当前较多的网络带宽,并且会消耗较多的时间来完成下载。In the prior art, the App needs to download a resource package including all the contents of the new version file, which occupies more network bandwidth of the update end, and consumes more time to complete the download.
发明内容Summary of the invention
本发明实施例提供一种数据更新方法、装置、系统及存储介质,可在对带宽要求较低的情况下较快地完成数据更新。Embodiments of the present invention provide a data update method, apparatus, system, and storage medium, which can complete data update faster when bandwidth requirements are low.
为了解决上述问题,本发明实施例提供了一种数据更新方法,包括:In order to solve the above problem, an embodiment of the present invention provides a data update method, including:
当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;After receiving the new version resource package, calculating a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and using the difference part as the incremental difference package of each historical version resource package;
存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;Storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;And if the update request carrying the identifier of the resource pack to be updated is received, determining a packet identifier of the historical version resource package that is the same as the identifier value of the resource pack identifier to be updated;
根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
相应地,本发明实施例还提供了另一种数据更新方法,包括:Correspondingly, the embodiment of the present invention further provides another data update method, including:
在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;When the update of the file to be updated on the local end is detected, the resource package identifier of the to-be-updated version of the file to be updated is generated;
向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和待更新版本资源包标识;Sending an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;Receiving, by the server, the downloading request according to the resource package storage address to obtain the resource package according to the version information in the update request and the resource package storage address returned by the package identifier, and updating the to-be-updated file according to the obtained resource package. ;
其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
相应地,本发明实施例还提供了一种数据更新装置,包括:Correspondingly, an embodiment of the present invention further provides a data updating apparatus, including:
计算模块,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包 的增量差分包;a calculation module, configured to calculate, according to the difference algorithm, a difference portion between the new version resource package and each stored historical version resource package according to the difference algorithm, and use the difference part as each historical version resource package Incremental differential package;
存储模块,用于存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;a storage module, configured to store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
处理模块,用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。a processing module, configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the resource pack identifier to be updated; and perform an increment according to the determined packet identifier The differential packet stores the address and responds to the update request to return the found incremental differential packet storage address.
相应地,本发明实施例还提供了另一种数据更新装置,包括:Correspondingly, the embodiment of the present invention further provides another data updating apparatus, including:
生成模块,用于在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;a generating module, configured to generate a version resource package identifier of the to-be-updated file to be updated when the file to be updated is detected on the local end;
请求模块,用于向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和待更新版本资源包标识;a requesting module, configured to send an update request to the server, where the update request carries version information of the file to be updated and a version resource package identifier to be updated;
处理模块,用于接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包;a processing module, configured to receive a resource package storage address returned by the server according to the version information and the package identifier in the update request, and initiate a download request according to the resource package storage address to obtain a resource package;
更新模块,用于根据获取的资源包更新所述待更新文件;An update module, configured to update the to-be-updated file according to the obtained resource package;
其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
相应地,本发明实施例还提供了一种数据处理系统,包括:服务端和更新端,其中,Correspondingly, the embodiment of the present invention further provides a data processing system, including: a server and an update end, where
所述服务端,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;The server is configured to calculate, according to the difference algorithm, a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package. Storing each incremental differential packet, and recording the mapping relationship between the packet identifier of each historical version resource bundle and the corresponding incremental differential packet storage address;
所述更新端,用于向所述服务端发送更新请求,所述更新请求中包括待更新版本资源包标识;The update end is configured to send an update request to the server, where the update request includes a version resource package identifier to be updated;
所述服务端,还用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址; The server is further configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; Finding an incremental differential packet storage address and responding to the update request to return the found incremental differential packet storage address;
所述更新端,还用于根据所述返回的增量差分包存储地址发出下载请求下载增量差分包,以对待更新文件的资源包进行更新。The update end is further configured to issue a download request to download an incremental differential packet according to the returned incremental differential packet storage address, and update the resource package of the file to be updated.
相应地,本发明实施例还提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,所述方法包括以下步骤:Accordingly, embodiments of the present invention also provide a storage medium containing computer executable instructions for performing a data update method when executed by a computer processor, the method comprising the steps of:
当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;After receiving the new version resource package, calculating a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and using the difference part as the incremental difference package of each historical version resource package;
存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;Storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;And if the update request carrying the identifier of the resource pack to be updated is received, determining a packet identifier of the historical version resource package that is the same as the identifier value of the resource pack identifier to be updated;
根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
相应地,本发明实施例还提供了另一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,所述方法包括以下步骤:Accordingly, an embodiment of the present invention further provides another storage medium containing computer executable instructions for performing a data update method when executed by a computer processor, the method comprising the following steps :
在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;When the update of the file to be updated on the local end is detected, the resource package identifier of the to-be-updated version of the file to be updated is generated;
向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和所述待更新版本资源包标识;Sending an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;Receiving, by the server, the downloading request according to the resource package storage address to obtain the resource package according to the version information in the update request and the resource package storage address returned by the package identifier, and updating the to-be-updated file according to the obtained resource package. ;
其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。本发明实施例可以在服务端发布对目标应用相应文件进行更新的新版本资源包时,能够得到新版本资源包与各历史版本资源包的差分部分的增量差分包,并根据映射存储的方式实现在用户需要对相应文件进行更新时,能够仅将其中不同的 部分给更新端,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle. When the server releases the new version resource package that updates the corresponding file of the target application, the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner. The implementation can only change the corresponding files when the user needs to update the corresponding files. Part of the update to the end, reducing the amount of data required for updates, is conducive to fast downloads, saves bandwidth resources and energy consumption, and saves users' download time.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显然,以下描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are merely Some of the embodiments of the present invention can be obtained by those skilled in the art from the drawings without any inventive effort.
图1是本发明实施例的一种数据更新方法的流程示意图;1 is a schematic flow chart of a data updating method according to an embodiment of the present invention;
图2是本发明实施例的另一种数据更新方法的流程示意图;2 is a schematic flow chart of another data updating method according to an embodiment of the present invention;
图3是本发明实施例的再一种数据更新方法的流程示意图;3 is a schematic flow chart of still another data updating method according to an embodiment of the present invention;
图4是本发明实施例的又一种数据更新方法的流程示意图;4 is a schematic flow chart of still another data update method according to an embodiment of the present invention;
图5是本发明实施例的一种数据更新系统的结构示意图;FIG. 5 is a schematic structural diagram of a data update system according to an embodiment of the present invention; FIG.
图6是本发明实施例的一种数据更新装置的结构示意图;6 is a schematic structural diagram of a data updating apparatus according to an embodiment of the present invention;
图7是本发明实施例的另一种数据处理装置的结构示意图;FIG. 7 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention; FIG.
图8是图7中的存储模块的其中一种具体结构示意图;8 is a schematic diagram of one of the specific structures of the memory module of FIG. 7;
图9是图7中的处理模块的其中一种具体结构示意图;Figure 9 is a schematic view showing one of the specific structures of the processing module of Figure 7;
图10是本发明实施例的再一种数据更新装置的结构示意图;FIG. 10 is a schematic structural diagram of still another data updating apparatus according to an embodiment of the present invention; FIG.
图11是本发明实施例的又一种数据更新装置的结构示意图;11 is a schematic structural diagram of still another data updating apparatus according to an embodiment of the present invention;
图12是图11中的更新模块的其中一种具体结构示意图。FIG. 12 is a schematic diagram showing one specific structure of the update module in FIG. 11.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部实施例,是为了阐述本发明的原理,而不是要将本发明限于这些具体的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments, The present invention is not limited by these specific embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the invention.
请参见图1,是本发明实施例的一种数据更新方法的流程示意图,本发明实施例的所述方法可应用在服务端,例如各类可提供数据更新服务的应用服务器或者数据服务器中,实现对诸如用户终端或者其他服务器的更新端中相关数据 的更新,具体的,所述方法包括:1 is a schematic flowchart of a data update method according to an embodiment of the present invention. The method in the embodiment of the present invention may be applied to a server, for example, an application server or a data server that can provide a data update service. Implement relevant data in the update side of a user terminal or other server The update, specifically, the method includes:
S101:当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包。S101: After receiving the new version resource package, calculate a difference part between the new version resource package and each stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package.
当应用开发者对原应用有更新时,可通过服务端发布新版本资源包的形式实现对更新端中的相关数据的更新。所述的新版本资源包包括对新版本中各个文件数据进行压缩后得到的一个压缩包,例如:将新版本文件中的HTML(Hypertext Markup Language,超文本标记语言)对应数据、JS(JavaScript,一种原型化继承的面向对象的动态类型的客户端脚本语言)对应数据、CSS(Cascading Style Sheet,级联样式表)对应数据和/或Image(图片)对应数据等压缩后得到的压缩包。When the application developer has an update to the original application, the update of the related data in the update terminal may be implemented by the server releasing a new version of the resource package. The new version resource package includes a compressed package obtained by compressing each file data in the new version, for example, HTML (Hypertext Markup Language) corresponding data in the new version file, JS (JavaScript, A prototype-inherited object-oriented dynamic type client-side scripting language) is a compressed package obtained by compressing data, CSS (Cascading Style Sheet) corresponding data, and/or Image corresponding data.
在本发明实施例中,服务端在接收到开发者上传的新版本资源包或者通过其他方式接收到的新版本资源包后,根据预置的差分算法(如二进制差分算法)对新版本资源包与本地存储的各个历史版本资源包进行计算处理,将计算得到的各历史版本资源包的差分部分作为各历史版本资源包相对于新版本资源包的增量差分包。所述增量差分包中包括了历史版本资源包与新版本资源包中不同的部分,其数据量会明显小于新版本资源包的数据量。具体的,二进制差分算法为对两个文件的二进制进行对比,将其差分的部分提取出来进行压缩,成为一个差分包的算法,具体实现可参考开源组件bsdiff(Binary diff utility,二进制差分工具),在进行增量差分包与旧版本资源包合并时对应参考开源组件bspatch(Binary patch utility,二进制合并工具,与bsdiff对应)等。In the embodiment of the present invention, after receiving the new version resource package uploaded by the developer or the new version resource package received by the other manner, the server receives the new version resource package according to a preset difference algorithm (such as a binary difference algorithm). The calculation process is performed on each historical version resource package of the local storage, and the calculated difference portion of each historical version resource package is used as an incremental difference package of each historical version resource package with respect to the new version resource package. The incremental difference packet includes a different part of the historical version resource package and the new version resource package, and the data amount thereof is significantly smaller than the data amount of the new version resource package. Specifically, the binary difference algorithm compares the binary of the two files, extracts the difference part and compresses it into a differential packet algorithm, and the specific implementation can refer to the open source component bsdiff (Binary diff utility). When the incremental differential package is merged with the old version resource package, the reference open source component bspatch (Binary patch utility, binary merge tool, corresponding to bsdiff) is used.
例如,接收到的新版本资源包为P,各历史版本资源包包括:第一版本资源包A、第二版本资源包B和第三版本资源包C,则执行完毕上述操作S101后,可以得到三个增量差分包:与第一版本资源包A的第一增量差分包ΔA、与第二版本资源B的第二增量差分包ΔB、以及与第三版本资源包C的第三增量差分包ΔC。S102:存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系。For example, the received version of the resource package is P, and the historical version resource package includes: the first version resource package A, the second version resource package B, and the third version resource package C. Three incremental differential packets: a first incremental differential packet ΔA with a first version of resource bundle A, a second incremental differential packet ΔB with a second version of resource B, and a third increase with a third version of resource bundle C The quantity difference packet ΔC. S102: Store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address.
可以将计算出的各增量差分包存储到CDN中,并确定各增量差分包在CDN中的存储地址即URL(Uniform Resource Locator,统一资源定位符)。在存储每一个历史版本资源包对应的增量差分包后,可通过一个资源映射库或者映射表 的形式存储历史版本资源包的包标识及对于增量差分包存储地址的映射关系。在该映射关系中,对应存储地址的增量差分包可以对映射的历史版本资源包的包标识对应的资源包进行更新。其中,可以通过MD5(消息摘要算法第五版)算法来计算每一个历史版本资源包的包标识。The calculated incremental differential packets may be stored in the CDN, and the storage address (Uniform Resource Locator) of each incremental differential packet in the CDN is determined. After storing the incremental differential packets corresponding to each historical version resource package, you can pass a resource mapping library or mapping table. The form stores the packet identifier of the historical version resource bundle and the mapping relationship for the incremental differential packet storage address. In the mapping relationship, the incremental difference packet corresponding to the storage address may update the resource package corresponding to the package identifier of the mapped historical version resource package. The packet identifier of each historical version resource package can be calculated by the MD5 (Message Digest Algorithm Fifth Edition) algorithm.
S103:若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;S103: If an update request carrying the resource pack identifier to be updated is received, determining a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier;
S104:根据确定的包标识查找增量差分包存储地址,并响应所述更新请求返回查找到的增量差分包存储地址。S104: Search for the incremental differential packet storage address according to the determined packet identifier, and return the found incremental differential packet storage address in response to the update request.
更新端可以通过定时更新或者用户手动触发更新等方式向服务端发起更新请求,更新端连接到对应服务端并发送更新请求可通过现有技术实现。其中,在所述更新请求中,会携带更新端中相应应用文件所对应的资源包的包标识,以便于服务端能够确定更新端的资源包所处的历史版本。同样,更新端中计算相应应用文件所对应的资源包的包标识的方式,采用与服务端侧对历史版本资源包的包标识相同的计算方式,均通过协商的MD5等形式的标识码计算方式进行计算。The update end may initiate an update request to the server by means of a timing update or a user manually triggering the update. The update end is connected to the corresponding server and the update request is sent by the prior art. The packet identifier of the resource package corresponding to the corresponding application file in the update end is carried in the update request, so that the server can determine the historical version of the resource package of the update end. Similarly, the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update end adopts the same calculation method as the packet identifier of the historical version resource package on the server side, and all of them are negotiated in the form of MD5 and the like. Calculation.
服务端在接收到更新端的更新请求后,以所述更新请求中的包标识作为关键字在所述S102中记录的映射关系中,查找标识值与所述更新请求中的包标识相同的历史版本资源包的包标识,如果查找到相同的历史版本资源包的包标识,则将该相同的历史版本资源包的包标识映射的增量差分包存储地址返回给所述更新端;如果没有查找到相同的历史版本资源包,表明更新端的资源包过于老旧,则将所述新版本资源包直接返回给更新端。After receiving the update request of the update end, the server searches for the same historical version of the package identifier in the update request in the mapping relationship recorded in the S102 by using the packet identifier in the update request as a key. The packet identifier of the resource package, if the packet identifier of the same historical version resource bundle is found, the incremental differential packet storage address of the packet identifier mapping of the same historical version resource bundle is returned to the update terminal; The same historical version resource package indicates that the resource package of the update side is too old, and the new version resource package is directly returned to the update end.
本发明实施例可以在服务端发布对目标应用相应文件进行更新的新版本资源包时,能够得到新版本资源包与各历史版本资源包的差分部分的增量差分包,并根据映射存储的方式实现在用户需要对相应文件进行更新时,能够仅发送其中不同的部分给更新端,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。When the server releases the new version resource package that updates the corresponding file of the target application, the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner. When the user needs to update the corresponding file, the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
再请参见图2,是本发明实施例的另一种数据更新方法的流程示意图,本发明实施例的所述方法可应用在应用服务端中,实现对更新端中的应用数据等的更新。本实施例在上述实施例的基础上,一方面在更新请求中还携带了版本信息的情况下,增加了对更新请求中的版本信息与新版本资源包的版本信息是否 相同的判断操作,据此来识别是否需要更新;另一方面,在资源映射库中未确定出与更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识的情况下,增加了返回新版本资源包存储地址给更新端的操作,以指示更新端据此来下载完整的新版本资源包,从而可以提高数据更新的成功率;再一方面,增加了下发新版本资源包的包标识给更新端的操作,以便更新端能够据此来进行更新校验。具体的,所述方法包括:Referring to FIG. 2, it is a schematic flowchart of another data update method according to an embodiment of the present invention. The method in the embodiment of the present invention may be applied to an application server to implement update of application data and the like in the update terminal. On the basis of the foregoing embodiment, on the one hand, when the version information is carried in the update request, the version information of the update request and the version information of the new version resource package are added. The same judging operation is used to identify whether the update is required; on the other hand, in the resource mapping library, the package identifier of the historical version resource pack having the same identification value as the update resource pack identifier in the update request is not determined. Next, an operation of returning a new version of the resource package storage address to the update end is added to instruct the update terminal to download the complete new version resource package according to this, thereby improving the success rate of the data update; on the other hand, adding a new version is added. The package of the resource package is identified to the operation of the update end, so that the update end can perform update check according to this. Specifically, the method includes:
S201:当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包。S201: After receiving the new version resource package, calculate a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package.
差分算法可采用上述的二进制差分算法对新版本资源包与本地存储的各个历史版本资源包进行计算处理,得到每一个历史版本资源包对应的增量差分包。The difference algorithm may use the above-mentioned binary difference algorithm to calculate and process the new version resource package and the locally stored historical version resource package, and obtain the incremental difference package corresponding to each historical version resource package.
S202:存储各增量差分包,并确定每一个增量差分包的存储地址。S202: Store each incremental differential packet, and determine a storage address of each incremental differential packet.
可以将增量差分包存储到CDN等服务端中,并确定每一个增量差分包在CDN等服务端中的存储地址。The incremental differential packets can be stored in a server such as a CDN, and the storage address of each incremental differential packet in a server such as a CDN can be determined.
S203:在预置的包括各历史版本资源包的包标识与其资源包存储地址的资源映射库中,增加记录各历史版本资源包的包标识对应的增量差分包存储地址。S203: Add a delta differential packet storage address corresponding to the packet identifier of each historical version resource package in the preset resource mapping library including the packet identifier of each historical version resource package and the resource package storage address.
所述资源映射库为预先设置的,用于存储目标应用的每一个版本的资源包的包标识与资源包存储地址的映射关系,以便于根据资源包的包标识找到对应的资源包。各历史版本资源包的包标识可通过MD5算法计算得出。The resource mapping library is configured to store a mapping relationship between a package identifier of a resource package of each version of the target application and a resource packet storage address, so as to find a corresponding resource package according to the package identifier of the resource package. The package identifier of each historical version resource package can be calculated by the MD5 algorithm.
进一步地,在存储了包标识以及资源包存储地址的映射关系的情况下,再存储记录对应的增量差分包的存储地址,以便于服务端不仅能够找到资源包包标识对应的资源包,还能找到对应的增量差分包。当然,也可以仅保存各个历史版本资源包的包标识与对应增量差分包的映射关系。Further, in a case where the mapping relationship between the packet identifier and the resource packet storage address is stored, the storage address of the corresponding incremental differential packet is stored, so that the server can not only find the resource packet corresponding to the resource packet identifier, but also Can find the corresponding incremental differential package. Of course, it is also possible to save only the mapping relationship between the packet identifier of each historical version resource bundle and the corresponding incremental differential packet.
S204:接收更新端发送的更新请求,所述更新请求中携带所述更新端中待更新文件的版本信息和待更新版本资源包标识。S204: Receive an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a version resource package identifier to be updated.
更新端可以通过定时更新或者用户手动触发更新等方式向服务端发起更新请求,更新端连接到对应服务端并发送更新请求可通过现有技术实现。The update end may initiate an update request to the server by means of a timing update or a user manually triggering the update. The update end is connected to the corresponding server and the update request is sent by the prior art.
更新端根据本端的待更新文件,可以得到待更新文件的版本信息以及该待更新文件对应资源包的待更新版本资源包标识。其中,待更新文件为更新端本端上需要有待更新的应用文件。 The update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end. The file to be updated is an application file to be updated on the local end of the update end.
本发明实施例的在所述更新请求中,不仅会携带包括更新端中待更新文件对应资源包的待更新版本资源包标识,以便于服务端能够确定更新端的资源包所处的历史版本,还可以携带待更新文件的版本信息。其中,待更新文件的版本信息为当前更新端上待更新文件所对应的版本信息。该版本信息能够标识待更新文件的当前版本状态。In the update request, the update request includes not only the version resource package identifier to be updated, but also the historical version of the resource package of the update end, The version information of the file to be updated can be carried. The version information of the file to be updated is the version information corresponding to the file to be updated on the current update end. The version information can identify the current version status of the file to be updated.
在本发明实施例中,服务端会首先根据更新请求中的待更新文件的版本信息,判断是否需要对更新端上的待更新文件进行更新;在需要进行更新的情况下,服务端根据所接收的待更新版本资源包标识,确定更新端的资源包所处的历史版本,从而可以进一步依据所确定的历史版本,判断此次更新方式是否可采用增量更新方式。In the embodiment of the present invention, the server first determines whether the file to be updated on the update end needs to be updated according to the version information of the file to be updated in the update request; if the update needs to be performed, the server receives the update according to the received information. The resource package identifier of the to-be-updated version determines the historical version of the resource package of the update end, so that it can further determine whether the update mode can adopt the incremental update mode according to the determined historical version.
同样,更新端中计算相应应用文件所对应的资源包的包标识的方式,与服务端侧对历史版本资源包的包标识的计算方式相同,均通过协商的MD5等形式的标识码计算方式进行计算。Similarly, the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update terminal is the same as the method of calculating the packet identifier of the historical version resource package on the server side, and all of them are performed by using the identifier code calculation manner in the form of negotiation MD5 or the like. Calculation.
S205:判断所述更新请求中的版本信息与所述新版本资源包的版本信息是否相同。S205: Determine whether the version information in the update request is the same as the version information of the new version resource package.
同样,所述更新请求中的版本信息也可以是更新端根据MD5算法计算更新端中目标应用的版本号码得到的版本标识码(即具体的标识值),而所述新版本资源包的版本信息也可以是服务端根据MD5算法计算所述新版本的版本号码得到的新版本资源包的版本标识码。在所述S205中,将两个版本标识码进行比较,若相同,则表明更新请求中的版本信息与所述新版本资源包的版本信息相同,此时表明更新端的目标应用已经是最新版本;若两个版本标识码不相同,则表明更新端需要进行后续的更新,执行下述的S206。Similarly, the version information in the update request may also be a version identification code (ie, a specific identifier value) obtained by the update end according to the MD5 algorithm for calculating the version number of the target application in the update end, and the version information of the new version resource package. The version identifier of the new version resource package obtained by the server according to the MD5 algorithm for calculating the version number of the new version may also be used. In the S205, the two version identification codes are compared. If the same, the version information in the update request is the same as the version information of the new version resource package, and the target application of the update end is already the latest version. If the two version identification codes are not the same, it indicates that the update terminal needs to perform subsequent update, and S206 described below is executed.
即具体可选地,在所述S201之前,当接收到新版本资源包时,在预置的包括各历史版本标识与其对应版本号的版本映射库中,增加所述新版本资源包的版本标识与新版本号的映射关系。则所述S205可以包括:判断所述更新请求中的版本标识码与版本映射库中记载的新版本资源包的版本标识是否相同;若不相同,则确定述更新请求中的版本信息与所述新版本资源包的版本信息不相同。That is, in particular, before the S201, when a new version resource package is received, the version identifier of the new version resource package is added in a preset version mapping library including each historical version identifier and its corresponding version number. The mapping relationship with the new version number. The S205 may include: determining whether the version identification code in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determining the version information in the update request and the The version information of the new version of the resource bundle is different.
S206:若不相同,确定所述资源映射库中与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识。如果确定出相同的历史版本资源包的包标识,则执行下述S207。 S206: If not, determine a packet identifier of the historical version resource package in the resource mapping library that is the same as the identifier value of the version resource resource identifier to be updated in the update request. If the packet identification of the same historical version resource bundle is determined, the following S207 is performed.
S207:将所述资源映射库中与该相同的历史版本资源包的包标识对应的增量差分包存储地址返回给所述更新端。S207: Return, to the update end, an incremental differential packet storage address corresponding to a packet identifier of the same historical version resource package in the resource mapping library.
S208:若在所述资源映射库中未确定出与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识,则将所述新版本资源包的存储地址返回给所述更新端。S208: If the packet identifier of the historical version resource package that is the same as the identifier value of the version resource resource identifier to be updated in the update request is not determined in the resource mapping library, the storage address of the new version resource package is Return to the update.
以所述更新请求中包标识的标识值作为关键字在所述S203的资源映射库中,查找与所述更新请求中的包标识相同的历史版本资源包的包标识,如果查找到相同的历史版本资源包的包标识,则将该相同的历史版本资源包的包标识映射的增量差分包存储地址返回给所述更新端;如果没有查找到相同的历史版本资源包,则将所述新版本资源包的存储地址直接返回给更新端。Searching, in the resource mapping library of the S203, the packet identifier of the historical version resource package that is the same as the packet identifier in the update request, by using the identifier value of the packet identifier in the update request, if the same history is found. Returning, by the package identifier of the version resource package, the incremental differential package storage address of the package identifier mapping of the same historical version resource package to the update terminal; if the same historical version resource package is not found, the new The storage address of the version resource bundle is directly returned to the update terminal.
更新端可以根据服务端返回的增量差分包存储地址或者新版本资源包的存储地址,发起HTTP下载请求以下载对应的增量差分包或者新版本资源包,以对更新端中的目标应用中的相关文件进行更新。The update end may initiate an HTTP download request to download a corresponding incremental differential packet or a new version resource bundle according to the incremental differential packet storage address returned by the server or the storage address of the new version resource package, to be used in the target application in the update terminal. Related files are updated.
S209:生成所述新版本资源包的包标识,并将所述新版本资源包的包标识返回给所述更新端。S209: Generate a package identifier of the new version resource package, and return a package identifier of the new version resource package to the update end.
所述S209为可选步骤,在返回了增量差分包的存储地址或者新版本资源包的存储地址后,服务端还可以通过MD5等算法计算生成所述新版本资源包的包标识,将新版本资源包的包标识发送给更新端,以便于更新端在对目标应用的相关文件进行更新后,根据服务端返回的新版本资源包的包标识来验证本次更新是否成功。The S209 is an optional step. After returning the storage address of the incremental differential packet or the storage address of the new version resource package, the server may further calculate a packet identifier of the new version resource package by using an algorithm such as MD5, and The package identifier of the version resource package is sent to the update end, so that the update end verifies whether the update is successful according to the package identifier of the new version resource package returned by the server after updating the related file of the target application.
本发明实施例可以在服务端发布对目标应用相应文件进行更新的新版本资源包时,能够得到新版本资源包与各历史版本资源包的差分部分的增量差分包,并根据映射存储的方式实现在用户需要对相应文件进行更新时,能够仅发送其中不同的部分给更新端,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。并且,基于MD5等标识码计算方式得到的标识码来对各类资源包以及版本进行标记,可以确保资源包的下载以及更新的有效性和准确性,保证了数据更新能够正常完成。When the server releases the new version resource package that updates the corresponding file of the target application, the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner. When the user needs to update the corresponding file, the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time. Moreover, marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
再请参见图3,是本发明实施例的再一种数据更新方法的流程示意图,本发明实施例的所述方法可应用在更新端中,例如应用在智能手机、平板电脑、个人电脑或智能可穿戴设备等终端设备中。本实施例可以与上述应用在服务端上 的数据更新方法配合执行。具体的,所述方法包括:Referring to FIG. 3, it is a schematic flowchart of a data update method according to an embodiment of the present invention. The method in the embodiment of the present invention may be applied to an update terminal, such as a smart phone, a tablet computer, a personal computer, or an intelligent device. In terminal devices such as wearable devices. This embodiment can be applied to the server on the server side. The data update method works in conjunction with it. Specifically, the method includes:
S301:在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;S301: Generate a to-be-updated version resource package identifier of the to-be-updated file when detecting the update of the file to be updated on the local end;
对于更新端中安装的目标应用,可以通过定时更新或者用户手动触发更新等方式来对本端所述目标应用的相关文件进行更新。更新端在检测到定时到来时或者手动触发时,通过MD5算法等方式计算得到该目标应用对应的待更新文件对应资源包的包标识。For the target application installed in the update terminal, the related file of the target application of the local end may be updated by means of a timing update or a user manually triggering an update. When the update end detects the timing or manually triggers, the update end calculates the packet identifier of the resource package corresponding to the file to be updated corresponding to the target application by using the MD5 algorithm.
更新端根据本端的待更新文件,可以得到待更新文件的版本信息以及该待更新文件对应资源包的待更新版本资源包标识。所述更新请求中的版本信息也可以是更新端对目标应用的版本号码进行如MD5算法计算后得到的版本标识码。S302:向服务端发送更新请求,所述更新请求中携带待更新文件的版本信息和待更新版本资源包标识;The update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end. The version information in the update request may also be a version identification code obtained by the update end to the version number of the target application as calculated by the MD5 algorithm. S302: Send an update request to the server, where the update request carries version information of the file to be updated and a version resource package identifier to be updated;
更新端连接到对应服务端并发送更新请求可通过现有技术实现。在更新请求中所携带的版本信息,用于使服务端判断是否需要响应该更新请求以返回相应数据完成更新;而在更新请求中携带的待更新文件资源包的包标识则是用于指示服务端要发送何种更新资源包,即是发送增量差分包以采用增量差分方式完成此次数据更新,还是发送完整的新版本资源包以采用替换的方式完成此次数据更新。The update end connects to the corresponding server and sends an update request can be implemented by the prior art. The version information carried in the update request is used to enable the server to determine whether it needs to respond to the update request to return the corresponding data to complete the update; and the package identifier of the file resource package to be updated carried in the update request is used to indicate the service. Which update resource packet is sent, that is, whether the incremental differential packet is sent to complete the data update in incremental differential manner, or whether a complete new version resource resource packet is sent to complete the data update in an alternate manner.
S303:接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;S303: Receive, according to the version information in the update request and the resource package storage address returned by the package identifier, initiate a download request according to the resource package storage address to obtain a resource package, and update the to-be-reserved according to the obtained resource package. Update file
其中,接收到的所述返回的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址。其中,所谓增量差分包是所述服务端根据差分算法计算服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。具体的,服务端在接收到更新端的更新请求后,根据更新请求中的版本信息以及包标识选择对应的资源包(增量差分包或者新版本资源包)存储地址返回给更新端可参考上述图1至图2对应实施例的描述,在此不赘述。The received resource packet storage address that is received includes an incremental differential packet storage address or a new version resource resource storage address. The incremental differential packet is a difference portion between the new version resource package corresponding to the file to be updated and the stored historical version resource package in the server according to the difference algorithm. Specifically, after receiving the update request of the update end, the server selects the corresponding resource package (incremental differential packet or new version resource package) according to the version information and the package identifier in the update request, and returns the storage address to the update terminal. 1 to FIG. 2 correspond to the description of the embodiment, and details are not described herein.
在服务端能够确定出与更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识的情况下,更新端所接收到的资源包存储地址为增量差分包存储地址。其中,所述增量差分包是:服务端根据差分算法计算待更 新文件对应的新版本资源包与存储的包标识为所述待更新版本资源包标识的历史版本资源包的差分部分。In the case that the server can determine the packet identifier of the historical version resource bundle that is the same as the identifier value of the version resource bundle identifier to be updated in the update request, the resource packet storage address received by the update terminal is the incremental differential packet storage address. . Wherein, the incremental differential packet is: the server calculates the pending according to the difference algorithm The new version resource package corresponding to the new file and the stored package identifier are the difference parts of the historical version resource package identified by the resource pack to be updated.
在服务端未确定出与更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识的情况下,更新端所接收到的资源包存储地址为新版本资源包存储地址。本发明实施例使得更新端在对目标应用的相关文件进行更新时,能够仅下载其中不同的部分,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。If the server does not determine the packet identifier of the historical version resource package that is the same as the identifier value of the version resource bundle identifier to be updated in the update request, the resource packet storage address received by the update terminal is the new version resource resource storage address. . The embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time.
再请参见图4,是本发明实施例的又一种数据更新方法的流程示意图,本发明实施例的所述方法可应用在更新端中,例如应用在智能手机、平板电脑、个人电脑、智能可穿戴设备等终端设备中。本实施例在上述应用在更新端上的数据更新方法的基础上:一方面,增加了根据服务端回的资源包存储地址来更新所述待更新文件的操作;另一方面,增加了根据服务端下发的新版本资源包的包标识进行更新校验的操作。具体的,所述方法包括:Referring to FIG. 4, it is a schematic flowchart of another method for updating data according to an embodiment of the present invention. The method in the embodiment of the present invention may be applied to an update terminal, such as a smart phone, a tablet computer, a personal computer, or an intelligent device. In terminal devices such as wearable devices. The embodiment is based on the foregoing data update method applied on the update end: on the one hand, the operation of updating the file to be updated according to the resource package storage address returned by the server is added; on the other hand, the service according to the service is added. The packet identifier of the new version of the resource bundle sent by the terminal is updated and verified. Specifically, the method includes:
S401:在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;S401: Generate a to-be-updated version resource package identifier of the to-be-updated file when detecting the update of the file to be updated on the local end;
S402:向服务端发送更新请求,所述更新请求中携带待更新文件的版本信息和待更新版本资源包标识;S402: Send an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
S403:接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包;S403: The receiving server sends a download request according to the resource package storage address to obtain a resource package according to the version information in the update request and the resource package storage address returned by the package identifier.
S404:根据获取的资源包更新所述待更新文件;S404: Update the to-be-updated file according to the obtained resource package.
其中,若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为增量差分包,则所述S404包括:根据预置的合并算法将所述增量差分包和所述待更新文件的资源包进行合并处理,得到更新后的所述待更新文件的资源包;解压所述得到的更新后的所述待更新文件的资源包,得到完成更新后的文件。The S404 includes: adding the incremental differential packet according to a preset merging algorithm, if the resource packet that is obtained by downloading the resource packet according to the resource packet storage address is an incremental differential packet, The resource package of the update file is merged to obtain the resource package of the updated file to be updated; and the obtained resource package of the updated file to be updated is decompressed, and the updated file is obtained.
若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为新版本资源包,则所述S404包括:解压获取的新版本资源包,得到完成更新后的文件。And if the resource package that is obtained by the resource package storage address to obtain the resource package download is a new version resource package, the S404 includes: decompressing the obtained new version resource package, and obtaining the updated file.
S405:接收服务端返回的新版本资源包的包标识;S405: Receive a packet identifier of a new version resource package returned by the server.
服务端在发送对应资源包的存储地址后,还可以采用MD5算法等计算其新 版本资源包的包标识,然后将新版本资源包的包标识发送给更新端。After the server sends the storage address of the corresponding resource package, the server can also calculate its new value by using the MD5 algorithm. The package ID of the version resource bundle, and then the package ID of the new version resource bundle is sent to the update side.
S406:对所述完成更新后的文件的资源包进行计算,得到更新后的文件资源包的更新包标识;S406: Perform calculation on the resource package of the file after the update is completed, and obtain an update package identifier of the updated file resource package.
更新端在通过上述的S404得到完成更新后的文件后,对文件进行压缩得到更新后的文件资源包,并采用MD5算法等计算得到更新后的文件资源包的包标识。After the update end obtains the updated file through the above S404, the file is compressed to obtain the updated file resource package, and the package identifier of the updated file resource package is calculated by using the MD5 algorithm or the like.
S407:将接收到的新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示。S407: Compare the received package identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails.
将在S405中接收到的包标识与在S406中生成的包标识进行比较,若相同,则表明更新成功,否则,更新失败,具体可以在S407中发出更新失败的提示,以便于用户重新发起更新。Comparing the packet identifier received in S405 with the packet identifier generated in S406. If they are the same, it indicates that the update is successful. Otherwise, the update fails. Specifically, the update failure prompt may be sent in S407, so that the user can re-initiate the update. .
当然,还可更新端先执行更新检验,在更新校验成功的情况下,才根据获取到的资源包更新所述待更新文件。具体的:Of course, the update check may be performed first, and if the update check is successful, the file to be updated is updated according to the obtained resource package. specific:
(1)在获取到的资源包为增量差分包的情况下(1) In case the obtained resource bundle is an incremental differential packet
在向服务端发送更新请求之后,还包括:接收服务端返回的新版本资源包的包标识;After sending the update request to the server, the method further includes: receiving a package identifier of the new version resource package returned by the server;
在得到更新后的所述待更新文件的资源包之后,在解压所得到的更新后的所述待更新文件的资源包之前,还包括:After obtaining the updated resource package of the file to be updated, before decompressing the obtained resource package of the updated file to be updated, the method further includes:
对更新后的待更新文件的资源包进行计算,得到更新包标识;Calculating the resource package of the updated file to be updated, and obtaining the update package identifier;
将接收到的新版本资源包的包标识与更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,执行所述解压所得到的更新后的待更新文件的资源包的操作。Comparing the packet identifier of the received new version resource package with the update package identifier, if not, issuing a prompt for indicating that the update fails, and if the same, executing the decompressed updated resource of the file to be updated The operation of the package.
(2)在获取到的资源包为新版本资源包的情况下(2) In case the obtained resource package is a new version resource package
在向服务端发送更新请求之后,还包括:接收服务端返回的新版本资源包的包标识;After sending the update request to the server, the method further includes: receiving a package identifier of the new version resource package returned by the server;
在获取到新版本资源包之后,在解压获取的新版本资源包之前,还包括:After obtaining the new version of the resource bundle, before decompressing the obtained new version of the resource bundle, it also includes:
对所获取的新版本资源包进行计算,得到更新包标识;Calculating the obtained new version resource package to obtain the update package identifier;
将接收到的新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,执行所述解压所得到的更新后的所述待更新文件的资源包的操作。本发明实施例使得更新端在对目标应用的相关 文件进行更新时,能够仅下载其中不同的部分,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。并且,基于MD5等标识码计算方式得到的标识码来对各类资源包以及版本进行标记,可以确保资源包的下载以及更新的有效性和准确性,保证了数据更新能够正常完成。Comparing the packet identifier of the received new version resource package with the update package identifier, and if not, issuing a prompt for indicating that the update fails, and if the same, performing the decompression to obtain the updated Update the operation of the resource bundle of the file. Embodiments of the present invention make the update end related to the target application When the file is updated, it can download only the different parts, which reduces the amount of data required for the update, facilitates quick download, saves bandwidth resources and energy consumption, and saves the user's download time. Moreover, marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
下面对本发明实施例的数据更新装置及系统进行详细描述。The data updating apparatus and system of the embodiment of the present invention will be described in detail below.
请参见图5,是本发明实施例的一种数据更新系统的结构示意图,本发明实施例的所述系统包括:服务端1以及更新端2,所述服务端1可以为各类可提供数据更新服务的应用服务器或者数据服务器,所述更新端包括智能手机、平板电脑、个人电脑或者智能可穿戴设备等终端设备或者其他需要对数据进行更新的服务器。具体的,FIG. 5 is a schematic structural diagram of a data update system according to an embodiment of the present invention. The system in the embodiment of the present invention includes: a server 1 and an update terminal 2, where the server 1 can provide data for various types. An application server or a data server that updates a service, such as a terminal device such as a smartphone, a tablet, a personal computer, or a smart wearable device, or another server that needs to update data. specific,
所述服务端1,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;The server 1 is configured to calculate, according to a difference algorithm, a difference part between a new version resource package and each stored historical version resource package according to a difference algorithm, and use the difference part as an incremental difference of each historical version resource package. a packet; storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
所述更新端2,用于向所述服务端1发送更新请求,所述更新请求中包括待更新文件版本资源包标识;The update end 2 is configured to send an update request to the server 1 , where the update request includes a file version resource package identifier to be updated;
所述服务端1,还用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址;The server 1 is further configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; Identifying an incremental differential packet storage address and responding to the update request to return the found incremental differential packet storage address;
所述更新端2,还用于根据所述返回的增量差分包存储地址发出下载请求下载增量差分包,以对待更新文件进行更新。The update terminal 2 is further configured to issue a download request to download an incremental differential packet according to the returned incremental differential packet storage address, to update the file to be updated.
具体的请参见图6,是本发明实施例的一种数据更新装置的结构示意图,本发明实施例的所述装置可设置在为各类应用进行数据更新的服务端中,具体可以设置在上述系统实施例的服务端中,所述装置包括:Specifically, please refer to FIG. 6 , which is a schematic structural diagram of a data updating apparatus according to an embodiment of the present invention. The apparatus in the embodiment of the present invention may be configured in a server that performs data update for various applications, and may be specifically configured in the foregoing. In the server of the system embodiment, the device includes:
计算模块11,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;The calculating module 11 is configured to: after receiving the new version resource package, calculate a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package;
存储模块12,用于存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系; The storage module 12 is configured to store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
处理模块13,用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The processing module 13 is configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; The amount differential packet stores the address and responds to the update request to return the found incremental differential packet storage address.
当应用开发者对原应用有更新时,可通过服务端发布新版本资源包的形式实现对更新端中的相关数据的更新。所述的新版本资源包包括对新版本中各个文件数据进行压缩后得到的一个压缩包,例如将新版本文件中的HTML对应数据、JS对应数据、CSS对应数据、Image对应数据等压缩后得到的压缩包。When the application developer has an update to the original application, the update of the related data in the update terminal may be implemented by the server releasing a new version of the resource package. The new version resource package includes a compressed package obtained by compressing each file data in the new version, for example, compressing HTML corresponding data, JS corresponding data, CSS corresponding data, and Image corresponding data in the new version file. Compressed package.
在本发明实施例中,所述计算模块11在接收到开发者上传的新版本资源包或者其他方式接收到的新版本资源包后,根据预置的差分算法(如二进制差分算法)对新版本资源包与本地存储的各个历史版本资源包进行计算处理,将计算得到的各历史版本资源包的差分部分作为各历史版本资源包相对于新版本资源包的增量差分包。所述增量差分包中包括了历史版本资源包与新版本资源包中不同的部分,其数据量会明显小于新版本资源包的数据量。具体的,二进制差分算法为对两个文件的二进制进行对比,将其差分的部分提取出来进行压缩,成为一个差分包的算法,具体实现可参考开源组件bsdiff和bspatch等。In the embodiment of the present invention, after receiving the new version resource package uploaded by the developer or the new version resource package received by the other method, the calculation module 11 performs a new version according to a preset difference algorithm (such as a binary difference algorithm). The resource package is calculated and processed by each historical version resource package of the local storage, and the calculated difference portion of each historical version resource package is used as an incremental difference package of each historical version resource package with respect to the new version resource package. The incremental difference packet includes a different part of the historical version resource package and the new version resource package, and the data amount thereof is significantly smaller than the data amount of the new version resource package. Specifically, the binary difference algorithm compares the binary of the two files, extracts the difference part and compresses it, and becomes a differential packet algorithm. The specific implementation can refer to the open source components bsdiff and bspatch.
所述存储模块12可以将计算出的各增量差分包存储到CDN中,并确定各增量差分包在CDN中的存储地址即URL。The storage module 12 may store the calculated incremental differential packets into the CDN, and determine a storage address, ie, a URL, of each incremental differential packet in the CDN.
在所述存储模块12存储每一个历史版本资源包对应的增量差分包后,可通过一个资源映射库或者映射表的形式存储历史版本资源包的包标识及对于增量差分包存储地址的映射关系。在该映射关系中,对应存储地址的增量差分包可以对映射的历史版本资源包的包标识对应的资源包进行更新。其中,可以通过MD5(消息摘要算法第五版)算法来计算每一个历史版本资源包的包标识。After the storage module 12 stores the incremental differential packet corresponding to each historical version resource package, the packet identifier of the historical version resource package and the mapping for the incremental differential packet storage address may be stored in the form of a resource mapping library or a mapping table. relationship. In the mapping relationship, the incremental difference packet corresponding to the storage address may update the resource package corresponding to the package identifier of the mapped historical version resource package. The packet identifier of each historical version resource package can be calculated by the MD5 (Message Digest Algorithm Fifth Edition) algorithm.
更新端可以通过定时更新或者用户手动触发更新等方式向服务端发起更新请求,更新端连接到对应服务端并发送更新请求可通过现有技术实现。其中,在所述更新请求中,会携带更新端中相应应用文件所对应的资源包的包标识,以便于服务端能够确定更新端的资源包所处的历史版本。同样,更新端中计算相应应用文件所对应的资源包的包标识的方式,采用与服务端侧对历史版本资源包的包标识相同的计算方式,均通过协商的MD5等形式的标识码计算方式进行计算。 The update end may initiate an update request to the server by means of a timing update or a user manually triggering the update. The update end is connected to the corresponding server and the update request is sent by the prior art. The packet identifier of the resource package corresponding to the corresponding application file in the update end is carried in the update request, so that the server can determine the historical version of the resource package of the update end. Similarly, the method of calculating the packet identifier of the resource packet corresponding to the corresponding application file in the update end adopts the same calculation method as the packet identifier of the historical version resource package on the server side, and all of them are negotiated in the form of MD5 and the like. Calculation.
所述处理模块13在接收到更新端的更新请求后,以所述更新请求中的包标识作为关键字在所述存储模块12中记录的映射关系中,查找标识值与所述更新请求中的包标识相同的历史版本资源包的包标识,如果查找到相同的历史版本资源包的包标识,所述处理模块13将该相同的历史版本资源包的包标识映射的增量差分包存储地址返回给所述更新端;如果没有查找到相同的历史版本资源包,表明更新端的资源包过于老旧,所述处理模块13将所述新版本资源包直接返回给更新端。After receiving the update request of the update end, the processing module 13 searches for the identifier value and the package in the update request in the mapping relationship recorded in the storage module 12 by using the packet identifier in the update request as a key. Identifying the packet identifier of the same historical version resource package, if the packet identifier of the same historical version resource package is found, the processing module 13 returns the incremental differential packet storage address of the package identifier mapping of the same historical version resource package to If the resource pack of the update end is too old, the processing module 13 directly returns the new version resource package to the update end.
本发明实施例可以在服务端发布对目标应用相应文件进行更新的新版本资源包时,能够得到新版本资源包与各历史版本资源包的差分部分的增量差分包,并根据映射存储的方式实现在用户需要对相应文件进行更新时,能够仅发送其中不同的部分给更新端,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。When the server releases the new version resource package that updates the corresponding file of the target application, the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner. When the user needs to update the corresponding file, the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time.
再请参见图7,是本发明实施例的另一种数据处理装置的结构示意图,本发明实施例的所述装置可设置在上述系统实施例中的服务端中,并包括图6对应实施例中的计算模块11、存储模块12以及处理模块13,具体的,在本发明实施例中,所述装置还包括:记录模块14、标识发送模块15。FIG. 7 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention. The apparatus in the embodiment of the present invention may be configured in a server in the foregoing system embodiment, and includes the corresponding embodiment in FIG. In the embodiment of the present invention, the device further includes: a recording module 14 and an identifier sending module 15 in the computing module 11, the storage module 12, and the processing module 13.
进一步可选地,在本发明实施例中,如图8所示,所述存储模块12包括:Further, in the embodiment of the present invention, as shown in FIG. 8, the storage module 12 includes:
存储单元121,用于存储各增量差分包,并确定每一个增量差分包的存储地址;所述存储单元121可以将增量差分包存储到CDN等服务端中,并确定每一个增量差分包在CDN等服务端中的存储地址。The storage unit 121 is configured to store each incremental differential packet and determine a storage address of each incremental differential packet. The storage unit 121 may store the incremental differential packet into a server such as a CDN, and determine each increment. The storage address of the differential packet in the server such as CDN.
记录单元122,用于在预置的包括各历史版本资源包的包标识与其资源包存储地址的资源映射库中,增加记录各历史版本资源包的包标识对应的增量差分包存储地址。The recording unit 122 is configured to add an incremental differential packet storage address corresponding to the package identifier of each historical version resource package in the preset resource mapping library including the packet identifier of each historical version resource package and the resource package storage address.
所述资源映射库为预先设置的,用于存储目标应用的每一个版本的资源包的包标识与资源包存储地址的映射关系,以便于根据资源包的包标识找到对应的资源包。各历史版本资源包的包标识可通过MD5算法计算得出。在存储了包标识以及资源包存储地址的映射关系的情况下,所述记录单元122再存储记录对应的增量差分包的存储地址,以便于不仅能够找到资源包包标识对应的资源包,还能找到对应的增量差分包。当然,也可以仅保存各个历史版本资源包的包标识与对应增量差分包的映射关系。 The resource mapping library is configured to store a mapping relationship between a package identifier of a resource package of each version of the target application and a resource packet storage address, so as to find a corresponding resource package according to the package identifier of the resource package. The package identifier of each historical version resource package can be calculated by the MD5 algorithm. In the case that the mapping relationship between the packet identifier and the resource packet storage address is stored, the recording unit 122 stores the storage address of the corresponding incremental differential packet, so that not only the resource packet corresponding to the resource packet identifier but also the resource packet corresponding to the resource packet identifier can be found. Can find the corresponding incremental differential package. Of course, it is also possible to save only the mapping relationship between the packet identifier of each historical version resource bundle and the corresponding incremental differential packet.
对应地,如图9所示,所述处理模块13则可以包括:Correspondingly, as shown in FIG. 9, the processing module 13 may include:
接收单元131,用于接收更新端发送的更新请求,所述更新请求中携带所述更新端中待更新文件的版本信息和待更新版本资源包标识;The receiving unit 131 is configured to receive an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a version resource package identifier to be updated.
所述接收单元131接收到的更新请求可以是更新端可以通过定时更新或者用户手动触发更新等方式向服务端发起更新请求。The update request received by the receiving unit 131 may be that the update end may initiate an update request to the server by means of a timing update or a user manually triggering an update.
判断单元132,用于判断所述更新请求中的版本信息与所述新版本资源包的版本信息是否相同;The determining unit 132 is configured to determine whether the version information in the update request is the same as the version information of the new version resource package.
同样,所述更新请求中的版本信息也可以是更新端根据MD5算法计算更新端中目标应用的版本号码得到的版本标识码(即具体的标识值),而所述新版本资源包的版本信息也可以是服务端根据MD5算法计算所述新版本的版本号码得到的新版本资源包的版本标识码。所述判断单元132将两个版本标识码进行比较,若相同,则表明更新请求中的版本信息与所述新版本资源包的版本信息相同,此时表明更新端的目标应用已经是最新版本;若两个版本标识码不相同,则表明更新端需要进行后续的更新,通知下述的确定单元133。Similarly, the version information in the update request may also be a version identification code (ie, a specific identifier value) obtained by the update end according to the MD5 algorithm for calculating the version number of the target application in the update end, and the version information of the new version resource package. The version identifier of the new version resource package obtained by the server according to the MD5 algorithm for calculating the version number of the new version may also be used. The determining unit 132 compares the two version identification codes. If the same, it indicates that the version information in the update request is the same as the version information of the new version resource package, and indicates that the target application of the update end is already the latest version; If the two version identification codes are different, it indicates that the update end needs to perform subsequent update, and the determining unit 133 described below is notified.
确定单元133,用于若不相同,确定所述资源映射库中与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识;a determining unit 133, configured to determine, if not identical, a package identifier of a historical version resource package in the resource mapping library that is the same as an identifier value of the version resource resource identifier to be updated in the update request;
第一发送单元134,用于将所述资源映射库中与该相同的历史版本资源包的包标识对应的增量差分包存储地址返回给所述更新端。The first sending unit 134 is configured to return, to the update end, an incremental differential packet storage address corresponding to the packet identifier of the same historical version resource package in the resource mapping library.
其中,具体的,所述判断单元132,具体用于判断所述更新请求中的版本标识码与版本映射库中记载的新版本资源包的版本标识是否相同;若不相同,则确定述更新请求中的版本信息与所述新版本资源包的版本信息不相同。Specifically, the determining unit 132 is specifically configured to determine whether the version identifier in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determine the update request. The version information in the version is different from the version information of the new version resource package.
进一步地,所述处理模块13还可以包括:Further, the processing module 13 may further include:
第二发送单元135,用于若在所述资源映射库中未确定出与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识,则将所述新版本资源包的存储地址返回给所述更新端。a second sending unit 135, configured to: if the packet identifier of the historical version resource package that is the same as the identifier value of the version resource resource identifier to be updated in the update request is not determined in the resource mapping library, the new The storage address of the version resource bundle is returned to the update terminal.
进一步地,本发明实施例的的所述记录模块14,用于当接收到新版本资源包时,在预置的包括各历史版本标识与其对应版本号的版本映射库中,增加所述新版本资源包的版本标识与新版本号的映射关系。Further, the recording module 14 of the embodiment of the present invention is configured to: when receiving a new version resource package, add the new version in a preset version mapping library including each historical version identifier and its corresponding version number. The mapping between the version identifier of the resource bundle and the new version number.
而所述的标识发送模块15,用于生成所述新版本资源包的包标识,并将所述新版本资源包的包标识返回给所述更新端。 The identifier sending module 15 is configured to generate a packet identifier of the new version resource bundle, and return a packet identifier of the new version resource bundle to the update terminal.
在返回了增量差分包的存储地址或者新版本资源包的存储地址后,所述标识发送模块15还可以通过MD5等算法计算生成所述新版本资源包的包标识,将新版本资源包的包标识发送给更新端,以便于更新端在对目标应用的相关文件进行更新后,根据服务端返回的新版本资源包的包标识来验证本次更新是否成功。After the storage address of the incremental difference packet or the storage address of the new version resource package is returned, the identifier sending module 15 may further calculate a packet identifier of the new version resource package by using an algorithm such as MD5, and the new version resource package is The package identifier is sent to the update end, so that the update end verifies whether the update is successful according to the package identifier of the new version resource package returned by the server after updating the related file of the target application.
本发明实施例可以在服务端发布对目标应用相应文件进行更新的新版本资源包时,能够得到新版本资源包与各历史版本资源包的差分部分的增量差分包,并根据映射存储的方式实现在用户需要对相应文件进行更新时,能够仅发送其中不同的部分给更新端,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。并且,基于MD5等标识码计算方式得到的标识码来对各类资源包以及版本进行标记,可以确保资源包的下载以及更新的有效性和准确性,保证了数据更新能够正常完成。When the server releases the new version resource package that updates the corresponding file of the target application, the embodiment of the present invention can obtain the incremental difference packet of the difference part between the new version resource package and each historical version resource package, and according to the mapping storage manner. When the user needs to update the corresponding file, the user can only send different parts to the update end, which reduces the amount of data required for the update, facilitates fast downloading, saves bandwidth resources and energy consumption, and saves user download time. Moreover, marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
进一步地,再请参见图10,是本发明实施例的再一种数据更新装置的结构示意图,本发明实施例的所述装置可应用在各类智能终端设备中,具体可设置在上述系统实施例中的更新端2中,所述装置包括:10 is a schematic structural diagram of another data update apparatus according to an embodiment of the present invention. The apparatus according to the embodiment of the present invention may be applied to various types of intelligent terminal equipment, and may be specifically configured in the foregoing system implementation. In the update terminal 2 of the example, the device includes:
生成模块21,用于在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;The generating module 21 is configured to generate a version resource package identifier of the to-be-updated file to be updated when the file to be updated is detected on the local end;
请求模块22,用于向服务端发送更新请求,所述更新请求中携带待更新文件的版本信息和待更新版本资源包标识;The requesting module 22 is configured to send an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
处理模块23,用于接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包;The processing module 23 is configured to receive, by the server, a resource package storage address that is returned according to the version information and the packet identifier in the update request, and initiate a download request according to the resource package storage address to obtain the resource package;
更新模块24,用于根据获取的资源包更新所述待更新文件资源包;An update module 24, configured to update the to-be-updated file resource package according to the obtained resource package;
其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, where the incremental differential packet is a new one corresponding to the file to be updated in the server according to the difference algorithm calculation server The difference between the version resource bundle and the stored historical version resource bundle.
对于更新端中安装的目标应用,可以通过定时更新或者用户手动触发更新等方式来对本端所述目标应用的相关文件进行更新。在检测到定时到来时或者手动触发时,所述生成模块21通过MD5算法等方式计算得到该目标应用对应的待更新文件资源包的包标识。更新端根据本端的待更新文件,可以得到待更新文件的版本信息以及该待更新文件对应资源包的待更新版本资源包标识。 For the target application installed in the update terminal, the related file of the target application of the local end may be updated by means of a timing update or a user manually triggering an update. The detecting module 21 calculates the packet identifier of the file resource package to be updated corresponding to the target application by means of the MD5 algorithm or the like when the timing is detected or manually triggered. The update end obtains the version information of the file to be updated and the resource package identifier of the resource package to be updated corresponding to the resource package to be updated according to the file to be updated on the local end.
更新端连接到对应服务端并发送更新请求可通过现有技术实现。所述请求模块22在更新请求中所携带的版本信息用于使服务端判断是否需要响应该更新请求以返回相应数据完成更新;而在更新请求中携带的待更新文件资源包的包标识则是用于指示服务端要发送何种更新资源包。所述更新请求中的版本信息也可以是所述生成模块21对目标应用的版本号码进行如MD5算法计算后得到的版本标识码。The update end connects to the corresponding server and sends an update request can be implemented by the prior art. The version information carried by the requesting module 22 in the update request is used to enable the server to determine whether it needs to respond to the update request to return the corresponding data to complete the update; and the package identifier of the file resource package to be updated carried in the update request is Used to indicate which update resource package the server wants to send. The version information in the update request may also be a version identification code obtained by the generating module 21 after the version number of the target application is calculated by the MD5 algorithm.
在服务端能够确定出与更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识的情况下,更新端所接收到的资源包存储地址为增量差分包存储地址。其中,所述增量差分包是:服务端根据差分算法计算待更新文件对应的新版本资源包与存储的包标识为所述待更新版本资源包标识的历史版本资源包的差分部分。In the case that the server can determine the packet identifier of the historical version resource bundle that is the same as the identifier value of the version resource bundle identifier to be updated in the update request, the resource packet storage address received by the update terminal is the incremental differential packet storage address. . The incremental differential packet is: the server calculates a new version of the resource package corresponding to the file to be updated according to the difference algorithm, and the difference between the stored version of the resource identifier and the historical version resource package of the resource package to be updated.
在服务端未确定出与更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识的情况下,更新端所接收到的资源包存储地址为新版本资源包存储地址。If the server does not determine the packet identifier of the historical version resource package that is the same as the identifier value of the version resource bundle identifier to be updated in the update request, the resource packet storage address received by the update terminal is the new version resource resource storage address. .
本发明实施例使得更新端在对目标应用的相关文件进行更新时,能够仅下载其中不同的部分,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。The embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time.
再请参见图11,是本发明实施例的又一种数据更新装置的结构示意图,本发明实施例的所述装置可应用在各类智能终端设备中,包括图10对应实施例中的生成模块21,请求模块22,处理模块23以及更新模块24,在本发明实施例中,所述装置还包括:接收模块25以及提示模块26。FIG. 11 is a schematic structural diagram of another data update apparatus according to an embodiment of the present invention. The apparatus according to the embodiment of the present invention may be applied to various types of intelligent terminal devices, including the generation module in the corresponding embodiment of FIG. The requesting module 22, the processing module 23, and the updating module 24, in the embodiment of the present invention, the apparatus further includes: a receiving module 25 and a prompting module 26.
具体的,若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为增量差分包,如图12所示,本发明实施例中的所述更新模块24可以包括:Specifically, if the resource request is generated according to the resource package storage address to obtain the resource packet that is obtained by downloading the resource package, as shown in FIG. 12, the update module 24 in the embodiment of the present invention may include:
计算单元241,用于根据预置的合并算法将所述增量差分包和所述待更新文件的资源包进行合并处理,得到更新后的所述待更新文件的资源包;The calculating unit 241 is configured to combine the incremental differential package and the resource package of the file to be updated according to a preset merging algorithm to obtain a resource package of the updated file to be updated;
更新单元242,用于解压所得到的更新后的所述待更新文件的资源包,得到完成更新后的文件。The updating unit 242 is configured to decompress the obtained resource package of the updated file to be updated, and obtain the updated file.
具体的,若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为新版本资源包,则所述更新模块24还可以包括: Specifically, the update module 24 may further include: if the resource request is generated according to the resource package storage address, and the resource package obtained by the resource package download is a new version resource package, the update module 24 may further include:
解压单元243,用于解压获取的新版本资源包,得到完成更新后的文件。The decompressing unit 243 is configured to decompress the obtained new version resource package, and obtain the updated file.
进一步的,在本发明实施例中的一种具体实施方式中,Further, in a specific implementation manner of the embodiment of the present invention,
所述接收模块25,用于接收服务端返回的新版本资源包的包标识;The receiving module 25 is configured to receive a packet identifier of a new version resource package returned by the server;
所述生成模块21,还用于对所述完成更新后的文件的资源包进行计算,得到更新后的文件的资源包的更新包标识;The generating module 21 is further configured to calculate, by using the resource package of the file that is updated, to obtain an update package identifier of the resource package of the updated file;
所述提示模块26,用于将接收到的新版本资源包的包标识与所述生成的更新包标识进行比较,若不相同,则发出用于指示更新失败的提示。The prompting module 26 is configured to compare the received package identifier of the new version resource package with the generated update package identifier, and if not, issue a prompt for indicating that the update fails.
服务端在发送对应资源包的存储地址后,还可以采用MD5算法等计算其新版本资源包的包标识,然后将新版本资源包的包标识发送给更新端。所述接收模块25接收服务端返回的所述新版本资源包的包标识。After sending the storage address of the corresponding resource package, the server may also use the MD5 algorithm to calculate the package identifier of the new version resource package, and then send the package identifier of the new version resource package to the update end. The receiving module 25 receives the packet identifier of the new version resource package returned by the server.
更新端在通过上述更新单元242或者解压单元243得到完成更新后的文件后,对文件进行压缩得到更新后的文件资源包,并采用MD5算法等计算得到更新后的文件资源包的包标识。After the update unit obtains the updated file by the update unit 242 or the decompression unit 243, the update unit compresses the file to obtain the updated file resource package, and calculates the package identifier of the updated file resource package by using the MD5 algorithm or the like.
将所述接收模块25接收到的包标识与所述生成模块21生成的完成更新后的文件所对应的资源包的更新包标识进行比较,若相同,则表明更新成功,否则,更新失败,具体可以由所述提示模块26发出更新失败的提示,以便于用户重新发起更新。Comparing the packet identifier received by the receiving module 25 with the update packet identifier of the resource bundle corresponding to the file that is completed and updated by the generating module 21, if the same, the update is successful, otherwise, the update fails, specifically A prompt for an update failure may be issued by the prompting module 26 to facilitate the user to re-initiate the update.
在本实施例的另一种具体实施方式中,若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为增量差分包,所述装置还包括:第一接收模块(未示出)和第一提示模块(未示出);其中:In another embodiment, the device further includes: a first receiving module, if the resource request according to the resource package storage address is initiated to obtain a resource packet downloaded by the resource package as an incremental differential packet, the device further includes: (not shown) and a first prompting module (not shown); wherein:
所述第一接收模块,用于在所述请求模块向服务端发送更新请求之后,接收服务端返回的新版本资源包的包标识;The first receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
所述生成模块,还用于在所述计算单元241得到更新后的所述待更新文件的资源包之后,在所述更新单元242解压所得到的更新后的所述待更新文件的资源包之前,对所述更新后的所述待更新文件的资源包进行计算,得到更新包标识;The generating module is further configured to: after the calculating unit 241 obtains the updated resource package of the file to be updated, before the updating unit 242 decompresses the obtained resource package of the updated file to be updated And calculating a resource package of the updated file to be updated, to obtain an update package identifier;
所述第一提示模块,用于将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,指示所述更新单元执行所述解压所得到的更新后的所述待更新文件的资源包的操作。 The first prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication The updating unit performs an operation of decompressing the updated resource package of the file to be updated obtained by the decompression.
在本实施例的再一种具体实施方式中,若所述根据该资源包存储地址发起下载请求以获取资源包下载得到的资源包为新版本资源包,所述装置还包括:第二接收模块和第二提示模块;其中:In another embodiment of the present embodiment, the device further includes: a second receiving module, if the resource request is generated by the resource package storage address to obtain the resource package downloaded by the resource package, And a second prompt module; wherein:
所述第二接收模块,用于在所述请求模块向服务端发送更新请求之后,接收服务端返回的新版本资源包的包标识;The second receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
所述生成模块,还用于在所述处理模块23获取到所述新版本资源包之后,在所述解压单元解压获取的新版本资源包之前,对所获取的所述新版本资源包进行计算,得到更新包标识;The generating module is further configured to: after the processing module 23 obtains the new version resource package, calculate the acquired new version resource package before the decompressing unit decompresses the obtained new version resource package , get the update package identifier;
所述第二提示模块,用于将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,指示所述解压单元执行所述解压所得到的更新后的所述待更新文件的资源包的操作。本发明实施例使得更新端在对目标应用的相关文件进行更新时,能够仅下载其中不同的部分,减少了更新所需的数据量,有利于快速下载,节省带宽资源以及能耗,节约了用户的下载时间。并且,基于MD5等标识码计算方式得到的标识码来对各类资源包以及版本进行标记,可以确保资源包的下载以及更新的有效性和准确性,保证了数据更新能够正常完成。The second prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication The decompression unit performs an operation of decompressing the resource package of the updated file to be updated obtained by the decompression. The embodiment of the invention enables the update terminal to download only the different parts when updating the related files of the target application, thereby reducing the amount of data required for the update, facilitating fast downloading, saving bandwidth resources and energy consumption, and saving users. Download time. Moreover, marking the various resource packages and versions based on the identification code obtained by the identification code calculation method such as MD5 can ensure the validity and accuracy of downloading and updating the resource package, and ensure that the data update can be completed normally.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by computer program related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
具体的,本发明实施例提供了一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,所述方法包括以下步骤:Specifically, an embodiment of the present invention provides a storage medium including computer executable instructions for executing a data update method when executed by a computer processor, the method comprising the following steps:
当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;After receiving the new version resource package, calculating a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and using the difference part as the incremental difference package of each historical version resource package;
存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;Storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识; And if the update request carrying the identifier of the resource pack to be updated is received, determining a packet identifier of the historical version resource package that is the same as the identifier value of the resource pack identifier to be updated;
根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
该方法可以具体包括本发明任意实施例所提供的应用于服务端上的数据更新方法。The method may specifically include the data update method applied to the server provided by any embodiment of the present invention.
另外,本发明实施例还提供了另一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,所述方法包括以下步骤:In addition, an embodiment of the present invention provides another storage medium including computer executable instructions for executing a data update method when executed by a computer processor, the method comprising the following steps:
在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;When the update of the file to be updated on the local end is detected, the resource package identifier of the to-be-updated version of the file to be updated is generated;
向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和所述待更新版本资源包标识;Sending an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;Receiving, by the server, the downloading request according to the resource package storage address to obtain the resource package according to the version information in the update request and the resource package storage address returned by the package identifier, and updating the to-be-updated file according to the obtained resource package. ;
其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
该方法可以具体包括本发明任意实施例所提供的应用于更新端上的数据更新方法。The method may specifically include the data update method applied to the update end provided by any embodiment of the present invention.
以上所揭露的仅为本发明较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。 The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

Claims (29)

  1. 一种数据更新方法,其特征在于,包括:A data update method, comprising:
    当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;After receiving the new version resource package, calculating a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and using the difference part as the incremental difference package of each historical version resource package;
    存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;Storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
    若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;And if the update request carrying the identifier of the resource pack to be updated is received, determining a packet identifier of the historical version resource package that is the same as the identifier value of the resource pack identifier to be updated;
    根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
  2. 如权利要求1所述的方法,其特征在于,所述存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系,包括:The method of claim 1, wherein the storing the incremental differential packets and recording the mapping relationship between the packet identifiers of the historical version resource bundles and the corresponding incremental differential packet storage addresses comprises:
    存储各增量差分包,并确定每一个增量差分包的存储地址;Storing each incremental differential packet and determining the storage address of each incremental differential packet;
    在预置的包括各历史版本资源包的包标识与其资源包存储地址的资源映射库中,增加记录各历史版本资源包的包标识对应的增量差分包存储地址。In the preset resource mapping library including the packet identifier of each historical version resource package and its resource package storage address, an incremental differential packet storage address corresponding to the package identifier of each historical version resource package is added.
  3. 如权利要求2所述的方法,其特征在于,所述若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址,包括:The method according to claim 2, wherein if the update request carrying the identifier of the resource pack to be updated is received, the packet of the historical version resource package having the same identifier value as the identifier of the resource pack identifier to be updated is determined. Identifying, searching for the incremental differential packet storage address according to the determined package identifier, and responding to the update request to return the found incremental differential packet storage address, including:
    接收更新端发送的更新请求,所述更新请求中携带所述更新端中待更新文件的版本信息和待更新文件资源包的包标识;Receiving an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a package identifier of the file resource package to be updated;
    判断所述更新请求中的版本信息与所述新版本资源包的版本信息是否相同;Determining whether the version information in the update request is the same as the version information of the new version resource package;
    若不相同,确定所述资源映射库中与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识;If not, determining, in the resource mapping library, a packet identifier of a historical version resource package that is the same as an identifier value of the version resource resource identifier to be updated in the update request;
    将所述资源映射库中与该相同的历史版本资源包的包标识对应的增量差分包存储地址返回给所述更新端。 And returning, to the update end, the incremental differential packet storage address corresponding to the package identifier of the same historical version resource package in the resource mapping library.
  4. 如权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    当接收到新版本资源包时,在预置的包括各历史版本标识与其对应版本号的版本映射库中,增加所述新版本资源包的版本标识与新版本号的映射关系。When a new version of the resource package is received, the mapping relationship between the version identifier of the new version resource package and the new version number is added in the preset version mapping library including each historical version identifier and its corresponding version number.
  5. 如权利要求4所述的方法,其特征在于,若所述更新请求中的版本信息为版本标识码,则所述判断所述更新请求中的版本信息与所述新版本资源包的版本信息是否相同,包括:The method according to claim 4, wherein if the version information in the update request is a version identification code, the determining whether the version information in the update request and the version information of the new version resource package are The same, including:
    判断所述更新请求中的版本标识码与所述版本映射库中记载的新版本资源包的版本标识是否相同;若不相同,则确定所述更新请求中的版本信息与所述新版本资源包的版本信息不相同。Determining whether the version identification code in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determining the version information in the update request and the new version resource package The version information is different.
  6. 如权利要求3-5任一项所述的方法,其特征在于,还包括:The method of any of claims 3-5, further comprising:
    若在所述资源映射库中未确定出与所述更新请求中的待更新版本资源包标识相同的历史版本资源包的包标识,则将所述新版本资源包的存储地址返回给所述更新端。If the packet identifier of the historical version resource package that is the same as the version resource package identifier to be updated in the update request is not determined in the resource mapping library, returning the storage address of the new version resource package to the update end.
  7. 如权利要求6所述的方法,其特征在于,还包括:The method of claim 6 further comprising:
    生成所述新版本资源包的包标识,并将所述新版本资源包的包标识返回给所述更新端。Generating a package identifier of the new version resource bundle, and returning a package identifier of the new version resource bundle to the update terminal.
  8. 一种数据更新方法,其特征在于,包括:A data update method, comprising:
    在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;When the update of the file to be updated on the local end is detected, the resource package identifier of the to-be-updated version of the file to be updated is generated;
    向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和所述待更新版本资源包标识;Sending an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
    接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;Receiving, by the server, the downloading request according to the resource package storage address to obtain the resource package according to the version information in the update request and the resource package storage address returned by the package identifier, and updating the to-be-updated file according to the obtained resource package. ;
    其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包 存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource package. And storing, by the server, a difference portion between the new version resource package corresponding to the file to be updated and the stored historical version resource package in the server according to the difference algorithm.
  9. 如权利要求8所述的方法,其特征在于,所获取到的资源包为增量差分包,则所述根据获取的资源包更新所述待更新文件,包括:The method of claim 8, wherein the obtained resource package is an incremental difference packet, and the updating the file to be updated according to the obtained resource package comprises:
    根据预置的合并算法将所述增量差分包和所述待更新文件的资源包进行合并处理,得到更新后的所述待更新文件的资源包;And combining the incremental differential packet and the resource package of the file to be updated according to a preset merging algorithm to obtain a resource package of the updated file to be updated;
    解压所得到的更新后的所述待更新文件的资源包,得到完成更新后的文件。Decompressing the obtained resource package of the updated file to be updated, and obtaining the updated file.
  10. 如权利要求8所述的方法,其特征在于,所获取到的资源包为新版本资源包,则所述根据获取的资源包更新所述待更新文件,包括:The method of claim 8, wherein the obtained resource package is a new version resource package, and the updating the file to be updated according to the obtained resource package comprises:
    解压获取的新版本资源包,得到完成更新后的文件。Unzip the obtained new version of the resource bundle and get the updated file.
  11. 如权利要求9-10任一项所述的方法,其特征在于,还包括:The method of any of claims 9-10, further comprising:
    接收服务端返回的新版本资源包的包标识;Receiving the package identifier of the new version resource package returned by the server;
    对所述完成更新后的文件的资源包进行计算,得到更新后的文件的资源包的更新包标识;Calculating the resource package of the file after the update is completed, and obtaining an update package identifier of the resource package of the updated file;
    将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示。And comparing the received packet identifier of the new version resource package with the update package identifier, and if not, issuing a prompt for indicating that the update fails.
  12. 如权利要求9所述的方法,其特征在于,在向服务端发送更新请求之后,还包括:接收服务端返回的新版本资源包的包标识;The method according to claim 9, wherein after transmitting the update request to the server, the method further comprises: receiving a package identifier of the new version resource package returned by the server;
    在得到更新后的所述待更新文件的资源包之后,在解压所得到的更新后的所述待更新文件的资源包之前,还包括:After obtaining the updated resource package of the file to be updated, before decompressing the obtained resource package of the updated file to be updated, the method further includes:
    对所述更新后的所述待更新文件的资源包进行计算,得到更新包标识;Calculating, by the resource package of the updated file to be updated, an update package identifier;
    将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,执行所述解压所得到的更新后的所述待更新文件的资源包的操作。Comparing the received packet identifier of the new version resource package with the update package identifier, and if not, issuing a prompt for indicating that the update fails, and if the same, performing the decompression to obtain the updated location The operation of the resource bundle that describes the update file.
  13. 如权利要求10所述的方法,其特征在于,在向服务端发送更新请求之后,还包括:接收服务端返回的新版本资源包的包标识; The method according to claim 10, further comprising: receiving a packet identifier of a new version resource package returned by the server after sending the update request to the server;
    在获取到所述新版本资源包之后,在解压获取的新版本资源包之前,还包括:After obtaining the new version resource package, before decompressing the obtained new version resource package, the following includes:
    对所获取的所述新版本资源包进行计算,得到更新包标识;Calculating the obtained new version resource package to obtain an update package identifier;
    将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,执行所述解压所得到的更新后的所述待更新文件的资源包的操作。Comparing the received packet identifier of the new version resource package with the update package identifier, and if not, issuing a prompt for indicating that the update fails, and if the same, performing the decompression to obtain the updated location The operation of the resource bundle that describes the update file.
  14. 一种数据更新装置,其特征在于,包括:A data updating device, comprising:
    计算模块,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;a calculation module, configured to calculate, according to the difference algorithm, a difference part between the new version resource package and each stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package;
    存储模块,用于存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;a storage module, configured to store each incremental differential packet, and record a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
    处理模块,用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。a processing module, configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the resource pack identifier to be updated; and perform an increment according to the determined packet identifier The differential packet stores the address and responds to the update request to return the found incremental differential packet storage address.
  15. 如权利要求14所述的装置,其特征在于,所述存储模块包括:The device of claim 14, wherein the storage module comprises:
    存储单元,用于存储各增量差分包,并确定每一个增量差分包的存储地址;a storage unit, configured to store each incremental differential packet, and determine a storage address of each incremental differential packet;
    记录单元,用于在预置的包括各历史版本资源包的包标识与其资源包存储地址的资源映射库中,增加记录各历史版本资源包的包标识对应的增量差分包存储地址。And a recording unit, configured to add an incremental differential packet storage address corresponding to the package identifier of each historical version resource package in the preset resource mapping library including the package identifier of each historical version resource package and the resource package storage address thereof.
  16. 如权利要求15所述的装置,其特征在于,所述处理模块包括:The device of claim 15 wherein said processing module comprises:
    接收单元,用于接收更新端发送的更新请求,所述更新请求中携带所述更新端中待更新文件的版本信息和待更新版本资源包标识;a receiving unit, configured to receive an update request sent by the update end, where the update request carries version information of the file to be updated in the update end and a version resource package identifier to be updated;
    判断单元,用于判断所述更新请求中的版本信息与所述新版本资源包的版本信息是否相同;a determining unit, configured to determine whether version information in the update request is the same as version information of the new version resource package;
    确定单元,用于若不相同,确定所述资源映射库中与所述更新请求中的待 更新版本资源包标识的标识值相同的历史版本资源包的包标识;Determining a unit, if not identical, determining the waiting in the resource mapping library and the update request Update the package identifier of the historical version resource bundle with the same identifier value as the resource pack identifier;
    第一发送单元,用于将所述资源映射库中与该相同的历史版本资源包的包标识对应的增量差分包存储地址返回给所述更新端。And a first sending unit, configured to return, to the update end, an incremental differential packet storage address corresponding to a packet identifier of the same historical version resource package in the resource mapping library.
  17. 如权利要求16所述的装置,其特征在于,还包括:The device of claim 16 further comprising:
    记录模块,用于当接收到新版本资源包时,在预置的包括各历史版本标识与其对应版本号的版本映射库中,增加所述新版本资源包的版本标识与新版本号的映射关系。a recording module, configured to: when a new version of the resource package is received, add a mapping relationship between the version identifier of the new version resource package and the new version number in the preset version mapping library including each historical version identifier and its corresponding version number .
  18. 如权利要求17所述的装置,其特征在于,The device of claim 17 wherein:
    所述判断单元,具体用于判断所述更新请求中的版本标识码与所述版本映射库中记载的新版本资源包的版本标识是否相同;若不相同,则确定所述更新请求中的版本信息与所述新版本资源包的版本信息不相同。The determining unit is specifically configured to determine whether the version identification code in the update request is the same as the version identifier of the new version resource package recorded in the version mapping library; if not, determine the version in the update request The information is different from the version information of the new version resource bundle.
  19. 如权利要求16-18任一项所述的装置,其特征在于,所述处理模块还包括:The device according to any one of claims 16 to 18, wherein the processing module further comprises:
    第二发送单元,用于若在所述资源映射库中未确定出与所述更新请求中的待更新版本资源包标识的标识值相同的历史版本资源包的包标识,则将所述新版本资源包的存储地址返回给所述更新端。a second sending unit, configured to: if the packet identifier of the historical version resource package that is the same as the identifier value of the version resource package identifier to be updated in the update request is not determined in the resource mapping library, the new version is The storage address of the resource bundle is returned to the update terminal.
  20. 如权利要求19所述的装置,其特征在于,还包括:The device of claim 19, further comprising:
    标识发送模块,用于生成所述新版本资源包的包标识,并将所述新版本资源包的包标识返回给所述更新端。And an identifier sending module, configured to generate a package identifier of the new version resource package, and return a package identifier of the new version resource package to the update end.
  21. 一种数据更新装置,其特征在于,包括:A data updating device, comprising:
    生成模块,用于在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;a generating module, configured to generate a version resource package identifier of the to-be-updated file to be updated when the file to be updated is detected on the local end;
    请求模块,用于向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和待更新版本资源包标识;a requesting module, configured to send an update request to the server, where the update request carries version information of the file to be updated and a version resource package identifier to be updated;
    处理模块,用于接收所述服务端根据所述更新请求中的版本信息和包标识 返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包;a processing module, configured to receive, by the server, version information and a package identifier according to the update request Returning the resource package storage address, and initiating a download request according to the resource package storage address to obtain the resource package;
    更新模块,用于根据获取的资源包更新所述待更新文件;An update module, configured to update the to-be-updated file according to the obtained resource package;
    其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
  22. 如权利要求21所述的装置,其特征在于,所获取到的资源包为增量差分包,则所述更新模块包括:The apparatus according to claim 21, wherein the obtained resource package is an incremental differential packet, and the updating module comprises:
    计算单元,用于根据预置的合并算法将所述增量差分包和所述待更新文件的资源包进行合并处理,得到更新后的所述待更新文件的资源包;a calculating unit, configured to combine the incremental difference packet and the resource package of the file to be updated according to a preset merging algorithm, to obtain a resource package of the updated file to be updated;
    更新单元,用于解压所得到的更新后的所述待更新文件的资源包,得到完成更新后的文件。And an update unit, configured to decompress the obtained resource package of the updated file to be updated, and obtain the updated file.
  23. 如权利要求21所述的装置,其特征在于,所获取到的资源包为新版本资源包,则所述更新模块包括:The device according to claim 21, wherein the obtained resource package is a new version resource package, and the update module comprises:
    解压单元,用于解压获取的新版本资源包,得到完成更新后的文件。The decompression unit is used to decompress the obtained new version resource package and obtain the updated file.
  24. 如权利要求22-23任一项所述的装置,其特征在于,还包括:The device of any of claims 22-23, further comprising:
    接收模块,用于接收服务端返回的新版本资源包的包标识;a receiving module, configured to receive a packet identifier of a new version resource package returned by the server;
    所述生成模块,还用于对所述完成更新后的文件的资源包进行计算,得到更新后的文件的资源包的更新包标识;The generating module is further configured to calculate a resource package of the file after the update is completed, and obtain an update package identifier of the resource package of the updated file;
    提示模块,用于将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示。And a prompting module, configured to compare the received package identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails.
  25. 如权利要求22所述的装置,其特征在于,还包括:第一接收模块和第一提示模块;其中:The device according to claim 22, further comprising: a first receiving module and a first prompting module; wherein:
    所述第一接收模块,用于在所述请求模块向服务端发送更新请求之后,接收服务端返回的新版本资源包的包标识;The first receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
    所述生成模块,还用于在所述计算单元得到更新后的所述待更新文件的资源包之后,在所述更新单元解压所得到的更新后的所述待更新文件的资源包之 前,对所述更新后的所述待更新文件的资源包进行计算,得到更新包标识;The generating module is further configured to: after the computing unit obtains the updated resource package of the file to be updated, decompress the obtained resource package of the updated file to be updated in the update unit Pre-calculating the resource package of the updated file to be updated to obtain an update package identifier;
    所述第一提示模块,用于将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,指示所述更新单元执行所述解压所得到的更新后的所述待更新文件的资源包的操作。The first prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication The updating unit performs an operation of decompressing the updated resource package of the file to be updated obtained by the decompression.
  26. 如权利要求23所述的装置,其特征在于,还包括:第二接收模块和第二提示模块;其中:The device according to claim 23, further comprising: a second receiving module and a second prompting module; wherein:
    所述第二接收模块,用于在所述请求模块向服务端发送更新请求之后,接收服务端返回的新版本资源包的包标识;The second receiving module is configured to: after the requesting module sends an update request to the server, receive a packet identifier of a new version resource package returned by the server;
    所述生成模块,还用于在所述处理模块获取到所述新版本资源包之后,在所述解压单元解压获取的新版本资源包之前,对所获取的所述新版本资源包进行计算,得到更新包标识;The generating module is further configured to: after the processing module obtains the new version resource package, perform calculation on the acquired new version resource package before the decompressing unit decompresses the obtained new version resource package, Get the update package identifier;
    所述第二提示模块,用于将接收到的所述新版本资源包的包标识与所述更新包标识进行比较,若不相同,则发出用于指示更新失败的提示,若相同,指示所述解压单元执行所述解压所得到的更新后的所述待更新文件的资源包的操作。The second prompting module is configured to compare the received packet identifier of the new version resource package with the update package identifier, and if not, issue a prompt for indicating that the update fails, if the same, the indication The decompression unit performs an operation of decompressing the resource package of the updated file to be updated obtained by the decompression.
  27. 一种数据处理系统,其特征在于,包括:服务端和更新端;其中:A data processing system, comprising: a server and an update; wherein:
    所述服务端,用于当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;The server is configured to calculate, according to the difference algorithm, a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and use the difference part as the incremental difference package of each historical version resource package. Storing each incremental differential packet, and recording the mapping relationship between the packet identifier of each historical version resource bundle and the corresponding incremental differential packet storage address;
    所述更新端,用于向所述服务端发送更新请求,所述更新请求中包括待更新版本资源包标识;The update end is configured to send an update request to the server, where the update request includes a version resource package identifier to be updated;
    所述服务端,还用于若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址;The server is further configured to: if receiving an update request that carries the resource pack identifier to be updated, determine a packet identifier of a historical version resource bundle that is the same as the identifier value of the to-be-updated version resource bundle identifier; Finding an incremental differential packet storage address and responding to the update request to return the found incremental differential packet storage address;
    所述更新端,还用于根据所述返回的增量差分包存储地址发出下载请求下 载增量差分包,以对待更新文件进行更新。The update end is further configured to issue a download request according to the returned incremental differential packet storage address Load incremental packets to update the files to be updated.
  28. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,其特征在于,所述方法包括以下步骤:A storage medium containing computer executable instructions for performing a data update method, when executed by a computer processor, characterized in that the method comprises the steps of:
    当接收到新版本资源包后,根据差分算法计算新版本资源包与存储的各历史版本资源包的差分部分,将差分部分作为各历史版本资源包的增量差分包;After receiving the new version resource package, calculating a difference part between the new version resource package and the stored historical version resource package according to the difference algorithm, and using the difference part as the incremental difference package of each historical version resource package;
    存储各增量差分包,并记录各历史版本资源包的包标识与对应增量差分包存储地址的映射关系;Storing each incremental differential packet, and recording a mapping relationship between a packet identifier of each historical version resource bundle and a corresponding incremental differential packet storage address;
    若接收到携带待更新版本资源包标识的更新请求,确定与所述待更新版本资源包标识的标识值相同的历史版本资源包的包标识;And if the update request carrying the identifier of the resource pack to be updated is received, determining a packet identifier of the historical version resource package that is the same as the identifier value of the resource pack identifier to be updated;
    根据确定的包标识查找增量差分包存储地址,并响应所述更新请求以返回查找到的增量差分包存储地址。The incremental differential packet storage address is looked up based on the determined packet identification and is responsive to the update request to return the found incremental differential packet storage address.
  29. 一种包含计算机可执行指令的存储介质,所述计算机可执行指令在由计算机处理器执行时用于执行一种数据更新方法,其特征在于,所述方法包括以下步骤:A storage medium containing computer executable instructions for performing a data update method, when executed by a computer processor, characterized in that the method comprises the steps of:
    在检测到对本端的待更新文件进行更新时,生成该待更新文件的待更新版本资源包标识;When the update of the file to be updated on the local end is detected, the resource package identifier of the to-be-updated version of the file to be updated is generated;
    向服务端发送更新请求,所述更新请求中携带所述待更新文件的版本信息和所述待更新版本资源包标识;Sending an update request to the server, where the update request carries the version information of the file to be updated and the version resource package identifier to be updated;
    接收所述服务端根据所述更新请求中的版本信息和包标识返回的资源包存储地址,根据该资源包存储地址发起下载请求以获取资源包,并根据获取的资源包更新所述待更新文件;Receiving, by the server, the downloading request according to the resource package storage address to obtain the resource package according to the version information in the update request and the resource package storage address returned by the package identifier, and updating the to-be-updated file according to the obtained resource package. ;
    其中,接收到的资源包存储地址包括增量差分包存储地址或新版本资源包存储地址,所述增量差分包是所述服务端根据差分算法计算所述服务端中所述待更新文件对应的新版本资源包与存储的各历史版本资源包的差分部分。 The received resource packet storage address includes an incremental differential packet storage address or a new version resource resource storage address, and the incremental differential packet is configured by the server to calculate the file to be updated in the server according to a difference algorithm. The new version of the resource bundle is stored with the differential portion of each historical version of the resource bundle.
PCT/CN2014/088424 2013-11-25 2014-10-11 Data update method, apparatus, and system and storage medium WO2015074467A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310603835.1 2013-11-25
CN201310603835.1A CN104657170A (en) 2013-11-25 2013-11-25 Data updating method, device and system

Publications (1)

Publication Number Publication Date
WO2015074467A1 true WO2015074467A1 (en) 2015-05-28

Family

ID=53178910

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/088424 WO2015074467A1 (en) 2013-11-25 2014-10-11 Data update method, apparatus, and system and storage medium

Country Status (2)

Country Link
CN (1) CN104657170A (en)
WO (1) WO2015074467A1 (en)

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557262A (en) * 2015-09-23 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and device
CN108628623A (en) * 2018-04-04 2018-10-09 苏州天魂网络科技股份有限公司 A kind of newer solution of the whole packet heat of mobile platform based on markov chain Monte-Carlo packetization technique algorithm
WO2019037414A1 (en) * 2017-08-25 2019-02-28 深圳壹账通智能科技有限公司 Page configuration update method and device, and server and storage medium
CN109783451A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 File updating method, device, equipment and medium based on Message Digest 5
CN110162319A (en) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 Application program update method, apparatus, computer equipment and storage medium
CN110825408A (en) * 2019-10-30 2020-02-21 中国农业银行股份有限公司 Program version updating method, self-service equipment and version control server
CN110955805A (en) * 2019-12-18 2020-04-03 重庆大数据研究院有限公司 An automatic data processing method based on mapping relationship
CN111142924A (en) * 2020-01-21 2020-05-12 江苏艾佳家居用品有限公司 Application increment updating method based on Bsdiff method
CN111147560A (en) * 2019-12-18 2020-05-12 河北远东通信系统工程有限公司 Data synchronization method based on HTTP (hyper text transport protocol) protocol high speed, high stability and breakpoint continuous transmission
CN111262726A (en) * 2020-01-08 2020-06-09 Oppo广东移动通信有限公司 Configuration information updating method and device and computer readable storage medium
CN111339118A (en) * 2020-03-27 2020-06-26 中国建设银行股份有限公司 Kubernetes-based resource change history recording method and device
CN111416842A (en) * 2020-03-06 2020-07-14 科大讯飞股份有限公司 Automatic resource cluster distribution and hot update system and method
CN111556127A (en) * 2020-04-24 2020-08-18 广东乐心医疗电子股份有限公司 Wearable device upgrading method and related device
CN111857781A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Resource updating method and related equipment
CN112035114A (en) * 2020-09-02 2020-12-04 平安普惠企业管理有限公司 Page rollback method, device, equipment and medium
CN112272104A (en) * 2020-09-15 2021-01-26 浪潮思科网络科技有限公司 Public configuration database method and device for multi-form configuration management
CN112527369A (en) * 2020-12-31 2021-03-19 神思电子技术股份有限公司 Resource updating method of intelligent terminal
CN112559180A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Resource processing method and device, electronic equipment and storage medium
CN112783539A (en) * 2020-04-20 2021-05-11 招商证券股份有限公司 Application updating method, system, terminal device and storage medium
CN113190254A (en) * 2021-05-21 2021-07-30 珠海金山网络游戏科技有限公司 Updating method and device
CN113326059A (en) * 2020-02-28 2021-08-31 腾讯科技(深圳)有限公司 Resource updating method, device and storage medium
CN113568633A (en) * 2021-06-24 2021-10-29 东莞市奥海科技股份有限公司 Server power supply online updating method and device, computer equipment and storage medium
CN113568643A (en) * 2021-08-04 2021-10-29 中国建设银行股份有限公司 Resource acquisition method and device, electronic equipment and computer readable medium
CN113849494A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Data updating method and device
CN114338531A (en) * 2021-12-22 2022-04-12 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114443122A (en) * 2022-01-20 2022-05-06 山东浪潮通软信息科技有限公司 Multi-branch and multi-version package management method and device
CN114594979A (en) * 2022-03-11 2022-06-07 网易(杭州)网络有限公司 Resource file updating method and device, storage medium and terminal equipment
CN114816478A (en) * 2022-04-26 2022-07-29 土巴兔集团股份有限公司 Offline resource packet difference method, device, equipment and medium
CN114911507A (en) * 2022-07-15 2022-08-16 浙江大华技术股份有限公司 Method and device for updating algorithm package
CN114928645A (en) * 2022-04-26 2022-08-19 青岛海尔科技有限公司 Resource package processing method and device, storage medium and electronic device
CN115098157A (en) * 2022-07-19 2022-09-23 平安壹钱包电子商务有限公司 Method and device for processing public service data
CN116501363A (en) * 2023-06-29 2023-07-28 杭州美创科技股份有限公司 Method and device for rapidly upgrading software offline, computer equipment and storage medium
CN117632211A (en) * 2022-08-19 2024-03-01 荣耀终端有限公司 Application update method, electronic device and readable medium
CN119127269A (en) * 2024-05-31 2024-12-13 苏州浩辰软件股份有限公司 Incremental upgrade method and device, storage medium, and computer program product
CN119127273A (en) * 2024-09-07 2024-12-13 上海信莅达信息科技有限公司 Computer control method

Families Citing this family (61)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293793A (en) * 2015-06-02 2017-01-04 西安中兴新软件有限责任公司 The method for upgrading software of a kind of terminal, device and system
CN105138376A (en) * 2015-09-01 2015-12-09 北京皮尔布莱尼软件有限公司 Mixed model application, webpage resource upgrading method thereof, mobile terminal and system
CN106557335A (en) * 2015-09-28 2017-04-05 网易(杭州)网络有限公司 The update method of application program, apparatus and system
CN106933614B (en) * 2015-12-30 2020-12-22 阿里巴巴(中国)有限公司 Single-page application upgrading method and device
CN107038039A (en) * 2016-02-04 2017-08-11 腾讯科技(深圳)有限公司 Data-updating method and device
JP6609199B2 (en) * 2016-03-01 2019-11-20 ルネサスエレクトロニクス株式会社 Embedded equipment
CN105893080B (en) * 2016-03-28 2019-04-16 努比亚技术有限公司 Application management method and device
CN106156291A (en) * 2016-06-29 2016-11-23 深圳市彬讯科技有限公司 The caching method of static resource and system thereof based on Localstroage
CN107707584B (en) * 2016-08-08 2020-12-29 腾讯科技(深圳)有限公司 Application loading method, terminal and platform server
CN106357775A (en) * 2016-09-23 2017-01-25 成都知道创宇信息技术有限公司 Website real-time online implementation method based on CDN (content distribution network) node
CN108023920B (en) * 2016-10-28 2021-11-26 阿里巴巴集团控股有限公司 Data packet transmission method, equipment and application interface
CN106528235A (en) * 2016-11-11 2017-03-22 深圳铂睿智恒科技有限公司 Intelligent terminal application upgrading method and system
CN106815327A (en) * 2016-12-29 2017-06-09 南京欣网互联信息技术有限公司 One kind is for moving operation data resource regeneration method
CN108572986B (en) * 2017-03-13 2022-05-17 华为技术有限公司 A method and node device for updating data
CN107343031A (en) * 2017-06-21 2017-11-10 福建中金在线信息科技有限公司 A kind of method, apparatus for automatically updating file, electronic equipment and storage medium
CN107479921A (en) * 2017-08-04 2017-12-15 四川长虹电器股份有限公司 Mobile solution end dynamic load WebView method
CN107453960B (en) * 2017-09-26 2020-08-25 青岛聚看云科技有限公司 Method, device and system for processing test data in service test
CN107682436A (en) * 2017-10-09 2018-02-09 武汉斗鱼网络科技有限公司 A kind of method, apparatus and equipment of more new file
CN108111331B (en) * 2017-11-06 2021-04-16 北京趣拿软件科技有限公司 Method, device, storage medium, processor and system for acquiring update data packet
CN108449377A (en) * 2018-02-02 2018-08-24 珠海金山网络游戏科技有限公司 A kind of update method and resource packing and issuing system and method for game version
CN110134509B (en) * 2018-02-08 2021-07-27 中移(苏州)软件技术有限公司 Method and device for caching data
CN108322825A (en) * 2018-02-28 2018-07-24 北京四达时代软件技术股份有限公司 A kind of difference upgrade method and system
CN110321139B (en) * 2018-03-29 2023-06-23 阿里巴巴(中国)有限公司 Data management method and system
CN109063067A (en) * 2018-07-23 2018-12-21 五八有限公司 Picture update method, picture updating device, server, terminal and storage medium
CN109032641B (en) * 2018-07-24 2022-07-08 杭州安恒信息技术股份有限公司 Application version update method and device
CN110780911A (en) * 2018-07-30 2020-02-11 中兴通讯股份有限公司 Information processing method, equipment and computer readable storage medium
CN109711998B (en) * 2018-08-20 2023-10-20 中国平安人寿保险股份有限公司 Data transmission method, device, equipment and readable storage medium
CN109471653B (en) * 2018-09-29 2022-06-17 阿波罗智联(北京)科技有限公司 Application program updating method, electronic device, server and storage medium
CN112262556B (en) * 2018-11-01 2022-01-21 华为技术有限公司 Model file management method and terminal equipment
CN109542851A (en) * 2018-11-30 2019-03-29 北京金山云网络技术有限公司 File update method, device and system
CN113873013B (en) * 2018-12-25 2023-06-16 创新先进技术有限公司 Offline package reorganization method and system
CN111488410B (en) * 2019-01-25 2023-05-09 阿里巴巴集团控股有限公司 NDS data differential processing method, NDS data differential processing device, NDS data updating device and electronic equipment
CN109783137A (en) * 2019-02-19 2019-05-21 网易(杭州)网络有限公司 Inspection method, the device and system of fine arts resource
CN110113377A (en) * 2019-04-01 2019-08-09 苏宁易购集团股份有限公司 The method and device of release upgrade suitable for mixed mode applications, smart machine
CN110244957A (en) * 2019-05-10 2019-09-17 阿里巴巴集团控股有限公司 A kind of resource data updating method, apparatus and system
CN110232070A (en) * 2019-05-28 2019-09-13 上海易点时空网络有限公司 Exam pool update method and device, server
CN110457614B (en) * 2019-07-03 2020-06-16 南方电网数字电网研究院有限公司 Data increment updating method and device for reducing data concurrency and computer equipment
CN110505289B (en) * 2019-08-07 2022-04-26 Oppo广东移动通信有限公司 File downloading method and device, computer readable medium and wireless communication equipment
CN111831300B (en) * 2019-08-23 2025-02-11 北京骑胜科技有限公司 APP update method, device, electronic device and computer-readable storage medium
CN110515647B (en) * 2019-08-28 2024-07-26 北京思维造物信息科技股份有限公司 Static resource management method, device, equipment and storage medium
CN110750546B (en) * 2019-10-21 2023-07-25 中国民航信息网络股份有限公司 Database updating method and device
CN111124464B (en) * 2019-11-19 2024-05-17 红石阳光(北京)科技股份有限公司 Method, system and computer readable storage medium for differential upgrade of embedded system
CN111614750B (en) * 2020-05-19 2023-05-12 深圳市网心科技有限公司 A data update method, system, device and storage medium
CN111787390B (en) * 2020-09-07 2020-11-24 武汉工程大学 Content distribution device based on information distribution system
CN112099826B (en) * 2020-09-14 2024-05-10 徐州徐工挖掘机械有限公司 Parameter upgrading control method, controller, electronic equipment and excavator
CN112657196B (en) * 2020-12-21 2024-11-08 北京像素软件科技股份有限公司 Resource updating method, device, computer equipment and readable storage medium
CN112579140A (en) * 2020-12-22 2021-03-30 四川虹微技术有限公司 Software upgrading method and device
CN112597423B (en) * 2021-01-04 2023-11-03 聚好看科技股份有限公司 A method, terminal and server for displaying web page content
CN112947983B (en) * 2021-04-15 2024-03-15 网易(杭州)网络有限公司 Application program updating method and device, electronic equipment and storage medium
CN113742623A (en) * 2021-08-23 2021-12-03 中国银联股份有限公司 Page loading method, assembly, system, device and computer readable storage medium
CN113886364A (en) * 2021-10-21 2022-01-04 南京元贝信息技术有限公司 Application resource update method, device, device and storage medium
CN116302224B (en) * 2021-12-21 2025-01-07 青岛国创智能家电研究院有限公司 Interface switching method and device for RTOS system, terminal equipment and storage medium
CN114404991A (en) * 2021-12-27 2022-04-29 北京像素软件科技股份有限公司 Data replacement method, server, update system, and computer-readable storage medium
CN114745435B (en) * 2022-03-31 2024-02-23 北京达佳互联信息技术有限公司 Resource display method and device, electronic equipment and storage medium
CN115086345A (en) * 2022-05-13 2022-09-20 北京百度网讯科技有限公司 File synchronization method and device, electronic equipment and readable storage medium
CN114900478B (en) * 2022-06-08 2024-03-26 珠海金山数字网络科技有限公司 Resource processing system and method
CN115865662A (en) * 2022-11-17 2023-03-28 四川启睿克科技有限公司 Smart factory APP updating method based on light application framework
CN115905266B (en) * 2022-12-29 2024-10-18 支付宝(杭州)信息技术有限公司 Method for processing graph structure data and storage engine for graph structure data
CN116212397A (en) * 2023-02-10 2023-06-06 厦门不妨游戏科技有限公司 Data updating method and device, readable storage medium and electronic equipment
CN116932014B (en) * 2023-09-15 2023-12-12 腾讯科技(深圳)有限公司 Application updating method, device, equipment and computer readable storage medium
CN117540707A (en) * 2023-10-11 2024-02-09 中移互联网有限公司 Data collaborative editing method, device and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101883139A (en) * 2010-06-11 2010-11-10 华为终端有限公司 Method for upgrading peripheral equipment software, computer and system
CN102081536A (en) * 2010-12-30 2011-06-01 华为终端有限公司 Method for updating increment, and server
CN102195804A (en) * 2011-03-10 2011-09-21 易程(苏州)软件股份有限公司 Automatic updating method of software and system thereof
CN102855288A (en) * 2012-08-08 2013-01-02 北京奇虎科技有限公司 Method and device for processing difference data
CN103002024A (en) * 2012-11-21 2013-03-27 用友软件股份有限公司 Application program upgrade system and application program upgrade method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003284292A1 (en) * 2002-10-21 2004-05-13 Bitfone Corporation System with required enhancements to syncml dm environment to support firmware updates
CN101420431B (en) * 2008-11-28 2012-07-04 中兴通讯股份有限公司 FOTA server, terminal and software version processing method and system therefor
CN102799445A (en) * 2012-05-03 2012-11-28 陈昊 Application upgrading method based on Android platform and system
CN103064714A (en) * 2013-01-08 2013-04-24 北京赛科世纪数码科技有限公司 Software system updating method and software system updating device
CN103200219A (en) * 2013-02-05 2013-07-10 北京小米科技有限责任公司 Data package updating method, device, terminal equipment and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101883139A (en) * 2010-06-11 2010-11-10 华为终端有限公司 Method for upgrading peripheral equipment software, computer and system
CN102081536A (en) * 2010-12-30 2011-06-01 华为终端有限公司 Method for updating increment, and server
CN102195804A (en) * 2011-03-10 2011-09-21 易程(苏州)软件股份有限公司 Automatic updating method of software and system thereof
CN102855288A (en) * 2012-08-08 2013-01-02 北京奇虎科技有限公司 Method and device for processing difference data
CN103002024A (en) * 2012-11-21 2013-03-27 用友软件股份有限公司 Application program upgrade system and application program upgrade method

Cited By (46)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557262A (en) * 2015-09-23 2017-04-05 腾讯科技(深圳)有限公司 A kind of data processing method and device
CN106557262B (en) * 2015-09-23 2020-07-14 腾讯科技(深圳)有限公司 Data processing method and device
WO2019037414A1 (en) * 2017-08-25 2019-02-28 深圳壹账通智能科技有限公司 Page configuration update method and device, and server and storage medium
CN108628623A (en) * 2018-04-04 2018-10-09 苏州天魂网络科技股份有限公司 A kind of newer solution of the whole packet heat of mobile platform based on markov chain Monte-Carlo packetization technique algorithm
CN109783451A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 File updating method, device, equipment and medium based on Message Digest 5
CN110162319A (en) * 2019-04-15 2019-08-23 深圳壹账通智能科技有限公司 Application program update method, apparatus, computer equipment and storage medium
CN110825408B (en) * 2019-10-30 2024-02-23 中国农业银行股份有限公司 Program version updating method, self-service device and version control server
CN110825408A (en) * 2019-10-30 2020-02-21 中国农业银行股份有限公司 Program version updating method, self-service equipment and version control server
CN110955805A (en) * 2019-12-18 2020-04-03 重庆大数据研究院有限公司 An automatic data processing method based on mapping relationship
CN110955805B (en) * 2019-12-18 2023-08-25 重庆大数据研究院有限公司 Data automation processing method based on mapping relation
CN111147560A (en) * 2019-12-18 2020-05-12 河北远东通信系统工程有限公司 Data synchronization method based on HTTP (hyper text transport protocol) protocol high speed, high stability and breakpoint continuous transmission
CN111262726A (en) * 2020-01-08 2020-06-09 Oppo广东移动通信有限公司 Configuration information updating method and device and computer readable storage medium
CN111142924A (en) * 2020-01-21 2020-05-12 江苏艾佳家居用品有限公司 Application increment updating method based on Bsdiff method
CN113326059A (en) * 2020-02-28 2021-08-31 腾讯科技(深圳)有限公司 Resource updating method, device and storage medium
CN113326059B (en) * 2020-02-28 2024-04-26 腾讯科技(深圳)有限公司 Resource updating method, device and storage medium
CN111416842A (en) * 2020-03-06 2020-07-14 科大讯飞股份有限公司 Automatic resource cluster distribution and hot update system and method
CN111339118A (en) * 2020-03-27 2020-06-26 中国建设银行股份有限公司 Kubernetes-based resource change history recording method and device
CN112783539A (en) * 2020-04-20 2021-05-11 招商证券股份有限公司 Application updating method, system, terminal device and storage medium
CN111556127A (en) * 2020-04-24 2020-08-18 广东乐心医疗电子股份有限公司 Wearable device upgrading method and related device
CN111857781A (en) * 2020-07-23 2020-10-30 平安普惠企业管理有限公司 Resource updating method and related equipment
CN111857781B (en) * 2020-07-23 2022-06-10 平安普惠企业管理有限公司 Resource updating method and related equipment
CN112035114A (en) * 2020-09-02 2020-12-04 平安普惠企业管理有限公司 Page rollback method, device, equipment and medium
CN112272104A (en) * 2020-09-15 2021-01-26 浪潮思科网络科技有限公司 Public configuration database method and device for multi-form configuration management
CN112272104B (en) * 2020-09-15 2023-06-30 浪潮思科网络科技有限公司 Common configuration database method and device for multi-form configuration management
CN112559180A (en) * 2020-12-16 2021-03-26 微医云(杭州)控股有限公司 Resource processing method and device, electronic equipment and storage medium
CN112559180B (en) * 2020-12-16 2024-03-26 微医云(杭州)控股有限公司 Resource processing method and device, electronic equipment and storage medium
CN112527369A (en) * 2020-12-31 2021-03-19 神思电子技术股份有限公司 Resource updating method of intelligent terminal
CN112527369B (en) * 2020-12-31 2024-02-27 神思电子技术股份有限公司 Resource updating method of intelligent terminal
CN113190254A (en) * 2021-05-21 2021-07-30 珠海金山网络游戏科技有限公司 Updating method and device
CN113568633A (en) * 2021-06-24 2021-10-29 东莞市奥海科技股份有限公司 Server power supply online updating method and device, computer equipment and storage medium
CN113568643A (en) * 2021-08-04 2021-10-29 中国建设银行股份有限公司 Resource acquisition method and device, electronic equipment and computer readable medium
CN113849494A (en) * 2021-09-29 2021-12-28 联想(北京)有限公司 Data updating method and device
CN114338531B (en) * 2021-12-22 2024-04-05 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114338531A (en) * 2021-12-22 2022-04-12 广东明创软件科技有限公司 Flow control method, device and storage medium
CN114443122A (en) * 2022-01-20 2022-05-06 山东浪潮通软信息科技有限公司 Multi-branch and multi-version package management method and device
CN114594979A (en) * 2022-03-11 2022-06-07 网易(杭州)网络有限公司 Resource file updating method and device, storage medium and terminal equipment
CN114816478A (en) * 2022-04-26 2022-07-29 土巴兔集团股份有限公司 Offline resource packet difference method, device, equipment and medium
CN114928645B (en) * 2022-04-26 2024-04-19 青岛海尔科技有限公司 Resource package processing method and device, storage medium and electronic device
CN114928645A (en) * 2022-04-26 2022-08-19 青岛海尔科技有限公司 Resource package processing method and device, storage medium and electronic device
CN114911507A (en) * 2022-07-15 2022-08-16 浙江大华技术股份有限公司 Method and device for updating algorithm package
CN114911507B (en) * 2022-07-15 2022-09-23 浙江大华技术股份有限公司 Updating method and equipment of algorithm package
CN115098157A (en) * 2022-07-19 2022-09-23 平安壹钱包电子商务有限公司 Method and device for processing public service data
CN117632211A (en) * 2022-08-19 2024-03-01 荣耀终端有限公司 Application update method, electronic device and readable medium
CN116501363A (en) * 2023-06-29 2023-07-28 杭州美创科技股份有限公司 Method and device for rapidly upgrading software offline, computer equipment and storage medium
CN119127269A (en) * 2024-05-31 2024-12-13 苏州浩辰软件股份有限公司 Incremental upgrade method and device, storage medium, and computer program product
CN119127273A (en) * 2024-09-07 2024-12-13 上海信莅达信息科技有限公司 Computer control method

Also Published As

Publication number Publication date
CN104657170A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
WO2015074467A1 (en) Data update method, apparatus, and system and storage medium
CN108845816B (en) Application program updating method, system, computer device and storage medium
US20190238478A1 (en) Using a template to update a stack of resources
RU2689439C2 (en) Improved performance of web access
US8453049B1 (en) Delayed code parsing for reduced startup latency
WO2015161658A1 (en) Webpage resource loading method and device
TWI670611B (en) Web file sending method, webpage rendering method and device, webpage rendering system
CN111045833B (en) Interface calling method and device
WO2015180601A1 (en) Method and device for starting operation of webapp and generating mirror image file
CN110688174A (en) Container starting method, storage medium and electronic device
CN105022750A (en) resource file loading method and device
CN107357890B (en) Webpage file processing method, device and system and storage equipment
CN110162964B (en) Method, device and system for checking file tampering
US20110099516A1 (en) Method for centralized application package distribution
WO2017143747A1 (en) Network request method and system for network terminal
AU2016101498B4 (en) Data Interchange System
CN119441650A (en) Web page loading method, device, electronic device and storage medium
CN111782244A (en) Configuration file update method, device, computer equipment and storage medium
US20160182605A1 (en) Dynamic Content Aggregation
TWI507984B (en) Web application versioning and loading method
CN118034843A (en) Page refresh method, device, storage medium and electronic device
CN116974998A (en) Data file updating method, device, computer equipment and storage medium
US9363321B2 (en) Analytics based scoping of HTML5 web storage attributes
CN113934732A (en) User portrait data processing method and device, storage medium and electronic equipment
CN117193874A (en) Plug-in processing method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14864221

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14864221

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 12.10.2016)

122 Ep: pct application non-entry in european phase

Ref document number: 14864221

Country of ref document: EP

Kind code of ref document: A1