Offline resource package difference method, device, equipment and medium

By setting up asynchronous differential scripts in the management background, differential operations between the new version resource package and the old version resource package are realized, and the inoperable problem of management background caused by the slow generation process of differential packages in the existing technology is solved, which improves operation efficiency.

CN114816478BActive Publication Date: 2025-04-04SHENZHEN BINCENT TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210445881.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-26
Publication Date
2025-04-04
Estimated Expiration
2042-04-26

AI Technical Summary

Technical Problem

In the existing method, the process of differential operations between the new version resource package and the old version resource package is slow, which makes the management backend page inoperable and reduces the operation efficiency of the management backend.

Method used

By setting an asynchronous differential script, obtaining the status of the asynchronous differential instruction flag bits, controlling the background differential differential script and the management background to run in parallel, realizing the differential operation of the new version resource package and the old version resource package, and avoiding the management background page being inoperable.

Benefits of technology

Improves the operation efficiency of the management background and ensures that the management background page is always operational when performing resource package differential operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114816478B_ABST
    Figure CN114816478B_ABST
Patent Text Reader

Abstract

The present invention is applicable to the field of data processing technology, and in particular, relates to an offline resource package difference method, device, equipment and medium. The offline resource package difference method of the present invention sets an asynchronous difference script, obtains the state of an asynchronous difference instruction flag, controls the background difference difference script program and the management background to run in parallel, performs a difference operation on the new version resource package and each old version resource package, and obtains a difference package corresponding to each old version resource package; while operating the management background page, the asynchronous difference script can also perform a difference operation on the new version resource package and the old version resource package, avoiding the management background page being inoperable when performing the resource package difference operation, thereby improving the operation efficiency of the management background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an offline resource package difference method, device, equipment and medium. Background Art

[0002] At present, there are many embedded HTML5 pages in the APP, and some static resources in the HTML5 pages need to be loaded when the HTML5 page is opened, which causes the embedded HTML5 pages to open slowly and affects the user experience.

[0003] The common practice to improve the opening speed of embedded HML5 pages is to package the static resources in the HML5 page and store them in the App's application storage space in advance. When the App's embedded HML5 page is opened, the resources are intercepted and loaded using the locally downloaded resources to speed up the opening of HML5. When the HML5 page is subsequently iterated, the new version of the resource package is re-uploaded, and the server generates a differential package between the new version of the resource package and the old version of the resource package. When the App re-pull and update the local resource package, it only needs to pull the differential package, and the App local and old resource packages are integrated to generate a new version of the resource package.

[0004] In patent application publication number CN 102081536 A, an incremental upgrade method and server, an incremental upgrade method and server are disclosed. The calculation and configuration method of the differential package is built into the server to replace manual calculation and configuration, and the differential package required by the client is dynamically generated when the client requests an upgrade. In this method, the new version resource package needs to be differentially operated with the old version resource package to generate the differential package. This process is relatively slow, resulting in a long period of inoperability of the management background page and low efficiency of management background operations. Summary of the invention

[0005] Based on this, it is necessary to provide an offline resource package differential method, device, equipment and medium to address the above technical problems, so as to solve the problem that the existing method generates a differential package by performing differential operations between the new version resource package and the old version resource package. This process is relatively slow, resulting in the management background page being inoperable for a long time and the management background operation efficiency being low.

[0006] In a first aspect, an embodiment of the present invention provides an offline resource package difference method, the offline resource package difference method comprising:

[0007] Obtaining the state of the asynchronous differential instruction flag bit, wherein the bit state of the asynchronous differential instruction flag is used to start the asynchronous differential script;

[0008] According to the state of the asynchronous differential instruction flag bit, starting the asynchronous differential script;

[0009] Get each old version resource package and new version resource package;

[0010] The asynchronous difference script is used to perform difference operations on the new version resource package and each old version resource package in turn to obtain a difference package corresponding to each old version resource package.

[0011] In a second aspect, an embodiment of the present invention provides an offline resource package difference device, the offline resource package difference device comprising:

[0012] A flag status acquisition module, used to acquire the status of the asynchronous differential instruction flag, wherein the status of the asynchronous differential instruction flag is used to start the asynchronous differential script;

[0013] An asynchronous differential script starting module, used for starting the asynchronous differential script according to the state of the asynchronous differential instruction flag bit;

