A method and device for calculating player active time in a game

By collecting and analyzing game logs, determining the active status of players and determining the calculation rules, the one-sided problem of active time calculation in the prior art is solved, and more accurate and comprehensive active time calculation is achieved.

CN114904277BActive Publication Date: 2025-04-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210318011.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-04-25
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

The prior art has one-sidedness when calculating the active time of gamers, and it is impossible to accurately count the time when players pay attention to the game process while hanging up.

Method used

By collecting the player's game log, determining the player's active status in a specific time period, and determining the corresponding active time calculation rules based on different active statuses, thereby calculating the player's active time.

Benefits of technology

This method can more accurately calculate the player's active time, including the attention time in the hang-up state, improving the comprehensiveness and accuracy of the calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114904277B_ABST
    Figure CN114904277B_ABST
Patent Text Reader

Abstract

The present application provides a method for calculating the active time of players in a game, including: collecting the game logs of the observed players; judging the active status of the observed players in the concerned time period according to the game logs; determining the active time calculation rules corresponding to the concerned time period according to the active status of the observed players in the concerned time period; and calculating the active time of the observed players in the concerned time period according to the specific records of the game logs of the observed players in the concerned time period provided by the game logs, using the active time calculation rules. This method makes the calculated active time more comprehensive and improves the accuracy of the active time calculation by judging the "player active status" and determining the "active time calculation rules".
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for calculating the active time of players in a game. The present application further provides related electronic equipment and computer-readable storage media. Background Art

[0002] With the rapid development of computer technology, online games are becoming more and more popular among gamers. The active time of gamers in the game is crucial for game operators to adjust game levels, determine the amount of game robots to be deployed, and match game strategies.

[0003] During the game, gamers often hang up. In the prior art, only the non-hang up state and the hang up state of the gamer can be distinguished. The active time of the player is only the time corresponding to the player's non-hang up state. However, in the hang up state, the player often pays attention to the game process, which is also an active state. Therefore, the active time calculated by the prior art is one-sided and the active time calculation result is inaccurate. Summary of the invention

[0004] The present application provides a method and device for calculating the active time of players in a game, so as to solve the technical problems that the active time calculated by the prior art is one-sided and the active time calculation result is inaccurate.

[0005] The present application embodiment provides a method for calculating the active time of a player in a game, including:

[0006] Collect the game logs of the observed players;

[0007] Determining the activity status of the observed player during the concerned time period according to the game log;

[0008] Determining an active time calculation rule corresponding to the concerned time period according to the active state of the observed player in the concerned time period;

[0009] The active time calculation rule is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log.

[0010] Optionally, the collecting of game logs of the observed players includes: optimizing the game logs.

[0011] Optionally, the optimizing processing of the game log includes: supplementing missing records in the game log.

[0012] Optionally, the optimizing the game log further includes: deleting unreasonable records in the game log.

[0013] Optionally, determining the activity status of the observed player in the concerned time period according to the game log includes:

[0014] Determine the instructions contained in the game log of the concerned time period;

[0015] Determine the externality of the instruction; the externality of the instruction refers to distinguishing the type of the instruction, including: external instructions and internal instructions; the external instruction refers to the control instruction of the observed player on the game; the internal instruction refers to the control instruction that is not an external instruction;

[0016] According to the externality of the instruction, the activity status of the observed player in the concerned time period is determined.

[0017] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instructions includes: if the instructions only include external instructions, determining that the active state of the observed player in the concerned time period is an online state, and the observed player is an online player.

[0018] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction only includes internal instructions, determining that the active state of the observed player in the concerned time period is an offline AFK state, and the observed player is an offline AFK player.

[0019] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction includes external instructions and internal instructions, determining that the active state of the observed player in the concerned time period is an online idle state, and the observed player is an online idle player.

[0020] Optionally, determining an active time calculation rule corresponding to the focused time period according to the active state of the observed player in the focused time period includes:

[0021] If the observed player is an online player during the concerned time period, the time corresponding to the concerned time period is all counted into the active time;

[0022] If the observed player is an offline player during the concerned time period, the time corresponding to the concerned time period will not be counted as active time;

[0023] If the observed player is an online idle player during the concerned time period, the active time calculation rule corresponding to the concerned time period is determined according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period.

[0024] Optionally, determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period includes:

[0025] If the first instruction is an external instruction and the second instruction is also an external instruction, the time between the first instruction and the second instruction is counted as active time;

[0026] If the first instruction is an internal instruction and the second instruction is also an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0027] If the first instruction is an external instruction and the second instruction is an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0028] If the first instruction is an internal instruction and the second instruction is an external instruction, the time between the first instruction and the second instruction is counted as the active time.

[0029] Optionally, the determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period further includes:

[0030] calculating the time between the first instruction and the second instruction;

[0031] Determine whether the time between the first instruction and the second instruction is less than a set threshold;

[0032] Determining whether the second instruction needs to be adjusted according to the judgment result includes: if so, adjusting the second instruction to the next adjacent instruction of the original second instruction; if not, not adjusting the second instruction.

[0033] Optionally, the calculating the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule includes:

[0034] Using the active time calculation rule to determine the active time of specific records of the game log of the concerned time period, and obtaining all active time periods of the concerned time period;

[0035] The times corresponding to all active time periods in the concerned time period are summed up to obtain the active time of the observed player in the concerned time period.

[0036] The embodiment of the present application also provides a device for calculating the active time of players in a game, comprising: a game log collection unit, an active state determination unit, an active time calculation rule determination unit, and an active time calculation unit;

[0037] The game log collection unit is used to collect the game logs of the observed players;

