CN113384898B - Data processing method, device, equipment and storage medium - Google Patents

Data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN113384898B
CN113384898B CN202110647722.6A CN202110647722A CN113384898B CN 113384898 B CN113384898 B CN 113384898B CN 202110647722 A CN202110647722 A CN 202110647722A CN 113384898 B CN113384898 B CN 113384898B
Authority
CN
China
Prior art keywords
data
sub
storage
stored
original document
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110647722.6A
Other languages
Chinese (zh)
Other versions
CN113384898A (en
Inventor
尚乐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110647722.6A priority Critical patent/CN113384898B/en
Publication of CN113384898A publication Critical patent/CN113384898A/en
Application granted granted Critical
Publication of CN113384898B publication Critical patent/CN113384898B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5526Game data structure
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/50Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by details of game servers
    • A63F2300/55Details of game data or player data management
    • A63F2300/5546Details of game data or player data management using player registration data, e.g. identification, account, preferences, game history
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Databases & Information Systems (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data processing method, a data processing device, data processing equipment and a storage medium. The method comprises the following steps: acquiring dictionary data to be stored, wherein the dictionary data comprises a plurality of sub-data; determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating that the sub-data is stored into an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document; and storing the plurality of sub-data according to the storage paths of the plurality of sub-data. The method solves the problems of data storage failure and data loss.

Description

Data processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of game technologies, and in particular, to a data processing method, apparatus, device, and storage medium.
Background
Frequent game data manipulation makes the speed of the data manipulation very demanding for games. Mongodb is fast in data insertion, data update, etc., so more and more games choose Python+Mongodb as a development language and database storage solution.
The database storage scheme is as follows: the data generated in the game is firstly stored in the memory in the form of dictionary data, and when the data is stored, one dictionary data is stored in the database in the form of one original document. The client sends a data operation request to the database, the database performs corresponding data operation, and a result of whether the operation is successful is not returned to the client.
However, as the game is played, there is more and more data that does not use the upper limit, and the maximum storage space of a single original document may be exceeded. In this way, the data storage fails, and the client cannot know the data operation result, which causes data loss.
Disclosure of Invention
The application provides a data processing method, a device, equipment and a storage medium, which are used for solving the problems of data storage failure and data loss.
In a first aspect, the present application provides a data processing method, including: acquiring dictionary data to be stored, wherein the dictionary data comprises a plurality of sub-data; determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating that the sub-data is stored into an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document; and storing the plurality of sub-data according to the storage paths of the plurality of sub-data.
In a second aspect, the present application provides a data processing apparatus comprising: the device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring dictionary data to be stored, and the dictionary data comprises a plurality of sub-data; a determining module, configured to determine a storage path of each of the plurality of sub-data, where the storage path of each sub-data is used to indicate that the sub-data is stored into an original document or a subset of a preset set, and a storage space of the preset set is greater than a maximum storage space of the original document; and the storage module is used for storing the plurality of sub-data according to the storage paths of the plurality of sub-data.
In a third aspect, the present application provides a computer device comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method according to the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
The data processing method, the device, the equipment and the storage medium provided by the application are used for acquiring dictionary data to be stored, wherein the dictionary data comprises a plurality of sub-data; determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating that the sub-data is stored into an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document; the plurality of sub data is stored according to the storage paths of the plurality of sub data. The dictionary data to be stored are stored according to the sub-data, different storage paths are designated for different sub-data, the storage space of the preset set is larger than the maximum storage space of the original document, and the number of the sub-sets in the preset set is not limited, so that the problems of data storage failure and data loss caused by the fact that one dictionary data is stored in one original document and if the sub-data in the dictionary data does not have an upper limit are avoided, and the success rate of data storage is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of a scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a data processing method according to an embodiment of the present application;
FIG. 3 is an exemplary diagram of a preset collection provided in an embodiment of the present application;
FIG. 4 is an example diagram of subsets provided by embodiments of the present application;
FIG. 5 is a second flowchart of a data processing method according to an embodiment of the present disclosure;
FIG. 6 is a flowchart III of a data processing method according to an embodiment of the present application;
FIG. 7 is an exemplary diagram of a data query process provided by an embodiment of the present application;
FIG. 8 is a schematic diagram of a data processing apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terms referred to in this application are explained first:
dictionary data: the use of key-value pairs to store data can be understood as a collection of key-value pairs (key-value pairs) that are separated by commas, keys (keys) are indexes, values (values) are data, keys and values are separated by semicolons, keys are unique, corresponding data can be found by keys, keys can be strings, numbers, or tuple values, and can be any data type.
Memory databases (hereinafter referred to as "memory") and disk databases (hereinafter referred to as "database") are two mainstream storage methods. The memory database has high data processing speed and high data access speed, and is generally used for processing data with short effective time but frequent access. Disk databases have higher stability but slow data access, and are typically used to process data with longer effective time but less frequent data access.
In the data processing process, in order to avoid frequent access to the database and high pressure of the database, data can be stored in the memory database first for data processing, and then if a disk storage requirement exists, the data in the memory is stored in the database.
In some scenarios such as games, where frequent data manipulation is required, a combination of memory and databases is required.
The mondab database is a typical disk database. It is not necessary to return to the client after the data processing is completed, the result of whether the operation was successful. Therefore, the Mongodb database has high data processing speed in the aspects of data insertion, updating and the like. Most games today employ python+mong odb as a development language and database storage solution. The development language Python is to store data (abbreviated as save data) to be stored in a disk database in a game in a memory in a dictionary (direct) mode, to perform serialization processing on the dictionary when the game is saved, and to store the serialization processing result in a data document (document) in a mongdb set. This data document will be referred to as an original document hereinafter.
In a game scenario, one game player corresponds to one data document, and all the inventory data of the game player is stored in one original document. While a single original document in a collection of mong odb has an upper storage limit, for some objects in the game that do not use the upper limit, the data that it produces may exceed the upper storage limit of the single original document. For example, an item in a game may be purchased indefinitely by a game user, such that as the game is run, the item's data exceeds the upper storage limit, causing a data storage failure. In the data processing process, the Mongodb database does not need to wait for the return result of whether the database return operation is successful or not after the client side sends the data operation request to the database. For the data of the object without the upper limit, the data operation result is not returned when the data storage fails, and the data is lost.
Aiming at the technical problems, the inventor of the application provides the following technical conception: because in the database, the data are stored according to sets, one set can comprise a plurality of documents, each document has an upper storage limit, and the set has no upper storage limit. Therefore, the dictionary data can be divided into two parts according to the storage space requirement or the use upper limit of each sub-data in the dictionary data, wherein one part of the data is the data with the storage space requirement not exceeding the maximum storage space of the original document or the data with the use upper limit; the other part of data is data whose storage space requirement may exceed the maximum storage space of the original document, or data whose upper limit of use is not used. After that, a part of the data is stored in the original document. The other portion of the data is stored in a separate set that includes a plurality of subsets. Yet another portion of the data may be divided into a plurality of sub-data, each sub-data stored in a subset. Thus, for sub data without upper limit, the problems of data storage failure and data loss can be avoided.
The data updating method provided by the application is described in detail below with reference to the drawings in several specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes will not be described in detail in some embodiments.
Fig. 1 is a schematic view of a scenario of a data processing method according to an embodiment of the present application. As shown in fig. 1, the scenario of the present embodiment includes: a game client 11, a memory server 12 and a database server 13. Wherein, game client 11 is communicatively connected to memory server 12, and memory server 12 is communicatively connected to database server 13. The game client 11 provides game services for users, and generated game data is firstly stored in the memory server 12 and then stored in the database server 13 when a disk is required.
The data processing method provided in the embodiment of the present application is described in detail below based on the scenario shown in fig. 1.
Fig. 2 is a flowchart of a data processing method provided in the embodiment of the present application, as shown in fig. 2, the data processing method in the embodiment includes the following steps:
step S201, dictionary data to be stored is acquired, the dictionary data including a plurality of sub-data.
The execution subject of the method of the present embodiment may be a database server as shown in fig. 1. The database server obtains dictionary data to be stored to the database from the memory server.
In an actual game, one dictionary data may be arbitrary game data. For example, a dictionary data may be a data set of a game player, and sub-data in the dictionary data may be data of a summons, an article, etc. of the game player. For another example, one dictionary data may be scene data, where sub-data in the dictionary data is a building, a non-player character, etc. in the scene.
It will be appreciated that where a game data may include a plurality of sub-game data, the game data may be used as dictionary data and the sub-game data in the game data may be used as sub-data.
Step S202, determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating to store the sub-data to an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document.
In the database, the data are stored according to the sets, the sets have no upper storage limit, and the number of the sub-sets in the sets is not limited. Therefore, in this embodiment, some sub-data whose storage space requirement exceeds the maximum storage space of the original document are stored in one of the preset sets in such a way that one sub-data corresponds to one sub-set.
Fig. 3 is an exemplary diagram of a preset set provided in an embodiment of the present application.
As shown in fig. 3, the database includes an original document and a preset set, the preset set includes a subset 1, a subset 2, and a subset 3, … …, the dictionary data includes a sub-data 0, a sub-data 1, and a sub-data 2, … …, the storage path of the sub-data 0 is the original document, the storage paths of the remaining sub-data are preset sets, the sub-data 0 is stored in the original document, and each of the remaining sub-data is respectively stored in one of the preset sets.
Step S203, storing the plurality of sub data according to the storage paths of the plurality of sub data.
Specifically, if the storage path of the current sub-data is used for indicating to store the sub-data to the original document, the current sub-data is stored to the original document; if the storage path of the current sub-data is used for indicating to store the sub-data to one of the preset sets, the current sub-data is stored to one of the preset sets.
The embodiment obtains dictionary data to be stored, wherein the dictionary data comprises a plurality of sub-data; determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating that the sub-data is stored into an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document; and storing the plurality of sub-data according to the storage paths of the plurality of sub-data. Since dictionary data to be stored is stored in a manner that one sub-data corresponds to one sub-set, and the storage space of the preset set is larger than the maximum storage space of the original document, the number of sub-sets in the preset set is not limited. Therefore, the problems of data storage failure and data loss caused by storing one dictionary data in one original document and if the sub data in the dictionary data does not have an upper limit are avoided, and the data storage success rate is improved.
It should be appreciated that the data in the database is stored in sets. The original document is a document in the original set for storing a dictionary data. In this embodiment, the preset set is a set different from the original set, and the preset set may include a plurality of subsets, each of which may further include a plurality of documents, and the number of the documents in each subset is not limited. Thus, for each sub-data, if the storage path of the sub-data indicates to store the sub-data to one of the preset sets, each key-value data pair in the sub-data is respectively stored to a different document in the sub-set.
In this embodiment, each sub-data includes a plurality of key-value data pairs, wherein one sub-set is used for storing one sub-data, and one document in one sub-set is used for storing one key-value data pair in one sub-data.
Taking a game scene as an example, splitting one dictionary data into a plurality of sub-data according to the type of an entity in the game or the type of an object, wherein each sub-data comprises a plurality of key-value data pairs, and storing the sub-data corresponding to the object without an upper limit in the game in a preset set of mongolidb. Wherein one sub-data is stored in a set of mondabs, each document in the set being for storing one key-value data pair of one sub-data.
For the convenience of the reader, the following detailed description of the present embodiment will be given with reference to the accompanying drawings:
fig. 4 is an exemplary diagram of subsets provided in an embodiment of the present application. As shown in fig. 4, one preset set includes N subsets, for subset 1, which includes N documents, if one piece of sub data includes N key value data pairs, the N key value data pairs are stored in a one-to-one correspondence manner with the N documents in subset 1, that is, key value data pair 1 is stored in document 1, key value data pair 2 is stored in document 2, key value data pair 3 is stored in document 3, and … … key value data pair N is stored in document N.
In this embodiment, one document in the preset set is used to store one key value data pair in one sub data, and the number of documents in the preset set is not limited, so that for data without an upper limit, the problems of data storage failure and data loss can be avoided.
In the above embodiment, it is determined that the storage path of each of the plurality of sub-data is critical, which determines which data of the dictionary data is stored to the original document and which data is stored to the preset set. The present embodiment proposes two different embodiments for determining a storage path of each of a plurality of sub-data, specifically:
fig. 5 is a flowchart of a second data processing method provided in the embodiment of the present application, as shown in fig. 5, in an alternative implementation, the step of determining a storage path of each of a plurality of sub-data includes the following steps:
step S501, determining a data type of each of the plurality of sub-data.
The data type of the sub data may be determined according to the type of the entity, where one entity corresponds to one data type. Specifically, the data type of the sub data may be determined according to the name of the entity.
For example, for one game player, the summons, items are of two different data types. For one game scenario, building, non-game player characters are also two different data types.
Step S502, for each sub data, determining a storage path of the sub data according to the data type of the sub data and a preset target type.
In step S502, the target type may be preset by a user, where the user may be a program developer. Alternatively, the setting of the target type may also have at least two embodiments as follows:
in an alternative embodiment, the target type may be a data type preset by a user and the storage path is sub data of a preset set.
Specifically, the user may select a data type of the sub data that does not use the upper limit among all data types of the sub data as a target type. For example, the user may preset the two sub-data of the summons animal, item as the target type.
In a game scene, the number of the game player's stock is very large, and as the game is run, the number of the summons and the number of the articles are very large (exceeding the maximum storage space of the original document) for the complex data of the nested dictionary, namely the summons and the articles, the dictionary data of the game player's stock is very large and exceeds the limit of the maximum storage space (16M) of the original document, so the embodiment can preset the summons and the articles as target types.
Assuming that the target type is named as a KeyValDocDict type, the sub data of the KeyValDocDict type is stored in a preset collection (col_name) when the target type is stored in a disk, and one key-value data pair is stored as a document in the preset collection col_name. Data of a non-keyvaldocdic type is stored in the original document.
For example, for the sub-data of the summoning animal, the corresponding sub-set may be named col_pets, and one key-value data pair is stored in one document in the sub-set col_pets in the sub-data of the summoning animal.
Aiming at the sub data of the KeyValDocDict type in dictionary data, when the sub data is stored in a preset set (col_name) in a mode of corresponding one document by one key-value data pair, the format is { "prime_key": prime_key, "sub_key": key, "data": value }. The prime_key is used to mark a parent dictionary index to which each document belongs, and may be a name of a corresponding preset set of key-value data pair, for example, user identification (User Identification, UID) of a game player, where sub_key is a key in sub data of a keyvaldocdic type, and data is a value corresponding to the key.
The solution of the present application is described below by way of an example:
assuming that the user UID is 20001, the user named as 'Hannah' has stock data (calling animal data), and the stored data comprises sub-data corresponding to calling animals named as kitty and common sub-data named as hen; the sub data corresponding to the calling beast named as kitty comprises the following components: name: a kitty; grade: 15; empirical values: 1000; common child data named hen includes: name: hen; grade: 22; empirical values: 2000.
in the related art, an original document is created according to a user UID, and the original document is named as "20001", and then both common sub-data named as hen and sub-data corresponding to a calling animal named as kitty are stored in the original document.
In the embodiment of the present application, an original document is created according to the user UID, the original document is named as "20001", a preset set is created according to the user UID, the preset set is named as "20001", a subset is created according to the name of the sub-data (summoned beast), the subset is named as "col_pets", the common sub-data named as hen is stored in the original document, and the sub-data corresponding to the summoned beast named as kitty is stored in the col_pets of the preset set of "20001".
As can be seen from the comparison, the stored data of the original document in the player data set no longer includes data for summoning animals; therefore, the amount of stored data of the original document is greatly reduced. In addition, the summoning animal data is individually stored in a preset set (col_name), the UID of the game player is represented by a prime_key, the key in the sub data of the target type is represented by a sub_key, and the data corresponding to the key is represented by data. Thus, dictionary data in python can be successfully stored in monmod without being limited by the maximum 16M storage space upper limit of the original document.
In this embodiment, it is first required to determine whether the data type of the sub data is a target type, if the data type of the sub data is a preset target type, then determining that the storage path of the sub data is a preset set, otherwise, determining that the storage path of the sub data is an original document.
In another alternative embodiment, the target type may also be a data type preset by the user and the storage path is sub-data of the original document.
Specifically, the user may select a data type of the general sub data among all data types of the sub data as a target type. It should be noted that the normal child data herein is child data other than child data corresponding to the target type in dictionary data, as opposed to child data without using the upper limit.
In this embodiment, it is also necessary to determine whether the data type of the sub data is the target type, if the data type of the sub data is the preset target type, then determine the storage path of the sub data as the original document, otherwise, determine the storage path of the sub data as the preset set.
In another alternative embodiment, determining a storage path for each of a plurality of sub-data includes: and determining the storage path of each sub data according to the data type of the sub data and the corresponding relation between the data type and the storage path.
In this embodiment, the storage path of each sub data may be preset, where one sub data may be understood as a sub data of one data type, and the corresponding relationship between the data type and the storage path may be preset in this embodiment, and after the sub data is acquired, each sub data is stored according to the preset storage path.
Specifically, the correspondence relationship may be preconfigured in a table form. The correspondence can be seen from the following table 1:
the preset set may be named as "col_name", and the subset a and the subset b in the preset set may be named as data types. For example, a subset of "col_pets" for storing data related to summoning animals; a subset of "col_items" for storing data related to items.
In this embodiment, the method for determining the storage path is transparent to the application layer, and the program developer can determine the storage path by modifying the statement of the storage path of the disk storage data in the dictionary, without modifying the data operations such as accessing and modifying the disk storage data in the dictionary.
Fig. 6 is a flowchart III of a data processing method provided in the embodiment of the present application, as shown in fig. 6, where the data processing method in the embodiment may further include the following steps:
step S601, a data query request is received.
With continued reference to fig. 1, the game client sends a data query request to the database server, and the database server receives the data query request sent by the game client.
Step S602, according to the data query request, sub-data stored in the original document and sub-data stored in a preset set are obtained.
Step S603, combining the sub data acquired from the original document with the sub data acquired from the preset collection, and returning the combined result.
In this embodiment, one game client generally corresponds to one game user, and game data of the game user are stored in an original document and a preset set, respectively, so that when performing a data query operation, it is also necessary to acquire sub-data stored in each of the original document and the preset set, respectively. And then combining the sub-data stored in each sub-data, and returning the combined result to the game client.
Fig. 7 is an exemplary diagram of a data query procedure provided in an embodiment of the present application. As shown in fig. 7, sub data 0 is obtained from the original document, sub data 1 to sub data N are obtained from the preset set, sub data 0, sub data 1 to sub data N are combined into dictionary data, and the dictionary data is returned to the game client.
The combination may be understood as combining sub-data respectively acquired from an original document and a preset set into one dictionary data. It is understood that dictionary data is a collection and common data, summoning animal data, item data, etc. are elements of the collection of dictionary data. After the common data, the summoned animal data and the article data are obtained, the common data, the summoned animal data and the article data are combined into a set, and the set is returned to the game client.
For example, game user A's general data is stored in an original document, game user A's summoned animal data is stored in a "col_items" subset, and item data is stored in a "col_items" subset. The present embodiment obtains general data of the game user a from the original document, obtains summoning animal data of the game user a from the sub-set of col_items, and obtains item data of the game user a from the sub-set of col_items. And then combining the common data, the summoning animal data and the article data into dictionary data, and returning to the game client.
On the basis of the above data processing method embodiment, fig. 8 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. As shown in fig. 8, the data processing apparatus includes: an acquisition module 81, a determination module 82, and a storage module 83;
wherein, the obtaining module 81 is configured to obtain dictionary data to be stored, where the dictionary data includes a plurality of sub-data;
a determining module 82, configured to determine a storage path of each of the plurality of sub-data, where the storage path of each sub-data is used to indicate that the sub-data is stored into an original document or a subset of a preset set, and a storage space of the preset set is greater than a maximum storage space of the original document;
and the storage module 83 is configured to store the plurality of sub-data according to storage paths of the plurality of sub-data.
Optionally, the preset set includes a plurality of subsets, each of the subsets including a plurality of key-value data pairs; correspondingly, the storage module 83 is specifically configured to: for each piece of sub data, if the storage path of the sub data indicates that the sub data is stored in an original document, storing the sub data in the original document; and if the storage path of the sub data indicates that the sub data is stored in one of the preset sets, storing each key value data pair in the sub data into different documents in the subset respectively.
Optionally, the determining module 82 is specifically configured to: determining a data type of each of the plurality of sub-data; and determining a storage path of each sub data according to the data type of the sub data and a preset target type.
Optionally, the target type is a data type preset by a user and the storage path is sub-data of a preset set; or the target type is a data type preset by a user and the storage path is sub-data of the original document.
Optionally, the determining module 82 is specifically configured to: and determining the storage path of each sub data according to the data type of the sub data and the corresponding relation between the data type and the storage path.
Optionally, the apparatus further comprises: a split module 84;
the splitting module 84 is configured to split the dictionary data according to the type of the entity in the game to obtain a plurality of sub-data; wherein one sub-data corresponds to one entity.
Optionally, the apparatus further comprises: a receiving module 85, a combining and returning module 86;
a receiving module 85, configured to receive a data query request;
the obtaining module 81 is further configured to obtain, according to the data query request, sub-data stored in the original document and sub-data stored in the preset set;
and a combination and return module 86, configured to combine the sub-data obtained from the original document with the sub-data obtained from the preset set, and return a combination result.
It should be noted that, it should be understood that the division of the modules of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into a physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. For example, the determining module 82 may be a processing element that is set up separately, may be implemented in a chip of the above apparatus, or may be stored in a memory of the above apparatus in the form of program codes, and may be called by a processing element of the above apparatus to execute the functions of the determining module 82. The implementation of the other modules is similar. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Fig. 9 is a schematic structural diagram of a server according to an embodiment of the present application. As shown in fig. 9, the computer device may include: a processor 91, a memory 92 and a transceiver 93.
The processor 91 executes computer-executable instructions stored in the memory, causing the processor 91 to perform the arrangements in the above-described embodiments. The processor 91 may be a general-purpose processor including a central processing unit CPU, a network processor (network processor, NP), etc.; but may also be a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
The memory 92 is connected to the processor 91 via a system bus and communicates with each other, and the memory 52 is used for storing computer program instructions.
The transceiver 93 may be used to obtain dictionary data to be stored.
The system bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The system bus may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus. The transceiver is used to enable communication between the database access device and other computers (e.g., clients, read-write libraries, and read-only libraries). The memory may include random access memory (random access memory, RAM) and may also include non-volatile memory (non-volatile memory).
The computer device provided in the embodiment of the present application may be used to execute the technical scheme of the data processing method in the foregoing embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
The embodiment of the application also provides a chip for running the instruction, and the chip is used for executing the technical scheme of the data processing method in the embodiment.
The embodiment of the application also provides a computer readable storage medium, wherein computer instructions are stored in the computer readable storage medium, and when the computer instructions run on a computer, the computer is caused to execute the technical scheme of the data processing method of the embodiment.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is stored in a computer readable storage medium, and at least one processor can read the computer program from the computer readable storage medium, and the technical scheme of the data processing method in the embodiment can be realized when the at least one processor executes the computer program.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. A method of data processing, comprising:
acquiring dictionary data to be stored, wherein the dictionary data comprises a plurality of sub-data;
determining a storage path of each sub-data in the plurality of sub-data, wherein the storage path of each sub-data is used for indicating that the sub-data is stored into an original document or one of preset sets, and the storage space of the preset set is larger than the maximum storage space of the original document;
storing the plurality of sub-data according to the storage paths of the plurality of sub-data;
the preset set comprises a plurality of subsets, and each subset of data comprises a plurality of key value data pairs;
correspondingly, the storing the plurality of sub-data according to the storage paths of the plurality of sub-data includes:
for each piece of sub data, if the storage path of the sub data indicates that the sub data is stored in an original document, storing the sub data in the original document;
and if the storage path of the sub data indicates that the sub data is stored in one of the preset sets, storing each key value data pair in the sub data into different documents in the subset respectively.
2. The method of claim 1, wherein the determining a storage path for each of the plurality of sub-data comprises:
determining a data type of each of the plurality of sub-data;
and determining a storage path of each sub data according to the data type of the sub data and a preset target type.
3. The method according to claim 2, wherein the target type is a data type preset by a user and the storage path is sub data of a preset set;
or,
the target type is a data type preset by a user and the storage path is sub-data of the original document.
4. The method of claim 1, wherein the determining a storage path for each of the plurality of sub-data comprises:
and determining the storage path of each sub data according to the data type of the sub data and the corresponding relation between the data type and the storage path.
5. The method according to any one of claims 1-4, further comprising:
splitting the dictionary data according to the types of entities in the game to obtain a plurality of sub-data;
wherein one sub-data corresponds to one entity.
6. The method according to any one of claims 1-4, further comprising:
receiving a data query request;
acquiring the sub-data stored in the original document and the sub-data stored in the preset set according to the data query request;
and combining the sub-data acquired from the original document with the sub-data acquired from the preset set, and returning a combination result.
7. A data processing apparatus, comprising:
the device comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring dictionary data to be stored, and the dictionary data comprises a plurality of sub-data;
a determining module, configured to determine a storage path of each of the plurality of sub-data, where the storage path of each sub-data is used to indicate that the sub-data is stored into an original document or a subset of a preset set, and a storage space of the preset set is greater than a maximum storage space of the original document;
the storage module is used for storing the plurality of sub-data according to the storage paths of the plurality of sub-data;
the preset set comprises a plurality of subsets, and each subset of data comprises a plurality of key value data pairs;
correspondingly, the storage module is specifically configured to store, for each piece of sub data, the sub data to an original document if a storage path of the sub data indicates that the sub data is stored to the original document;
and if the storage path of the sub data indicates that the sub data is stored in one of the preset sets, storing each key value data pair in the sub data into different documents in the subset respectively.
8. A computer device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the method of any of claims 1-6.
9. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1-6.
CN202110647722.6A 2021-06-10 2021-06-10 Data processing method, device, equipment and storage medium Active CN113384898B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110647722.6A CN113384898B (en) 2021-06-10 2021-06-10 Data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110647722.6A CN113384898B (en) 2021-06-10 2021-06-10 Data processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113384898A CN113384898A (en) 2021-09-14
CN113384898B true CN113384898B (en) 2024-01-30

Family

ID=77620250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110647722.6A Active CN113384898B (en) 2021-06-10 2021-06-10 Data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113384898B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1254428A (en) * 1997-06-04 2000-05-24 盖瑞·L·夏普 Database structure and management
CN103024585A (en) * 2012-12-28 2013-04-03 Tcl集团股份有限公司 Program recommendation system, program recommendation method and terminal equipment
CN108140046A (en) * 2015-10-23 2018-06-08 甲骨文国际公司 For DB query processings in the efficient memory of any semi-structured data form
CN110990563A (en) * 2019-11-18 2020-04-10 北京信息科技大学 Artificial intelligence-based traditional culture material library construction method and system
CN111639075A (en) * 2020-05-09 2020-09-08 武汉大学 Non-relational database vector data management method based on flattened R tree
CN112384907A (en) * 2018-07-18 2021-02-19 国际商业机器公司 Specification editing system integrated with text mining
CN112380445A (en) * 2020-11-30 2021-02-19 深圳前海微众银行股份有限公司 Data query method, device, equipment and storage medium
CN112817973A (en) * 2021-01-22 2021-05-18 平安普惠企业管理有限公司 Data processing method, data processing device, data processing equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10306024B2 (en) * 2016-03-25 2019-05-28 Amazon Technologies, Inc. Compression dictionary snapshot system and method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1254428A (en) * 1997-06-04 2000-05-24 盖瑞·L·夏普 Database structure and management
CN103024585A (en) * 2012-12-28 2013-04-03 Tcl集团股份有限公司 Program recommendation system, program recommendation method and terminal equipment
CN108140046A (en) * 2015-10-23 2018-06-08 甲骨文国际公司 For DB query processings in the efficient memory of any semi-structured data form
CN112384907A (en) * 2018-07-18 2021-02-19 国际商业机器公司 Specification editing system integrated with text mining
CN110990563A (en) * 2019-11-18 2020-04-10 北京信息科技大学 Artificial intelligence-based traditional culture material library construction method and system
CN111639075A (en) * 2020-05-09 2020-09-08 武汉大学 Non-relational database vector data management method based on flattened R tree
CN112380445A (en) * 2020-11-30 2021-02-19 深圳前海微众银行股份有限公司 Data query method, device, equipment and storage medium
CN112817973A (en) * 2021-01-22 2021-05-18 平安普惠企业管理有限公司 Data processing method, data processing device, data processing equipment and storage medium

Also Published As

Publication number Publication date
CN113384898A (en) 2021-09-14

Similar Documents

Publication Publication Date Title
US8418142B2 (en) Architecture for data validation
CN108170815B (en) Data processing method, device and storage medium
US9740748B2 (en) Similarity and ranking of databases based on database metadata
US8959504B2 (en) Update scanning
CN111414739B (en) Excel data entry component, entry method and device
CN112434015A (en) Data storage method and device, electronic equipment and medium
CN116561389A (en) Text matching method, device, equipment and storage medium
WO2024114524A1 (en) Database access method and apparatus, and storage medium
CN113384898B (en) Data processing method, device, equipment and storage medium
US20180018385A1 (en) System, data combining method, integration server, data combining program, database system ,database system cooperation method, and database system cooperation program
CN110806979B (en) Interface return value checking method, device, equipment and storage medium
CN112328325A (en) Execution method and device of model file, terminal equipment and storage medium
CN112069175A (en) Data query method and device and electronic equipment
CN110765125B (en) Method and device for storing data
CN116126862A (en) Data table association method, device, equipment and storage medium
CN115827280A (en) Message processing method and device, electronic equipment and storage medium
CN107016296B (en) Data index construction method, data index reading method, data index construction device, data reading device and electronic equipment
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
CN110851437A (en) Storage method, device and equipment
CN112100208A (en) Operation request forwarding method and device
CN112527900A (en) Method, device, equipment and medium for database multi-copy reading consistency
CN111858609A (en) Fuzzy query method and device for block chain
CN113297273B (en) Method and device for inquiring metadata and electronic equipment
CN113094379B (en) Anchored user data maintenance method, device, equipment and medium
US20240061857A1 (en) Migration and validation of data from tabular structures to non-relational data stores

Legal Events

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