Resource storage method, resource acquisition method and related devices

By generating and storing differential data of resources, the problem of redundancy of resource data in traditional resource storage methods is solved, and more efficient storage space utilization is achieved.

CN119166192APending Publication Date: 2024-12-20BEIJING PIXEL SOFTWARE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411210207.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The traditional resource storage method has redundancy in resource data, resulting in a large storage space occupancy.

Method used

By obtaining resource configuration information of the resources to be stored, including parameter data sets, extended data sets and basic resource storage paths, differential data are generated and stored, and all configuration information is avoided, thereby reducing the storage space of resource data.

Benefits of technology

It effectively reduces the storage space of resource data and improves storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166192A_ABST
    Figure CN119166192A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a resource storage method, a resource acquisition method and a related device, and relates to the technical field of computers, and the resource storage method comprises the following steps: acquiring resource configuration information of a to-be-stored resource; the resource configuration information comprises a parameter data set, an extension data set and a basic resource storage path; the extended data set comprises difference parameter items, and the difference parameter items are parameter items with different parameter values in the to-be-stored resources and the basic resources; the basic resource storage path is a storage path of resource data of the basic resource, generating difference data of the to-be-stored resource according to the difference parameter item, the parameter value corresponding to the difference parameter item and the basic resource storage path, and storing the difference data. Therefore, by storing the difference part of the to-be-stored resource and the basic resource and the storage path of the basic resource, the situation that all configuration information of the to-be-stored resource is stored, so that the stored resource data is redundant is avoided, and the storage space occupied by the resource data can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a resource storage method, a resource acquisition method and related devices. Background Art

[0002] In 3D game development, resource configuration information is edited in advance. For example, a car has configuration information such as body, wheels, and color. After editing, the configuration information of a resource is stored as a resource data. Traditional resource storage stores the configuration information of each resource as a separate resource data. Since the configuration information of the same type of resources has the same parts, the traditional resource storage method has redundant resource data storage, resulting in the resource data occupying a large storage space. Summary of the invention

[0003] The purpose of the present invention is to provide a resource storage method, a resource acquisition method and related devices to solve the problem that the traditional resource storage method has redundant stored resource data, resulting in the resource data occupying a large storage space.

[0004] In a first aspect, the present invention provides a resource storage method, the method comprising:

[0005] Obtain resource configuration information of the resource to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resource to be stored; the extended data set includes difference parameter items, and the difference parameter items are parameter items whose parameter values ​​are different between the resource to be stored and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource;

[0006] The difference data of the resource to be stored is generated according to the difference parameter item, the parameter value corresponding to the difference parameter item and the basic resource storage path, and the difference data is stored; the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource constitute the resource data of the resource to be stored.

[0007] In an optional embodiment, the method further comprises:

[0008] Acquire modification configuration information of the resource to be stored; the modification configuration information includes modification parameter items and parameter values ​​corresponding to the modification parameter items;

[0009] Modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item;

[0010] If the modified parameter item does not exist in the extended data set, writing the modified parameter item as the difference parameter item into the extended data set to obtain an updated first extended data set;

[0011] The difference data of the resource to be stored is updated according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

[0012] In an optional embodiment, the method further comprises:

[0013] In response to a reset operation on the target difference parameter item of the resource to be stored, the target difference parameter item is deleted from the extended data set to obtain an updated second extended data set; wherein, after the reset operation is performed on the target difference parameter item, the parameter value corresponding to the target difference parameter item is the same as the parameter value of the corresponding parameter item in the basic resource;

[0014] The difference data of the resource to be stored is updated according to all the difference parameter items in the second extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

[0015] In a second aspect, the present invention provides a resource acquisition method, the method comprising:

[0016] Acquire differential data of a target resource; the differential data is generated according to resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes differential parameter items, the differential parameter items are parameter items whose parameter values ​​are different between the target resource and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource; the differential data includes the differential parameter items, the parameter values ​​corresponding to the differential parameter items and the basic resource storage path;

