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

Resource updating method, device and storage medium Download PDF

Info

Publication number
CN113326059B
CN113326059B CN202010130512.5A CN202010130512A CN113326059B CN 113326059 B CN113326059 B CN 113326059B CN 202010130512 A CN202010130512 A CN 202010130512A CN 113326059 B CN113326059 B CN 113326059B
Authority
CN
China
Prior art keywords
resource
updated
version identifier
difference
file
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.)
Active
Application number
CN202010130512.5A
Other languages
Chinese (zh)
Other versions
CN113326059A (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
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

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

Landscapes

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

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 artificial intelligence machine learning; the method comprises the steps that an information file of a resource to be updated is obtained, the information file comprises a difference version identification set, then a resource version identification of the resource to be updated and a client version identification to which the resource to be updated belongs are determined, when a target difference version identification which corresponds to the resource version identification and the client version identification jointly exists in the difference version identification set, a target difference resource corresponding to the target difference version identification is obtained, then the target difference resource and the resource to be updated are fused to obtain a target resource, and finally the resource to be updated is 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 the internet, and in particular, to a method, an apparatus, and a storage medium for updating resources.
Background
With the development of internet technology, various application programs based on the internet are layered endlessly. In the process of optimizing the application program, the resources on the computer device need to be updated, wherein, taking the game application program as an example, in order to enrich the game content, the game is generally updated continuously, and in the prior art, the update of the game can 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, because the file size of the generated differential resource is larger, the resource updating mode needs to consume more storage space when being stored on the electronic equipment, and needs to consume more 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.
The embodiment of the application provides a resource updating method, which comprises the following steps:
Acquiring an information file of a resource to be updated, wherein the information file comprises a difference version identification set;
Determining a resource version identifier of a resource to be updated and a client version identifier of the resource to be updated;
When a target difference version identifier which corresponds to the resource version identifier and the client version identifier jointly exists in the difference version identifier set, acquiring a target difference resource corresponding to the target difference version identifier;
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 an updated resource.
Correspondingly, the embodiment of the application provides a resource updating device, which comprises:
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 determining module is used for determining a resource version identifier of the resource to be updated and a client version identifier of the resource to be updated;
The second acquisition module is used for acquiring a target difference resource corresponding to the target difference version identifier when the target difference version identifier which corresponds to the resource version identifier and the client version identifier jointly 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 an updated resource.
In some embodiments of the present application, the information file further includes a target resource check code, and the fusing module includes a fusing sub-module, a generating sub-module, and a determining sub-module, wherein,
The fusion sub-module is used for fusing the target difference resource and the resource to be updated to obtain an initial resource;
A generation sub-module 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 differential resource includes differential attribute information and a differential resource file, the fusion submodule includes a determining unit and a fusion unit,
The determining unit is used for 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 the fusion unit is used for fusing the first resource file and the second resource file to obtain an initial resource.
In some embodiments of the present application, the difference attribute information includes to-be-reserved resource information and to-be-merged resource information, the first resource file includes a first to-be-updated resource file and a first difference resource file, and the fusion unit is specifically configured to:
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;
Determining a to-be-updated side file in the to-be-updated resource file and a difference side file in the difference resource file according to the to-be-combined resource information, wherein the to-be-updated side file corresponds to the difference side file;
And merging the side file to be updated and the difference side file to obtain a second resource file.
In some embodiments of the application, the first acquisition module comprises a reading sub-module, a first determination sub-module, and a second determination sub-module, wherein,
The reading sub-module 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 that the local information file is the information file of the resource to be updated when the local version identifier is matched with the service side version identifier;
and the second determining submodule is used for acquiring the service side information file when the local version identifier is not matched with the service side version identifier, 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 acquisition module includes a determination sub-module, and a first acquisition sub-module, wherein,
A determining submodule, configured to determine, in the difference version identifier set, a version identifier set to be updated corresponding to the resource version identifier;
the judging sub-module is used for judging whether the target difference version identifier matched with the client version identifier exists in the version identifier set to be updated;
And the first acquisition sub-module 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 if yes, and acquiring a target difference resource corresponding to the target difference version identifier.
In some embodiments of the application, the second acquisition module further comprises a second acquisition sub-module, wherein,
And the second acquisition sub-module is used for searching the compatible version identifier corresponding to the client version identifier from a compatible list if not, so as to determine a target difference version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier.
In some embodiments of the present application, the resource updating apparatus further includes:
the mounting removal module is used for removing mounting of 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 application also provides a storage medium, and the storage medium stores a computer program which is suitable for being loaded by a processor to execute any resource updating method provided by the embodiment of the application.
Correspondingly, the embodiment of the application also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes any resource updating method provided by the embodiment of the application when executing the computer program.
The method comprises the steps of firstly obtaining an information file of a resource to be updated, determining a resource version identifier of the resource to be updated and a client version identifier of the resource to be updated, obtaining a target difference resource corresponding to the target difference version identifier when the target difference version identifier commonly corresponds to the resource version identifier and the client version identifier exists in the difference version identifier 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 remarkably simplify the difficulty of maintaining the resource file by the client, save the storage space on the client, remarkably reduce the file volume of the differential resource in the scheme, and save the network resource which needs to be consumed in the transmission process.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a resource updating device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for updating resources according to an embodiment of the present application;
FIG. 3a is an exemplary diagram of an interactive interface for game scene resource update provided by an embodiment of the present application;
FIG. 3b is a diagram illustrating another example interactive interface for game scene resource update provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of a terminal processing flow for updating game scene resources according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a game scene resource update provided by an embodiment of the present application;
FIG. 6 is a schematic diagram of resource fusion for resource update of a game scene according to an embodiment of the present application;
FIG. 7 is a schematic diagram of differential resource update for a game scene resource update provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of generating a difference resource for a game scene resource update according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a resource update apparatus according to an embodiment of the present application;
FIG. 10 is another schematic diagram of a resource update apparatus according to an embodiment of the present application;
FIG. 11 is a schematic diagram of a computer device according to an embodiment of the present application;
FIG. 12 is a schematic diagram of an alternative architecture of a distributed system 110 for use in a blockchain system in accordance with embodiments of the present application;
fig. 13 is an alternative schematic diagram of a block structure according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described in the present application are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
Wherein artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend, and expand human intelligence, sense the environment, acquire knowledge, and use knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision.
Machine learning (MACHINE LEARNING, ML) is a multi-domain interdisciplinary, involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and the like. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
The resource updating method provided by the embodiment of the application relates to the technology of artificial intelligence such as machine learning, and the like, and is specifically described 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 application may be integrated in a resource updating device, where the resource updating device 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, and fig. 1 is a schematic view of a scenario of the resource updating device provided by the embodiment of the application. Wherein the terminal may be as shown in fig. 1.
The terminal can acquire an information file of the resource to be updated, the information file comprises a difference version identification set, a resource version identification of the resource to be updated and a 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 acquired, the target difference resource and the resource to be updated are fused, the target resource is obtained, 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, where 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 may be a server cluster. The server may be as shown in fig. 1, and is mainly configured to receive a request message of a terminal, and send data such as a target differential resource or a target resource of an information file 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 so on.
It should be noted that, the schematic view of the scenario of the resource updating device shown in fig. 1 is only an example, and the resource updating device and the scenario described in the embodiment of the present application are for more clearly describing the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided by the embodiment of the present application, and those skilled in the art can know that, with the evolution of the resource updating device and the appearance of the new service scenario, the technical solution provided by the embodiment of the present application is equally applicable to similar technical problems.
The following will describe in detail.
In this embodiment, description will be made in terms of a resource updating device, which may be integrated in a terminal specifically, for example, a terminal provided with a storage unit, a microprocessor mounted, such as a smart phone, a tablet computer, a notebook computer, a personal computer, and a wearable intelligent device.
Fig. 2 is a flowchart of a resource updating method according to an embodiment of the application, as shown in fig. 2. 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 to be updated in an application client, and based on the purpose of optimizing an application, the existing resources need to be updated, so that part or all of the existing resources are changed to improve the use sense of the application. Existing resources can generally implement a portion of the functionality in an application, such as existing apparel resources that can implement multiple dressing of a game character in a network game; in camera-like applications, existing filter resources for more multi-tone styles of pictures can be implemented, and so on.
The resource to be updated can be stored on the client of the application program in the form of a compressed file, the compressed file can be obtained by adopting different computer packaging file formats, and in the resource updating process, the computer packaging 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 packaging file format) can be used for packaging 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 that is updated for the first time, the client of the application program does not contain the information file of the resource to be updated, and at this time, the information file of the resource to be updated needs to be obtained from the storage device in a certain manner. To facilitate reading data, information files may be created based on a programming language, such as, for example, object identification (json, java Script Object Notation), extended markup language (xml, extensible Markup Language), and so forth.
The information related to the resource to be updated may be a difference version identifier set, the difference version identifier set may be a set, version identifiers of difference resources corresponding to the resource to be updated are recorded in the set, the version identifiers of the difference resources corresponding to the resource to be updated may be in one-to-one correspondence with the resource to be updated, or may be based on the resource to be updated and other information, unique difference resources may be determined together, and the corresponding difference resources may be determined and obtained based on the version identifiers.
The method comprises the steps that an information file of a resource to be updated is obtained, the information file contains the content such as identification information or data information required in the updating process of the resource to be updated, in the resource updating process, a terminal can directly obtain data from the information file and perform related operations, the processes of excessive data request and data receiving with a server are not needed, network resources can be saved, and operation steps and operation speed can be simplified.
For example, the resource to be updated is a special effect resource in photographing application, and an information file of the special effect resource is obtained, wherein the information file contains a difference version identification set of the special effect resource.
In some embodiments, the resource to be updated has been updated previously, in order to obtain the information file of the resource to be updated more accurately, to ensure that several steps in the resource update process are implemented smoothly, 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 identifier is matched with the service side version identifier, determining that the local information file is an information file of the resource to be updated; and when the local version identifier is not matched with the service side version identifier, acquiring a service side information file, and determining the service side information file as an 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, and because the information file can be updated along with the updating of the resource, whether the local information file is identical with the service side information file or not 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 or not can be judged according to a judging mode, the version identification can be set according to actual conditions and the agreed setting rule, and whether the version identification of the local information file is matched with the version identification of the service side information file or not can be judged according to different setting rules.
For example, if the setting rule of the version identifier of the information file is that arabic number 1 is a starting value, and the larger the number is, the higher the version of the information file is, then it is judged whether the version identifier of the local information file and the version identifier of the service side information file are matched, that is, whether the version identifiers are identical is judged, if the version identifiers are identical, the matching is performed, and if the version identifiers are not identical, the matching is performed.
In addition, the version identifier of the information file may be set in various manners, for example, may be set as a file name of the information file, or may be set in the information file.
Specifically, the server-side version identifier of the server-side information file may be received by the terminal sending a request to the server, and then the locally stored local version identifier may be read and compared. If the local version identifier is the same as the service side version, determining that the local information file is the information file of the resource to be updated; if the information files are different, 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 includes the 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 comparison is performed to determine that D and P are not matched, the 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 to which the resource to be updated belongs.
The resource version identifier of the resource to be updated may include information that uniquely identifies the resource version, and the determining process of the resource version identifier may be flexibly implemented, for example, may be read by a computer program preset on the client, etc.
The client version identifier is information capable of uniquely identifying the client version, the client of the application program is continuously updated along with the function of the application program, in order to distinguish each updating process, the client marks different client versions in a version identification mode, the update of the client and the update of resources in the client are associated with each other, and the update of the client may or may not contain the update of the resources.
For example, by calling a computer program on the terminal, it is determined that the client version of the photographing application client is identified as 2.1, and the resource version of the special effect resource on the photographing application client is identified as 0.5.1.
103. And when the target difference version identifier which corresponds to the resource version identifier and the client version identifier jointly exists in the difference version identifier set, acquiring a target difference resource corresponding to the target difference version identifier.
The target differential resource corresponds to the resource to be updated, the target differential resource can be different according to the version of the client and the version of the resource on the client, and the target differential resource is a key factor necessary for realizing the 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 differential resource may also be generated by the computer device when determining the target differential resource identification, obtained from the computer device by the application client, and so on.
The target difference resource is the difference between the resource to be updated and the updated resource, wherein 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 to be the file index of the target difference resource.
Determining resource files with the same file identifications in the resource to be updated and the updated resource, judging whether the file contents of the resource files with the same file identifications are the same, if so, determining the resource files corresponding to the file identifications as reserved files, recording the file identifications in the target differential resource, if not, generating differential files of the resource files of the updated resource relative to the resource files of the resource to be updated based on the resource files with the same file identifications, determining the differential files as differential files corresponding to the file identifications, and storing the differential files into the target differential resource, wherein the mode of generating the differential files can be binary differential comparison between the resource files of the resource to be updated and the resource files of the updated resource, and the binary differential comparison can be realized through a binary differential algorithm such as a small cucumber algorithm (Courgette); and determining that the resource to be updated does not exist, wherein the resource file existing in the updated resource is a new added file, and adding the new added file into the target difference resource.
If the change of the resource file in the updated resource is not very large relative to the resource file of the resource to be updated, in order to save the memory resource and the network resource possibly consumed when the target differential resource is acquired, the mode of storing the file identification with the same file content into the target differential 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 the deleted file, and the file identification of the deleted file is recorded in the target differential 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, can download the target difference resource through interfaces of other downloadable target difference resources of the application program, can download the target difference resource through interfaces of downloadable target difference resources of other application programs, and can also be directly stored to the computer equipment where the application program is located in a mode of USB flash disk, bluetooth transmission and the like without a network.
The method and the device have the advantages that the information files with smaller memory occupation quantity are used for determining the target difference resource identification needed by the client for updating, then the target difference resource is acquired from the client or other places where the target difference resource is stored according to the target difference resource identification, so that the resource acquisition process is more targeted when the resource is updated, meanwhile, the target difference resource is determined in a file-by-file comparison mode, the data quantity of the target difference resource is obviously reduced, the process of acquiring the target difference file (namely, the process of transmitting the target difference file to the computer equipment where the client is located) is faster, the network resource consumed by the process is less, and the storage space needed for storing the target difference resource is also less.
For example, the information file of the special effect resource includes a difference version identifier set, where a plurality of difference version resource identifiers exist in the difference version identifier set, and when a target difference version identifier 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 of "when there is a target differential version identifier corresponding to the resource version identifier and the client version identifier in the differential version identifier set, obtaining a target differential resource corresponding to the target differential version identifier" 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 identifier matched with the version identifier of the client exists in the version identifier set to be updated; if yes, determining a target difference version identifier corresponding to the resource version identifier and the client version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier.
According to the difference of the resource version identifiers, the difference version identifiers are stored in the to-be-updated version identifier sets corresponding to the different resource version identifiers, and the resource version identifiers and the to-be-updated version identifier sets are in one-to-one correspondence, so that the to-be-updated version identifier sets can be determined through the resource version identifiers, and particularly, the to-be-updated version identifier sets can be determined through the computer program. And then determining a target difference version identifier in the version identifier set to be updated through the client version identifier, and determining the difference version identifier as the target difference version identifier when the difference version identifier corresponding to the client version identifier exists in the version identifier set to be updated.
For example, a set of corresponding version identifiers to be updated is determined by the resource version identifier 0.5.1, the set of version identifiers to be updated includes two differential version identifiers 0.5.1_0.3 and 0.5.1_2.1, in the set of version identifiers to be updated, whether a target differential version identifier exists is determined by the client version identifier 2.1, and after judgment, it can be determined that 0.5.1_2.1 in the set of version identifiers to be updated is the target differential version identifier, and a target differential resource 0.5.1_2.1 sent by the receiving server based on the request message is received.
In some embodiments, in order to improve the application range of the resource updating method, the information file includes a compatibility list, and the step of "when a target differential version identifier corresponding to the resource version identifier and the client version identifier jointly exists in the differential version identifier set, obtaining a target differential resource corresponding to the target differential version identifier" may further include:
If not, searching a compatible version identifier corresponding to the client version identifier from the compatible list to determine a target difference version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier.
Because there is a distinction between the release place of the application program and the computer device, two situations of different version identifiers exist in the application program with the same content in the actual application scene, in order to save storage resources and facilitate data management in the process of resource update, for the application program with the same content, no matter how many version identifiers of the application program in the actual application scene exist, only difference resources and other related data (such as check codes) can be set according to a specific version identifier, at this time, for other version identifiers of the application program with compatible content, situations of no corresponding difference resource identifiers exist in resource update, therefore, a compatibility list is required to list specific version identifiers corresponding to other version identifiers, and different resources corresponding to the specific version identifiers are acquired, so that resource update of clients with other version identifiers can be completed.
When the target difference version identifier corresponding to the resource version identifier does not exist in the difference version identifier set, searching a compatible version identifier corresponding to the client version identifier from a compatible list, wherein the compatible version identifier is another version identifier of the application program with the same content as the client version identifier, determining the target difference version identifier from the version identifier set to be updated through the compatible version identifier, and acquiring the target difference resource corresponding to the target difference version identifier.
For example, a set of corresponding version identifiers to be updated is determined by the resource version identifier 0.5.1, where the set of version identifiers to be updated includes two difference version identifiers of 0.5.1_0.3 and 0.5.1_2.1, in the set of version identifiers to be updated, whether a target difference version identifier exists is determined by the client version identifier of 0.2, and through judgment, it can be determined that the set of version identifiers to be updated does not have the target difference version identifier corresponding to the client version identifier of 0.2, then a compatible version identifier 2.1 corresponding to 0.2 can be searched from a compatible list, and then it can be determined whether a corresponding difference version identifier exists in the set of version identifiers to be updated according to 2.1, through judgment, it can be determined that 0.5.1_2.1 in the set of version identifiers to be updated is the target difference version identifier, and the target difference resource 0.5.1_2.1 sent by the server based on the request message is received.
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, namely the process of updating the resource is completed, the process of merging the target difference resource and the resource to be updated is to determine useful files in the target difference resource and the resource to be updated, and the target resource is generated based on the useful files, and the target resource is identical to the resource to be updated and the target difference resource and can also exist in the form of compressed files. In order to simplify the operation, the management of the resources is convenient, and 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 existing special effect resource and the target difference resource of the photographing application are fused to obtain the target special effect resource, namely 0.5.1_2.1.
In addition, if the resource to be updated on the client side is damaged, the client side can also directly send a request message to the server to receive the target resource sent by the server, and the target resource is much larger than the memory resource occupied by the target difference resource, so that more network resources and more time are needed for downloading the target resource.
In some embodiments, in order to ensure accuracy of the target resource, the information file includes a resource check code, and the step of "fusing 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 and the like) has a unique corresponding check code, and the check code is generated through a certain algorithm. Thus, the check code may determine whether the transmitted data and the received data are the same data, i.e., whether the data transmission process is modified or corrupted, etc. For example, the verification may be performed by hashing the verification code. The information file contains the check code of the target file, the client can generate the check code through a check tool or a check algorithm after generating the target file, 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 and the check code are the same, the initial resource is the target resource. This step can verify whether the original 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 5d46f1fdedf, 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 5d46f1fdedf generated by the client, the client may determine that the initial resource is the target special effect resource.
In some embodiments, in order to effectively utilize information carried in the target differential resource to generate a target resource required for implementing resource update, the step of "fusing the target differential resource and a 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 an initial resource.
Wherein, in some embodiments, the differential attribute information comprises to-be-reserved resource information and to-be-combined resource information, the first resource file comprises a first to-be-updated resource file and a first differential resource file,
The step of determining a first resource file and a second resource file of a resource file to be updated and a difference resource file according to the difference attribute information includes:
And 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 resource information to be reserved, and 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 combined, 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.
The method comprises the steps of fusing a resource to be updated and a target difference resource to generate the 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 fusion process of the resource to be updated and the target difference resource is carried out on an application program client, the process of generating the target difference resource through the updated resource and the resource to be updated is carried out on other computer equipment except the computer equipment of the client, the target difference resource which is smaller and more beneficial to quick transmission is generated through the other computer equipment, the client acquires the target difference resource according to the updating requirement and carries out resource updating based on the target difference resource.
Specifically, useful files in the resource to be updated and the target difference resource, namely a first resource file and a second resource file, are required to be determined according to the difference attribute information in the target difference resource, wherein the first resource file is a resource file which needs to be copied into the target resource in the resource to be updated and the target difference resource, namely a first resource file to be updated and a first difference resource file; the second resource file needs to be determined by combining the resource file in the resource to be finer (i.e. the file on the side to be updated) and the difference file corresponding to the resource file in the target difference resource (i.e. the file on the side of the difference).
105. Updating the resource to be updated based on the target resource to obtain the updated resource.
The updating of the resource to be updated based on the target resource may be to mount the target resource on the client, where the target resource after being mounted is the updated resource, and the process of updating the resource is completed. For example, the content of the resource file within the target resource may be determined by obtaining an index of the target resource, so that when a specific file needs to be invoked later, it may be determined by the index that the specific file is sufficient.
For example, based on the obtained target special effect resource, the photographing application updates the existing special effect resource through the target special effect resource, and the updated special effect resource can be obtained.
In some embodiments, to save storage resources of the client, the resource update method may further include the steps of: and removing the mounting of the resources to be updated, and deleting the target difference resources and the resources to be updated.
The method has the advantages that 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, and the resources to be updated and the target difference resources are not needed any more, so that the resources to be updated and the target difference resources can be deleted, the memory resources of the client can be effectively saved, meanwhile, the client only uses one target resource for operation, 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 mounting 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 comprises the steps of firstly obtaining an information file of a resource to be updated, determining a resource version identifier of the resource to be updated and a client version identifier of the resource to be updated, obtaining a target difference resource corresponding to a target difference version identifier when the target difference version identifier corresponding to the resource version identifier and the client version identifier exists in the difference version identifier 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 the updated resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client, save the memory resource on the client, remarkably reduce the file volume of the differential resource in the scheme and save the network resource in the transmission process.
The method described in the above embodiments is described in further detail below by way of example.
The resource updating method of the present application can be applied to various application programs, such as a photographing special effect resource, an instant messaging application program, or a game application program in a photographing application program, and the like, and in this embodiment, the resource updating device is integrated in a terminal, and the resource to be updated is taken as a scene resource to be updated of a client of the game application program, and the scene resource updating method is described in detail, as shown in fig. 3b, a game scene may include "islands in the sea", deserts, and "rainforests", and the scene resource introduced in the embodiment of the present application may include resources required for implementing any game scene including the scene shown in fig. 3 b.
When the game resource is updated through the prior art, the file volume of the file to be downloaded by the game client on the terminal is larger, and when the resource game resource is updated through the scheme, the file volume of the file to be downloaded is obviously smaller, so that the storage space of the terminal and the network resource consumed by the downloading can be saved, as shown in fig. 3a, 403MB is needed for downloading the updated file of the island scene through the prior art, however, as shown in fig. 3b, only 1.24MB is needed for downloading the updated file of the island scene through the scheme.
In the process of updating the resource, as shown in fig. 4, when the user triggers the update operation (e.g. clicks the resource update control), the terminal starts to download so as to update the resource, and the terminal can check whether the local file list (i.e. the information file) exists, if not, the terminal can pull the file list from the server or other devices, then download the resource file (i.e. the target difference resource) based on the file list, after the downloading is completed, the terminal judges whether the local file has the fact that the merging fails, if so, the terminal performs the merging of the resource file (i.e. the merging of the target difference resource and the resource to be updated), and performs the verification (i.e. performs the verification on the initial resource, and when the verification passes, i.e. the initial resource is the target resource, i.e. the verification is completed), and then the download ends to clear the scene, if the local file has not the merging fails, the download ends to end to clear the scene.
In the above process, there is a possibility of error in actual execution, for example, if the pull file list is in error or the resource file is downloaded in error, the terminal retries the error, and if the number of times of retries of the terminal fails exceeds three, the user is prompted to download the error; for example, the process of merging the resource files may be in error, the verification of the old version resource files (to-be-updated resources) can be performed, and the user is prompted to download errors; and if the verification process of the target file is wrong, the downloading is finished, the process of cleaning the site is wrong, the user can be directly prompted for downloading the error, and the user is prompted to finish the downloading.
Fig. 5 is a flow chart of a scene resource updating method according to an embodiment of the application, as shown in fig. 5. The scene resource updating method can comprise the following steps:
201. 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 can be a file list recorded and maintained by the game developer, so that the dependence on the server architecture can be avoided, and related data of multiple versions can be saved, 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 json syntax, and the information file may include: the hash code is used for checking, so that whether the transmitted resource is the same as the resource before transmission or not can be checked, and the correctness of the transmitted resource is effectively checked; the information file version identification can determine the information file of the resource to be updated;
The difference file list comprises at least one difference version identifier of scene resources in a difference version identifier set, and the terminal can determine the difference version identifier corresponding to the scene resources to be updated through the difference version identifier set; the version compatibility list comprises a plurality of version identifiers, the version identifiers can be used for determining difference version identifiers, when the difference version identifiers cannot be determined in a difference version identifier set, the version identifiers can be determined through the compatibility list, and then the corresponding difference version identifiers can be determined in the difference version identifier set.
For example, the information file may include a hash check code "1afbd3" of a_0.7.0.pak, a hash check code of a_0.7.0.0.8.0.0. Diffpak is "eb3d6", and a hash check code "be2cf" of a target scene resource a_0.8.0.pak; version identification of the information file 100.10; the diffpak is the difference version identification a_0.7.0_0.8.0;
202. and the terminal determines the resource version identifier of the scene resource to be updated and the client version identifier of the scene resource to be updated.
If the resource version identifier of the scene resource to be updated is determined to be a_0.7.0.pak, and the client version identifier of the game application to which the scene resource to be updated belongs is determined to be B or C.
203. When the target difference version identifier which corresponds to the resource version identifier and the client version identifier jointly exists in the difference version identifier set, the terminal acquires the target difference scene resource corresponding to the target difference version identifier.
For example, the target differential version identifiers a_0.7.0.0.8.0.diffpak corresponding to B and a_0.7.0.0.pak can be determined in the information file, but the target differential version identifiers cannot be determined in the information file based on a_0.7.0.pak and C, because the target differential version identifiers corresponding to C are not available in the information file, and the client version identifier is wrong, the compatible version identifier when the client version identifier is wrong can be determined in the compatible list, and B is the compatible version identifier, and the target differential version identifier a_0.7.0_0.8.0.diffpak can be determined in the differential file list;
The target difference scene resource may then 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 resource and the scene resource to be updated to obtain an initial scene resource.
As shown in fig. 6, the scene resource a_0.7.0.pak to be updated on the client is detected, and fusion processing is performed on the scene resource a_0.7.0.pak and the target difference scene resource a_0.7.0.8.0.diffpak to obtain an initial scene resource, wherein the scene resource a_0.7.0.pak may include a file 1.Index,2. Uaset, 3. Uaset and 5. Uaset, and the scene resource a_0.7.0.8.0.diffpak may include a file 1_2.Index,2.Diff. Uaset, and 6. Uaset, and delete the file information (delete 3. Uaset). The client may reconstruct the index 2.Index of the initial scene resource according to 1_2.Index and 1.Index, may merge 2.Diff. Uaset and 2. Uaset to obtain a new 2. Uaset, and determine 1. Uaset and 5. Uaset to be directly copied to the initial scene resource in the scene resource to be updated based on the deletion file information, and then may create the initial scene resource by 2.Index,1. Uaset, new 2. Uaset, 5. Uaset and 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 "be2cf" of the initial scene resource through a hash check tool, compare the hash check code with a hash check code of the target scene resource, and when the hash check code and the hash check code are consistent, determine that the initial scene resource is the target scene resource a_0.8.0.pak.
206. And the terminal updates the scene resource to be updated based on the target scene resource.
For example, the terminal may contact the mounting state of the scene resource to be updated, delete the scene resource to be updated and the target difference scene resource, and then mount the target scene resource on the client, thereby realizing the process of resource update.
In some embodiments, in the actual application, due to the existence of two versions in maintenance, there may exist two versions of scene resources to be updated, such as 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, and then the game developer may generate two target difference resources in advance, such as a_0.7.0_0.9.0.diffpak and a_0.8.0_0.9.0.diffpak, so as 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, where the scene resource to be updated is a_0.7.0.pak, the a_0.7.0.pak may include a file 1.Index,1. Uaset, 2. Uaset, 3. Uaset, and 5. Uaset, the target scene resource is a_0.9.0.pak, the a_0.9.0.pak may include a file 2.Index,1. Uaset, 2. Uaset, 5. Uaset, and 6. Uaset, the difference 2. Dieset may be generated based on 1.Index and 2.Index rebuilding index 1_2.Index, the same 1. Uaset and 5. Uaset in the scene resource to be updated, the two 2. Uasets having differences in the scene resource to be updated and the target scene resource, and the difference 2. Dieset may be created based on the difference 1.Index and 2. Uaset, and the difference between the target scene resource to be recorded in the target scene resource to be 3. 0.0.57, and the difference between the target scene resource to be deleted based on the 1. 0.0.0.7.0.0.
The method comprises the steps that a terminal determines an information file of a 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 a resource version identification of the scene resource to be updated and a client version identification of the scene resource to be updated, when the difference version identification set contains a target difference version identification which corresponds to the resource version identification and the client version identification together, the terminal obtains the target difference scene resource corresponding to the target difference version identification, the terminal fuses the target difference scene resource and the scene resource to be updated to obtain an initial scene resource, the terminal generates the check code of the initial scene resource, and when the check code is consistent with the target scene resource check code, the initial scene resource is determined to be the target scene resource, and finally the terminal updates the scene resource to be updated based on the target scene resource. The scheme can remarkably simplify the difficulty of maintaining the resource file by the client, save the memory resource on the client, remarkably reduce the memory of the differential resource in the scheme, and 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 application, the embodiment of the application also provides a device based on the resource updating method. Where the meaning of a noun is the same as in the resource updating method described above, specific implementation details may be referred to the description in the method embodiment.
As shown in fig. 9, fig. 9 is a schematic structural diagram of a resource updating device according to an embodiment of the present application, where the resource updating device 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, when a target differential version identifier that corresponds to both the resource version identifier and the client version identifier exists in the differential version identifier set, a target differential resource corresponding to the target differential version identifier;
the fusion module 304 is configured to fuse the target difference resource and the resource to be updated to obtain a target resource;
and the updating module 305 is configured to update the resource to be updated based on the target resource, and obtain an updated resource.
In some embodiments of the present application, the information file further includes a target resource check code, and the fusing module 304 includes a fusing sub-module, a generating sub-module, and a determining sub-module, wherein,
The fusion sub-module is used for fusing the target difference resource and the resource to be updated to obtain an initial resource;
The generation sub-module 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 comprises a resource file to be updated, the target differential resource comprises differential attribute information and a differential resource file, the fusion submodule 3041 comprises a determining unit and a fusion unit,
The determining unit is used for 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 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 to-be-reserved resource information and to-be-merged resource information, the first resource file includes a first to-be-updated resource file and a first difference resource file, and the fusion unit is specifically configured to:
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;
Determining a to-be-updated side file in the to-be-updated resource file and a difference side file in the difference resource file according to the to-be-combined resource information, wherein the to-be-updated side file corresponds to the difference side file;
and merging 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 acquisition module 301 includes a reading sub-module 3011, a first determination sub-module 3012, and a second determination sub-module 3013, wherein,
The reading submodule 3011 is used for 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;
a first determining submodule 3012, configured to determine that the local information file is an information file of a resource to be updated when the local version identifier matches with the service-side version identifier;
and the second determining submodule 3013 is configured to obtain a service side information file when the local version identifier is not matched with the service side version identifier, 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 acquisition module includes a determination sub-module, and a first acquisition 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 sub-module is used for judging whether a target difference version identifier matched with the version identifier of the client exists in the version identifier set to be updated;
and the first acquisition sub-module 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 if the target difference resource is the resource version identifier, and acquiring a target difference resource corresponding to the target difference 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 acquisition sub-module is used for searching the compatible version identifier corresponding to the client version identifier from the compatible list if not, so as to determine a target difference version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier.
In some embodiments of the present application, the resource updating apparatus further includes:
the mounting removal module is used for removing mounting of the resource to be updated;
and the deleting module is used for deleting the target difference resource and the resource to be updated.
In the embodiment of the present application, the first obtaining module 301 firstly obtains an information file of a resource to be updated, 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 the resource version identifier and the client version identifier jointly 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, saves the memory resource on the client, remarkably reduces the memory of the differential resource in the scheme, and saves the network resource in the transmission process.
In addition, the embodiment of the present application further provides a computer device, which 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, specifically:
The computer device may include one or more processors 401 of a processing core, memory 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 11 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement 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 performing overall detection of the computer device. 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 processes an operating system, a user page, an application program, etc., and the modem processor mainly processes wireless communication. 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 executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, 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 with access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used 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 or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement 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 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 jointly exists in the difference version identification set, 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 updated resource.
The method comprises the steps of firstly obtaining an information file of a resource to be updated, determining a resource version identifier of the resource to be updated and a client version identifier of the resource to be updated, obtaining a target difference resource corresponding to the target difference version identifier when the target difference version identifier commonly corresponds to the resource version identifier and the client version identifier exists in the difference version identifier 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 remarkably simplify the difficulty of maintaining the resource file by the client, save the memory resource on the client, remarkably reduce the memory of the differential resource in the scheme, and save the network resource which needs to be consumed in the transmission process.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
The system according to the embodiment of the present application may be a distributed system formed by connecting a client and a plurality of nodes (access to any form of computer devices in a network, such as servers and terminals) through a network communication.
Taking the distributed system as an example of a blockchain system, referring To fig. 12, fig. 12 is a schematic diagram of an alternative architecture of the distributed system 110 applied To the blockchain system according To an embodiment of the present application, which is formed by a plurality of nodes 1101 (any type of computing devices in an access network, such as servers and user terminals) and clients 1102, where a Peer-To-Peer (P2P, peer To Peer) network is formed between the nodes, and the P2P protocol is an application layer protocol running on top of a transmission control protocol (TCP, transmission Control Protocol) protocol. In a distributed system, any machine, such as a server, a terminal, may join to become a node, including a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functionality of each node in the blockchain system shown in fig. 12, the functions involved include:
1) The routing, the basic function that the node has, is used for supporting the communication between the nodes.
Besides the routing function, the node can also have the following functions:
2) The application is used for being deployed in a block chain to realize specific service according to actual service requirements, recording data related to the realization function to form recorded data, carrying a digital signature in the recorded data to represent the source of task data, sending the recorded data to other nodes in the block chain system, and adding the recorded data into a temporary block when the source and the integrity of the recorded data are verified by the other nodes.
For example, the services implemented by the application include:
2.1 Wallet for providing electronic money transactions, including initiating a transaction (i.e., sending a transaction record of the current transaction to other nodes in the blockchain system, the other nodes, after verification, storing record data of the transaction in a temporary block of the blockchain in response to acknowledging that the transaction is valid; of course, the wallet also supports inquiry of remaining electronic money in the electronic money address;
2.2 The shared account book is used for providing the functions of storing, inquiring, modifying and the like of account data, sending record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify to be effective, storing the record data into a temporary block as a response for acknowledging that the account data is effective, and also sending confirmation to the node initiating the operation.
2.3 A computerized agreement that can execute the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions based on actual business demand codes, such as querying the physical distribution status of the goods purchased by the buyer, transferring the electronic money of the buyer to the merchant's address after the buyer signs for the goods; of course, the smart contract is not limited to executing the contract for the transaction, and may execute a contract that processes the received information.
3) The blockchain comprises a series of blocks (blocks) which are connected with each other according to the generated sequence time, the new blocks are not removed once being added into the blockchain, and record data submitted by nodes in the blockchain 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 regional chain by the node, and the computer device (e.g., terminal or server) may acquire the information file and the target differential resource based on the data stored in the shared ledger.
Referring to fig. 13, fig. 13 is an optional Block Structure (Block Structure) provided in an embodiment of the present application, 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 each Block is connected by the hash value to form a Block chain. In addition, the block may include information such as a time stamp at the time of block generation. The blockchain (Blockchain), essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains associated information for verifying the validity of its information (anti-counterfeiting) and generating the next block.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application further provides a storage medium in which a computer program is stored, the computer program being capable of being loaded by a processor to perform the steps of any of the resource updating methods provided by 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 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 jointly exists in the difference version identification set, 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 updated resource.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The steps of any resource updating method provided by the embodiment of the present application can be executed by the computer program stored in the storage medium, so that the beneficial effects of any resource updating method provided by the embodiment of the present application can be achieved, and detailed descriptions of the foregoing embodiments are omitted.
The foregoing describes in detail a resource updating method, device and storage medium provided by the embodiments of the present application, and specific examples are applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (9)

