Game character recommendation method and system

By introducing lineup score network and knowledge graph analysis, combined with player interests, the game character recommendation system is optimized, which solves the irrationality and technical difficulties in the traditional system, and improves the rationality of recommendation and player experience.

CN115186186BActive Publication Date: 2025-08-12QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210852217.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-08-12
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

The traditional game character recommendation system has problems such as theoretical irrationality, technical difficulties, character position conflicts and ignoring player interests when selecting lineups, resulting in poor recommendation results.

Method used

The lineup score network evaluation criteria are adopted, and the role association module and player interest module are combined, the role association is analyzed through the knowledge graph, and the player's history is integrated to optimize the role recommendation algorithm.

Benefits of technology

It improves the rationality and relevance of character recommendations, improves player experience, avoids character position conflicts and recommends characters that meet player interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186186B_ABST
    Figure CN115186186B_ABST
Patent Text Reader

Abstract

The present invention discloses a game character recommendation method and system. In response to a current player client selecting the i-th character to be formed into a lineup, a first recommendation index of each alternative character is calculated according to the currently selected character of the lineup to be formed, the currently selected character of the opposing player, the turn information of the selected character, and all alternative characters; based on the knowledge graph of the characters, a different-team association matrix and a same-team association matrix are constructed; based on the different-team association matrix and the same-team association matrix, the first recommendation index of each alternative character is corrected to obtain a second recommendation index of each alternative character; based on the historical character usage record of the current player, the second recommendation index of each alternative character is corrected to obtain a third recommendation index of each alternative character; the alternative characters are sorted in a recommendation list in descending order according to the third recommendation index, and the top N alternative characters are output as the final recommended characters to the client.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of personalized recommendation technology, and in particular to a game character recommendation method and system. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Traditional character recommendation systems of this type, when using a Monte Carlo search tree to search for the optimal lineup, employ a win rate network to judge the strengths and weaknesses of both teams' lineups, and use the win rate output by the win rate network as feedback. Using win rate as lineup feedback has the following two drawbacks:

[0004] 1. Theoretically speaking: The outcome of a multiplayer online tactical competitive game (MOBA) like Honor of Kings depends on two stages: the character lineup selection stage and the character combat stage. The outcome of the game is affected by both stages. It is unreasonable to predict the outcome solely based on the character lineup and use this as a feedback criterion.

[0005] 2. Technically speaking: Even with the same lineup, both win and loss situations will exist. Using such data as samples to train neural networks will lead to inconsistent labels for the same features, which will lead to poor network fitting and poor lineup evaluation.

[0006] In addition, traditional character recommendation systems often only pursue maximizing the lineup's winning rate, without considering the position conflicts between characters and the relationship between the characters in both lineups. This will lead to position conflicts and poor coordination among the characters recommended to players.

[0007] Finally, the traditional character recommendation system does not take into account the player's interests and ignores the user experience. It only recommends characters to players through algorithms. This will cause the characters recommended by the system to be far different from the characters that players often play. Summary of the Invention

[0008] To address the shortcomings of the existing technology, the present invention provides a game character recommendation method and system. When using a Monte Carlo search tree to perform an optimized lineup search, a lineup score network is used as the criterion for judging the performance of both lineups. The use of a score network overcomes theoretical irrationalities and technical difficulties. Furthermore, the system incorporates a character association module, leveraging a knowledge graph to analyze the correlations between characters, effectively mining the correlations between both characters and addressing the sparse correlations between characters in traditional character recommendation systems. Finally, the recommendation system incorporates a player interest module, incorporating a player's historically frequently used characters as an interest vector to effectively mine the player's interests.

[0009] In a first aspect, the present invention provides a method for recommending game characters;

[0010] The game's character recommendation method, applied to the server side, includes:

[0011] In response to the current player client selecting the i-th character to be formed into a lineup, a first recommendation index for each candidate character is calculated based on the currently selected character in the lineup, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer;

[0012] Construct a knowledge graph of the role; based on the knowledge graph of the role, construct a different-team association matrix and a same-team association matrix; based on the different-team association matrix and the same-team association matrix, modify the first recommendation index of each candidate role to obtain the second recommendation index of each candidate role;