[0017] Acquire resource data of the basic resource according to the basic resource storage path;

[0018] The resource data of the target resource is obtained according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource.

[0019] In an optional implementation manner, obtaining the resource data of the target resource according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource includes:

[0020] The parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource is modified to the parameter value corresponding to the difference parameter item, so as to obtain the resource data of the target resource.

[0021] In a third aspect, the present invention provides a resource storage device, the device comprising:

[0022] A resource configuration information acquisition module, used to acquire resource configuration information of resources to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resources to be stored; the extended data set includes difference parameter items, and the difference parameter items are parameter items whose parameter values ​​are different between the resources to be stored and the basic resources; the basic resource storage path is a storage path of resource data of the basic resources;

[0023] A resource storage module is used to generate difference data of the resources to be stored according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path, and store the difference data; the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resources constitute the resource data of the resources to be stored.

[0024] In an optional embodiment, the device further comprises:

[0025] A modification configuration information acquisition module, used to acquire the modification configuration information of the resource to be stored; the modification configuration information includes a modification parameter item and a parameter value corresponding to the modification parameter item;

[0026] A parameter value modification module, used to modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item;

[0027] a difference parameter item writing module, configured to write the modified parameter item as the difference parameter item into the extended data set if the modified parameter item does not exist in the extended data set, so as to obtain an updated first extended data set;

[0028] The difference data updating module is used to update the difference data of the resource to be stored according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items and the basic resource storage path.

[0029] In a fourth aspect, the present invention provides a resource acquisition device, the device comprising:

[0030] A difference data acquisition module, used to acquire difference data of a target resource; the difference data is generated according to resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes difference parameter items, the difference parameter items are parameter items with different parameter values ​​between the target resource and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource; the difference data includes the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path;

[0031] A basic resource acquisition module, used to acquire resource data of the basic resource according to the basic resource storage path;

[0032] The target resource acquisition module is used to obtain the resource data of the target resource according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource.

[0033] In a fifth aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores a computer program executable by the processor, and the computer program executable by the processor is used to implement the game resource storage method described in any of the aforementioned embodiments or the game resource acquisition method described in any of the aforementioned embodiments.

[0034] In a sixth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the game resource storage method as described in any of the aforementioned embodiments or the game resource acquisition method as described in any of the aforementioned embodiments is implemented.

[0035] The resource storage method, resource acquisition method and related device provided by the embodiment of the present invention, the resource storage method comprises: acquiring resource configuration information of the resource to be stored; the resource configuration information comprises a parameter data set, an extended data set and a basic resource storage path; the parameter data set comprises parameter values ​​corresponding to different parameter items of the resource to be stored; the extended data set comprises a difference parameter item, and the difference parameter item is a parameter item with different parameter values ​​between the resource to be stored and the basic resource; the basic resource storage path is a storage path of the resource data of the basic resource, and the difference data of the resource to be stored is generated according to the difference parameter item, the parameter value corresponding to the difference parameter item and the basic resource storage path, and the difference data is stored; the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource constitute the resource data of the resource to be stored. Therefore, by storing the difference part between the resource to be stored and the basic resource and the storage path of the basic resource, it is avoided that all configuration information of the resource to be stored is stored, resulting in the redundant storage of resource data, thereby reducing the storage space occupied by the resource data. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0037] Figure 1 A schematic diagram of a process of a resource storage method provided by an embodiment of the present invention is shown;

[0038] Figure 2 A schematic diagram showing resource data of basic resources provided by an embodiment of the present invention;

[0039] Figure 3 A schematic diagram showing difference data of resources to be stored provided by an embodiment of the present invention is shown;

[0040] Figure 4 Another schematic diagram of a process of a resource storage method provided by an embodiment of the present invention is shown;

[0041] Figure 5 Another schematic diagram of a process of a resource storage method provided by an embodiment of the present invention is shown;

[0042] Figure 6 A schematic diagram of a process of a resource acquisition method provided by an embodiment of the present invention is shown;

[0043] Figure 7 A module block diagram of a resource storage device provided by an embodiment of the present invention is shown;

[0044] Figure 8 A module block diagram of a resource acquisition device provided by an embodiment of the present invention is shown;

[0045] Fig. 9 A block diagram of an electronic device provided by an embodiment of the present invention is shown.

[0046] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication module; 200 - resource storage device; 210 - resource configuration information acquisition module; 220 - resource storage module; 300 - resource acquisition device; 310 - difference data acquisition module; 320 - basic resource acquisition module; 330 - target resource acquisition module. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0048] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0050] See also Figure 1 , Figure 1 A schematic diagram of a resource storage method provided by an embodiment of the present invention is shown. The resource storage method can be applied to electronic devices. The specific process of this embodiment is described below using electronic devices as an example. Figure 1 The process shown is described in detail, and the resource storage method may specifically include the following steps:

[0051] Step 110: Obtain resource configuration information of the resources to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resources to be stored; the extended data set includes difference parameter items, which are parameter items with different parameter values ​​between the resources to be stored and the basic resources; the basic resource storage path is the storage path of the resource data of the basic resources.

[0052] In some embodiments, before obtaining resource configuration information of the resources to be stored, the electronic device can obtain resource configuration information of the basic resources, the resource configuration information of the basic resources includes a parameter data set, generates resource data of the basic resources based on the parameter data set, stores the resource data of the basic resources, and records the storage path of the basic resources, so that when the resource configuration information of the storage path is edited, the basic resource storage path can be written into the resource configuration information of the resources to be stored.

[0053] It should be noted that the resource to be stored and the basic resource are the same object with different configurations. For example, the basic resource is a blue car, and the resource to be stored is a red car. The parameter items in the parameter data set of the resource configuration information of the resource to be stored are the same as the parameter items in the parameter data set of the resource configuration information of the basic resource, but the parameter values ​​corresponding to the same parameter items may be different. The storage path of the basic resource included in the configuration information of the basic resource and the extended data set are empty.

[0054] For example, the basic resource is a white table, and the resource to be stored is a black table;

[0055] The resource configuration information (DeskinfoA) of the basic resource is:

[0056] {paramDescArray = {color: white; length * width * height = 60 * 80 * 90};

[0057] extendedDataSet(CustomParams) = null;

[0058] Basic resource storage path = empty}.

[0059] The resource configuration information (DeskinfoB) of the resource to be stored is:

[0060] {ParamDescArray = {color = black; length * width * height = 60 * 80 * 90};

[0061] extendedDataSet(CustomParams) = {color};

[0062] Basic resource storage path = DeskinfoA's storage path}.

[0063] Step 120: Generate difference data of the resources to be stored according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path, and store the difference data; the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resources constitute the resource data of the resources to be stored.

[0064] The difference data of the resources to be stored can be a json file, an XML file, a YAML file, etc. The specific storage format is set according to the actual application. The parameter item can be a template type pointer so that each parameter item can implement the corresponding function according to its own type. The data type of the parameter value can be a floating point number, an integer, a string, etc., which is not limited here.

[0065] It should be noted that the resource configuration information of the resources to be stored is the data stored in the memory, and the difference data of the resources to be stored is the data stored in the hard disk. It can be understood that when the user edits the resource configuration information of the resources to be stored in the game editor, the electronic device writes the resource configuration information of the resources to be stored into the memory, and the data in the memory can quickly respond to the user's input, allowing the user to immediately see the effect of the resource editing, and real-time editing and preview can be achieved. After the editing is completed, the difference data of the data to be stored is generated according to the resource configuration information of the resources to be stored, and the difference data of the resources to be stored is stored in the hard disk.

[0066] Figure 2 The specific content of the resource data of the basic resource is shown in Figure 3 The specific content of the difference data of the resource to be stored is shown in Figure 2 The parameter value of the basic resource parameter item "CullMode" is 1. Figure 3 The difference data of the resource to be stored in the , contains the basic resource storage path "ActorCombinedName" and the difference parameter item "CullMode", and the parameter value of the difference parameter item "CullMode" is 2. If the traditional resource storage method is used, the difference data of the resource to be stored should be the same as Figure 2 The data size in is the same, according to the above resource storage method, Figure 3 The difference data of the resources to be stored in the resource storage method is smaller than the data stored by the traditional resource storage method.

[0067] The resource storage method provided by the embodiment of the present invention obtains resource configuration information of resources to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resources to be stored; the extended data set includes a difference parameter item, and the difference parameter item is a parameter item with different parameter values ​​between the resources to be stored and the basic resources; the basic resource storage path is a storage path of resource data of the basic resource, and the difference data of the resources to be stored is generated according to the difference parameter item, the parameter value corresponding to the difference parameter item and the basic resource storage path, and the difference data is stored; the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource constitute the resource data of the resources to be stored. Therefore, by storing the difference between the resources to be stored and the basic resources and the storage path of the basic resources, it is avoided that all configuration information of the resources to be stored is stored, resulting in redundant stored resource data, thereby reducing the storage space occupied by the resource data.

[0068] In some implementations, the user may modify the resource configuration information of the storage resource according to the actual situation. For example, in the process of game development, the game developer may modify the resource configuration information of the storage resource according to the feedback of the players to improve the game experience of the players, such as Figure 4 As shown, the specific steps for storing the modified resource configuration information of the resource to be stored are as follows:

[0069] Step 130: Acquire modification configuration information of the resource to be stored; the modification configuration information includes modification parameter items and parameter values ​​corresponding to the modification parameter items.

[0070] In some implementations, the user may modify the modified configuration information of the resources to be stored in the game editor, and the electronic device obtains the modified configuration information of the resources to be stored in response to the user's modification operation.

[0071] As an implementation method, a configuration information modification page will be displayed in the game editor, and the user can enter the modification parameter items that need to be modified for the resources to be stored and the parameter values ​​corresponding to the modification parameter items in the configuration information modification page. The electronic device can respond to the user's input operation to obtain the modification parameter items of the resources to be stored and the parameter values ​​corresponding to the modification parameter items.

[0072] Step 140: modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item.

[0073] For example, the modified configuration information of the resource to be stored is the modified parameter item (parameter item 1) = C, the parameter data set of the resource to be stored = {parameter item 1 = A; parameter item 2 = B}, and the modified parameter data set of the resource to be stored = {parameter item 1 = C; parameter item 2 = B}.

[0074] Step 150: If the modified parameter item does not exist in the extended data set, the modified parameter item is written into the extended data set as a difference parameter item to obtain an updated first extended data set.

[0075] For example, the modified configuration information of the resource to be stored is to modify the parameter item (parameter item 2) = B1,

[0076] The configuration information of the resources to be stored is:

[0077] Parameter data set = {parameter item 1 = A; parameter item 2 = B; parameter item 3 = C; parameter item 4 = D};

[0078] Extended dataset = {parameter item 1};

[0079] Basic resource storage path = path X.

[0080] The modified parameter item (parameter item 2) does not exist in the extended data set, and the modified parameter item is written into the extended data set as a difference parameter item, so that the updated first extended data set is {parameter item 1; parameter item 2}.

[0081] Step 160: Update the difference data of the resources to be stored according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

[0082] In some embodiments, the electronic device may generate new difference data for the data to be stored based on all difference parameter items in the first extended data set, parameter values ​​corresponding to all difference parameter items, and a basic resource storage path, delete the difference data for the data to be stored, and store the new difference data for the data to be stored.

[0083] It should be noted that if there is a modified parameter item in the extended data set, indicating that the modified parameter item is a parameter item whose parameter value is different between the resource to be stored and the basic resource, then there is no need to write the modified parameter item into the extended data set, and the updated first extended data set will not be obtained, and there is no need to update the difference data of the resource to be stored according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path. It is understandable that if there is a problem when modifying the resource configuration information of the resource to be stored, the original difference data is still stored on the hard disk, and the difference data can be reloaded and edited again. There is no need to re-edit the resource configuration information of the resource to be stored, so as to prevent the resource configuration information of the resource to be stored from being damaged and ensure the security of the resource configuration information of the resource to be stored.

[0084] In some implementations, the user can reset the parameter value of the parameter item of the storage resource according to the actual situation. For example, in the process of game development, the game developer can reset the parameter value of the parameter item of the storage resource according to the actual development situation, such as Figure 5 As shown, the specific steps for storing the configuration information of the reset resources to be stored are as follows:

[0085] Step 170: In response to a reset operation on a target difference parameter item of a resource to be stored, the target difference parameter item is deleted from the extended data set to obtain an updated second extended data set; wherein, after the reset operation is performed on the target difference parameter item, the parameter value corresponding to the target difference parameter item is the same as the parameter value of the corresponding parameter item in the basic resource.

[0086] In some implementations, a user may reset the target difference parameter item for the storage resource in the game editor, and the electronic device may respond to the reset operation of the target difference parameter item for the storage resource by deleting the target difference parameter item from the extended data set to obtain an updated second extended data set.

[0087] As an implementation method, a parameter item reset page may be displayed in the game editor, and the user may click the reset operation control corresponding to the target difference parameter item in the parameter item reset page, and the electronic device may respond to the reset operation of the target difference parameter item for the storage resource.

[0088] For example, the target difference parameter item is parameter item 4, the extended data set of the resource to be stored is {parameter item 1; parameter item 4}, and the updated second extended data set is {parameter item 1}.

[0089] It is understandable that after deleting the target difference parameter item from the extended data set, the target difference parameter item is no longer a difference parameter item, and the target difference parameter item will not be stored in subsequent storage. When the resource data of the resource to be stored is obtained, the parameter value of the target difference parameter item of the resource to be stored is the parameter value of the parameter item corresponding to the basic resource. For example, if parameter item 1 of the basic resource = A, the target parameter item (parameter item 1) of the resource to be stored = A.

[0090] Step 180: Update the difference data of the resources to be stored according to all the difference parameter items in the second extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

[0091] The resource storage method provided by the embodiment of the present invention is based on the resource data of the basic resource, and stores the difference data of the resource to be stored. If the parameter value of the parameter item that is the same as the basic resource and the resource to be stored needs to be modified, only the resource data of the basic resource needs to be modified, and there is no need to modify the resource data of each resource to be stored, thereby improving the efficiency of users in modifying configuration information during the resource production process.

[0092] In some implementations, the electronic device may generate new difference data of the data to be stored based on all difference parameter items in the second extended data set, parameter values ​​corresponding to all difference parameter items, and the basic resource storage path, delete the difference data of the data to be stored, and store the new difference data of the data to be stored. Figure 6 , Figure 6 A schematic diagram of a process flow of a resource acquisition method provided by an embodiment of the present invention is shown. The resource acquisition method can be applied to electronic devices. The specific process of this embodiment is described below using electronic devices as an example. Figure 6 The process shown is described in detail, and the resource acquisition method may specifically include the following steps:

[0093] Step 210: Obtain differential data of the target resource; the differential data is generated according to the resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes differential parameter items, and the differential parameter items are parameter items with different parameter values ​​between the target resource and the basic resource; the basic resource storage path is the storage path of the resource data of the basic resource; the differential data includes differential parameter items, parameter values ​​corresponding to the differential parameter items and the basic resource storage path.

[0094] In some implementations, when a target resource is established during game execution, the electronic device may obtain difference data of the target resource.

[0095] Step 220: Obtain resource data of the basic resource according to the basic resource storage path.

[0096] Step 230: Obtain resource data of the target resource according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resource.

[0097] In some implementations, the parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource is modified to the parameter value corresponding to the difference parameter item to obtain the resource data of the target resource.

[0098] In some embodiments, when establishing a target resource, a parameter data set and an extended data set are simultaneously constructed in the memory. At this time, the parameter data set includes different parameter items of the target resource, each parameter item does not have a corresponding specific parameter value, and there is no difference parameter item in the extended data set. The difference data of the target resource is first obtained according to the storage address of the target resource to be obtained, and then the resource data of the basic resource is obtained according to the storage path of the basic resource. According to the parameter data set included in the resource data of the basic resource, the specific parameter value of each parameter item is written into the corresponding parameter item in the parameter data set of the target resource, and then the parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource is modified to the parameter value corresponding to the difference parameter item, and the difference parameter item is written into the extended data set of the target resource to obtain the resource data of the target resource.

[0099] For example, when establishing a target resource, a parameter data set = {parameter item 1 =; parameter item 2 =} and an extended data set = {} are simultaneously constructed in the memory, and the difference data of the target resource is obtained according to the storage address of the target resource to be obtained. The difference data includes: the basic resource storage path and parameter item 1 (difference parameter item) = A1, and then the resource data of the basic resource is obtained according to the basic resource storage path in the difference data.

[0100] The resource data of the basic resource is:

[0101] {parameter data set = {parameter item 1 = A; parameter item 2 = B; parameter item 3 = C; parameter item 4 = D};

[0102] extended_dataset = null;

[0103] Basic resource storage path = null};

[0104] According to the parameter data set included in the resource data of the basic resource, the specific parameter value of each parameter item is written into the corresponding parameter item in the parameter data set of the target resource. The parameter data set of the target resource = {parameter item 1 = A; parameter item 2 = B; parameter item 3 = C; parameter item 4 = D}. The parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource is modified to the parameter value corresponding to the difference parameter item. The modified parameter data set of the target resource = {parameter item 1 = A1; parameter item 2 = B; parameter item 3 = C; parameter item 4 = D}. The difference parameter item is written into the extended data set of the target resource. The extended data set = {parameter item 1}. The resource data of the target resource is obtained as follows:

[0105] {parameter data set = {parameter item 1 = A1; parameter item 2 = B; parameter item 3 = C; parameter item 4 = D};

[0106] Extended dataset = {parameter item 1};

[0107] Basic resource storage path = resource data storage path of basic resource}.

[0108] The resource acquisition method provided by the embodiment of the present invention acquires differential data of a target resource; the differential data is generated according to resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes differential parameter items, the differential parameter items are parameter items with different parameter values ​​between the target resource and the basic resource; the basic resource storage path is the storage path of resource data of the basic resource; the differential data includes differential parameter items, parameter values ​​corresponding to the differential parameter items and the basic resource storage path; the resource data of the basic resource is acquired according to the basic resource storage path, the resource data of the target resource is obtained according to the differential parameter items, the parameter values ​​corresponding to the differential parameter items and the resource data of the basic resource, the data of the target resource can be obtained by acquiring the resource data of the basic resource and the data of the difference between the target resource and the basic resource, thereby avoiding repeated acquisition of data and improving the resource loading speed.

[0109] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a resource storage device is given below. Figure 7 , is a functional module diagram of a resource storage device provided by an embodiment of the present invention. It should be noted that the basic principle and technical effects of the resource storage device provided by this embodiment are the same as those of the above embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. The resource storage device 200 includes: a resource configuration information acquisition module 210 and a resource storage module 220, wherein:

[0110] The resource configuration information acquisition module 210 is used to obtain the resource configuration information of the resources to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resources to be stored; the extended data set includes difference parameter items, and the difference parameter items are parameter items with different parameter values ​​between the resources to be stored and the basic resources; the basic resource storage path is the storage path of the resource data of the basic resources.

[0111] The resource storage module 220 is used to generate difference data of the resources to be stored according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path, and store the difference data; the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resources constitute the resource data of the resources to be stored.

[0112] Furthermore, the resource storage device 200 further includes: a configuration information modification acquisition module, a parameter value modification module, a difference parameter item writing module and a difference data updating module, wherein:

[0113] A modification configuration information acquisition module is used to acquire modification configuration information of resources to be stored; the modification configuration information includes modification parameter items and parameter values ​​corresponding to the modification parameter items;

[0114] A parameter value modification module, used to modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item;

[0115] a difference parameter item writing module, configured to write the modified parameter item as a difference parameter item into the extended data set if the modified parameter item does not exist in the extended data set, so as to obtain an updated first extended data set;

[0116] The difference data updating module is used to update the difference data of the resources to be stored according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items and the basic resource storage path.

[0117] Furthermore, the resource storage device 200 further includes: a parameter item resetting module, wherein:

[0118] A parameter item reset module is used to respond to a reset operation on a target difference parameter item of a storage resource, delete the target difference parameter item from an extended data set, and obtain an updated second extended data set; wherein, after the reset operation is performed on the target difference parameter item, the parameter value corresponding to the target difference parameter item is the same as the parameter value of the corresponding parameter item in the basic resource.

[0119] The difference data updating module is further specifically used to update the difference data of the resources to be stored according to all the difference parameter items in the second extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

[0120] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a resource acquisition device is provided below. Figure 8 , is a functional module diagram of a resource acquisition device provided by an embodiment of the present invention. It should be noted that the basic principle and technical effects of the resource acquisition device provided by this embodiment are the same as those of the above embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. The resource acquisition device 300 includes: a difference data acquisition module 310, a basic resource acquisition module 320 and a target resource acquisition module 330, wherein:

[0121] The difference data acquisition module 310 is used to acquire the difference data of the target resource; the difference data is generated according to the resource configuration information of the target resource, and the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes difference parameter items, and the difference parameter items are parameter items with different parameter values ​​between the target resource and the basic resource; the basic resource storage path is the storage path of the resource data of the basic resource; the difference data includes difference parameter items, parameter values ​​corresponding to the difference parameter items and the basic resource storage path.

[0122] The basic resource acquisition module 320 is used to acquire resource data of the basic resource according to the basic resource storage path.

[0123] The target resource acquisition module 330 is used to obtain the resource data of the target resource according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resource.

[0124] Furthermore, the target resource acquisition module 330 is specifically configured to modify the parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource to the parameter value corresponding to the difference parameter item, so as to obtain the resource data of the target resource.

[0125] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0126] In several embodiments provided by the present invention, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0127] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of software functional modules.

[0128] Please refer to Fig. 9 , is a block diagram of an electronic device 100 provided in an embodiment of the present invention. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0129] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0130] The processor 120 is used to read / write data or programs stored in the memory and execute corresponding functions. For example, when the computer program stored in the memory 110 is executed by the processor 120, the resource storage method or resource acquisition method disclosed in the above embodiments can be implemented.

[0131] The communication module 130 is used to establish a communication connection between the electronic device 100 and a server through a network, and to send and receive data through the network.

[0132] It should be understood that Fig. 9 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Fig. 9 More or fewer components may be shown. Fig. 9 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0133] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program can be executed by a processor, the resource storage method or resource acquisition method described in the above method embodiment is implemented.

[0134] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program codes that execute any of the method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.

[0135] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a module, a program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0136] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0137] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A resource storage method, characterized in that: The method comprises: Obtain resource configuration information of the resource to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resource to be stored; the extended data set includes difference parameter items, and the difference parameter items are parameter items whose parameter values ​​are different between the resource to be stored and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource; The difference data of the resource to be stored is generated according to the difference parameter item, the parameter value corresponding to the difference parameter item and the basic resource storage path, and the difference data is stored; the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource constitute the resource data of the resource to be stored.

2. The method according to claim 1, characterized in that The method further comprises: Acquire modification configuration information of the resource to be stored; the modification configuration information includes modification parameter items and parameter values ​​corresponding to the modification parameter items; Modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item; If the modified parameter item does not exist in the extended data set, writing the modified parameter item as the difference parameter item into the extended data set to obtain an updated first extended data set; The difference data of the resource to be stored is updated according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

3. The method according to claim 1, characterized in that The method further comprises: In response to a reset operation on the target difference parameter item of the resource to be stored, the target difference parameter item is deleted from the extended data set to obtain an updated second extended data set; wherein, after the reset operation is performed on the target difference parameter item, the parameter value corresponding to the target difference parameter item is the same as the parameter value of the corresponding parameter item in the basic resource; The difference data of the resource to be stored is updated according to all the difference parameter items in the second extended data set, the parameter values ​​corresponding to all the difference parameter items, and the basic resource storage path.

4. A resource acquisition method, characterized in that: The method comprises: Acquire differential data of a target resource; the differential data is generated according to resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes differential parameter items, the differential parameter items are parameter items whose parameter values ​​are different between the target resource and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource; the differential data includes the differential parameter items, the parameter values ​​corresponding to the differential parameter items and the basic resource storage path; Acquire resource data of the basic resource according to the basic resource storage path; The resource data of the target resource is obtained according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource.

5. The method according to claim 4, characterized in that The obtaining the resource data of the target resource according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource includes: The parameter value of the parameter item corresponding to the difference parameter item in the resource data of the basic resource is modified to the parameter value corresponding to the difference parameter item, so as to obtain the resource data of the target resource.

6. A resource storage device, characterized in that: The device comprises: A resource configuration information acquisition module, used to acquire resource configuration information of resources to be stored; the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the resources to be stored; the extended data set includes difference parameter items, and the difference parameter items are parameter items whose parameter values ​​are different between the resources to be stored and the basic resources; the basic resource storage path is a storage path of resource data of the basic resources; A resource storage module is used to generate difference data of the resources to be stored according to the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path, and store the difference data; the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the resource data of the basic resources constitute the resource data of the resources to be stored.

7. The device according to claim 6, characterized in that The device also includes: A modification configuration information acquisition module, used to acquire the modification configuration information of the resource to be stored; the modification configuration information includes a modification parameter item and a parameter value corresponding to the modification parameter item; A parameter value modification module, used to modify the parameter value of the parameter item corresponding to the modified parameter item in the parameter data set to the parameter value corresponding to the modified parameter item; a difference parameter item writing module, configured to write the modified parameter item as the difference parameter item into the extended data set if the modified parameter item does not exist in the extended data set, so as to obtain an updated first extended data set; The difference data updating module is used to update the difference data of the resource to be stored according to all the difference parameter items in the first extended data set, the parameter values ​​corresponding to all the difference parameter items and the basic resource storage path.

8. A resource acquisition device, characterized in that: The device comprises: A difference data acquisition module, used to acquire difference data of a target resource; the difference data is generated according to resource configuration information of the target resource, the resource configuration information includes a parameter data set, an extended data set and a basic resource storage path; the parameter data set includes parameter values ​​corresponding to different parameter items of the target resource; the extended data set includes difference parameter items, the difference parameter items are parameter items with different parameter values ​​between the target resource and the basic resource; the basic resource storage path is a storage path of resource data of the basic resource; the difference data includes the difference parameter items, the parameter values ​​corresponding to the difference parameter items and the basic resource storage path; A basic resource acquisition module, used to acquire resource data of the basic resource according to the basic resource storage path; The target resource acquisition module is used to obtain the resource data of the target resource according to the difference parameter item, the parameter value corresponding to the difference parameter item and the resource data of the basic resource.

9. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and the computer program executable by the processor is used to implement the game resource storage method described in any one of claims 1-4 or the game resource acquisition method described in any one of claims 4-5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the game resource storage method according to any one of claims 1 to 4 or the game resource acquisition method according to any one of claims 4 to 5 is implemented.