1. A method for updating a resource, comprising:
acquiring an information file of a resource to be updated, wherein the information file comprises a difference version identification set and a compatibility list;
Determining a resource version identifier of a resource to be updated and a client version identifier of the resource to be updated;
when a target difference version identifier commonly corresponding to the resource version identifier and the client version identifier exists in the difference version identifier set, acquiring a target difference resource corresponding to the target difference version identifier, including: 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 identifier matched with the client version identifier exists in the version identifier set to be updated or not; if yes, determining a target difference version identifier corresponding to the resource version identifier and the client version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier; if not, searching a compatible version identifier corresponding to the client version identifier from a compatible list to determine a target difference version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set, and acquiring a target difference resource corresponding to the target difference version identifier;
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 an updated resource.
2. The method of claim 1, wherein the information file further includes a target resource check code, and the fusing the target differential 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 that the initial resource is the target resource.
3. The method of claim 2, wherein the resource to be updated comprises a resource file to be updated, the target differential resource comprises differential attribute information and a differential resource file,
The fusing the target difference resource and the resource to be updated to obtain an initial resource comprises the following steps:
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 an initial resource.
4. The method of claim 3, wherein the differential attribute information comprises resource information to be reserved and resource information to be combined, the first resource file comprises a first resource file to be updated and a first differential resource file,
The determining, according to the difference attribute information, the first resource file and the second resource file of the resource file to be updated and the difference resource file includes:
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;
Determining a to-be-updated side file in the to-be-updated resource file and a difference side file in the difference resource file according to the to-be-combined resource information, wherein the to-be-updated side file corresponds to the difference side file;
And merging 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 an 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 identifier is matched with the service side version identifier, determining that the local information file is an information file of a resource to be updated;
And when the local version identifier is not matched with the service side version identifier, 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 of claim 1, wherein the fusing the target differential resource and the resource to be updated, after obtaining a target resource, further comprises:
Removing the mounting of the resource to be updated;
And deleting the target difference resource and the resource to be updated.
7. 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 and a compatibility list;
the determining module is used for determining a resource version identifier of the resource to be updated and a client version identifier of the resource to be updated;
The second acquisition module is used for acquiring a target difference resource corresponding to the target difference version identifier when the target difference version identifier which corresponds to the resource version identifier and the client version identifier jointly 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;
the updating module is used for updating the resource to be updated based on the target resource to obtain an updated resource;
the second acquisition module comprises a determination sub-module, a judgment sub-module, a first acquisition sub-module and a second acquisition sub-module;
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 identifier matched with the version identifier of the client exists in the version identifier set to be updated or not;
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 if yes, and obtaining a target difference resource corresponding to the target difference version identifier;
And the second obtaining submodule is used for searching the compatible version identifier corresponding to the client version identifier from the compatible list to determine a target difference version identifier corresponding to the resource version identifier and the compatible version identifier in the difference version identifier set and obtaining a target difference resource corresponding to the target difference version identifier if not.
8. A storage medium storing a computer program adapted to be loaded by a processor to perform the steps of the resource updating method of any of claims 1 to 6.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the resource updating method of any of claims 1 to 6 when the computer program is executed by the processor.
CN202010130512.5A 2020-02-28 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 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 2020-02-28 Resource updating method, device and storage medium

