CN113326059A - Resource updating method, device and storage medium - Google Patents

Resource updating method, device and storage medium Download PDF

Info

Publication number
CN113326059A
CN113326059A CN202010130512.5A CN202010130512A CN113326059A CN 113326059 A CN113326059 A CN 113326059A CN 202010130512 A CN202010130512 A CN 202010130512A CN 113326059 A CN113326059 A CN 113326059A
Authority
CN
China
Prior art keywords
resource
updated
difference
file
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010130512.5A
Other languages
Chinese (zh)
Other versions
CN113326059B (en
Inventor
冯昱尧
李建全
陈德魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010130512.5A priority Critical patent/CN113326059B/en
Priority claimed from CN202010130512.5A external-priority patent/CN113326059B/en
Publication of CN113326059A publication Critical patent/CN113326059A/en
Application granted granted Critical
Publication of CN113326059B publication Critical patent/CN113326059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Abstract

The embodiment of the application discloses a resource updating method, a device and a storage medium; the application provides a resource updating method in the field of machine learning of artificial intelligence; the method comprises the steps of obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, then determining a resource version identification of the resource to be updated and a client version identification to which the resource to be updated belongs, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification which corresponds to the resource version identification and the client version identification together exists in the difference version identification set, fusing the target difference resource and the resource to be updated to obtain a target resource, and finally updating the resource to be updated based on the target resource to obtain an updated resource; the scheme can save storage space and network resources.

Description

Resource updating method, device and storage medium
Technical Field
The present application relates to the field of internet, and in particular, to a resource updating method, device, and storage medium.
Background
With the development of internet technology, various applications based on the internet come out endlessly. In the process of optimizing the application program, the resource on the computer device needs to be updated, wherein, taking a game-class application program as an example, a game is usually updated continuously in order to enrich the game content, and the update of the game in the prior art may be that a difference resource downloaded from a server is mounted on a game client with higher priority, and the difference resource is generated and stored on the server based on a traditional difference updating mode.
In the research and practice process of the prior art, the inventor of the present application finds that, due to the large file volume of the generated difference resource, the resource update method needs to consume a large amount of storage space when being stored on the electronic device, and needs to consume a large amount of network resources when being transmitted.
Disclosure of Invention
The embodiment of the application provides a resource updating method, a resource updating device and a storage medium, which can save storage space and network resources.
An embodiment of the present application provides a resource updating method, including:
acquiring an information file of a resource to be updated, wherein the information file comprises a difference version identification set;
determining a resource version identification of a resource to be updated and a client version identification to which the resource to be updated belongs;
when a target difference version identification which is jointly corresponding to the resource version identification and the client version identification exists in the difference version identification set, acquiring a target difference resource corresponding to the target difference version identification;
fusing the target difference resource and the resource to be updated to obtain a target resource;
and updating the resource to be updated based on the target resource to obtain the updated resource.
Accordingly, an embodiment of the present application provides a resource updating apparatus, including:
the first acquisition module is used for acquiring an information file of the resource to be updated, wherein the information file comprises a difference version identification set;
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a resource version identifier of a resource to be updated and a client version identifier to which the resource to be updated belongs;
a second obtaining module, configured to obtain a target difference resource corresponding to the target difference version identifier when a target difference version identifier corresponding to the resource version identifier and the client version identifier together exists in the difference version identifier set;
the fusion module is used for fusing the target difference resource and the resource to be updated to obtain a target resource;
and the updating module is used for updating the resource to be updated based on the target resource to obtain the updated resource.
In some embodiments of the present application, the information file further comprises a target resource check code, and the fusion module comprises a fusion submodule, a generation submodule, and a determination submodule, wherein,
the fusion submodule is used for fusing the target difference resource and the resource to be updated to obtain an initial resource;
the generating submodule is used for generating an initial resource check code of the initial resource;
and the determining submodule is used for determining the initial resource as the target resource when the initial resource check code is consistent with the target resource check code in the information file.
In some embodiments of the present application, the resource to be updated includes a resource file to be updated, the target difference resource includes difference attribute information and a difference resource file, the fusion sub-module includes a determining unit and a fusion unit,
a determining unit, configured to determine, according to the difference attribute information, a first resource file and a second resource file of the resource file to be updated and the difference resource file;
and the fusion unit is used for fusing the first resource file and the second resource file to obtain the initial resource.
In some embodiments of the present application, the difference attribute information includes resource information to be reserved and resource information to be merged, the first resource file includes a first resource file to be updated and a first difference resource file, and the merging unit is specifically configured to:
respectively determining a first resource file to be updated in the resource files to be updated and a first difference resource file in the difference resource files according to the information of the resource to be reserved;
determining a side file to be updated in the resource files to be updated and a difference side file in the difference resource files according to the resource information to be merged, wherein the side file to be updated corresponds to the difference side file;
and combining the side file to be updated and the difference side file to obtain a second resource file.
In some embodiments of the present application, the first obtaining module includes a reading sub-module, a first determining sub-module, and a second determining sub-module, wherein,
the reading submodule is used for reading the local version identification of the local information file of the resource to be updated and the service side version identification of the service side information file;
the first determining submodule is used for determining the local information file as an information file of the resource to be updated when the local version identification is matched with the service side version identification;
and the second determining submodule is used for acquiring the service side information file when the local version identification is not matched with the service side version identification, and determining the service side information file as the information file of the resource to be updated.
In some embodiments of the present application, the second obtaining module includes a determining sub-module, and a first obtaining sub-module, wherein,
the determining submodule is used for determining a version identification set to be updated corresponding to the resource version identification in the difference version identification set;
the judging submodule is used for judging whether a target difference version identification matched with the client version identification exists in the version identification set to be updated or not;
and the first obtaining submodule is used for determining a target difference version identifier corresponding to the resource version identifier and the client version identifier in the difference version identifier set and obtaining a target difference resource corresponding to the target difference version identifier if the target difference version identifier is the same as the resource version identifier.
In some embodiments of the present application, the second acquisition module further comprises a second acquisition submodule, wherein,
and the second obtaining submodule is used for searching a compatible version identifier corresponding to the client version identifier from a compatible list if the client version identifier is not the target version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set, and obtaining the target difference resource corresponding to the target difference version identifier.
In some embodiments of the present application, the resource updating apparatus further includes:
the uninstalling module is used for uninstalling the resource to be updated;
and the deleting module is used for deleting the target difference resource and the resource to be updated.
Correspondingly, the embodiment of the present application further provides a storage medium, where the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute any one of the resource updating methods provided in the embodiment of the present application.
Correspondingly, the embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the resource updating methods provided in the embodiment of the present application when executing the computer program.
The method includes the steps of firstly obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, then determining a resource version identification of the resource to be updated and a client version identification to which the resource to be updated belongs, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification corresponding to the resource version identification and the client version identification exists in the difference version identification set, then fusing the target difference resource and the resource to be updated to obtain the target resource, and finally updating the resource to be updated based on the target resource to obtain the updated resource. The scheme can remarkably simplify the difficulty of maintaining the resource files at the client, save the storage space on the client, remarkably reduce the file volume of the difference resources in the scheme, and also save the network resources required to be consumed in the transmission process.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a resource updating apparatus according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a resource updating method according to an embodiment of the present application;
FIG. 3a is an exemplary diagram of an interaction interface for game scene resource update provided in an embodiment of the present application;
FIG. 3b is a diagram of another example of an interactive interface for game scene resource update provided by an embodiment of the present application;
FIG. 4 is a schematic view of a terminal processing flow for updating game scene resources according to an embodiment of the present application;
FIG. 5 is a schematic flowchart of game scene resource update provided in an embodiment of the present application;
FIG. 6 is a resource fusion diagram of game scene resource update provided in the present application;
FIG. 7 is a schematic diagram of a difference resource update of a game scene resource update provided in an embodiment of the present application;
FIG. 8 is a schematic diagram of generating a difference resource for updating a game scene resource according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a resource updating apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a resource updating apparatus according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of a computer device provided in an embodiment of the present application;
fig. 12 is an alternative structural diagram of the distributed system 110 applied to the blockchain system according to the embodiment of the present application;
fig. 13 is an alternative schematic diagram of a block structure provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the embodiments described in the present application are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
Machine Learning (ML) is a multi-domain cross discipline, and relates to a plurality of disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
The resource updating method provided by the embodiment of the application relates to the technologies such as machine learning of artificial intelligence and the like, and is specifically explained through the embodiment.
The embodiment of the application provides a resource updating method, a resource updating device and a storage medium. Specifically, the embodiment of the present application may be integrated in a resource updating apparatus, and the resource updating apparatus may be integrated in a resource updating computer device, where the resource updating computer device may be an electronic device such as a terminal, and the terminal may be an electronic device such as a smart phone, a tablet computer, a notebook computer, and a personal computer, as shown in fig. 1, fig. 1 is a scene schematic diagram of the resource updating apparatus provided in the embodiment of the present application. Wherein the terminal may be as shown in fig. 1.
The terminal can obtain an information file of the resource to be updated, the information file comprises a difference version identification set, the resource version identification of the resource to be updated and the client version identification of the resource to be updated are determined, when a target difference version identification corresponding to the resource version identification and the client version identification exists in the difference version identification set, a target difference resource corresponding to the target difference version identification is obtained, the target difference resource and the resource to be updated are fused to obtain a target resource, the resource to be updated is updated based on the target resource, and the updated resource is obtained.
The resource updating computer device may also be an electronic device such as a server, and the server may have a data storage function and a data transmission function, for example, a cloud server, a mirror server, or a source server, and the server may be a single server or a server cluster. The server may be, as shown in fig. 1, mainly configured to receive a request message of a terminal, and send data such as a target differential resource of an information file or the target resource to the terminal according to the request message, for example, the server may receive the request message sent by the terminal, the request message may be used to request the target differential resource, the server may send the target differential resource to the terminal after receiving the request message, and the like.
It should be noted that the scenario diagram of the resource updating apparatus shown in fig. 1 is merely an example, and the resource updating apparatus and the scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation to the technical solution provided in the embodiment of the present application.
The following are detailed below.
In the present embodiment, the resource updating apparatus will be described in terms of a resource updating apparatus, which may be specifically integrated in a terminal, for example, a terminal provided with a storage unit and a microprocessor, such as a smart phone, a tablet computer, a notebook computer, a personal computer, and a wearable smart device.
As shown in fig. 2, fig. 2 is a schematic flowchart of a resource updating method according to an embodiment of the present application. The resource updating method may include:
101. and acquiring an information file of the resource to be updated, wherein the information file comprises a difference version identification set.
The resources to be updated may include resources that need to be updated in an application client, and based on the purpose of optimizing the application, the existing resources need to be updated, and part or all of the existing resources are changed, so as to improve the use feeling of the application. The existing resources can usually realize a part of functions in an application program, for example, in an online game, the existing clothing resources of various dresses of game roles can be realized; in the camera application program, the existing filter resources with more tone styles of pictures can be realized, and the like.
The resource to be updated can be stored on the client of the application program in a compressed file form, the compressed file can be obtained by adopting different computer packed file formats, and in the resource updating process, the computer packed file format selected by the resource to be updated can be flexibly determined according to actual requirements, for example, in the field of online games, pak (a computer packed file format) can be used for packing and compressing the resource.
The information file may be a file containing information related to the resource to be updated, and if the resource to be updated is updated for the first time, the client of the application program does not contain the information file of the resource to be updated, at this time, the information file of the resource to be updated needs to be acquired from the storage device in a certain manner. For convenience of reading data, the information file may be created based on a certain programming Language, for example, the information file may be created based on json (Java Script Object notification), the information file may be created based on xml (Extensible Markup Language), and the like.
The information related to the resource to be updated may be a difference version identification set, the difference version identification set may be a set, the set records version identifications of the difference resource corresponding to the resource to be updated, the version identifications of the difference resource corresponding to the resource to be updated may be in one-to-one correspondence with the resource to be updated, or may jointly determine a unique difference resource based on the resource to be updated and other information, and the corresponding difference resource may be determined and obtained based on the version identification.
The method comprises the steps of obtaining an information file of the resource to be updated, wherein the information file comprises identification information or data information and other contents required in the updating process of the resource to be updated, and in the resource updating process, the terminal can directly obtain data from the information file and carry out related operations without carrying out excessive data request and data receiving processes with a server, so that network resources can be saved, operation steps can be simplified, and operation speed can be increased.
For example, the resource to be updated is a special effect resource in a photographing application, and an information file of the special effect resource is obtained, where the information file includes a difference version identification set of the special effect resource.
In some embodiments, the resource to be updated has been updated previously, and in order to more accurately obtain the information file of the resource to be updated and ensure smooth implementation of several steps in the resource updating process, the step of "obtaining the information file of the resource to be updated" may include the steps of:
reading a local version identifier of a local information file of a resource to be updated and a service side version identifier of a service side information file; when the local version identification is matched with the service side version identification, determining that the local information file is the information file of the resource to be updated; and when the local version identification is not matched with the service side version identification, obtaining the service side information file, and determining the service side information file as the information file of the resource to be updated.
The local information file is an information file stored on the terminal, the service-side information file is an information file stored on the server, the local information file can be an information file used when a resource to be updated is updated last time, because the information file can be updated along with the updating of the resource, whether the local information file is the same as the service-side information file needs to be determined, whether the version identification of the local information file is matched with the version identification of the service-side information file can be judged in a judging mode, whether the version identification of the local information file is matched with the version identification of the service-side information file can be judged according to the actual situation and the agreed setting rule, and then the process of whether the version identification of the local information file is matched with the version identification of the service-side information file can be judged and can also be distinguished according to the difference of the setting rule.
For example, if the setting rule of the version identifier of the information file is that the arabic numeral 1 is an initial value, the larger the numerical value of the number is, the higher the version of the information file is, then it is determined whether the version identifier of the local information file matches the version identifier of the service-side information file, that is, it is determined whether the version identifiers are the same, if the version identifiers are the same, the version identifiers are matched, and if the version identifiers are not the same, the version identifiers are not matched.
In addition, the version identifier of the information file may be set in various ways, for example, the version identifier may be set as the file name of the information file, or the version identifier of the information file may be set in the information file, and so on.
Specifically, the server-side version identifier of the server-side information file may be received by sending a request to the server by the terminal, and then the locally stored local version identifier is read and compared. If the local version identification is the same as the version of the service side, determining that the local information file is the information file of the resource to be updated; if the resource is different from the resource to be updated, the server side information file needs to be downloaded from the server, and the server side information file is determined to be the information file of the resource to be updated.
For example, if the client of the photographing application already contains a local information file of the special-effect resource, the version identifier D of the local information file stored in the local information file is read, a message requesting the service-side version identifier of the service-side information file is sent to the server, the service-side version identifier P sent by the server is received, the D and the P are determined to be mismatched after comparison, a request is sent to the server, the service-side information file obtained based on the request is received, and the service-side information file is determined to be the information file of the special-effect resource.
102. And determining the resource version identification of the resource to be updated and the client version identification of the resource to be updated.
The resource version identifier of the resource to be updated may include information uniquely identifying the resource version, and the determination process of the resource version identifier may be flexibly implemented, for example, may be read by a computer program preset on the client.
The client version identification is information capable of uniquely identifying the client version, the client of the application program can be continuously updated along with the function of the application program, in order to distinguish each updating process, the client can mark different client versions in a version identification mode, the updating of the client and the updating of resources in the client are correlated, and the updating of the client can include the updating of the resources or not.
For example, the client version id of the photographing application client is determined to be 2.1 and the resource version id of the special effect resource on the photographing application client is determined to be 0.5.1 by calling a computer program on the terminal.
103. And when a target difference version identification which is jointly corresponding to the resource version identification and the client version identification exists in the difference version identification set, acquiring a target difference resource corresponding to the target difference version identification.
The target difference resource corresponds to the resource to be updated, the target difference resource is different with the difference between the client version and the resource version on the client, and the target difference resource is a key factor necessary for realizing resource update.
The target difference resource in the application can be generated in advance, the corresponding target difference resource identification is determined through the resource version identification and the client version identification, and then the target difference resource is obtained from the memory position for storing the target difference resource; the target differentiated resource may also be generated by the computer device when determining the target differentiated resource identifier, and then obtained from the computer device by the application client, and so on.
The target difference resource is a difference between the resource to be updated and the updated resource, the resource to be updated and the updated resource are a plurality of resource files and file indexes, each resource file carries a file identifier, specifically, the file index is reconstructed based on the file index in the resource to be updated and the file index in the updated resource, and the reconstructed file index is determined as the file index of the target difference resource.
Determining the resource file with the same file identification in the resource to be updated and the updated resource, judging whether the file content of the resource file with the same file identification is the same, if so, determining the resource file corresponding to the file identifier as a reserved file, recording the file identifier in the target differential resource, and if the file identifier is not the same as the reserved file, based on the two files identifying the same resource file, generating a difference file of the resource file of the updated resource relative to the resource file of the resource to be updated, and determining the difference file as the difference file corresponding to the file identifier, saving the difference file in the target difference resource, the manner of generating the difference file may be to perform binary difference comparison between the resource file in the resource to be updated and the resource file of the updated resource, and the binary difference comparison may be performed by a binary difference algorithm, such as a small cucumber algorithm (Courgette); and determining that the resources to be updated do not exist, wherein the resource files existing in the updated resources are new files, and the new files are added into the target difference resources.
If the resource file in the updated resource is not changed greatly relative to the resource file of the resource to be updated, in order to save network resources which may be consumed when the memory resource and the target difference resource are acquired, the way of storing the file identifier with the same file content into the target difference resource can be changed, the existence of the resource to be updated can be determined, the resource file which does not exist in the updated resource is a deleted file, and the file identifier of the deleted file is recorded in the target difference resource.
In the resource updating process, based on the operation of triggering resource updating on the client of the application program, the client can automatically acquire the target difference resource from the server, download the target difference resource through other interfaces of the application program, which can download the target difference resource, and also download the target difference resource through interfaces of other application programs, which can download the target difference resource, and the target difference resource can also be directly stored on the computer equipment where the application program is located in a mode without a network, such as a USB flash disk, Bluetooth transmission and the like.
The method comprises the steps of firstly determining a target difference resource identifier which is correspondingly required by a client for updating through an information file with small memory occupation amount, and then obtaining the target difference resource from the client or other places where the target difference resource is stored according to the target difference resource identifier, so that the resource obtaining process is more targeted when the resource is updated.
For example, the information file of the special effect resource includes a difference version identifier set, a plurality of difference version resource identifiers exist in the difference version identifier set, and when a target difference version identifier 0.5.1_2.1 corresponding to the client version identifier 2.1 and the resource version identifier 0.5.1 exists in the difference version identifier set, the photographing application client sends a request message to the server and receives the target difference resource 0.5.1_2.1 sent by the server based on the request message.
In some embodiments, the step "obtaining a target differential resource corresponding to a target differential version identifier when the target differential version identifier corresponding to the resource version identifier and the client version identifier exists in the differential version identifier set" may include:
determining a version identification set to be updated corresponding to the resource version identification in the difference version identification set; judging whether a target difference version identification matched with the client version identification exists in the version identification set to be updated or not; if yes, determining a target differential version identifier corresponding to the resource version identifier and the client version identifier in the differential version identifier set, and acquiring a target differential resource corresponding to the target differential version identifier.
According to the difference of the resource version identifications, version identification sets to be updated corresponding to the different resource version identifications exist in the different version identification sets, and the resource version identifications and the version identification sets to be updated are in one-to-one correspondence relationship, so that the version identification sets to be updated can be determined through the resource version identifications, and specifically, the version identification sets to be updated can be determined through a computer program. And then, determining a target difference version identifier in the version identifier set to be updated through the client version identifier, and when the difference version identifier corresponding to the client version identifier exists in the version identifier set to be updated, determining the difference version identifier as the target difference version identifier.
For example, the resource version identifier 0.5.1 determines a corresponding to-be-updated version identifier set, where the to-be-updated version identifier set includes two difference version identifiers 0.5.1_0.3 and 0.5.1_2.1, and in the to-be-updated version identifier set, the client version identifier 2.1 determines whether a target difference version identifier exists, and after judgment, it may be determined that 0.5.1_2.1 in the to-be-updated version identifier set is the target difference version identifier, and receives the target difference resource 0.5.1_2.1 sent by the server based on the request message.
In some embodiments, in order to improve the application range of the resource updating method, the information file includes a compatible list, and the step "when a target difference version identifier corresponding to the resource version identifier and the client version identifier exists in the difference version identifier set, the target difference resource corresponding to the target difference version identifier is obtained," may further include:
if not, searching a compatible version identification corresponding to the client version identification from the compatible list to determine a target differential version identification corresponding to the resource version identification and the compatible version identification in the differential version identification set, and acquiring a target differential resource corresponding to the target differential version identification.
Due to the difference between the distribution place of the application program and the computer equipment, the situation that the application program with the same content has two different version identifications can occur in the actual application scene, in the process of resource updating, in order to save storage resources and facilitate data management, for the application programs with the same content, no matter how many version identifiers of the application programs are in the actual application scene, only the difference resources and other related data (such as check codes and the like) are set according to a specific version identifier, and at this time, for other version identifications of the application program with consistent content, the condition that no corresponding difference resource identification exists can occur when the resource is updated, therefore, the compatible list is required to list the specific version identifier corresponding to the other version identifier, and obtain the difference resource corresponding to the specific version identifier, so that the resource update of the client side with the other version identifier can be completed.
And when the target difference version identification corresponding to the resource version identification does not exist in the difference version identification set, searching a compatible version identification corresponding to the client version identification from a compatible list, wherein the compatible version identification is another version identification of the application program with the same content as the client version identification, determining the target difference version identification from the version identification set to be updated through the compatible version identification, and then acquiring the target difference resource corresponding to the target difference version identification.
For example, the resource version identifier 0.5.1 determines a corresponding to-be-updated version identifier set, where the to-be-updated version identifier set includes two difference version identifiers 0.5.1_0.3 and 0.5.1_2.1, and in the to-be-updated version identifier set, the client version identifier 0.2 determines whether a target difference version identifier exists, and after the determination, it may be determined that there is no target difference version identifier corresponding to the client version identifier 0.2 in the to-be-updated version identifier set, and then the compatible version identifier 2.1 corresponding to 0.2 may be searched from the compatible list, and then it may be determined whether a corresponding difference version identifier exists in the to-be-updated version identifier set according to 2.1, and after the determination, it may be determined that 0.5.1_2.1 in the to-be-to-be the target difference version identifier, and receive the target difference resource 0.5.1_2.1 sent by the server based on the request message.
104. And fusing the target difference resource and the resource to be updated to obtain the target resource.
The target resource can be updated and updated resources are obtained, namely the resource updating process is completed, the process of fusing the target difference resource and the resources to be updated is to determine the target difference resource and useful files in the resources to be updated and generate the target resource based on the useful files, and the target resource, the resources to be updated and the target difference resource are the same and can also exist in a compressed file form. In order to simplify the operation and facilitate the management of the resources, the target resources, the resources to be updated and the target difference resources can generate compressed files with the same format by using the same computer file compression algorithm.
For example, the target special effect resource can be obtained by fusing the existing special effect resource and the target difference resource 0.5.1_2.1 of the photographing application.
In addition, if the resource to be updated on the client is damaged or the like, the client may also directly send a request message to the server to receive the target resource sent by the server, where the target resource occupies a larger amount of memory resources than the target difference resource, and therefore, downloading the target resource requires more network resources and more time.
In some embodiments, in order to ensure the accuracy of the target resource, the information file includes a resource check code, and the step "fuse the target difference resource and the resource to be updated to obtain the target resource" may include:
and fusing the target difference resource and the resource to be updated to obtain an initial resource, generating an initial resource check code of the initial resource, and determining the initial resource as the target resource when the initial resource check code is consistent with the target resource check code in the information file.
Any resource (such as a resource to be updated, a target difference resource or a target resource) has a unique corresponding check code, and the check code is generated through a certain algorithm. Therefore, the check code can determine whether the sent data and the received data are the same data, i.e., determine whether the data is modified or destroyed in the data transmission process. For example, the check may be performed by a hash check code. The information file comprises a check code of the target file, after the target file is generated by the client, the check code can be generated through a check tool or a check algorithm, the check code generated by the client is compared with the check code of the target resource stored in the information file, and if the check code generated by the client is the same as the check code of the target resource, the initial resource is the target resource. This step can verify whether the initial resource has been modified, ensuring the accuracy of the updated resource.
For example, the check code of the target special effect resource stored in the information file is 5d46f1fdedf7, after the client generates the initial resource, the client may generate the check code 5d46f1fdedf7 based on the initial resource, and after comparing the check code 5d46f1fdedf7 in the information file with the check code 5d46f1fdedf7 generated by the client, it may be determined that the initial resource is the target special effect resource.
In some embodiments, in order to effectively utilize information carried in the target difference resource to generate a target resource required for implementing resource update, the step "fusing the target difference resource and the resource to be updated to obtain an initial resource" may include: and determining a first resource file and a second resource file of the resource file to be updated and the difference resource file according to the difference attribute information, and fusing the first resource file and the second resource file to obtain the initial resource.
Wherein, in some embodiments, the difference attribute information comprises resource information to be reserved and resource information to be merged, the first resource file comprises a first resource file to be updated and a first difference resource file,
the method comprises the following steps of determining a resource file to be updated and a first resource file and a second resource file of a difference resource file according to difference attribute information, wherein the steps comprise:
according to the resource information to be reserved, a first resource file to be updated in the resource files to be updated and a first difference resource file in the difference resource files are respectively determined, according to the resource information to be combined, a side file to be updated in the resource files to be updated and a difference side file in the difference resource files are determined, wherein the side file to be updated corresponds to the difference side file, and the side file to be updated and the difference side file are combined to obtain a second resource file.
Fusing the resource to be updated and the target difference resource to generate a target resource, and generating the target difference resource through the updated resource and the resource to be updated, wherein the two processes are different in that the fusing process of the resource to be updated and the target difference resource is performed at an application client, and the process of generating the target difference resource through the updated resource and the resource to be updated is performed on other computer devices except the computer devices at the client, and the target difference resource which is smaller and more beneficial to quick transmission is generated through other computer devices, and the client acquires the target difference resource according to the updating requirement and updates the resource based on the target difference resource, so that the scheme can accelerate the data transmission process, the resource can be updated without downloading the whole target file with large data size, and the memory resources of other computer devices such as a server can be effectively saved, and network resources required to transmit the data.
Specifically, useful files in the resource to be updated and the target difference resource, that is, a first resource file and a second resource file, need to be determined according to the difference attribute information in the target difference resource, where the first resource file is a resource file, that is, a first resource file to be updated and a first difference resource file, of the resource to be updated and the target difference resource, which need to be copied to the target resource; the second resource file needs to be determined by combining the resource file in the resource to be refined (i.e. the side file to be updated) and the difference file corresponding to the resource file in the target difference resource (i.e. the difference side file).
105. And updating the resources to be updated based on the target resources to obtain updated resources.
The resource to be updated is updated based on the target resource, the target resource may be mounted at the client, and the mounted target resource is the updated resource, that is, the resource updating process is completed. For example, the content of the resource file in the target resource may be determined by obtaining the index of the target resource, so that when a specific file needs to be called later, it may be determined by the index that the specific file is sufficiently present.
For example, the photographing application updates the existing special effect resource based on the obtained target special effect resource, and the updated special effect resource can be obtained.
In some embodiments, in order to save storage resources of the client, the resource updating method may further include the steps of: and (4) the resource to be updated is uninstalled, and the target difference resource and the resource to be updated are deleted.
The mounting of the resources to be updated is removed, the target difference resources and the resources to be updated are deleted, after the target resources are obtained, the client can operate through the target resources, the resources to be updated and the target difference resources are not needed any more, therefore, the resources to be updated and the target difference resources can be deleted, the memory resources of the client can be effectively saved through the operation, meanwhile, the client only operates by using one target resource, the resource environment is simple, the operation convenience is effectively improved, and the operation error rate is reduced.
For example, after the target special effect resource is obtained, the mount of the existing special effect resource can be removed, and the existing special effect resource and the target difference resource can be deleted.
The method includes the steps of firstly obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, then determining a resource version identification of the resource to be updated and a client version identification of the resource to be updated, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification corresponding to the resource version identification and the client version identification exists in the difference version identification set, then fusing the target difference resource and the resource to be updated to obtain a target resource, and finally updating the resource to be updated based on the target resource to obtain an updated resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client and save the memory resource on the client, and in addition, the file volume of the difference resource in the scheme is remarkably reduced, so that the network resource in the transmission process is saved.
The method described in the above embodiments is further illustrated in detail by way of example.
The resource updating method of the present application can be applied to various application programs, such as a special-effect shooting resource in a shooting application program, an instant messaging application program, or a game application program, and the like, in this embodiment, a resource updating device is integrated in a terminal, and a scene resource to be updated, which is a client of the game application program, is taken as an example, and the scene resource updating method is described in detail, as shown in fig. 3b, a scene of a game may include "island," desert, "and" rainforest, "and a scene resource introduced in the embodiment of the present application may include a resource required to implement a scene of any game including the scene shown in fig. 3 b.
When game resources are updated by the prior art, the file volume of the file to be downloaded by the game client on the terminal is large, and when the resource game resources are updated by the scheme, the file volume of the file to be downloaded is obviously small, so that the storage space of the terminal and the network resources consumed by downloading can be saved, for example, in fig. 3a, 403MB is needed for downloading the update file of the 'island in the sea' scene by the prior art, however, in fig. 3b, only 1.24MB is needed for downloading the update file of the 'island in the sea' scene by the scheme.
In the resource updating process, as shown in fig. 4, when a user triggers an updating operation (e.g., clicks a resource updating control), the terminal starts downloading to update the resource, the terminal may check whether a file list (i.e., an information file) exists locally, if not, the terminal may pull the file list from a server or other devices, then download the resource file (i.e., a target difference resource) based on the file list, after the downloading is completed, the terminal determines whether the merging fails locally, if so, merge the resource file (i.e., merge the target difference resource and the resource to be updated), check the merged target file (i.e., check the initial resource, and when the check is passed, the initial resource is the target resource, i.e., the check is completed), then finish downloading and clean the site, and if the local merging fails, indicating that the downloading is finished and the site is cleaned, and finishing the downloading.
In the process, when the actual execution is carried out, the possibility of errors exists, if a file list is pulled to be wrong or a resource file is downloaded to be wrong, the terminal retries the wrong stage, and if the number of times of retrial failure of the terminal exceeds three times, a user is prompted to download the errors; if the process of merging the resource files is possible to make errors, the old version of the resource file (the resource to be updated) can be checked, and the user is prompted to download the errors; if the verification process of the target file is wrong, the process of cleaning the site after the downloading is finished is wrong, the user can be directly prompted to have the downloading mistake, and the downloading is finished after the user is prompted.
As shown in fig. 5, fig. 5 is a flow chart of a scene resource updating method according to an embodiment of the present application. The scene resource updating method can comprise the following steps:
201. and the terminal determines an information file of the scene resource to be updated, wherein the information file comprises a difference version identification set and a target scene resource check code.
For example, the information file may be a file list recorded and maintained by the game developer, and this way may avoid the dependence on the server architecture and simultaneously save the relevant data of multiple versions, so that the application range of the scene resource updating method is wider and the usability is higher. The information file may be created based on the json syntax, and the information file may include: the hash code is used for checking, whether the resources obtained by transmission are the same as the resources before transmission can be checked, and the correctness of the resources after transmission is effectively checked; the information file version identification can determine the information file of the resource to be updated;
the terminal can determine a difference version identifier corresponding to the scene resource to be updated through the difference version identifier set; and the compatible list comprises a plurality of version identifications, the version identifications can be used for determining the difference version identifications, when the difference version identifications cannot be determined in the difference version identification set, one version identification can be determined through the compatible list, and then the corresponding difference version identification is determined in the difference version identification set.
For example, the information file may include the hash check code "1 afbd 3" of a _0.7.0.pak, the hash check code "eb 3d 6" of a _0.7.0_0.8.0.diffpak, and the hash check code "be 2 cf" of a target scene resource a _0.8.0. pak; version identification 100.10 of the information file; a difference version identification a _0.7.0_0.8.0. diffpak;
202. and the terminal determines the resource version identification of the scene resource to be updated and the client version identification to which the scene resource to be updated belongs.
If the resource version identification of the scene resource to be updated is determined to be A _0.7.0.pak, the client version identification of the game application to which the scene resource to be updated belongs is determined to be B or C.
203. And when a target difference version identification which corresponds to the resource version identification and the client version identification together exists in the difference version identification set, the terminal acquires a target difference scene resource corresponding to the target difference version identification.
For example, a target difference version identifier a _0.7.0_0.8.0.diffpak corresponding to B and a _0.7.0.pak may be determined in the information file, but a target difference version identifier may not be determined in the information file based on a _0.7.0.pak and C, because there is no target difference version identifier corresponding to C in the information file and the client version identifier is in error, a compatible version identifier when the client version identifier is in error may be determined in the compatible list as B, and a target difference version identifier a _0.7.0_0.8.0.diffpak may be determined in the difference file list by the compatible version identifier;
next, the target difference scene resource may be downloaded, specifically, the client sends a request message, and the server sends the target difference scene resource a _0.7.0_0.8.0.diffpak to the client based on the request message.
204. And the terminal fuses the target difference scene resources and the scene resources to be updated to obtain initial scene resources.
As shown in fig. 6, a scene resource a _0.7.0.pak to be updated on a client is detected, and a fusion process is performed on the a _0.7.0.pak and a target difference scene resource a _0.7.0_0.8.0.diffpak to obtain an initial scene resource, where a _0.7.0.pak may include files 1.index,2. passet, 3. passet and 5. passt, and a _0.7.0_0.8.0.diffpak may include files 1_2.index,2. diff.passet, 6. passet, and delete file information (delete 3. passet). The client may reconstruct the index 2.index of the initial scene resource from the 1_2.index and the 1.index, may combine the 2. diff.uaset and the 2. uaset to obtain a new 2. uaset, and determine, based on the deleted file information, the 1. uaset and the 5. uaset that are to be directly copied to the initial scene resource in the scene resource to be updated, and then may create the initial scene resource by using the 2.index, the 1. uaset, the new 2. uaset, the 5. uaset and the 6. uaset.
For another example, when the client does not detect the scene resource to be updated, the initial scene resource may be directly downloaded through the server.
205. And the terminal generates a check code of the initial scene resource, and determines the initial scene resource as the target scene resource when the check code is consistent with the target scene resource check code.
For example, the terminal may generate a hash check code "be 2 cf" of the initial scene resource through the hash check tool, compare the hash check code with the hash check code of the target scene resource, and determine that the initial scene resource is the target scene resource a _0.8.0.pak when the hash check code and the hash check code of the target scene resource are consistent.
206. And the terminal updates the scene resources to be updated based on the target scene resources.
For example, the terminal may contact the mount state of the scene resource to be updated, delete the update scene resource and the target difference scene resource, and mount the target scene resource on the client, thereby implementing the resource update process.
In some embodiments, in practical applications, due to the existence of two versions in maintenance and other reasons, there may exist two versions of scene resources to be updated for a game application, for example, a _0.7.0.pak and a _0.8.0.pak shown in fig. 7, and the target scene resource is a _0.9.0.pak, then the game developer may generate two target difference resources in advance, for example, a _0.7.0_0.9.0.diffpak and a _0.8.0_0.9.0.diffpak, to correspond to each scene resource to be updated.
In some embodiments, the game developer may determine the difference resource according to the scene resource to be updated and the target scene resource, as shown in fig. 8, the scene resource to be updated is a _0.7.0.pak, a _0.7.0.pak may include files 1.index,1.uasset,2.uasset,3.uasset and 5. uast, the target scene resource is a _0.9.0.pak, a _0.9.0.pak may include files 2.index,1.uasset,2.uasset,5.uasset and 6. uast, may reconstruct the index 1_2.index based on 1.index and 2.index, the same 1.uasset and 5.uasset in the scene resource to be updated and the target scene resource are not processed, update two 2.uasset to-be generated differences 2.diff in the scene resource to be updated and the target scene resource to be deleted based on the difference between the target scene resource 2.index and the target uasset, and the difference between the target uasset is recorded in the target scene resource, and the target uase, and the difference of the target uase is recorded based on the copy of the index 2. asset,2. asset,3. uase, 6. uase, the target difference resource a _0.7.0_0.9.0.pak is created.
The terminal determines the information file of the scene resource to be updated, the information file comprises a difference version identification set and a target scene resource check code, then the terminal determines the resource version identification of the scene resource to be updated and the client version identification to which the scene resource to be updated belongs, when a target differential version identifier commonly corresponding to the resource version identifier and the client version identifier exists in the differential version identifier set, the terminal acquires target difference scene resources corresponding to the target difference version identification, fuses the target difference scene resources and the scene resources to be updated to obtain initial scene resources, generates a check code of the initial scene resources, and when the check code is consistent with the target scene resource check code, determining that the initial scene resource is the target scene resource, and finally updating the scene resource to be updated by the terminal based on the target scene resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client, saves the memory resource on the client, remarkably reduces the memory of the difference resource in the scheme, and can also save the network resource which needs to be consumed in the transmission process.
In order to better implement the resource updating method provided by the embodiment of the present application, an embodiment of the present application further provides a device based on the resource updating method. The terms are the same as those in the resource updating method, and specific implementation details can refer to the description in the method embodiment.
As shown in fig. 9, fig. 9 is a schematic structural diagram of a resource updating apparatus according to an embodiment of the present application, where the resource updating apparatus may include a first obtaining module 301, a determining module 302, a second obtaining module 303, a fusing module 304, and an updating module 305, where:
a first obtaining module 301, configured to obtain an information file of a resource to be updated, where the information file includes a difference version identifier set;
a determining module 302, configured to determine a resource version identifier of a resource to be updated and a client version identifier to which the resource to be updated belongs;
a second obtaining module 303, configured to obtain a target difference resource corresponding to a target difference version identifier when the target difference version identifier corresponding to both the resource version identifier and the client version identifier exists in the difference version identifier set;
a fusion module 304, configured to fuse the target difference resource and the resource to be updated to obtain a target resource;
the updating module 305 is configured to update the resource to be updated based on the target resource, so as to obtain an updated resource.
In some embodiments of the present application, the information file further includes a target resource check code, and the fusion module 304 includes a fusion sub-module, a generation sub-module, and a determination sub-module, wherein,
the fusion submodule is used for fusing the target difference resource and the resource to be updated to obtain an initial resource;
the generation submodule is used for generating an initial resource check code of the initial resource;
and the determining submodule is used for determining the initial resource as the target resource when the initial resource check code is consistent with the target resource check code in the information file.
In some embodiments of the present application, the resource to be updated includes a resource file to be updated, the target difference resource includes difference attribute information and a difference resource file, the fusion sub-module 3041 includes a determining unit and a fusing unit,
the determining unit is used for determining a resource file to be updated and a first resource file and a second resource file of the difference resource file according to the difference attribute information;
and the fusion unit is used for fusing the first resource file and the second resource file to obtain the initial resource.
In some embodiments of the present application, the difference attribute information includes resource information to be reserved and resource information to be merged, the first resource file includes a first resource file to be updated and a first difference resource file, and the merging unit is specifically configured to:
respectively determining a first resource file to be updated in the resource files to be updated and a first difference resource file in the difference resource files according to the information of the resource to be reserved;
determining a side file to be updated in the resource files to be updated and a difference side file in the difference resource files according to the resource information to be merged, wherein the side file to be updated corresponds to the difference side file;
and combining the side file to be updated and the difference side file to obtain a second resource file.
In some embodiments of the present application, as shown in fig. 10, the first obtaining module 301 includes a reading sub-module 3011, a first determining sub-module 3012, and a second determining sub-module 3013, wherein,
the reading submodule 3011 is configured to read a local version identifier of a local information file of a resource to be updated and a service-side version identifier of a service-side information file;
the first determining submodule 3012 is configured to determine, when the local version identifier matches the service-side version identifier, that the local information file is an information file of a resource to be updated;
the second determining submodule 3013 is configured to, when the local version identifier is not matched with the service-side version identifier, obtain a service-side information file, and determine that the service-side information file is an information file of a resource to be updated.
In some embodiments of the present application, the second obtaining module includes a determining sub-module, and a first obtaining sub-module, wherein,
the determining submodule is used for determining a version identification set to be updated corresponding to the resource version identification in the difference version identification set;
the judging submodule is used for judging whether a target difference version identification matched with the client version identification exists in the version identification set to be updated or not;
and the first obtaining submodule is used for determining a target difference version identifier corresponding to the resource version identifier and the client version identifier in the difference version identifier set and obtaining a target difference resource corresponding to the target difference version identifier if the target difference version identifier is the same as the resource version identifier.
In some embodiments of the present application, the second acquisition module 303 further comprises a second acquisition sub-module, wherein,
and the second obtaining submodule is used for searching the compatible version identification corresponding to the client version identification from the compatible list if the client version identification is not the compatible version identification, so as to determine the target difference version identification corresponding to the resource version identification and the compatible version identification in the difference version identification set, and obtain the target difference resource corresponding to the target difference version identification.
In some embodiments of the present application, the resource updating apparatus further includes:
the de-mount module is used for de-mounting the resource to be updated;
and the deleting module is used for deleting the target difference resource and the resource to be updated.
In this embodiment, the first obtaining module 301 first obtains an information file of a resource to be updated, where the information file includes a difference version identifier set, then the determining module 302 determines a resource version identifier of the resource to be updated and a client version identifier to which the resource to be updated belongs, when a target difference version identifier corresponding to both the resource version identifier and the client version identifier exists in the difference version identifier set, the second obtaining module 303 obtains a target difference resource corresponding to the target difference version identifier, the fusing module 304 fuses the target difference resource and the resource to be updated to obtain a target resource, and finally the updating module 305 updates the resource to be updated based on the target resource to obtain an updated resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client and save the memory resource on the client, and in addition, the memory of the difference resource in the scheme is remarkably reduced, so that the network resource in the transmission process is saved.
In addition, an embodiment of the present application further provides a computer device, where the computer device may be a terminal or a server, as shown in fig. 11, which shows a schematic structural diagram of the computer device according to the embodiment of the present application, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device architecture illustrated in FIG. 11 is not intended to be limiting of computer devices and may include more or less components than those illustrated, or combinations of certain components, or different arrangements of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user pages, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
the method comprises the steps of obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, determining a resource version identification of the resource to be updated and a client version identification of the resource to be updated, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification which corresponds to the resource version identification and the client version identification together exists in the difference version identification set, fusing the target difference resource and the resource to be updated to obtain the target resource, updating the resource to be updated based on the target resource, and obtaining the updated resource.
The method includes the steps of firstly obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, then determining a resource version identification of the resource to be updated and a client version identification to which the resource to be updated belongs, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification corresponding to the resource version identification and the client version identification exists in the difference version identification set, then fusing the target difference resource and the resource to be updated to obtain the target resource, and finally updating the resource to be updated based on the target resource to obtain the updated resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client, saves the memory resource on the client, remarkably reduces the memory of the difference resource in the scheme, and can also save the network resource which needs to be consumed in the transmission process.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The system related to the embodiment of the application can be a distributed system formed by connecting a client and a plurality of nodes (computer devices in any form in an access network, such as servers and terminals) in a network communication mode.
Taking a distributed system as an example of a blockchain system, referring To fig. 12, fig. 12 is an optional structural schematic diagram of the distributed system 110 applied To the blockchain system provided in this embodiment of the present application, and is formed by a plurality of nodes 1101 (computing devices in any form in an access network, such as servers and user terminals) and a client 1102, a Peer-To-Peer (P2P, Peer To Peer) network is formed between the nodes, and the P2P Protocol is an application layer Protocol operating on a Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or a terminal, can join to become a node, and the node comprises a hardware layer, a middle layer, an operating system layer and an application layer.
Referring to the functions of each node in the blockchain system shown in fig. 12, the functions involved include:
1) routing, the basic function that a node has, is used to support communication between nodes.
Besides the routing function, the node may also have the following functions:
2) the application is used for being deployed in a block chain, realizing specific services according to actual service requirements, recording data related to the realization functions to form recording data, carrying a digital signature in the recording data to represent a source of task data, and sending the recording data to other nodes in the block chain system, so that the other nodes add the recording data to a temporary block when the source and integrity of the recording data are verified successfully.
For example, the services implemented by the application include:
2.1) wallet, for providing the function of transaction of electronic money, including initiating transaction (i.e. sending the transaction record of current transaction to other nodes in the blockchain system, after the other nodes are successfully verified, storing the record data of transaction in the temporary blocks of the blockchain as the response of confirming the transaction is valid; of course, the wallet also supports the querying of the remaining electronic money in the electronic money address;
and 2.2) sharing the account book, wherein the shared account book is used for providing functions of operations such as storage, query and modification of account data, record data of the operations on the account data are sent to other nodes in the block chain system, and after the other nodes verify the validity, the record data are stored in a temporary block as a response for acknowledging that the account data are valid, and confirmation can be sent to the node initiating the operations.
2.3) Intelligent contracts, computerized agreements, which can enforce the terms of a contract, implemented by codes deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions according to actual business requirement codes, such as querying the logistics status of goods purchased by a buyer, transferring the buyer's electronic money to the merchant's address after the buyer signs for the goods; of course, smart contracts are not limited to executing contracts for trading, but may also execute contracts that process received information.
3) And the Block chain comprises a series of blocks (blocks) which are mutually connected according to the generated chronological order, new blocks cannot be removed once being added into the Block chain, and recorded data submitted by nodes in the Block chain system are recorded in the blocks.
The information file and the target differential resource in this embodiment may be stored in a shared ledger of the area chain through a node, and a computer device (e.g., a terminal or a server) may acquire the information file and the target differential resource based on data stored in the shared ledger.
Referring to fig. 13, fig. 13 is an optional schematic diagram of a Block Structure (Block Structure) provided in this embodiment, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash value to form a Block chain. The block may include information such as a time stamp at the time of block generation. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using cryptography, and each data block contains related information for verifying the validity (anti-counterfeiting) of the information and generating a next block.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, embodiments of the present application further provide a storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any one of the resource updating methods provided in the embodiments of the present application. For example, the computer program may perform the steps of:
the method comprises the steps of obtaining an information file of a resource to be updated, wherein the information file comprises a difference version identification set, determining a resource version identification of the resource to be updated and a client version identification of the resource to be updated, obtaining a target difference resource corresponding to a target difference version identification when the target difference version identification which corresponds to the resource version identification and the client version identification together exists in the difference version identification set, fusing the target difference resource and the resource to be updated to obtain the target resource, updating the resource to be updated based on the target resource, and obtaining the updated resource.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any resource updating method provided in the embodiments of the present application, beneficial effects that can be achieved by any resource updating method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted here for the foregoing embodiments.
The foregoing detailed description is directed to a resource updating method, device and storage medium provided in the embodiments of the present application, and specific examples are applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for resource update, comprising:
acquiring an information file of a resource to be updated, wherein the information file comprises a difference version identification set;
determining a resource version identification of a resource to be updated and a client version identification to which the resource to be updated belongs;
when a target difference version identification which is jointly corresponding to the resource version identification and the client version identification exists in the difference version identification set, acquiring a target difference resource corresponding to the target difference version identification;
fusing the target difference resource and the resource to be updated to obtain a target resource;
and updating the resource to be updated based on the target resource to obtain the updated resource.
2. The method according to claim 1, wherein the information file further includes a target resource check code, and the fusing the target difference resource and the resource to be updated to obtain a target resource includes:
fusing the target difference resource and the resource to be updated to obtain an initial resource;
generating an initial resource check code of the initial resource;
and when the initial resource check code is consistent with the target resource check code in the information file, determining the initial resource as the target resource.
3. The method of claim 2, wherein the resource to be updated comprises a resource file to be updated, wherein the target difference resource comprises difference attribute information and a difference resource file,
the fusing the target difference resource and the resource to be updated to obtain an initial resource, including:
determining a first resource file and a second resource file of the resource file to be updated and the difference resource file according to the difference attribute information;
and fusing the first resource file and the second resource file to obtain initial resources.
4. The method according to claim 3, wherein the difference attribute information comprises information of resources to be reserved and information of resources to be merged, wherein the first resource file comprises a first resource file to be updated and a first difference resource file,
the determining the resource file to be updated and the first resource file and the second resource file of the difference resource file according to the difference attribute information includes:
respectively determining a first resource file to be updated in the resource files to be updated and a first difference resource file in the difference resource files according to the information of the resource to be reserved;
determining a side file to be updated in the resource files to be updated and a difference side file in the difference resource files according to the resource information to be merged, wherein the side file to be updated corresponds to the difference side file;
and combining the side file to be updated and the difference side file to obtain a second resource file.
5. The method according to claim 1, wherein the obtaining the information file of the resource to be updated comprises:
reading a local version identifier of a local information file of a resource to be updated and a service side version identifier of a service side information file;
when the local version identification is matched with the service side version identification, determining that the local information file is an information file of the resource to be updated;
and when the local version identification is not matched with the service side version identification, acquiring the service side information file, and determining the service side information file as the information file of the resource to be updated.
6. The method according to claim 1, wherein when a target differential version identifier corresponding to the resource version identifier and the client version identifier exists in the differential version identifier set, acquiring a target differential resource corresponding to the target differential version identifier includes:
determining a version identification set to be updated corresponding to the resource version identification in the difference version identification set;
judging whether a target difference version identification matched with the client version identification exists in the to-be-updated version identification set or not;
if yes, determining a target difference version identification corresponding to the resource version identification and the client version identification in the difference version identification set, and acquiring a target difference resource corresponding to the target difference version identification.
7. The method of claim 6, wherein the information file comprises a compatibility list,
when a target difference version identifier corresponding to the resource version identifier and the client version identifier together exists in the difference version identifier set, acquiring a target difference resource corresponding to the target difference version identifier, further comprising:
if not, searching a compatible version identification corresponding to the client version identification from a compatible list to determine a target difference version identification corresponding to the resource version identification and the compatible version identification in the difference version identification set, and acquiring a target difference resource corresponding to the target difference version identification.
8. The method according to claim 1, wherein after fusing the target difference resource and the resource to be updated to obtain a target resource, the method further comprises:
the resource to be updated is uninstalled;
and deleting the target difference resource and the resource to be updated.
9. A resource updating apparatus, comprising:
the first acquisition module is used for acquiring an information file of the resource to be updated, wherein the information file comprises a difference version identification set;
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a resource version identifier of a resource to be updated and a client version identifier to which the resource to be updated belongs;
a second obtaining module, configured to obtain a target difference resource corresponding to the target difference version identifier when a target difference version identifier corresponding to the resource version identifier and the client version identifier together exists in the difference version identifier set;
the fusion module is used for fusing the target difference resource and the resource to be updated to obtain a target resource;
and the updating module is used for updating the resource to be updated based on the target resource to obtain the updated resource.
10. A storage medium storing a computer program adapted to be loaded by a processor to perform the steps of the resource updating method according to any one of claims 1 to 8.
CN202010130512.5A 2020-02-28 Resource updating method, device and storage medium Active CN113326059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010130512.5A CN113326059B (en) 2020-02-28 Resource updating method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010130512.5A CN113326059B (en) 2020-02-28 Resource updating method, device and storage medium

