Ranking list data updating method and device, electronic equipment and readable storage medium

CN115845396BActive Publication Date: 2026-09-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211626605.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2026-09-25
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

[0003]现有技术中,一般在进行赛季结算时需对赛季对应的排行榜中所有数据进行复制,从而基于复制后的数据来给予玩家奖励,待数据复制结束之后才能切换至下一游戏赛季,但是由于排行榜数据很大,而导致在赛季结算时拷贝排行榜数据需花费大量时间,从而导致游戏赛季切换时的实时性较差

Benefits of technology

[0015]本申请实施例中,通过获取目标游戏的玩家在历史游戏赛季的历史排行榜树结构,上述历史排行榜树结构至少包括上一游戏赛季对应的第一树结构,一个树结构中包括多个玩家的玩家节点,上述玩家节点中包括玩家的游戏分数,上述玩家节点的左、右子节点对应的游戏分数,分别比玩家节点的游戏分数高和低;若当前游戏赛季中出现游戏分数发生变化的目标玩家,说明当前需进行排行榜数据的更新,则基于上述目标玩家变化后的目标游戏分数、上述第一树结构中各玩家节点的游戏分数和上述当前游戏赛季对应的第二树结构中各玩家节点的游戏分数,从第一树结构中确定出需新增至上述第二树结构的待新增节点,上述待新增节点为将上述目标玩家对应的玩家节点添加至第二树结构时影响排行榜位置的节点;并将上述目标玩家对应的玩家节点添加至上述第二树结构,同时在上述第二树结构中添加上述待新增节点对应的玩家节点,从而通过在赛季过程中实时对游戏分数发送变化的目标玩家进行更新,并且每次更新仅需涉及部分数据的更改,而无需修改赛季对应的排行榜中所有数据,从而随着赛季的进行,排行榜树结构中的数据也随之更新变化,实现了游戏赛季之间的无缝切换,从而提高了游戏赛季切换时的实时性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115845396B_ABST
    Figure CN115845396B_ABST
Patent Text Reader

Abstract

The application discloses a data updating method and device of a ranking list, electronic equipment and a computer readable storage medium. Embodiments of the application obtain a historical ranking list tree structure of a target game of a player in a historical game season. The historical ranking list tree structure at least includes a first tree structure corresponding to a previous game season. A tree structure includes player nodes of multiple players. If a target player with changed game scores appears in a current game season, based on the changed target game scores of the target player, game scores of each player node in the first tree structure and game scores of each player node in a second tree structure corresponding to the current game season, a to-be-added node that needs to be added to the second tree structure is determined from the first tree structure. The player node corresponding to the target player is added to the second tree structure, and the player node corresponding to the to-be-added node is added to the second tree structure, so that the real-time performance when the game season is switched can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the rise of the internet, games have become increasingly common in people's lives. Games typically engage players through seasons, and leaderboards are usually used to record players' combat power, rankings, and other information within each season. Sometimes, to further increase player participation, rewards may be given based on a player's performance over at least two game seasons.

[0003] In existing technologies, when settling a season, all data in the corresponding leaderboard needs to be copied so that players can be rewarded based on the copied data. Only after the data copying is completed can the game switch to the next season. However, because the leaderboard data is very large, copying the leaderboard data during season settlement takes a lot of time, resulting in poor real-time performance when switching game seasons. Summary of the Invention

[0004] This application provides a data update method, apparatus, electronic device, and computer-readable storage medium for leaderboards, which can improve the real-time performance during game season transitions.

[0005] In a first aspect, embodiments of this application provide a data update method for a ranking list, the method comprising:

[0006] Obtain the historical leaderboard tree structure of the target game's players in the previous game season. The aforementioned historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes player nodes of multiple players. Each player node includes the player's game score. The game scores of the left and right child nodes of the aforementioned player node are higher and lower than the game score of the player node, respectively.

[0007] If a target player experiences a change in game score during the current game season, then based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, a node to be added to the second tree structure is determined from the first tree structure. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0008] Add the player node corresponding to the target player to the second tree structure, and add the player node corresponding to the node to be added to the second tree structure.

[0009] Secondly, embodiments of this application also provide a data updating device for a ranking list, the device comprising:

[0010] The structure acquisition module is used to acquire the historical leaderboard tree structure of the target game's players in the previous game season. The historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. A tree structure includes player nodes of multiple players. The player nodes include the player's game score. The game scores of the left and right child nodes of the player nodes are higher and lower than the player node's game score, respectively.

[0011] The node determination module is used to determine, based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the node to be added to the second tree structure if a target player's game score changes in the current game season. The node to be added is the node that will affect the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0012] The node adding module is used to add the player node corresponding to the target player to the second tree structure, and at the same time add the player node corresponding to the node to be added to the second tree structure.

[0013] Thirdly, 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 of the data update methods for leaderboards provided in embodiments of this application.