[0013] Based on the current player's historical character usage records, the second recommendation index of each candidate character is modified to obtain the third recommendation index of each candidate character;

[0014] The candidate roles in the recommendation list are sorted in descending order according to the third recommendation index, and the top N candidate roles are output as the final recommended roles.

[0015] In a second aspect, the present invention provides a game character recommendation system;

[0016] The game's character recommendation system, applied to the server side, includes:

[0017] The response module is configured to: in response to the current player client selecting the i-th character to be formed into the lineup, calculate a first recommendation index for each candidate character based on the currently selected character in the lineup to be formed, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer;

[0018] The initial correction module is configured to: construct a knowledge graph of the role; construct a different-team association matrix and a same-team association matrix based on the knowledge graph of the role; and correct the first recommendation index of each candidate role based on the different-team association matrix and the same-team association matrix to obtain a second recommendation index for each candidate role;

[0019] A second correction module is configured to: correct the second recommendation index of each candidate character based on the historical character usage record of the current player to obtain a third recommendation index of each candidate character;

[0020] The output module is configured to sort the candidate roles in the recommendation list in descending order of the third recommendation index, and output the top N candidate roles as the final recommended roles to the client.

[0021] In a third aspect, the present invention further provides an electronic device, comprising:

[0022] a memory for non-transitory storage of computer-readable instructions; and

[0023] a processor for executing said computer-readable instructions,

[0024] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0025] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0026] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] The present invention innovatively proposes a new lineup evaluation network, integrates a role association module to mine the correlation between roles, and introduces a user interest vector to mine the user's favorite roles.

[0029] The present invention uses a scoring network as lineup feedback, which not only eliminates the theoretical irrationality of the win rate network in the traditional recommendation system, but also overcomes the technical difficulty of training neural networks in the traditional recommendation system, avoids the occurrence of label conflicts, and solves the problem of role position conflicts.

[0030] The role association introduced in the present invention uses a knowledge graph to perform role association analysis. During the recommendation process, the recommended character can well explore the matching relationship between the recommended character and the selected friendly character, as well as the restraint and restraint relationship with the enemy character, so that the character recommended to the player has the strongest matching ability with the friendly character and is most likely to restrain the enemy character without being restrained by the enemy character.

[0031] The present invention introduces player interests and performs interest analysis on players based on the scoring network and association module, so that the characters recommended to players are reasonable, highly relevant and interesting, thereby improving the player's user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0033] Figure 1 This is a flow chart of the method of embodiment 1. DETAILED DESCRIPTION

[0034] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present invention belongs.

[0035] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0036] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.

[0037] All data in this embodiment is obtained in compliance with laws and regulations and based on the consent of the user, and is used legally.

[0038] Example 1

[0039] This embodiment provides a method for recommending game characters;

[0040] like Figure 1 As shown, the game character recommendation method, applied on the server side, includes:

[0041] S101: In response to the current player client selecting the i-th character for forming a lineup, calculating a first recommendation index for each candidate character based on the currently selected character in the lineup, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer;

[0042] S102: Constructing a knowledge graph of the role; constructing a different-team association matrix and a same-team association matrix based on the knowledge graph of the role; and modifying the first recommendation index of each candidate role based on the different-team association matrix and the same-team association matrix to obtain a second recommendation index for each candidate role;

[0043] S103: Based on the current player's historical character usage record, the second recommendation index of each candidate character is modified to obtain a third recommendation index for each candidate character;

[0044] S104: Sort the candidate roles in the recommendation list in descending order of the third recommendation index, and output the top N candidate roles as the final recommended roles.

[0045] Furthermore, the step S101: calculating a first recommendation index for each candidate character based on the currently selected character of the lineup to be formed, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; specifically includes:

[0046] S101-1: Construct a root node; the attributes of the root node include: the currently selected character of the lineup to be formed, the currently selected character of the opposing player, and the turn information of the selected character;

[0047] S101-2: Expand child nodes for the root node or select child nodes;

[0048] S101-3: Access the child node expanded or selected in the previous step;

[0049] When the jth child node is visited, assume that the character represented by the jth child node is the character pre-selected by the current player;

[0050] For the remaining characters in the lineup to be formed, randomly select characters to set up to complete the lineup to be formed;

[0051] For the remaining characters of the opposing player, randomly select characters to set up to complete the opposing player's lineup;