Publications (2)

Publication Number Publication Date
CN113326059A true CN113326059A (en) 2021-08-31
CN113326059B CN113326059B (en) 2024-04-26

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114564226A (en) * 2022-02-25 2022-05-31 深圳市云视机器人有限公司 Code deployment method and device, electronic equipment and readable storage medium

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1091500A (en) * 1996-09-13 1998-04-10 Nec Corp Client/server system, differential file down loading method in client/server system and storage medium storing program for differential file down loading
US7665081B1 (en) * 2006-05-06 2010-02-16 Kaspersky Lab, Zao System and method for difference-based software updating
US20110296398A1 (en) * 2010-05-28 2011-12-01 Seth Kelby Vidal Systems and methods for determining when to update a package manager software
CN103136013A (en) * 2011-12-01 2013-06-05 腾讯科技(深圳)有限公司 Method and system of software upgrade
US20140156742A1 (en) * 2011-08-18 2014-06-05 Tencent Technology (Shenzhen) Company Limited System and method for updating software, server and client thereof
CN104657170A (en) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 Data updating method, device and system
CN104778063A (en) * 2015-04-16 2015-07-15 小米科技有限责任公司 Method and device for updating resource
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
US20150355899A1 (en) * 2014-06-04 2015-12-10 Microsoft Corporation Enhanced updating for digital content
CN106909404A (en) * 2015-12-22 2017-06-30 博雅网络游戏开发(深圳)有限公司 Oftware updating method and system
US20180048730A1 (en) * 2016-08-10 2018-02-15 Cloudflare, Inc. Method and Apparatus for Reducing Network Resource Transmission Size using Delta Compression
CN107846465A (en) * 2017-11-13 2018-03-27 北京趣拿软件科技有限公司 Update the method and apparatus of client resource bag
CN107908419A (en) * 2017-10-27 2018-04-13 珠海金山网络游戏科技有限公司 A kind of AssetBundle update methods and device based on difference
CN109471653A (en) * 2018-09-29 2019-03-15 百度在线网络技术(北京)有限公司 Update method, electronic equipment, server and the storage medium of application program
CN110083371A (en) * 2018-01-26 2019-08-02 比亚迪股份有限公司 A kind of vehicle program updating system and method, more new tool and storage medium
CN110221860A (en) * 2019-06-11 2019-09-10 腾讯科技(深圳)有限公司 A kind of configuration file processing method, device, terminal and medium
CN110333880A (en) * 2018-03-29 2019-10-15 杭州海康威视数字技术股份有限公司 A kind of configuration update method, device, equipment and storage medium
CN110515647A (en) * 2019-08-28 2019-11-29 北京思维造物信息科技股份有限公司 A kind of static resource management method, device, equipment and storage medium
CN110532016A (en) * 2019-08-16 2019-12-03 北京齐尔布莱特科技有限公司 Method for edition management, method for updating edition and edition management system

