Log compression processing methods, apparatus, electronic devices, and readable storage media

By extracting general information under fixed dimensions and related information under changing dimensions from the log processing of the game client, and generating compressed logs, the problem of wasted log storage resources in the game client is solved, and storage and transmission efficiency is improved.

CN116226069BActive Publication Date: 2026-11-17NETEASE (SHANGHAI) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In existing technologies, the storage resource utilization rate of game client logs is low because the repeated storage of the same information leads to a waste of storage resources.

Method used

By extracting general information from fixed dimensions and correlation information from changing dimensions of log data, compressed logs are generated, retaining only meaningful information and reducing redundant storage.

Benefits of technology

It improves the utilization rate of storage resources, reduces the burden of network transmission and server processing, and optimizes storage and transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226069B_ABST
    Figure CN116226069B_ABST
Patent Text Reader

Abstract

This application discloses a log compression processing method, apparatus, electronic device, and computer-readable storage medium. The embodiments of this application involve: acquiring multiple log records from a game client; extracting general log information under preset fixed dimensions of log data based on the log records; extracting at least one game-related information under each preset game change dimension based on the log records; generating log data based on the game-related information under each game change dimension to obtain at least one compressed log message, wherein each compressed log message indicates at least one change in game operation-related data under a game change dimension; and obtaining the processed log based on the general log information and the compressed log information. The embodiments of this application can improve the utilization rate of storage resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a log compression processing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] The rise of the internet and the continuous development and evolution of hardware and software technologies have spurred the emergence of smart devices and software. Simultaneously, a large number of games of various themes have sprung up to meet user needs. In game development and testing, online performance data collection is a crucial component. By analyzing and processing the performance data collected during game operation, the game's performance can be determined.

[0003] In existing technologies, game clients perform real-time event tracking during operation, requiring the storage of these event logs for analysis when needed. However, existing methods store a large number of game event logs, and the repeated information in multiple logs generated by a single client on a single terminal leads to significant storage resource consumption on storing identical information, resulting in low storage resource utilization. Summary of the Invention

[0004] This application provides a log compression processing method, apparatus, electronic device, and computer-readable storage medium, which can improve the utilization rate of storage resources.

[0005] In a first aspect, embodiments of this application provide a log compression processing method, the method comprising:

[0006] Retrieve multiple log entries from the game client;

[0007] Based on the above-mentioned log records, extract general log information under the preset fixed dimensions of log data, wherein the log information under the above-mentioned fixed dimensions of log data remains unchanged in the log records.

[0008] Based on the above-mentioned log records, at least one game-related information under each preset game change dimension is extracted. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0009] Log data is generated based on the game-related information under each of the above game change dimensions, resulting in at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension.

[0010] Based on the general log information and the compressed log information mentioned above, the processed log is obtained.

[0011] Secondly, embodiments of this application provide a log compression and restoration method, the method comprising:

[0012] Obtain a log restoration request instruction, wherein the log restoration request instruction includes the player information and login time of the player to whom the log to be restored belongs;

[0013] Based on the player information and login time of the game players mentioned above, general log information under the preset fixed dimensions of log data is found. The log information under the above fixed dimensions of log data remains unchanged in the point log records.

[0014] Based on the player information and login time of the game players mentioned above, at least one compressed log message is found under the preset game change dimension. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension.

[0015] Based on the above-mentioned at least one compressed log information, at least one game-related information under each game change dimension is determined, wherein each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data, and the above-mentioned game operation-related data can change during game operation;

[0016] Based on at least one game-related information under each game change dimension and the aforementioned general log information, at least one event log record from the game client is reconstructed.

[0017] Thirdly, embodiments of this application also provide a log compression processing apparatus, the apparatus comprising:

[0018] The log acquisition module is used to acquire multiple log records from the game client.

[0019] The first information extraction module is used to extract general log information under a preset fixed dimension of log data based on the above-mentioned log records, wherein the log information under the above-mentioned fixed dimension of log data remains unchanged in the log records.

[0020] The second information extraction module is used to extract at least one game-related information under each preset game change dimension based on the above-mentioned log records. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0021] The data generation module is used to generate log data based on the game-related information under each of the above game change dimensions, and to obtain at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension.

[0022] The log generation module is used to obtain processed logs based on the general log information and the compressed log information mentioned above.

[0023] Fourthly, embodiments of this application also provide a log compression and restoration apparatus, the apparatus comprising:

[0024] The instruction acquisition module is used to acquire log restoration request instructions, wherein the log restoration request instructions include player information and player login time of the game to which the log to be restored belongs;

[0025] The first information search module is used to search for general log information under a preset fixed dimension of log data based on the player information and login time of the aforementioned game players. The log information under the aforementioned fixed dimension of log data remains unchanged in the point log records.

[0026] The second information search module is used to search for at least one compressed log message under a preset game change dimension based on the player information and login time of the aforementioned game players. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension.

[0027] The information determination module is used to determine at least one game-related information under each game change dimension based on the above-mentioned at least one compressed log information. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0028] The log restoration module is used to restore at least one event log record from the game client based on at least one game-related information under each game change dimension and the aforementioned general log information.

[0029] Fifthly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; the processor loads instructions from the memory to execute steps in any log compression processing method or log compression and restoration method provided in embodiments of this application.

[0030] Sixthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any log compression processing method or log compression and restoration method provided in embodiments of this application.

[0031] In this embodiment, multiple log records from the game client are acquired. Based on these log records, general log information under a preset fixed dimension of log data is extracted. This general log information remains unchanged within the log records, thus avoiding excessive redundant data in the game logs by recording only information that remains constant within the log records. Then, at least one game-related piece of information under each preset game change dimension is extracted from the log records. Each piece of game-related information includes game operation-related data and time information related to this data. This game operation-related data can change during game operation. Extracting information from the game change dimension improves the utilization of storage resources. Furthermore, log data is generated based on the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension. By compressing the extracted information under the game change dimensions, the storage resources required for information extraction are reduced while retaining the information content, thereby improving the utilization rate of storage resources. Finally, based on the aforementioned general log information and the aforementioned compressed log information, the processed log is obtained, thereby improving the overall utilization rate of storage resources. Attached Figure Description

[0032] 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.

[0033] Figure 1 This is a schematic diagram of the log compression processing system provided in an embodiment of this application;

[0034] Figure 2 This is a schematic flowchart of one embodiment of the log compression processing method provided in this application.

[0035] Figure 3 This is a schematic flowchart of an embodiment of the log compression and restoration method provided in this application.

[0036] Figure 4This is a schematic diagram of the log compression processing device provided in the embodiments of this application;

[0037] Figure 5 This is a schematic diagram of the log compression and restoration device provided in the embodiments of this application;

[0038] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0039] 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 some embodiments of this application, and not all 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.

[0040] Before providing a detailed explanation of the embodiments of this application, some terms involved in the embodiments of this application will be explained.

[0041] In the description of the embodiments of this application, the terms "first," "second," etc., may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices.

[0042] This application provides a log compression processing method, apparatus, electronic device, and computer-readable storage medium. Specifically, the log compression processing method of this application can be executed by an electronic device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0043] For example, such as Figure 1 As shown, the electronic device is illustrated using terminal 10 as an example. Terminal 10 can acquire multiple log records from the game client; extract general log information under a preset fixed dimension of log data based on the aforementioned log records, wherein the log information under the aforementioned fixed dimension of log data remains unchanged in the log records; extract at least one game-related information under each preset game change dimension based on the aforementioned log records, wherein each of the aforementioned game-related information includes game operation-related data and time information related to the aforementioned game operation-related data, and the aforementioned game operation-related data can change during game operation; generate log data based on the game-related information under each of the aforementioned game change dimensions to obtain at least one compressed log message, wherein each compressed log message is used to indicate the change of game operation-related data under at least one game change dimension; and obtain the processed log based on the aforementioned general log information and the aforementioned compressed log information, and send the processed log to server 20.

[0044] To address the aforementioned issues, this application provides a log compression processing method, apparatus, electronic device, and computer-readable storage medium, which can improve the utilization rate of storage resources.

[0045] The following is a detailed description in conjunction with the accompanying drawings. It should be noted that the order of description of 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 drawings.

[0046] In this embodiment, a terminal is used as an example for illustration. This embodiment provides a log compression processing method, such as... Figure 2 As shown, the specific process of this log compression method can be as follows:

[0047] 201. Obtain multiple log records from the game client.

[0048] Among them, the aforementioned log records are log records generated in real time by the game client during operation, which prompts the terminal to compress the log records to avoid wasting storage resources and improve the utilization rate of storage resources.

[0049] It is understandable that the aforementioned log records include multiple game data or performance metrics that the game client needs to record during operation. This game data includes, but is not limited to, the terminal device information of the game client, username, user ID, player login time during this game operation, game scene start scene ID, time corresponding to the start scene, scene switching time, switched scene ID, game end scene ID, and time corresponding to the end scene. The performance metrics include, but are not limited to, FPS (frame limit), average memory usage, average CPU usage, and peak memory usage.

[0050] In this embodiment, the terminal can pre-set the time interval for logging game client points, meaning each time interval corresponds to one logging record. Furthermore, the terminal can set a log compression processing time interval to periodically acquire and process multiple logging records. The log compression processing time interval can be set according to the needs of relevant personnel, such as 30 minutes or 1 hour.

[0051] Furthermore, if the terminal needs to upload the compressed log records to the server, the log compression time interval can be set to be consistent with the time when the terminal uploads the logs to the server. That is, before the terminal uploads the logs to the server, the multiple log records it obtains are compressed using a specific compression algorithm, so that the compressed logs are uploaded.

[0052] Understandably, by setting the log upload time, the real-time interval of log uploads is increased, avoiding the situation where the game client on the terminal generates and uploads log records to the server in real time, which would cause the log uploads to be too frequent. This also reduces the CPU resources consumed by the server for processing data and the network transmission resources consumed by the log uploads.

[0053] For example, the log structure in the above-mentioned logging record is as follows:

[0054] {device_model:iphone12,device_memory_capacity:8GB,key:20220930_235950_50126001,log_id:1,login_ts:16645 53590,fps:27,memory_use:2.5,cpu_use:20,scene_name:scene1,scene_start:1561252100,scene_end:1561253200,sc ene_changed:1561252800,opt_level:high}

[0055] Wherein, `device_model` refers to the device model of the terminal device on which the game client is located, such as iPhone 12 in the example above; `device_memory_capacity` refers to the device memory capacity of the terminal device on which the game client is located, such as 8GB in the example above; `key` is a unique identifier for each player login, which consists of the player's login time and player ID in the game, such as 20220930_235950 being the player's login time and 50126001 being the player ID in the example above; `log_id` is the log order during a game run, that is, which log is the player's first log after logging into the game, such as 1 being the first log generated when the player logs into the game in the example above; `login_ts` is the timestamp of the player's login time, which can be used to easily retrieve the corresponding login information. The logs are as follows: 1664553590 in the example above; fps is the real-time frame rate during game runtime, as shown in the example above (27); memory_use is the real-time memory usage during game runtime, as shown in the example above (2.5); cpu_use is the real-time CPU usage during game runtime, as shown in the example above (20); scene_name is the game scene name during game runtime, as shown in the example above (scene1); scene_start is the scene start time, as shown in the example above (1561252100); scene_end is the scene end time, as shown in the example above (1561253200); scene_changed is the scene transition time, as shown in the example above (1561252800); opt_level is the game graphics quality during game runtime, as shown in the example above (high).

[0056] For example, if a game consists of two scenes, then scene_changed is the time when the first scene switches to the second scene, scene_start is the start time of the first scene, and scene_end is the end time of the last scene.

[0057] 202. Based on the above-mentioned log records, extract general log information under the preset fixed dimensions of log data, wherein the log information under the above-mentioned fixed dimensions of log data remains unchanged in the log records.

[0058] It is understandable that, since the game client on a single terminal generates multiple log records containing a lot of identical information, storing all the data every time a log record is generated would undoubtedly consume a lot of storage resources. Moreover, the stored log data would contain a lot of redundant data. Furthermore, the log records include multiple game data or performance indicators that the game client needs to record during operation. Therefore, in this embodiment, the storage structure of the multiple data contained in the log records is changed, that is, the data is divided based on the change characteristics of the data stored in the log records during game operation.

[0059] In this embodiment, the terminal can set a fixed dimension for the log data based on the change characteristics of the data stored in the log records during game operation. This means that the log information under this fixed dimension remains unchanged across multiple log records during at least one game operation. In other words, the aforementioned general log information remains unchanged across multiple log records. Based on this fixed dimension, general log information conforming to this fixed dimension can be extracted from the log records. Here, one game operation refers to the period from when a player logs into the game until the player logs out, i.e., the online gaming period during a single login.

[0060] Understandably, by fixing the dimensions of log data, the unchanging log data in multiple log records can be extracted. This unchanging log data is equivalent to redundant data, so it only needs to be stored once. That is, when subsequent logs are retrieved and processed during a game run, there is no need to store the common log information under the fixed dimensions of this log data again. By using the common information in multiple log records as common log information, the problem of too much redundant data in game logs is avoided, and each log only retains the meaningful part, thus improving the utilization of storage resources.

[0061] Specifically, during the log processing, since general log information only needs to be stored once, it can be stored in the first log entry of the log set corresponding to this game run.

[0062] For example, based on the above example, the general log information includes, but is not limited to, the device model of the terminal device where the game client is located, the device memory capacity of the terminal device where the game client is located, the unique identifier of each player's login to the game, the log order during a game run, and the timestamp of the player's login time.

[0063] In some embodiments, to facilitate differentiation from data of other dimensions, the terminal can assign a dimension identifier corresponding to a fixed dimension of the log data to the general log information when extracting it, so as to distinguish the type of log information through the dimension identifier. Furthermore, to facilitate retrieval of the general log information, it is also necessary to assign a unique identifier to the general log information for each player's game login.

[0064] For example, the log structure of the above general log information is as follows:

[0065] {type:common,device_model:iphone12,device_memory_capacity:8GB,key:20220930_235950_50126001,log_id:1,login_ts:1664553590}

[0066] Here, the above-mentioned type is the dimension identifier corresponding to the current general log information, and the terminal sets the common identifier to be the dimension identifier of the fixed dimension of the log data.

[0067] 203. Based on the above-mentioned log records, extract at least one game-related information under each preset game change dimension, wherein each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data, and the above-mentioned game operation-related data can change during game operation.

[0068] In this embodiment, the logging records include not only log information with fixed dimensions but also log information with variable game change dimensions. That is, the terminal can set a game change dimension based on the changing characteristics of the data stored in the logging records during game execution. This means that the specific data in multiple logging records under this game change dimension can change during a single game run; specifically, the game-related data in at least one game-related information under the aforementioned game change dimension can change during game execution. Therefore, the terminal can extract game-related information that conforms to the game change dimension from the logging records.

[0069] Understandably, by using the game change dimension, other log information besides the log information under the fixed dimension of log data can be extracted from the point log records, thereby avoiding the omission of log information and ensuring that only the meaningful part of each log is retained, thus improving the utilization of storage resources.

[0070] The aforementioned preset game change dimensions can be set according to requirements, and there must be at least one game change dimension. For example, at least one game change dimension can be set based on game data or game client performance indicators that can change during game operation. Correspondingly, it can be understood that the game operation data under this game change dimension is the data that can change during game operation. For example, during game operation, players may switch graphics quality due to low smoothness of the current game screen.

[0071] For example, based on the above example, the game operation related data in the game-related information corresponding to the above multiple game change dimensions may include, but is not limited to, the real-time frame rate of the game, the real-time memory usage of the game, the real-time CPU usage of the game, the game scene name, scene start time, scene end time, scene switching time, and game image quality. That is, in this example, one piece of game-related information corresponds to one game change dimension, or two or more pieces of game-related information correspond to one game change dimension. The specific settings are determined according to the requirements and are not limited here.

[0072] The time information related to the game operation data mentioned above is used to indicate the relevant time information when the game operation data changes, including but not limited to the start time of the change, the duration of the change, and the end time of the change. Since player login times are stored in this embodiment, the time information related to the game operation data can be an offset time relative to the player login time. For example, if the player login time is set to 3:50, and the time information related to the game operation data is 5, then the specific time related to the game operation data is 3:55. The unit of the offset time can be set as needed, for example, in seconds.

[0073] In some embodiments, to further optimize the compression effect of log compression processing, when there are multiple game change dimensions, these multiple game change dimensions can be divided into several categories of change dimensions for targeted processing of log data under each category of change dimensions. For example, the terminal can divide the multiple game change dimensions into two main categories: a first category of change dimensions and a second category of change dimensions. The first category of change dimensions refers to the game data change dimensions during game runtime. That is, the game runtime associated data corresponding to each game change dimension under the first category of change dimensions can be data that changes in the game scene, attribute data configured during the game, or combat data generated during the game, etc. The second category of change dimensions refers to the performance change dimensions of the game client during game runtime. That is, the game runtime associated data corresponding to each game change dimension under the second category of change dimensions can be the performance indicator data consumed by the game client on its terminal during game runtime.

[0074] It is understood that in this embodiment, by dividing multiple game change dimensions into two major categories of change dimensions, the logs corresponding to the two major categories of change dimensions are processed in a targeted manner through different log processing methods, so as to improve the efficiency of data processing.

[0075] The specific division of the above-mentioned game change dimensions can be set according to needs and is not limited here. For example, the terminal can further divide the game change dimensions based on the devices associated with the game during gameplay (such as gamepads, helmets, glasses, and other motion-sensing devices).

[0076] 204. Generate log data based on the game association information under each of the above game change dimensions to obtain at least one compressed log message, wherein each compressed log message is used to indicate the change of game operation association data under at least one game change dimension.

[0077] In this embodiment, since the game-related information includes game operation-related data and time information related to the aforementioned game operation-related data, the game operation-related data can be compressed based on the time information related to it. This compression of logs under the game change dimension yields at least one compressed log message. Each game change dimension corresponds to one compressed log message, or all game change dimensions correspond to one compressed log message, or some game change dimensions correspond to one compressed log message. The specific scope of the compressed log message can be set according to requirements and is not limited here.

[0078] It is understandable that in this embodiment, by compressing the relevant log information under the game change dimension, the terminal can reduce the sub-sections of the data in the log under the game change dimension, that is, reduce the log capacity, so that more logs can be stored in the same storage space, thereby further improving the utilization of storage space.

[0079] Furthermore, if the compressed log records need to be uploaded to the server, log compression can save network transmission resources and reduce the CPU resources consumed by the server in processing data.

[0080] Furthermore, in this embodiment, reducing the log size saves network transmission resources and reduces the CPU resource consumption of the server when processing data. This allows more logs to be stored in the same storage space on the server, thereby improving the utilization rate of server storage space.

[0081] In some embodiments, the compressed log information includes player information and login time for the game players corresponding to the multiple logging records. The player identity information can be the player ID used by the player in the game.

[0082] In this embodiment, since the player information and login time of the game player are unique identifiers for each player's login to the game, the efficiency of retrieving compressed log information can be accelerated by assigning the player information and login time of the game player to the compressed log information.

[0083] In some embodiments, the game operation-related data can be compressed based on the time information associated with the game operation, so as to improve the efficiency of data compression processing, and the compression by time information can improve the efficiency of data analysis.

[0084] Specifically, the above-mentioned process of generating log data based on game association information under each of the aforementioned game change dimensions to obtain at least one compressed log message may include: determining the change time of game operation association data in the aforementioned game association information based on the time information in the aforementioned game change dimensions; and generating log data for the game association information under each of the aforementioned game change dimensions based on the aforementioned change time and the game operation association data corresponding to the aforementioned change time to obtain at least one compressed log message.

[0085] In this embodiment, at least one time of change is identified by summarizing the change times of game operation-related data under each game change dimension. After determining the change times, the game operation-related data corresponding to at least one change time under a game change dimension is summarized, with each change time corresponding to one set of game operation-related data. Each change time and its corresponding game operation-related data are then compressed in the same format to obtain data segments corresponding to each change time. The combination of these data segments constitutes the aforementioned compressed log information.

[0086] In some embodiments, the game change dimension includes a first game change dimension belonging to a first type of change dimension, which is a game data change dimension during game runtime; the generation of log data for the game association information under each game change dimension based on the change time under each game change dimension and the game runtime association data corresponding to the change time, to obtain at least one compressed log message, may include: determining the game process event corresponding to the change time under the first game change dimension based on the change time under the first game change dimension and the game runtime association data corresponding to the change time, wherein the game process event is used to indicate the game event that occurs during game runtime in the game client at a certain change time, such as game scene switching, game screen quality switching, or exiting the game scene.

[0087] After determining the game process event corresponding to the change time under the first game change dimension, based on the change time under the first game change dimension and the game process event corresponding to the change time, log data is generated for the game association information under the first game change dimension to obtain the first compressed log information corresponding to the first game change dimension. The first compressed log information includes the first data segment corresponding to the change time under the first game change dimension, and the first data segment includes the change time and the game process event corresponding to the change time.

[0088] Understandably, by generating multiple first data segments, each of which includes the moment of change and the corresponding game process event, compared to the previous log which required recording game events occurring at each moment, the log data becomes too large due to the fact that many consecutive moments correspond to the same game event, thus requiring more storage resources for storage.

[0089] In some embodiments, to facilitate the differentiation of data from other dimensions, the terminal can assign a dimension identifier corresponding to the first type of change dimension to the first compressed log information when extracting the first compressed log information, so as to distinguish the type of log information by the dimension identifier.

[0090] For example, the log structure of the first compressed log information is as follows:

[0091] {type:event,key:20220930_235950_50126001,log_id:3,data:[{time:1,event_na me:login},{time:10,event_name:scene_start,scene_start:scene_1},{time:1000,event_name:scene_changed,scene_changed:scene_2},{time_1500,event_name:opt_level_c hanged,opt_level:low},{time:2000,event_name:scene_end}]}

[0092] ...