[0052] S101-4: Input the completed lineup to be formed into the trained neural network, and output the predicted score of the completed lineup to be formed;

[0053] Input the completed lineup of players into the trained neural network and output the predicted score of the completed lineup of players;

[0054] When the predicted score of the completed lineup to be formed is greater than the predicted score of the opposing player lineup and greater than the set threshold, the feedback value of the current child node is increased by 1; otherwise, the feedback value of the current child node is increased by 0; and the process returns to S101-2;

[0055] S101-5: After visiting the M child nodes a set number of times, calculate the ratio of the feedback value of the current child node to the number of times the current child node has been visited, and use the ratio as the first recommendation index of the role corresponding to the current child node.

[0056] Furthermore, the step S101-2: expanding a child node or selecting a child node for the root node specifically includes:

[0057] Assuming that the number of all candidate roles is M, generate a random number, which is greater than 0 and less than 1; determine whether the random number is greater than 0.5;

[0058] If the random number is less than 0.5, continue to determine whether the current root node has less than M child nodes. If less than M, expand a new child node for the root node and enter S101-3; if greater than or equal to M, select a child node;

[0059] If the random number is greater than 0.5, a child node is selected;

[0060] The selection process of selecting a child node includes:

[0061] The child node score calculation formula of the Monte Carlo search tree algorithm is used to calculate the scores of all child nodes under the current root node, and the child node corresponding to the highest score is selected, and the process proceeds to S101-3;

[0062] Each child node represents an alternative role; different child nodes represent different alternative roles; where M is a positive integer; the initial feedback value of each child node is 0.

[0063] It should be understood that the turn information of the selected characters refers to the order in which the selected characters are selected; for example, player No. 1 of the lineup to be formed selects character A, then player No. 1 of the opposing player selects character B, and then player No. 2 of the opposing player selects character C, then the turn of character A here is 1, the turn of character B is 2, and the turn of character C is 3.

[0064] Furthermore, the training process of the trained neural network includes:

[0065] Constructing a training set; the training set includes positive samples and negative samples; using the lineup data of the winning team of several tens of thousands of games of several players before the current game as positive samples, and using the lineup data of several tens of thousands of character position conflicts in the current game as negative samples;

[0066] Constructing a neural network; the neural network is a shallow neural network; the shallow neural network includes an input layer, a hidden layer, and an output layer connected in sequence;

[0067] The training set is input into the shallow neural network for training to obtain the trained shallow neural network.

[0068] It should be understood that the character position conflict means that player A and player B belong to the same lineup, but the character positions or activity areas selected by the two after selecting the characters are the same.

[0069] For example, the Monte Carlo search tree algorithm is used to search for the optimal lineup, which involves the following four steps:

[0070] (1) Extension: Expand a child node from the current node, enter the selected role ID and the pre-selected role ID and round information;

[0071] (2) Selection: Calculate the scores of all child nodes of the root node according to the child node score calculation formula, and select the child node with the highest score:

[0072]

[0073] Among them, R c Represents the number of times the node receives feedback of 1, V c Represents the number of times the node is visited, V p Represents the number of visits to the node's parent node, S is a constant, and UTC represents the score corresponding to the child node;

[0074] From formula (1), we can see that:

[0075] The more times a node receives feedback of 1, the more likely it is to be selected. This part controls the depth selection of the search tree.

[0076] It means that the fewer times the current node is visited, the easier it is to be selected. This part controls the breadth selection of the search tree.

[0077] (3) Simulation: This process occurs after a node is expanded or selected. Based on the role information saved in the selected or expanded node, the node is deeply expanded and the remaining number of roles is randomly added to both parties, that is, each party has five roles. The five roles of both parties are then processed into vectors and input into the score network for feedback.

[0078] (4) Feedback: The score network used in this process is one of the core technologies to achieve the recommendation effect of this system. The score network uses the lineup data of the winning team of 900,000 games of the top 500 players in the game "Honor of Kings" as positive samples and 1.8 million lineup data of character position conflicts as negative samples to train a shallow neural network. The output value of the shallow neural network is a prediction score of the lineup quality. We generate the feedback results of the Monte Carlo search tree by comparing this score.