[0014] Resource package acquisition module, used to obtain various old version resource packages and new version resource packages;

[0015] The resource package difference module is used to perform difference operations on the new version resource package and each old version resource package in turn through the asynchronous difference script to obtain a difference package corresponding to each old version resource package.

[0016] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the offline resource package differentiation method as described in the first aspect when executing the computer program.

[0017] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the offline resource package difference method as described in the first aspect is implemented.

[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the offline resource package differential method of the present invention, by setting an asynchronous differential script, obtains the state of the asynchronous differential instruction flag, controls the background differential script program and the management background to run in parallel, and while operating the management background page, the asynchronous differential script can also perform differential operations between the new version resource package and the old version resource package, thereby avoiding the situation where the management background page is inoperable when performing resource package differential operations, thereby improving the operating efficiency of the management background. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 This is a schematic diagram of an application environment of an offline resource package difference method provided in the first embodiment of the present invention;

[0021] Figure 2 It is a flowchart of an offline resource package difference method provided in the first embodiment of the present invention;

[0022] Figure 3 It is a structural diagram of an offline resource package difference device provided in Embodiment 2 of the present invention;

[0023] Figure 4 It is a structural diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0024] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0025] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0026] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0027] As used in the present specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]", depending on the context.

[0028] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0029] References to "one embodiment" or "some embodiments" etc. described in the specification of the present invention mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0030] It should be understood that the order of execution of the steps in the following embodiments does not imply a precedence of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0031] In order to illustrate the technical solution of the present invention, specific embodiments are provided below for illustration.

[0032] The first embodiment of the present invention provides an artificial intelligence-based offline resource package differentiation method, which can be applied in the following aspects: Figure 1 In an application environment, a client communicates with a server. The client includes but is not limited to a PDA, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud computer device, a personal digital assistant (PDA), and other computer devices. The server can be implemented by an independent server or a server cluster consisting of multiple servers.

[0033] See also Figure 2 , is a flow chart of an offline resource package difference method provided in the first embodiment of the present invention. The offline resource package difference method can be applied to Figure 1 The server in the corresponding server computer device is connected to the client through the Internet, and the client connects to the differential package database of the server through a preset application programming interface (Application Programming Interface, API) to obtain the differential packages corresponding to different old versions. Figure 2As shown, the offline resource package difference method may include the following steps:

[0034] Step S101, obtaining the state of the asynchronous differential instruction flag, the state of the asynchronous differential instruction flag is used to start the asynchronous differential script.

[0035] In the present invention, the following steps are included before obtaining the state of the asynchronous differential instruction flag: obtaining a new version resource package, verifying the new version resource package, and if the verification passes, saving the new version resource package, and setting the state of the asynchronous differential instruction flag from the second state to the first state; the second state of the asynchronous differential instruction flag is used to stop the asynchronous differential script, and the first state of the asynchronous differential instruction flag is used to start the asynchronous differential script.

[0036] The state of the above-mentioned asynchronous differential instruction flag determines whether the asynchronous differential script can be started; after the server receives the new version of the resource package, it is necessary to verify the new version of the resource package. The verification items include version number, resource package size, and resource package integrity. If there are no problems with the verification items, at this time, the state of the asynchronous differential script instruction flag is set from the default second state to the first state.

[0037] In the present invention, the state of the asynchronous differential instruction flag includes a first state, and the corresponding memory flag storage value is 1; the state of the asynchronous differential instruction flag includes a second state, and the corresponding memory flag storage value is 0; the memory flag storage value corresponding to the state of the asynchronous differential instruction flag is read to obtain the state of the asynchronous differential instruction flag.

[0038] In the design of the asynchronous differential script, a memory address is designed to store the state of the asynchronous differential instruction. This memory address is of readable and writable type. In the default state, the value stored in the memory address is 0, and the state of the corresponding asynchronous differential instruction flag is the second state; when the verification of the new version resource package is completed and the new version resource package is intact, at this time, the value 0 stored in the memory storing the state of the asynchronous differential instruction is rewritten to 1, and the state of the corresponding asynchronous differential instruction flag is the first state. The asynchronous differential script obtains the memory value in real time, and the state of the asynchronous differential instruction flag is obtained as the first state.