[0093] {type:event,key:20220930_235950_50126001,log_id:10,data:[{time:7200,even t_name:logout}]}

[0094] Among them, the above-mentioned type is the dimension identifier corresponding to the current first compressed log information, and the terminal sets the event identifier to the dimension identifier of the first type of change dimension; the above-mentioned data stores the first data segment corresponding to each change moment under the first game change dimension.

[0095] For the first compressed log information with log_id:3, the above time is the offset time relative to the player's login time; the above {time:1,event_name:login} is used to indicate that the game process event corresponding to time 1 at the time of change is player login; the above {time:10,event_name:scene_start,scene_start:scene_1} is used to indicate that the game process event corresponding to time 10 at the time of change is the start of scene display, and the scene that starts to be displayed is scene 1; the above {time:1000,event_name:scene_changed,scene_changed:sce `ne_2` indicates that the game process event corresponding to time 1000 is a scene switch, and the displayed scene is Scene 2. `{time_1500, event_name:opt_level_changed, opt_level:low}` indicates that the game process event corresponding to time 1500 is a graphics quality switch, and the switched graphics quality is low, meaning the player switched to low graphics quality after 1500 seconds to improve screen smoothness. `{time:2000, event_name:scene_end}` indicates that the game process event corresponding to time 2000 is the scene end display. For the first compressed log information with `log_id:10`, `{time:7200, event_name:logout}` indicates that the game process event corresponding to time 7200 is the player exiting the game.

[0096] In some embodiments, the aforementioned game change dimension includes a second game change dimension belonging to the second type of change dimension, wherein the second type of change dimension is the performance change dimension of the game client during game operation; the aforementioned generation of log data for the game operation association data under each of the aforementioned game change dimensions based on the aforementioned change time and the game operation association data corresponding to the aforementioned change time, to obtain at least one compressed log message, may include: determining the performance value corresponding to the aforementioned change time under the aforementioned second game change dimension and the duration of the aforementioned performance value based on the aforementioned change time and the game operation association data corresponding to the aforementioned change time, wherein the aforementioned performance value is the performance value of the game client's indicator performance, and the duration of the aforementioned performance value is the duration of the indicator value.

[0097] It is understandable that the performance metrics of the game client can experience breakpoints during gameplay. For example, if a player switches out of the game and then switches back after a short period, the performance metrics will be interrupted during the extended period. In this embodiment, by introducing the duration of performance values, it is possible to identify when these breakpoints occur in later log data analysis scenarios, thus avoiding their impact on the analysis results and improving their accuracy. For instance, if the duration of a performance value at a certain point in time does not match the time interval between adjacent points in time, it indicates that a breakpoint exists within that time interval.

[0098] Once the performance value corresponding to the change time under the second game change dimension and the duration of the performance value are determined, log data is generated for the game association information under the second game change dimension based on the change time, the performance value corresponding to the change time, and the duration of the performance value. This results in second compressed log information corresponding to the second game change dimension. The second compressed log information includes a second data segment corresponding to the change time under the second game change dimension, and the second data segment includes the change time, the performance value corresponding to the change time, and the duration of the performance value.

[0099] If a certain performance value remains unchanged during the current period, then the game operation-related data under that game change dimension is the performance value that has remained unchanged.

[0100] It is understandable that by generating multiple second data segments, each of which includes the time of change, the performance value corresponding to the time of change, and the duration of the performance value, compared to the previous log which required recording the performance values ​​of the metrics at each time point, the log data becomes too large due to the fact that the performance values ​​of the metrics at many consecutive times are the same, thus requiring more storage resources for storage.

[0101] In some embodiments, to facilitate the differentiation of data from other dimensions, the terminal can assign a dimension identifier corresponding to the second type of change dimension to the second compressed log information when extracting the second compressed log information, so as to distinguish the type of log information by the dimension identifier.

[0102] In some embodiments, the method further includes: when there are at least two of the above-mentioned second game change dimensions, determining the dimension identifiers corresponding to the at least two of the above-mentioned second game change dimensions; and performing nested processing on the dimension identifiers corresponding to the at least two of the above-mentioned second game change dimensions and the second compressed log information to obtain a compressed log information corresponding to the at least two of the above-mentioned second game change dimensions.

[0103] For example, the log structure of the first compressed log information is as follows:

[0104] {type:indicator,key:20220930_235950_50126001,log_id:2,data:{fps:[[2,29,2],[ 10,30,8],[15,29.5,4]……[1800,29,5]],mem_use:[[5,3.5,10]……[1800,3,30]],cpu_us e:[[1,20,1],[10,20,9]……[1800,21,15]]}}

[0105] Here, `type` is the dimension identifier corresponding to the current second compressed log information, and the terminal sets the indicator identifier to the dimension identifier of the second type of change dimension; `fps`, `mem_use`, and `cpu_use` are the dimension identifiers corresponding to the second game change dimension, respectively; `data` stores multiple second data segments corresponding to each change moment under the second game change dimension corresponding to `fps`, `mem_use`, and `cpu_use`. In each second data segment, the first element is the offset time, the second element is the performance value, and the third element is the duration of the performance value. If the unit of the `ongoing` offset time in this example is seconds, then the duration of the performance value is 2 seconds.

[0106] Based on the example above, if a player's login time is login_ts:1664553590, then for fps:[[2,29,2], the offset time is 1664553592, and the performance value of fps is 29. This performance value lasts for 2 seconds, indicating that the fps value is 29 at times 1664553591 and 1664553592. For another example, the last item, offset time 1800, corresponds to the time 1664553590 + 1800 = 1664555390.

[0107] 205. Based on the above general log information and the above compressed log information, the processed log is obtained.

[0108] In this embodiment, based on the aforementioned general log information and compressed log information, the terminal can obtain the processed logs corresponding to the game client during the current game run.

[0109] In some embodiments, after obtaining the processed logs, the process further includes: if the game players corresponding to the multiple log entries have not yet logged off, it indicates that the game client still needs to generate more log entries. Since the players' login times are the same for the same game process, the uncompressed log entries within the preset periodic interval are obtained after a preset periodic interval; at least one game-related information under each preset game change dimension within the preset periodic interval is extracted based on the obtained log entries; log data is generated based on the game-related information under each preset game change dimension within the preset periodic interval to obtain at least one compressed log entry corresponding to the preset periodic interval.

[0110] It is understandable that the at least one compressed log record corresponding to the above period interval is the log record that needs to be stored in the current period. If the terminal needs to upload the compressed log record to the server, it only needs to upload the at least one compressed log record corresponding to the period interval to the server, without having to upload the general log information again.

[0111] As can be seen from the above, by acquiring multiple log records from the game client and extracting general log information under a preset fixed dimension of log data based on these log records, the general log information under this fixed dimension remains unchanged in the log records. This avoids excessive redundant data in the game logs by dividing the general log information and only recording information that remains unchanged in the log records once. Then, based on the log records, at least one game-related piece of information under each preset game change dimension is extracted. Each piece of game-related information includes game operation-related data and time information related to this data. This game operation-related data can change during game operation. Extracting information from the game change dimension improves the utilization of storage resources. Furthermore, log data is generated based on the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension. By compressing the extracted information under the game change dimensions, the storage resources required for information extraction are reduced while retaining the information content, thereby improving the utilization rate of storage resources. Finally, based on the aforementioned general log information and the aforementioned compressed log information, the processed log is obtained, thereby improving the overall utilization rate of storage resources.

[0112] In this embodiment, a terminal is used as an example for illustration. Based on the log compression processing method in Implementation 1, this embodiment also provides a corresponding log compression and restoration method, such as... Figure 3 As shown, the specific process of this log compression and restoration method can be as follows:

[0113] 301. Obtain log restoration request instruction, wherein the log restoration request instruction includes player information and login time of the player to whom the log to be restored belongs.

[0114] In this embodiment, the terminal obtains the log restoration request instruction, responds to the log restoration request instruction to search for the corresponding log, and performs aggregation analysis on the searched log data.

[0115] It is understandable that, since this embodiment is based on the player's login time for log lookup, the logs to be restored are all logs from the game operation process corresponding to a player's login.

[0116] 302. Based on the player information and login time of the game players mentioned above, find the general log information under the preset fixed dimensions of log data, wherein the log information under the fixed dimensions of the log data mentioned above remains unchanged in the point log records.

[0117] Understandably, since the general log information stores a unique identifier for each player's login to the game, which includes player information and login time, the corresponding general log information can be retrieved from the database storing the logs by using the player information and login time of the player to whom the log to be restored belongs in the log restoration request instruction. This general log information is the unchanging log information contained in the log to be restored, that is, the log information that does not change in any of the logs during the game operation process corresponding to a certain login of the player.

[0118] 303. Based on the player information and login time of the game players mentioned above, find at least one compressed log message under the preset game change dimension, wherein each compressed log message is used to indicate the change of game operation related data under at least one game change dimension.

[0119] It is understandable that, since the compressed log information stores a unique identifier for each player's login to the game, which includes player information and login time, the corresponding compressed log information can be found in the database storing the logs by using the player information and login time of the player to whom the log to be restored belongs in the log restoration request instruction. This compressed log information is the log information that may have changed contained in the log to be restored.

[0120] 304. Based on at least one compressed log information mentioned above, determine at least one game-related information under each game change dimension, wherein each of the above game-related information includes game operation-related data and time information related to the above game operation-related data, and the above game operation-related data can change during game operation.

[0121] In this embodiment, the compressed log information is decompressed in accordance with the compression method described above to determine at least one game-related information under each game change dimension.

[0122] 305. Based on at least one game-related information under each game change dimension and the aforementioned general log information, reconstruct at least one event log record from the game client.

[0123] In this embodiment, by restoring at least one game-related information and the aforementioned general log information under each game change dimension, at least one event log record of the game client is restored. The restored event log records are then aggregated and analyzed to reduce the storage space occupied by log data through data compression and decompression. Furthermore, the efficiency of log query is further improved through dimension identification.

[0124] As can be seen from the above, by obtaining a log restoration request instruction, which includes the player information and login time of the player to whom the log to be restored belongs, the corresponding compressed log information can be searched in response to the log restoration request instruction. Then, based on the player information and login time, general log information under a preset fixed dimension of log data is found, where the log information under the fixed dimension of log data remains unchanged in the point log records; based on the player information and login time, at least one compressed log message under a preset game change dimension is found, where each compressed log message indicates at least one change in game operation-related data under a game change dimension; based on the at least one compressed log message, at least one game-related message under each game change dimension is determined, where each game-related message includes game operation-related data. According to the time information related to the aforementioned game operation data, the aforementioned game operation data can change during game operation; based on at least one game-related information under each game change dimension and the aforementioned general log information, at least one event log record of the game client is restored. Thus, by storing the event log records as general log information under fixed dimensions and compressed log information compressed under game change dimensions, when needed, the corresponding data can be directly queried from the stored data based on the player information and player login time, and the queried compressed data can be decompressed and restored, thereby improving the utilization rate of storage resources and the efficiency of log query.

[0125] It should be noted that the specific implementation of the method steps in this embodiment can refer to the specific implementation of the corresponding method steps in Embodiment 1.

[0126] To better implement the above methods, this application also provides a log compression processing device, which can be integrated into an electronic device, such as a computer device, which can be a terminal, server or other device.

[0127] The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0128] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the log compression processing device specifically integrated into the terminal as an example. This embodiment provides a log compression processing device, such as... Figure 4 As shown, the log compression processing device may include:

[0129] Log acquisition module 401 is used to acquire multiple log records from the game client.

[0130] The first information extraction module 402 is used to extract general log information under a preset fixed dimension of log data based on the above-mentioned log record, wherein the log information under the above-mentioned fixed dimension of log data remains unchanged in the log record.

[0131] The second information extraction module 403 is used to extract at least one game-related information under each preset game change dimension based on the above-mentioned log records. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0132] The data generation module 404 is used to generate log data based on the game association information under each of the above game change dimensions, and obtain at least one compressed log message, wherein each compressed log message is used to indicate the change of game operation association data under at least one game change dimension;

[0133] The log generation module 405 is used to obtain the processed log based on the general log information and the compressed log information mentioned above.

[0134] In some embodiments, the data generation module 404 is specifically used for:

[0135] Based on the time information in the game association information under each of the above game change dimensions, determine the time of change of the game operation association data in the above game association information;

[0136] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the game operation-related data corresponding to the aforementioned change times, log data is generated for the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message.

[0137] In some embodiments, the aforementioned game change dimension includes a first game change dimension belonging to the first type of change dimension, wherein the first type of change dimension is a game data change dimension during game runtime; the aforementioned data generation module 404 is specifically used for:

[0138] Based on the aforementioned change moments under the first game change dimension, and the game operation-related data corresponding to the aforementioned change moments, the game process events corresponding to the aforementioned change moments under the first game change dimension are determined.

[0139] Based on the aforementioned change time under the first game change dimension and the game process event corresponding to the aforementioned change time, log data is generated for the game-related information under the aforementioned first game change dimension to obtain the first compressed log information corresponding to the aforementioned first game change dimension. The first compressed log information includes the first data segment corresponding to the change time under the aforementioned first game change dimension, and the first data segment includes the aforementioned change time and the game process event corresponding to the aforementioned change time.

[0140] In some embodiments, the aforementioned game change dimension includes a second game change dimension belonging to the second type of change dimension, and the aforementioned second type of change dimension is the performance change dimension of the game client during game runtime; the aforementioned data generation module 404 is specifically used for:

[0141] Based on the aforementioned change times under the second game change dimension, and the game operation related data corresponding to the aforementioned change times, the performance values ​​corresponding to the aforementioned change times under the second game change dimension, and the duration of the aforementioned performance values ​​are determined.

[0142] Based on the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value under the aforementioned second game change dimension, log data is generated for the game-related information under the aforementioned second game change dimension to obtain the second compressed log information corresponding to the aforementioned second game change dimension. The aforementioned second compressed log information includes a second data segment corresponding to the change time under the aforementioned second game change dimension, and the aforementioned second data segment includes the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value.

[0143] In some embodiments, the data generation module 404 is specifically used for:

[0144] When there are at least two of the above-mentioned second game change dimensions, determine the dimension identifiers corresponding to the at least two of the above-mentioned second game change dimensions;

[0145] Nesting the dimension identifiers and second compressed log information corresponding to at least two of the aforementioned second game change dimensions yields one compressed log information corresponding to at least two of the aforementioned second game change dimensions.

[0146] In some embodiments, the compressed log information includes player information and login time of the game players corresponding to the multiple log entries.

[0147] In some embodiments, the log compression processing apparatus further includes an information generation module, which is specifically used for:

[0148] If the game players corresponding to the above multiple log entries have not logged off, retrieve the uncompressed log entries within the above periodic interval after the preset periodic interval.

[0149] Based on the acquired log records, extract at least one game-related information under each preset game change dimension within the above periodic interval;

[0150] Log data is generated based on the game association information under each of the above-mentioned game change dimensions within the above-mentioned periodic interval, resulting in at least one compressed log message corresponding to the above-mentioned periodic interval.

[0151] As can be seen from the above, the log compression processing device in this embodiment acquires multiple log records from the game client through the log acquisition module 401; and extracts general log information under a preset fixed dimension of log data based on the aforementioned log records through the first information extraction module 402. The log information under the aforementioned fixed dimension of log data remains unchanged in the log records. Therefore, by dividing the general log information, only information that remains unchanged in the log records needs to be recorded once, avoiding the problem of excessive redundant data in the game logs. Then, the second information extraction module 403 extracts at least one game-related information under each preset game change dimension based on the aforementioned log records. Each piece of game-related information includes game operation-related data and time information related to the game operation-related data. The game operation-related data can change during game operation. By extracting information from the game change dimension, the utilization rate of storage resources is improved. Furthermore, the data generation module 404 generates log data based on the game-related information under each of the aforementioned game change dimensions, obtaining at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension. By compressing the extracted information under the game change dimension, the storage resources required for extracting information are reduced while retaining the information content, thereby improving the utilization rate of storage resources. Finally, the log generation module 405 obtains the processed log based on the aforementioned general log information and the aforementioned compressed log information, thereby improving the overall utilization rate of storage resources.

[0152] To better implement the above methods, this application also provides a log compression and restoration device, which can be integrated into an electronic device, such as a computer device, which can be a terminal, server, or other device.

[0153] The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0154] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the log compression and restoration device specifically integrated into the terminal as an example. This embodiment provides a log compression and restoration device, such as... Figure 5 As shown, the log compression processing device may include:

[0155] The instruction acquisition module 501 is used to acquire the log restoration request instruction, wherein the log restoration request instruction includes the player information of the game player to which the log to be restored belongs and the player's login time;

[0156] The first information search module 502 is used to search for general log information under a preset fixed dimension of log data based on the player information and login time of the aforementioned game players. The log information under the aforementioned fixed dimension of log data remains unchanged in the point log records.

[0157] The second information search module 503 is used to search for at least one compressed log message under a preset game change dimension based on the player information and login time of the game player mentioned above. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension.

[0158] The information determination module 504 is used to determine at least one game-related information under each game change dimension based on the above-mentioned at least one compressed log information, wherein each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data, and the above-mentioned game operation-related data can change during game operation;

[0159] The log restoration module 505 is used to restore at least one point log record of the game client based on at least one game-related information under each game change dimension and the above-mentioned general log information.

[0160] As can be seen from the above, the log compression processing device in this embodiment obtains a log restoration request instruction through the instruction acquisition module 501. This log restoration request instruction includes player information and login time of the game player to whom the log to be restored belongs. The device then searches for the corresponding compressed log information in response to this log restoration request instruction. Next, the first information search module 502 searches for general log information under a preset fixed dimension of log data based on the player information and login time. This log information under the fixed dimension remains unchanged in the point log records. The second information search module 503 searches for at least one compressed log message under a preset game change dimension based on the player information and login time. Each compressed log message indicates at least one change in game operation-related data under a game change dimension. Finally, the information determination module 504 determines each game change dimension based on the at least one compressed log message. At least one game-related information under each game change dimension, wherein each game-related information includes game operation-related data and time information related to the game operation-related data, and the game operation-related data can change during game operation; the log restoration module 505 restores at least one event log record of the game client based on at least one game-related information under each game change dimension and the above-mentioned general log information, thereby improving the utilization rate of storage resources by storing the event log record as general log information under a fixed dimension and compressed log information compressed under the game change dimension, and restoring the compressed data when needed.

[0161] 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. Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 600 includes a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, and a computer program stored on the memory 602 and executable on the processor. The processor 601 and the memory 602 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.

[0162] The processor 601 is the control center of the electronic device 600. It connects various parts of the electronic device 600 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, it performs various functions of the electronic device 600 and processes data, thereby monitoring the electronic device 600 as a whole.

[0163] In this embodiment, the processor 601 in the electronic device 600 loads the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 runs the applications stored in the memory 602 to achieve various functions:

[0164] Retrieve multiple log entries from the game client;

[0165] Based on the above-mentioned log records, extract general log information under the preset fixed dimensions of log data, wherein the log information under the above-mentioned fixed dimensions of log data remains unchanged in the log records.

[0166] Based on the above-mentioned log records, at least one game-related information under each preset game change dimension is extracted. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0167] Log data is generated based on the game-related information under each of the above game change dimensions, resulting in at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension.

[0168] Based on the general log information and the compressed log information mentioned above, the processed log is obtained.

[0169] In some embodiments, the above-mentioned log data generation based on the game association information under each of the above-mentioned game change dimensions yields at least one compressed log message, including:

[0170] Based on the time information in the game association information under each of the above game change dimensions, determine the time of change of the game operation association data in the above game association information;

[0171] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the game operation-related data corresponding to the aforementioned change times, log data is generated for the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message.

[0172] In some embodiments, the above-mentioned game change dimension includes a first game change dimension belonging to the first type of change dimension, wherein the first type of change dimension is the game data change dimension during game execution;

[0173] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the game operation-related data corresponding to the aforementioned change times, log data is generated for the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message, including:

[0174] Based on the aforementioned change moments under the first game change dimension, and the game operation-related data corresponding to the aforementioned change moments, the game process events corresponding to the aforementioned change moments under the first game change dimension are determined.

[0175] Based on the aforementioned change time under the first game change dimension and the game process event corresponding to the aforementioned change time, log data is generated for the game-related information under the aforementioned first game change dimension to obtain the first compressed log information corresponding to the aforementioned first game change dimension. The first compressed log information includes the first data segment corresponding to the change time under the aforementioned first game change dimension, and the first data segment includes the aforementioned change time and the game process event corresponding to the aforementioned change time.

[0176] In some embodiments, the above-mentioned game change dimension includes a second game change dimension belonging to the second type of change dimension, and the second type of change dimension is the performance change dimension of the game client during game execution;

[0177] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the corresponding game operation-related data for each change time, log data is generated for the game operation-related data under each of the aforementioned game change dimensions, resulting in at least one compressed log message, including:

[0178] Based on the aforementioned change times under the second game change dimension, and the game operation related data corresponding to the aforementioned change times, the performance values ​​corresponding to the aforementioned change times under the second game change dimension, and the duration of the aforementioned performance values ​​are determined.

[0179] Based on the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value under the aforementioned second game change dimension, log data is generated for the game-related information under the aforementioned second game change dimension to obtain the second compressed log information corresponding to the aforementioned second game change dimension. The aforementioned second compressed log information includes a second data segment corresponding to the change time under the aforementioned second game change dimension, and the aforementioned second data segment includes the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value.

[0180] In some embodiments, it also includes:

[0181] When there are at least two of the above-mentioned second game change dimensions, determine the dimension identifiers corresponding to the at least two of the above-mentioned second game change dimensions;

[0182] Nesting the dimension identifiers and second compressed log information corresponding to at least two of the aforementioned second game change dimensions yields one compressed log information corresponding to at least two of the aforementioned second game change dimensions.

[0183] In some embodiments, the compressed log information includes player information and login time of the game players corresponding to the multiple log entries.

[0184] In some embodiments, after obtaining the processed log, the method further includes:

[0185] If the game players corresponding to the above multiple log entries have not logged off, retrieve the uncompressed log entries within the above periodic interval after the preset periodic interval.

[0186] Based on the acquired log records, extract at least one game-related information under each preset game change dimension within the above periodic interval;

[0187] Log data is generated based on the game association information under each of the above-mentioned game change dimensions within the above-mentioned periodic interval, resulting in at least one compressed log message corresponding to the above-mentioned periodic interval.

[0188] It can also achieve the following functions:

[0189] Obtain a log restoration request instruction, wherein the log restoration request instruction includes the player information and login time of the player to whom the log to be restored belongs;

[0190] Based on the player information and login time of the game players mentioned above, general log information under the preset fixed dimensions of log data is found. The log information under the above fixed dimensions of log data remains unchanged in the point log records.

[0191] Based on the player information and login time of the game players mentioned above, at least one compressed log message is found under the preset game change dimension. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension.

[0192] Based on the above-mentioned at least one compressed log information, at least one game-related information under each game change dimension is determined, wherein each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data, and the above-mentioned game operation-related data can change during game operation;

[0193] Based on at least one game-related information under each game change dimension and the aforementioned general log information, at least one event log record from the game client is reconstructed.

[0194] Therefore, the electronic device 600 provided in this embodiment can bring the following technical effects: improve the utilization rate of storage resources.

[0195] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0196] Optional, such as Figure 6 As shown, the electronic device 600 also includes: a touch display screen 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. The processor 601 is electrically connected to the touch display screen 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607. Those skilled in the art will understand that... Figure 6 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.

[0197] The touch display screen 603 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 603 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 601. It can also receive and execute commands from the processor 601. 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 601 to determine the type of touch event. Subsequently, the processor 601 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 603 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 603 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 603 can also be used as part of the input unit 606 to achieve input functions.

[0198] The radio frequency circuit 604 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.

[0199] Audio circuit 605 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuit 605 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 605, converted back into audio data, and then processed by processor 601 before being transmitted via radio frequency circuit 604 to, for example, another electronic device, or output to memory 602 for further processing. Audio circuit 605 may also include an earphone jack to provide communication between peripheral headphones and electronic devices.

[0200] The input unit 606 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.

[0201] Power supply 607 is used to supply power to various components of electronic device 600. Optionally, power supply 607 can be logically connected to processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 607 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.

[0202] although Figure 6 As not shown in the diagram, the electronic device 600 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0203] 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.

[0204] 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.

[0205] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute steps in any of the log compression processing methods or log compression and decompression methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0206] Retrieve multiple log entries from the game client;

[0207] Based on the above-mentioned log records, extract general log information under the preset fixed dimensions of log data, wherein the log information under the above-mentioned fixed dimensions of log data remains unchanged in the log records.

[0208] Based on the above-mentioned log records, at least one game-related information under each preset game change dimension is extracted. Each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data. The above-mentioned game operation-related data can change during game operation.

[0209] Log data is generated based on the game-related information under each of the above game change dimensions, resulting in at least one compressed log message. Each compressed log message is used to indicate the changes in game operation-related data under at least one game change dimension.

[0210] Based on the general log information and the compressed log information mentioned above, the processed log is obtained.

[0211] In some embodiments, the above-mentioned log data generation based on the game association information under each of the above-mentioned game change dimensions yields at least one compressed log message, including:

[0212] Based on the time information in the game association information under each of the above game change dimensions, determine the time of change of the game operation association data in the above game association information;

[0213] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the game operation-related data corresponding to the aforementioned change times, log data is generated for the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message.

[0214] In some embodiments, the above-mentioned game change dimension includes a first game change dimension belonging to the first type of change dimension, wherein the first type of change dimension is the game data change dimension during game execution;

[0215] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the game operation-related data corresponding to the aforementioned change times, log data is generated for the game-related information under each of the aforementioned game change dimensions, resulting in at least one compressed log message, including:

[0216] Based on the aforementioned change moments under the first game change dimension, and the game operation-related data corresponding to the aforementioned change moments, the game process events corresponding to the aforementioned change moments under the first game change dimension are determined.

[0217] Based on the aforementioned change time under the first game change dimension and the game process event corresponding to the aforementioned change time, log data is generated for the game-related information under the aforementioned first game change dimension to obtain the first compressed log information corresponding to the aforementioned first game change dimension. The first compressed log information includes the first data segment corresponding to the change time under the aforementioned first game change dimension, and the first data segment includes the aforementioned change time and the game process event corresponding to the aforementioned change time.

[0218] In some embodiments, the above-mentioned game change dimension includes a second game change dimension belonging to the second type of change dimension, and the second type of change dimension is the performance change dimension of the game client during game execution;

[0219] Based on the aforementioned change times under each of the aforementioned game change dimensions, and the corresponding game operation-related data for each change time, log data is generated for the game operation-related data under each of the aforementioned game change dimensions, resulting in at least one compressed log message, including:

[0220] Based on the aforementioned change times under the second game change dimension, and the game operation related data corresponding to the aforementioned change times, the performance values ​​corresponding to the aforementioned change times under the second game change dimension, and the duration of the aforementioned performance values ​​are determined.

[0221] Based on the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value under the aforementioned second game change dimension, log data is generated for the game-related information under the aforementioned second game change dimension to obtain the second compressed log information corresponding to the aforementioned second game change dimension. The aforementioned second compressed log information includes a second data segment corresponding to the change time under the aforementioned second game change dimension, and the aforementioned second data segment includes the aforementioned change time, the performance value corresponding to the aforementioned change time, and the duration of the aforementioned performance value.

[0222] In some embodiments, it also includes:

[0223] When there are at least two of the above-mentioned second game change dimensions, determine the dimension identifiers corresponding to the at least two of the above-mentioned second game change dimensions;

[0224] Nesting the dimension identifiers and second compressed log information corresponding to at least two of the aforementioned second game change dimensions yields one compressed log information corresponding to at least two of the aforementioned second game change dimensions.

[0225] In some embodiments, the compressed log information includes player information and login time of the game players corresponding to the multiple log entries.

[0226] In some embodiments, after obtaining the processed log, the method further includes:

[0227] If the game players corresponding to the above multiple log entries have not logged off, retrieve the uncompressed log entries within the above periodic interval after the preset periodic interval.

[0228] Based on the acquired log records, extract at least one game-related information under each preset game change dimension within the above periodic interval;

[0229] Log data is generated based on the game association information under each of the above-mentioned game change dimensions within the above-mentioned periodic interval, resulting in at least one compressed log message corresponding to the above-mentioned periodic interval.

[0230] It can also achieve the following functions:

[0231] Obtain a log restoration request instruction, wherein the log restoration request instruction includes the player information and login time of the player to whom the log to be restored belongs;

[0232] Based on the player information and login time of the game players mentioned above, general log information under the preset fixed dimensions of log data is found. The log information under the above fixed dimensions of log data remains unchanged in the point log records.

[0233] Based on the player information and login time of the game players mentioned above, at least one compressed log message is found under the preset game change dimension. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension.

[0234] Based on the above-mentioned at least one compressed log information, at least one game-related information under each game change dimension is determined, wherein each of the above-mentioned game-related information includes game operation-related data and time information related to the above-mentioned game operation-related data, and the above-mentioned game operation-related data can change during game operation;

[0235] Based on at least one game-related information under each game change dimension and the aforementioned general log information, at least one event log record from the game client is reconstructed.