[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the data update methods for leaderboards provided in embodiments of this application.

[0015] In this embodiment, the historical leaderboard tree structure of the target game's players in previous game seasons is obtained. This historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure contains player nodes for multiple players, and each player node contains the player's game score. The game scores of the left and right child nodes of each player node are higher and lower than the player node's game score, respectively. If a target player's game score changes in the current game season, it indicates that the leaderboard data needs to be updated. Based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the leaderboard data is updated from the first tree... The structure identifies nodes that need to be added to the second tree structure. These nodes are those that affect the leaderboard position when the player node corresponding to the target player is added to the second tree structure. The player node corresponding to the target player is added to the second tree structure, and the player node corresponding to the node to be added is also added to the second tree structure. This allows for real-time updates of the target player's game score during the season, with each update involving only partial data changes without modifying all data in the season's leaderboard. As the season progresses, the data in the leaderboard tree structure updates accordingly, achieving seamless switching between game seasons and improving the real-time performance of season transitions. Attached Figure Description

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

[0017] Figure 1 This is a schematic diagram of the ranking data update system provided in an embodiment of this application;

[0018] Figure 2 This is a schematic flowchart of one embodiment of the ranking data update method provided in this application.

[0019] Figure 3a This is a schematic diagram of a leaderboard tree structure provided in the embodiments of this application;

[0020] Figure 3b This is a schematic diagram of the second tree structure provided in the embodiments of this application when the target game score is 50;

[0021] Figure 3c This is a schematic diagram of the first type of second tree structure for deleting nodes provided in the embodiments of this application;

[0022] Figure 4a This is another schematic diagram of the leaderboard tree structure provided in the embodiments of this application;

[0023] Figure 4b This is a schematic diagram of the second tree structure provided in the embodiments of this application when the target game score is 50;

[0024] Figure 4c This is a schematic diagram of the second tree structure provided in the embodiments of this application when the target game score is 23;

[0025] Figure 4d This is a schematic diagram of the second tree structure provided in the embodiments of this application when the target game score is 30 or 9;

[0026] Figure 4e This is a schematic diagram of the second type of second tree structure for deleting nodes provided in the embodiments of this application;

[0027] Figure 4f This is a schematic diagram of the third type of second tree structure for deleting nodes provided in the embodiments of this application;

[0028] Figure 4g This is a schematic diagram of the second tree structure provided in the embodiments of this application when the target game score is 0;

[0029] Figure 4h This is a schematic diagram of the fourth type of second tree structure for deleting nodes provided in the embodiments of this application;

[0030] Figure 5 This is a schematic diagram of the tree structure corresponding to version 3 provided in the embodiments of this application;

[0031] Figure 6 This is a schematic diagram of a hash table structure provided in the embodiments of this application;

[0032] Figure 7a This is a schematic diagram of another structure of the hash table provided in the embodiments of this application;

[0033] Figure 7b This is a schematic diagram of a hash table structure for updating the score of player a provided in the embodiments of this application;

[0034] Figure 7c This is a schematic diagram of the hash table structure for updating the score of player d as provided in the embodiments of this application;

[0035] Figure 7d This is a schematic diagram of the hash table structure for updating the score of player g, provided in an embodiment of this application.

[0036] Figure 7eThis is a schematic diagram of the hash table structure during season updates provided in the embodiments of this application;

[0037] Figure 7f This is a schematic diagram of the hash table structure for updating player c's score, provided in an embodiment of this application.

[0038] Figure 7g This is a schematic diagram of another hash table structure provided in the embodiments of this application when updating the score of player a;

[0039] Figure 7h This is a schematic diagram of another hash table structure provided in the embodiments of this application when updating the score of player a;

[0040] Figure 8 This is a flowchart illustrating the player score query process provided in this application embodiment;

[0041] Figure 9a This is a schematic diagram of a player node deletion method provided in an embodiment of this application;

[0042] Figure 9b This is another structural diagram of player node deletion provided in the embodiments of this application;

[0043] Figure 9c This is another structural diagram of player node deletion provided in the embodiments of this application;

[0044] Figure 9d This is a schematic diagram of a hash table deletion structure provided in an embodiment of this application;

[0045] Figure 10 This is a schematic diagram of the data updating device for the ranking list provided in an embodiment of this application;

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

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

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

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

[0050] This application provides a data update method, apparatus, electronic device, and computer-readable storage medium for ranking lists. Specifically, the data update method for ranking lists in 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, touchscreen, 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 an independent 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.

[0051] For example, such as Figure 1As shown, the electronic device is illustrated using a terminal as an example. The terminal can obtain the historical leaderboard tree structure of a player in a target game during a previous game season. This historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure contains multiple player nodes, each containing a player's game score. The game scores of the left and right child nodes of each player node are higher and lower than the player node's game score, respectively. If a target player's game score changes during the current game season, based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, a node to be added to the second tree structure is determined from the first tree structure. This node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure. The player node corresponding to the target player is added to the second tree structure, and simultaneously, the player node corresponding to the node to be added is added to the second tree structure.

[0052] To address the aforementioned issues, this application provides a data update method, apparatus, electronic device, and computer-readable storage medium for leaderboards, which can improve real-time performance during season transitions.

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

[0054] In this embodiment, a terminal is used as an example for illustration. This embodiment provides a data update method for a leaderboard, such as... Figure 2 As shown, the specific process of updating the data for this ranking list can be as follows:

[0055] 201. Obtain the historical leaderboard tree structure of the target game's players in the previous game season. The aforementioned historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes player nodes for multiple players. Each player node includes the player's game score. The game scores corresponding to the left and right child nodes of the aforementioned player node are higher and lower than the player node's game score, respectively.

[0056] The target game mentioned above is a game that allows for season accumulation. This means that the game can reward players based on their performance over at least two game seasons, and a player's performance in a game season can be reflected in their game score.

[0057] The leaderboard tree structure is used to store the game information of each player in at least one game season of the target game, i.e. Figure 3a The key value in the game information includes, but is not limited to, player identity information, player game score, etc. For example, key = (s, x), in Figure 3a In the diagram, 's' represents the player's identity information, and 'x' represents the player's score. Figure 3a The table displays the player nodes for players a, b, c, d, e, f, g, h, and i.

[0058] In this tree structure, each node corresponds to a player and is named the player's player node. The player's game information is stored in the player's player node. Each player node also includes left and right child nodes, which are also player nodes for a player. If a player node has no child nodes, then that player's child nodes are empty. For example, Figure 3a The left and right child nodes of the player nodes with key=(2,'d'), key=(8,'c'), and key=(66,'g') are all empty.

[0059] Understandably, a game season's tree structure contains multiple node paths, each with at least one player node. Leveraging the unique structural characteristics of tree structures, adding, modifying, or deleting player nodes doesn't require copying all leaderboard data; only the player nodes along the paths where the data structure has changed need to be copied, modified, or deleted. Since updating the leaderboard tree structure involves modifying only one player node along a single path, the order of magnitude of modification is O(log n). Therefore, by updating the leaderboard data incrementally without copying all data, the time spent copying leaderboard data at season settlement is significantly reduced.

[0060] It is understandable that the aforementioned historical game seasons refer to the game seasons prior to the current game season, and the aforementioned historical leaderboard tree structure is the tree structure corresponding to each game season prior to the current game season. In order to update the player scores of the current game season, it is necessary to determine the node path affected by the player node that needs to be updated based on the tree structure of the previous game season. Therefore, the aforementioned historical leaderboard tree structure must at least include the first tree structure corresponding to the previous game season, so as to update the player scores of the current game season based on the first tree structure corresponding to the previous game season.

[0061] Optionally, the aforementioned leaderboard tree structure can be presented in the form of a leaderboard snapshot. Since there may be a large number of players on the leaderboard, considering the capacity of the database, it is not possible to send rewards to all players at the same time. Therefore, in order to distribute rewards to players when the season ends, a leaderboard snapshot that reflects the end of the season is needed so that rewards can be distributed to players based on the leaderboard snapshot. The leaderboard snapshot formed by the aforementioned leaderboard tree structure can update the leaderboard in a progressive manner, thereby enabling the generation of leaderboard snapshots without interruption.

[0062] In some embodiments, the tree structure described above can be a persistent data structure, i.e., a data structure that allows querying historical versions, such as a zip tree. Essentially, this tree structure is a heap of trees. For example, the terminal can generate the corresponding tree structure using the constraints of a balanced binary tree. This generated tree structure is a binary search tree, and the position of each player node in the tree structure can be set according to these constraints. Furthermore, other data structures that support binary search and whose modifications only involve adjusting some player nodes are also suitable for this solution.

[0063] Specifically, the terminal can assign a random number rank value to each player node, such as... Figure 3a As shown, the random number can be generated using a random tree. Then, the position of each player node in the tree structure is determined based on the random number and score of each player node. That is, the random number and score of each player node are calculated according to the constraints of the tree structure to determine the hierarchical position of each player node in the tree structure. The constraints of the tree structure can be set as constraints between player nodes and their left and right child nodes.

[0064] Among them, the first constraint can be set according to the characteristics of the binary search tree, that is, the game scores corresponding to the left and right child nodes of the player node are higher and lower than the game score of the player node, respectively, and the game score corresponding to the left child node is higher than the game score of the player node, while the game score corresponding to the right child node is lower than the game score of the player node.

[0065] Among them, the second constraint can be set according to the characteristics of the heap, that is, the random numbers corresponding to the left and right child nodes of the player node should be lower than the random number of the player node.

[0066] 202. If a target player's game score changes during the current game season, then based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, determine the nodes to be added to the second tree structure from the first tree structure. The nodes to be added are those that affect the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0067] Among them, the target players whose game scores have changed can be new players who are appearing in the target game for the first time, and the corresponding score of the target player is the new score; they can also be players whose scores have changed again in the current game season compared to the target player's score in the previous game season; they can also be players whose scores have changed again in the current game season compared to the target player's score in the current game season; or they can be players whose game scores need to be deleted due to preset problems with their game accounts.

[0068] The target game score mentioned above refers to the target player's game score after changes in the current game season.

[0069] In this embodiment, when the target player's score changes, if a player node corresponding to the target player exists in the second tree structure, since the score in that player node has changed, the player node needs to be deleted. Then, a new player node corresponding to the target player is generated for the target player's target game score. Based on the constraints corresponding to the tree structure, the player nodes affected when the aforementioned player node corresponding to the target player is added to the second tree structure are determined.

[0070] It is understandable that, since the leaderboard data is updated in a progressive manner in this embodiment, when adding the target player's node to the second tree structure, it is necessary to calculate the target player's node score, the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, based on the constraints of the tree structure, to determine the affected nodes, which are the nodes that will affect the position of some players in the leaderboard. The affected nodes include the nodes to be added in the first tree structure, as well as the nodes already existing in the second tree structure that are affected when adding the nodes to be added in the first tree structure or the target player's node to the second tree structure.

[0071] It is understandable that once a node to be added is identified, the node setting method for that node can be determined, namely, the hierarchical position of the node to be added in the second tree structure, the method of modifying the node information of the node to be added, and the method of modifying the node to be added or the existing nodes in the second tree structure when adding the node to be added and the player node of the target player to the second tree structure. In some embodiments, if a target player has a change in game score in the current game season, and the current game season is the initial game season, i.e., there have been no other game seasons before the current game season, then based on the target player's changed target game score and the game scores of each player node in the second tree structure corresponding to the current game season, the node to be modified in the second tree structure and the method of modifying the node to be modified are determined, and the player node corresponding to the target player is added to the second tree structure, while the node to be modified in the second tree structure is modified according to the modification method.

[0072] For example, the above is set Figure 3a Given the current game season's corresponding second tree structure, and considering the absence of historical game seasons, and further defining target player j as a new player appearing in the target game for the first time, with a score of 50, then based on the constraints, it is necessary to calculate the target game score after the change of the target player and the game scores of each player node in the second tree structure corresponding to the current game season. This will determine the hierarchical position of target player j and the nodes in the second tree structure that need to be modified. Figure 3b For the player nodes with key = (13,'f'), key = (23,'h'), key = (66,'g'), and key = (30,'i'), while adding the player node of the target player j to the second tree structure, the player nodes with key = (13,'f'), key = (23,'h'), key = (66,'g'), and key = (30,'i') are modified.

[0073] For example, the above is set Figure 3b Given the current game season's corresponding second tree structure, and the absence of historical game seasons, and further assuming that target player c's score changes or their game account encounters a pre-defined problem requiring deletion, it is necessary to calculate the target player's changed game score and the game scores of each player node in the current game season's corresponding second tree structure based on the constraints. This will determine the nodes in the second tree structure that need modification. Figure 3cThe player nodes with key=(13,'f'), key=(6,'e'), and key=(7,'b') are modified while the player node of the target player c is deleted from the second tree structure.

[0074] In some embodiments, in order to accurately distinguish whether a player node that needs to be modified needs to be added when updating leaderboard data, a leaderboard version parameter can be further assigned to each player node. That is, the player node also includes a leaderboard version parameter, which can be denoted as create_version. The leaderboard version parameter is used to indicate the game season to which the player node belongs, that is, the game season in which the player node was created.

[0075] It is understandable that the above leaderboard version parameters will vary depending on the game season. For example, the leaderboard version parameter for game season 1 is version 1, and the leaderboard version parameter for game season 2 is version 2.

[0076] Specifically, based on the target game score after the change of the target player, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the nodes to be added to the second tree structure are determined from the first tree structure. This includes: based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, determining the nodes to be updated that would result in data structure changes when the target player's player node is added to the second tree structure, and determining the leaderboard version parameters in the nodes to be updated; wherein, the nodes to be updated are the nodes that are affected, including the nodes to be added in the first tree structure, and also the nodes already existing in the second tree structure that are affected when the nodes to be added in the first tree structure or the target player's player node are added to the second tree structure.

[0077] The terminal can determine whether the node to be updated is a node to be added in the first tree structure by using the leaderboard version parameter in the node to be updated. That is, if the leaderboard version parameter in the node to be updated is the version corresponding to the previous game season, then the node to be updated is determined to be a node to be added.

[0078] Specifically, the terminal can determine and set a latest version number, which is a version number that changes over time and can be denoted as `latest_version`. For example, if the current game season is the latest season, then the latest version number is the version number corresponding to the current game season. If the leaderboard version parameter of a node in the nodes to be updated is less than the aforementioned latest version number, it means that the leaderboard version parameter of that node corresponds to the version of the previous game season. This node is a historical version node, meaning it is located in the first tree structure. To avoid destroying historical data, it cannot be directly modified and needs to be added to the second tree structure before modification. Therefore, this node is determined to be a node to be added. If the leaderboard version parameter of a node in the nodes to be updated is equal to the aforementioned latest version number, it means that the leaderboard version parameter of that node corresponds to the version of the current game season. This node is located in the latest version tree structure, i.e., the second tree structure. This node can be directly modified, so this node is determined to be a node to be modified.

[0079] 203. Add the player node corresponding to the target player to the second tree structure, and add the player node corresponding to the node to be added to the second tree structure.

[0080] In this embodiment, the terminal adds the player node corresponding to the target player to the second tree structure based on the hierarchical position of the player node corresponding to the target player, and simultaneously adds the player node corresponding to the node to be added to the second tree structure according to the node setting method of the node to be added. Furthermore, the terminal can modify the player node corresponding to the node to be added to the second tree structure according to the modification method of the node information of the node to be added. The terminal can also modify existing nodes in the second tree structure according to the modification method of existing nodes in the second tree structure.

[0081] In some embodiments, after adding the player node corresponding to the node to be added in the second tree structure, the method further includes: if the node to be added has child nodes in the first tree structure, and the child nodes of the node to be added do not have data structure changes, then the player node corresponding to the node to be added in the second tree structure is connected to the child node of the node to be added in the first tree structure. For example, the connection can be achieved by pointing with an arrow, so that the child node of the node to be added becomes the child node of the player node corresponding to the node to be added in the second tree structure.

[0082] In some embodiments, after adding the player node corresponding to the node to be added in the second tree structure, the method further includes: modifying the leaderboard version parameter in the player node corresponding to the node to be added in the second tree structure to the version corresponding to the current game season.

[0083] In some embodiments, since historical version data is not stored forever, to avoid excessive data leading to insufficient space, the terminal can assign an access version parameter to player nodes, which can be denoted as access_version. This access version parameter is used to indicate the game season in which the player node is set as a node to be added. That is, when a player node is accessed by a certain version of the game season and the game season of that version sets the player node as a node to be added, the version corresponding to that game season is the aforementioned access version parameter. Thus, by comparing the access version parameter, player nodes that meet the conditions of the access version parameter can be deleted.

[0084] Specifically, the aforementioned player node also includes an access version parameter, which is used to indicate the game season in which the player node is to be added. It also includes: while adding the player node corresponding to the aforementioned new node in the second tree structure, modifying the access version parameter of the new node in the first tree structure to the version corresponding to the current game season, and setting the access version parameter of the newly added player node in the second tree structure to the version corresponding to the current game season.

[0085] For example, in the tree structure of version 1 corresponding to game season 1, there are player nodes with player scores of 1, 2, 6, 7, 8, and 13, such as... Figure 4a As shown, for ease of explanation, in Figure 4a In this context, the key value only displays the player's corresponding score. The create_version in the node is abbreviated to cv, and the access_version in the node is abbreviated to av. The left and right child nodes of the player node are marked with left and right.

[0086] based on Figure 4a Let's assume the current game season changes from Season 1 to Season 2. If a new target player 1 appears in Season 2 with a score of 66, then based on the constraints, we need to calculate the target player 1's score of 66 and the scores of each player node in the tree structure corresponding to Season 1. This determines the target player 1's position, which is the right child of the player node with key=13. It also determines the node to be added in the tree structure corresponding to Season 1, namely the player node with key=13. Therefore, in Season 2, we add the player node corresponding to key=13, and add the player node corresponding to target player 1 to the right child of the player node corresponding to key=13. We also modify the CV and AV values ​​of each player node in the tree structure corresponding to Season 2 to 2, and modify the AV value of the node designated as the newest player in the tree structure corresponding to Season 1 to 2. Figure 4b As shown.

[0087] based on Figure 4b If a new target player 2 appears in game season 2 with a score of 23, then according to the constraints, the target game score of 23 for the target player 2 and the game scores of each player node in the tree structure corresponding to game season 1 need to be calculated to determine the level position of the target player 2, that is, the right child node of the player node with key=13 in the tree structure corresponding to game season 2. It also needs to be determined that the player node with key=66 should be set as the right child node of the player node with key=23. Furthermore, it needs to be determined that the node to be added in the tree structure corresponding to game season 1 is empty. Therefore, in the tree structure corresponding to game season 2, the player node corresponding to the target player 2 is added to the right child node of the player node corresponding to key=13, and the player node with key=66 is set as the right child node of the player node with key=23. Finally, the cv and av values ​​of each player node in the tree structure corresponding to game season 2 are modified to 2. Figure 4c As shown.

[0088] based on Figure 4c If new target players 3 and 4 appear in game season 2, with scores of 30 and 9 respectively, then according to the constraints, it is necessary to calculate the target game scores of 3 and 4 (30 and 9 points) and the game scores of each player node in the tree structure corresponding to game season 1, determine the hierarchical position of target players 3 and 4, and determine the node to be added in the tree structure corresponding to game season 1. Therefore, add the node to be added in game season 2, add the player nodes corresponding to target players 3 and 4 to the tree structure corresponding to game season 2, and modify the CV and AV of each player node in the tree structure corresponding to game season 2 to 2. Also, modify the AV of the node designated as the node to be added in the tree structure corresponding to game season 1 to 2. Figure 4d As shown.

[0089] based on Figure 4d If the score of target player 5, who has a score of 7 in game season 2, changes or there is a default problem with target player 5's game account, requiring target player 5 to be deleted, then based on the CV value, the player node corresponding to target player 5 is determined to be a node in the tree structure corresponding to the current game season 2. Therefore, the player node corresponding to target player 5 is directly deleted from the tree structure corresponding to the current game season 2. Figure 4e As shown, Figure 4e The node in the top left corner is the node that was deleted.

[0090] based on Figure 4eLet's assume the current game season changes from Season 2 to Season 3. If the score of target player 6 (who currently has a score of 13) changes in Season 3, or if target player 6's game account experiences a pre-set problem, requiring target player 6 to be deleted, then based on the CV value, the player node for target player 6 is determined to be a node in the tree structure corresponding to Season 2. Therefore, according to the constraints, we need to determine the new node to be added to the tree structure corresponding to Season 2 after deleting target player 6. Thus, we add the player node corresponding to this new node in Season 3, and modify the CV and AV values ​​of all player nodes in the tree structure corresponding to Season 3 to 3. We also modify the AV value of the node designated as the new node in the tree structure corresponding to Season 2 to 3. Figure 4f As shown.

[0091] based on Figure 4f Let's assume the current game season changes from season 3 to season 4. If a new target player 7 appears in season 4 with a score of 0, then based on the constraints, we need to calculate the target player 7's score (0) and the scores of each player node in the tree structure corresponding to season 3. This determines the target player 7's tier position and the node to be added to the tree structure corresponding to season 3. Therefore, we add this node to season 4, add the player node corresponding to target player 7 to the tree structure corresponding to season 4, and modify the CV and AV values ​​of each player node in the tree structure corresponding to season 4 to 4. We also modify the AV value of the node designated as the newest player in the tree structure corresponding to season 3 to 4. Figure 4g As shown.

[0092] based on Figure 4g If the score of target player 8 (score 2) changes in game season 4, or if target player 8's game account has a preset problem, target player 8 needs to be deleted. However, since the CV and AV of target player 8 (score 2) are both 1, it means that this player node is still referenced by other historical versions. Therefore, only the tree structure corresponding to the current game season 4 needs to be changed, such as... Figure 4h As shown.

[0093] In summary, it can be seen that each season version will only contain player nodes from previous versions, for example... Figure 5 The tree structure corresponding to version 3 in [the original text].

[0094] In some embodiments, player rankings can also be queried based on a leaderboard tree structure. The player nodes also include player identity information and the number of nodes, where the number of nodes indicates the number of lower-level player nodes. The process further includes: obtaining a query instruction containing the identity information of the player to be queried and the query season; responding to the query instruction; querying the player score corresponding to the identity information of the player to be queried in the query season from a preset hash table set; determining the query tree structure corresponding to the version of the query season; and, based on the score distribution characteristics among player nodes in the query tree structure, determining the query node path corresponding to the player score of the player to be queried in the query tree structure; querying the query player node corresponding to the player to be queried on the query node path; and determining the ranking of the player to be queried based on the number of nodes in the query player node and the position of the lower-level player nodes.

[0095] The aforementioned set of hash tables includes at least one hash table, each corresponding to a game season. Each hash table contains player identity information and the corresponding scores for each player's identity within that game season. For example... Figure 6 As shown, Figure 6 for Figure 3a The hash table corresponding to the tree structure.

[0096] Understandably, since the score distribution among player nodes in a tree structure is such that the game scores of the player node's left and right child nodes are higher and lower than the player node's game score, respectively, this score distribution characteristic allows for the rapid determination of the query node path corresponding to the player's score. This enables the quick retrieval of the query player node corresponding to the player being queried from this path. Therefore, in this embodiment, a hash table can be used to quickly find the player's score, and based on that score, the position of the player node within the tree structure can be quickly determined, allowing for the rapid identification of the player node from the tree structure and the determination of the number of nodes among them.

[0097] It is understandable that the above node count is used to indicate the number of lower-level nodes of the current node. It is the sum of the number of lower-level nodes of the current node and 1, where 1 is the value corresponding to the current node itself. Thus, by using the node count and the position of the child nodes, the number of other player nodes that are greater than or less than the player node can be directly obtained.

[0098] For example, when you want to query the ranking of the player x, you determine the player score s of the player x from the corresponding hash table based on x, and then query the number of players with a score greater than s from the tree structure based on the player score s, thereby obtaining the ranking of the player x.

[0099] For example, such as Figure 3a and Figure 6 As shown, when querying the ranking of player h, the score of player h is 23 obtained through the hash table. Therefore, the key corresponding to the player is (23, h). Next, it is compared with the root node (13, f). It can be seen that 23 > 13. Therefore, the query node path is the path of the right child node of the root node. Then, it recursively goes to the right child node h and finds that this is the player node corresponding to the player h. Moreover, its lower-level nodes are all on the path of the right child node. Therefore, based on the number of its nodes, the ranking of player h can be obtained as 3.

[0100] Understandably, the aforementioned leaderboard snapshot displays the leaderboard tree structure as well as the various hash tables in the hash table set, facilitating the query of player rankings.

[0101] In some embodiments, the hash table set includes a hash table corresponding to the current game season. The hash table corresponding to the current game season also includes a score version parameter corresponding to the player's score. The score version parameter is used to indicate the game season to which the player's score belongs. When a target player whose game score changes occurs in the current game season, the method further includes: determining the target score version parameter of the target player from the hash table of the current game season, so as to determine the numerical modification method in the hash table based on the target score version parameter.

[0102] If the above target score version parameter is the version corresponding to the current game season, then the above target player's score will be changed to the above target game score in the hash table of the current game season.

[0103] If the target score version parameter is not the version corresponding to the current game season, then add the player's score corresponding to the target score version parameter to the hash table corresponding to the previous game season, and change the target player's score to the target game score in the hash table of the current game season.

[0104] Understandably, updating the hash table only involves version comparison and writing historical scores into a historical version hash table, and the hash table update complexity is O(1).

[0105] Specifically, the target score version parameter can be denoted as update_version, and the version corresponding to the current game season can be denoted as latest_version. When a player's score is updated, if update_version equals latest_version, the update is performed directly in the hash table; otherwise, the corresponding historical score needs to be placed in the historical version hash table of lastest_version-1, which is the hash table corresponding to the previous game season.

[0106] For example, the hash table for version 1 corresponding to game season 1 contains the scores of players a, b, c, d, e, and f, and the target score version parameter corresponding to those scores. The latest_version of this version 1 hash table is set to 1. Figure 7a As shown, the target score version parameter update_version is 1 at this time.

[0107] based on Figure 7a Let's assume the current game season changes from season 1 to season 2, meaning the leaderboard switches from version 1 to version 2 (latest_version = 2). If we want player A's score to be updated to 15, we find that player A's update_version in the hash table is 1, not 2. Therefore, we need to preserve player A's scores from previous versions in the historical hash table of latest_version - 1 (i.e., the hash table where latest_version = 1). Figure 7b As shown.

[0108] based on Figure 7b If player d's score is to be updated to 20, it's found that player d's update_version in the hash table is equal to 1, not 2. Therefore, player d's historical score needs to be preserved in the historical hash table of latest_version - 1, i.e., the hash table where latest_version = 1. Figure 7c As shown.

[0109] based on Figure 7c If a newly added player, g, is given a score of 50, since g is a new addition, there is no need to save the scores from previous versions. Figure 7d As shown.

[0110] based on Figure 7d If the current game season is changed from season 2 to season 3, the hash table display method at this time is as follows: Figure 7e As shown, if `latest_version` = 3, and player C's score is to be updated to 80, it's found that player C's `update_version` in the hash table is 1, not 3. Therefore, player C's historical score needs to be preserved in the historical hash table of `latest_version - 1`, i.e., the hash table of `latest_version` = 2. Figure 7f As shown.

[0111] based on Figure 7fIf player A's score is to be updated to 150 points, then player A's previous scores need to be preserved in the history hash table of latest_version-1, which is the hash table of latest_version=2. Figure 7g As shown.

[0112] based on Figure 7g If we want to update player A's score to 250, since player A's update_version in the hash table is currently 3, we can simply modify player A's score directly. Figure 7h As shown.

[0113] In some embodiments, due to the data storage method in the hash table set, querying the corresponding player score based on the identity information of the player to be queried requires sequentially querying the hash table set.

[0114] Specifically, the above-mentioned querying of the player score corresponding to the identity information of the player to be queried in the above-mentioned query season in the preset hash table set includes: based on the above-mentioned hash table set, starting from the hash table corresponding to the version of the query season, querying the hash tables in the above-mentioned hash table set in season order until the player score corresponding to the identity information of the player to be queried is found.

[0115] Specifically, based on the aforementioned set of hash tables, starting with the hash table corresponding to the query season version, the hash tables in the aforementioned set are queried sequentially according to the season order until the player score corresponding to the identity information of the player to be queried is found. This includes: querying the player to be queried based on the identity information of each player in the hash table corresponding to the query season version; if the player to be queried is not found in the hash table corresponding to the query season version, the query continues to the hash table corresponding to the next season version until the player score corresponding to the identity information of the player to be queried is found.

[0116] For example, such as Figure 8 As shown, when querying data for different versions of player 'a', the query proceeds sequentially along the hash table chain corresponding to each version. For example, when querying data for historical version 1, the query path is a=1 => a=150 => a=250. However, some players' scores for their corresponding versions haven't changed. For instance, when player 'f' queries historical version data, they'll find that data for historical versions 1 and 2 doesn't exist. Therefore, they'll find their score of 13 in the latest hash table mapping.

[0117] In some embodiments, when the terminal performs garbage collection on historical data of older versions, it can set an obsolescence version number. This allows the terminal to delete player nodes in the leaderboard tree structure and / or hash tables in the hash table set based on data obsolescence instructions containing the obsolescence version number. The obsolescence version number can be set to min_version, and after deleting historical data, data between this obsolescence version number and the latest version number latest_version is retained.

[0118] In some embodiments, when the terminal reclaims data from historical versions, it further includes: receiving a data elimination instruction containing an eliminated version number, and in response to the data elimination instruction deleting player nodes that meet the first preset elimination conditions from the historical leaderboard tree structure, wherein the first preset elimination condition is that the leaderboard version parameter is less than the access version parameter, and the access version parameter is less than or equal to the eliminated version number.

[0119] If the ranking version parameter is less than the access version parameter, it indicates that the node has been accessed by a higher version node, meaning that the node can be reclaimed. If the access version parameter is less than or equal to the obsolescence version number, it ensures that the node has not been used by at least one tree structure from the obsolescence version number to the latest version number, so the node can be reclaimed.

[0120] For example, based on Figure 4h When min_version is set to 2, player nodes that meet the first preset elimination condition can be deleted, such as... Figure 9a As shown in the diagram, for ease of understanding, deleted player nodes are displayed with rounded dashed boxes. The av and cv values ​​of the deleted nodes all satisfy the above conditions. However, player nodes with (key=1, cv=1) and (key=2, cv=1) do not satisfy the condition that the access version parameter is less than or equal to the elimination version number, and therefore cannot be deleted. When min_version is set to 3, player nodes that meet the first preset elimination condition can be deleted, such as... Figure 9b As shown. When min_version is set to 4, player nodes that meet the first preset elimination condition can be deleted, such as... Figure 9c As shown.

[0121] In some embodiments, when the terminal reclaims historical version data, it further includes: receiving a data elimination instruction containing an elimination version number, and in response to the data elimination instruction, deleting hash tables from the hash table set whose version corresponding to the game season is less than the elimination version number.

[0122] For example, when min_version is set to 2, hash tables that meet the second preset elimination condition can be deleted, such as... Figure 9d As shown.

[0123] As can be seen from the above, by obtaining the historical leaderboard tree structure of the target game's players in previous game seasons, the aforementioned historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure contains multiple player nodes, and each player node contains the player's game score. The game scores of the left and right child nodes of each player node are higher and lower than the player node's game score, respectively. If a target player's game score changes in the current game season, it indicates that the leaderboard data needs to be updated. Therefore, based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the leaderboard data is updated from the first tree structure. The tree structure identifies nodes that need to be added to the second tree structure. These nodes are those that affect the leaderboard position when the player node corresponding to the target player is added to the second tree structure. The player node corresponding to the target player is added to the second tree structure, and the player node corresponding to the node to be added is also added to the second tree structure. This allows for real-time updates of the target player's game score during the season, with each update involving only partial data changes without modifying all data in the leaderboard for the season. As the season progresses, the data in the leaderboard tree structure is updated accordingly, achieving seamless switching between game seasons and improving the real-time performance of game season transitions.

[0124] To better implement the above methods, this application also provides a data updating device for a leaderboard. This data updating device can be integrated into an electronic device, such as a computer device, which can be a terminal, server, or other such device.

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

[0126] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the data update device for the leaderboard as specifically integrated into the terminal. This embodiment provides a data update device for the leaderboard, such as... Figure 10 As shown, the data updating device for this leaderboard may include:

[0127] The structure acquisition module 1001 is used to acquire the historical leaderboard tree structure of the players in the target game in the historical game season. The historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. A tree structure includes player nodes of multiple players. The player nodes include the player's game score. The game scores corresponding to the left and right child nodes of the player node are higher and lower than the player node's game score, respectively.

[0128] The node determination module 1002 is used to determine, based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the node to be added to the second tree structure from the first tree structure if a target player's game score changes in the current game season. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0129] The node adding module 1003 is used to add the player node corresponding to the target player to the second tree structure, and at the same time add the player node corresponding to the node to be added to the second tree structure.

[0130] In some embodiments, the player node further includes a leaderboard version parameter, the leaderboard data update device further includes a version modification module, and the node determination module 1002 is specifically used for:

[0131] Based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, the nodes to be updated that would require data structure changes when the player node of the target player is added to the second tree structure are identified.

[0132] If the leaderboard version parameter in the above-mentioned node to be updated is the version corresponding to the previous game season, then the above-mentioned node to be updated is determined to be a node to be added.

[0133] The aforementioned modification module is used to change the leaderboard version parameter in the newly added node to the version corresponding to the current game season.

[0134] In some embodiments, the player node further includes an access version parameter, which is used to indicate that the player node is a game season to be added as a node. The leaderboard data update device further includes a parameter setting module, which is specifically used for:

[0135] While adding the player node corresponding to the node to be added in the second tree structure, modify the access version parameter of the node to be added in the first tree structure to the version corresponding to the current game season, and set the access version parameter of the newly added player node in the second tree structure to the version corresponding to the current game season.

[0136] In some embodiments, the data updating device for the ranking list further includes a node deletion module, which is specifically used for:

[0137] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting player nodes that meet the first preset elimination conditions from the historical leaderboard tree structure. The first preset elimination conditions are that the leaderboard version parameter is less than the access version parameter, and the access version parameter is less than or equal to the elimination version number.

[0138] In some embodiments, the data updating device for the ranking list further includes a node connection module, which is specifically used for:

[0139] If the node to be added has child nodes in the first tree structure, and the child nodes of the node to be added do not have data structure changes, then the player node corresponding to the node to be added in the second tree structure is connected to the child node of the node to be added in the first tree structure, so that the child node of the node to be added becomes the child node of the player node corresponding to the node to be added in the second tree structure.

[0140] In some embodiments, the player node further includes player identity information and a node number, wherein the node number indicates the number of lower-level player nodes of the player node. The leaderboard data update device further includes a ranking query module, which is specifically used for:

[0141] Obtain the query command containing the identity information of the player to be queried and the query season, and respond to the query command by querying the player score corresponding to the identity information of the player to be queried in the aforementioned query season from the preset hash table set;

[0142] The query tree structure corresponding to the above query season version is determined, and based on the score distribution characteristics between player nodes in the above query tree structure, the query node path corresponding to the player score of the above player to be queried in the above query tree structure is determined.

[0143] The query node corresponding to the player to be queried is queried on the above query node path, and the ranking of the player to be queried is determined according to the number of nodes in the above query player node and the position of the lower-level player node.

[0144] In some embodiments, the hash table set includes a hash table corresponding to the current game season. The hash table corresponding to the current game season also includes a score version parameter corresponding to the player's score. The score version parameter indicates the game season to which the player's score belongs. When a target player's game score changes during the current game season, the leaderboard data update device further includes a score change module, which is specifically used for:

[0145] Determine the target score version parameters for the target players from the hash table of the current game season.

[0146] If the above target score version parameter is the version corresponding to the current game season, then the above target player's score will be changed to the above target game score in the hash table of the above current game season;

[0147] If the target score version parameter is not the version corresponding to the current game season, then add the player's score corresponding to the target score version parameter to the hash table corresponding to the previous game season, and change the target player's score to the target game score in the hash table of the current game season.

[0148] In some embodiments, the ranking query module described above is specifically used for:

[0149] Based on the aforementioned set of hash tables, starting with the hash table corresponding to the season, the hash tables in the aforementioned set are queried sequentially according to the season order until the player score corresponding to the identity information of the player to be queried is found.

[0150] In some embodiments, the ranking query module described above is further specifically used for:

[0151] The query will be performed on the players listed above based on the identity information of each player in the hash table corresponding to the season version.

[0152] If the player to be queried is not found in the hash table corresponding to the season version, the query continues to the hash table corresponding to the next season version until the player score corresponding to the identity information of the player to be queried is found.

[0153] In some embodiments, the data updating device for the ranking list further includes a hash table deletion module, which is specifically used for:

[0154] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting hash tables from the aforementioned hash table set containing hash tables whose game season version is less than the elimination version number.

[0155] As can be seen from the above, the leaderboard data update device in this embodiment uses the structure acquisition module 1001 to acquire the historical leaderboard tree structure of the target game's players in the previous game season. The historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes multiple player nodes, and each player node includes the player's game score. The game scores corresponding to the left and right child nodes of the player node are higher and lower than the player node's game score, respectively. The node determination module 1002 is used to determine the leaderboard data based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season. The game score of the home node is used to determine the nodes to be added to the second tree structure from the first tree structure. These nodes to be added are those that will affect the leaderboard position when the player node corresponding to the target player is added to the second tree structure. The node adding module 1003 is used to add the player node corresponding to the target player to the second tree structure, and at the same time add the player node corresponding to the node to be added to the second tree structure. This allows for real-time updates of the target player whose game score changes during the season, and each update only involves changes to a portion of the data without modifying all the data in the leaderboard corresponding to the season. As the season progresses, the data in the leaderboard tree structure also updates and changes accordingly, achieving seamless switching between game seasons and improving the real-time performance of game season switching.

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

[0157] The processor 1101 is the control center of the electronic device 1100. It connects various parts of the electronic device 1100 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 1102, and calling data stored in the memory 1102, it executes various functions of the electronic device 1100 and processes data, thereby performing overall monitoring of the electronic device 1100.

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

[0159] Obtain the historical leaderboard tree structure of the target game's players in the previous game season. The aforementioned historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes player nodes of multiple players. Each player node includes the player's game score. The game scores of the left and right child nodes of the aforementioned player node are higher and lower than the game score of the player node, respectively.

[0160] If a target player experiences a change in game score during the current game season, then based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, a node to be added to the second tree structure is determined from the first tree structure. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0161] Add the player node corresponding to the target player to the second tree structure, and add the player node corresponding to the node to be added to the second tree structure.

[0162] In some embodiments, the player node further includes a leaderboard version parameter, which indicates the game season to which the player node belongs. The process of determining the nodes to be added to the second tree structure based on the target game score after the target player's change, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season includes:

[0163] Based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, the nodes to be updated that would require data structure changes when the player node of the target player is added to the second tree structure are identified.

[0164] If the leaderboard version parameter in the above-mentioned node to be updated is the version corresponding to the previous game season, then the above-mentioned node to be updated is determined to be a node to be added.

[0165] After adding the player node corresponding to the node to be added to the second tree structure, the following is also included:

[0166] Modify the leaderboard version parameter in the player node corresponding to the newly added node in the second tree structure to the version corresponding to the current game season.

[0167] In some embodiments, the player node further includes an access version parameter, which is used to indicate that the player node is a game season to be added as a new node, and also includes:

[0168] While adding the player node corresponding to the node to be added in the second tree structure, modify the access version parameter of the node to be added in the first tree structure to the version corresponding to the current game season, and set the access version parameter of the newly added player node in the second tree structure to the version corresponding to the current game season.

[0169] In some embodiments, it also includes:

[0170] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting player nodes that meet the first preset elimination conditions from the historical leaderboard tree structure. The first preset elimination conditions are that the leaderboard version parameter is less than the access version parameter, and the access version parameter is less than or equal to the elimination version number.