[0039] For example, before the background server receives the new version of the resource package, the storage value of the memory storing the status of the asynchronous differential instruction is 0. At this time, the value corresponding to the status of the asynchronous differential instruction obtained by the asynchronous differential script in real time is 0, and the asynchronous differential script will not be started; after the background server receives the new version of the resource package, it verifies the new version of the resource package. After the verification passes, the storage value of the memory storing the status of the asynchronous differential instruction is rewritten to 1. At this time, the value corresponding to the status of the asynchronous differential instruction obtained by the asynchronous differential script in real time is 1.

[0040] Step S102, starting the asynchronous differential script according to the state of the asynchronous differential instruction flag.

[0041] In the present invention, if the state of the asynchronous differential instruction flag is the first state, the asynchronous differential script is started.

[0042] When designing the program of the asynchronous differential script, an asynchronous differential script start flag is designed. When the flag is 0, the asynchronous differential script is not executed; when the flag is 1, the asynchronous differential script is executed immediately; when the asynchronous differential script obtains that the storage value of the memory storing the status of the asynchronous differential instruction is 1, the flag controlling the execution of the asynchronous differential script is rewritten from 0 to 1, and the asynchronous differential script is executed immediately.

[0043] Step S103, obtaining each old version resource package and new version resource package.

[0044] After the asynchronous differential script is executed, first obtain each old version resource package, and then obtain the new version resource package. The acquisition method is as follows:

[0045] In the present invention, the storage path of each old version resource package is queried, and each old version resource package is obtained according to the storage path of each old version resource package; the storage path of the new version resource package is queried, and the new version resource package is obtained according to the storage path of the new version.

[0046] The historical old version resource packages stored in the background server are queried in turn, and the query content is the version number and storage path corresponding to the old version resource package. According to the queried version number and storage path, the queried old version resource package is copied to obtain the copied old version resource package, and the copied old version resource package is renamed to the queried old version resource package version number to obtain each old version resource package.

[0047] A query is performed on the new version resource package stored in the background server, and the query content is the version number and storage path corresponding to the new version resource package. According to the queried version number and storage path, the queried new version resource package is copied to obtain a copied new version resource package, and the copied new version resource package is renamed to the queried new version resource package version number to obtain the new version resource package.

[0048] Step S104: using an asynchronous differential script, differential operations are performed on the new version resource package and each old version resource package in turn to obtain a differential package corresponding to each old version resource package.

[0049] In the present invention, the files in the new version resource package are compared with the files in each old version resource package in turn, and the files in the new version resource package that are the same as those in the compared old version resource package are deleted to obtain differential packages corresponding to each old version resource package.

[0050] Both the new version resource package and the old version resource package contain several files. The new version resource package is an upgrade or simplification based on the old version resource package. There are identical parts in the files of the new version resource package and the old version resource package. The differential operation is to compare the files in the new version resource package with the files in one of the old version resource packages in turn, and delete the identical files in the new version resource package and the old version resource package. The identical files here refer to the same file names and file contents. The resource package composed of the remaining files in the new version resource package is the differential package corresponding to the old version resource package. Perform the same operation on all the old version resource packages to obtain the differential packages corresponding to each old version resource package.

[0051] For example, a new version V3.0 resource package contains file 1, file 2 and file 3, and an old version resource package V2.0 contains file 2 and file 3. File 1 in the new version resource package is compared with file 2 in the old version resource package. If the file names are different, file 1 in the new version resource package is not deleted. Then file 1 is compared with file 3. If the file names are different, file 1 in the new version resource package is not deleted. File 2 in the new version resource package is compared with file 2 in the old version resource package. If the file names and file contents are the same, file 2 in the new version resource package is deleted. File 3 in the new version resource package is compared with file 2 in the old version resource package. If the file names are different, file 3 in the new version resource package is not deleted. File 3 in the new version resource package is compared with file 3 in the old version resource package. If the file names are the same but the file contents are different, file 3 in the new version resource package is not deleted. Finally, file 2 and file 3 are retained in the new version resource package to generate a differential package corresponding to the old version V2.0 resource package.

[0052] In the present invention, after obtaining the differential package corresponding to each old version resource package, the following steps are included:

[0053] Each differential package is named so as to be associated with its corresponding old version resource package, and all named differential packages are stored.