[0079] The specific process is: the lineup vectors of both teams after simulation are input into the score network in turn, and two scores will be obtained. By comparing these two scores, it can be determined whether the feedback is 1 or 0.

[0080] One improvement made here is that the system adds a threshold to the feedback condition. That is, the feedback is 1 only when the recommended character's lineup score is higher than the enemy lineup and the score is greater than 0.8; otherwise, the feedback is 0. This threshold setting effectively solves the situation where the score is higher than the enemy lineup but too low. The feedback value is then updated back along the simulation path to the root node, modifying the feedback value and access value of all nodes along the path.

[0081] Furthermore, the step S102: constructing a knowledge graph of the role specifically includes:

[0082] Based on the restraint relationship, restrained relationship, same-team pairing relationship and different-team pairing relationship between game characters, a knowledge graph of the characters is constructed; the characters are used as nodes of the knowledge graph, and the relationships between characters are used as connecting edges between nodes.

[0083] It should be understood that the restraint relationship refers to the fact that one character has a suppressive effect on the skills of another character.

[0084] It should be understood that the restrained relationship means that the skills of a certain character are suppressed by the skills of another character.

[0085] It should be understood that the said team matching relationship means that the skills of the characters in the same team can be matched with each other to produce greater effects.

[0086] It should be understood that the relationship between different teams means that the skills of the characters in the opposing teams can be matched with each other to produce greater effects.

[0087] Furthermore, the step S102: constructing a different-team association matrix and a same-team association matrix based on the knowledge graph of the roles specifically includes:

[0088] S102-1: Based on the knowledge graph of the characters, construct an opposite-team association matrix; the rows and columns of the opposite-team association matrix represent all the characters in the current game; the elements of the opposite-team association matrix represent the relationship coefficients between the characters in the lineup to be formed and the characters in the opposing player's lineup; the relationship coefficients are the restraint coefficients between opposite-team characters, the restraint coefficients between opposite-team characters, or the compatibility coefficients between opposite-team characters;

[0089] S102-2: Based on the knowledge graph of the characters, a team association matrix is constructed; the rows and columns of the team association matrix represent all the characters in the current game; the element values of the team association matrix represent the matching coefficients between the candidate characters and the selected team characters.

[0090] Furthermore, the step S102: based on the different-team association matrix and the same-team association matrix, correcting the first recommendation index of each candidate role to obtain a second recommendation index of each candidate role specifically includes:

[0091] The first recommendation index is multiplied by the coefficient of the selected character in the different-team association matrix or the same-team association matrix to obtain the second recommendation index of the current candidate character.

[0092] For example, assume that player 1 of the lineup to be formed has already selected the corresponding character; assume that player 2 and player 3 of the opposing player lineup have also selected the corresponding characters; it should be understood that the order of selecting the characters here is set by the game manufacturer;

[0093] Now, in this embodiment of the application, the second recommendation index of each candidate character Q among the 106 candidate characters of player No. 4 to be formed into a lineup is calculated; it should be understood that the 106 here means that there are a total of 109 characters in the game, 3 characters have been selected, and there are 106 characters for player No. 4 to choose from;

[0094] Multiply the first recommendation index of each candidate character Q of player No. 4 by the coefficient of the player No. 1 character and the candidate character Q in the same team association matrix to obtain a first value;

[0095] Then multiply the first value by the coefficient of the player character No. 2 and the candidate character Q in the opposite team association matrix to obtain the second value;

[0096] Then, the second value is multiplied by the coefficient of the player character No. 3 and the alternative character Q in the hetero-team association matrix to obtain the second recommendation index.

[0097] It should be understood that the coefficients in the heterogeneous team association matrix are one of the three options: the restraint coefficient between heterogeneous team characters, the restraint coefficient between heterogeneous team characters, or the matching coefficient between heterogeneous team characters. The three coefficients will not appear at the same time. The situation where three coefficients or two coefficients appear at the same time is not considered in the embodiments of this application.

[0098] It should be understood that the root node carries multiple child nodes, each of which represents a pre-recommended role, and the child node carries feedback and visit count information (score information).

[0099] Merge the scores of all child nodes with the two association matrices converted from the knowledge graph. These two matrices include a heterogeneous association matrix and a homogeneous association matrix. Both matrices are 109*109 matrices with a default matrix value of 1.