Publications (2)

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

Family

ID=77412831

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113326059B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114159796A (en) * 2021-11-04 2022-03-11 重庆六花网络科技有限公司 Game resource field loading method, device, equipment and storage medium
CN114564226B (en) * 2022-02-25 2023-03-17 深圳市云视机器人有限公司 Code deployment method and device, electronic equipment and readable storage medium

Citations (16)

* 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
CN103136013A (en) * 2011-12-01 2013-06-05 腾讯科技(深圳)有限公司 Method and system of software upgrade
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
CN106909404A (en) * 2015-12-22 2017-06-30 博雅网络游戏开发(深圳)有限公司 Oftware updating method and system
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

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9417865B2 (en) * 2010-05-28 2016-08-16 Red Hat, Inc. Determining when to update a package manager software
CN102955700A (en) * 2011-08-18 2013-03-06 腾讯科技(深圳)有限公司 System and method for upgrading software
US9996339B2 (en) * 2014-06-04 2018-06-12 Microsoft Technology Licensing, Llc Enhanced updating for digital content
US10044826B2 (en) * 2016-08-10 2018-08-07 Cloudflare, Inc. Method and apparatus for reducing network resource transmission size using delta compression

Patent Citations (18)

* 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
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
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
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

Also Published As

Publication number Publication date
CN113326059A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
US20220108285A1 (en) Methods and Systems for Object Validated Blockchain Accounts
CN108572986B (en) Data updating method and node equipment
CN107562513B (en) Intelligent contract life cycle management method based on JAVA
CN102307210B (en) Data downloading system and data management and downloading method thereof
CN112835612A (en) Electronic document version management method and device based on block chain
CN113326059B (en) Resource updating method, device and storage medium
CN104182294A (en) Method and device for backing up and recovering file
CN112101942A (en) Transaction request processing method, system, device and equipment based on block chain
CN112685391B (en) Service data migration method and device, computer equipment and storage medium
CN112613877A (en) Intelligent contract triggering method and device applied to block chain network and related equipment
TW202139127A (en) Compute services for a platform of services associated with a blockchain
CN111639309A (en) Data processing method and device, node equipment and storage medium
US11360966B2 (en) Information processing system and method of controlling information processing system
CN111290965B (en) Test method, test device, computer equipment and storage medium
CN113971191A (en) Data import method and device and computer readable storage medium
CN115114372A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN110233904A (en) Equipment update method, device, system, storage medium and computer equipment
WO2022057525A1 (en) Method and device for data retrieval, electronic device, and storage medium
CN105843809B (en) Data processing method and device
CN110298751A (en) Cross-platform transaction data processing method, device, terminal and storage medium
CN110297898A (en) Asynchronous Compilation Method and device
CN112691382B (en) Resource processing method, device and computer readable storage medium
CN115220775A (en) Resource issuing method, device, resource issuing equipment and storage medium
CN116107801A (en) Transaction processing method and related product
CN113791809A (en) Application exception handling 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
GR01 Patent grant