A data monitoring method, apparatus, electronic device, and storage medium
By working together with monitoring tools and data copying services, game data is analyzed automatically, solving the problem of low efficiency in manual inspection. This enables timely detection and handling of abnormal data, improving the efficiency of game data inspection and server performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2024-12-31
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, due to the large amount of game data, manual inspection of abnormal data is inefficient and cannot detect abnormal data in a timely manner, which affects the performance of game servers and the player experience.
The monitoring tool sends a game data query request to the data copy service, which then retrieves game data from the game server database. The monitoring tool analyzes the data and uses data analysis rules to check for abnormal data.
It improves the efficiency of game data inspection, promptly detects and handles abnormal data, and ensures game server performance and player experience.
Smart Images

Figure CN119951127B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and specifically to a data monitoring method, apparatus, electronic device, and storage medium. Background Technology
[0002] The internet revolution, coupled with the continuous development and evolution of hardware and software technologies, has spurred the emergence of smart devices and software. Simultaneously, a vast number of games of diverse themes have sprung up to meet user needs. Furthermore, with the booming development of various technologies within the gaming industry, people are placing increasingly higher demands on game performance.
[0003] Currently, with the increasing amount of game data stored on the hard drive, relevant staff need to regularly check all game data on the hard drive for abnormal data, such as expired data or abnormal data, in order to avoid the huge amount of data affecting the performance of the game server or to avoid abnormal situations for players in the game due to abnormal data. However, due to the large amount of game data, manual inspection takes a lot of time, resulting in low efficiency in checking game data and inability to detect abnormal data in a timely manner. Summary of the Invention
[0004] This application provides a data monitoring method, apparatus, electronic device, and storage medium, which can improve the efficiency of game data inspection and detect abnormal data in a timely manner.
[0005] In a first aspect, embodiments of this application provide a data monitoring method, the method comprising:
[0006] Determine the target game that the monitoring tool needs to monitor;
[0007] Based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request to the database of the game server of the target game to the data copy service. The game data query request includes game query instruction parameters.
[0008] The data copy service described above is used to retrieve the first game data indicated by the game query parameter from the database of the game server and send the first game data to the monitoring tool.
[0009] The monitoring tools described above analyze the data of the first game based on the data analysis rules in the monitoring configuration information, and obtain the data analysis results of the target game.
[0010] Secondly, embodiments of this application provide a data monitoring device, the device comprising:
[0011] The game determination module is used to determine the target game that the monitoring tool needs to monitor.
[0012] The query request module is used to send a game data query request for the database of the game server of the target game to the data copy service based on the monitoring configuration information of the target game through the monitoring tool mentioned above. The game data query request includes game query indication parameters.
[0013] The data acquisition module is used to obtain the first game data indicated by the game query indication parameter from the database of the game server through the data copy service, and send the first game data to the monitoring tool.
[0014] The data analysis module is used to analyze the first game data based on the data analysis rules in the monitoring configuration information using the aforementioned monitoring tools, and to obtain the data analysis results of the target game.
[0015] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; a processor loads instructions from the memory to execute the steps of any of the data monitoring methods provided in embodiments of this application.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of any of the data monitoring methods provided in embodiments of this application.
[0017] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the data monitoring methods provided in embodiments of this application.
[0018] The solution adopted in this application embodiment can determine the target game that the monitoring tool needs to monitor. Then, based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request containing game query indication parameters to the database of the game server of the target game to the data copy service. The data copy service retrieves the first game data indicated by the game query indication parameters from the database of the game server and sends the first game data to the monitoring tool. The monitoring tool then analyzes the first game data based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game. By copying the game data to be checked through the data copy service and then analyzing and processing the game data to be checked by the monitoring tool, the efficiency of game data inspection can be improved, and abnormal data can be detected in a timely manner. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic flowchart of one embodiment of the data monitoring method provided in this application.
[0021] Figure 2 This is a schematic diagram of an embodiment of the data monitoring method provided in this application.
[0022] Figure 3 This is a schematic diagram of the data monitoring device provided in the embodiments of this application;
[0023] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0025] This application provides a data monitoring method, apparatus, electronic device, and computer-readable storage medium.
[0026] Specifically, this embodiment will be described from the perspective of a data monitoring device, which can be integrated into an electronic device. That is, the data monitoring method of this embodiment can be executed by an electronic device. Optionally, the electronic device may include a terminal device. The terminal device may be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC), etc.
[0027] The data monitoring method provided in this application can be applied to data monitoring systems. These systems can include player terminal devices and servers. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. The player terminal device and the server can communicate bidirectionally via a network.
[0028] Optionally, the server can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Cloud servers consist of a large number of computers or network servers based on cloud computing.
[0029] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.
[0030] The data monitoring method of this embodiment determines the target game that the monitoring tool needs to monitor; based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request to the database of the game server of the target game to a data copy service, the game data query request including game query indication parameters; the data copy service retrieves the first game data indicated by the game query indication parameters from the database of the game server and sends the first game data to the monitoring tool; the monitoring tool analyzes the first game data based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game, which can improve the efficiency of game data inspection and detect abnormal data in a timely manner.
[0031] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a data monitoring method. The specific process of this data monitoring method can be described in the following steps 101 to 104, wherein:
[0032] Step 101: Determine the target game that the monitoring tool needs to monitor.
[0033] The aforementioned monitoring tools can be set up on a server or terminal to analyze and process game data from at least one game, and to monitor the game based on the results of the game data analysis and processing.
[0034] It should be noted that the monitoring tool can be used to monitor at least one game item in the game, and the monitoring tool can be used to monitor game items in different games. The specific settings can be configured according to the needs, and there are no limitations here.
[0035] The aforementioned game projects can be formed by specific elements and / or game mechanics within the game, and players can control game characters to execute specific game logic within these projects.
[0036] In this embodiment, since the monitoring tool can monitor at least two specific games, such as at least two different game items or at least two different games, the terminal needs to determine the specific game or specific game item that the monitoring tool needs to monitor at the current moment. The terminal can use the specific game or specific game item that the monitoring tool needs to monitor at the current moment as the target game.
[0037] In some embodiments, since the monitoring tool for monitoring the target game is an auxiliary tool for maintaining the game data of the target game, such a tool should not affect the business operation of the game server itself running online, as well as the operating efficiency and security of the online environment of the game server. Therefore, the monitoring tool can be set up independently of the game server, that is, the monitoring tool can run independently to better monitor the game data of the target game, so that when there are abnormalities in the game data of the target game, it can issue an alert to relevant personnel.
[0038] The aforementioned game server is used in the actual production environment. The database used by the game server is officially provided to users, allowing users to perform user operations in this production environment. The database in this production environment needs to be maintained by specific personnel with the appropriate permissions.
[0039] Understandably, in order to ensure the accuracy and portability of the monitoring tools, these tools can be set up in the development environment of the target game. Since the development and production environments have consistent configurations, such as using the same database, middleware, and application layers, the monitoring tools can be set up in the development environment of the target game to enable the use of these tools on the intranet to maintain the game data of the target game.
[0040] The aforementioned development environment is used for developing the target game. It is typically configured to facilitate development and debugging and may include debugging tools, logging, and / or other development tools.
[0041] In some embodiments, since the game data of the target game is not static and can be updated over time (e.g., the gameplay of the target game is upgraded, or the data volume of specific players in the target game increases), the terminal can periodically trigger the monitoring tool to monitor the target game. For example, an automated tool, such as Jenkins, can be introduced, and the time of the introduced automated tool can be configured to set a specific monitoring time for the target game, such as Wednesday at 0:00. That is, at 0:00 every Wednesday, the target game is the game that needs to be monitored, thereby prompting the automated tool to run regularly, so that the initial monitoring tool periodically performs the monitoring behavior of the target game.
[0042] Specifically, the aforementioned determination of the target game that the monitoring tool needs to monitor may include: the terminal can obtain the current time information through an automated tool, and then, when the automated tool determines that the current time information matches the monitoring time corresponding to the target game, it sends a data monitoring request for the target game to the monitoring tool, so that the monitoring tool can determine the target game that needs to be monitored based on the data monitoring request, thereby prompting the monitoring tool to perform monitoring behavior on the target game.
[0043] It should be noted that since there may be at least two specific games that the monitoring tool needs to monitor, the monitoring tool can synchronously use multiple threads to monitor different specific games separately, or it can asynchronously monitor different specific games at different monitoring times, meaning that the monitoring time for different specific games to be monitored is different.
[0044] Optionally, the monitoring time for the target game can be set according to the version update cycle of the target game. For example, if Thursday is set as the release date of a new version of the target game, then Wednesday at 0:00 can be set as the corresponding monitoring time for the target game to start a periodic task. At Wednesday at 0:00, the game data of the target game is obtained from the production environment and backed up to the development environment, as well as corresponding data analysis.
[0045] Step 102: Using the monitoring tool described above, based on the monitoring configuration information of the target game, send a game data query request to the data copy service for the database of the game server of the target game. The game data query request includes game query instruction parameters.
[0046] It is understandable that, due to the different characteristics of different games, the monitoring tool may need to monitor at least two specific games. Therefore, the game data that needs to be monitored differs between games. For example, a certain game may need to focus on player personal data (player inventory data, chat data, battle lineup data, etc.). Furthermore, some game data in different games is constantly updated as the game operates, such as with the addition of new content. Therefore, in this embodiment, the monitoring tool is configured differently when monitoring different specific games. That is, the monitoring tool is configured with monitoring configuration information for different games. This monitoring configuration information is used to indicate the range of data to be monitored in the corresponding game. Thus, the terminal can select a portion of game data from the massive amount of game data of the corresponding game for monitoring based on the monitoring configuration information, thereby improving the monitoring efficiency of the game.
[0047] The monitoring configuration information of the target game is used to indicate the range of data that needs to be monitored in the target game, so that the game data of the target game can be obtained and monitored through the monitoring configuration information of the target game.
[0048] Furthermore, in order to ensure the security of game data in the game server's database, it is necessary to control access permissions to the database storing game data. In this embodiment, a data copy service is deployed so that when it is necessary to access the game server's database, the deployed data copy service can be used to access the game server's database and obtain the corresponding game data.
[0049] In response, the aforementioned monitoring tool can initiate a game data query request to the data copy service based on its own configured monitoring information for the target game. The data copy service can then respond to the game data query request, retrieve the corresponding game data from the target game's game server database based on the game query instruction parameters in the request, and copy it.
[0050] The aforementioned data copying service can be used solely to provide services to monitoring tools without participating in the execution of the game server's database logic, thereby ensuring the data security of the game server's database.
[0051] Understandably, by sending requests directly to the game's database via the data copy service, bypassing the game server, the data monitoring tool can avoid impacting the operation of the online server during testing and use.
[0052] The game query indication parameters mentioned above include, but are not limited to, query location and query conditions. The query location is used to indicate the range of data to be queried, so that data that meets the query conditions can be retrieved from the range of data. The query location includes, but is not limited to, the data set name (such as the data table name) and the query file address. The specific settings can be set according to the requirements and are not limited here. For example, the data copy service can query a certain data table in the database of the game server based on the data table name, and then retrieve the corresponding data that meets the query conditions from the data table based on the query conditions.
[0053] It should be noted that different games can be configured with different query locations and / or query conditions to achieve personalized configuration. For example, different games can configure which content to monitor based on the characteristics of their stored data, so as to analyze the content to be monitored, such as whether there are any anomalies in the changes in the amount of data occupied by the content.
[0054] The above query conditions can be set according to the data type corresponding to different query positions. For example, if the data type corresponding to the query position is player type, the query condition can be specified as the player ID with the highest game participation. For example, the player's level or combat power can be judged to select the player with the highest level or combat power. Alternatively, the player IDs of some players can be randomly selected as query conditions. The specific settings can be set according to the needs and are not limited here.
[0055] In some embodiments, the data copying service described above is deployed to have read-only permissions for game data in the database of the game server described above.
[0056] Understandably, database administrators (DBAs) or other relevant personnel deploy a data copy service to access production environment data with read-only permissions. This implements access control over production environment data, preventing potential data corruption by access tools. By granting only read permissions, and without modifying or deleting online data, the security of online players' data is ensured. The aforementioned online data refers to game data stored in the game server's database.
[0057] Furthermore, since the monitoring tools used for data monitoring are auxiliary tools, in order to avoid affecting online data security, the data copy service deployed only provides external copy interfaces for data reading operations and does not provide other interfaces, so it is impossible to modify or delete online data.
[0058] In some embodiments, the data copying service described above can be deployed on a machine that can access the database of the game server. This machine can be the server of the running development environment where the monitoring tool is located, or it can be a server that is not the running development environment where the monitoring tool is located. The specific configuration can be determined according to the requirements and is not limited here.
[0059] In some embodiments, in order to ensure the data security of online players, the monitoring tool, as an auxiliary tool, needs to avoid affecting the online data security. Therefore, this can be ensured by limiting the access range of the machine where the data copy service is located, for example, by configuring firewall policies.
[0060] Specifically, configure an access whitelist for the firewall of the machine where the data copy service is located. This access whitelist includes at least one access IP address, and set the IP address corresponding to the development environment where the monitoring tool is located to be among the access IP addresses in this access whitelist.
[0061] Step 103: Using the data copy service described above, retrieve the first game data indicated by the game query instruction parameter from the database of the game server, and send the first game data to the monitoring tool.
[0062] In this embodiment, the first game data to be monitored can be obtained from the database of the game server through a data copy service. This first game data is the game data to be monitored in the target game. Then, the first game data is sent to the monitoring tool to realize the analysis of the first game data copied from the database of the game server located on the external network to the development environment without affecting the normal operation of the game server's database. By configuring the game query instruction parameters, the scope of data monitoring can be specified to obtain the game data to be monitored without having to write additional monitoring logic in the database of the game server.
[0063] Specifically, the service interface of the aforementioned data copying service can provide external services via HTTP, for example, in the form of a microservice.
[0064] For example, such as Figure 2 As shown, if an automation tool is set up, the aforementioned automation tool can process the configured periodic tasks one by one during the script execution process, triggering the monitoring tool to prompt the monitoring tool to call the data copy service based on the game query instruction parameters configured in the configuration list, so as to obtain the latest version data of the current period, wherein the latest version data is stored in the production environment database of the game server.
[0065] In some embodiments, since different game servers use different databases, such as MongoDB or MySQL, and different databases have different data storage methods, the contents of the corresponding data query indication parameters are different. Therefore, the game query indication parameters need to match the game server's database so that the corresponding game data can be obtained from the game server's database based on the game query indication parameters.
[0066] In some embodiments, obtaining the first game data indicated by the game query indication parameter from the database of the game server through the data copy service may include: the terminal may generate a data copy request based on the game query indication parameter through the data copy service, and send the data copy request to the database of the game server; then, the terminal may receive the first game data fed back by the database of the game server based on the data copy request through the data copy service.
[0067] For example, the data copy service can receive an HTTP request sent by a monitoring tool, parse the parameters passed in the HTTP request, determine the data content that needs to be copied, generate a data copy request, and then connect to the game server's database, issue a data copy request, and execute the data copy.
[0068] In some embodiments, to ensure that the data copy service can accurately locate the game server's database and that the game server's database has data access configuration information, the data copy service is configured with access identity information and access address. The process of generating a data copy request based on the game query indication parameters through the data copy service and sending the data copy request to the game server's database can include: generating a data copy request based on the access identity information and the game query indication parameters through the data copy service; then, sending the data copy request to the game server's database based on the access address through the data copy service. This allows the game server's database to perform permission verification on the data copy service based on the access identity information, and after successful permission verification, to obtain the first game data based on the game query indication parameters.
[0069] The aforementioned access identity information may include the username and password associated with the data copy service, or the username and password of the game server's database, etc. The specific settings can be configured according to requirements and are not limited here. By setting access identity information, it is not necessary to provide it to relevant staff or transmit it directly in the interface, thereby reducing the risk of exposure of access identity information used for authorization verification.
[0070] In some embodiments, the game query indication parameters include a query location and query conditions. Obtaining the first game data indicated by the game query indication parameters from the database of the game server through the data copy service may include: determining the data storage space corresponding to the query location from the database of the game server through the data copy service, and then obtaining the first game data that meets the query conditions from the data storage space through the data copy service.
[0071] For example, when using MongoDB for storage, configure the monitoring query location, such as the collection name and query conditions. The game query indicator parameters are shown below:
[0072] [{
[0073] "collection":"Avatar",
[0074] "query_conditions":[{"uid":10610441984},{"uid":10910361966}]
[0075] Here, Avatar refers to the player data set, which is the name of the data set mentioned above. "uid":10610441984 and "uid":10910361966 are player IDs, which are the query conditions mentioned above.
[0076] As can be seen from the above example, the data copy service can retrieve game data for players with IDs "uid":10610441984 and "uid":10910361966 from the player dataset based on the game query instruction parameters in the example.
[0077] In some embodiments, the monitoring tool is set in the development environment of the target game. After sending the first game data to the monitoring tool, the method may further include: storing the first game data in the development environment of the target game through the monitoring tool, such as... Figure 2 As shown, the monitoring tool stores the first game data in the development environment database to facilitate the backup of the copied first game data, the analysis of the first game data when needed, or the use of the first game data as comparison data.
[0078] In some embodiments, since the monitoring tool stores the first game data in the development environment of the target game, and the monitoring tool can periodically monitor the game data of the target game based on the monitoring configuration information of the target game, the development environment of the target game stores at least one version of historical game data that matches the monitoring configuration information. The at least one version of historical game data is game data obtained by the monitoring tool from the database of the game server using the historical data copy service in at least one historical period.
[0079] Accordingly, storing the first game data in the development environment of the target game using the monitoring tool may include: obtaining current time information through the monitoring tool, allowing the monitoring tool to add a timestamp to the first game data based on the current time information to obtain updated first game data, and then storing the updated first game data in the development environment of the target game using the monitoring tool. This allows for easy differentiation of the time periods to which different game data belong by backing up and storing data according to different version cycles.
[0080] For example, since the monitoring of the target game is generally divided into periods, such as weeks or months, the current time information mentioned above can use the game's server launch time as the starting point to accumulate the week number of each monitoring period. After copying the first game data, an additional week marker field is added to the copied first game data to distinguish data from different week versions. Then, the data with the added marker is stored in the database used by the monitoring tool. The database used by the data monitoring tool can be a separate development environment database deployed in the development environment, used as a backup of the online database of the game server.
[0081] Step 104: Using the monitoring tool described above, analyze the data of the first game based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game.
[0082] The aforementioned data analysis rules are used to indicate the analysis and processing methods for the game data that the monitoring tool currently needs to monitor, so as to analyze the first game data through the data analysis rules and obtain data analysis results about the target game.
[0083] Specifically, the data analysis results can be output as analysis reports or early warning reports. For example, comparing the changes between the first game data of the target game and the game data of other versions, issuing early warnings about at least some abnormalities in the first game data of the target game, and notifying relevant staff via email or by calling a third-party notification service for data storage design, maintenance adjustment and confirmation.
[0084] Understandably, obtaining data analysis results from the target game allows developers to easily determine the volume of data in the first game's data, or whether the volume of a specific storage field within the first game's data is reasonable. For example, it can help determine if there is expired content in the game data corresponding to time-limited gameplay in the target game, so that expired content can be cleared in a timely manner. It can also help determine if the storage format of the game data is appropriately compressed. Furthermore, it can help determine if the gameplay of the target game is reasonable by checking if there are unused items in the player's inventory data. Finally, it can help determine if the data storage location of the first game's data is reasonable, meaning that at least some data in the first game's data should be stored independently rather than centrally, to avoid a single document exceeding the database engine's storage limit. Thus, the data analysis results can assist relevant personnel in reviewing the data, eliminating design flaws, and resolving problems as early as possible.
[0085] For example, when the data analysis results are presented as an analysis report, the report can reflect the overall changes in the target game's save data, the save field with the largest proportion in the target game, and the save field with the most changes in the target game, so as to assist relevant staff in designing and adjusting save content, save format, and data cleaning rules.
[0086] In some embodiments, the data analysis rules include a version indicator parameter, which indicates at least one version of historical game data that needs to be compared with the first game data of the target game. The above-mentioned analysis of the first game data by the monitoring tool based on the data analysis rules in the monitoring configuration information to obtain the data analysis result of the target game may include: selecting the corresponding version of the second game data from the historical game data of each version stored in the development environment of the target game by the monitoring tool based on the version indicator parameter, and then analyzing the first game data based on the second game data to obtain the data analysis result of the first game data.
[0087] The aforementioned version indication parameters include, but are not limited to, at least one parameter used to indicate the game, such as game query indication parameters or game identifier, and / or at least one parameter used to indicate the specific version in the game, such as version identifier or time stamp, for example, the previous version identifier, which is used to obtain game data of the previous version. The specific settings can be configured according to the requirements and are not limited here.
[0088] For example, such as Figure 2 As shown, the monitoring tool can obtain second game data from the development environment database, analyze the first game data based on the second game data, and output the corresponding data analysis results.
[0089] In some embodiments, the target game corresponds to at least two storage fields, that is, different game data of the target game are stored in different storage fields, such as game data of different players in the target game. The above analysis of the first game data based on the second game data to obtain the data analysis result of the first game data may include: determining the first data volume of the first game data based on the data volume statistics method corresponding to the database of the game server, the first data volume including the data volume of the first game data in the at least two storage fields; and obtaining the second data volume of the second game data, the second data volume including the data volume of the second game data in the at least two storage fields. Finally, based on the first data volume and the second data volume, determining the data volume changes of the at least two storage fields.
[0090] The acquisition of the second data volume of the aforementioned second game data can be determined in real time based on the data volume statistics method corresponding to the database of the aforementioned game server, or it can be the data volume obtained and stored when analyzing the second game data in historical periods. The specific settings can be set according to the requirements and are not limited here.
[0091] The data stored in the aforementioned save field is business data that needs to be persistently stored in the database within the game, such as player level information and player item information.
[0092] Data volume can be a way to measure the size of stored data, usually measured in bytes such as Kb or Mb.
[0093] Specifically, by comparing and analyzing the data volume of the save field in different versions of game data, data analysis is performed, and change reports are given, such as the data volume ratio of the save field, the data volume ratio of the largest save field, and the rate of change of the data volume of the save field. It can also issue warnings for abnormal data that exceeds the configured threshold. For example, in the MongoDB database, the storage limit of a single document is 16MB, and the corresponding threshold can be set to 10MB to issue a warning after detecting the data volume of a document. The document may include at least one save field.
[0094] It is understandable that different game servers use different databases, such as MongoDB and MySQL, and different databases have different data storage methods. Therefore, it is necessary to calculate the data volume based on the data storage method of the corresponding database. In other words, different game server databases correspond to different data volume calculation methods.
[0095] For example, a MongoDB database can use the database query statement corresponding to that MongoDB database, Object.bsonsize(db.avatar.findOne({“uid”:10001001})), to obtain the corresponding data volume. Alternatively, after reading the data using the pymongo tool, the data can be encoded using BSON, and the data volume corresponding to at least one storage field can be counted through the interface int size = bson.BSON.encode(doc).
[0096] In some embodiments, the method may further include: determining the data volume distribution of the at least two storage fields based on the first data volume, for example, the data volume ratio between each storage field and the total storage fields. Then, monitoring whether there are any anomalies in the first game data of the target game based on the data volume distribution and / or the data volume changes, and generating an early warning report for the target game if the data volume distribution and / or the data volume changes meet preset early warning conditions.
[0097] The aforementioned preset warning conditions can be that the percentage of data in the stored field reaches a preset warning percentage threshold, or that the change in data volume exceeds a preset change threshold. The specific conditions can be set according to the requirements and are not limited here.
[0098] It should be noted that because different games can be customized with different query locations and / or query conditions, the data analysis rules for different games will also differ accordingly. Furthermore, the thresholds used for comparison in the aforementioned preset warning conditions can be estimated and set by the user, or updated after multiple data collections as the game operates.
[0099] For example, when using MongoDB for storage and configuring the query location (i.e., the name of the collection to be monitored) and query conditions, it is also necessary to configure thresholds for judging preset warning conditions. These could be thresholds for the data volume of documents containing all saved fields that match the game query indicator parameters, or thresholds for the data volume of a single saved field. Specific game query indicator parameters and data analysis rules are shown below:
[0100] [{
[0101] "collection":"Avatar",
[0102] "query_conditions":[{"uid":10610441984
[0103] },{“uid”:10910361966
[0104] }]
[0105] "max_size": 1048576, / / Size in bytes
[0106] “field_max_size”:{
[0107] "bag_data": 102400, / / Size in bytes
[0108] }
[0109] }]
[0110] Here, Avatar refers to the player data set, which is the name of the aforementioned data set. "uid":10610441984 and "uid":10910361966 are player IDs, which are the query conditions. max_size is used to indicate the threshold for the total data size of a single player's Avatar, which is set to 1048576 bytes. bag_data is used to indicate the threshold for the data size of the player's inventory, which is set to 102400 bytes. By monitoring the overall data size of the stored fields and the data size of local fields, data security is ensured.
[0111] As shown in the example above, if the player data for player IDs "uid":10610441984 or "uid":10910361966" exceeds 1,048,576 bytes, a warning report for the target game will be generated. If the data for the player's inventory exceeds 102,400 bytes, a warning report for the target game will also be generated. Here, 1,048,576 bytes is 1MB, and 102,400 bytes is 100KB.
[0112] In addition, the amount of data for each storage field is determined, such as by identifying a preset number of storage fields with the highest data volume, or by identifying the storage fields with the largest changes in data volume.
[0113] In this embodiment, data change and early warning reports are generated by comparing and analyzing the amount of stored data. Using a data volume statistics method corresponding to the production environment database, the data volume of different versions is compared, and change reports are provided for the overall data volume, the fastest changing data, etc. Alarms are triggered for data exceeding the configured threshold size.
[0114] As can be seen from the above, by determining the target game that the monitoring tool needs to monitor, and then, based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request containing game query indication parameters to the database of the game server of the target game to the data copy service. The data copy service then retrieves the first game data indicated by the game query indication parameters from the database of the game server and sends the first game data to the monitoring tool. The monitoring tool then analyzes the first game data based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game. Thus, by copying the game data to be checked through the data copy service and then analyzing and processing the game data to be checked by the monitoring tool, the efficiency of game data inspection can be improved, and abnormal data can be detected in a timely manner.
[0115] This embodiment also provides a data monitoring device, which can be integrated into a terminal device. For example, such as Figure 3 As shown, the data monitoring device may include:
[0116] The game determination module 301 is used to determine the target game that the monitoring tool needs to monitor.
[0117] The query request module 302 is used to send a game data query request for the database of the game server of the target game to the data copy service based on the monitoring configuration information of the target game through the monitoring tool. The game data query request includes game query indication parameters.
[0118] The data acquisition module 303 is used to obtain the first game data indicated by the game query indication parameter from the database of the game server through the data copy service, and send the first game data to the monitoring tool.
[0119] The data analysis module 304 is used to analyze the first game data based on the data analysis rules in the monitoring configuration information using the monitoring tool, and to obtain the data analysis results of the target game.
[0120] In some embodiments, the monitoring tool is set in the development environment of the target game, and the data monitoring device further includes a data storage module, which is specifically used for:
[0121] The aforementioned monitoring tools are used to store the first game data in the development environment of the target game.
[0122] In some embodiments, the development environment of the target game stores historical game data for at least one version that matches the monitoring configuration information, and the data storage module is specifically used for:
[0123] Get the current time information;
[0124] Based on the current time information above, a time stamp is added to the first game data to obtain the updated first game data;
[0125] The aforementioned monitoring tools are used to store the updated first game data in the development environment of the target game.
[0126] In some embodiments, the data analysis rules above include a version indication parameter, and the data analysis module 304 is specifically used for:
[0127] Based on the version indication parameters, the monitoring tools described above select the second game data for the corresponding version from the historical game data of each version stored in the development environment of the target game.
[0128] Based on the second game data mentioned above, the first game data mentioned above is analyzed to obtain the data analysis results of the first game data.
[0129] In some embodiments, the target game corresponds to at least two save fields, and the data analysis module 304 is specifically used for:
[0130] Based on the data volume statistics method corresponding to the database of the game server mentioned above, the first data volume of the first game data is determined, and the first data volume includes the data volume of the first game data in the at least two storage fields.
[0131] Obtain the second data volume of the aforementioned second game data, wherein the second data volume includes the data volume of the aforementioned second game data in the aforementioned at least two storage fields;
[0132] Based on the first data volume and the second data volume mentioned above, determine the changes in the data volume of the at least two storage fields.
[0133] In some embodiments, the data monitoring device further includes a report generation module, which is specifically used for:
[0134] Based on the aforementioned first data volume, determine the data volume distribution of the aforementioned at least two storage fields;
[0135] If the above data distribution and / or the above data change conditions meet the preset warning conditions, a warning report for the target game will be generated.
[0136] In some embodiments, the data acquisition module 303 is specifically used for:
[0137] The data copy service described above generates a data copy request based on the game query instruction parameters and sends the data copy request to the game server's database.
[0138] Through the aforementioned data copy service, the system receives the first game data from the database of the aforementioned game server based on the aforementioned data copy request.
[0139] In some embodiments, the data copy service is configured with data access configuration information, which includes access identity information and access address. The data acquisition module 303 is specifically used for:
[0140] The data copy service described above generates a data copy request based on the access identity information and the game query instruction parameters described above.
[0141] Through the aforementioned data copy service, based on the aforementioned access address, the aforementioned data copy request is sent to the database of the game server, so that the database of the game server can perform permission verification on the aforementioned data copy service based on the aforementioned access identity information, and after the permission authentication is successful, obtain the first game data based on the aforementioned game query instruction parameters.
[0142] In some embodiments, the game determination module 301 is specifically used for:
[0143] Obtain the current time information using automated tools;
[0144] When the aforementioned automated tool determines that the current time information matches the monitoring time of the target game, it sends a data monitoring request for the target game to the monitoring tool, so that the monitoring tool can determine the target game that needs to be monitored based on the data monitoring request.
[0145] In some embodiments, the game query indication parameters include query location and query conditions, and the data acquisition module 303 is specifically used for:
[0146] The data copying service described above is used to determine the data storage space corresponding to the query location from the database of the game server.
[0147] The first game data that meets the above query conditions is obtained from the above data storage space through the above data copy service.
[0148] In some embodiments, the data copying service described above is deployed to have read-only permissions for game data in the database of the game server described above.
[0149] As can be seen from the above, by determining the target game that the monitoring tool needs to monitor, and then, based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request containing game query indication parameters to the database of the game server of the target game to the data copy service. The data copy service then retrieves the first game data indicated by the game query indication parameters from the database of the game server and sends the first game data to the monitoring tool. The monitoring tool then analyzes the first game data based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game. Thus, by copying the game data to be checked through the data copy service and then analyzing and processing the game data to be checked by the monitoring tool, the efficiency of game data inspection can be improved, and abnormal data can be detected in a timely manner.
[0150] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.
[0151] like Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 400 includes a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, and a computer program stored in the memory 402 and executable on the processor. The processor 401 and the memory 402 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0152] The processor 401 is the control center of the electronic device 400. It connects various parts of the electronic device 400 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 402, and by calling data stored in the memory 402, it executes various functions and processes data of the electronic device 400, thereby providing overall monitoring of the electronic device 400. The processor 401 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic diagrams disclosed in the embodiments of this application.
[0153] In this embodiment, the processor 401 in the electronic device 400 loads the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 runs the applications stored in the memory 402 to realize various functions, such as:
[0154] Determine the target game that the monitoring tool needs to monitor;
[0155] Based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request to the database of the game server of the target game to the data copy service. The game data query request includes game query instruction parameters.
[0156] The data copy service described above is used to retrieve the first game data indicated by the game query parameter from the database of the game server and send the first game data to the monitoring tool.
[0157] The monitoring tools described above analyze the data of the first game based on the data analysis rules in the monitoring configuration information, and obtain the data analysis results of the target game.
[0158] Therefore, the electronic device 400 provided in this embodiment can bring the following technical effects: improve the efficiency of game data inspection, and detect abnormal data in a timely manner.
[0159] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0160] Optional, such as Figure 4 As shown, the electronic device 400 also includes: a touch display screen 403, a radio frequency circuit 404, an audio circuit 405, an input unit 406, and a power supply 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power supply 407. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0161] The touch display screen 403 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 403 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 401. It can also receive and execute commands from the processor 401. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 401 to determine the type of touch event. Subsequently, the processor 401 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 403 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 403 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 403 can also be used as part of the input unit 406 to achieve input functions.
[0162] The radio frequency circuit 404 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.
[0163] Audio circuit 405 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 405 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuit 405, converted back into audio data, and then processed by processor 401 before being transmitted via radio frequency circuit 404 to, for example, another electronic device, or output to memory 402 for further processing. Audio circuit 405 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.
[0164] The input unit 406 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0165] Power supply 407 is used to supply power to various components of electronic device 400. Optionally, power supply 407 can be logically connected to processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 407 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0166] although Figure 4 As not shown in the diagram, the electronic device 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0167] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0168] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0169] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the data monitoring methods provided in this application. The computer program can execute the steps of the following data monitoring method:
[0170] Determine the target game that the monitoring tool needs to monitor;
[0171] Based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request to the database of the game server of the target game to the data copy service. The game data query request includes game query instruction parameters.
[0172] The data copy service described above is used to retrieve the first game data indicated by the game query parameter from the database of the game server and send the first game data to the monitoring tool.
[0173] The monitoring tools described above analyze the data of the first game based on the data analysis rules in the monitoring configuration information, and obtain the data analysis results of the target game.
[0174] As can be seen, a computer program can be loaded by a processor to execute any of the data monitoring methods provided in the embodiments of this application, thereby bringing the following technical effects: improving the efficiency of game data inspection and timely detecting abnormal data.
[0175] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0176] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0177] Since the computer program stored in the computer-readable storage medium can execute any of the data monitoring methods provided in the embodiments of this application, the beneficial effects that any of the data monitoring methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0178] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0179] In the above embodiments of the data monitoring device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes and beneficial effects of the data monitoring device, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the data monitoring method in the above embodiments, and will not be repeated here.
[0180] The foregoing has provided a detailed description of a data monitoring method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data monitoring method, characterized in that, The method includes: Determine the target game that the monitoring tool needs to monitor; Based on the monitoring configuration information of the target game, the monitoring tool sends a game data query request to the database of the game server of the target game to the data copy service. The game data query request includes game query indication parameters. The data copy service is used to retrieve the first game data indicated by the game query indication parameter from the database of the game server, and then send the first game data to the monitoring tool. The monitoring tool analyzes the first game data based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game. The target game corresponds to at least two save fields, the data analysis rules include a version indicator parameter, and the process of analyzing the first game data using the monitoring tool based on the data analysis rules in the monitoring configuration information to obtain the data analysis results of the target game includes: Based on the version indication parameters, the monitoring tool selects the second game data corresponding to the version from the historical game data of each version stored in the development environment of the target game; Based on the data volume statistics method corresponding to the database of the game server, the first data volume of the first game data is determined, and the first data volume includes the data volume of the first game data in the at least two storage fields; Obtain a second data volume of the second game data, the second data volume including the data volume of the second game data in the at least two storage fields; Based on the first data volume and the second data volume, determine the changes in the data volume of the at least two storage fields.
2. The data monitoring method as described in claim 1, characterized in that, The monitoring tool is set up in the development environment of the target game, and after sending the first game data to the monitoring tool, it further includes: The monitoring tool stores the first game data in the development environment of the target game.
3. The data monitoring method as described in claim 2, characterized in that, The development environment of the target game stores historical game data for at least one version that matches the monitoring configuration information. The step of storing the first game data in the development environment of the target game using the monitoring tool includes: Get the current time information; Based on the current time information, a time stamp is added to the first game data to obtain the updated first game data; The updated first game data is stored in the development environment of the target game using the monitoring tool.
4. The data monitoring method as described in claim 3, characterized in that, Also includes: Based on the first data volume, determine the data volume distribution of the at least two storage fields; If the data distribution and / or the data change meet the preset warning conditions, a warning report for the target game is generated.
5. The data monitoring method as described in claim 1, characterized in that, The step of retrieving the first game data indicated by the game query indication parameter from the game server's database through the data copy service includes: The data copy service generates a data copy request based on the game query indication parameters and sends the data copy request to the game server's database. The data copy service receives the first game data from the game server's database based on the data copy request.
6. The data monitoring method as described in claim 5, characterized in that, The data copy service is configured with data access information, including access identity information and access address. The step of generating a data copy request based on the game query indication parameters through the data copy service and sending the data copy request to the game server's database includes: The data copy service generates a data copy request based on the access identity information and the game query indication parameters. Through the data copy service, based on the access address, the data copy request is sent to the game server's database, so that the game server's database performs permission verification on the data copy service based on the access identity information, and after the permission authentication is successful, obtains the first game data based on the game query indication parameters.
7. The data monitoring method as described in claim 1, characterized in that, The determination of the target game that the monitoring tool currently needs to monitor includes: Obtain the current time information using automated tools; When the automated tool determines that the current time information matches the monitoring time corresponding to the target game, it sends a data monitoring request for the target game to the monitoring tool, so that the monitoring tool can determine the target game that needs to be monitored based on the data monitoring request.
8. The data monitoring method as described in claim 1, characterized in that, The game query indication parameters include query location and query conditions. The step of retrieving the first game data indicated by the game query indication parameters from the game server's database via the data copy service includes: The data copy service is used to determine the data storage space corresponding to the query location from the database of the game server. The data copy service is used to retrieve the first game data that meets the query conditions from the data storage space.
9. The data monitoring method according to any one of claims 1 to 8, characterized in that, The data copy service is deployed with read-only permissions for the game data in the database of the game server.
10. A data monitoring device, characterized in that, The device includes: The game determination module is used to determine the target game that the monitoring tool needs to monitor. The query request module is used to send a game data query request for the database of the game server of the target game to the data copy service based on the monitoring configuration information of the target game through the monitoring tool. The game data query request includes game query indication parameters. The data acquisition module is used to obtain the first game data indicated by the game query indication parameter from the database of the game server through the data copy service, and send the first game data to the monitoring tool; The data analysis module is used to analyze the first game data using the monitoring tool based on the data analysis rules in the monitoring configuration information, and obtain the data analysis results of the target game. The target game corresponds to at least two save fields, the data analysis rules include a version indicator parameter, and the data analysis module is specifically used for: Based on the version indication parameters, the monitoring tool selects the second game data corresponding to the version from the historical game data of each version stored in the development environment of the target game; Based on the data volume statistics method corresponding to the database of the game server, the first data volume of the first game data is determined, and the first data volume includes the data volume of the first game data in the at least two storage fields; Obtain a second data volume of the second game data, the second data volume including the data volume of the second game data in the at least two storage fields; Based on the first data volume and the second data volume, determine the changes in the data volume of the at least two storage fields.
11. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the data monitoring method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data monitoring method as described in any one of claims 1 to 9.