A method, apparatus, electronic device, and storage medium for updating data.

By receiving update notifications and obtaining the target file set using the target version number, and calling configuration readers for both dynamic and non-dynamic languages ​​to collaboratively read the files, the interruption problem caused by client data updates was resolved, achieving efficient hot updates of game data.

CN116510310BActive Publication Date: 2026-11-17BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310480178.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2026-11-17
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

When client data is updated, existing technologies require recompiling and restarting both the client and server, which can cause interruptions or freezes and affect normal operation.

Method used

By receiving update notifications, obtaining a set of target files using the target version number, and calling configuration readers for dynamic and/or non-dynamic language types to collaboratively read the files based on the file type, hot updates of game data are achieved.

Benefits of technology

This allows data updates to be completed without closing the client, avoiding game interruptions, improving update efficiency, reducing memory usage, and ensuring game stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116510310B_ABST
    Figure CN116510310B_ABST
Patent Text Reader

Abstract

This disclosure provides a data updating method, apparatus, electronic device, and storage medium. The method includes: receiving an update notification, wherein the update notification includes a target version number of the data to be updated; obtaining a target file set using the target version number, obtaining the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types; according to the file types, calling the configuration reader corresponding to different file types to read the files, obtaining the reading results, and updating the data based on the reading results. The method provided by this disclosure, by calling the configuration reader corresponding to the dynamic language type and / or non-dynamic language type to collaboratively read files in the target file set, not only enables rapid reading of updated content but also achieves hot updates of game data, effectively improving the problem of game interruption caused by game data updates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for updating data. Background Technology

[0002] Currently, when updating client data, in order to synchronize the client and server with the updated data, the code that reads the configuration data usually changes when new configuration data is added. This requires recompiling and restarting the client and server for the changes to take effect, which can cause interruptions or lag in the running client and affect normal operation. Summary of the Invention

[0003] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a data updating method, apparatus, electronic device and storage medium.

[0004] According to one aspect of the embodiments of this disclosure, a data updating method is also provided, the method being applied to a gaming device, the method comprising:

[0005] Receive an update notification, wherein the update notification includes the target version number of the data to be updated;

[0006] A set of target files is obtained using the target version number, wherein the set of target files is generated based on the update content corresponding to the target version number;

[0007] Obtain the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types;

[0008] Based on the file type, the corresponding configuration reader for each file type is invoked to read the file, the reading result is obtained, and the data is updated based on the reading result.

[0009] According to another aspect of the present disclosure, a data updating method is provided, the method being applied to a target device, the method comprising:

[0010] Get the target version number of the data to be updated;

[0011] Based on the game configuration table, the update content between the target version number and the original version number is determined, wherein the game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the differential configuration definition; or, the update content includes the differential configuration definition and the differential configuration data.

[0012] Obtain a set of target files, wherein the set of target files includes: original files and updated files, wherein the original files are of a non-dynamic language type, and the updated files are generated based on the updated content, and the updated files are of a non-dynamic language type; or, the updated files are of a non-dynamic language type and a dynamic language type.

[0013] An update notification is sent to the receiving device to enable the receiving device to update data using the target file set, wherein the update notification is generated based on the target version number.

[0014] According to another aspect of the embodiments of this disclosure, a data updating apparatus is also provided, comprising:

[0015] A receiving module is used to receive update notifications, wherein the update notification includes the target version number of the data to be updated;

[0016] The acquisition module is used to acquire a set of target files using the target version number, wherein the set of target files is generated based on the update content corresponding to the target version number;

[0017] The processing module is used to obtain the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types;

[0018] The execution module is used to call the configuration reader corresponding to the different file types to read the file according to the file type, obtain the reading result, and update the data based on the reading result.

[0019] According to another aspect of the embodiments of this disclosure, a data updating apparatus is also provided, comprising:

[0020] The acquisition module is used to obtain the target version number of the data to be updated;

[0021] The reading module is used to determine the update content between the target version number and the original version number based on the game configuration table, wherein the game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the differential configuration definition; or, the update content includes the differential configuration definition and the differential configuration data.