Patent Citations (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1091500A (en) * 1996-09-13 1998-04-10 Nec Corp Client/server system, differential file down loading method in client/server system and storage medium storing program for differential file down loading
US7665081B1 (en) * 2006-05-06 2010-02-16 Kaspersky Lab, Zao System and method for difference-based software updating
US20110296398A1 (en) * 2010-05-28 2011-12-01 Seth Kelby Vidal Systems and methods for determining when to update a package manager software
US20140156742A1 (en) * 2011-08-18 2014-06-05 Tencent Technology (Shenzhen) Company Limited System and method for updating software, server and client thereof
CN103136013A (en) * 2011-12-01 2013-06-05 腾讯科技(深圳)有限公司 Method and system of software upgrade
WO2013078951A1 (en) * 2011-12-01 2013-06-06 腾讯科技(深圳)有限公司 Method and system for upgrading software
CN104657170A (en) * 2013-11-25 2015-05-27 腾讯科技(上海)有限公司 Data updating method, device and system
WO2015074467A1 (en) * 2013-11-25 2015-05-28 腾讯科技(深圳)有限公司 Data update method, apparatus, and system and storage medium
WO2015180304A1 (en) * 2014-05-30 2015-12-03 广州市动景计算机科技有限公司 Increment upgrade method and device
US20150355899A1 (en) * 2014-06-04 2015-12-10 Microsoft Corporation Enhanced updating for digital content
CN104836843A (en) * 2015-03-31 2015-08-12 北京奇虎科技有限公司 Client application program updating method and device
CN104778063A (en) * 2015-04-16 2015-07-15 小米科技有限责任公司 Method and device for updating resource
CN106909404A (en) * 2015-12-22 2017-06-30 博雅网络游戏开发(深圳)有限公司 Oftware updating method and system
US20180048730A1 (en) * 2016-08-10 2018-02-15 Cloudflare, Inc. Method and Apparatus for Reducing Network Resource Transmission Size using Delta Compression
CN107908419A (en) * 2017-10-27 2018-04-13 珠海金山网络游戏科技有限公司 A kind of AssetBundle update methods and device based on difference
CN107846465A (en) * 2017-11-13 2018-03-27 北京趣拿软件科技有限公司 Update the method and apparatus of client resource bag
CN110083371A (en) * 2018-01-26 2019-08-02 比亚迪股份有限公司 A kind of vehicle program updating system and method, more new tool and storage medium
CN110333880A (en) * 2018-03-29 2019-10-15 杭州海康威视数字技术股份有限公司 A kind of configuration update method, device, equipment and storage medium
CN109471653A (en) * 2018-09-29 2019-03-15 百度在线网络技术(北京)有限公司 Update method, electronic equipment, server and the storage medium of application program
CN110221860A (en) * 2019-06-11 2019-09-10 腾讯科技(深圳)有限公司 A kind of configuration file processing method, device, terminal and medium
CN110532016A (en) * 2019-08-16 2019-12-03 北京齐尔布莱特科技有限公司 Method for edition management, method for updating edition and edition management system
CN110515647A (en) * 2019-08-28 2019-11-29 北京思维造物信息科技股份有限公司 A kind of static resource management method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114564226A (en) * 2022-02-25 2022-05-31 深圳市云视机器人有限公司 Code deployment method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US20220108285A1 (en) Methods and Systems for Object Validated Blockchain Accounts
CN110597925B (en) Cross-chain data processing method and device based on block chain
CN106528224B (en) Content updating method, server and system for Docker container
CN112835612A (en) Electronic document version management method and device based on block chain
CN108572986B (en) Data updating method and node equipment
CN111639309B (en) Data processing method and device, node equipment and storage medium
CN112613877B (en) Intelligent contract triggering method and device applied to block chain network and related equipment
CN110910143A (en) Identity identification generation method, device, related node and medium
JP2023544518A (en) Blockchain-based systems and methods for exposing operating systems
CN114971827A (en) Account checking method and device based on block chain, electronic equipment and storage medium
CN111290965B (en) Test method, test device, computer equipment and storage medium
US11360966B2 (en) Information processing system and method of controlling information processing system
CN110597922A (en) Data processing method, device, terminal and storage medium
CN113641591A (en) Test case generation method and device and test method and device
WO2022057525A1 (en) Method and device for data retrieval, electronic device, and storage medium
CN114048024A (en) Task deployment method, device, equipment, storage medium and product
CN110233904A (en) Equipment update method, device, system, storage medium and computer equipment
CN112685391A (en) Service data migration method and device, computer equipment and storage medium
CN109753767B (en) Software distribution and updating method and device based on block chain, server and client
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
CN113326059B (en) Resource updating method, device and storage medium
CN113326059A (en) Resource updating method, device and storage medium
CN112691382B (en) Resource processing method, device and computer readable storage medium
CN116521509A (en) Intelligent contract testing method, device, equipment, storage medium and product
CN113971191A (en) Data import method and device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant