CN111367558A - Data updating method and device for application program - Google Patents

Data updating method and device for application program Download PDF

Info

Publication number
CN111367558A
CN111367558A CN202010117644.4A CN202010117644A CN111367558A CN 111367558 A CN111367558 A CN 111367558A CN 202010117644 A CN202010117644 A CN 202010117644A CN 111367558 A CN111367558 A CN 111367558A
Authority
CN
China
Prior art keywords
resource
data packet
target
game
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010117644.4A
Other languages
Chinese (zh)
Other versions
CN111367558B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010117644.4A priority Critical patent/CN111367558B/en
Publication of CN111367558A publication Critical patent/CN111367558A/en
Application granted granted Critical
Publication of CN111367558B publication Critical patent/CN111367558B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a data updating method and device of an application program, which can greatly reduce the size of an installation package of the application program and reduce the downloading and installation time of a user by configuring game running data into a basic data package and an expansion data package, and reduce the workload of repeatedly optimizing the resources of the application program for developers. In the data updating process of the application program, the basic resource can be updated according to the target basic data packet, the downloading and updating time of a user in the updating process is reduced, the target expansion data packet is obtained when an expansion data loading instruction is detected, the updating of the expansion resources is realized, the frequent downloading of game running data is avoided, and the user experience is improved.

Description

Data updating method and device for application program
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data updating method and a data updating apparatus for an application.
Background
With the continuous development of mobile communication technology, in order to meet the requirements of people on daily work, life and entertainment, more and more application programs are developed and applied to mobile terminals of users, such as mobile phones.
For the game application program, the resource installation package of the game includes, in addition to the resources necessary for game operation, game play resources, game scene resources, game effect resources, and the like, and as the game is developed, the game resources are increased. If at the beginning of game installation, integrate various resources in a resource installation package, not only the game package body is too big, and can lead to the player to spend longer time to carry out the game and download, reduce game experience.
Disclosure of Invention
The embodiment of the invention provides a data updating method of an application program, and aims to solve the problems of large data package of the application program and long downloading time of a user.
Correspondingly, the embodiment of the invention also provides a data updating device of the application program, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a data updating method for an application program, where game running data of the application program includes a basic data packet and an extended data packet, and the method includes:
when the application program is started, acquiring a target basic data packet for the application program;
updating basic resources of the application program according to the target basic data packet;
running the application program according to the updated basic resource;
responding to an extended data loading instruction aiming at the application program, and acquiring a target extended data packet matched with the extended data loading instruction;
and updating the extended resources of the application program according to the target extended data packet.
Optionally, the method further comprises:
responding to an acquisition instruction aiming at the application program, and acquiring a basic data packet of the application program;
and installing the application program according to the basic data packet.
Optionally, the running the application program according to the updated basic resource includes:
running the application program according to the updated basic resource and providing a graphical user interface;
the step of responding to an extended data loading instruction of the application program to acquire a target extended data packet matched with the extended data loading instruction comprises the following steps:
responding to an expansion data loading instruction acting on the graphical user interface, and acquiring a target expansion data packet matched with the expansion data loading instruction;
wherein the extension resources in the target extension data packet are different from the base resources.
Optionally, the method further comprises:
responding resource updating, and carrying out corresponding game operation response according to the extended resources and/or the basic resources.
Optionally, the application includes a preset file, and the game running data is generated as follows:
acquiring game resources corresponding to the preset files;
generating at least one sub data packet aiming at the preset file according to the game resources;
and generating game running data aiming at the application program by adopting the preset file and the sub data packet.
Optionally, the game resource corresponds to a resource identifier, the sub-data packet corresponds to a packet identifier, and the method further includes:
acquiring a first resource identifier of a current game resource and a second resource identifier of a target game resource referenced by the current game resource;
and generating a resource information list matched with the game running data by adopting the package identification, the first resource identification and the second resource identification.
Optionally, the sub-data packets include a public data packet and an exclusive data packet, and the generating the sub-data packets for the preset file according to the game resource includes:
acquiring the reference times of the game resources;
taking the first game resource with the reference times larger than a preset threshold value as a public resource, and generating a public data packet matched with the preset file;
and taking the second game resource with the reference frequency less than or equal to the preset threshold value as an exclusive resource, and generating an exclusive data packet matched with the preset file.
Optionally, the basic data packet is generated by:
acquiring a preset file set corresponding to the game running data and a first preset file subset matched with the expansion data packet;
obtaining a second preset file subset aiming at the basic data packet according to the preset file set and each first preset file subset;
acquiring a first initial resource set corresponding to each first preset file subset and a second resource set corresponding to the second preset file subset;
taking game resources existing in the first initial resource set and the second resource set at the same time as target game resources;
removing the target game resource from the first initial resource set to generate a first target resource set;
and removing the first preset file subset and the first target resource set from the game running data to generate the basic data packet.
Optionally, the extension data packet is generated as follows:
and generating the expansion data packet by adopting the first preset file subset and the first target resource set.
Optionally, the obtaining a target basic data packet for the application program when the application program is started includes:
when the application program is started, acquiring the current version number of a local basic data packet and the target version number of the target basic data packet;
when the target version number is greater than the current version number, acquiring the target basic data packet and a target resource information list matched with the target basic data packet, wherein the target resource information list comprises a first target packet identifier of a first sub data packet in the target basic data packet;
the updating the basic resource of the application program according to the target basic data packet comprises:
acquiring a local resource information list of the application program, wherein the local resource information list comprises a first current packet identifier of a second sub data packet in a local basic data packet;
when the packet identifier matched with the first current packet identifier does not exist in the target resource information list, generating first resource deletion information aiming at the local basic data packet;
when the local resource information list does not have the packet identifier matched with the first target packet identifier, generating first resource downloading information aiming at the local basic data packet;
and updating the local basic data packet by adopting the first resource downloading information and the first resource deleting information.
Optionally, the application program includes a local expansion data packet and an expansion resource file list for the local expansion data packet, where the local expansion data packet includes a target preset file set, the target resource information list includes a second target packet identifier of a third sub data packet in a target expansion data packet, and the updating of the expansion resource of the application program according to the target expansion data packet includes:
determining a fourth sub-data packet matched with the target preset file set, wherein the fourth sub-data packet corresponds to a second current packet identifier;
when the target resource information list does not have the packet identifier matched with the second current packet identifier, generating second resource deletion information aiming at the local expansion data packet;
when the expansion resource file list does not have the package identification matched with the second target package identification, second resource downloading information aiming at the local expansion data package is generated;
and updating the local expansion data packet by adopting the resource deleting information and the resource downloading information.
Optionally, the target resource information list includes a target game resource identifier corresponding to a second target package identifier, and after determining a fourth sub-packet matched with the target preset file set, the expanding resource update is performed on the application program according to the target expanding data packet, further including:
acquiring a current game resource identifier matched with the second current packet identifier;
when the packet identifier matched with the second current packet identifier does not exist in the target resource information list, generating second resource deletion information for the local expansion data packet, including:
when the game resource identifier matched with the current game resource identifier does not exist in the target resource information list, generating resource deletion information aiming at the local expansion data packet;
when the extension resource file list does not have the packet identifier matched with the second target packet identifier, generating second resource downloading information for the local extension data packet, including:
and when the game resource identifier matched with the target game resource identifier does not exist in the extended resource file list, generating resource downloading information aiming at the local extended data packet.
The embodiment of the invention also discloses a data updating device of the application program, the game running data of the application program comprises a basic data packet and an expansion data packet, and the device comprises:
the target basic data packet acquisition module is used for acquiring a target basic data packet aiming at the application program when the application program is started;
the basic resource updating module is used for updating the basic resources of the application program according to the target basic data packet;
the application program running module is used for running the application program according to the updated basic resource;
the target expansion data packet acquisition module is used for responding to an expansion data loading instruction aiming at the application program and acquiring a target expansion data packet matched with the expansion data loading instruction;
and the extended resource updating module is used for updating extended resources of the application program according to the target extended data packet.
Optionally, the apparatus further comprises:
a basic data packet acquisition module, configured to respond to an acquisition instruction for the application program and acquire a basic data packet of the application program;
and the application program installation module is used for installing the application program according to the basic data packet.
Optionally, the application running module is specifically configured to:
running the application program according to the updated basic resource and providing a graphical user interface;
the target expansion data packet acquisition module is specifically configured to:
responding to an expansion data loading instruction acting on the graphical user interface, and acquiring a target expansion data packet matched with the expansion data loading instruction;
wherein the extension resources in the target extension data packet are different from the base resources.
Optionally, the method further comprises:
and the game operation response module is used for responding to resource updating and carrying out corresponding game operation response according to the expanded resources and/or the basic resources.
Optionally, the application includes a preset file, and the game running data is generated by:
the game resource acquisition module is used for acquiring game resources corresponding to the preset files;
a sub-data packet generating module, configured to generate at least one sub-data packet for the preset file according to the game resource;
and the game running data generating module is used for generating game running data aiming at the application program by adopting the preset file and the sub data packet.
Optionally, the game resource corresponds to a resource identifier, the sub-data packet corresponds to a packet identifier, and the apparatus further includes:
the game resource identification acquisition module is used for acquiring a first resource identification of a current game resource and a second resource identification of a target game resource quoted by the current game resource;
and the resource information list generating module is used for generating a resource information list matched with the game running data by adopting the package identifier, the first resource identifier and the second resource identifier.
Optionally, the sub-packet includes a public data packet and a dedicated data packet, and the sub-packet generation module includes:
the reference frequency obtaining submodule is used for obtaining the reference frequency of the game resources;
the public data packet generating submodule is used for generating a public data packet matched with the preset file by taking the first game resource with the reference times larger than a preset threshold value as a public resource;
and the exclusive data packet generation sub-module is used for generating an exclusive data packet matched with the preset file by taking the second game resource with the reference frequency less than or equal to the preset threshold as an exclusive resource.
Optionally, the basic data packet is generated by:
the game playing data package comprises a preset file set acquisition module, a game playing data package acquisition module and a first expansion data package acquisition module, wherein the preset file set acquisition module is used for acquiring a preset file set corresponding to the game playing data and a first preset file subset matched with the expansion data package;
the preset file set processing module is used for obtaining a second preset file subset aiming at the basic data packet according to the preset file set and each first preset file subset;
a resource set obtaining module, configured to obtain a first initial resource set corresponding to each first preset file subset, and a second resource set corresponding to the second preset file subset;
a target resource determining module, configured to use game resources existing in the first initial resource set and the second resource set at the same time as target game resources;
a target resource removing module, configured to remove the target game resource from the first initial resource set, and generate a first target resource set;
and the basic data packet generating module is used for removing the first preset file subset and the first target resource set from the game running data to generate the basic data packet.
Optionally, the extension data packet is generated by the following modules:
and the expansion data packet generating module is used for generating the expansion data packet by adopting the first preset file subset and the first target resource set.
Optionally, the basic data packet obtaining module includes:
the version number obtaining submodule is used for obtaining the current version number of a local basic data packet and the target version number of the target basic data packet when the application program is started;
a basic data packet obtaining sub-module, configured to, when the target version number is greater than the current version number, obtain the target basic data packet and a target resource information list matched with the target basic data packet, where the target resource information list includes a first target packet identifier of a first sub data packet in the target basic data packet;
the base resource update module includes:
the information list obtaining submodule is used for obtaining a local resource information list of the application program, and the local resource information list comprises a first current packet identifier of a second sub-packet in a local basic data packet;
a first deletion information generation sub-module, configured to generate first resource deletion information for the local basic data packet when the packet identifier matching the first current packet identifier does not exist in the target resource information list;
a first download information generation sub-module, configured to generate first resource download information for the local basic data packet when the packet identifier matching the first target packet identifier does not exist in the local resource information list;
and the basic data packet updating submodule is used for updating the local basic data packet by adopting the first resource downloading information and the first resource deleting information.
Optionally, the application program includes a local extension data packet and an extension resource file list for the local extension data packet, where the local extension data packet includes a target preset file set, the target resource information list includes a second target packet identifier of a third sub-data packet in the target extension data packet, and the extension resource updating module includes:
the sub-data packet determining sub-module is used for determining a fourth sub-data packet matched with the target preset file set, and the fourth sub-data packet corresponds to a second current packet identifier;
a second deletion information generation sub-module, configured to generate second resource deletion information for the local expansion data packet when the packet identifier matching the second current packet identifier does not exist in the target resource information list;
a second download information generation sub-module, configured to generate second resource download information for the local expansion data package when the package identifier matching the second target package identifier does not exist in the expansion resource file list;
and the expansion data packet updating submodule is used for updating the local expansion data packet by adopting the resource deleting information and the resource downloading information.
Optionally, the target resource information list includes a target game resource identifier corresponding to a second target package identifier, and the extended resource updating module further includes:
the resource identifier obtaining submodule is used for obtaining a target resource identifier matched with the second current packet identifier;
a second deletion information generation submodule, configured to generate resource deletion information for the local expansion data packet when a game resource identifier matching the current game resource identifier does not exist in the target resource information list;
and a second download information generation sub-module, configured to generate resource download information for the local extension data package when a game resource identifier matching the target game resource identifier does not exist in the extension resource file list.
The embodiment of the invention also discloses a device, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more methods as described above.
Embodiments of the invention also disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more of the methods described above.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the game running data is configured into the basic data packet and the expansion data packet, so that the size of the installation packet of the application program can be greatly reduced, the downloading and installation time of a user is reduced, and the workload of repeatedly optimizing the resources of the application program is reduced for developers. In the data updating process of the application program, the basic resource can be updated according to the target basic data packet, the downloading and updating time of a user in the updating process is reduced, the target expansion data packet is obtained when an expansion data loading instruction is detected, the updating of the expansion resources is realized, the frequent downloading of game running data is avoided, and the user experience is improved.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of a method for updating data of an application according to the present invention;
FIG. 2 is a diagram illustrating a reference relationship of game resources in an embodiment of the present invention;
FIG. 3 is a flowchart illustrating steps of a second embodiment of a method for updating data of an application according to the present invention;
fig. 4 is a block diagram of an embodiment of a data updating apparatus for an application according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The game running data can be game resources required in the running process of the game application program, and can include media resources, running logic resources, art resources and the like, the media resources can include audio data, video data, picture data and the like, the running logic resources can be running program languages and the like involved in the running process of the game, and the art resources can be resources required for rendering game pictures, such as models, materials, animations, animation controllers, particle special effects and the like.
The basic data packet may be an installation packet of the application program, which includes the basic game resources in which the application program runs, and the user may directly install the basic data packet and enter the game, for example, the basic data packet may be various game resources related to the game hall, or game resources related to a large category under the game hall.
The expansion data package may be a resource set of a certain module in the application program, the application program may include a plurality of modules, and for example, the game application program may include a plurality of level cards, a plurality of different playing methods, and the like, different level cards may correspond to different expansion data packages, and different playing methods may also correspond to different expansion data packages. In the running process of the application program, when the loading of the expansion resources is triggered, the application program can acquire the corresponding expansion data packet, acquire all the resources of the corresponding module at one time, and then enter the module.
The preset file can be an index file used by the application program for managing game resources, and the game resources matched with the file can be quickly found through the index file. Each preset file may correspond to at least one sub-packet (AssetBundle, AB), and each sub-packet may include a plurality of game resources.
In the downloading or data updating process of the game application program, the user is often required to download the data required by the running of the application program in a full amount, which easily results in long downloading and installing time of the user and reduces the game experience of the user. Therefore, one of the core ideas of the embodiment of the invention is to divide the game running data into a basic data packet and a plurality of extended data packets, the game can be entered only by downloading the basic data packet at the beginning of the installation of the game application program, and in the running process of the application program, when an extended resource loading event is detected, the extended data packets are downloaded again, and the installation or the update of the extended resources is realized, so that the size of the installation packet of the application program is reduced, the downloading and installing time of a user is reduced, the frequent downloading of the game running data is avoided, and the user experience is improved.
Referring to fig. 1, a flowchart illustrating a first step of a first embodiment of a data updating method for an application program of the present invention may specifically include the following steps:
step 101, when the application program is started, acquiring a target basic data packet aiming at the application program;
in a specific implementation, a user may install a game application (application described below) in a terminal to play a game, and as a developer develops the game, game running data in a server is updated. When a user starts an application program in a terminal, because the current game running data of the application program in the terminal is not the latest version of data, if the data of the application program is not updated, the user cannot enter the game.
In an optional embodiment of the present invention, when the user installs the application program for the first time or again, the terminal may respond to the acquisition instruction for the application program to acquire the basic data packet of the application program, and then install the application program according to the basic data packet, so that when the game application program is installed, the game can be entered only by downloading the basic data packet, which not only greatly reduces the downloading time, but also improves the installation efficiency of the application program and improves the game experience of the user. For example, the user may select a game application program desired to be downloaded in an application store provided in the terminal and then download the application program. During downloading, the terminal only acquires the basic data packet of the application program and installs the basic data packet according to the basic data packet so as to provide a basic game playing method for the user and enable the user to quickly enter the game.
Specifically, the game play data may include a basic data packet and an extension data packet. The basic data packet can be used for ensuring that the user can enter the game, and the expansion data packet can be used for ensuring that the user can realize various game playing methods in the game or enter various game stages and the like. Therefore, the client can send a data acquisition request to the server and acquire a target basic data packet for the application program so as to update the basic resource of the application program according to the target basic data packet.
In an optional embodiment of the present invention, the application program may include a plurality of preset files, and the game running data may be generated as follows:
step S11, obtaining game resources corresponding to the preset file;
step S12, generating at least one sub data packet aiming at the preset file according to the game resource;
and step S13, generating game running data aiming at the application program by adopting the preset file and the sub data packet.
In a specific implementation, different preset files correspondingly manage different game resources, and the game resources and the associated game resources can be packed into a compression packet to generate a sub-packet.
Specifically, the sub-data packets may include public data packets and dedicated data packets, the game resources corresponding to the preset files may be acquired, then the number of times of reference of each game resource is determined, then the first game resource of which the number of times of reference is greater than a preset threshold is used as the public resource to generate a public data packet matched with the preset file, and the second game resource of which the number of times of reference is less than or equal to the preset threshold is used as the dedicated resource to generate a dedicated data packet matched with the preset file, so that the game resources of which the number of times of reference is greater than the preset threshold are packaged as the public resource, thereby avoiding repeated packaging of the game resources, avoiding redundancy of data, and simplifying the structure of game operation data.
After each public data packet and each exclusive data packet are obtained, game running data can be generated according to the corresponding relation between the preset file and the sub data packets. Wherein, a preset file may correspond to at least one sub-packet.
In a specific implementation, the game resource may correspond to a resource identifier, and each sub-data packet may correspond to a packet identifier. After the game resource is packaged and each sub data packet is output, a first resource identifier of the current game resource and a second resource identifier of a target game resource quoted by the current game resource can be obtained, and then a resource information list matched with the game running data is generated by adopting the packet identifier, the first resource identifier and the second resource identifier.
In one example, as shown in fig. 2, a schematic diagram of a reference relationship of a game resource in an embodiment of the present invention is shown, where 1.prefab represents a preset file ①, 2.prefab represents a preset file ②, and material 1, grid 1, material 2, shader1, texture 1, and shader2, etc. represent game resources, for preset file ①, material 1, grid 1, shader1, and texture 1 are referenced, for preset file ②, material 2, grid 1, shader2, and texture 1 are referenced, for material 1, texture 1 and shader1 are referenced, and for material 2, texture 1 and shader2 are referenced.
If the number of references of grid 1 and texture 1 is 2, grid 1 and texture 1 may be used as a common resource, and may be packaged as a common data packet (grid 1.ab and texture 1.ab) for preset file ① and preset file ②, while material 1 and shader1 are packaged as a first sub-data packet (1.ab), and material 2 and shader2 are packaged as a second sub-data packet (2. ab).
The preset file ① can correspond to sub-data packets such as grid 1.ab, texture 1.ab, and the preset file ② can correspond to sub-data packets such as grid 1.ab, texture 1.ab, and 2.ab, so that game resources with reference times greater than a preset threshold are packaged into a common resource, thereby avoiding repeated packaging of the game resources, avoiding data redundancy, and simplifying the structure of game running data.
In addition, the package identifier, the first resource identifier and the second resource identifier may be used to generate a resource information list matching the game execution data. The second resource identifier may be a resource identifier of a target game resource to which the current game resource is referred, and specifically, the resource information list may be as shown in table 1:
Figure BDA0002391982900000121
Figure BDA0002391982900000131
TABLE 1
In the above table, for convenience of understanding and explanation, the resource identifier of the game resource and the name of the sub-packet are exemplified. Specifically, for the resource identifier of the game resource, the resource path of the game resource can be calculated through a Hash algorithm, so that a unique resource identifier is generated; for the packet identifier of the sub-packet, an information summarization algorithm may be adopted to calculate the MD5 code corresponding to each sub-packet, and the MD5 code is used as the packet identifier corresponding to the sub-packet, so that the game resource may be effectively managed and maintained by generating a resource information list for the game running data.
102, updating basic resources of the application program according to the target basic data packet;
in one example, when the client has installed the application program, the latest basic data packet in the server is obtained, and the basic resource update is performed on the application program according to the basic data packet. When a new module is added in the game, such as a new level, and the like, since the basic data packet does not include the game resources corresponding to the modules, the module may not be updated, and only the basic resources of the application program are updated.
In another example, if the client installs the application for the first time, the basic data package may be downloaded, and the application may be installed according to the basic data package, so that not only the size of the installation package of the application is reduced, but also the download and installation time of the user is reduced.
In an optional embodiment of the present invention, the basic data packet may be generated as follows:
step S21, acquiring a preset file set corresponding to the game running data and a first preset file subset matched with the expansion data packet;
step S22, obtaining a second preset file subset for the basic data package according to the preset file set and each of the first preset file subsets;
step S23, acquiring a first initial resource set corresponding to each first preset file subset and a second resource set corresponding to the second preset file subset;
step S24, using the game resources existing in the first initial resource set and the second resource set at the same time as the target game resources;
step S25, removing the target game resource from the first initial resource set, and generating a first target resource set;
step S26, removing the first preset file subset and the first target resource set from the game running data, and generating the basic data packet.
In the embodiment of the invention, game resources are packaged according to different preset files, and after the sub-data packets are generated, the game running data can be further divided, so that the game running data is divided into the basic data packet and the plurality of expansion data packets through manual configuration.
In a specific implementation, a relatively independent function in a game may be used as a module, for example, a level in a game scene, where the level may include: a scene model, a Non-Player Character (NPC) model, a Boss model, and a scene object model (a stone model, a tree model, a building model, etc.). Then, the extension data packet may be configured by taking the preset file as a unit, as shown in table 2 below:
expansion package ① Expansion package ② Expansion package ③
Scene1.prefab Scene2.prefab Scene3.prefab
Npc1.prefab Npc2.prefab Npc3.prefab
Boss1.prefab Boss2.prefab Boss3.prefab
Stone1.prefab Stone2.prefab Stone3.prefab
Tree1.prefab Tree2.prefab Tree3.prefab
TABLE 2
The expansion data packet ①, the expansion data packet ②, and the expansion data packet ③ may respectively correspond to the first level card, the second level card, and the third level card, and each expansion data packet may respectively correspond to preset files such as scene.
Specifically, a preset file set corresponding to the game running data may be obtained, where the preset file set includes all preset files required by the game running data, and a first preset file subset corresponding to each expansion data packet may be obtained. And then, according to the preset file set and all the first preset file subsets, determining a second preset file subset of the basic data packet, then respectively obtaining game resources corresponding to the preset files in each first preset file subset to obtain a first initial resource set, and traversing the game resources in the second preset file subset to obtain a second resource set. And game resources existing in the first initial resource set and the second resource set at the same time are used as target game resources, then the target game resources are removed from the first initial resource set to obtain a first target resource set, if the target game resources are placed in an expansion data packet, when an application program loads a basic data packet, the game resources are lacked to cause loading failure, and the game resources used by the basic data packet are removed from the expansion data packet, so that the completeness of the basic data packet is ensured, and the game resources are removed from the expansion data packet, so that the size of the expansion data packet is reduced, and the redundancy of data is avoided.
After the first target resource set is obtained, the game resources are configured to the first target resource set corresponding to each expansion resource package, and the generated game resources are placed into the basic data package by default, so that the game resources except each first preset file subset and each first target resource set can be used as the game resources of the basic data package from the game running data. Meanwhile, the expansion data packet can be generated by respectively adopting each first preset file subset and the first target resource set matched with the first preset file subset.
In an example, on the premise of not affecting the correctness of the basic data packet, the basic data packet and each extension data packet may be generated as follows:
(1) the game running data is A;
(2) all preset files are F, wherein F is a subset of A;
(3) the preset file subset of the manually configured extension data packet is combined into P1,P2,...,Pn
(4) The game resources corresponding to each sub-data packet can be obtained through the resource information list generated in the process of packaging the game resources.
Through (2) and (3), a second preset file subset S ═ F-P corresponding to the basic data packet is obtained1∪P2∪...∪Pn
And (4) traversing the S to obtain the first game resource corresponding to each preset file, and putting all the first game resources into the second resource set D.
Similarly, P is obtained by (4)nSecond game resources corresponding to all the first preset file subsets are put into the first initial resource set Cn
If a resource is referenced by a base package, it cannot be placed in an extension package, otherwise the base package would miss the game resource. Therefore, it is required to use CnAnd eliminating game resources which are simultaneously referenced by the basic data packet. Then the first target resource set T can be obtained after eliminationn=Cn-Cn∩D。
Finally obtaining a data set corresponding to each expansion data packet as Rn=Pn∪TnWherein P isnIs a first preset subset of files, T, configured manuallynIs game resources corresponding to the preset file, such as material, texture, etc. And the rest default basic data packets except the game resources configured to the extension data packets are
Figure BDA0002391982900000161
Then when packaging the application program, packaging the basic dataThe application program is put in, the game running data is configured into the basic data packet and the plurality of expansion data packets, and when the application program is installed, only the basic data packet needs to be downloaded, so that the size of the installation packet of the application program can be greatly reduced, and the downloading and installation time of a user can be reduced.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art can set the method according to practical situations, and the present invention is not limited to this.
103, running the application program according to the updated basic resource;
specifically, after the application realizes the update of the basic resource according to the target basic data packet, the terminal can run the application and enter the corresponding game interface, so that the user can realize the game operation.
104, responding to an extended data loading instruction aiming at the application program, and acquiring a target extended data packet matched with the extended data loading instruction;
different modules can be included in the game, and the different modules can correspond to different playing methods, different level cards and the like, so that each playing method can correspond to one expansion data packet, and each level card can correspond to one expansion data packet. When a user selects a certain playing method in a game or enters a certain level, the application program can detect an expansion data loading instruction, so that the expansion data loading instruction can be responded, and a target expansion data packet matched with the expansion data loading instruction is obtained, so that a certain playing method is realized or a certain level is entered.
And 105, updating expansion resources of the application program according to the target expansion data packet.
In a specific implementation, because the game resources of some modules in the game are not in the basic data packet, when the modules are opened by a user, the expansion data packet can be triggered to download, and then the application program can update the expansion resources of the application program according to the obtained target expansion data packet.
In one example, the application has downloaded the extension data package required by the module, and when the module content changes, the current extension resource can be updated according to the target extension data package.
In another example, when a user enters a certain module for the first time, an application program may be triggered to obtain an expansion data packet corresponding to the module, and then the expansion data packet is loaded, so that the user enters a play method or a level corresponding to the module.
In the embodiment of the invention, the game running data is configured into the basic data packet and the expansion data packet, so that the size of the installation packet of the application program can be greatly reduced, the downloading and installation time of a user is reduced, and the workload of repeatedly optimizing the resources of the application program is reduced for developers. In the data updating process of the application program, the basic resource can be updated according to the target basic data packet, the downloading and updating time of a user in the updating process is reduced, the target expansion data packet is obtained when an expansion data loading instruction is detected, the updating of the expansion resources is realized, the frequent downloading of game running data is avoided, and the user experience is improved.
Referring to fig. 3, a flowchart illustrating steps of a second embodiment of a data updating method for an application program according to the present invention is shown, where game running data of the application program includes a basic data packet and an extended data packet, and the method specifically includes the following steps:
step 301, when the application program is started, acquiring a current version number of a local basic data packet and a target version number of the target basic data packet;
step 302, when the target version number is greater than the current version number, acquiring the target basic data packet and a target resource information list matched with the target basic data packet;
in a specific implementation, when the game running data in the server is updated, a data update request may be sent to the client, where the data update request may include a version number of the game running data in the server. The client may compare the version numbers after receiving the data update request, and when the version number of the game running data in the server is greater than the local version number, the client may obtain the target basic data packet and the target resource information list matched with the target basic data packet.
Step 303, updating the basic resource of the application program according to the target basic data packet and the target resource information list;
in this embodiment of the present invention, the target resource information list may include first target packet identifiers corresponding to first sub-packets in the target basic data packet. In addition, a local resource information list may be maintained in the client, where the local resource information list may include a first current packet identifier of each second sub packet in the local basic data packet.
In a specific implementation, after the client installs the application program, a local resource information list corresponding to the application program can be locally maintained, and the local resource information list is updated after the application program is updated each time. Specifically, in the updating process of the application program, when the target resource information list does not have a packet identifier matched with the first current packet identifier, first resource deletion information for the local basic data packet is generated; and when the local resource information list does not have the packet identifier matched with the first target packet identifier, generating first resource downloading information aiming at the local basic data packet, and updating the local basic data packet by adopting the first resource downloading information and the first resource deleting information.
In one example, the local resource information list and the target resource information list in the server may be as shown in table 3 below:
Figure BDA0002391982900000181
TABLE 3
Then by comparing the MD5 codes, it can be determined that the packet identifier a106500c1404c7eaa87c687a5f6f3dd3 and the packet identifier f27c034b83ed3a82db98279d14e64b8d in the local resource information list of the client do not exist in the latest target resource information list in the server, and then a piece of resource deletion information for the local basic data packet can be generated, and then the game resource corresponding to the two packet identifiers is deleted. Meanwhile, if the local resource information list of the client does not include three package identifiers, such as f19089972892bcc102bd9bba89821008, c12b9252bab11f1b094c9a5ad0b933e7, and cc7b9c6b94c60a8c0df401a466692efb, indicating that the application needs to update the 3 game resources, first resource download information for the local basic data package may be generated, and then the corresponding game resource is downloaded, and the application is updated. And after updating, recording a new package identification MD5 code in the local resource information list, and updating the version number of the local game running data.
In addition, when a new module is added to the game, that is, a new expansion data packet is added, since the basic data packet is not updated on the server at this time, when the user enters the game or updates the basic data packet, the client can compare all local game resources with the game resources of the server, when the update related to the expansion data packet is detected, the data update can be not performed, only the basic data packet is updated, and only when the user enters the corresponding module in the game, the update or the download of the expansion data packet is triggered.
Step 304, running the application program according to the updated basic resource and providing a graphical user interface;
specifically, after the application realizes the update of the basic resource according to the target basic data packet, the terminal may run the application and provide a graphical user interface, such as a game lobby interface, a game play interface, a game level interface, and the like, so that the user can select the game play and enter the game.
305, responding to an extended data loading instruction acting on the graphical user interface, and acquiring a target extended data packet matched with the extended data loading instruction;
different modules can be included in the game, and the different modules can correspond to different playing methods, different level cards and the like, so that each playing method can correspond to one expansion data packet, and each level card can correspond to one expansion data packet. When a user selects a certain play method in a game or enters a certain level, the application program can detect an expansion data loading instruction acting on a game interface, so that a target expansion data packet matched with the expansion data loading instruction can be obtained, and the certain play method can be realized or the certain level can be entered. Wherein the extension resources in the extension packet may be different from the base resources in the base packet.
And step 306, updating the expansion resources of the application program according to the target expansion data packet.
In the embodiment of the present invention, the application program may further include a local extension data package and an extension resource file list corresponding to the local extension data package, where the local extension data package includes a target preset file set. And the target resource information list comprises a second target packet identifier of a third sub-packet in the target expansion data packet.
In specific implementation, when game running data is configured into a basic data packet and a plurality of expansion data packets, a preset file set of each expansion data packet can be manually configured, and an expansion resource file list corresponding to the expansion data packets is generated, so that when a client acquires the expansion data packets, the expansion resource list can be stored locally. In the process of updating the extended data, the fourth sub-data packets corresponding to each preset file in the extended resource file list can be acquired, so that the second current packet identifier corresponding to each fourth sub-data packet is determined.
Specifically, the client may compare a packet identifier corresponding to each fourth sub packet in the local expansion data packet with a second target packet identifier in a third sub packet of the target expansion data packet in a target resource information list in the server, and generate second resource deletion information for the local expansion data packet when the target resource information list does not have a packet identifier matching the second current packet identifier; and when the expansion resource file list does not have the package identification matched with the second target package identification, generating second resource downloading information aiming at the local expansion data package, and then updating the local expansion data package by adopting the resource deleting information and the resource downloading information.
In an example, because the sub-data packet adopts MD5 code as the packet identifier, the client may compare the MD5 code corresponding to the local extension data packet with the MD5 code corresponding to the target extension data packet in the server, so as to determine which MD5 codes exist locally but not in the server, which MD5 codes do not exist locally but exist in the server, and which MD5 codes exist locally and also exist in the server, thereby determining the file difference between the local extension resource list and the target resource information list of the server, deleting the locally redundant file, and updating the locally lacking file.
In an optional embodiment of the present invention, the target resource information list may further include a target game resource identifier corresponding to the second target package identifier, and the process of updating and expanding the data package by the client may further be: a fourth sub data packet matched with the target preset file set can be determined firstly, a current game resource identifier matched with the second current packet identifier is obtained, and when the game resource identifier matched with the current game resource identifier does not exist in the target resource information list, resource deletion information aiming at the local expansion data packet is generated; and when the game resource identifier matched with the target game resource identifier does not exist in the extended resource file list, generating resource downloading information aiming at the local extended data packet, and updating the local extended data packet by adopting the resource deleting information and the resource downloading information.
In a specific implementation, a resource identifier corresponding to each game resource in a local expansion data packet can be determined according to an expansion resource file list, and then a target resource information list in a server can be searched through the resource identifier, and a latest hash value corresponding to each game resource in the local expansion data packet is determined, so that which hash values exist in the local but not in the server, which hash values do not exist in the local but exist in the server, and which hash values exist in both the local and the server, and further, a file difference between the local expansion resource list and the target resource information list of the server is determined, so that a locally redundant file is deleted, and a locally absent file is updated.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art can set the method according to practical situations, and the present invention is not limited to this.
In an optional embodiment of the present invention, when the game execution data of the application program is updated, a corresponding game operation response may be performed according to the expanded resources and/or the basic resources. Specifically, if the application program only updates the basic resource, the basic game playing method can be provided for the user, and the game operation of the user is responded; if the application program updates the extended resources, game play can be provided for the user based on the basic resources and the extended resources, for example, new play is provided, or higher-quality art, audio and video resources are provided.
In the embodiment of the invention, the game running data is configured into the basic data packet and the expansion data packet, so that the size of the installation packet of the application program can be greatly reduced, the downloading and installation time of a user is reduced, and the workload of repeatedly optimizing the resources of the application program is reduced for developers. In the data updating process of the application program, the basic resource can be updated according to the target basic data packet, the downloading and updating time of a user in the updating process is reduced, the target expansion data packet is obtained when an expansion data loading instruction is detected, the updating of the expansion resources is realized, the frequent downloading of game running data is avoided, and the user experience is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of an embodiment of a data updating apparatus for an application according to the present invention is shown, where game running data of the application includes a basic data packet and an extended data packet, and specifically includes the following modules:
a target basic data packet obtaining module 401, configured to obtain a target basic data packet for an application program when the application program is started;
a basic resource updating module 402, configured to update basic resources of the application according to the target basic data packet;
an application program running module 403, configured to run the application program according to the updated basic resource;
a target extension data packet obtaining module 404, configured to respond to an extension data loading instruction for the application program, and obtain a target extension data packet matched with the extension data loading instruction;
and an extended resource updating module 405, configured to update extended resources of the application according to the target extended data packet.
In an optional embodiment of the invention, the apparatus further comprises:
a basic data packet acquisition module, configured to respond to an acquisition instruction for the application program and acquire a basic data packet of the application program;
and the application program installation module is used for installing the application program according to the basic data packet.
In an optional embodiment of the present invention, the application running module 403 is specifically configured to:
running the application program according to the updated basic resource and providing a graphical user interface;
the target expansion packet obtaining module 404 is specifically configured to:
responding to an expansion data loading instruction acting on the graphical user interface, and acquiring a target expansion data packet matched with the expansion data loading instruction;
wherein the extension resources in the target extension data packet are different from the base resources.
In an optional embodiment of the present invention, further comprising:
and the game operation response module is used for responding to resource updating and carrying out corresponding game operation response according to the expanded resources and/or the basic resources.
In an optional embodiment of the present invention, the application includes a preset file, and the game execution data is generated by:
the game resource acquisition module is used for acquiring game resources corresponding to the preset files;
a sub-data packet generating module, configured to generate at least one sub-data packet for the preset file according to the game resource;
and the game running data generating module is used for generating game running data aiming at the application program by adopting the preset file and the sub data packet.
In an optional embodiment of the present invention, the game resource corresponds to a resource identifier, the sub-data packet corresponds to a packet identifier, and the apparatus further includes:
the game resource identification acquisition module is used for acquiring a first resource identification of a current game resource and a second resource identification of a target game resource quoted by the current game resource;
and the resource information list generating module is used for generating a resource information list matched with the game running data by adopting the package identifier, the first resource identifier and the second resource identifier.
In an optional embodiment of the present invention, the sub-packet includes a public data packet and a private data packet, and the sub-packet generation module includes:
the reference frequency obtaining submodule is used for obtaining the reference frequency of the game resources;
the public data packet generating submodule is used for generating a public data packet matched with the preset file by taking the first game resource with the reference times larger than a preset threshold value as a public resource;
and the exclusive data packet generation sub-module is used for generating an exclusive data packet matched with the preset file by taking the second game resource with the reference frequency less than or equal to the preset threshold as an exclusive resource.
In an optional embodiment of the present invention, the basic data packet is generated by:
the game playing data package comprises a preset file set acquisition module, a game playing data package acquisition module and a first expansion data package acquisition module, wherein the preset file set acquisition module is used for acquiring a preset file set corresponding to the game playing data and a first preset file subset matched with the expansion data package;
the preset file set processing module is used for obtaining a second preset file subset aiming at the basic data packet according to the preset file set and each first preset file subset;
a resource set obtaining module, configured to obtain a first initial resource set corresponding to each first preset file subset, and a second resource set corresponding to the second preset file subset;
a target resource determining module, configured to use game resources existing in the first initial resource set and the second resource set at the same time as target game resources;
a target resource removing module, configured to remove the target game resource from the first initial resource set, and generate a first target resource set;
and the basic data packet generating module is used for removing the first preset file subset and the first target resource set from the game running data to generate the basic data packet.
In an optional embodiment of the present invention, the extension packet is generated by the following modules:
and the expansion data packet generating module is used for generating the expansion data packet by adopting the first preset file subset and the first target resource set.
In an optional embodiment of the present invention, the basic data packet obtaining module includes:
the version number obtaining submodule is used for obtaining the current version number of a local basic data packet and the target version number of the target basic data packet when the application program is started;
a basic data packet obtaining sub-module, configured to, when the target version number is greater than the current version number, obtain the target basic data packet and a target resource information list matched with the target basic data packet, where the target resource information list includes a first target packet identifier of a first sub data packet in the target basic data packet;
the base resource update module 402 comprises:
the information list obtaining submodule is used for obtaining a local resource information list of the application program, and the local resource information list comprises a first current packet identifier of a second sub-packet in a local basic data packet;
a first deletion information generation sub-module, configured to generate first resource deletion information for the local basic data packet when the packet identifier matching the first current packet identifier does not exist in the target resource information list;
a first download information generation sub-module, configured to generate first resource download information for the local basic data packet when the packet identifier matching the first target packet identifier does not exist in the local resource information list;
and the basic data packet updating submodule is used for updating the local basic data packet by adopting the first resource downloading information and the first resource deleting information.
In an optional embodiment of the present invention, the application program includes a local extension data packet and an extension resource file list for the local extension data packet, where the local extension data packet includes a target preset file set, the target resource information list includes a second target packet identifier of a third sub-data packet in the target extension data packet, and the extension resource update module 405 includes:
the sub-data packet determining sub-module is used for determining a fourth sub-data packet matched with the target preset file set, and the fourth sub-data packet corresponds to a second current packet identifier;
a second deletion information generation sub-module, configured to generate second resource deletion information for the local expansion data packet when the packet identifier matching the second current packet identifier does not exist in the target resource information list;
a second download information generation sub-module, configured to generate second resource download information for the local expansion data package when the package identifier matching the second target package identifier does not exist in the expansion resource file list;
and the expansion data packet updating submodule is used for updating the local expansion data packet by adopting the resource deleting information and the resource downloading information.
In an optional embodiment of the present invention, the target resource information list includes a target game resource identifier corresponding to a second target package identifier, and the extended resource updating module 405 further includes:
the resource identifier obtaining submodule is used for obtaining a target resource identifier matched with the second current packet identifier;
a second deletion information generation submodule, configured to generate resource deletion information for the local expansion data packet when a game resource identifier matching the current game resource identifier does not exist in the target resource information list;
and a second download information generation sub-module, configured to generate resource download information for the local extension data package when a game resource identifier matching the target game resource identifier does not exist in the extension resource file list.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an apparatus, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in embodiments of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description is provided for a data updating method and a data updating apparatus of an application program, and the present invention is described in detail by applying specific examples to explain the principles and embodiments of the present invention, where the descriptions of the above examples are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

1.A data updating method for an application program, wherein game running data of the application program comprises a basic data packet and an expansion data packet, the method comprising:
when the application program is started, acquiring a target basic data packet for the application program;
updating basic resources of the application program according to the target basic data packet;
running the application program according to the updated basic resource;
responding to an extended data loading instruction aiming at the application program, and acquiring a target extended data packet matched with the extended data loading instruction;
and updating the extended resources of the application program according to the target extended data packet.
2. The method of claim 1, further comprising:
responding to an acquisition instruction aiming at the application program, and acquiring a basic data packet of the application program;
and installing the application program according to the basic data packet.
3. The method of claim 1 or 2, wherein the running the application according to the updated base resource comprises:
running the application program according to the updated basic resource and providing a graphical user interface;
the step of responding to an extended data loading instruction of the application program to acquire a target extended data packet matched with the extended data loading instruction comprises the following steps:
responding to an expansion data loading instruction acting on the graphical user interface, and acquiring a target expansion data packet matched with the expansion data loading instruction;
wherein the extension resources in the target extension data packet are different from the base resources.
4. The method of claim 3, further comprising:
responding resource updating, and carrying out corresponding game operation response according to the extended resources and/or the basic resources.
5. The method of claim 1, wherein the application comprises a default file, and wherein the game play data is generated by:
acquiring game resources corresponding to the preset files;
generating at least one sub data packet aiming at the preset file according to the game resources;
and generating game running data aiming at the application program by adopting the preset file and the sub data packet.
6. The method of claim 5, wherein the game resource corresponds to a resource identifier, and wherein the sub-packets correspond to a packet identifier, the method further comprising:
acquiring a first resource identifier of a current game resource and a second resource identifier of a target game resource referenced by the current game resource;
and generating a resource information list matched with the game running data by adopting the package identification, the first resource identification and the second resource identification.
7. The method of claim 5, wherein the sub-packets comprise public data packets and proprietary data packets, and wherein generating the sub-packets for the preset file according to the game resource comprises:
acquiring the reference times of the game resources;
taking the first game resource with the reference times larger than a preset threshold value as a public resource, and generating a public data packet matched with the preset file;
and taking the second game resource with the reference frequency less than or equal to the preset threshold value as an exclusive resource, and generating an exclusive data packet matched with the preset file.
8. The method of claim 5, wherein the base packet is generated by:
acquiring a preset file set corresponding to the game running data and a first preset file subset matched with the expansion data packet;
obtaining a second preset file subset aiming at the basic data packet according to the preset file set and each first preset file subset;
acquiring a first initial resource set corresponding to each first preset file subset and a second resource set corresponding to the second preset file subset;
taking game resources existing in the first initial resource set and the second resource set at the same time as target game resources;
removing the target game resource from the first initial resource set to generate a first target resource set;
and removing the first preset file subset and the first target resource set from the game running data to generate the basic data packet.
9. The method of claim 8, wherein the extension packet is generated by:
and generating the expansion data packet by adopting the first preset file subset and the first target resource set.
10. The method of claim 6, wherein obtaining the target base data packet for the application when the application is started comprises:
when the application program is started, acquiring the current version number of a local basic data packet and the target version number of the target basic data packet;
when the target version number is greater than the current version number, acquiring the target basic data packet and a target resource information list matched with the target basic data packet, wherein the target resource information list comprises a first target packet identifier of a first sub data packet in the target basic data packet;
the updating the basic resource of the application program according to the target basic data packet comprises:
acquiring a local resource information list of the application program, wherein the local resource information list comprises a first current packet identifier of a second sub data packet in a local basic data packet;
when the packet identifier matched with the first current packet identifier does not exist in the target resource information list, generating first resource deletion information aiming at the local basic data packet;
when the local resource information list does not have the packet identifier matched with the first target packet identifier, generating first resource downloading information aiming at the local basic data packet;
and updating the local basic data packet by adopting the first resource downloading information and the first resource deleting information.
11. The method according to claim 10, wherein the application includes a local extension data packet and an extension resource file list for the local extension data packet, the local extension data packet includes a target preset file set, the target resource information list includes a second target packet identifier of a third sub-packet in the target extension data packet, and the updating of the extension resources of the application according to the target extension data packet includes:
determining a fourth sub-data packet matched with the target preset file set, wherein the fourth sub-data packet corresponds to a second current packet identifier;
when the target resource information list does not have the packet identifier matched with the second current packet identifier, generating second resource deletion information aiming at the local expansion data packet;
when the expansion resource file list does not have the package identification matched with the second target package identification, second resource downloading information aiming at the local expansion data package is generated;
and updating the local expansion data packet by adopting the resource deleting information and the resource downloading information.
12. The method according to claim 11, wherein the target resource information list includes a target game resource identifier corresponding to a second target package identifier, and after determining a fourth sub-packet matching the target preset file set, the method performs extended resource update on the application program according to the target extended data packet, further comprising:
acquiring a current game resource identifier matched with the second current packet identifier;
when the packet identifier matched with the second current packet identifier does not exist in the target resource information list, generating second resource deletion information for the local expansion data packet, including:
when the game resource identifier matched with the current game resource identifier does not exist in the target resource information list, generating resource deletion information aiming at the local expansion data packet;
when the extension resource file list does not have the packet identifier matched with the second target packet identifier, generating second resource downloading information for the local extension data packet, including:
and when the game resource identifier matched with the target game resource identifier does not exist in the extended resource file list, generating resource downloading information aiming at the local extended data packet.
13. A data update apparatus for an application, wherein game execution data of the application includes a basic data packet and an extension data packet, the apparatus comprising:
the target basic data packet acquisition module is used for acquiring a target basic data packet aiming at the application program when the application program is started;
the basic resource updating module is used for updating the basic resources of the application program according to the target basic data packet;
the application program running module is used for running the application program according to the updated basic resource;
the target expansion data packet acquisition module is used for responding to an expansion data loading instruction aiming at the application program and acquiring a target expansion data packet matched with the expansion data loading instruction;
and the extended resource updating module is used for updating extended resources of the application program according to the target extended data packet.
14. An apparatus, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform the method of one or more of claims 1-12.
15. One or more machine readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of one or more of claims 1-12.
CN202010117644.4A 2020-02-25 2020-02-25 Data updating method and device for application program Active CN111367558B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010117644.4A CN111367558B (en) 2020-02-25 2020-02-25 Data updating method and device for application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010117644.4A CN111367558B (en) 2020-02-25 2020-02-25 Data updating method and device for application program

Publications (2)

Publication Number Publication Date
CN111367558A true CN111367558A (en) 2020-07-03
CN111367558B CN111367558B (en) 2023-11-17

Family

ID=71208288

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010117644.4A Active CN111367558B (en) 2020-02-25 2020-02-25 Data updating method and device for application program

Country Status (1)

Country Link
CN (1) CN111367558B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112023399A (en) * 2020-08-21 2020-12-04 上海完美时空软件有限公司 Game scene data processing method and device, storage medium and computer equipment
CN112169310A (en) * 2020-10-13 2021-01-05 网易(杭州)网络有限公司 Game resource loading method and device, computer equipment and storage medium
CN112882746A (en) * 2021-02-03 2021-06-01 网易(杭州)网络有限公司 Application program updating method and device, storage medium and computer equipment
WO2022105435A1 (en) * 2020-11-19 2022-05-27 完美世界(重庆)互动科技有限公司 Game resource data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511889A (en) * 2016-01-15 2016-04-20 珠海金山网络游戏科技有限公司 General game version incremental updating system and method
CN107205057A (en) * 2017-08-02 2017-09-26 无锡江南影视传播有限公司 A kind of game resource update method, device and client
US20180124156A1 (en) * 2016-11-02 2018-05-03 Gamesys Ltd. Loader and method for processing a resource bundle
CN109814884A (en) * 2018-12-27 2019-05-28 珠海西山居互动娱乐科技有限公司 A kind of method and system carrying out resource management according to game resource type

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105511889A (en) * 2016-01-15 2016-04-20 珠海金山网络游戏科技有限公司 General game version incremental updating system and method
US20180124156A1 (en) * 2016-11-02 2018-05-03 Gamesys Ltd. Loader and method for processing a resource bundle
CN107205057A (en) * 2017-08-02 2017-09-26 无锡江南影视传播有限公司 A kind of game resource update method, device and client
CN109814884A (en) * 2018-12-27 2019-05-28 珠海西山居互动娱乐科技有限公司 A kind of method and system carrying out resource management according to game resource type

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112023399A (en) * 2020-08-21 2020-12-04 上海完美时空软件有限公司 Game scene data processing method and device, storage medium and computer equipment
WO2022036903A1 (en) * 2020-08-21 2022-02-24 上海完美时空软件有限公司 Game scene data processing method and device, computer program, and readable medium
CN112169310A (en) * 2020-10-13 2021-01-05 网易(杭州)网络有限公司 Game resource loading method and device, computer equipment and storage medium
CN112169310B (en) * 2020-10-13 2024-06-11 网易(杭州)网络有限公司 Game resource loading method and device, computer equipment and storage medium
WO2022105435A1 (en) * 2020-11-19 2022-05-27 完美世界(重庆)互动科技有限公司 Game resource data processing method and device
CN112882746A (en) * 2021-02-03 2021-06-01 网易(杭州)网络有限公司 Application program updating method and device, storage medium and computer equipment
CN112882746B (en) * 2021-02-03 2023-07-07 网易(杭州)网络有限公司 Application program updating method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN111367558B (en) 2023-11-17

Similar Documents

Publication Publication Date Title
CN111367558A (en) Data updating method and device for application program
CN102438046B (en) A kind of karaoke song requesting system based on cloud computing and method for ordering song thereof
CN112114849B (en) Resource updating method and device
CN109766114A (en) A kind for the treatment of method and apparatus of patch file
CN110888658B (en) Method and device for dynamically changing function modules in application program and storage medium
CN113553140B (en) Resource scheduling method, equipment and system
CN104104645A (en) Cross-platform resource management method and system
CN114191822B (en) Test method, test device, computer equipment, storage medium and product
CN111736950A (en) Accelerator resource adding method of virtual machine and related device
CN110652728A (en) Game resource management method and device, electronic equipment and storage medium
CN111984293A (en) Information processing method, device and storage medium
CN116431193A (en) Program patch package packaging method and device, storage medium and electronic equipment
CN110035296A (en) Display methods, equipment and the readable storage medium storing program for executing of direct broadcasting room song information
CN113181652B (en) Game resource packaging method, system, device and storage medium
CN111586170B (en) Resource downloading method, device, equipment and computer readable storage medium
CN112691382A (en) Resource processing method, device and computer readable storage medium
CN104717569A (en) Data elimination method and device
CN110502351A (en) Based on the asynchronous loading method of Unity Internet resources and system
CN111346372A (en) Game login loading method and device based on data backup and server
CN110610371A (en) Latent user analysis method, system, and computer-readable storage medium
WO2024060874A1 (en) Device upgrading method, system, and apparatus, and computer-readable storage medium
CN115567455B (en) Access flow switching method and device, computer equipment and storage medium
CN117411915A (en) Device binding method and device, electronic device and computer storage medium
CN114244709B (en) UP equipment association control method and device
CN117119417A (en) Bluetooth connection method, device, electronic equipment 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