Game account matching method, device and electronic device
By receiving matching requests from terminal devices in game matching technology, grouping matching and generating binary tree structures, the problem of inflexible matching in the prior art is solved, and matching efficiency and user experience are improved.
Patent Information
- Application Number
- CN202210090177.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-01-25
AI Technical Summary
In the existing game matching technology, the matching method of the PVP process is inflexible, resulting in an increase in the matching time, reducing the matching efficiency between players and affecting the user experience.
By receiving the matching request from the terminal device, the game account information is written to the matching queue, group matching is performed according to the preset grouping rules, and competition is performed based on the matching results, and a binary tree structure is generated to show the promotion process and final ranking.
It increases the flexibility of matching methods, reduces the matching time, improves the matching efficiency between players, and improves the user's gaming experience.
Smart Images

Figure CN114470785B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a game account matching method, device and electronic device. Background Art
[0002] With the development of Internet technology, it has provided a foundation for the rapid development of the gaming industry, and the variety, quantity, and subject matter of games have achieved sustained and rapid growth.
[0003] In the prior art, regardless of the type of game, the PVP (Player Versus Player) process is a relatively important process in the game. Matching between different players can be achieved through the PVP process. And when matching, usually single players are matched one by one.
[0004] However, if there is no successful match between two players, one of the two players needs to be matched with another player who has not been matched, and the other player can only be matched after the previous player's matching is completed. The matching method is inflexible and increases the matching time, which reduces the efficiency of matching between players during the game, thereby affecting the user's gaming experience. Summary of the invention
[0005] The embodiments of the present application provide a game account matching method, device and electronic device to improve the efficiency of matching between players during a game.
[0006] In a first aspect, an embodiment of the present application provides a game account matching method, comprising:
[0007] receiving a first matching request sent by a terminal device, and writing account information of a game account corresponding to the terminal device into a matching queue according to the first matching request, wherein the first matching request includes account information of the game account corresponding to the terminal device;
[0008] Obtaining account information of game accounts corresponding to different terminal devices from the matching queue;
[0009] Performing a grouping operation on the game accounts corresponding to the obtained game account information according to a preset grouping rule to obtain at least one game account matching group;
[0010] For each of the game account matching groups, game accounts are matched within the game account matching group to obtain game promotion results between the game accounts in the game account matching group.
[0011] Optionally, the account information includes account points, and the game accounts corresponding to the acquired account information are grouped according to a preset grouping rule to obtain at least one game account matching group, including:
[0012] Grouping the game accounts corresponding to the acquired account information according to a preset number threshold to obtain at least one initial game account matching group;
[0013] For each of the initial game account matching groups, determining whether a difference in account points of each game account in the initial game account matching group exceeds a preset difference threshold;
[0014] If the difference between the account points of the game accounts does not exceed the difference threshold, the initial game account matching group is determined as the game account matching group, and the account information corresponding to the game accounts in the game account matching group is removed from the matching queue.
[0015] Optionally, the account information in the matching queue is stored in order of account points, and the method further includes:
[0016] If the difference between the account points of the game accounts exceeds the difference threshold, determining whether there is any new account information in the matching queue at a preset time interval;
[0017] If there is new account information in the matching queue, re-acquire the account information of each game account in the matching queue;
[0018] The steps of grouping the game accounts corresponding to the acquired account information according to the preset number threshold are re-executed according to the account information of each game account acquired again to obtain at least one initial game account matching group and subsequent steps.
[0019] Optionally, the method further includes:
[0020] receiving a second matching request sent by another terminal device, and adding the account information of the game account corresponding to the other terminal device to the matching queue according to the second matching request;
[0021] The account information of each game account in the matching queue is sorted in order according to the order of the account points of each game account in the matching queue to obtain an updated matching queue.
[0022] Optionally, if the game account is a single user or a team user, before determining, for each of the initial game account matching groups, whether the difference in points of each game account in the initial game account matching group exceeds a preset difference threshold, the method further includes:
[0023] If the game account is for a single user, the score of each game account is set as the account points of each game account;
[0024] If the game account is a team user, the total score of the game accounts or the average score of the scores is set as the account point of each game account.
[0025] Optionally, after performing game matching of game accounts in each game account matching group and obtaining game promotion results between game accounts in the game account matching group, the method further includes:
[0026] A binary tree structure is generated according to the game promotion results between the game accounts in the game account matching group and the account information of the game accounts.
[0027] Optionally, generating a binary tree structure according to the game promotion result of each game account in the game account matching group and the account information of each game account includes:
[0028] Setting the account information of each game account in the game account matching group as a leaf node of the initial binary tree structure;
[0029] Sequentially obtain the game promotion results of each round of competition between the game accounts in the game account matching group;
[0030] According to the game promotion results of each round of competition between the game accounts in the game account matching group, the pre-stored heap sorting rules and the leaf nodes of the initial binary tree structure, each node of the initial binary tree structure is adjusted to obtain a binary tree structure including the entire game promotion process and the final ranking.
[0031] Optionally, adjusting each node of the initial binary tree structure according to the promotion result of each round of competition between each game account in the game account matching group, the pre-stored heap sorting rule and the leaf nodes of the initial binary tree structure to obtain a binary tree structure including the entire game promotion process and the final ranking includes:
[0032] Matching the game accounts in the game account matching group in groups of two to obtain a first target game account after promotion;
[0033] According to the pre-stored heap sorting rule, the account information of the first target game account after the promotion is set as the previous node of the leaf node of the initial binary tree structure;
[0034] Determine whether the root node of the initial binary tree structure has been set;
[0035] If the root node of the initial binary tree structure has not been set, the first target game accounts are grouped into two to compete to obtain promoted second target game accounts, and the account information of the promoted second target game accounts is set as the previous node of the node where the account information of the first target game account is located according to the pre-stored heap sorting rule;
[0036] Repeat the steps of determining whether the root node of the initial binary tree structure has been set and the subsequent steps until the root node of the initial binary tree structure is set, and obtain a binary tree structure including the entire game promotion process and the final ranking.
[0037] Optionally, the method further includes:
[0038] If the root node of the initial binary tree structure has been set, the binary tree structure including the entire game promotion process and the final ranking is uniformly named according to a preset naming rule.
[0039] Optionally, before setting the game account information corresponding to each game account in the game account matching group as a leaf node of the initial binary tree structure, the method further includes:
[0040] If the number of game accounts in the game account matching group does not reach the preset matching threshold, the game accounts in the game account matching group are supplemented according to the preset supplement rule;
[0041] The completed account information of the game account is set as the leaf node of the initial binary tree structure.
[0042] Optionally, if the root node of the initial binary tree structure has been set, after uniformly naming the binary tree structure including the entire game promotion process and the final ranking according to a preset naming rule, the method further includes:
[0043] receiving a promotion result query request, wherein the promotion result query request includes a target binary tree name;
[0044] The target binary tree structure corresponding to the target binary tree name is obtained through the promotion result query request, and the entire game promotion process and final ranking contained in the target binary tree structure are displayed.
[0045] In a second aspect, an embodiment of the present application provides a game account matching device, including:
[0046] a processing module, configured to receive a first matching request sent by a terminal device, and write account information of a game account corresponding to the terminal device into a matching queue according to the first matching request, wherein the first matching request includes account information of the game account corresponding to the terminal device;
[0047] An acquisition module, used to acquire account information of game accounts corresponding to different terminal devices from the matching queue;
[0048] The processing module is further used to group the game accounts corresponding to the acquired account information according to a preset grouping rule to obtain at least one game account matching group;
[0049] The processing module is further used to perform game matching of game accounts within each game account matching group, and obtain game promotion results between the game accounts in the game account matching group.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0051] The memory stores computer-executable instructions;
[0052] The processor executes the computer-executable instructions stored in the memory to implement the game account matching method described in the first aspect and various possible designs of the first aspect.
[0053] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the game account matching method described in the first aspect and various possible designs of the first aspect is implemented.
[0054] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the game account matching method described in the first aspect and various possible designs of the first aspect.
[0055] The embodiment of the present application provides a game account matching method, device and electronic device. After adopting the above scheme, a first matching request sent by a terminal device can be first received, and the account information of the game account corresponding to the terminal device can be written into the matching queue according to the first matching request, and then the account information of the game accounts corresponding to different terminal devices can be obtained from the matching queue, and then the game accounts corresponding to the obtained account information are grouped according to a preset grouping rule to obtain at least one game account matching group. For each game account matching group, game accounts are matched in the game account matching group to obtain game promotion results between the game accounts in the game account matching group. By first grouping the game accounts added to the matching queue, then matching the game accounts in the group, and playing games according to the matching results, the flexibility of the matching method is increased, the matching time is reduced, the efficiency of matching between players during the game is improved, and the user's gaming experience is thereby improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0057] Figure 1 A schematic diagram of the architecture of an application system for the game account matching method provided in an embodiment of the present application;
[0058] Figure 2 A flowchart of a game account matching method provided in an embodiment of the present application;
[0059] Figure 3 A schematic diagram of an application of a binary tree structure generation process provided in an embodiment of the present application;
[0060] Figure 4 A flowchart of a game account matching method provided by another embodiment of the present application;
[0061] Figure 5 A schematic diagram of the structure of a game account matching device provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0064] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can also include other sequential instances in addition to those illustrated or described. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0065] In the prior art, during the game running process, the PVP process can help players to achieve the matching between different players and the battle after the matching, and when matching, it is usually realized according to the Socket technology. Since the Socket technology only supports point-to-point connection, therefore, when matching, it can only be matched one by one between a single player and a single player. However, if there is no successful matching between two players, one of the two players needs to be matched with other players who have not been matched, and the other player can only be matched after the previous player matching is finished. Exemplary, there are four players A, B, C, and D. Player A and player B can be matched first. If player A and player B are matched successfully, player C and player D will continue to be matched. If player A and player B are not matched successfully, player A and player C need to be matched. If player A and player C are still not matched successfully, player A and player D need to be matched. Player B and player C can only be matched if player A and player D are matched successfully. The matching method is inflexible and increases the matching time, which reduces the matching efficiency between players during the game, thereby affecting the user's gaming experience.
[0066] Based on the above technical problems, the present application achieves the technical effect of increasing the flexibility of the matching method, reducing the matching time, and improving the matching efficiency between players during the game, thereby improving the user's gaming experience by first grouping the game accounts added to the matching queue, then matching the game accounts in the group, and conducting competitions based on the matching results.
[0067] Figure 1 A schematic diagram of the architecture of an application system for the game account matching method provided in an embodiment of the present application, such as Figure 1 As shown, in the application system, a server 101 and a terminal device 102 may be included. The terminal device 102 may send a matching request to the server 101. After receiving the matching request, the server 101 may write the account information of the game account corresponding to the terminal device into the matching queue according to the matching request, and obtain the account information of the game accounts corresponding to different terminal devices from the matching queue, and then perform grouping operations according to the obtained account information of different game accounts to obtain at least one game account matching group. For each game account matching group, game account matches may be performed within the game account matching group to obtain game promotion results between the game accounts in the game account matching group, and the game promotion results between the game accounts may also be sent to the terminal device 102 for display.
[0068] There may be one or more terminal devices 102 . In the present embodiment, there are multiple terminal devices 102 .
[0069] In addition, the terminal device 102 may be a terminal device corresponding to the backstage operation and maintenance personnel, or a terminal device corresponding to the game player. When the terminal device 102 is a terminal device corresponding to the backstage operation and maintenance personnel, the game promotion results between the game accounts may be directly displayed on the server 101, and no longer sent to the terminal device 102. Alternatively, the game promotion results between the game accounts may be displayed on the server 101, and the game promotion results between the game accounts may also be sent to the terminal device 102.
[0070] In addition, the terminal facility 102 can be a device such as a smart phone, a tablet, a personal computer, a wearable smart device, etc. that can install and run the game installation package. Different terminal devices can be of the same type or of different types. The server 101 can be a single server or a cluster.
[0071] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0072] Figure 21 is a flowchart of a game account matching method provided in an embodiment of the present application. The method of this embodiment can be executed by the server 101. Figure 2 As shown, the method of this embodiment may include:
[0073] S201: receiving a first matching request sent by a terminal device, and writing account information of a game account corresponding to the terminal device into a matching queue according to the first matching request, wherein the first matching request includes account information of the game account corresponding to the terminal device.
[0074] In this embodiment, when a user runs a game through a terminal device, in order to increase the fun of the game, the user can play against other players by matching game accounts.
[0075] In addition, different terminal devices can represent different game accounts, and different game accounts have different game account information. Among them, the game account can be a single user, or a team and a user. When matching game accounts, it can be matched between single users and single users, or between team users and team users, or between single users and team users.
[0076] Each game account may correspond to account information indicating the basic situation of the game account. For example, the account information may include an account score indicating the combat power of the game account, and may also include a name or logo indicating the game account. If the game account is a team user, the name or logo of the team leader may be used as the name or logo of the team user.
[0077] After receiving the first matching request including the account information sent by the terminal device, the server may first write the account information of the game account corresponding to the terminal device into the matching queue according to the first matching request.
[0078] Among them, the matching queue contains the account information of the game accounts corresponding to different terminal devices. After receiving the matching requests containing the account information sent by different terminal devices, the server will store the account information in the matching queue.
[0079] Furthermore, different game accounts may correspond to different partitions, and different partitions may correspond to different matching queues. Therefore, the account information in the matching queue may be the account information of the game accounts in the same partition. The partition rules may be customized according to the actual application scenario, and will not be discussed in detail here.
[0080] In addition, there are many ways to generate the first matching request. For example, the first matching request can be generated by touching (single-click, double-click, long-press or re-press, etc.) a corresponding matching control on the terminal device. The first matching request can also be generated by voice control.
[0081] S202: Obtain account information of game accounts corresponding to different terminal devices from the matching queue.
[0082] In this embodiment, after the account information of the game account corresponding to the terminal device is written into the matching queue, since other terminal devices may also have the need to match, the matching queue may include not only the account information of the game account corresponding to the terminal device but also the account information of the game accounts corresponding to other terminal devices.
[0083] In addition, the number of account information in the matching queue can be one or more. If the number of account information in the matching queue is one, it means that there are no other game accounts that need to be matched, and the matching function cannot be executed temporarily. If the number of account information in the matching queue is multiple, it means that there are other game accounts that also need to be matched, and the matching function can be executed.
[0084] In addition, if the number of account information in the matching queue exceeds the preset number threshold, if all are obtained for matching, it is easy to cause excessive data processing pressure on the server. Therefore, the account information of the preset number threshold can be obtained from the matching queue for matching first, and after the obtained account information is matched, or after a preset time threshold, it is re-determined whether the number of account information in the matching queue exceeds the preset number threshold, and the processing is continued according to the judgment result. Exemplarily, the preset number threshold can be any value between 8000 and 10000.
[0085] Among them, the matching queue can use Redis to implement data storage and interaction.
[0086] S203: Grouping the game accounts corresponding to the acquired account information according to a preset grouping rule to obtain at least one game account matching group.
[0087] In this embodiment, after the account information is obtained, the game accounts corresponding to the account information may be grouped to obtain one or more game account matching groups.
[0088] Furthermore, if the account information includes account points, the game accounts corresponding to the acquired account information are grouped according to a preset grouping rule to obtain at least one game account matching group, which may specifically include:
[0089] The game accounts corresponding to the acquired account information are grouped according to a preset number threshold to obtain at least one initial game account matching group.
[0090] For each of the initial game account matching groups, it is determined whether a difference in the points of each game account in the initial game account matching group exceeds a preset difference threshold.
[0091] If the difference between the account points of the game accounts does not exceed the difference threshold, the initial game account matching group is determined as the game account matching group, and the account information corresponding to the game accounts in the game account matching group is removed from the matching queue.
[0092] Specifically, the number threshold can be determined according to the actual application scenario, and then the game accounts corresponding to the obtained account information can be grouped according to the determined number threshold to obtain one or more groups of initial game account matching groups. Exemplarily, the number threshold is 2, that is, 2 game accounts are matched as a group. If there are four game account information obtained, four game accounts A, B, C, and D can be matched. Then the game accounts can be grouped according to the number threshold to obtain two groups of initial game account matching groups, one group of A and B, and one group of C and D. In addition, random matching can be performed when grouping. Preferably, the game accounts can be sorted by the points first, and then the sorted game accounts can be obtained in sequence. In the above manner, game accounts with similar scores can be assigned to one group, which improves the fairness of subsequent matching.
[0093] After obtaining the initial game account matching group, it is also possible to determine whether the difference in the points of each game account in the initial game account matching group exceeds the preset difference threshold according to the preset difference threshold. If it does not exceed the difference threshold, it indicates that the combat effectiveness gap between the game accounts is small, and the initial game account matching group can be determined as the game account matching group, and the game account information corresponding to the game accounts in the game account matching group is removed from the matching queue. Among them, the difference threshold can be customized according to the actual application scenario. For example, the difference threshold can be 1, 3 or 4, etc.
[0094] In addition, the account information in the matching queue is stored in order of account points, and the method may further include:
[0095] If the difference between the account points of the game accounts exceeds the difference threshold, it is determined whether there is any new account information in the matching queue at a preset time interval.
[0096] If there is new account information in the matching queue, the account information of each game account in the matching queue is re-acquired.
[0097] The steps of grouping the game accounts corresponding to the acquired account information according to the preset number threshold are re-executed according to the account information of each game account acquired again to obtain at least one initial game account matching group and subsequent steps.
[0098] Specifically, if the difference in the account points of each game account in the initial game account matching group exceeds the difference threshold, it indicates that the combat effectiveness gap between the game accounts is large. If matching is performed, it may give the player an impression that the game is unfair, affecting the user's game experience. Therefore, it is possible to determine whether there is new account information in the matching queue every preset time. If there is new account information in the matching queue, indicating that there is a new game account that needs to be matched, then the account information of each game account in the matching queue (i.e., the updated matching queue) can be re-acquired, and then the game accounts corresponding to the acquired account information can be grouped according to the preset number threshold according to the re-acquired account information of each game account, and at least one initial game account matching group is obtained. For each initial game account matching group, it is determined whether the difference in the account points of each game account in the initial game account matching group exceeds the preset difference threshold. If the difference in the points of each game account does not exceed the difference threshold, the initial game account matching group is determined as a game account matching group, and the account information in the game account matching group is removed from the matching queue.
[0099] The preset duration may be customized according to the actual application scenario. For example, the preset duration may be any value within the range of 1-5 minutes.
[0100] In addition, the server may receive matching requests from multiple terminal devices, and perform matching processing on the terminal devices according to the matching requests from the multiple terminal devices. Therefore, the method may further include:
[0101] A second matching request triggered by other terminal devices is received, and account information of a game account corresponding to the other terminal devices is added to a matching queue according to the second matching request.
[0102] The account information corresponding to each game account in the matching queue is sorted in order according to the order of the account points of each game account in the matching queue to obtain an updated matching queue.
[0103] Specifically, the server can receive a second matching request triggered by other terminal devices other than the terminal device at any time, and add the account information of the game account corresponding to the other terminal device to the matching queue according to the second matching request. In addition, in order to improve the convenience of subsequent grouping operations and the fairness of game account matching, after receiving the new account information, the account information corresponding to each game account in the matching queue can be sorted in order according to the order of the account points of each game account in the matching queue to obtain an updated matching queue.
[0104] In addition, the game account may be a single user or a team user, and before determining for each of the initial game account matching groups whether the difference in points of each game account in the initial game account matching group exceeds a preset difference threshold, the following may also be included:
[0105] If the game account is for a single user, the score of each game account is set as the account point of each game account.
[0106] If the game account is a team user, the total score of the game accounts or the average score of the scores is set as the account point of each game account.
[0107] Exemplarily, there may be four game accounts, and the account information of the game accounts in the matching queue may be represented in the format of "name (account points)", for example, the game account may be represented as: 10086 (100 points) -- 10087 (99 points) -- 10088 (95 points) -- 10089 (88 points). After the user triggers a match on the terminal device, the terminal device may send a matching request to the server, and the server may perform a matching process according to the matching request. For example, a sliding window of length K may be used to traverse the matching queue with a step length of 1, and then at least one game account matching group may be determined. For example, if K = 2, then 2 are grouped together, and the score difference does not exceed 1, then 10086 and 10087 are matched into one group, and the account information of 10086 and 10087 that have been successfully matched is removed from the matching queue, and the remaining 10088 and 10089 in the matching queue wait for the next detection window, that is, the next time interval (which may be 1 second) to match because the score difference is too large. If player 10090 (94 points) enters the matching queue within 1 second, the account information in the matching queue can be reordered, and the resulting matching queue is 10088 (95 points)--10090 (94 points)--10089 (88 points), and 10088 and 10090 will be matched into a group. At this time, in the matching queue, because the players who have been successfully matched have been removed from the matching queue, only 10089 (88 points) is left waiting for other players to join the match. If 10089 actively chooses to cancel the match due to waiting too long, 10089 will also be directly removed from the matching queue.
[0108] S204: For each game account matching group, match the game accounts within the game account matching group to obtain game promotion results between the game accounts in the game account matching group.
[0109] In this embodiment, after obtaining the game account matching group, the game accounts in the game account matching group can be matched, and after the matching is completed, one or more rounds of battles can be carried out, and then the game promotion results between the game accounts in different game account matching groups can be obtained. The promotion results can include the promotion process and final ranking of the entire game in the game account matching group.
[0110] After adopting the above scheme, the first matching request sent by the terminal device can be received first, and the account information of the game account corresponding to the terminal device can be written into the matching queue according to the first matching request, and then the account information of the game accounts corresponding to different terminal devices can be obtained from the matching queue, and then the game accounts corresponding to the obtained account information can be grouped according to the preset grouping rules to obtain at least one game account matching group, and for each game account matching group, the game accounts are matched in the game account matching group to obtain the game promotion results between the game accounts in the game account matching group, and the game accounts added to the matching queue are grouped first, and then the game accounts in the group are matched, and the game is played according to the matching results. This method not only increases the flexibility of the matching method, but also reduces the matching time, improves the efficiency of matching between players during the game, and thus improves the user's gaming experience.
[0111] based on Figure 2 The method, the examples of this specification also provide some specific implementation plans of the method, which are described below.
[0112] In addition, in another embodiment, for each of the game account matching groups, after performing game matching of game accounts within the game account matching group and obtaining the game promotion results between the game accounts in the game account matching group, the method may further include:
[0113] A binary tree structure is generated according to the game promotion results of each game account in the game account matching group and the account information of each game account.
[0114] In this embodiment, after obtaining the game account matching group, the game accounts in the game account matching group can be matched. After the matching is completed, one or more rounds of battles can be carried out, and then the game promotion results between the game accounts in the game account matching group can be obtained. Then, a binary tree structure can be generated according to the game promotion results between the game accounts and the account information of each game account.
[0115] Furthermore, for each game account matching group, a binary tree structure is generated according to the game promotion results of each game account in the game account matching group and the account information of each game account, which may specifically include:
[0116] For each of the game account matching groups, the account information of each game account in the game account matching group is set as a leaf node of the initial binary tree structure.
[0117] The game promotion results of each round of competition between the game accounts in the game account matching group are obtained in sequence.
[0118] According to the game promotion results of each round of competition between the game accounts in the game account matching group, the pre-stored heap sorting rules and the leaf nodes of the initial binary tree structure, each node of the initial binary tree structure is adjusted to obtain a binary tree structure including the entire game promotion process and the final ranking.
[0119] Specifically, the account information of each game account in the game account matching group can be set as a leaf node of the initial binary tree structure, and then the game promotion result of each round of competition between the game accounts in the game account matching group is determined, and the nodes of the initial binary tree structure are adjusted according to the pre-stored heap sorting rules and the game promotion results, and finally a binary tree structure including the entire game promotion process and the final ranking is obtained.
[0120] Further, each node of the initial binary tree structure is adjusted according to the promotion result of each game account in the game account matching group in each round of the game, the pre-stored heap sorting rule and the leaf nodes of the initial binary tree structure to obtain a binary tree structure including the entire game promotion process and the final ranking, which may specifically include:
[0121] The game accounts in the game account matching group are matched in groups of two to obtain a first target game account after promotion.
[0122] According to the pre-stored heap sorting rule, the account information corresponding to the first target game account after the promotion is set as the previous node of the leaf node of the initial binary tree structure.
[0123] Determine whether the root node of the initial binary tree structure has been set.
[0124] If the root node of the initial binary tree structure has not been set, the first target game accounts are grouped in two to compete to obtain promoted second target game accounts, and the account information corresponding to the promoted second target game accounts is set as the previous node of the node where the account information corresponding to the first target game account is located according to a pre-stored heap sorting rule.
[0125] Repeat the steps of determining whether the root node of the initial binary tree structure has been set and the subsequent steps until the root node of the initial binary tree structure is set, and obtain a binary tree structure including the entire game promotion process and the final ranking.
[0126] For example, Figure 3 The application diagram of the binary tree structure generation process provided in the embodiment of the present application is as follows: Figure 3 As shown in a, in this embodiment, four game accounts are matched into a group. The four game accounts are (10086, 10087, 10088, 10089), and the account information of the four game accounts is set as the leaf nodes of the binary tree structure, while the other nodes of the binary tree structure are temporarily set to 0, that is, the generated binary tree structure is [0, 0, 0, 10086, 10087, 10088, 10089]. Figure 3 As shown in b, in this embodiment, if 10086 beats 10087, and 10088 beats 10089, the binary tree structure can be adjusted to [0, 10086, 10088, 10086, 10087, 10088, 10089] through the heap sorting rule (also called shift up operation). That is, the account information corresponding to 10086 and 10088 performs a shift up operation at the leaf node. Figure 3 As shown in c, in this embodiment, if 10086 eventually defeats 10088, the binary tree structure can be adjusted to [10086, 10086, 10088, 10086, 10087, 0088, 10089] through the heap sorting rule. Through this binary tree structure, the game information of a certain game account can be intuitively determined, such as the entire game promotion process and the final ranking.
[0127] In addition, the method may further include:
[0128] If the root node of the initial binary tree structure has been set, the binary tree structure including the entire game promotion process and the final ranking is uniformly named according to a preset naming rule.
[0129] Specifically, if the root node of the binary tree structure is set, it means that the game between the game accounts in the game account matching group has been completed, and the generated binary tree structure can intuitively represent the promotion process of the entire game and the final ranking, etc. In order to improve the convenience of data management in the future, the binary tree structure containing the entire game promotion process and the final ranking can be uniformly named according to the preset naming rules. Exemplarily, a unified prefix containing the game name and game date can be used, such as the AAA game started on 2021-01-01, regardless of the matching queue or the naming prefix of the full binary tree can be named AAA_20210101.
[0130] In addition, in another embodiment, before setting the game account information corresponding to each game account in the game account matching group as a leaf node of the initial binary tree structure, the method further includes:
[0131] For each game account matching group, if the number of game accounts in the game account matching group does not reach a preset matching threshold, the game accounts in the game account matching group are supplemented according to a preset supplement rule.
[0132] The completed account information of the game account is set as the leaf node of the initial binary tree structure.
[0133] In this embodiment, in order to reduce the number of groupings of the game account matching group and improve the success rate of the game account matching, the generated binary tree structure can be predefined as a full binary tree structure. That is, a matching threshold can be pre-set, and when the number of game accounts in the game account matching group reaches the matching threshold, the game accounts are matched. If the number of game accounts in the game account matching group does not reach the matching threshold, the game accounts are first padded so that the number of game accounts reaches the matching threshold, and then the account information of the padded game accounts is set as the leaf node of the initial binary tree structure.
[0134] Among them, the matching threshold can be a power of 2. If the number of game accounts in the game account matching group is less than a power of 2, the number of game accounts in the game account matching group will be padded to the nearest power of 2 that is larger than the number of game accounts, and then the account information of the padded game account will be set as the leaf node of the initial binary tree structure.
[0135] For example, there are five game accounts in the game account matching group, and the corresponding account information is [1, 2, 3, 4, 5]. Then you can first supplement it to the cube of 2, that is, the supplemented account information is [1, 2, 3, 4, 5, 0, 0, 0], and then set the supplemented account information as the leaf node of the initial binary tree structure.
[0136] also, Figure 4 A flowchart of a game account matching method provided by another embodiment of the present application is shown in FIG. Figure 4 As shown, in this embodiment, if the root node of the initial binary tree structure has been set, then after uniformly naming the binary tree structure including the entire game promotion process and the final ranking according to the preset naming rules, it also includes:
[0137] S401: Receive a promotion result query request, wherein the promotion result query request includes a target binary tree name.
[0138] S402: Obtain a target binary tree structure corresponding to the target binary tree name through a promotion result query request, and display the entire game promotion process and final ranking contained in the target binary tree structure.
[0139] In this embodiment, the entire game promotion process and final ranking can be stored in a binary tree structure in advance, and different binary tree structures can uniquely correspond to a binary tree name. The corresponding binary tree structure can be obtained according to the binary tree name, and then the entire game promotion process and final ranking stored in the binary tree structure can be obtained. When it is necessary to query the information of the relevant game, a promotion result query request containing the target binary tree name can be triggered, and then the target binary tree structure corresponding to the target binary tree name can be queried according to the request, and the entire game promotion process and final ranking contained in the target binary tree structure can be displayed, which improves the convenience of querying game data.
[0140] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 5 A schematic diagram of the structure of a game account matching device provided in an embodiment of the present application, such as Figure 5 As shown, the device provided in this embodiment may include:
[0141] The processing module 501 is used to receive a first matching request sent by a terminal device, and write the account information of the game account corresponding to the terminal device into the matching queue according to the first matching request, wherein the first matching request includes the account information of the game account corresponding to the terminal device.
[0142] The acquisition module 502 is used to obtain the account information of the game accounts corresponding to different terminal devices from the matching queue.
[0143] The processing module 501 is further configured to group the game accounts corresponding to the acquired game account information according to a preset grouping rule to obtain at least one game account matching group.
[0144] In this embodiment, the account information includes account points, and the processing module 501 is further used to:
[0145] The game accounts corresponding to the acquired account information are grouped according to a preset number threshold to obtain at least one initial game account matching group.
[0146] For each of the initial game account matching groups, it is determined whether a difference in the points of each game account in the initial game account matching group exceeds a preset difference threshold.
[0147] If the difference between the points of the game accounts does not exceed the difference threshold, the initial game account matching group is determined as the game account matching group, and the account information of the game accounts in the game account matching group is removed from the matching queue.
[0148] Furthermore, the account information in the matching queue is stored in the order of account points. The processing module 501 is further used to:
[0149] If the difference between the points of the game accounts exceeds the difference threshold, it is determined at preset time intervals whether there is any new account information in the matching queue.
[0150] If there is new account information in the matching queue, the account information of each game account in the matching queue is re-acquired.
[0151] The steps of grouping the game accounts corresponding to the acquired account information according to the preset number threshold are re-executed according to the account information of each game account acquired again to obtain at least one initial game account matching group and subsequent steps.
[0152] In addition, the processing module 501 is also used for:
[0153] A second matching request triggered by other terminal devices is received, and account information of a game account corresponding to the other terminal devices is added to a matching queue according to the second matching request.
[0154] The account information of each game account in the matching queue is sorted in order according to the order of the points of each game account in the matching queue to obtain an updated matching queue.
[0155] In addition, if the game account is a single user or a team user, the processing module 501 is further used to:
[0156] If the game account is for a single user, the score of each game account is set as the account point of each game account.
[0157] If the game account is a team user, the total score of the game accounts or the average score of the scores is set as the account point of each game account.
[0158] The processing module 501 is further used to perform game matching of game accounts within each game account matching group, and obtain game promotion results between the game accounts in the game account matching group.
[0159] In addition, in another embodiment, the processing module 501 is further used to generate a binary tree structure according to the game promotion results between the game accounts in the game account matching group and the account information of the game accounts.
[0160] In this embodiment, the processing module 501 is further used for:
[0161] The account information of each game account in the game account matching group is set as a leaf node of the initial binary tree structure.
[0162] The game promotion results of each round of competition between the game accounts in the game account matching group are obtained in sequence.
[0163] According to the game promotion results of each round of competition between the game accounts in the game account matching group, the pre-stored heap sorting rules and the leaf nodes of the initial binary tree structure, each node of the initial binary tree structure is adjusted to obtain a binary tree structure including the entire game promotion process and the final ranking.
[0164] Furthermore, the processing module 501 is also used for:
[0165] The game accounts in the game account matching group are matched in groups of two to obtain a first target game account after promotion.
[0166] According to the pre-stored heap sorting rule, the account information corresponding to the first target game account after the promotion is set as the previous node of the leaf node of the initial binary tree structure.
[0167] Determine whether the root node of the initial binary tree structure has been set.
[0168] If the root node of the initial binary tree structure has not been set, the first target game accounts are grouped in two to compete to obtain promoted second target game accounts, and the account information of the promoted second target game accounts is set as the previous node of the node where the account information of the first target game account is located according to a pre-stored heap sorting rule.
[0169] Repeat the steps of determining whether the root node of the initial binary tree structure has been set and the subsequent steps until the root node of the initial binary tree structure is set, and obtain a binary tree structure including the entire game promotion process and the final ranking.
[0170] In addition, the processing module 501 is also used for:
[0171] If the root node of the initial binary tree structure has been set, the binary tree structure including the entire game promotion process and the final ranking is uniformly named according to a preset naming rule.
[0172] In addition, in another embodiment, the processing module 501 is further used for:
[0173] If the number of game accounts in the game account matching group does not reach a preset matching threshold, the game accounts in the game account matching group are supplemented according to a preset supplement rule.
[0174] The completed account information of the game account is set as the leaf node of the initial binary tree structure.
[0175] In addition, in another embodiment, the processing module 501 is further used for:
[0176] A promotion result query request is received, wherein the promotion result query request includes a target binary tree name.
[0177] The target binary tree structure corresponding to the target binary tree name is obtained through the promotion result query request, and the entire game promotion process and final ranking contained in the target binary tree structure are displayed.
[0178] The device provided in the embodiment of the present application can realize the above-mentioned Figure 2 The implementation principle and technical effect of the method in the embodiment shown are similar and will not be described in detail here.
[0179] Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device 600 provided in this embodiment includes: a processor 601 and a memory connected to the processor in communication. The processor 601 and the memory 602 are connected via a bus 603 .
[0180] In the specific implementation process, the processor 601 executes the computer execution instructions stored in the memory 602, so that the processor 601 executes the game account matching method in the above method embodiment.
[0181] The specific implementation process of the processor 601 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0182] In the above Figure 6 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0183] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage.
[0184] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0185] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the game account matching method of the above method embodiment is implemented.
[0186] An embodiment of the present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the game account matching method as described above is implemented.
[0187] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0188] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0189] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0190] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A game account matching method, characterized in that: include: receiving a first matching request sent by a terminal device, and writing account information of a game account corresponding to the terminal device into a matching queue according to the first matching request, wherein the first matching request includes account information of the game account corresponding to the terminal device; Obtaining account information of game accounts corresponding to different terminal devices from the matching queue; Performing grouping operations on the game accounts corresponding to the acquired account information according to a preset grouping rule to obtain at least one game account matching group; For each of the game account matching groups, match the game accounts in the game account matching group to obtain game promotion results between the game accounts in the game account matching group; The account information includes account points. Then, the game accounts corresponding to the acquired account information are grouped according to the preset grouping rules to obtain at least one game account matching group, including: Grouping the game accounts corresponding to the acquired account information according to a preset number threshold to obtain at least one initial game account matching group; For each of the initial game account matching groups, determining whether a difference in account points of each game account in the initial game account matching group exceeds a preset difference threshold; If the difference between the account points of the game accounts does not exceed the difference threshold, the initial game account matching group is determined as a game account matching group, and the account information corresponding to the game accounts in the game account matching group is removed from the matching queue; After performing game matching of game accounts in each game account matching group and obtaining game promotion results between game accounts in the game account matching group, the method further includes: A binary tree structure is generated according to the game promotion results between the game accounts in the game account matching group and the account information of the game accounts. The binary tree structure is a structure including the entire game promotion process and the final ranking.
2. The method according to claim 1, characterized in that The account information in the matching queue is stored in order of account points, and the method further includes: If the difference between the account points of the game accounts exceeds the difference threshold, determining whether there is any new account information in the matching queue at a preset time interval; If there is new account information in the matching queue, re-acquire the account information of each game account in the matching queue; The steps of grouping the game accounts corresponding to the acquired account information according to the preset number threshold are re-executed according to the account information of each game account that is re-acquired to obtain at least one initial game account matching group and subsequent steps.
3. The method according to claim 2, characterized in that The method further comprises: receiving a second matching request triggered by another terminal device, and adding account information of a game account corresponding to the other terminal device to a matching queue according to the second matching request; The account information of each game account in the matching queue is sorted in order according to the order of the account points of each game account in the matching queue to obtain an updated matching queue.
4. The method according to claim 1, characterized in that: If the game account is a single user or a team user, before determining, for each of the initial game account matching groups, whether the difference in points of each game account in the initial game account matching group exceeds a preset difference threshold, the method further includes: If the game account is for a single user, the score of each game account is set as the account points of each game account; If the game account is a team user, the total score of the game accounts or the average score of the scores is set as the account point of each game account.
5. The method according to claim 1, characterized in that The generating a binary tree structure according to the game promotion result of each game account in the game account matching group and the account information of each game account includes: Setting the account information of each game account in the game account matching group as a leaf node of the initial binary tree structure; Sequentially obtain the game promotion results of each round of competition between the game accounts in the game account matching group; According to the game promotion results of each round of competition between the game accounts in the game account matching group, the pre-stored heap sorting rules and the leaf nodes of the initial binary tree structure, each node of the initial binary tree structure is adjusted to obtain a binary tree structure including the entire game promotion process and the final ranking.
6. The method according to claim 5, characterized in that The nodes of the initial binary tree structure are adjusted according to the promotion results of each round of competition between the game accounts in the game account matching group, the pre-stored heap sorting rules and the leaf nodes of the initial binary tree structure to obtain a binary tree structure including the entire game promotion process and the final ranking, including: Matching the game accounts in the game account matching group in groups of two to obtain a first target game account after promotion; According to the pre-stored heap sorting rule, the account information of the first target game account after the promotion is set as the previous node of the leaf node of the initial binary tree structure; Determine whether the root node of the initial binary tree structure has been set; If the root node of the initial binary tree structure has not been set, the first target game accounts are grouped into two to compete to obtain promoted second target game accounts, and the account information of the promoted second target game accounts is set as the previous node of the node where the account information of the first target game account is located according to the pre-stored heap sorting rule; Repeat the steps of determining whether the root node of the initial binary tree structure has been set and the subsequent steps until the root node of the initial binary tree structure is set, and obtain a binary tree structure including the entire game promotion process and the final ranking.
7. The method according to claim 6, characterized in that The method further comprises: If the root node of the initial binary tree structure has been set, the binary tree structure including the entire game promotion process and the final ranking is uniformly named according to a preset naming rule.
8. The method according to claim 5, characterized in that Before setting the account information of each game account in the game account matching group as a leaf node of the initial binary tree structure, the method further includes: If the number of game accounts in the game account matching group does not reach the preset matching threshold, the game accounts in the game account matching group are supplemented according to the preset supplement rule; The completed account information of the game account is set as the leaf node of the initial binary tree structure.
9. The method according to claim 7, characterized in that: If the root node of the initial binary tree structure has been set, then after uniformly naming the binary tree structure including the entire game promotion process and the final ranking according to a preset naming rule, it also includes: receiving a promotion result query request, wherein the promotion result query request includes a target binary tree name; The target binary tree structure corresponding to the target binary tree name is obtained through the promotion result query request, and the entire game promotion process and final ranking contained in the target binary tree structure are displayed.
10. A game account matching device, characterized in that: include: a processing module, configured to receive a first matching request sent by a terminal device, and write account information of a game account corresponding to the terminal device into a matching queue according to the first matching request, wherein the first matching request includes account information of the game account corresponding to the terminal device; An acquisition module, used to acquire account information of game accounts corresponding to different terminal devices from the matching queue; The processing module is further used to group the game accounts corresponding to the acquired account information according to a preset grouping rule to obtain at least one game account matching group; The processing module is further used to perform game matching of game accounts in each game account matching group, and obtain game promotion results between game accounts in the game account matching group; The account information includes account points. Then, when the game accounts corresponding to the acquired account information are grouped according to the preset grouping rules to obtain at least one game account matching group, the processing module is specifically used to: Grouping the game accounts corresponding to the acquired account information according to a preset number threshold to obtain at least one initial game account matching group; For each of the initial game account matching groups, determining whether a difference in account points of each game account in the initial game account matching group exceeds a preset difference threshold; If the difference between the account points of the game accounts does not exceed the difference threshold, the initial game account matching group is determined as a game account matching group, and the account information corresponding to the game accounts in the game account matching group is removed from the matching queue; After performing matchmaking of game accounts within the game account matching group for each of the game account matching groups and obtaining game promotion results between the game accounts in the game account matching group, the processing module is further configured to generate a binary tree structure according to the game promotion results between the game accounts in the game account matching group and the account information of the game accounts, wherein the binary tree structure is a structure including the entire game promotion process and the final ranking.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the game account matching method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the game account matching method as described in any one of claims 1 to 9 is implemented.