[0100] Because there are currently 109 characters in "Honor of Kings", the rows of the matrix represent 109 different characters, and the columns also represent 109 characters. The matrix values corresponding to the interrelated characters are no longer 1, but the correlation coefficient.

[0101] The correlation coefficient can be divided into four categories: the coefficient of restraint of the opposite team, the coefficient of being restrained by the opposite team, the coefficient of matching of the opposite team and the coefficient of matching of the same team.

[0102] The purpose of the opposite team's restraint coefficient and the opposite team's restraint coefficient is to make the system recommend more characters that restrain the enemy and are not restrained by the enemy to the player;

[0103] The purpose of the opposite team matching coefficient is that when a certain character can be matched with multiple enemy characters, it should be recommended even if there is no cooperation with the same team to prevent being selected by the enemy.

[0104] The role of the team matching coefficient is to make the system recommend characters that are more compatible with friendly characters.

[0105] In this system, the opposite team restraint coefficient is set to 1.25, the opposite team being restrained coefficient is set to 0.8, the opposite team matching coefficient is set to 1.05, and the same team matching coefficient is set to 1.35.

[0106] The scores of each pre-recommended character node input will be affected by these four coefficients at the same time and will change to varying degrees.

[0107] Through S102, the embodiment of the present application can well recommend characters with close relevance to the player.

[0108] Furthermore, the step S103: based on the current player's historical character usage record, revising the second recommendation index of each candidate character to obtain a third recommendation index of each candidate character; specifically includes:

[0109] Based on the current player's historical character usage records, select the top P characters used by the current player in the most games;

[0110] Calculate the total number of times the current player's P characters are used;

[0111] Calculate the number of matches each of the current player's P characters has played;

[0112] Calculate the ratio Q of the number of games each character of the current player has played to the total number of games played by P characters;

[0113] Multiply the ratio Q by 2 to get the interest index of the corresponding character, which defaults to 1;

[0114] The interest index is multiplied by the second recommendation index of each corresponding alternative role to obtain a third recommendation index for each alternative role.

[0115] The above S103: The scores of the pre-recommended roles that incorporate the four correlation coefficients are finally integrated with the user interest vector to mine the user's interested roles. The user interest vector is a 1*109 dimensional vector, with different columns representing different roles. The system selects the top 15 roles of the current player's role, using the formula To calculate the matrix coefficients corresponding to the 15 characters. hero Represents the number of times the character is used, N sum Represents the total usage of 15 characters, and the matrix coefficients of the remaining characters default to 1. By introducing this module, the recommendation system can recommend characters that players are interested in, provided that the lineup is reasonable and highly correlated.

[0116] The system sorts all pre-recommended character nodes by their scores, extracts the character IDs from the top five pre-recommended character nodes, and generates a list of recommended characters. This list is then returned to the front-end. The front-end receives the top-5 character IDs, renders the corresponding character avatars, and displays them to the user.

[0117] Example 2

[0118] This embodiment provides a game character recommendation system;

[0119] The game's character recommendation system, applied to the server side, includes:

[0120] The response module is configured to: in response to the current player client selecting the i-th character to be formed into the lineup, calculate a first recommendation index for each candidate character based on the currently selected character in the lineup to be formed, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer;

[0121] The initial correction module is configured to: construct a knowledge graph of the role; construct a different-team association matrix and a same-team association matrix based on the knowledge graph of the role; and correct the first recommendation index of each candidate role based on the different-team association matrix and the same-team association matrix to obtain a second recommendation index for each candidate role;

[0122] A second correction module is configured to: correct the second recommendation index of each candidate character based on the historical character usage record of the current player to obtain a third recommendation index of each candidate character;

[0123] The output module is configured to sort the candidate roles in the recommendation list in descending order of the third recommendation index, and output the top N candidate roles as the final recommended roles to the client.

[0124] It should be noted that the response module, initial correction module, secondary correction module, and output module described above correspond to steps S101 to S104 in Example 1. The examples and application scenarios implemented by these modules and the corresponding steps are the same, but are not limited to the contents disclosed in Example 1. It should be noted that the above modules, as part of a system, can be executed in a computer system, such as a set of computer-executable instructions.

