Client resource file package difference updating method and device
By implementing the difference update method of resource file packages between the client and the server, and using the version number and summary value for verification, the load problem caused by the existing full update method on server resources is solved, and customer experience and update efficiency are improved.
Patent Information
- Application Number
- CN202311540236.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-13
AI Technical Summary
The existing full update method has a large load on server resources, affecting customer experience and server concurrency capabilities, and has low update efficiency.
By implementing the difference update method of resource file packages between the client and the server, the version number and digest value are used for verification, if the difference is consistent, the difference is updated, and if the difference is inconsistent, the full update is performed.
It reduces the impact and risks of full updates on server resources, improves customer experience and update efficiency, and reduces the server load and the number of files downloaded by the client.
Smart Images

Figure CN119987824A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data updating, and in particular to a method and device for differentially updating a client resource file package. Background Art
[0002] With the rapid development of Internet finance, the types of business and scope of operations supported by banking products have gradually expanded. In the front-end framework of the client, each transaction is a resource file (bundle), and multiple bundles are combined into a resource file package (bundle package). At present, the full resource file package (bundle package) contains many files, reaching hundreds or even thousands, and it will become larger and larger with the update of resources. Users who have not been enabled for a long time will perform a full update when using the client. The full resource file package has many files, and the traffic and time consumed by the update will affect the customer experience. In addition, the update of the full bundle package will cause a large load on the server resources. Each full download by the customer will occupy the service bandwidth and server I / O, affecting the server's concurrency capacity. Therefore, how to reduce the impact and risk of the existing full update method on server resources and improve customer experience and update efficiency is a technical problem that the existing technology urgently needs to solve. Summary of the invention
[0003] In order to solve at least one technical problem in the above-mentioned background technology, the present invention proposes a method and device for differential updating of client resource file packages.
[0004] In order to achieve the above object, according to one aspect of the present invention, a method for updating a resource file package difference on a client is provided, the method comprising:
[0005] Obtaining a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package;
[0006] Searching for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and summary values of all versions of the resource to be updated;
[0007] The summary value in the resource file package update request is compared with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, the file path of the latest version of the resource file package of the resource to be updated is sent to the client, so that the client can download and update the resource; if the comparison is consistent, the differential resource package corresponding to the version number in the resource file package update request is searched, and the file path of the found differential resource package is sent to the client, so that the client can download and update the resource.
[0008] Optionally, the client resource file package differential update method further includes:
[0009] Each time the resource to be updated is updated, a resource file package of the latest version is generated, and a differential resource package between the resource file package of the latest version and each historical version of the resource file package is generated;
[0010] Establish the correspondence between the version numbers of each historical version and the differential resource packages;
[0011] The searching for the differential resource package corresponding to the version number in the resource file package update request specifically includes:
[0012] The differential resource package corresponding to the version number in the resource file package update request is searched according to the corresponding relationship.
[0013] Optionally, the client resource file package differential update method further includes:
[0014] If the resource information cannot be found according to the identification information, a resource deletion instruction corresponding to the resource to be updated is sent to the client, so that the client deletes its local resource file corresponding to the resource to be updated according to the resource deletion instruction.
[0015] Optionally, the client resource file package differential update method further includes:
[0016] If the version number in the resource file package update request is empty, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0017] Optionally, the client resource file package differential update method further includes:
[0018] If the resource information does not contain the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0019] Optionally, the client resource file package differential update method further includes:
[0020] If the resource information does not contain the summary value corresponding to the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0021] Optionally, the client resource file package differential update method further includes:
[0022] If the differential resource package corresponding to the version number in the resource file package update request cannot be found, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0023] In order to achieve the above object, according to another aspect of the present invention, a client resource file package differential update device is provided, the device comprising:
[0024] An update request acquisition unit, configured to acquire a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package;
[0025] A resource information searching unit, configured to search for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and summary values of all versions of the resource to be updated;
[0026] A resource package determination unit is used to compare the summary value in the resource file package update request with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, the file path of the latest version of the resource file package of the resource to be updated is sent to the client, so that the client can download and update the resource; if the comparison is consistent, the differential resource package corresponding to the version number in the resource file package update request is searched, and the file path of the found differential resource package is sent to the client, so that the client can download and update the resource.
[0027] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned client resource file package differential update method when executing the computer program.
[0028] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer-readable storage medium is further provided, on which a computer program / instruction is stored, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned client resource file package differential update method are implemented.
[0029] The beneficial effects of the present invention are:
[0030] When receiving a resource file package update request from a client, the present invention verifies the summary value in the resource file package update request. If the verification is inconsistent, a full update is performed. If the verification is consistent, a differential resource package corresponding to the version number in the resource file package update request is searched, and then a differential update is performed based on the differential resource package. It can be seen that the present invention optimizes the full update method of the prior art to perform differential updates when permitted. Since the number of files in the differential update is much less than the data of the full update, the present invention can reduce the impact and risks of the existing full update method on server resources, and improve customer experience and update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0032] Figure 1 is a flow chart of a method for updating a client resource file package difference according to an embodiment of the present invention;
[0033] Figure 2 is a flow chart of generating a differential resource package according to an embodiment of the present invention;
[0034] Figure 3 It is a schematic diagram of an application scenario of the present invention;
[0035] Figure 4 It is a structural block diagram of a client resource file package differential update device according to an embodiment of the present invention;
[0036] Figure 5 It is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0039] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.
[0040] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0041] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
[0042] It should be noted that the client resource file package differential update method and device of the present invention can be used in the financial field, and can also be used in any field other than the financial field. The application field of the client resource file package differential update method and device of the present invention is not limited.
[0043] The present invention proposes a client bundle resource differential update solution, which can be used to update the resources of the client RN page. The present invention supports the client differential update of bundle package content based on different versions through digital technology, and provides support for the division of labor in bank system project testing. The method of the present invention is suitable for the verification of the differential update content of the banking client bundle package, and can effectively solve the problem of insufficient coverage of the client resource update mechanism in complex scenarios.
[0044] Figure 3 It is a schematic diagram of the application scenario of the present invention, such as Figure 3 As shown, the application scenario of the present invention includes a client and a server. The client sends a resource file package update request to the server. The server determines whether the update method is a full update or a differential update based on the resource file package update request. After determination, the server returns the file path of the resource file package / differential resource package to the client, so that the client downloads resource data according to the file path and performs resource update.
[0045] It should be noted that the execution subject of the client resource file package differential update method in the following embodiments of the present invention is a server, that is, the client resource file package differential update method in the following embodiments of the present invention is applied to the server.
[0046] Figure 1 Flowchart of the client resource file package differential update method according to an embodiment of the present invention. Figure 1 As shown, in one embodiment of the present invention, the client resource file package differential update method of the present invention includes steps S101 to S103.
[0047] Step S101, obtaining a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package.
[0048] In one embodiment of the present invention, the identification information of the resource to be updated is specifically the ID of the resource to be updated. In the present invention, each resource has a corresponding unique ID.
[0049] In the present invention, each resource file package has a unique version number. When the version is updated, the latest version of the resource file package is generated, and the version number of the latest version of the resource file package is generated. The present invention can determine which version of the resource file package it is based on the version number.
[0050] In the present invention, a hash algorithm is used to calculate the summary value of each version of the resource file package and save it locally on the server. The summary value is used to verify the resource file package.
[0051] Step S102: searching for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and digest values of all versions of the resource to be updated.
[0052] In the present invention, the version numbers and digest values of all versions are stored in the server locally in the form of a corresponding relationship. Specifically, the present invention can store the corresponding relationship between the version numbers and digest values of all versions in an independent data table, and associate the data table with the resource ID.
[0053] Step S103, compare the summary value in the resource file package update request with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, send the file path of the latest version of the resource file package of the resource to be updated to the client, so that the client can download and update the resource; if the comparison is consistent, search for the differential resource package corresponding to the version number in the resource file package update request, and then send the file path of the found differential resource package to the client, so that the client can download and update the resource.
[0054] In the present invention, if the summary values are inconsistent, it means that the current resource file package in the client has been tampered with. In order to improve security and resource availability, the client needs to be fully updated according to the latest version of the resource file package.
[0055] In the present invention, each time the resource to be updated is updated, the version manager not only generates the resource file package of the latest version, but also generates a differential resource package between the resource file package of the latest version and each historical version of the resource file package. The client first builds in an initial resource file package corresponding to the client type (ios or android). When the client starts, the summary value of the built-in resource file package is compared with the resource file package of the same version in the background server. If the summary values are the same and the version number of the server resource file package is greater than the version number of the initial resource file package, the corresponding differential package is downloaded for differential update. If the summary values are different, it means that the resource file package in the client is damaged, and the latest resource file package will be downloaded in full for full update.
[0056] It can be seen that the present invention optimizes the full update method of the prior art to perform differential updates when permitted. Since the number of files in the differential update is much smaller than the data in the full update, the present invention can reduce the impact and risks of the existing full update method on server resources, thereby improving customer experience and update efficiency.
[0057] In one embodiment of the present invention, in order to perform differential updates, each resource file package has a corresponding version number. In an optional embodiment of the present invention, the version number can be updated according to each monthly version and patch.
[0058] In a specific embodiment of the present invention, the version number includes 6 digits, wherein the first two digits represent the year, the middle two digits represent the month, and the last two digits represent the patch number in the month.
[0059] In a specific embodiment of the present invention, the version number rules of the resource file package are as follows:
[0060] The version number consists of 6 digits, separated by dots (.). The first digit is fixed to 1, the second digit is set to 1 in 2018, and increases every year thereafter (for example, 2 in 2019, 3 in 2020, etc.), the third and fourth digits are the monthly version (0.1->1.2), and the fifth and sixth digits are the patch number for each month (0.0->9.9).
[0061] In one embodiment of the present invention, the version number of the resource file package is as follows:
[0062] 1.1.1.0.0.3, representing 2018 (the second digit is 1), October version (the third and fourth digits are 1.0), and the third patch (the fifth and sixth digits are not 0.3).
[0063] like Figure 2 As shown, in one embodiment of the present invention, the client resource file package differential update method of the present invention further includes step S201 and step S202.
[0064] Step S201, each time the resource to be updated is updated, a resource file package of the latest version is generated, and a differential resource package between the resource file package of the latest version and each historical version of the resource file package is generated.
[0065] For example, there are three versions in history, 1, 2, and 3. After the fourth version is generated, the differential resource packages between the fourth version and the first version, the differential resource packages between the fourth version and the second version, and the differential resource packages between the fourth version and the third version are generated respectively.
[0066] Step S202: establishing a correspondence between the version numbers of each historical version and the differential resource package.
[0067] In one embodiment of the present invention, the present invention concatenates the version number of the latest version with the version number of the historical version as the unique identification ID of the differential resource package between the latest version and the historical version, and establishes an association table to store the file path of the differential resource package and the unique identification ID of the differential resource package.
[0068] In one embodiment of the present invention, searching for the differential resource package corresponding to the version number in the resource file package update request in the above step S103 specifically includes:
[0069] The differential resource package corresponding to the version number in the resource file package update request is searched according to the corresponding relationship.
[0070] In one embodiment of the present invention, the present invention generates a unique identification ID of the differential resource package based on the version number in the resource file package update request and the version number of the current latest version of the resource file package, and then queries the association table based on the unique identification ID to obtain the file path of the corresponding differential resource package.
[0071] In one embodiment of the present invention, the client resource file package differential update method of the present invention also includes
[0072] If the resource information cannot be found according to the identification information, a resource deletion instruction corresponding to the resource to be updated is sent to the client, so that the client deletes its local resource file corresponding to the resource to be updated according to the resource deletion instruction.
[0073] In the present invention, if the server cannot find the resource information of the resource to be updated of the client, it means that the resource no longer exists, so a resource deletion instruction corresponding to the resource to be updated is sent to the client, thereby saving the storage space of the client.
[0074] In one embodiment of the present invention, the client resource file package differential update method of the present invention also includes
[0075] If the version number in the resource file package update request is empty, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0076] In the present invention, if the version number in the resource file package update request is empty, it means that the current resource file package in the client is abnormal. In order to ensure that the resources can be used correctly, the client needs to be fully updated according to the latest version of the resource file package.
[0077] In one embodiment of the present invention, the client resource file package differential update method of the present invention also includes
[0078] If the resource information does not contain the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0079] In the present invention, if the resource information does not contain the version number in the resource file package update request, it means that the current resource file package in the client is abnormal. In order to ensure that the resource can be used correctly, the client needs to be fully updated according to the latest version of the resource file package.
[0080] In one embodiment of the present invention, the client resource file package differential update method of the present invention also includes
[0081] If the resource information does not contain the summary value corresponding to the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0082] In the present invention, if the resource information does not contain the summary value corresponding to the version number in the resource file package update request, it means that an abnormality has occurred in the historical version file on the server side. In order to ensure that the resource can be used correctly, the client needs to be fully updated according to the latest version of the resource file package.
[0083] In one embodiment of the present invention, the client resource file package differential update method of the present invention also includes
[0084] If the differential resource package corresponding to the version number in the resource file package update request cannot be found, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
[0085] In the present invention, if the differential resource package corresponding to the version number in the resource file package update request cannot be found, it means that an abnormality has occurred in the production of the differential resource package. In order to ensure that the resources can be used correctly, the client needs to be fully updated according to the latest version of the resource file package.
[0086] It can be seen from the above embodiments that the present invention also sets a fallback rule when performing differential update, and still adopts full update when an exception occurs, which effectively ensures the resource availability of the client.
[0087] In one embodiment of the present invention, the present invention further sets a configuration file for the resource file package, and the configuration file includes: a split field, a basePath field, a resourceName field, an entryFile field, a bundleOutput field, a newV field, and a firstV field.
[0088] The split field indicates whether to perform bundle splitting (bundle splitting is required by default and is configured as true).
[0089] The basePath field is the directory of the base.js file, which configures the common components that all transaction bundles in the bundle package need to reference.
[0090] The resourceName field is the id of the bundle package.
[0091] The entryFile field is the path of the entry routing configuration file.
[0092] The bundleOutput field contains the file name and version number of the output bundle package.
[0093] The newV field is the latest version number of the bundle.
[0094] The firstV field is the initial version number of the bundle.
[0095] Each subsequent update of the client RN page requires increasing the version number and modifying the corresponding bundleOutput and newV fields.
[0096] It can be seen from the above embodiments that the present invention proposes a client bundle resource differential update solution. The present invention solves the impact and risks of full bundle package updates on server resources by designing bundle package version rules, defining update configuration files, and designing client judgment logic, thereby improving customer experience and update efficiency.
[0097] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0098] Based on the same inventive concept, an embodiment of the present invention also provides a client resource file package differential update device, which can be used to implement the client resource file package differential update method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by the client resource file package differential update device is similar to that of the client resource file package differential update method, the embodiment of the client resource file package differential update device can refer to the embodiment of the client resource file package differential update method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements predetermined functions. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0099] Figure 4 is a structural block diagram of a device for updating a resource file package difference on a client side according to an embodiment of the present invention. Figure 4 As shown, in one embodiment of the present invention, the client resource file package differential update device of the present invention includes:
[0100] An update request acquisition unit 1 is used to acquire a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package;
[0101] A resource information search unit 2, configured to search for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and summary values of all versions of the resource to be updated;
[0102] The resource package determination unit 3 is used to compare the summary value in the resource file package update request with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, the file path of the latest version of the resource file package of the resource to be updated is sent to the client, so that the client can download and update the resource; if the comparison is consistent, the differential resource package corresponding to the version number in the resource file package update request is searched, and the file path of the found differential resource package is sent to the client, so that the client can download and update the resource.
[0103] It can be seen that the present invention optimizes the full update method of the prior art to perform differential updates when permitted. Since the number of files in the differential update is much smaller than the data in the full update, the present invention can reduce the impact and risks of the existing full update method on server resources, thereby improving customer experience and update efficiency.
[0104] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0105] A differential resource package generating unit, configured to generate a resource file package of the latest version and a differential resource package of the resource file package of the latest version and each historical version of the resource file package each time the resource to be updated is updated;
[0106] A corresponding relationship establishing unit, used to establish a corresponding relationship between the version numbers of each historical version and the differential resource package;
[0107] In one embodiment of the present invention, the resource package determining unit 3 is specifically configured to search for a differential resource package corresponding to the version number in the resource file package update request according to the corresponding relationship.
[0108] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0109] The first processing unit is configured to send a resource deletion instruction corresponding to the resource to be updated to the client if the resource information cannot be found according to the identification information, so that the client deletes its local resource file corresponding to the resource to be updated according to the resource deletion instruction.
[0110] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0111] The second processing unit is configured to send the file path of the resource file package of the latest version of the resource to be updated to the client if the version number in the resource file package update request is empty, so that the client downloads and updates the resource.
[0112] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0113] The third processing unit is configured to send the file path of the latest version of the resource file package of the resource to be updated to the client if the resource information does not contain the version number in the resource file package update request, so that the client can download and update the resource.
[0114] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0115] The fourth processing unit is used to send the file path of the latest version of the resource file package of the resource to be updated to the client if the summary value corresponding to the version number in the resource file package update request does not exist in the resource information, so that the client can download and update the resource.
[0116] In one embodiment of the present invention, the client resource file package differential update device of the present invention further includes:
[0117] The fifth processing unit is used to send the file path of the latest version of the resource file package of the resource to be updated to the client if the differential resource package corresponding to the version number in the resource file package update request cannot be found, so that the client can download and update the resource.
[0118] In order to achieve the above object, according to another aspect of the present application, a computer device is also provided. Figure 5 As shown, the computer device includes a memory, a processor, a communication interface and a communication bus. A computer program that can be executed on the processor is stored in the memory. When the processor executes the computer program, the steps in the above-mentioned embodiment method are implemented.
[0119] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.
[0120] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs and units, such as the corresponding program units in the above method embodiments of the present invention. The processor executes various functional applications of the processor and works data processing by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiments.
[0121] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0122] The one or more units are stored in the memory, and when executed by the processor, the method in the above embodiment is performed.
[0123] The specific details of the above-mentioned computer device can be understood by referring to the corresponding related descriptions and effects in the above-mentioned embodiments, and will not be repeated here.
[0124] In order to achieve the above purpose, according to another aspect of the present application, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores a computer program, and the computer program implements the steps in the above-mentioned client resource file package differential update method when executed in a computer processor. Those skilled in the art can understand that the implementation of all or part of the process in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and the program can include the process of the embodiment of each method as described above when executed. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0125] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is also provided, including a computer program / instruction, which implements the steps of the above-mentioned client resource file package differential update method when executed by a processor.
[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0127] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A client resource file package differential update method, characterized in that: include: Obtaining a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package; Searching for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and summary values of all versions of the resource to be updated; The summary value in the resource file package update request is compared with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, the file path of the latest version of the resource file package of the resource to be updated is sent to the client, so that the client can download and update the resource; if the comparison is consistent, the differential resource package corresponding to the version number in the resource file package update request is searched, and the file path of the found differential resource package is sent to the client, so that the client can download and update the resource.
2. The client resource file package differential update method according to claim 1, characterized in that: Also includes: Each time the resource to be updated is updated, a resource file package of the latest version is generated, and a differential resource package between the resource file package of the latest version and each historical version of the resource file package is generated; Establish the correspondence between the version numbers of each historical version and the differential resource packages; The searching for the differential resource package corresponding to the version number in the resource file package update request specifically includes: The differential resource package corresponding to the version number in the resource file package update request is searched according to the corresponding relationship.
3. The client resource file package differential update method according to claim 1, characterized in that: Also includes: If the resource information cannot be found according to the identification information, a resource deletion instruction corresponding to the resource to be updated is sent to the client, so that the client deletes its local resource file corresponding to the resource to be updated according to the resource deletion instruction.
4. The client resource file package differential update method according to claim 1, characterized in that: Also includes: If the version number in the resource file package update request is empty, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
5. The client resource file package differential update method according to claim 1, characterized in that: Also includes: If the resource information does not contain the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
6. The client resource file package differential update method according to claim 1, characterized in that: Also includes: If the resource information does not contain the summary value corresponding to the version number in the resource file package update request, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
7. The client resource file package differential update method according to claim 1, characterized in that: Also includes: If the differential resource package corresponding to the version number in the resource file package update request cannot be found, the file path of the resource file package of the latest version of the resource to be updated is sent to the client, so that the client downloads and updates the resource.
8. A client resource file package differential update device, characterized in that: include: An update request acquisition unit, configured to acquire a resource file package update request from a client, wherein the resource file package update request includes: identification information of a resource to be updated, a version number of a current resource file package corresponding to the resource to be updated in the client, and a summary value generated by the client according to the current resource file package; A resource information searching unit, configured to search for resource information of the resource to be updated according to the identification information, wherein the resource information includes: version numbers and summary values of all versions of the resource to be updated; A resource package determination unit is used to compare the summary value in the resource file package update request with the summary value corresponding to the same version number in the resource information; if the comparison is inconsistent, the file path of the latest version of the resource file package of the resource to be updated is sent to the client, so that the client can download and update the resource; if the comparison is consistent, the differential resource package corresponding to the version number in the resource file package update request is searched, and the file path of the found differential resource package is sent to the client, so that the client can download and update the resource.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.