[0022] A processing module is used to obtain a set of target files, wherein the set of target files includes: original files and updated files, wherein the file type of the original files is a non-dynamic language type, and the updated files are generated based on the updated content, and the file type of the updated files includes: a non-dynamic language type; or, the file type of the updated files includes: a non-dynamic language type and a dynamic language type;

[0023] The sending module is used to send an update notification to the receiving device so that the receiving device can update the data using the target file set, wherein the update notification is generated based on the target version number.

[0024] According to another aspect of the embodiments of this disclosure, a storage medium is also provided, the storage medium including a stored program that executes the above steps when the program is run.

[0025] According to another aspect of the present disclosure, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the programs stored in the memory.

[0026] This disclosure also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the above-described method.

[0027] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The method provided in this disclosure calls the configuration reader corresponding to the dynamic language type and / or the non-dynamic language type to collaboratively read the files in the target file set. This not only enables fast reading of updated content, but also realizes hot updates of game data, effectively improving the problem of game interruption caused by game data updates. Attached Figure Description

[0028] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0029] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 Flowcharts of data updating methods provided in some embodiments of this disclosure;

[0031] Figure 2 Flowcharts of data updating methods provided in some embodiments of this disclosure;

[0032] Figure 3 Flowcharts of data updating methods provided in some embodiments of this disclosure;

[0033] Figure 4 A schematic diagram illustrating the data update process provided in some embodiments of this disclosure;

[0034] Figure 5 A block diagram of a data updating apparatus provided in some embodiments of this disclosure;

[0035] Figure 6 A block diagram of a data updating apparatus provided in some embodiments of this disclosure;

[0036] Figure 7 This is a schematic diagram of the structure of an electronic device provided in some embodiments of this disclosure. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. The illustrative embodiments and their descriptions are used to explain this disclosure and do not constitute an improper limitation of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0038] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another similar entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0039] This disclosure provides a data updating method, apparatus, electronic device, and storage medium. The method provided by this invention can be applied to any electronic device as needed, such as a server, terminal, or other electronic device. No specific limitation is made here, and for ease of description, it will be referred to as an electronic device below.

[0040] According to one aspect of the present disclosure, a method embodiment of a data updating method is provided. Figure 1 A flowchart of a data updating method provided in an embodiment of this disclosure is shown below. Figure 1 As shown, the method includes:

[0041] Step S11: Obtain the target version number of the data to be updated.

[0042] The method provided in this disclosure is applied to a sending device, which can be a device capable of game design or game publishing. Specifically, the sending device can receive a game publishing task, then read the target version number of the data to be updated from the game publishing task, subsequently use the target version number to obtain the update content of the data to be updated, and export the game update content as a file in a specified format for easy reading by game devices.

[0043] Step S12: Based on the game configuration table, determine the update content between the target version number and the original version number. The game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the difference configuration definition; or, the update content includes the difference configuration definition and the difference configuration data.

[0044] In this embodiment of the disclosure, the game configuration table can be configured by the developers according to the content of each game update. The game configuration table includes the game configuration corresponding to each version number. The game configuration includes: configuration definition and configuration data, for example: version number 1.0 - game configuration (configuration definition P1, configuration data Q1), version number 1.1 - game configuration (configuration definition P2, configuration data Q2).

[0045] In this embodiment of the disclosure, the game configuration corresponding to the target version number and the game configuration corresponding to the original version number are obtained from the game configuration table. The game configuration of the target version number is compared with the game configuration of the currently used version number to obtain the update content. The original version number can be understood as the currently used version number.

[0046] Step S13: Obtain the target file set, which includes: original files and updated files. The original files are of non-dynamic language type, and the updated files are generated based on the updated content. The updated files are of non-dynamic language type; or, the updated files are of both non-dynamic language type and dynamic language type.

[0047] In this embodiment of the disclosure, obtaining the target file set includes: firstly, determining the file export strategy using the updated content, wherein when the updated content only includes differential configuration data, the file export strategy is: importing the game configuration corresponding to the original version number as the original file, and exporting the differential configuration data as a patch file.

[0048] When the update includes differential configuration definitions and differential configuration data, the file export strategy is as follows: export the game configuration corresponding to the original version number as the original file, export the configuration definition as a script file, and export the differential configuration data as a patch file. Next, the update content is exported as corresponding files according to the file export strategy, and finally, a target file set is constructed based on the exported files.

[0049] In this embodiment of the disclosure, the target file set includes original files and patch files, wherein the patch files serve as update files. At this time, both the original files and patch files are binary files, so it can be determined that the file types of both the original files and update files are non-dynamic language types.

[0050] In this embodiment of the disclosure, the target file set includes original files, patch files, and script files. The patch files and script files are used as update files. At this time, the original files and patch files are both binary files, and the script files are Lua files. Therefore, it can be determined that the file types of the original files and update files are both non-dynamic language types, while the script files are dynamic language types.

[0051] Step S14: Send an update notification to the receiving device so that the receiving device can update the data using the target file set, wherein the update notification is generated based on the target version number.

[0052] In this embodiment of the disclosure, after obtaining the target file set, the target device stores the target file set. Specifically, the storage process may involve storing the target version number and the target file set to a Content Delivery Network (CDN), enabling devices with the game client installed to retrieve the target file set from the CDN server for data updates. Simultaneously, the target version number and the target file set are also stored in a designated directory on the server, allowing the server corresponding to the game client to update its data.

[0053] In this embodiment of the disclosure, after storing the target file set, the target device generates an update notification using the target version number and sends the update notification to the receiving device. The receiving device includes a server and a smart device with the game client installed. The receiving device uses the target version number to obtain the target file set and uses the target file set to update the data.

[0054] The method provided in this disclosure can export a target file set containing different files based on different update content. This facilitates subsequent game devices to select the appropriate configuration reader to read the update content based on the different file types in the target file set, thereby improving the reading efficiency of update content and enabling hot updates of game data.

[0055] Figure 2 A flowchart of a data updating method provided in an embodiment of this disclosure is shown below. Figure 2 As shown, the method includes:

[0056] Step S21: Obtain the target version number of the data to be updated. For detailed explanation, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.

[0057] Step S22: Based on the game configuration table, determine the update content between the target version number and the original version number. The game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the difference configuration definition; or, the update content includes the difference configuration definition and the difference configuration data.

[0058] In this embodiment of the disclosure, step S22, determining the update content between the target version number and the original version number based on the game configuration table, includes the following steps A1-A4:

[0059] Step A1: Obtain the first configuration definition and first configuration data corresponding to the target version number, as well as the second configuration definition and second configuration data of the original version number from the game configuration table.

[0060] In this embodiment of the disclosure, to facilitate quick retrieval of game update content during data updates, developers can divide the game configuration corresponding to each version number into configuration definitions and configuration data, and store them together in a game configuration table. The configuration definition can be understood as a data table field definition; the defined configurations are contained in an XML file, and the configuration data is contained in an Excel file. For example, the data table field definitions can be "id", "name", "remark", etc. The configuration data can be the specific data content corresponding to "id" and "name". The data content corresponding to "id" includes "001", "002", "003", etc., and the data content corresponding to "name" includes "Zhang San", "Li Si", etc.

[0061] In this embodiment of the disclosure, after determining the target version number of the data to be updated, the corresponding first configuration definition and first configuration data can be directly read from the game configuration table using the target version number. To facilitate determining the differences between the data to be updated and the original game version, it is also necessary to obtain the second configuration definition and second configuration data corresponding to the original version number from the game configuration table. The original game version can be understood as the game version currently used online.

[0062] Step A2: Compare the first configuration definition and the second configuration definition to obtain the first comparison result.

[0063] In this embodiment of the disclosure, since the configuration definition is contained in an XML file, when comparing the first configuration definition and the second configuration definition, the first comparison result can be obtained by directly comparing the file version number of the XML file in which the configuration definition is located.

[0064] Step A3: Compare the first configuration data and the second configuration data to obtain the second comparison result.

[0065] In this embodiment of the disclosure, since the configuration data is contained in an Excel file, when comparing the first configuration data and the second configuration data, the second comparison result can be obtained by directly comparing the files in the Excel file where the configuration data is located.

[0066] It should be noted that by comparing the configuration definitions and configuration data separately, the purpose is to quickly determine the differences between the data to be updated and the original game version, i.e., the update content, so that the update content can be exported as the corresponding file later.

[0067] Step A4: Based on the first comparison result and the second comparison result, determine the content to be updated.

[0068] In this embodiment of the disclosure, determining the update content based on the first comparison result and the second comparison result includes: when the first comparison result shows that the first configuration definition and the second configuration definition are consistent, and the second comparison result shows that the first configuration data and the second configuration data are inconsistent, obtaining the difference configuration data based on the difference between the first configuration data and the second configuration data; and using the difference configuration data as the update content.

[0069] It should be noted that if the first configuration definition and the second configuration definition are the same, but the first configuration data and the second configuration data are different, it means that the game configuration of the target version number has not been updated compared with the game configuration of the original version number; only configuration data has been added. In this case, the difference in configuration data is directly taken as the update content.

[0070] As an example, the first configuration definition for the data to be updated corresponds to the file player.xml (v1.0), and the first configuration data is located in the file player.xlsx (v1.1). The second configuration definition for the original game version corresponds to the file player.xml (v1.0), and the second configuration data is located in the file player.xlsx (v1.0). By comparison, we can see that the file version number of the XML files containing the first and second configuration definitions is v1.0, while the file version number of the Excel files containing the first and second configuration data is different. This indicates that the configuration definition between the data to be updated and the original game version has not been updated, but the configuration data has been updated. Therefore, the difference in configuration data is used as the update content.

[0071] In this embodiment of the disclosure, determining the update content based on the first comparison result and the second comparison result further includes: when the first comparison result shows that the first configuration definition and the second configuration definition are inconsistent, and the second comparison result shows that the first configuration data and the second configuration data are consistent, obtaining a difference configuration definition based on the difference between the first configuration definition and the second configuration definition, and obtaining difference configuration data based on the difference between the first configuration data and the second configuration data; and using the difference configuration definition and the difference configuration data as the update content.

[0072] It should be noted that if the first configuration definition and the second configuration definition are inconsistent, and the first configuration data and the second configuration data are also inconsistent, it indicates that the game configuration for the target version number has updated not only the configuration definition but also the configuration data compared to the game configuration for the original version number. In this case, the difference in configuration definition and difference in configuration data will be considered as the updated content.

[0073] As an example, the first configuration definition for the data to be updated corresponds to the file player.xml (v1.1), and the first configuration data is located in the file player.xlsx (v1.1). The second configuration definition for the original game version corresponds to the file player.xml (v1.0), and the second configuration data is located in the file player.xlsx (v1.0). By comparison, we can see that the file version numbers of the XML files containing the first and second configuration definitions are different, and the file version numbers of the Excel files containing the first and second configuration data are different. This indicates that the configuration definitions and configuration data between the data to be updated and the original game version have been updated. Therefore, the differing configuration definitions and differing configuration data are considered as the update content.

[0074] Step S23: Obtain the target file set, which includes: original files and updated files. The original files are of non-dynamic language type, and the updated files are generated based on the updated content. The updated files are of non-dynamic language type; or, the updated files are of non-dynamic language type and dynamic language type.

[0075] In this embodiment of the disclosure, when the updated content includes differential configuration data, the second configuration definition and second configuration data of the original version number are exported as original files, and the differential configuration data are exported as patch files; a set of target files is constructed based on the original files and patch files.

[0076] It should be noted that when the update content only includes differential configuration data, the second configuration definition and second configuration data of the original configuration are exported as original files using a non-dynamic language. Simultaneously, the differential configuration data between the first and second configuration data are exported as patch files using the same non-dynamic language. A set of target files is then constructed based on the original and patch files. The patch files serve as the update files within this set, and both the patch and original files are binary files. The non-dynamic language can be C, C++, C#, etc.

[0077] This facilitates the subsequent utilization of the advantages of non-dynamic languages, such as performance advantages, code readability, and the security and reliability of code quality, enabling rapid reading of updated content and improving the efficiency of game hot updates.

[0078] In this embodiment of the disclosure, when the updated content includes differential configuration definitions and differential configuration data, the second configuration definition and the second configuration data of the original version number are exported as original files, the differential configuration definition is exported as a script file, and the differential configuration data is exported as a patch file; a target file set is constructed based on the original file, the script file, and the patch file.

[0079] It should be noted that when the update includes both differential configuration definitions and differential configuration data, the original second configuration definition and second configuration data are exported as original files. Simultaneously, the differential configuration data between the first and second configuration data is exported as a patch file. The differential configuration definitions between the first and second configuration definitions are exported using a dynamic language to obtain a script file. A collection of target files is then constructed based on the original files, patch files, and script files. Languages ​​include Lua, JavaScript, Python, and Perl.

[0080] This facilitates subsequent collaborative reading of updated content based on both dynamic and non-dynamic languages, improving the efficiency of game hot updates.

[0081] Step S24: Send an update notification to the receiving device so that the receiving device can update its data using the target file set. The update notification is generated based on the target version number. For detailed explanation, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.

[0082] The method provided in this disclosure exports the configuration definition and configuration data into a script file in a dynamic language and a patch file in a non-dynamic language, respectively. This facilitates subsequent collaborative reading of updated content based on both dynamic and non-dynamic languages. In contrast, exporting all configurations to the game memory at once using a dynamic language improves export efficiency and avoids excessive redundant data in the game memory, thus reducing memory usage.

[0083] Figure 3 A flowchart of a data updating method provided in an embodiment of this disclosure is shown below. Figure 3 As shown, the method includes:

[0084] Step S31: Receive an update notification, wherein the update notification includes the target version number of the data to be updated.

[0085] The method provided in this disclosure is applied to a receiving device, which may be a smart device or a server that can have a game client installed. After receiving an update notification from the target device, the game device extracts the target version number of the data to be updated from the update notification.

[0086] Step S32: Obtain the target file set using the target version number, wherein the target file set is generated based on the update content corresponding to the target version number.

[0087] In this embodiment of the disclosure, when the receiving device is a smart device with a game client installed, it sends a file retrieval request to the CDN server, the file retrieval request carrying a target version number. After receiving the file retrieval request, the CDN server uses the target version number to obtain the target file set and transmits the target file set to the smart device.

[0088] In this embodiment of the disclosure, when the game device is a server, the server obtains the set of target files corresponding to the target version number from the specified directory.

[0089] Step S33: Obtain the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types.

[0090] In this embodiment of the disclosure, when the target file set includes original files and patch files, the corresponding file type is a non-dynamic language type. When the target file set includes original files, patch files, and script files, the corresponding file types are both non-dynamic and dynamic language types. Specifically, the original files and patch files belong to the non-dynamic language type, while the script files belong to the dynamic language type.

[0091] Step S34: Based on the file type, call the configuration reader corresponding to the different file types to read the file, obtain the reading result, and update the data based on the reading result.

[0092] In this embodiment of the disclosure, according to the file type, the configuration reader corresponding to different file types is called to read the file and obtain the reading result, including: when the file type includes a non-dynamic language type, the first configuration reader corresponding to the non-dynamic language type is called to read the original file and patch file in the target file set to obtain binary data; and the second configuration reader is called to read the binary data to obtain the reading result.

[0093] It should be noted that the first configuration reader is a C++ configuration reader, and the second configuration reader is a Lua configuration reader. When the file type includes non-dynamic language types, the C++ configuration reader is directly called to read the original file and patch file to obtain binary data. Then, the Lua configuration reader is called to read the binary data to obtain the final read result. The game device can directly update the data based on the final read result.

[0094] In this embodiment of the disclosure, according to the file type, the configuration reader corresponding to different file types is called to read the file and obtain the reading result, including: when the file type includes dynamic language type and non-dynamic language type, the first configuration reader corresponding to the non-dynamic language type is called to read the original file and patch file in the target file set to obtain binary data; the second configuration reader corresponding to the dynamic language type is called to read the script file and binary data to obtain the reading result.

[0095] In this embodiment, when the file type includes both non-dynamic and dynamic language types, a C++ configuration reader is first invoked to read the original file and patch file to obtain binary data. Then, a Lua configuration reader is invoked to read the binary data and script file to obtain the final read result. The receiving device can directly update the data based on the final read result.

[0096] The method provided in this disclosure collaboratively reads files from a target file set by calling configuration readers corresponding to dynamic and / or non-dynamic language types. This not only enables rapid reading of updated content but also achieves hot updates of game data, effectively mitigating game interruptions caused by data updates. Specifically, for smart devices with the client installed, data updates can be completed without closing the client, avoiding game interruptions. For the server, this avoids server restarts and maintenance due to data modifications, contributing to stable game operation.

[0097] Figure 4 This is a schematic diagram illustrating a data update process provided in an embodiment of the present disclosure, such as... Figure 4 As shown, the process includes:

[0098] ① The sending device obtains the target version number (v1.1) of the data to be updated.

[0099] ②The sending device uses the target version number to obtain the target game configuration corresponding to the data to be updated from the game configuration table. The target game configuration includes: a file player.xml (v1.1) containing the first configuration definition, and a file player.xlsx (v1.1) containing the first configuration data.

[0100] ③ The sending device obtains the original game configuration corresponding to the original game version from the game configuration table. The original game configuration includes: a file player.xml (v1.0) containing the second configuration definition, and a file player.xlsx (v1.0) containing the second configuration data.

[0101] ④ The sending device compares the target game configuration with the original game configuration to obtain the updated content, which includes: the difference configuration definition player.xml (v1.0-v1.1) and the difference configuration data player.xlsx (v1.0-v1.1).

[0102] ⑤ The sending device exports the original game configuration as an original file, the differential configuration definition as a script file, and the differential configuration data as a patch file.

[0103] ⑥ The sending device uses the original file, script file, and patch file to construct a target file set, associates and stores the target file set with the target version number, and sends an update notification carrying the target version number to the receiving device.

[0104] ⑦ The receiving device receives the update notification sent by the sending device and uses the target version number carried in the update notification to obtain the target file set.

[0105] ⑧ The receiving device calls the C++ configuration reader to read the original files and patch files in the target file set to obtain binary data.

[0106] ⑨ The receiving device calls the Lua configuration reader to read binary data and script files, obtains the reading results, and finally uses the reading results to update the data.

[0107] Figure 5 This is a block diagram of a data updating device provided in an embodiment of the present disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 5 As shown, the device includes:

[0108] Module 51 is used to obtain the target version number of the data to be updated;

[0109] The reading module 52 is used to determine the update content between the target version number and the original version number based on the game configuration table. The game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the difference configuration definition; or, the update content includes the difference configuration definition and the difference configuration data.

[0110] Processing module 53 is used to obtain a set of target files, wherein the set of target files includes: original files and updated files, wherein the original files are of non-dynamic language type, and the updated files are generated based on the updated content, and the updated files are of non-dynamic language type; or, the updated files are of both non-dynamic and dynamic language types.

[0111] The sending module 54 is used to send an update notification to the receiving device so that the receiving device can update the data using the target file set, wherein the update notification is generated based on the target version number.

[0112] In this embodiment of the disclosure, the reading module 52 is specifically used to obtain the first configuration definition and first configuration data corresponding to the target version number, as well as the second configuration definition and second configuration data of the original version number from the game configuration table;

[0113] By comparing the first configuration definition and the second configuration definition, the first comparison result is obtained;

[0114] By comparing the first configuration data and the second configuration data, a second comparison result is obtained;

[0115] Based on the first and second comparison results, the content to be updated is determined.

[0116] In this embodiment of the disclosure, the reading module 52 is specifically used to obtain the difference configuration data based on the difference between the first configuration data and the second configuration data when the first comparison result is that the first configuration definition and the second configuration definition are consistent, and the second comparison result is that the first configuration data and the second configuration data are inconsistent.

[0117] Use the difference configuration data as the update content.

[0118] In this embodiment of the disclosure, the reading module 52 is specifically used to obtain a difference configuration definition based on the difference between the first configuration definition and the second configuration definition when the first comparison result is that the first configuration definition and the second configuration definition are inconsistent, and to obtain difference configuration data based on the difference between the first configuration data and the second configuration data when the second comparison result is that the first configuration data and the second configuration data are inconsistent;

[0119] The differential configuration definition and differential configuration data are included in the update content.

[0120] In this embodiment of the disclosure, the processing module 53 is used to export the second configuration definition and second configuration data of the original version number as an original file and to export the differential configuration data as a patch file when the updated content includes differential configuration data.

[0121] A set of target files is constructed based on the original files and the patch files, where the patch files are used as update files in the set of target files.

[0122] In this embodiment of the disclosure, the processing module 53 is used to export the second configuration definition and the second configuration data of the original version number as an original file, export the difference configuration definition as a script file, and export the difference configuration data as a patch file when the update content includes difference configuration definition and difference configuration data.

[0123] A set of target files is constructed based on the original files, script files, and patch files.

[0124] Figure 6 This is a block diagram of a data updating device provided in an embodiment of the present disclosure. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both. Figure 6 As shown, the device includes:

[0125] The receiving module 61 is used to receive update notifications, wherein the update notifications include the target version number of the data to be updated;

[0126] The acquisition module 62 is used to obtain a set of target files using the target version number, wherein the set of target files is generated based on the update content corresponding to the target version number;

[0127] Processing module 63 is used to obtain the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types;

[0128] The execution module 64 is used to call the configuration reader corresponding to different file types to read the file according to the file type, obtain the reading result, and update the data based on the reading result.

[0129] In this embodiment of the disclosure, the execution module 64 is used to call the first configuration reader corresponding to the non-dynamic language type to read the original file and patch file in the target file set when the file type includes a non-dynamic language type, so as to obtain binary data;

[0130] The second configuration reader is invoked to read binary data and obtain the reading result.

[0131] In this embodiment of the disclosure, the execution module 64 is used to, when the file type includes both non-dynamic language type and dynamic language type, call the first configuration reader corresponding to the non-dynamic language type to read the original file and patch file in the target file set to obtain binary data; and call the second configuration reader corresponding to the dynamic language type to read the script file and binary data to obtain the reading result.

[0132] This disclosure also provides an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 1501, a communication interface 1502, a memory 1503, and a communication bus 1504, wherein the processor 1501, the communication interface 1502, and the memory 1503 communicate with each other through the communication bus 1504.

[0133] Memory 1503 is used to store computer programs;

[0134] When the processor 1501 executes the computer program stored in the memory 1503, it implements the steps of the above embodiments.

[0135] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0136] The communication interface is used for communication between the aforementioned terminal and other devices.

[0137] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0138] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0139] In yet another embodiment provided in this disclosure, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform any of the data update methods described in the above embodiments.

[0140] In yet another embodiment provided in this disclosure, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the data update methods described in the above embodiments.

[0141] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk).

[0142] The above description is merely a preferred embodiment of this disclosure and is not intended to limit the scope of protection of this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure are included within the scope of protection of this disclosure.

[0143] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method of updating data, characterized by, The method includes: Receive an update notification, wherein the update notification includes the target version number of the data to be updated; A target file set is obtained using the target version number, wherein the target file set is generated based on the update content corresponding to the target version number, and the target file set includes: original files and update files, wherein the update files include patch files, or include patch files and script files, wherein the file type of the original files is a non-dynamic language type, the file type of the patch files is a non-dynamic language type, and the file type of the script files is a dynamic language type; Obtain the files contained in the target file set and the file types of the files; Based on the file type, the corresponding configuration reader for each file type is invoked to read the file, the reading result is obtained, and the data is updated based on the reading result.

2. The method of claim 1, wherein, The step of calling the configuration reader corresponding to different file types to read the file according to the file type includes: If the file type includes a non-dynamic language type, the first configuration reader corresponding to the non-dynamic language type is invoked to read the original file and patch file in the target file set to obtain binary data; The second configuration reader is invoked to read the binary data and obtain the reading result.

3. The method of claim 1, wherein, The step of calling the configuration reader corresponding to different file types to read the file according to the file type includes: When the file type includes both non-dynamic language type and dynamic language type, the first configuration reader corresponding to the non-dynamic language type is invoked to read the original file and patch file in the target file set to obtain binary data; The second configuration reader corresponding to the dynamic language type is invoked to read the script file and the binary data, and the reading result is obtained.

4. An update method of data, characterized by, The method includes: Get the target version number of the data to be updated; Based on the game configuration table, the update content between the target version number and the original version number is determined, wherein the game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the differential configuration definition; or, the update content includes the differential configuration definition and the differential configuration data. Obtain a set of target files, wherein the set of target files includes: original files and updated files, wherein the original files are of a non-dynamic language type, and the updated files are generated based on the updated content, and the updated files are of a non-dynamic language type; or, the updated files are of a non-dynamic language type and a dynamic language type. An update notification is sent to the receiving device to enable the receiving device to update data using the target file set, wherein the update notification is generated based on the target version number.