[0125] The descriptions of the various embodiments in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0126] The proposed system can be implemented in other ways. For example, the system embodiment described above is merely illustrative. For example, the above module division is only a logical function division. In actual implementation, other division methods may be used. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not implemented.

[0127] Example 3

[0128] This embodiment also provides an electronic device, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory, so that the electronic device executes the method described in the above embodiment one.

[0129] It should be understood that in this embodiment, the processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), off-the-shelf field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0130] The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0131] During implementation, each step of the above method may be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software.

[0132] The method in Example 1 can be directly implemented as being executed by a hardware processor, or by a combination of hardware and software modules within the processor. The software module can be located in a storage medium well-established in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not given here.

[0133] Those skilled in the art will appreciate that the units and algorithm steps of the various examples described in conjunction with this embodiment can be implemented using electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0134] Example 4

[0135] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is performed.

[0136] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for recommending a character in a game, characterized in that: Applied to the server side, including: In response to the current player client selecting the i-th character to be formed into a lineup, a first recommendation index for each candidate character is calculated based on the currently selected character in the lineup, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer; Specifically include: (1): Construct a root node; the attributes of the root node include: the currently selected character of the lineup to be formed, the currently selected character of the opponent player, and the turn information of the selected character; (2): Expand the child node or select the child node for the root node; (3): Access the child nodes expanded or selected in the previous step; When the jth child node is visited, assume that the character represented by the jth child node is the character pre-selected by the current player; For the remaining characters in the lineup to be formed, randomly select characters to set up to complete the lineup to be formed; For the remaining characters of the opposing player, randomly select characters to set up to complete the opposing player's lineup; (4): Input the completed lineup to be formed into the trained neural network and output the predicted score of the completed lineup to be formed; Input the completed lineup of players into the trained neural network and output the predicted score of the completed lineup of players; When the predicted score of the completed lineup is greater than the predicted score of the opposing player's lineup and greater than the set threshold, the feedback value of the current child node is increased by 1; otherwise, the feedback value of the current child node is 0; return (2); (5): After visiting M child nodes a set number of times, calculate the ratio of the feedback value of the current child node to the number of times the current child node has been visited, and use the ratio as the first recommendation index of the role corresponding to the current child node; Construct a knowledge graph of the role; based on the knowledge graph of the role, construct a different-team association matrix and a same-team association matrix; based on the different-team association matrix and the same-team association matrix, modify the first recommendation index of each candidate role to obtain the second recommendation index of each candidate role; Based on the current player's historical character usage records, the second recommendation index of each candidate character is modified to obtain the third recommendation index of each candidate character; The candidate roles are sorted in the recommendation list in descending order according to the third recommendation index, and the top N candidate roles are output to the client as the final recommended roles.

2. The game character recommendation method according to claim 1, wherein: Expand child nodes or select child nodes for the root node; specifically: Assuming that the number of all candidate roles is M, generate a random number, which is greater than 0 and less than 1; determine whether the random number is greater than 0.5; If the random number is less than 0.5, continue to determine whether the current root node has less than M child nodes. If less than M, expand a new child node for the root node and go to (3); if greater than or equal to M, select a child node; If the random number is greater than 0.5, a child node is selected; The selection process of selecting a child node includes: Use the Monte Carlo search tree algorithm's child node score calculation formula to calculate the scores of all child nodes under the current root node, select the child node with the highest score, and proceed to (3); Each child node represents an alternative role; different child nodes represent different alternative roles; where M is a positive integer; the initial feedback value of each child node is 0.

3. The game character recommendation method according to claim 1, wherein: Build a knowledge graph of the role; specifically including: Based on the restraint relationships, restrained relationships, same-team pairing relationships, and different-team pairing relationships between game characters, a knowledge graph of characters is constructed. Characters are used as nodes in the knowledge graph, and the relationships between characters are used as edges between nodes. Based on the knowledge graph of roles, we construct the different-team association matrix and the same-team association matrix. Specifically, we include: Based on the knowledge graph of characters, a heterogeneous team association matrix is constructed; the rows and columns of the heterogeneous team association matrix represent all characters in the current game; the elements of the heterogeneous team association matrix represent the relationship coefficients between the characters in the lineup to be formed and the characters in the opposing player's lineup; the relationship coefficients are the restraint coefficients between heterogeneous team characters, the restraint coefficients between heterogeneous team characters, or the matching coefficients between heterogeneous team characters; Based on the knowledge graph of the characters, a team association matrix is constructed; the rows and columns of the team association matrix represent all the characters in the current game; the element values of the team association matrix represent the matching coefficients between the alternative characters and the selected team characters.