[0054] For example, after a new version V3.0 resource package is differentially operated with an old version V2.0 resource package, a differential package corresponding to the old version V2.0 resource package is generated, and the differential package is renamed to differential package V3.0-2.0. The name indicates that the differential package is obtained by differential operation between the new version V3.0 resource package and the old version V2.0 resource package. The differential package is associated with the new version V3.0 and old version V2.0 resource packages to facilitate later calls.

[0055] The offline resource package difference method of the present invention sets the state of the asynchronous difference instruction flag bit to the first state after the new version resource package is verified, obtains the state of the asynchronous difference instruction flag bit by setting the asynchronous difference script, controls the background difference script program and the management background to run in parallel, performs difference operation on the new version resource package and each old version resource package, obtains the difference package corresponding to each old version resource package, and associates and names each difference package; while operating the management background page, the asynchronous difference script can also perform the difference operation on the new version resource package and the old version resource package, so as to avoid the management background page being inoperable when performing the resource package difference operation, thereby improving the operation efficiency of the management background.

[0056] For the offline resource package difference method in the above embodiment, Figure 3 The structural block diagram of the offline resource package difference device provided in the second embodiment of the present invention is shown. The server computer device corresponding to the offline resource package difference device is connected to the client through the Internet. The client connects to the difference package database of the server through a preset application programming interface (Application Programming Interface, API) to obtain the difference packages corresponding to different old versions. For the convenience of explanation, only the part related to the embodiment of the present invention is shown.

[0057] See also Figure 3 , the offline resource package difference device includes:

[0058] The flag status acquisition module 31 is used to acquire the status of the asynchronous differential instruction flag, and the status of the asynchronous differential instruction flag is used to start the asynchronous differential script;

[0059] The asynchronous differential script starting module 32 is used to start the asynchronous differential script according to the state of the asynchronous differential instruction flag bit;

[0060] The resource package acquisition module 33 is used to acquire each old version resource package and the new version resource package;

[0061] The resource package difference module 34 is used to perform a difference operation on the new version resource package and each old version resource package in turn through an asynchronous difference script to obtain a difference package corresponding to each old version resource package.

[0062] Optionally, the offline resource package difference device further includes:

[0063] The flag reset module is used to obtain the new version resource package, verify the new version resource package, and if the verification passes, save the new version resource package and set the state of the asynchronous differential instruction flag from the second state to the first state.

[0064] Optionally, the offline resource package difference device further includes:

[0065] The differential package naming module is used to name each differential package so as to associate each differential package with its corresponding old version resource package and store all named differential packages.

[0066] The flag status acquisition module 31 includes:

[0067] The flag status acquisition unit is used to read the memory flag storage value corresponding to the state of the asynchronous differential instruction flag to obtain the state of the asynchronous differential instruction flag.

[0068] The flag status acquisition module 32 includes:

[0069] The asynchronous differential script starting unit is used to determine that the state of the asynchronous differential instruction flag is the first state and start the asynchronous differential script.

[0070] The resource package acquisition module 33 includes:

[0071] The resource package acquisition unit is used to query the storage path of each old version resource package, and acquire each old version resource package according to the storage path of each old version resource package; query the storage path of the new version resource package, and acquire the new version resource package according to the storage path of the new version.

[0072] The resource package difference module 34 includes:

[0073] The resource package difference unit is used to compare the files in the new version resource package with the files in each old version resource package in sequence, delete the files in the new version resource package that are the same as the compared old version resource packages, and obtain the difference packages corresponding to each old version resource package.

[0074] It should be noted that the information interaction, execution process and other contents between the above modules are based on the same concept as the embodiment of the method of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0075] Figure 4 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 4 As shown, the computer device of this embodiment includes: at least one processor ( Figure 4 Only one is shown in the figure), a memory, and a computer program stored in the memory and executable on at least one processor, wherein when the processor executes the computer program, the steps in any of the above-mentioned offline resource package difference method embodiments are implemented.

[0076] The computer device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that Figure 4This is merely an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include a network interface, a display screen, and an input device.

[0077] The processor may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0078] The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be the memory of a computer device, and the internal memory provides an environment for the operation of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments may also be an external storage device of a computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on a computer device. Further, the memory may also include both an internal storage unit of a computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as program codes of computer programs, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0079] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0080] Each functional unit and module in the embodiment may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit, and the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present invention.

[0081] The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the above-mentioned method embodiment, which will not be repeated here. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiment when executed by a processor.