[0038] The activity status determination unit is used to determine the activity status of the observed player in the concerned time period according to the game log;

[0039] The active time calculation rule determination unit is used to determine the active time calculation rule corresponding to the concerned time period according to the active state of the observed player in the concerned time period;

[0040] The active time calculation unit is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule.

[0041] The embodiment of the present application also provides an electronic device, including: a collector, a memory and a processor;

[0042] The collector is used to collect the game logs of the observed players;

[0043] The memory is used to store one or more computer instructions;

[0044] The processor is used to execute the one or more computer instructions to implement the above method.

[0045] The embodiment of the present application also provides a computer-readable storage medium on which one or more computer instructions are stored, and the instructions are executed by a processor to implement the above method.

[0046] Compared with the prior art, the method for calculating the active time of players provided in the present application includes: collecting the game logs of the observed players; determining the active status of the observed players in the concerned time period according to the game logs; determining the active time calculation rules corresponding to the concerned time period according to the active status of the observed players in the concerned time period; and calculating the active time of the observed players in the concerned time period according to the specific records of the game logs of the observed players in the concerned time period provided by the game logs. The method distinguishes the active status of the players through the game logs of the players, and determines the corresponding active time calculation rules according to the different active status of the players, so as to calculate the active time of the players according to the active time calculation rules according to the game logs of the players. The method introduces the technical features of "player active status" and "active time calculation rules", which can make the player's active status distinguish more detailed, and use a more reasonable calculation method to calculate the active time under different active statuses, so that the calculated active time is more comprehensive, and improves the accuracy of the player's active time calculation. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0048] Figure 1 A schematic diagram of a method for calculating player active time in the prior art;

[0049] Figure 2 An application system diagram of a method for calculating active time of players in a game provided by an embodiment of the present application;

[0050] Figure 3 A flowchart of a method for calculating player active time provided in the first embodiment of the present application;

[0051] Figure 4 A first schematic diagram of determining a player's active state according to the externality of an instruction provided for a first implementation of the present application;

[0052] Figure 5 A second schematic diagram of determining a player's active state according to the externality of an instruction provided for the first implementation of the present application;

[0053] Figure 6 A third schematic diagram of determining a player's active state according to the externality of an instruction provided for the first implementation of the present application;

[0054] Figure 7 A schematic diagram of the online player active time calculation rule provided in the first embodiment of the present application;

[0055] Figure 8 A schematic diagram of a calculation rule for the active time of an offline player provided in the first embodiment of the present application;

[0056] Fig. 9 A schematic diagram of the calculation rules for the active time of online idle players provided in the first embodiment of the present application;

[0057] Fig.10 A schematic diagram of another online idle player active time calculation rule provided in the first embodiment of the present application;

[0058] Fig.11 A schematic diagram of calculating the active time of an observed player in a focused time period provided in the first embodiment of the present application;

[0059] Fig.12 A schematic diagram of the structure of a device for calculating the active time of players in a game provided in a second embodiment of the present application;

[0060] Fig.13 A schematic diagram of the structure of an electronic device provided in the third embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the above description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.

[0062] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, 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 clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0063] Figure 1 The figure is a schematic diagram of a method for calculating player active time in the prior art.

[0064] During online games, players may choose to leave the game idle for reasons such as needing to leave for a short period of time or being unfamiliar with the game strategy. When the player returns or wants to control the game, the idle state is canceled. In the existing method for calculating player active time, the time between idle and canceled is defined as inactive time, so the active time only counts the online time before and after the idle state.

[0065] In real-life scenarios, some players will not leave after hanging up, but will continue to pay attention to the game process. For example, for some novice players who are not familiar with the game strategy, after playing the game for a period of time, they may hang up and let the virtual character they control follow the expert players to play the game. In this process, novice players will not leave the game, but continue to pay attention to the game process and learn game strategies. They may even occasionally participate in game control while hanging up until they are released. For these players, they are still in an active state of paying attention to the game process after hanging up, and this period of time should still be considered active time. However, the existing method for calculating the active time of players cannot distinguish the active state of the players after hanging up, so it is impossible to calculate the active time of the players after hanging up into the active time of the players, resulting in the calculated active time being one-sided and the active time calculation result being inaccurate.

[0066] like Figure 1 As shown in the figure, after a player logs in to the game, he controls the game for a period of time, and then the player hangs up for some reason. After hanging up for a period of time, the player cancels the hang-up operation until the game is logged out. Then, in the prior art, the player's active time includes the time from login to hanging up, and the time from canceling the hang-up to logging out, while the time from hanging up to canceling the hang-up is considered as inactive time. This calculation method will ignore the player's active time during the time period from hanging up to canceling the hang-up, resulting in one-sidedness of the calculated active time and inaccurate calculation results of the active time.

[0067] In response to the above problems, the present application provides a method for calculating the active time of players in a game, an active time calculation device corresponding to the method, an electronic device that can implement the active time calculation method, and a computer-readable storage medium.

[0068] The method, device, electronic device, and computer-readable storage medium described in this application are further described in detail below in conjunction with specific embodiments and drawings.

[0069] Figure 2 is an application system diagram of a method for calculating the active time of players in a game provided by an embodiment of the present application. Figure 2As shown, the application system includes: a game terminal 201 and a server 202. The game terminal 201 and the server 202 are connected by communication through a network. The game terminal 201 can be a device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant (PDA), etc., which can be one device or multiple devices. The server 202 can be an independent server, deploying the calculation method of the player's active time provided by this application, or a server group composed of multiple servers, wherein each server deploys a module in the calculation method of the player's active time provided by this application. Both independent servers and server groups are used to calculate the active time of the player when the game terminal 201 is playing the game. Of course, the server 202 can also be a cloud server, and the calculation method of the player's active time provided by this application is deployed on the cloud server. The player plays the game through the game terminal 201, uploads the relevant game process to the server 202 through the network, and the server 202 detects the player's active time. The active time of multiple players playing the game on the game terminal 201 can be calculated one by one, or it can be calculated synchronously.

[0070] The application system of the method for calculating the player's active time can be applied to the game operator's decision-making process such as adjusting the game level, determining the amount of game robot deployment, and matching game strategies. For example, the player's active time for a certain game is calculated by the method for calculating the player's active time provided by this application. If the operator finds that the player's active time in the game is too short, the operator will increase the amount of game robots deployed to improve the game experience of active players, and may further adjust the game level or match the game strategy, such as increasing the difficulty of the game level, adding a weapon gift box in the game level, etc., to increase the game's attractiveness to players, thereby enhancing the player's game experience.

[0071] The present application provides an embodiment of a method for calculating the active time of players in a game. It should be noted that the steps shown in the flowchart of the method can be executed in a computer system such as a set of computer executable instructions. At the same time, in some cases, the steps shown can be executed in a logical order different from that shown in the flowchart of the method.

[0072] The first embodiment of the present application provides a method for calculating the active time of players in a game.

[0073] The player active time refers to the time that the player pays attention to the game process. The player active time described in the prior art only includes the player's online time, while the player active time described in this application includes the player's online time and the active time corresponding to the player's online idle time. Therefore, the player active time described in this application is more comprehensive than the player active time described in the prior art, and is more in line with the player's attention time to the game process.

[0074] Figure 3 Flowchart of the method for calculating the player's active time provided in this embodiment. Figure 3 The method for calculating the player's active time provided in this embodiment is described in detail. The embodiments described below are used to explain the technical solution of this application and are not intended to be used as limitations for actual use.

[0075] like Figure 3 The method for calculating the player's active time provided in this embodiment includes the following steps:

[0076] Step S301, collecting the game log of the observed player.

[0077] The observed players refer to the players whose active time needs to be calculated among the game players. For a game, the observed players can be a number of randomly selected players participating in the game, or all players participating in the game. The number of observed players is determined according to the game-related content that the game party needs to adjust.

[0078] The game log refers to the game data generated by the players participating in the game, which may include a series of command data of the players participating in the game, such as game commands such as login, logout, idle, recharge, purchase of equipment, etc., and various parameters of the virtual characters controlled by the players, such as the level of the virtual characters, etc., and the action data of the virtual characters controlled by the players in the game, such as movement, picking up weapons, attacking, etc. The game log is usually generated by the game server connected to the game terminal according to the actual game situation.

[0079] The purpose of this step is to collect the game logs of the observed players and provide a basis for calculating the players' active time.

[0080] Directly collecting game logs may contain some dirty data. The dirty data in this embodiment refers to data that will affect the calculation of player active time. Dirty data may be generated by the following reasons:

[0081] First, frequent logins caused by players being offline will generate multiple login records in a short period of time in the game log. Although these login records are all player command data, the players did not pay attention to the game process during this period of time. These login records are dirty data that will affect the calculation of player active time.

[0082] Second, when the game log is transmitted back, some log fields may be lost. These lost fields will cause the game log to be incoherent and interfere with the calculation of the player's active time. These logs with lost fields are also dirty data that will affect the calculation of the player's active time.

[0083] Third, if a player forgets to log out of the game after playing, a long period of unrecorded logs will be generated in the game log, which will increase the amount of calculation for the player's active time. These unrecorded logs are also dirty data that will affect the calculation of the player's active time.

[0084] Of course, in addition to the above three situations, there are other subjective or objective reasons that cause dirty data, which will not be explained in detail here.

[0085] Since the collected game logs contain dirty data, the game logs need to be optimized to reduce interference with the calculation of the player's active time and make the calculation result of the player's active time more accurate.

[0086] The optimization process includes: supplementing missing records in the game log.

[0087] The missing records in the game log can be supplemented according to the corresponding relationship recorded in the game log. For example: in a section of the game log, there is only an on-hook instruction, but no un-hook instruction. Then there must be a record of the player issuing an un-hook instruction in the missing part of the game log. Therefore, the record of the player issuing the un-hook instruction can be supplemented in the missing part of the log. Another example: in a section of the game log, there is a record of attacking with a pistol first, and then a record of attacking with a machine gun appears. Then it can be said that there will be a record of the player issuing a weapon change instruction in the missing part between the pistol attack record and the machine gun attack record. Therefore, the record of the player issuing a weapon change instruction can be supplemented in the missing part of the log.

[0088] The optimization process also includes: deleting unreasonable records in the game log

[0089] According to the logical relationship recorded in the game log, the unreasonable records in the game log can be deleted. For example: in a section of the game log, there are high-frequency login records in a short period of time, and there are no other records in the middle of the login records. In this section of the game log, only the last login record needs to be kept, and the other login records can be deleted. For another example: in a section of the game log, there are high-frequency logout records in a short period of time, and there are no other records in the middle of the logout records. In this section of the game log, only the earliest logout record needs to be kept, and the other logout records can be deleted.

[0090] Step S302: determining the activity status of the observed player in the concerned time period according to the game log.

[0091] The concerned time period refers to the time period in the game log for calculating the player's active time. The concerned time period can be one or more time periods selected by the game party according to the game adjustment requirements, or it can be a time window defined for the convenience of calculation. The time window is a unit time period for dividing the game log according to a pre-set time, and it is also a unit time period for calculating the player's active time. For example: a 40-minute game will generate a 40-minute game log. Taking 10 minutes as a time window, this game log will be divided into 4 time windows. When calculating the player's active time, the player's active time in the 4 time windows will be calculated separately, and then the player's active time in the 4 time windows will be added. The concerned time period can be a time window or divided into multiple time windows. In this way, the calculation of the player's active time in the concerned time period can be a parallel calculation of several time windows, which shortens the calculation time and improves the calculation efficiency.

[0092] The active state refers to the player's attention to the game process. If the player is always participating in the game during the game process, then this player is an active player. If the player is idle and not paying attention to the game during the game process, then this player is an inactive player.

[0093] A preferred method for determining the active state of the observed player in the concerned time period according to the game log includes the following steps:

[0094] Step S302-1, determining the instructions contained in the game log of the concerned time period.

[0095] The purpose of this step is to identify the commands contained in the game logs during the time period of interest.

[0096] Game logs are game data generated by players participating in the game, which include player's game instructions, such as login instructions, logout instructions, movement instructions, attack instructions, etc. It also includes related instructions to maintain the game process, such as hang-up instructions, follow instructions, etc.

[0097] Step S302-2, determining the externality of the instruction.

[0098] The externality of the instruction refers to distinguishing the type of the instruction, including: external instructions and internal instructions; the external instruction refers to the control instruction of the observed player on the game; the internal instruction refers to the control instruction that is not an external instruction.

[0099] The game log contains instructions. Each record in the game log has its corresponding instructions. Instructions can be divided into external instructions and internal instructions based on the externality of the instructions. For example, the instructions for players to control the movement of virtual characters are external instructions, while after the player issues the hang-up instruction, the instructions for the virtual character to follow other players are internal instructions. In other words, as long as the game control instructions issued by the player are external instructions, such as: login instructions, logout instructions, hang-up instructions, etc., while game control instructions issued by non-players are internal instructions, such as: follow movement instructions, follow attack instructions, etc.

[0100] Determining the instructions corresponding to the game log is crucial to determining the player's active status. In the subsequent steps, the player's active status and the player's active time are determined by the instructions corresponding to the game log. Of course, the instructions corresponding to the game log can be directly obtained through the game server, and the game server can distinguish whether the instructions are the player's control instructions or the game's built-in instructions.

[0101] Step S302-3: determining the activity status of the observed player in the concerned time period according to the externality of the instruction.

[0102] The player's active status can be divided into: online status, online idle status and offline idle status. The corresponding players are online players, online idle players and offline idle players.

[0103] Online players refer to players who always pay attention to the game process and participate in the game. The active status of such players is online; online AFK players refer to players who leave the game idle but occasionally pay attention to the game process and occasionally participate in the game. The active status of such players is online AFK; offline AFK players refer to players who leave the game idle and do not pay attention to or participate in the game. The active status of such players is offline AFK.

[0104] According to the externality of the instructions, the active state of the observed player in the concerned time period is determined, including: if the instructions only include external instructions, then the active state of the observed player in the concerned time period is determined to be an online state, and the observed player is an online player.

[0105] Figure 4 A first schematic diagram of determining a player's active status based on the externality of an instruction provided for this implementation.

[0106] like Figure 4 As shown, the watched time period is defined as a time window. Within the time window, all commands are external commands. This means that within this time window, the player has been watching and controlling the game. It can be determined that the observed player is in an active online state within the time window, and the player is an online player.

[0107] The active state of the observed player in the concerned time period is determined according to the externality of the instruction, and further includes: if the instruction only includes internal instructions, the active state of the observed player in the concerned time period is determined to be an offline idle state, and the observed player is an offline idle player.

[0108] Figure 5 A second schematic diagram of determining the player's active status based on the externality of instructions provided for this implementation.

[0109] like Figure 5 As shown, the watched time period is defined as a time window. Within the time window, all commands are internal commands. This means that within this time window, the player has not been paying attention to the game. It can be determined that the observed player is in an inactive, offline state within the time window, and the player is an offline player.

[0110] The active state of the observed player in the concerned time period is determined according to the externality of the instruction, and further includes: if the instruction includes an external instruction and an internal instruction, then it is determined that the active state of the observed player in the concerned time period is an online idle state, and the observed player is an online idle player.

[0111] Figure 6 A third schematic diagram of determining the player's active status based on the externality of instructions provided for this implementation.

[0112] like Figure 6 As shown, the time period being watched is defined as a time window. Within the time window, the instructions include both external instructions and internal instructions. This means that within this time window, the player will occasionally pay attention to and manipulate the game. It can be determined that the observed player is in a partially active online hang-up state within the time window, and the player is an online hang-up player.

[0113] Step S303: determining an active time calculation rule corresponding to the focused time period according to the active status of the observed player in the focused time period.

[0114] The active time calculation rule refers to a method for calculating active time. Different active time calculation methods correspond to different active states of players. The preferred active time calculation rule is now described in detail.

[0115] First, if the observed player is an online player during the concerned time period, all time corresponding to the concerned time period is counted as the active time.

[0116] Figure 7 A schematic diagram of the online player active time calculation rules provided in this embodiment.

[0117] like Figure 7 As shown in the figure, the online players in the concerned time period are in an active state, so all the commands corresponding to the player logs in the concerned time period are external commands, and the time between commands is the active time. Therefore, for online players, the active time calculation rule for the concerned time period is that all the time corresponding to the concerned time period is counted as active time.

[0118] Second, if the observed player is an offline player during the concerned time period, the time corresponding to the concerned time period will not be counted as active time.

[0119] Figure 8 A schematic diagram of the calculation rules for the active time of offline players provided in this embodiment.

[0120] like Figure 8 As shown in the figure, the offline players in the concerned time period are inactive, so all the commands corresponding to the player logs in the concerned time period are internal commands, and the time between commands is inactive time. Therefore, for the offline players, the active time calculation rule for the concerned time period is that the time corresponding to the concerned time period is not counted as active time.

[0121] Third, if the observed player is an online idle player during the concerned time period, the active time calculation rule corresponding to the concerned time period is determined based on at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period.

[0122] The adjacent first instruction and the adjacent second instruction refer to the instructions corresponding to the adjacent records in the game log of the concerned time period. The game log of the concerned time period may include adjacent instructions corresponding to a pair of adjacent records, or may include adjacent instructions corresponding to several pairs of adjacent records. In this embodiment, the instruction that appears first in all adjacent instructions is the first instruction, and the instruction that appears later is the second instruction. In other words, the second instruction in the first pair of adjacent instructions in the concerned time period is also the first instruction in the second pair of adjacent instructions.

[0123] Fig. 9 A schematic diagram of the online idle player active time calculation rules provided in this embodiment.

[0124] like Fig. 9 As shown, the online idle players in the time period of concern are in a partially active state, so the instructions corresponding to the player logs of the time period of concern include both external instructions and internal instructions. Whether the time between instructions is active time needs to be determined based on the adjacent first instructions and second instructions.

[0125] The calculation rules for online idle player active time include:

[0126] First, if the first instruction is an external instruction and the second instruction is also an external instruction, the time between the first instruction and the second instruction is counted as active time.

[0127] like Fig. 9 As described above, the first instruction 901 of the first pair of adjacent instructions is an external instruction, and the second instruction 902 is an external instruction, and the time between the first instruction 901 and the second instruction 902 is counted into the active time.

[0128] Second, if the first instruction is an internal instruction and the second instruction is also an internal instruction, the time between the first instruction and the second instruction is not counted as active time.

[0129] like Fig. 9 In the third pair of adjacent instructions, the first instruction 903 is an internal instruction, and the second instruction 904 is an internal instruction. The time between the first instruction 903 and the second instruction 904 is the inactive time and is not counted as the active time.

[0130] Third, if the first instruction is an external instruction and the second instruction is an internal instruction, the time between the first instruction and the second instruction is not counted as active time.

[0131] like Fig. 9 In the second pair of adjacent instructions, the first instruction 902 is an external instruction and the second instruction 903 is an internal instruction. The time between the first instruction 902 and the second instruction 903 is the inactive time and is not counted as the active time.

[0132] Fourth, if the first instruction is an internal instruction and the second instruction is an external instruction, the time between the first instruction and the second instruction is counted as active time.

[0133] like Fig. 9 As described above, the first instruction 904 in the fourth pair of adjacent instructions is an internal instruction, and the second instruction 905 is an external instruction, and the time between the first instruction 904 and the second instruction 905 is counted into the active time.

[0134] The calculation rules for the active time of online idle players are now explained. For online idle players, after being idle, the player may be in a state where he sometimes pays attention to the game process and controls it, and sometimes does not pay attention to the game process. Although the time of paying attention to the game process and controlling it is still in the idle time, the player is obviously an active player, so the time of paying attention to the game process and controlling it should be considered as active time. This embodiment calculates the active time in the online idle state and formulates the calculation rules.

[0135] The online idle time period can be distinguished from the corresponding instructions in the game log. Since the player may occasionally control the game in the online idle state, the online idle time period includes both external instructions and internal instructions. If, of two adjacent instructions, the first instruction is an external instruction and the second instruction is also an external instruction, it means that in the time period between the first instruction and the second instruction, the player is in an active state of paying attention to the game process and manipulating the game; if, of two adjacent instructions, the first instruction is an internal instruction and the second instruction is also an internal instruction, it means that in the time period between the first instruction and the second instruction, the player is in an inactive state of not paying attention to the game process; if, of two adjacent instructions, the first instruction is an external instruction and the second instruction is an internal instruction, it means that after issuing the first instruction, the player may have left the game terminal, and the game process continues according to the internal instruction. Therefore, in the time period between the first instruction and the second instruction, the player is in an inactive state of not paying attention to the game process; if, of two adjacent instructions, the first instruction is an internal instruction and the second instruction is an external instruction, it means that after the game process is carried out according to the first instruction, the player may return to the game terminal and issue the second instruction after paying attention to the game process. Therefore, in the time period between the first instruction and the second instruction, the player is in an active state of paying attention to the game process.

[0136] The first instruction and the second instruction are instructions corresponding to adjacent records in the game log of the time period being watched. The game log of the time period being watched may include several pairs of adjacent records, and therefore, the time period being watched may include several pairs of adjacent instructions. There may be a situation where the interval between adjacent instructions is too short. In this case, the latter instruction in the adjacent instructions needs to be adjusted. For example: after the first internal instruction, the second internal instruction appears in a short time, and then the external instruction appears. Since the time between the first internal instruction and the second internal instruction is very short, it cannot be said that the player did not pay attention to the game process during the time period between the first internal instruction and the second internal instruction.

[0137] Therefore, the calculation rules for online idle player active time also include:

[0138] calculating the time between the first instruction and the second instruction;

[0139] Determine whether the time between the first instruction and the second instruction is less than a set threshold;

[0140] Determining whether the second instruction needs to be adjusted according to the judgment result includes: if so, adjusting the second instruction to the next adjacent instruction of the original second instruction; if not, not adjusting the second instruction.

[0141] The set threshold is a time determined based on the number of instructions in the game log and the player's active state. If the time between two adjacent instructions is less than the set threshold, it is considered that the player's active state between the two adjacent instructions cannot be determined through the two adjacent instructions, and the latter instruction of the two adjacent instructions needs to be adjusted.

[0142] Fig.10 A schematic diagram of another online idle player active time calculation rule provided in this embodiment.

[0143] like Fig.10 As shown, the first instruction 1001 in the first pair of adjacent instructions is an internal instruction, and the second instruction 1002 is also an internal instruction. If the time between the first instruction 1001 and the second instruction 1002 is less than a set threshold (for example, 3 minutes), then the second instruction should be adjusted to the next adjacent instruction 1003 of the original second instruction 1002. In this case, the calculation of the active time is performed with instruction 1001 as the first instruction and instruction 1003 as the second instruction.

[0144] If the time between the first instruction 1001 and the second instruction 1002 is greater than or equal to the set threshold (for example, 3 minutes), the second instruction does not need to be adjusted. In this case, the calculation of the active time is still performed with instruction 1001 as the first instruction and instruction 1002 as the second instruction.

[0145] Step S304, according to the specific record of the game log of the observed player in the concerned time period provided by the game log, the active time calculation rule is used to calculate the active time of the observed player in the concerned time period.

[0146] Since the time period being watched may contain multiple specific records of game logs, the calculation of the active time of the observed player in the time period being watched includes:

[0147] Using the active time calculation rule to determine the active time of specific records of the game log of the concerned time period, and obtaining all active time periods of the concerned time period;

[0148] The times corresponding to all active time periods in the concerned time period are summed up to obtain the active time of the observed player in the concerned time period.

[0149] Fig.11 It is a schematic diagram of calculating the active time of the observed player in the concerned time period provided by this embodiment.

[0150] like Fig.11 As shown, the game operator needs to calculate the active time of player A in a 30-minute online battle game, set the time period to be paid attention to as the total game time, and set the time window to 10 minutes. The steps for calculating the active time of player A in the game are as follows:

[0151] First, collect the game logs generated by player A in the game and optimize the game logs. The specific records of the collected game logs correspond to the distribution of instructions as follows: Fig.11 shown.

[0152] Second, the active state of player A in the game is determined in units of time windows. All commands in the first time window are external commands, and the player's active state in the first time window can be determined to be online; all commands in the second time window are internal commands, and the player's active state in the second time window can be determined to be offline and idle; the commands in the third time window include both external and internal commands, and the player's active state in the third time window can be determined to be online and idle.

[0153] Third, according to the active status of player A in the game, determine the corresponding active time calculation rule. Since the player's active status in the first time window is online, it can be determined that the active time calculation rule corresponding to the first time window is to record all the time corresponding to the first time window as active time (first active time); since the player's active status in the second time window is offline, it can be determined that the active time calculation rule corresponding to the second time window is to record all the time corresponding to the second time window as inactive time; since the player's active status in the third time window is online, it can be determined that the active time calculation rule corresponding to the third time window is to determine whether the time between adjacent instructions is active time based on adjacent instructions, specifically: Instruction 1108 and instruction 1109 are both external instructions, so the time between instruction 1108 and instruction 1109 is recorded as active time (second active time); since instruction 1109 is an external instruction and instruction 1110 is an internal instruction, the time between instruction 1109 and instruction 1110 is recorded as inactive time; since instruction 1110 and instruction 1111 are both internal instructions, the time between instruction 1110 and instruction 1111 is recorded as inactive time; since instruction 1111 is an internal instruction and instruction 1112 is an external instruction, the time between instruction 1111 and instruction 1112 is recorded as active time (third active time).

[0154] Fourth, the above determined active time is summed up to obtain the active time of player A in the game. The active time of player A in the game = the first active time + the second active time + the third active time.

[0155] The above is an implementation of the method for calculating the player's active time in the game provided in the first embodiment of the present application. Through the above method, the active time of the player during the idle time period can be added to the active time calculation method, making the calculated active time more accurate.

[0156] A second embodiment of the present application provides a device for calculating the active time of players in a game. Fig.12 A schematic diagram of the structure of a device for calculating the active time of players in a game provided by this embodiment.

[0157] like Fig.12 As shown, the device for calculating the active time of players in the game provided by this embodiment includes: a game log collection unit 1201, an active state determination unit 1202, an active time calculation rule determination unit 1203, and an active time calculation unit 1204.

[0158] The game log collection unit 1201 is used to collect the game logs of the observed players.

[0159] Optionally, the collecting of game logs of the observed players includes: optimizing the game logs.

[0160] Optionally, the optimizing processing of the game log includes: supplementing missing records in the game log.

[0161] Optionally, the optimizing the game log further includes: deleting unreasonable records in the game log.

[0162] The activity status determination unit 1202 is used to determine the activity status of the observed player in the concerned time period according to the game log.

[0163] Optionally, determining the activity status of the observed player in the concerned time period according to the game log includes:

[0164] Determine the instructions contained in the game log of the concerned time period;

[0165] Determine the externality of the instruction; the externality of the instruction refers to distinguishing the type of the instruction, including: external instructions and internal instructions; the external instruction refers to the control instruction of the observed player on the game; the internal instruction refers to the control instruction that is not an external instruction;

[0166] According to the externality of the instruction, the activity status of the observed player in the concerned time period is determined.

[0167] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instructions includes: if the instructions only include external instructions, determining that the active state of the observed player in the concerned time period is an online state, and the observed player is an online player.

[0168] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction only includes internal instructions, determining that the active state of the observed player in the concerned time period is an offline AFK state, and the observed player is an offline AFK player.

[0169] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction includes external instructions and internal instructions, determining that the active state of the observed player in the concerned time period is an online idle state, and the observed player is an online idle player.

[0170] The active time calculation rule determination unit 1203 is used to determine the active time calculation rule corresponding to the concerned time period according to the active state of the observed player in the concerned time period.

[0171] Optionally, determining an active time calculation rule corresponding to the focused time period according to the active state of the observed player in the focused time period includes:

[0172] If the observed player is an online player during the concerned time period, the time corresponding to the concerned time period is all counted into the active time;

[0173] If the observed player is an offline player during the concerned time period, the time corresponding to the concerned time period will not be counted as active time;

[0174] If the observed player is an online idle player during the concerned time period, the active time calculation rule corresponding to the concerned time period is determined according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period.

[0175] Optionally, determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period includes:

[0176] If the first instruction is an external instruction and the second instruction is also an external instruction, the time between the first instruction and the second instruction is counted as active time;

[0177] If the first instruction is an internal instruction and the second instruction is also an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0178] If the first instruction is an external instruction and the second instruction is an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0179] If the first instruction is an internal instruction and the second instruction is an external instruction, the time between the first instruction and the second instruction is counted as the active time.

[0180] Optionally, the determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period further includes:

[0181] calculating the time between the first instruction and the second instruction;

[0182] Determine whether the time between the first instruction and the second instruction is less than a set threshold;

[0183] Determining whether the second instruction needs to be adjusted according to the judgment result includes: if so, adjusting the second instruction to the next adjacent instruction of the original second instruction; if not, not adjusting the second instruction.

[0184] The active time calculation unit 1204 is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule.

[0185] Optionally, the calculating the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule includes:

[0186] Using the active time calculation rule to determine the active time of specific records of the game log of the concerned time period, and obtaining all active time periods of the concerned time period;

[0187] The times corresponding to all active time periods in the concerned time period are summed up to obtain the active time of the observed player in the concerned time period.

[0188] A third embodiment of the present application provides an electronic device. Fig.13 This is a schematic diagram of the structure of an electronic device provided in this embodiment.

[0189] like Fig.13 As shown, the electronic device provided in this embodiment includes: a collector, a memory and a processor;

[0190] The collector is used to collect game logs of observed players.

[0191] The memory is used to store computer instructions for executing a method for calculating the active time of players in the game.

[0192] The processor is used to execute computer instructions stored in the memory to perform the following steps:

[0193] Determining the activity status of the observed player during the concerned time period according to the game log;

[0194] Determining an active time calculation rule corresponding to the concerned time period according to the active state of the observed player in the concerned time period;

[0195] The active time calculation rule is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log.

[0196] Optionally, the collecting of game logs of the observed players includes: optimizing the game logs.

[0197] Optionally, the optimizing processing of the game log includes: supplementing missing records in the game log.

[0198] Optionally, the optimizing the game log further includes: deleting unreasonable records in the game log.

[0199] Optionally, determining the activity status of the observed player in the concerned time period according to the game log includes:

[0200] Determine the instructions contained in the game log of the concerned time period;

[0201] Determine the externality of the instruction; the externality of the instruction refers to distinguishing the type of the instruction, including: external instructions and internal instructions; the external instruction refers to the control instruction of the observed player on the game; the internal instruction refers to the control instruction that is not an external instruction;

[0202] According to the externality of the instruction, the activity status of the observed player in the concerned time period is determined.

[0203] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instructions includes: if the instructions only include external instructions, determining that the active state of the observed player in the concerned time period is an online state, and the observed player is an online player.

[0204] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction only includes internal instructions, determining that the active state of the observed player in the concerned time period is an offline AFK state, and the observed player is an offline AFK player.

[0205] Optionally, determining the active state of the observed player in the concerned time period based on the externality of the instruction also includes: if the instruction includes external instructions and internal instructions, determining that the active state of the observed player in the concerned time period is an online idle state, and the observed player is an online idle player.

[0206] Optionally, determining an active time calculation rule corresponding to the focused time period according to the active state of the observed player in the focused time period includes:

[0207] If the observed player is an online player during the concerned time period, the time corresponding to the concerned time period is all counted into the active time;

[0208] If the observed player is an offline player during the concerned time period, the time corresponding to the concerned time period will not be counted as active time;

[0209] If the observed player is an online idle player during the concerned time period, the active time calculation rule corresponding to the concerned time period is determined according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period.

[0210] Optionally, determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period includes:

[0211] If the first instruction is an external instruction and the second instruction is also an external instruction, the time between the first instruction and the second instruction is counted as active time;

[0212] If the first instruction is an internal instruction and the second instruction is also an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0213] If the first instruction is an external instruction and the second instruction is an internal instruction, the time between the first instruction and the second instruction is not counted as active time;

[0214] If the first instruction is an internal instruction and the second instruction is an external instruction, the time between the first instruction and the second instruction is counted as the active time.

[0215] Optionally, the determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period further includes:

[0216] calculating the time between the first instruction and the second instruction;

[0217] Determine whether the time between the first instruction and the second instruction is less than a set threshold;

[0218] Determining whether the second instruction needs to be adjusted according to the judgment result includes: if so, adjusting the second instruction to the next adjacent instruction of the original second instruction; if not, not adjusting the second instruction.

[0219] Optionally, the calculating the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule includes:

[0220] Using the active time calculation rule to determine the active time of specific records of the game log of the concerned time period, and obtaining all active time periods of the concerned time period;

[0221] The times corresponding to all active time periods in the concerned time period are summed up to obtain the active time of the observed player in the concerned time period.

[0222] The fourth embodiment of the present application provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed by a processor, they are used to implement the technical solution of the method for calculating the active time of players in the game in the first embodiment of the present application.

[0223] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A method for calculating the active time of players in a game, characterized in that: The method comprises: Collect the game logs of the observed players; Determining the activity status of the observed player during the concerned time period according to the game log; According to the active state of the observed player in the concerned time period, determine the active time calculation rule corresponding to the concerned time period; specifically including: if the observed player is an online player in the concerned time period, then all the time corresponding to the concerned time period is counted into the active time; if the observed player is an offline idle player in the concerned time period, then all the time corresponding to the concerned time period is not counted into the active time; if the observed player is an online idle player in the concerned time period, then determine the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period; wherein, determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period at least includes: if the first instruction is an internal instruction and the second instruction is an external instruction, then the time between the first instruction and the second instruction is counted into the active time; The active time calculation rule is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log.

2. The method according to claim 1, characterized in that: The collecting of the game logs of the observed players includes: optimizing the game logs.

3. The method according to claim 2, characterized in that The optimizing process for the game log includes: supplementing missing records in the game log.

4. The method according to claim 2, characterized in that: The optimizing process for the game log also includes: deleting unreasonable records in the game log.

5. The method according to claim 1, characterized in that Determining the activity status of the observed player in the concerned time period according to the game log includes: Determine the instructions contained in the game log of the concerned time period; Determine the externality of the instruction; the externality of the instruction refers to distinguishing the type of the instruction, including: external instructions and internal instructions; the external instruction refers to the control instruction of the observed player on the game; the internal instruction refers to the control instruction that is not an external instruction; According to the externality of the instruction, the activity status of the observed player in the concerned time period is determined.

6. The method according to claim 5, characterized in that Determining the active state of the observed player in the concerned time period based on the externality of the instructions includes: if the instructions only include external instructions, determining that the active state of the observed player in the concerned time period is an online state, and the observed player is an online player.

7. The method according to claim 5, characterized in that The step of determining the active state of the observed player in the concerned time period based on the externality of the instruction further includes: if the instruction only includes internal instructions, determining that the active state of the observed player in the concerned time period is an offline idle state, and the observed player is an offline idle player.

8. The method according to claim 5, characterized in that The step of determining the active state of the observed player in the concerned time period based on the externality of the instruction further includes: if the instruction includes an external instruction and an internal instruction, determining that the active state of the observed player in the concerned time period is an online idle state, and the observed player is an online idle player.

9. The method according to claim 1, characterized in that: The method of determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period further includes: If the first instruction is an external instruction and the second instruction is also an external instruction, the time between the first instruction and the second instruction is counted as active time; If the first instruction is an internal instruction and the second instruction is also an internal instruction, the time between the first instruction and the second instruction is not counted as active time; If the first instruction is an external instruction and the second instruction is an internal instruction, the time between the first instruction and the second instruction is not counted as active time.

10. The method according to claim 1, characterized in that The method of determining the active time calculation rule corresponding to the concerned time period according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period further includes: calculating the time between the first instruction and the second instruction; Determine whether the time between the first instruction and the second instruction is less than a set threshold; Determining whether the second instruction needs to be adjusted according to the judgment result includes: if so, adjusting the second instruction to the next adjacent instruction of the original second instruction; if not, not adjusting the second instruction.

11. The method according to claim 1, characterized in that: The calculating of the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log, using the active time calculation rule, comprises: Using the active time calculation rule to determine the active time of specific records of the game log of the concerned time period, and obtaining all active time periods of the concerned time period; The times corresponding to all active time periods in the concerned time period are summed up to obtain the active time of the observed player in the concerned time period.

12. A device for calculating the active time of players in a game, characterized in that: include: Game log collection unit, active status determination unit, active time calculation rule determination unit, active time calculation unit; The game log collection unit is used to collect the game logs of the observed players; The activity status determination unit is used to determine the activity status of the observed player in the concerned time period according to the game log; The active time calculation rule determination unit is used to determine the active time calculation rule corresponding to the concerned time period according to the active state of the observed player in the concerned time period; specifically including: if the observed player is an online player in the concerned time period, then all the time corresponding to the concerned time period is counted into the active time; if the observed player is an offline hang-up player in the concerned time period, then all the time corresponding to the concerned time period is not counted into the active time; if the observed player is an online hang-up player in the concerned time period, then the active time calculation rule corresponding to the concerned time period is determined according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period; wherein, the active time calculation rule corresponding to the concerned time period is determined according to at least two adjacent first instructions and second instructions in the instructions corresponding to the game log of the concerned time period, at least including: if the first instruction is an internal instruction and the second instruction is an external instruction, then the time between the first instruction and the second instruction is counted into the active time; The active time calculation unit is used to calculate the active time of the observed player in the concerned time period according to the specific record of the game log of the observed player in the concerned time period provided by the game log and using the active time calculation rule.

13. An electronic device, characterized in that: include: Collectors, storage and processors; The collector is used to collect the game logs of the observed players; The memory is used to store one or more computer instructions; The processor is used to execute the one or more computer instructions to implement the method according to any one of claims 1-11.

14. A computer-readable storage medium having one or more computer instructions stored thereon, characterized in that: The instruction is executed by a processor to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Obtaining method and device for user online time

    CN104184601A

  • Data processing method, device and equipment based on online monitoring, and storage medium

    CN109246233A