4. The game character recommendation method according to claim 1, wherein: Based on the different-team correlation matrix and the same-team correlation matrix, the first recommendation index of each candidate role is modified to obtain the second recommendation index of each candidate role; specifically, the following steps are performed: The first recommendation index is multiplied by the coefficient of the selected character in the different-team association matrix or the same-team association matrix to obtain the second recommendation index of the current candidate character.

5. The game character recommendation method according to claim 1, wherein: Based on the current player's historical character usage records, the second recommendation index of each candidate character is modified to obtain the third recommendation index of each candidate character; specifically, the following steps are performed: Based on the current player's historical character usage records, select the top P characters used by the current player in the most games; Calculate the total number of times the current player's P characters are used; Calculate the number of matches each of the current player's P characters has played; Calculate the ratio Q of the number of games each character of the current player has played to the total number of games played by P characters; Multiply the ratio Q by 2 to get the interest index of the corresponding character, which defaults to 1; The interest index is multiplied by the second recommendation index of each corresponding alternative role to obtain a third recommendation index for each alternative role.

6. The game character recommendation method according to claim 1, wherein: The training process of the trained neural network includes: Constructing a training set; the training set includes positive samples and negative samples; using the lineup data of the winning team of several tens of thousands of games of several players before the current game as positive samples, and using the lineup data of several tens of thousands of character position conflicts in the current game as negative samples; Constructing a neural network; the neural network is a shallow neural network; the shallow neural network includes an input layer, a hidden layer, and an output layer connected in sequence; The training set is input into the shallow neural network for training to obtain the trained shallow neural network.

7. The game's character recommendation system is characterized by: Applied to the server side, including: The response module is configured to: in response to the current player client selecting the i-th character to be formed into the lineup, calculate the first recommendation index of each candidate character based on the currently selected character in the lineup to be formed, the currently selected character of the opposing player, the turn information of the selected character, and all candidate characters; i is a positive integer; specifically including: (1): Construct a root node; the attributes of the root node include: the currently selected character of the lineup to be formed, the currently selected character of the opponent player, and the turn information of the selected character; (2): Expand the child node or select the child node for the root node; (3): Access the child nodes expanded or selected in the previous step; When the jth child node is visited, assume that the character represented by the jth child node is the character pre-selected by the current player; For the remaining characters in the lineup to be formed, randomly select characters to set up to complete the lineup to be formed; For the remaining characters of the opposing player, randomly select characters to set up to complete the opposing player's lineup; (4): Input the completed lineup to be formed into the trained neural network and output the predicted score of the completed lineup to be formed; Input the completed lineup of players into the trained neural network and output the predicted score of the completed lineup of players; When the predicted score of the completed lineup is greater than the predicted score of the opposing player's lineup and greater than the set threshold, the feedback value of the current child node is increased by 1; otherwise, the feedback value of the current child node is 0; return (2); (5): After visiting M child nodes a set number of times, calculate the ratio of the feedback value of the current child node to the number of times the current child node has been visited, and use the ratio as the first recommendation index of the role corresponding to the current child node; The initial correction module is configured to: construct a knowledge graph of the role; construct a different-team association matrix and a same-team association matrix based on the knowledge graph of the role; and correct the first recommendation index of each candidate role based on the different-team association matrix and the same-team association matrix to obtain a second recommendation index for each candidate role; A second correction module is configured to: correct the second recommendation index of each candidate character based on the historical character usage record of the current player to obtain a third recommendation index of each candidate character; The output module is configured to sort the candidate roles in the recommendation list in descending order of the third recommendation index, and output the top N candidate roles as the final recommended roles to the client.

8. An electronic device, comprising: a memory for non-transitory storage of computer-readable instructions; as well as a processor for executing said computer-readable instructions, When the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 6 is executed.

9. A storage medium, characterized by non-transitory storage of computer-readable instructions, wherein: When the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1 to 6 are executed.