[0082] Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. Computer readable media can at least include: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, USB flash drive, mobile hard disk, magnetic disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer readable media cannot be electric carrier signal and telecommunication signal.

[0083] The present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by a computer program product. When the computer program product runs on a computer device, the computer device can implement the steps in the above-mentioned method embodiment when executing.

[0084] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0085] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0086] In the embodiments provided by the present invention, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0087] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0088] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. An offline resource package difference method, characterized in that: The offline resource package differentiation method includes: Obtaining the state of the asynchronous differential instruction flag, wherein the state of the asynchronous differential instruction flag is used to start the asynchronous differential script; The step of obtaining the state of the asynchronous differential instruction flag includes the following steps: obtaining a new version resource package, verifying the new version resource package, and if the verification passes, saving the new version resource package, and setting the state of the asynchronous differential instruction flag from the second state to the first state; the second state of the asynchronous differential instruction flag is used to stop the asynchronous differential script, and the first state of the asynchronous differential instruction flag is used to start the asynchronous differential script; The state of obtaining the asynchronous differential instruction flag bit includes: The state of the asynchronous differential instruction flag includes a first state, and the corresponding memory flag storage value is 1; the state of the asynchronous differential instruction flag includes a second state, and the corresponding memory flag storage value is 0; the memory flag storage value corresponding to the state of the asynchronous differential instruction flag is read to obtain the state of the asynchronous differential instruction flag; According to the state of the asynchronous differential instruction flag bit, starting the asynchronous differential script; Get each old version resource package and new version resource package; The asynchronous difference script is used to perform difference operations on the new version resource package and each old version resource package in turn to obtain a difference package corresponding to each old version resource package.

2. The offline resource package difference method according to claim 1, characterized in that: According to the state of the asynchronous differential instruction flag bit, starting the asynchronous differential script includes: If the state of the asynchronous differential instruction flag is the first state, the asynchronous differential script is started.

3. The offline resource package difference method according to claim 1, characterized in that: The obtaining of each old version resource package and new version resource package includes: Query the storage path of each old version resource package, and obtain each old version resource package according to the storage path of each old version resource package; Query the storage path of the new version resource package and obtain the new version resource package according to the storage path of the new version.

4. The offline resource package difference method according to claim 1, characterized in that: By using the asynchronous difference script, performing difference operations on the new version resource package and each old version resource package in sequence includes: The files in the new version resource package are compared with the files in each old version resource package in turn, and the files in the new version resource package that are the same as those in the compared old version resource packages are deleted to obtain differential packages corresponding to each old version resource package.

5. The offline resource package difference method according to claim 1, characterized in that: After getting the differential package corresponding to each old version resource package, it includes: Each differential package is named so as to be associated with its corresponding old version resource package, and all named differential packages are stored.

6. An offline resource package difference device, characterized in that: The offline resource package difference device comprises: A flag status acquisition module is used to acquire the asynchronous differential instruction flag status, and the asynchronous differential instruction flag status is used to start the asynchronous differential script; the acquisition of the asynchronous differential instruction flag status includes the following steps: acquiring a new version resource package, verifying the new version resource package, and if the verification passes, saving the new version resource package, and setting the state of the asynchronous differential instruction flag from the second state to the first state; the second state of the asynchronous differential instruction flag is used to stop the asynchronous differential script, and the first state of the asynchronous differential instruction flag is used to start the asynchronous differential script; The state of obtaining the asynchronous differential instruction flag bit includes: The state of the asynchronous differential instruction flag includes a first state, and the corresponding memory flag storage value is 1; the state of the asynchronous differential instruction flag includes a second state, and the corresponding memory flag storage value is 0; the memory flag storage value corresponding to the state of the asynchronous differential instruction flag is read to obtain the state of the asynchronous differential instruction flag; An asynchronous differential script starting module, used for starting the asynchronous differential script according to the asynchronous differential instruction flag bit state; Resource package acquisition module, used to obtain various old version resource packages and new version resource packages; The resource package difference module is used to perform difference operations on the new version resource package and each old version resource package in turn through the asynchronous difference script to obtain a difference package corresponding to each old version resource package.

7. A computer device, characterized in that: The computer device includes a processor, a memory, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the offline resource package difference method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the offline resource package difference method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Method for updating increment, and server

    CN102081536A

  • Method and device for generating differential packet

    CN104267978A

  • Data management method and system

    CN108491293A