[0236] As can be seen, the computer program can be loaded by the processor to execute the steps in any of the log compression processing methods or log compression and restoration methods provided in the embodiments of this application, thereby bringing about the following technical effects: improving the utilization rate of storage resources.

[0237] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0238] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0239] Since the computer program stored in the computer-readable storage medium can execute the steps of any log compression processing method or log compression and restoration method provided in the embodiments of this application, the beneficial effects that any log compression processing method or log compression and restoration method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0240] The above provides a detailed description of a log compression processing method, apparatus, electronic device, and computer-readable storage medium 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 above embodiments 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 log compression processing method, characterized in that, The method includes: Retrieve multiple log entries from the game client; Based on the point log records, extract general log information under a preset fixed dimension of log data, wherein the general log information under the fixed dimension of log data remains unchanged in the point log records; Based on the point log records, at least one game-related information under each preset game change dimension is extracted, wherein each game-related information includes game operation-related data and time information related to the game operation-related data, and the game operation-related data can change during game operation; Based on the time information in the game association information under each game change dimension, the change time of the game operation association data in the game association information is determined; based on the change time under each game change dimension and the game operation association data corresponding to the change time, log data is generated for the game association information under each game change dimension to obtain at least one compressed log information, wherein each compressed log information is used to indicate the change of game operation association data under at least one game change dimension. Based on the general log information and the compressed log information, the processed log is obtained; Specifically, based on the change time under each game change dimension and the game operation association data corresponding to the change time, log data is generated for the game operation association data under each game change dimension to obtain at least one compressed log message, including: When the game change dimension includes a second game change dimension belonging to the second type of change dimension, and the second type of change dimension is the performance change dimension of the game client during game operation, based on the change time under the second game change dimension and the game operation association data corresponding to the change time, the performance value corresponding to the change time under the second game change dimension and the duration of the performance value are determined; based on the change time under the second game change dimension, the performance value corresponding to the change time, and the duration of the performance value, log data is generated for the game association information under the second game change dimension to obtain second compressed log information corresponding to the second game change dimension, wherein the second compressed log information includes a second data segment corresponding to the change time under the second game change dimension, and the second data segment includes the change time, the performance value corresponding to the change time, and the duration of the performance value.

2. The log compression processing method as described in claim 1, characterized in that, The game change dimension includes a first game change dimension belonging to the first type of change dimension, and the first type of change dimension is the game data change dimension during game execution; Based on the change time under each game change dimension and the game operation association data corresponding to the change time, log data is generated for the game association information under each game change dimension to obtain at least one compressed log message, including: Based on the change time under the first game change dimension and the game operation association data corresponding to the change time, determine the game process event corresponding to the change time under the first game change dimension; Based on the change time under the first game change dimension and the game process event corresponding to the change time, log data is generated for the game-related information under the first game change dimension to obtain the first compressed log information corresponding to the first game change dimension. The first compressed log information includes a first data segment corresponding to the change time under the first game change dimension, and the first data segment includes the change time and the game process event corresponding to the change time.

3. The log compression processing method as described in claim 1, characterized in that, Also includes: When there are at least two second game change dimensions, determine the dimension identifiers corresponding to the at least two second game change dimensions; Nesting the dimension identifiers and second compressed log information corresponding to at least two of the second game change dimensions yields one compressed log information corresponding to at least two of the second game change dimensions.

4. The log compression processing method as described in claim 1, characterized in that, The compressed log information includes player information and login time of the game players corresponding to the multiple log entries.

5. The log compression processing method according to any one of claims 1 to 4, characterized in that, After receiving the processed logs, the following are also included: If the game players corresponding to the multiple log entries have not yet logged off, the uncompressed log entries within the preset period interval are retrieved after a preset period interval. Based on the acquired log records, at least one game-related information under each preset game change dimension within the periodic interval is extracted; Log data is generated based on the game association information under each game change dimension within the periodic interval, resulting in at least one compressed log message corresponding to the periodic interval.

6. A log compression and restoration method, characterized in that, The method includes: Obtain a log restoration request instruction, wherein the log restoration request instruction includes player information and login time of the game player to whom the log to be restored belongs, and the log to be restored is a log obtained based on the log compression processing method according to any one of claims 1 to 5; Based on the player information and login time of the game players, general log information under a preset fixed dimension of log data is retrieved, wherein the general log information under the fixed dimension of log data remains unchanged in the point log records; Based on the player information and login time of the game players, at least one compressed log message is found under the preset game change dimension. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension. Based on the at least one compressed log information, at least one game-related information under each game change dimension is determined, wherein each game-related information includes game operation-related data and time information related to the game operation-related data, and the game operation-related data can change during game operation; Based on at least one game-related information under each game change dimension and the general log information, at least one event log record of the game client is reconstructed.

7. A log compression processing device, characterized in that, The device includes: The log acquisition module is used to acquire multiple log records from the game client. The first information extraction module is used to extract general log information under a preset fixed dimension of log data based on the point log records, wherein the general log information under the fixed dimension of log data remains unchanged in the point log records; The second information extraction module is used to extract at least one game-related information under each preset game change dimension based on the point log records. Each game-related information includes game operation-related data and time information related to the game operation-related data. The game operation-related data can change during game operation. The data generation module is used to determine the change time of the game operation association data in the game association information based on the time information in the game association information under each game change dimension; based on the change time under each game change dimension and the game operation association data corresponding to the change time, the module generates log data for the game association information under each game change dimension to obtain at least one compressed log message, wherein each compressed log message is used to indicate the change of the game operation association data under at least one game change dimension; The log generation module is used to obtain the processed log based on the general log information and the compressed log information; The data generation module is configured to: determine, based on the change time under the second game change dimension and the game operation association data corresponding to the change time, and the duration of the performance value, when the game change dimension includes a second game change dimension belonging to the second type of change dimension, and the second type of change dimension is the performance change dimension of the game client during game operation; and generate log data for the game association information under the second game change dimension based on the change time, the performance value corresponding to the change time, and the duration of the performance value, to obtain second compressed log information corresponding to the second game change dimension, wherein the second compressed log information includes a second data segment corresponding to the change time under the second game change dimension, and the second data segment includes the change time, the performance value corresponding to the change time, and the duration of the performance value.

8. A log compression and restoration device, characterized in that, The device includes: The instruction acquisition module is used to acquire a log restoration request instruction, wherein the log restoration request instruction includes player information of the game player to whom the log to be restored belongs and the player's login time, and the log to be restored is a log obtained based on the log compression processing method according to any one of claims 1 to 5; The first information search module is used to search for general log information under a preset fixed dimension of log data based on the player information and login time of the game player. The general log information under the fixed dimension of log data remains unchanged in the point log records. The second information search module is used to search for at least one compressed log message under a preset game change dimension based on the player information and login time of the game player. Each compressed log message is used to indicate the change of game operation related data under at least one game change dimension. The information determination module is used to determine at least one game-related information under each game change dimension based on the at least one compressed log information, wherein each game-related information includes game operation-related data and time information related to the game operation-related data, and the game operation-related data can change during game operation; The log restoration module is used to restore at least one event log record of the game client based on at least one game-related information under each game change dimension and the general log information.

9. 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 log compression processing method as described in any one of claims 1 to 5 or the log compression and restoration method as described in claim 6.

10. 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 log compression processing method according to any one of claims 1 to 5 or the log compression and restoration method according to claim 6.

Citation Information

Patent Citations

  • Method and system for automatically extracting features from log streams

    CN107609147A