[0171] In some embodiments, after adding the player node corresponding to the node to be added to the second tree structure, the method further includes:

[0172] If the node to be added has child nodes in the first tree structure, and the child nodes of the node to be added do not have data structure changes, then the player node corresponding to the node to be added in the second tree structure is connected to the child node of the node to be added in the first tree structure, so that the child node of the node to be added becomes the child node of the player node corresponding to the node to be added in the second tree structure.

[0173] In some embodiments, the player node further includes player identity information and a node count, wherein the node count indicates the number of lower-level player nodes of the player node, and further includes:

[0174] Obtain the query command containing the identity information of the player to be queried and the query season, and respond to the query command by querying the player score corresponding to the identity information of the player to be queried in the aforementioned query season from the preset hash table set;

[0175] The query tree structure corresponding to the above query season version is determined, and based on the score distribution characteristics between player nodes in the above query tree structure, the query node path corresponding to the player score of the above player to be queried in the above query tree structure is determined.

[0176] The query node corresponding to the player to be queried is queried on the above query node path, and the ranking of the player to be queried is determined according to the number of nodes in the above query player node and the position of the lower-level player node.

[0177] In some embodiments, the hash table set includes a hash table corresponding to the current game season. The hash table corresponding to the current game season also includes a score version parameter corresponding to the player's score. The score version parameter indicates the game season to which the player's score belongs. When a target player's game score changes during the current game season, the hash table further includes:

[0178] Determine the target score version parameters for the target players from the hash table of the current game season.

[0179] If the above target score version parameter is the version corresponding to the current game season, then the above target player's score will be changed to the above target game score in the hash table of the current game season.

[0180] If the target score version parameter is not the version corresponding to the current game season, then add the player's score corresponding to the target score version parameter to the hash table corresponding to the previous game season, and change the target player's score to the target game score in the hash table of the current game season.

[0181] In some embodiments, querying the player score corresponding to the identity information of the player to be queried in the query season from the preset hash table set includes:

[0182] Based on the aforementioned set of hash tables, starting with the hash table corresponding to the season, the hash tables in the aforementioned set are queried sequentially according to the season order until the player score corresponding to the identity information of the player to be queried is found.

[0183] In some embodiments, the above-mentioned method, based on the aforementioned hash table set, involves querying the hash tables in the aforementioned hash table set sequentially according to the season order, starting with the hash table corresponding to the season version, until the player score corresponding to the identity information of the player to be queried is found, including:

[0184] The query will be performed on the players listed above based on the identity information of each player in the hash table corresponding to the season version.

[0185] If the player to be queried is not found in the hash table corresponding to the season version, the query continues to the hash table corresponding to the next season version until the player score corresponding to the identity information of the player to be queried is found.

[0186] In some embodiments, it also includes:

[0187] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting hash tables from the aforementioned hash table set containing hash tables whose game season version is less than the elimination version number.

[0188] Therefore, the electronic device 1100 provided in this embodiment can bring the following technical effects: improve the real-time performance during season switching.

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

[0190] Optional, such as Figure 11 As shown, the electronic device 1100 also includes: a touch display screen 1103, a radio frequency circuit 1104, an audio circuit 1105, an input unit 1106, and a power supply 1107. The processor 1101 is electrically connected to the touch display screen 1103, the radio frequency circuit 1104, the audio circuit 1105, the input unit 1106, and the power supply 1107. Those skilled in the art will understand that... Figure 11 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.

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

[0192] The radio frequency circuit 1104 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.

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

[0194] The input unit 1106 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.

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

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

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

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

[0199] 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 leaderboard data update methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0200] Obtain the historical leaderboard tree structure of the target game's players in the previous game season. The aforementioned historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes player nodes of multiple players. Each player node includes the player's game score. The game scores of the left and right child nodes of the aforementioned player node are higher and lower than the game score of the player node, respectively.

[0201] If a target player experiences a change in game score during the current game season, then based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, a node to be added to the second tree structure is determined from the first tree structure. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure.

[0202] Add the player node corresponding to the target player to the second tree structure, and add the player node corresponding to the node to be added to the second tree structure.

[0203] In some embodiments, the player node further includes a leaderboard version parameter, which indicates the game season to which the player node belongs. The process of determining the nodes to be added to the second tree structure based on the target game score after the target player's change, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season includes:

[0204] Based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, the nodes to be updated that would require data structure changes when the player node of the target player is added to the second tree structure are identified.

[0205] If the leaderboard version parameter in the above-mentioned node to be updated is the version corresponding to the previous game season, then the above-mentioned node to be updated is determined to be a node to be added.

[0206] After adding the player node corresponding to the node to be added to the second tree structure, the following is also included:

[0207] Modify the leaderboard version parameter in the player node corresponding to the newly added node in the second tree structure to the version corresponding to the current game season.

[0208] In some embodiments, the player node further includes an access version parameter, which is used to indicate that the player node is a game season to be added as a new node, and also includes:

[0209] While adding the player node corresponding to the node to be added in the second tree structure, modify the access version parameter of the node to be added in the first tree structure to the version corresponding to the current game season, and set the access version parameter of the newly added player node in the second tree structure to the version corresponding to the current game season.

[0210] In some embodiments, it also includes:

[0211] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting player nodes that meet the first preset elimination conditions from the historical leaderboard tree structure. The first preset elimination conditions are that the leaderboard version parameter is less than the access version parameter, and the access version parameter is less than or equal to the elimination version number.

[0212] In some embodiments, after adding the player node corresponding to the node to be added to the second tree structure, the method further includes:

[0213] If the node to be added has child nodes in the first tree structure, and the child nodes of the node to be added do not have data structure changes, then the player node corresponding to the node to be added in the second tree structure is connected to the child node of the node to be added in the first tree structure, so that the child node of the node to be added becomes the child node of the player node corresponding to the node to be added in the second tree structure.

[0214] In some embodiments, the player node further includes player identity information and a node count, wherein the node count indicates the number of lower-level player nodes of the player node, and further includes:

[0215] Obtain the query command containing the identity information of the player to be queried and the query season, and respond to the query command by querying the player score corresponding to the identity information of the player to be queried in the aforementioned query season from the preset hash table set;

[0216] The query tree structure corresponding to the above query season version is determined, and based on the score distribution characteristics between player nodes in the above query tree structure, the query node path corresponding to the player score of the above player to be queried in the above query tree structure is determined.

[0217] The query node corresponding to the player to be queried is queried on the above query node path, and the ranking of the player to be queried is determined according to the number of nodes in the above query player node and the position of the lower-level player node.

[0218] In some embodiments, the hash table set includes a hash table corresponding to the current game season. The hash table corresponding to the current game season also includes a score version parameter corresponding to the player's score. The score version parameter indicates the game season to which the player's score belongs. When a target player's game score changes during the current game season, the hash table further includes:

[0219] Determine the target score version parameters for the target players from the hash table of the current game season.

[0220] If the above target score version parameter is the version corresponding to the current game season, then the above target player's score will be changed to the above target game score in the hash table of the current game season.

[0221] If the target score version parameter is not the version corresponding to the current game season, then add the player's score corresponding to the target score version parameter to the hash table corresponding to the previous game season, and change the target player's score to the target game score in the hash table of the current game season.

[0222] In some embodiments, querying the player score corresponding to the identity information of the player to be queried in the query season from the preset hash table set includes:

[0223] Based on the aforementioned set of hash tables, starting with the hash table corresponding to the season, the hash tables in the aforementioned set are queried sequentially according to the season order until the player score corresponding to the identity information of the player to be queried is found.

[0224] In some embodiments, the above-mentioned method, based on the aforementioned hash table set, involves querying the hash tables in the aforementioned hash table set sequentially according to the season order, starting with the hash table corresponding to the season version, until the player score corresponding to the identity information of the player to be queried is found, including:

[0225] The query will be performed on the players listed above based on the identity information of each player in the hash table corresponding to the season version.

[0226] If the player to be queried is not found in the hash table corresponding to the season version, the query continues to the hash table corresponding to the next season version until the player score corresponding to the identity information of the player to be queried is found.

[0227] In some embodiments, it also includes:

[0228] Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting hash tables from the aforementioned hash table set containing hash tables whose game season version is less than the elimination version number.

[0229] As can be seen, the computer program can be loaded by the processor to execute the steps in any of the leaderboard data update methods provided in the embodiments of this application, thereby bringing the following technical effects: improving the real-time performance during season switching.

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

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

[0232] Since the computer program stored in the computer-readable storage medium can execute the steps in any of the leaderboard data update methods provided in the embodiments of this application, the beneficial effects that any of the leaderboard data update methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0233] The data update method, apparatus, electronic device, and computer-readable storage medium for a ranking system provided in the embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data update method for a ranking list, characterized in that, The method includes: Obtain the historical leaderboard tree structure of players in the target game in the previous game season. The historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. Each tree structure includes player nodes of multiple players. Each player node includes the player's game score, leaderboard version parameter, and access version parameter. The game scores of the left and right child nodes of the player node are higher and lower than the player node's game score, respectively. The leaderboard version parameter is used to indicate the game season to which the player node belongs, and the access version parameter is used to indicate the game season in which the player node is to be added as a node. If a target player experiences a change in game score during the current game season, then based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, a node to be added to the second tree structure is determined from the first tree structure. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure. Add the player node corresponding to the target player to the second tree structure, and at the same time add the player node corresponding to the node to be added to the second tree structure; The step of determining the nodes to be added to the second tree structure based on the target player's changed target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season includes: Based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, the nodes to be updated that would require data structure changes when the player node of the target player is added to the second tree structure are identified. If the leaderboard version parameter in the node to be updated is the version corresponding to the previous game season, then the node to be updated is determined to be a node to be added. After adding the player node corresponding to the node to be added to the second tree structure, the process also includes: Modify the leaderboard version parameter in the player node corresponding to the node to be added in the second tree structure to the version corresponding to the current game season; While adding the player node corresponding to the node to be added in the second tree structure, the access version parameter of the node to be added in the first tree structure is modified to the version corresponding to the current game season, and the access version parameter of the newly added player node in the second tree structure is set to the version corresponding to the current game season.

2. The data update method for the ranking list as described in claim 1, characterized in that, Also includes: Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting player nodes that meet the first preset elimination conditions from the historical leaderboard tree structure. The first preset elimination condition is that the leaderboard version parameter is less than the access version parameter, and the access version parameter is less than or equal to the elimination version number.

3. The data update method for the ranking list as described in claim 1, characterized in that, After adding the player node corresponding to the node to be added to the second tree structure, the process also includes: If the node to be added has child nodes in the first tree structure, and the child nodes of the node to be added do not have data structure changes, then the player node corresponding to the node to be added in the second tree structure is connected to the child node of the node to be added in the first tree structure, so that the child node of the node to be added becomes the child node of the player node corresponding to the node to be added in the second tree structure.

4. The data update method for the ranking list as described in any one of claims 1 to 3, characterized in that, The player node also includes player identity information and the number of nodes, whereby the number of nodes indicates the number of player nodes below the player node, and further includes: Obtain a query command containing the identity information of the player to be queried and the query season; respond to the query command and query the player score corresponding to the identity information of the player to be queried in the query season from a preset hash table set; Determine the query tree structure corresponding to the version of the query season, and based on the score distribution characteristics between player nodes in the query tree structure, determine the query node path corresponding to the player score of the player to be queried in the query tree structure; The query node path is used to query the query player node corresponding to the player to be queried, and the ranking of the player to be queried is determined based on the number of nodes in the query player node and the position of the lower-level player node.

5. The data update method for the ranking list as described in claim 4, characterized in that, The hash table set includes a hash table corresponding to the current game season. The hash table corresponding to the current game season also includes a score version parameter corresponding to the player's score. The score version parameter indicates the game season to which the player's score belongs. When a target player's game score changes during the current game season, the set further includes: The target score version parameter of the target player is determined from the hash table of the current game season; If the target score version parameter is the version corresponding to the current game season, then the target player's score is changed to the target game score in the hash table of the current game season; If the target score version parameter is not the version corresponding to the current game season, then the player score corresponding to the target score version parameter is added to the hash table corresponding to the previous game season, and the target player's score is changed to the target game score in the hash table of the current game season.

6. The data update method for the ranking list as described in claim 5, characterized in that, The step of querying the player score corresponding to the identity information of the player to be queried in the query season from the preset hash table set includes: Based on the set of hash tables, starting from the hash table corresponding to the query season, the hash tables in the set are queried sequentially according to the season order until the player score corresponding to the identity information of the player to be queried is found.

7. The data update method for the ranking list as described in claim 6, characterized in that, The process of querying the hash tables based on the hash table set, starting with the hash table corresponding to the current season, sequentially querying the hash tables in the hash table set according to the season order, until the player score corresponding to the identity information of the player to be queried is found, includes: The query is performed on the player to be queried based on the identity information of each player in the hash table corresponding to the season. If the player to be queried is not found in the hash table corresponding to the season being queried, the query continues to the hash table corresponding to the next season until the player score corresponding to the identity information of the player to be queried is found.

8. The data update method for the ranking list as described in claim 6, characterized in that, Also includes: Upon receiving a data elimination instruction containing an elimination version number, the system responds by deleting hash tables from the hash table set containing hash tables whose game season version is less than the elimination version number.

9. A data updating device for a ranking list, characterized in that, The device includes: The structure acquisition module is used to acquire the historical leaderboard tree structure of players in the target game in the previous game season. The historical leaderboard tree structure includes at least the first tree structure corresponding to the previous game season. A tree structure includes player nodes of multiple players. The player node includes the player's game score, leaderboard version parameter, and access version parameter. The game scores of the left and right child nodes of the player node are higher and lower than the player node's game score, respectively. The leaderboard version parameter is used to indicate the game season to which the player node belongs, and the access version parameter is used to indicate the game season in which the player node is to be added as a node. The node determination module is used to determine, based on the target player's changed game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure corresponding to the current game season, the node to be added to the second tree structure if a target player's game score changes in the current game season. The node to be added is the node that affects the leaderboard position when the player node corresponding to the target player is added to the second tree structure. The node adding module is used to add the player node corresponding to the target player to the second tree structure, and at the same time add the player node corresponding to the node to be added to the second tree structure; The node determination module is specifically used for: Based on the target game score, the game scores of each player node in the first tree structure, and the game scores of each player node in the second tree structure, the nodes to be updated that would require data structure changes when the player node of the target player is added to the second tree structure are identified. If the leaderboard version parameter in the node to be updated is the version corresponding to the previous game season, then the node to be updated is determined to be a node to be added. The version modification module is used to modify the leaderboard version parameter in the player node corresponding to the node to be added in the second tree structure to the version corresponding to the current game season. The parameter setting module is used to add the player node corresponding to the node to be added in the second tree structure, modify the access version parameter of the node to be added in the first tree structure to the version corresponding to the current game season, and set the access version parameter of the newly added player node in the second tree structure to the version corresponding to the current game season.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform steps in the leaderboard data update method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the data update method for the leaderboard as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Target game user detection method, device and equipment

    CN112494952A

  • Game data processing method, device and system, electronic equipment and storage medium

    CN113181634A