5. The method according to claim 4, characterized in that, The step of determining the update content between the target version number and the original version number based on the game configuration table includes: Obtain the first configuration definition and first configuration data corresponding to the target version number, as well as the second configuration definition and second configuration data of the original version number from the game configuration table; By comparing the first configuration definition and the second configuration definition, a first comparison result is obtained; By comparing the first configuration data and the second configuration data, a second comparison result is obtained; Based on the first comparison result and the second comparison result, the updated content is determined.

6. The method according to claim 5, characterized in that, The step of determining the updated content based on the first comparison result and the second comparison result includes: If the first comparison result shows that the first configuration definition and the second configuration definition are consistent, and the second comparison result shows that the first configuration data and the second configuration data are inconsistent, then the difference configuration data is obtained based on the difference between the first configuration data and the second configuration data. The difference configuration data is used as the update content.

7. The method according to claim 5, characterized in that, The step of determining the updated content based on the first comparison result and the second comparison result includes: If the first comparison result shows that the first configuration definition and the second configuration definition are inconsistent, and the second comparison result shows that the first configuration data and the second configuration data are inconsistent, a difference configuration definition is obtained based on the difference between the first configuration definition and the second configuration definition, and difference configuration data is obtained based on the difference between the first configuration data and the second configuration data. The difference configuration definition and the difference configuration data are used as the update content.

8. The method according to claim 6, characterized in that, The acquisition of the target file set includes: If the updated content includes differential configuration data, the second configuration definition and second configuration data of the original version number are exported as an original file, and the differential configuration data is exported as a patch file; The target file set is constructed based on the original file and the patch file, wherein the patch file serves as an update file in the target file set.

9. The method according to claim 7, characterized in that, The acquisition of the target file set includes: When the updated content includes differential configuration definitions and differential configuration data, the second configuration definition and second configuration data of the original version number are exported as original files, the differential configuration definition is exported as a script file, and the differential configuration data is exported as a patch file; The target file set is constructed based on the original file, the script file, and the patch file.

10. A data updating device, characterized in that, include: A receiving module is used to receive update notifications, wherein the update notification includes the target version number of the data to be updated; The acquisition module is used to acquire a set of target files using the target version number, wherein the set of target files is generated based on the update content corresponding to the target version number; The processing module is used to obtain the files contained in the target file set and the file types of the files, wherein the file types include: non-dynamic language types; or, the file types include: non-dynamic language types and dynamic language types; The execution module is used to call the configuration reader corresponding to the different file types to read the file according to the file type, obtain the reading result, and update the data based on the reading result.

11. A data updating device, characterized in that, include: The acquisition module is used to obtain the target version number of the data to be updated; The reading module is used to determine the update content between the target version number and the original version number based on the game configuration table, wherein the game configuration table includes the configuration definition and configuration data corresponding to each version number, and the update content includes the differential configuration definition; or, the update content includes the differential configuration definition and the differential configuration data. A processing module is used to obtain a set of target files, wherein the set of target files includes: original files and updated files, wherein the file type of the original files is a non-dynamic language type, and the updated files are generated based on the updated content, and the file type of the updated files includes: a non-dynamic language type; or, the file type of the updated files includes: a non-dynamic language type and a dynamic language type; The sending module is used to send an update notification to the receiving device so that the receiving device can update the data using the target file set, wherein the update notification is generated based on the target version number.

12. A storage medium, characterized in that, The storage medium includes a stored program, wherein the program executes the method of any one of claims 1 to 9 when it is run.

13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other through the communication bus; wherein: Memory, used to store computer programs; A processor for performing the method of any one of claims 1 to 9 by running a program stored in memory.

Citation Information

Patent Citations

  • Data block comparison based data updating method

    CN101770515A

  • Scripts game server engine

    CN106033367A

  • Code generation method for managing game configurations and matched tool

    CN108469952A

  • Game application hot updating method and device

    CN109857432A