Virtual object recommendation method, device and electronic device

By using a pre-trained recommendation network model in the game, combining the attribute characteristics of virtual objects and player historical data, a more reasonable and diverse virtual object lineup is recommended, which solves the problem of unreasonable and lack of diversity in the existing technology and improves the game experience.

CN114681924BActive Publication Date: 2025-05-23NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210208284.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-05-23
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

In existing game technology, it is difficult to fully characterize the attribute characteristics of the object by virtual objects, resulting in the recommended lineup that may be unreasonable and affect the team's winning rate. In addition, the lineup recommendation methods of card collection games lack diversity, resulting in poor player experience.

Method used

By obtaining the encoding of the selected virtual object in the current team of the target game, input it to the pre-trained recommended network model, and output the initial recommended score of the alternative virtual object. The recommended network model includes an embedding layer for determining its recommended probability information in the current team based on the attribute characteristics of the virtual object. Combining the historical battle scenes and proficiency of the target account, the final virtual object recommendation is made.

Benefits of technology

It improves the diversity and rationality of virtual object recommendations, enhances the winning rate of team formation in the game, and thus improves the user's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114681924B_ABST
    Figure CN114681924B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for recommending virtual objects, which input the object code of the first virtual object selected in the current team of the target game match into a pre-trained recommendation network model, and output the initial recommendation score of the candidate virtual object; wherein the recommendation network model includes an embedding layer; according to the initial recommendation score, the historical battles of the target account and the proficiency of the target account for the candidate virtual object, the target virtual object is recommended to the target account from the candidate virtual objects. The embedding layer can determine the probability information of the candidate virtual object being recommended in the current team according to the attribute characteristics of the mapped virtual object, and determine the target virtual object that best matches the first virtual object according to the historical battles and familiarity of the target account for the virtual object, thereby improving the diversity and rationality of the current team, as well as the winning rate of the current team in the game, thereby improving the user's gaming experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a method, device and electronic equipment for recommending a virtual object. Background Art

[0002] Real-time recommendation of game lineups usually refers to the recommendation and matching of lineups in games that require matching lineups for battles, considering the cooperation of virtual objects in the same team, improving the rationality of the team, and enhancing the player's gaming experience. In multiplayer online tactical competitive games, it is reflected in recommending virtual objects for teammates and selecting a reasonable lineup; in card collection games, it is reflected in the selection and matching recommendations for decks. In related technologies, in multiplayer online tactical competitive games, each virtual object is marked with a label, and a reasonable lineup is usually recommended for the team based on the label and the player's proficiency in the hero; however, labels and proficiency are difficult to fully characterize the attribute characteristics of virtual objects, and the recommended lineup may be unreasonable, affecting the team's winning rate. In card collection games, a reasonable lineup is usually recommended for players based on a pre-set set of deck strategies. The lineup recommended in this way is relatively solidified, lacks diversity, and the player's gaming experience is not good. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a method, device and electronic device for recommending virtual objects, so as to improve the diversity and rationality of recommended objects, improve the winning rate of teams in games, and thus improve the user's gaming experience.

[0004] In a first aspect, an embodiment of the present invention provides a method for recommending a virtual object, the method comprising: obtaining a first virtual object selected in a current team of a target game match; wherein the first virtual objects include at least two; inputting an object code of the first virtual object into a pre-trained recommendation network model, and outputting an initial recommendation score of an alternative virtual object in the target game match; wherein the recommendation network model includes an embedding layer, the embedding layer being used to determine probability information of the alternative virtual object being recommended in the current team based on attribute characteristics of the first virtual object and attribute characteristics of the alternative virtual object; recommending a target virtual object to the target account from the alternative virtual objects according to the initial recommendation score of the alternative virtual object, the target account's historical battle counts, and the target account's proficiency in the alternative virtual object; wherein the target account is an account in the current team that has not selected a virtual object.

[0005] Furthermore, the step of inputting the object code of the first virtual object into a pre-trained recommendation network model to output an initial recommendation score of an alternative virtual object in a target game match includes: inputting the object code of the first virtual object into an embedding layer so that the embedding layer outputs a first feature vector of the alternative virtual object according to the attribute characteristics of the mapped virtual object; wherein the first feature vector of the alternative virtual object contains probability information of the alternative virtual object being recommended in the current team; inputting the first feature vector into a hidden layer of the pre-trained recommendation network model so that the hidden layer outputs a second feature vector of the alternative virtual object; and inputting the second feature vector into an activation function of the pre-trained recommendation network model so that the activation function outputs an initial recommendation score of the alternative virtual object.

[0006] Furthermore, the recommendation network model is trained in the following manner: obtaining a second virtual object included in a winning lineup from historical battle data of a target game, and randomly obtaining a first preset number of third virtual objects; wherein the second virtual object carries a first identifier for indicating that the second virtual object is a training positive sample, and the third virtual object carries a second identifier for indicating that the third virtual object is a training negative sample; based on the training positive samples and the training negative samples, the model parameters of the recommendation network model are updated so that the embedding layer learns the attribute characteristics of the second virtual object included in the winning lineup, thereby obtaining a trained recommendation network model.

[0007] Furthermore, the step of updating the model parameters of the recommendation network model according to the training positive samples and the training negative samples includes: inputting the training positive samples into the recommendation network model and calculating the first loss value of the training positive samples; inputting the training negative samples into the recommendation network model and calculating the second loss value of the training negative samples; and updating the model parameters of the recommendation network model through reverse gradient propagation based on the sum of the first loss value and the second loss value.

[0008] Furthermore, the step of inputting the training positive sample into the recommendation network model and calculating the first loss value of the training positive sample includes: inputting the object encoding of the first preset number of virtual objects in the second virtual object into the recommendation network model, and outputting the predicted virtual object; and calculating the first loss value of the predicted virtual object based on the predicted virtual object and the standard virtual objects in the second virtual object except the first preset number of virtual objects.

[0009] Furthermore, the step of inputting the training negative samples into the recommendation network model and calculating the second loss value of the training negative samples includes: inputting the object encoding of the third virtual object into the embedding layer of the recommendation network model to obtain the feature vector of the third virtual object; calculating the product value between the feature vectors of the third virtual object through a preset auxiliary branch, and determining the sum of the product values ​​as the second loss value.

[0010] Furthermore, the step of recommending a target virtual object to a target account from the candidate virtual objects based on an initial recommendation score of the candidate virtual object, the target account's historical battle count, and the target account's proficiency with respect to the candidate virtual objects includes: obtaining, from the historical battle count, a target battle count of the target account for each virtual object within a preset count or a preset time; and recommending a target virtual object to the target account based on the initial recommendation score, the target battle count, and the target account's proficiency with respect to the virtual object.

[0011] Furthermore, the step of recommending a target virtual object to a target account based on an initial recommendation score, a target number of battles, and the target account's proficiency with respect to the virtual object comprises: for each virtual object, performing a weighted calculation on the initial recommendation score of the virtual object according to the target number of battles and the proficiency of the target account with respect to the virtual object, to obtain a target recommendation score for the candidate virtual objects in the target game match; deleting virtual objects that the target account cannot select from the candidate virtual objects, to obtain a target recommendation score for the candidate virtual objects to be recommended to the target account; and recommending a target virtual object to the target account from the candidate virtual objects to be recommended based on the target recommendation score and a branch pre-specified by the target account.

[0012] Furthermore, after the step of recommending the target virtual object to the target account from the candidate virtual objects to be recommended according to the target recommendation score and the branch pre-specified by the target account, the method also includes: obtaining a fourth virtual object that meets preset conditions from the candidate virtual objects to be recommended, and determining the fourth virtual object as the target virtual object; wherein the preset conditions include: the target account's proficiency in the virtual object is lower than a first preset threshold, and the recommendation score of the virtual object is higher than a second preset threshold.

[0013] In a second aspect, an embodiment of the present invention provides a virtual object recommendation device, the device comprising: an acquisition module, used to acquire a first virtual object selected in a current team of a target game match; wherein the first virtual objects include at least two; an output module, used to input the object code of the first virtual object into a pre-trained recommendation network model, and output an initial recommendation score of an alternative virtual object in the target game match; wherein the recommendation network model includes an embedding layer, and the embedding layer is used to determine the probability information of the alternative virtual object being recommended in the current team based on the attribute characteristics of the first virtual object and the attribute characteristics of the alternative virtual object; a recommendation module, used to recommend a target virtual object to a target account from the alternative virtual objects according to the initial recommendation score of the alternative virtual object, the historical battle number of the target account, and the proficiency of the target account for the alternative virtual object; wherein the target account is an account in the current team that has not selected a virtual object.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the virtual object recommendation method of any one of the first aspects.

[0015] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the virtual object recommendation method of any one of the first aspects.

[0016] The embodiments of the present invention bring the following beneficial effects:

[0017] The present invention provides a method, device and electronic device for recommending virtual objects, which inputs the object code of the first virtual object selected in the current team of the target game match into a pre-trained recommendation network model, and outputs the initial recommendation score of the candidate virtual object in the target game match; wherein the recommendation network model includes an embedding layer; according to the initial recommendation score, the historical battles of the target account and the proficiency of the target account for the candidate virtual objects, the target virtual object is recommended to the target account from the candidate virtual objects. The embedding layer can determine the probability information of the candidate virtual object being recommended in the current team according to the attribute characteristics of the mapped virtual object, and determine the target virtual object that best matches the first virtual object according to the historical battles and familiarity of the target account for the virtual object, thereby improving the diversity and rationality of the current team, as well as the winning rate of the current team in the game, thereby improving the user's gaming experience.

[0018] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0019] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1A flowchart of a method for recommending a virtual object provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of the structure of a recommended network model in a virtual object recommendation method provided by an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of feature visualization of an embedding layer output in a virtual object recommendation method provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of a virtual object recommendation device provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0027] The advantage of developing AI in games is that a large amount of real data can be obtained, but the difficulty lies in the fact that the environment in games is often more complex than in reality. Therefore, the development of AI in games is a test and preview of the overall AI technology, which means that its ability to solve real problems is also improving simultaneously. The application of AI in games is not limited to the application of intelligent entities, or giving NPCs (Non-Player Characters) anthropomorphic effects. Usually AI is a computer-controlled unit that interacts with players and performs various simulated behaviors, so that real players can get a better sense of immersion.

[0028] Real-time game lineup recommendation usually refers to recommending and matching lineups in games that require lineups to fight, considering the cooperation of virtual objects in the same team, improving the rationality of the team, and enhancing the player's gaming experience. In multiplayer online tactical competitive games, it is reflected in recommending virtual objects for teammates and choosing a reasonable lineup; in card collection games, it is reflected in recommending the selection and matching of card decks.

[0029] In the related art, in multiplayer online tactical competitive games, each virtual object is marked with a label, and usually a reasonable lineup is recommended for the team based on the label and the player's proficiency in the hero; for example, five players need to play against five other players, which requires tacit cooperation between the players in the selection stage and related in-game restrictions such as the proficiency of the virtual object. Therefore, it is not realistic to directly recommend a complete lineup in the form of a strategy (or a label of a virtual object). There may be players who do not cooperate, or the players in the corresponding positions may not have the virtual objects recommended in the strategy or their own proficiency is not enough. Usually, the virtual objects recommended for team formation in multiplayer online tactical competitive games may include the following methods:

[0030] Simply consider special combinations, for example, if two virtual objects A and B have a very compatible skill connection, then when teammates choose A or B, directly recommend B or A. Or, simply consider the strength of the virtual object and make recommendations based on the win rate. Or, simply consider the proficiency of the virtual object and recommend the virtual object that the player has played a lot. Or, label the virtual object, such as professional labels such as "warrior", "assassin", "mage", output labels such as "physical", "magic", "durable", "burst", tankiness labels such as "crispy" and "meat shield". Finally, recommend the lineup based on the combination of strong labels. However, simply considering special combinations instead of the entire lineup may lead to position conflicts. For example, A is the middle lane, B is the jungler, and AB has a special combo. After A chooses, C has already chosen the jungle position. At this time, recommending B to other players will lead to a split-lane conflict, and its bad consequences are far greater than the advantages of an extra set of special combos. Simply considering the strength and win rate of virtual objects will first lead to a single lineup, and players will be superstitious about strong heroes, which violates the diversified design of multiplayer online tactical competitive games.

[0031] Secondly, a virtual object with a high win rate is not necessarily a hero that the corresponding player is familiar with, and a high win rate does not mean that the win rate can be improved after choosing it. Moreover, virtual objects with high win rates cannot necessarily be matched together. They may all be physical outputs, and the final lineup lacks magic output and is easily restrained by the opponent. Considering the proficiency of virtual objects alone, players always choose the virtual objects they are most familiar with, which is not much different from most players' free choice without recommendation. It is difficult for labels to cover all the characteristics of a virtual object. Many virtual objects in multiplayer online tactical competitive games have their own special mechanisms, and this unique mechanism cannot be directly expressed in the form of labels, so the recommended lineups based on comprehensive labels are often mediocre, and the recommended lineups may be unreasonable, affecting the team's win rate.

[0032] In card collection games, the main battle mode belongs to the single-player existing battle deck lineup recommendation, which focuses on recommending a complete set of decks in the form of strategies. Single players have the ability and motivation to assemble a completely consistent deck. If some non-core cards are missing, they can also replace them by themselves. Therefore, the existing lineup recommendation method for card battles is mainly the strategy of complete decks. However, the disadvantage of recommending complete decks with strategies is that the lineup is solidified. The strong decks of each version may be discovered and promoted by the strategy producer. In the end, everyone on the battlefield uses the same deck, which lacks diversity and is detrimental to the continuation of the game life. Secondly, in some card drawing games, the core deck often requires a high price to own. If the player lacks the corresponding core cards, the entire recommended deck has no use value. If non-core cards are missing, players still need to have a certain understanding of the game to fill in the deck for the missing lineup, and the player's gaming experience is not good.

[0033] Based on this, an embodiment of the present invention provides a method, device and electronic device for recommending virtual objects. The technology can be applied to a device with the function of selecting virtual objects to form a team for game play.

[0034] To facilitate understanding of this embodiment, a virtual object recommendation method disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method includes:

[0035] Step S102, obtaining the first virtual object selected in the current team of the target game; wherein the first virtual object includes at least two;

[0036] The target game can be a multiplayer online tactical competitive game, or a card collection game, or other competitive games. The target game match can include two teams playing against each other, or multiple teams playing against each other. For a multiplayer online tactical competitive game, the target game match usually includes two teams, and the current team includes five players, each of whom needs to select a virtual object for the target game match; for a card collection game, it usually includes more than two teams, and the current team includes one player, who needs to select a specified number of virtual objects for the target game match. The first virtual object includes two, three, or four, etc.

[0037] In actual implementation, when the current team needs to select five virtual objects, after the player selects two, three or four first virtual objects in the target game match, the target game backend will obtain the selected first virtual object according to the player's operation. In addition, before obtaining the first virtual object selected in the current team of the target game match, it is also necessary to encode the virtual objects included in the target game according to the preset encoding method. The preset encoding method can be one-hot encoding. For example, the target game includes 100 virtual objects, each virtual object has a corresponding number, and each number is mapped to the object code of the corresponding virtual object; for example, the number "1059" is mapped to the object number 1, and "1094" is mapped to the object number 2. If there are 100 virtual objects, the virtual objects are mapped to 1-1000.

[0038] Step S104, inputting the object code of the first virtual object into a pre-trained recommendation network model, and outputting an initial recommendation score of the candidate virtual object in the target game match; wherein the recommendation network model includes an embedding layer, and the embedding layer is used to determine the probability information of the candidate virtual object being recommended in the current team based on the attribute characteristics of the first virtual object and the attribute characteristics of the candidate virtual object;

[0039] The embedding layer in the pre-trained recommendation network model maps the attribute characteristics of virtual objects. When recommending virtual objects, it is only necessary to input the object code of the first virtual object into the embedding layer, and then the virtual object that best matches the first virtual object can be determined based on the mapped attribute characteristics of the first virtual object and the attribute characteristics of the candidate virtual objects. Specifically, the embedding layer outputs the feature vector of the candidate virtual object, which includes the probability information of the candidate virtual object being recommended in the current team; then the output of the embedding layer is input into the next network layer of the recommendation network model, and finally the initial recommendation score of the candidate virtual object is output. The higher the initial recommendation score, the higher the winning rate of the lineup after the virtual object is teamed up with the first virtual object.

[0040] For example, if the first recommended objects include two, the first three virtual objects with the highest initial recommendation scores of the candidate virtual objects are usually the most reasonable virtual objects to team up with the first virtual object. If the first recommended objects include three, the first two virtual objects with the highest initial recommendation scores of the candidate virtual objects are usually the most reasonable virtual objects to team up with the first virtual object. If the first recommended objects include four, the one virtual object with the highest initial recommendation score of the candidate virtual objects is usually the most reasonable virtual object to team up with the first virtual object.

[0041] The above-mentioned candidate virtual objects refer to virtual objects other than the first virtual object among all virtual objects included in the target game. The attribute characteristics of the virtual objects mapped in the above-mentioned embedding layer are obtained through the training of virtual objects of the winning lineup. Therefore, the attribute characteristics of the virtual objects mapped in the embedding layer include multiple attributes, such as the position attributes, skill attributes, growth attributes, physical attributes, health attributes, attributes of different equipment, etc. of the virtual objects. Since the attribute characteristics are mapped by the embedding layer through model training, the attribute characteristics specifically mapped by the embedding layer are difficult to observe intuitively, and are all mapped to the embedding layer. The attribute characteristics can be understood as embedding features, and the distance between embedding features in the same position will be close.

[0042] Step S106, recommending a target virtual object to the target account from the candidate virtual objects according to the initial recommendation score of the candidate virtual object, the target account's historical battles, and the target account's proficiency in the candidate virtual objects; wherein the target account is an account in the current team that has not selected a virtual object.

[0043] Since the above-mentioned initial recommendation scores are for all virtual objects in the target game except the first virtual object, the current team users may not be proficient in virtual objects with high initial recommendation scores, or may not have virtual objects with high initial recommendation scores. It is necessary to process the initial recommendation scores according to the actual situation of the current team users so that the target virtual objects can be recommended to the target account from the alternative virtual objects, so that the target virtual objects finally recommended to the target account can be selected by the target account, and at the same time make the formed lineup have the highest winning rate.

[0044] The above-mentioned historical battles refer to the number of battles in which the target account used each virtual object to participate in the historical battles. It can be the battles for each virtual object in the 100 historical battles, or it can be the battles for each virtual object in the historical preset time period. The above-mentioned proficiency is calculated by the target game based on the historical game and can be directly obtained from the backend of the target game. Specifically, the initial recommendation scores of the candidate virtual objects can be weighted according to the historical battles and proficiency to obtain the final recommendation scores of the candidate virtual objects. According to the final recommendation score, the virtual objects with higher scores are selected and recommended to the target account. If the target account includes multiple, since each target account has different historical battles and proficiency for virtual objects, the virtual objects recommended for different target accounts may be different.

[0045] In addition, if there are three accounts in the current team that have not selected virtual objects, after the target virtual objects are recommended to the three target accounts, target account A selects the target virtual object, while target account B and target account C do not select it, the above steps S102-S106 will continue to be executed to continue recommending target virtual objects to target account B and target account C.

[0046] The embodiment of the present invention provides a method for recommending virtual objects, which inputs the object code of the first virtual object selected in the current team of the target game match into a pre-trained recommendation network model, and outputs the initial recommendation score of the candidate virtual object in the target game match; wherein the recommendation network model includes an embedding layer; according to the initial recommendation score, the historical battles of the target account and the proficiency of the target account for the candidate virtual objects, the target virtual object is recommended to the target account from the candidate virtual objects. The embedding layer can determine the probability information of the candidate virtual object being recommended in the current team according to the attribute characteristics of the mapped virtual object, and determine the target virtual object that best matches the first virtual object according to the historical battles and familiarity of the target account for the virtual object, thereby improving the diversity and rationality of the current team, as well as the winning rate of the current team in the game, thereby improving the user's gaming experience.

[0047] like Figure 2 As shown, the recommendation network model includes an embedding layer (also called embeddinglayer), a hidden layer (also called hidden layer) and an activation function (also called relu) connected in sequence. The step of inputting the object encoding of the first virtual object into the pre-trained recommendation network model and outputting the initial recommendation score of the candidate virtual object in the target game match is a possible implementation method:

[0048] The object code of the first virtual object is input into the embedding layer, so that the embedding layer outputs a first feature vector of the candidate virtual object according to the attribute characteristics of the mapped virtual object; wherein the first feature vector of the candidate virtual object contains the probability information of the candidate virtual object being recommended in the current team; the first feature vector is input into the hidden layer of the pre-trained recommendation network model, so that the hidden layer outputs a second feature vector of the candidate virtual object; the second feature vector is input into the activation function of the pre-trained recommendation network model, so that the activation function outputs an initial recommendation score of the candidate virtual object.

[0049] The attribute features of the virtual objects mapped by the above embedding layer are learned during the training process based on the virtual objects in the winning lineup. Specifically, the position features of the virtual objects learned are to place virtual objects with similar features in close positions and virtual objects with different positions in far-separated positions. In fact, the position features of the virtual objects and the position features of the virtual objects in the game can be projected into the first eigenvector through principal component analysis, so that they can be displayed in the form of a plane diagram, such as Figure 3 As shown, taking the support as an example, the "soft support" is the one who mainly hides in the back and uses skills to add blood and resistance to teammates. Their positions are concentrated in the upper half, while the "hard support" is the one who stands in front of the team to take damage and relies on control skills to start a team fight. Their positions are concentrated in the lower half.

[0050] The hidden layer of the pre-trained recommendation network model is used to increase the network depth so that the network can learn more information. The recommendation network model may include a network layer consisting of multiple embedding layers and hidden layers, and is not limited to Figure 2 The network layer consists of an embedding layer and a hidden layer as shown in . The second eigenvector also contains the probability information of the candidate virtual object being recommended in the current team. Finally, the initial recommendation score of the candidate virtual object is calculated based on the second eigenvector according to the activation function. The activation function, as a nonlinear calculation, plays the role of activating specific neurons in the deep learning neural network.

[0051] For example, if a lineup lacks a support, it is not enough to simply select a support from the alternative virtual objects based on their attribute characteristics to increase the probability of it being recommended. The embedded layer will consider the attribute characteristics of the first virtual object. If the attribute characteristics of the first virtual object are low in health (also known as fragile) and there is no target for team fights, then a hard support will be recommended; if there is a tank in the top lane, control in the middle lane, and a strong shooter, then a soft support will tend to be recommended to increase the health and endurance of the first virtual object.

[0052] In addition, the embedding layer is usually set with the dimension of the current layer feature, which can be the dimension of (heropool size, embedsize). Usually, heropool size is the number of virtual objects in the target game. If the number of virtual objects in the target game is 100, then heropool size is 100; usually embed size can be set according to actual needs. If (heropool size, embed size) is (100, 20), the dimension of the first feature vector of each candidate virtual object is 100×20. The hidden layer is also usually set with the dimension of the current layer feature, which can be the dimension of (embed size, hidden size), where embed size can be set according to actual needs. If (embedsize, hidden size) is (20, 50), the dimension of the first feature vector of each candidate virtual object is 20×50.

[0053] In the above method, by using the attribute features of the virtual objects mapped by the embedding layer in the recommendation network model, it is possible to output the first feature vector containing the probability information of the candidate virtual object being recommended in the current team according to the object encoding of the input first virtual object, and then output the initial recommendation score of the candidate virtual object according to the hidden layer and the activation function. It avoids the cumbersome and unstable labeling stage that requires experts with a strong understanding of the game, saving labor costs; in addition, the attribute features of the virtual objects mapped by the embedding layer can better and more comprehensively characterize the characteristics of the virtual objects than the labels. It further improves the diversity and rationality of the current team, as well as the winning rate of the current team in the game.

[0054] The following describes how to train the recommendation network model, including:

[0055] Step 21, obtaining a second virtual object included in the winning lineup from the historical battle data of the target game, and randomly obtaining a first preset number of third virtual objects; wherein the second virtual object carries a first identifier for indicating that the second virtual object is a training positive sample, and the third virtual object carries a second identifier for indicating that the third virtual object is a training negative sample;

[0056] This embodiment is explained by taking the target game as a 5V5 battle game as an example. The game will match 10 players, divided into two lineups for virtual object selection, and then control the virtual object to play the game. In order to ensure the rationality of the lineup, the above historical battle data comes from the battle data of high-level ladder rankings. Players have a relatively high understanding of the lineup, and there are also fewer situations where multiple people compete for positions, which are more suitable for training data. Putting aside the player's own level and performance, in the case of having a large number of samples, the winning lineup can statistically represent a reasonable lineup, so the second virtual object included in the winning lineup is obtained as a training positive sample. It is difficult for the loser to directly characterize the unreasonableness of the lineup, so the third virtual object of the first preset number is randomly obtained as a training negative sample.

[0057] The first preset number needs to be set according to actual needs. For example, if the lineup requires five virtual objects, if two virtual objects have been selected for training and three virtual objects are recommended, the first preset number is 2; if three virtual objects have been selected for training and two virtual objects are recommended, the first preset number is 3; if four virtual objects have been selected for training and one virtual object is recommended, the first preset number is 4.

[0058] In order to enable the recommendation network model to identify whether the input object code is a training positive sample or a training negative sample, it is necessary to set a first identifier for each second virtual object in advance, such as the symbol "Y", and set a second identifier for each third virtual object, such as the symbol "N". A large number of training samples can be obtained through the above steps.

[0059] In addition, a specific implementation method of the above-mentioned step of randomly obtaining a first preset number of third virtual objects is as follows: statistically analyzing the probability of each virtual object participating in the battle in the historical battle data, and then probabilistically sampling the first preset number of times without replacement to construct a negative sample. While ensuring that the negative sample lineup is unreasonable, the model can also avoid over-recommending high-frequency heroes to a certain extent.

[0060] Step 22, based on the training positive samples and the training negative samples, the model parameters of the recommendation network model are updated so that the embedding layer learns the attribute characteristics of the second virtual object included in the winning lineup, and a trained recommendation network model is obtained.

[0061] Specifically, the object codes of two, three or four of the second virtual objects can be used as input, and the remaining three, two or one virtual object can be used as the recommended target virtual object to train the recommendation network model so that the recommendation network model can learn the attribute characteristics of each virtual object according to the virtual objects in the winning lineup. The model parameters of the recommendation network model are updated according to the training negative samples, that is, during the training process, the recommendation network model learns that such samples are not good, and such lineups should not be recommended, and the lineups should be avoided.

[0062] The above training positive samples come from real combat data. If virtual object A is very popular, then virtual object A will appear in various lineup combinations as training positive samples. Then the model will strengthen this dominance and will also like to over-recommend popular virtual objects in the recommendation. Therefore, the corresponding training negative samples are constructed according to probability, which is equivalent to making the recommendation network model learn that although virtual object A is very popular, it cannot be casually stuffed into any lineup. This is a balance between training positive and negative samples.

[0063] It should be noted that the above training process is similar to the Word2Vec model in natural language processing. Through a large number of sentence training, the training process is to select words to fill in the blanks. Finally, a large number of synonyms are found to fill in similar sentence gaps, and their embedding features will be pulled closer. Similarly, when a large number of jungle heroes are added to the lineup that lacks junglers, the embedding features of jungle heroes will also be pulled closer. If the teammates are all fragile at this time, and the high-end players in the training data will consciously fill in the tanks with thick blood and high armor, the model will learn to make up for the lineup deficiencies at this time, and will tend to give tank heroes higher recommendation scores, thereby constructing a reasonable lineup.

[0064] In the above method, training positive samples are constructed through winning lineups in historical battle data, and training negative samples are constructed in a random manner, and then the model parameters in the recommendation network model are trained, so that the recommendation network model can learn more comprehensive and reasonable attribute characteristics of virtual objects, and can better and more comprehensively characterize the characteristics of virtual objects than labels, thereby improving the rationality of the recommended virtual objects and the winning rate of the recommended lineups.

[0065] A possible implementation of step 22 is as follows:

[0066] Step 221, inputting the training positive sample into the recommendation network model, and calculating the first loss value of the training positive sample;

[0067] A possible implementation method is as follows: object encodings of a first preset number of virtual objects in the second virtual object are input into a recommendation network model, and a predicted virtual object is output; a first loss value of the predicted virtual object is calculated based on the predicted virtual object and standard virtual objects in the second virtual object except the first preset number of virtual objects.

[0068] The object codes of two, three or four virtual objects among the five second virtual objects in the winning lineup can be input into the recommendation network model to obtain the prediction scores of the candidate virtual objects, and the top three, two or one with the highest scores are used as the predicted virtual objects. Then, according to the cross entropy function, the predicted virtual object is calculated, and the cross entropy loss is calculated with the three, two or one standard virtual objects in the winning lineup other than those input into the recommendation network model to obtain the above-mentioned first loss value.

[0069] Step 222, inputting the training negative sample into the recommendation network model, and calculating the second loss value of the training negative sample;

[0070] A possible implementation method is: inputting the object encoding of the third virtual object into the embedding layer of the recommendation network model to obtain the feature vector of the third virtual object; calculating the product value between the feature vectors of the third virtual object through a preset auxiliary branch, and determining the sum of the product values ​​as the second loss value.

[0071] The above preset auxiliary branches only exist when training the recommendation network model. Specifically, when training positive samples, the number of second virtual objects input to the embedding layer is the same as the number of third virtual objects input to the embedding layer when training negative samples. However, when training negative samples, the feature vector of the third virtual object output by the embedding layer can directly calculate the product value between the feature vectors, and the sum of the product values ​​is determined as the second loss value. The purpose is to hope that the feature vectors between negative samples are orthogonal to each other, that is, the above product value is zero, thereby ensuring that the input third virtual object will not be recommended to a team lineup.

[0072] In addition, in order to make the model lightweight, auxiliary branches are deleted during the prediction process of the model to greatly improve the prediction speed while ensuring the real-time performance of online operation.

[0073] Step 223: Based on the sum of the first loss value and the second loss value, update the model parameters of the recommendation network model through reverse gradient propagation.

[0074] For example, if the product value between the feature vectors of the third virtual object is zero, it means that the embedding layer has learned that the third virtual object will not be recommended to the same team lineup. If the product value between the feature vectors of the third virtual object is not zero, the model parameters of the recommendation network model are trained and updated based on the sum of the first loss value and the second loss value. The training stops until the first loss value meets the first preset loss value and the second loss value also meets the second preset loss value.

[0075] In addition, the historical battle data includes multiple sets of winning lineups. The second virtual object in each winning lineup only needs to be iterated once. It is not necessary for the highest-scoring virtual object output by the model to be the label virtual object. Instead, after this iteration, the parameters have been back-propagated, and the highest-scoring virtual object output by the model will be closer to the label virtual object, and then the iteration of other lineups will begin. The iteration of all training data is considered an epoch. A complete training process generally includes many epochs, and each sample lineup is iterated only once in an epoch. In other words, the parameters of the entire model are gradually getting better and better with training.

[0076] In the above method, by calculating the first loss value of the training positive sample and the second loss value of the training negative sample at the same time, the model parameters in the recommendation network model are trained by the sum of the first loss value and the second loss value, so that the recommendation network model can not only learn more comprehensive and reasonable attribute characteristics of the virtual objects, but also avoid over-recommendation of popular and high-frequency virtual objects, thereby improving the rationality of the recommended virtual objects and the winning rate of the recommended lineup.

[0077] In addition, it should be noted that the trained recommendation network model needs to remove the auxiliary branches before being deployed to the online game application; specifically, the trained recommendation network model can be converted from the pth format (standard pytorch model) to the ONNX (Open Neural Network Exchange, an open file format designed for machine learning, used to store trained models) format, so that different artificial intelligence frameworks (such as Pytorch, MXNet) can use the same format to store model data and interact. In addition, the ONNX format recommendation network model was tested for prediction duration on an Intel(R) Core(TM) i5-10400 CPU@2.90GHz 2.90GHz CPU. The time for 10,000 predictions was reduced from 0.971s to 0.226s, which was 4 times faster, ensuring the real-time and stability of the recommendation network model on the CPU server.

[0078] Since the current team user may not be familiar with the virtual object with a high initial recommendation score, or may not have the virtual object with a high initial recommendation score, the initial recommendation score needs to be post-processed, including:

[0079] Step 31, obtaining a preset number of battles or a target number of battles for each virtual object by the target account within a preset time from the historical battles;

[0080] For example, the number of battles fought by the target account against each virtual object in the 100 historical battles, or the number of battles fought by the target account against each virtual object in the previous week.

[0081] Step 32, recommending a target virtual object to the target account based on the initial recommendation score, the target number of battles, and the target account's proficiency in the virtual object.

[0082] Specifically, the initial recommendation score can be further processed according to the target number of battles and the target account's proficiency in the virtual object, and finally the target virtual object can be recommended to the target account based on the processed recommendation score.

[0083] A possible implementation method is as follows: for each virtual object, a weighted calculation is performed on the initial recommendation score of the virtual object according to the target number of battles and proficiency of the target account for the virtual object to obtain a target recommendation score for the candidate virtual objects in the target game match; virtual objects that the target account cannot select from the candidate virtual objects are deleted to obtain a target recommendation score for the candidate virtual objects to be recommended for the target account; and a target virtual object is recommended to the target account from the candidate virtual objects to be recommended based on the target recommendation score and the branch pre-specified by the target account.

[0084] Specifically, the target number of battles and proficiency of the virtual object according to the target account can be normalized, and the target number of battles and proficiency of the virtual object after normalization can be multiplied by the initial recommendation score of the virtual object to obtain the target recommendation score of the virtual object. The target number of battles and proficiency of the target account for the virtual object can also be directly multiplied by the initial recommendation score of the virtual object to obtain the target recommendation score of the virtual object. For example, the initial recommendation score of virtual object M is 100, but the target number of battles and proficiency of the target account for the virtual object are 0 and 0, and the target recommendation score of the virtual object obtained after weighting is 0. If the initial recommendation score of virtual object N is 50, but the target number of battles and proficiency of the target account for the virtual object are 30 and 70%, the target recommendation score of the virtual object obtained after weighting will be higher than the previous 50, thereby increasing the probability of virtual object N being recommended.

[0085] Finally, first, determine the second preset number of intermediate virtual objects in descending order of the target recommendation scores; then, according to the branch pre-specified by the target account, remove the virtual objects that do not correspond to the pre-specified branch from the second preset number of intermediate virtual objects to obtain the final target virtual object. If the target account does not pre-specify the branch, the second preset number of intermediate virtual objects can be directly determined as the target virtual object, and the target virtual object can be recommended to the target account. The above second preset number can be set according to actual needs.

[0086] In the above method, the actual needs of the target account are fully considered. The target virtual object is recommended to the target account based on the virtual objects owned by the target account, pre-designated lanes, historical battles, and proficiency, etc., which improves the diversity and rationality of the recommended objects, as well as the winning rate of the team in the game, while improving the user's gaming experience.

[0087] In order to further improve the fun of the game and the user's gaming experience, considering the promotion of new virtual objects, one more virtual object can be provided to the target account. Specifically, the above method also includes: obtaining a fourth virtual object that meets the preset conditions from the candidate virtual objects to be recommended, and determining the fourth virtual object as the target virtual object; wherein the preset conditions include: the target account's proficiency in the virtual object is lower than a first preset threshold, and the recommendation score of the virtual object is higher than a second preset threshold.

[0088] That is, the fourth virtual object generally refers to a virtual object with a high initial recommendation score, a good fit with the first virtual object, and a high team winning rate, but the target account has a low proficiency in the fourth virtual object, and can also be a newly developed or newly launched virtual object, or a virtual object that the target account has not tried yet. The first preset threshold and the second preset threshold can be set according to actual needs.

[0089] For example, when the initial recommendation score of a virtual object is in the top 10, it means that it fits the lineup very well. At the same time, for the target account, its proficiency is very low and it is a type that has not been played much. The virtual object can be recommended in the fourth place. If the top 10 are all virtual objects that the target account is proficient in, the virtual object in the fourth place will not be recommended or will be recommended. In this way, considering the promotion of new virtual objects and prompting the target account to use new virtual objects, the target account can be provided with one more virtual object choice, which improves the fun of the game and the user's gaming experience.

[0090] In the above-mentioned method, comprehensive and effective post-processing can adapt to the requirements of different multiplayer online tactical competitive games or different battle modes, and has good portability. For games that select a fixed number of virtual objects for confrontation, after obtaining the historical battle data of the target account, the training and prediction process proposed in this embodiment can effectively recommend lineups. In card collection games, it can help players match reasonable and strong battle decks, and can also find replaceable cards when the strategy deck is incomplete. In multiplayer online tactical competitive games, it can be used as a decision-making reference during the selection of players for battle, ensuring the rationality of the lineup and branching. It is also friendly to computing resources, has high operating efficiency, and its portability can be guaranteed.

[0091] Corresponding to the above method embodiment, the present invention embodiment provides a virtual object recommendation device, such as Figure 4 As shown, the device comprises:

[0092] An acquisition module 41 is used to acquire a first virtual object selected in a current team of a target game match; wherein the first virtual objects include at least two;

[0093] The output module 42 is used to input the object code of the first virtual object into the pre-trained recommendation network model, and output the initial recommendation score of the candidate virtual object in the target game; wherein the recommendation network model includes an embedding layer, and the embedding layer is used to determine the probability information of the candidate virtual object being recommended in the current team based on the attribute characteristics of the first virtual object and the attribute characteristics of the candidate virtual object;

[0094] The recommendation module 43 is used to recommend a target virtual object to the target account from the candidate virtual objects according to the initial recommendation score of the candidate virtual object, the historical battles of the target account, and the proficiency of the target account in the candidate virtual objects; wherein the target account is an account in the current team that has not selected a virtual object.

[0095] The present invention provides a virtual object recommendation device, which inputs the object code of the first virtual object selected in the current team of the target game into a pre-trained recommendation network model, and outputs the initial recommendation score of the candidate virtual object; wherein the recommendation network model includes an embedding layer; according to the initial recommendation score, the historical battles of the target account and the proficiency of the target account for the candidate virtual object, the target virtual object is recommended to the target account from the candidate virtual objects. The embedding layer can determine the probability information of the candidate virtual object being recommended in the current team according to the attribute characteristics of the mapped virtual object, and determine the target virtual object that best matches the first virtual object according to the historical battles and familiarity of the target account for the virtual object, thereby improving the diversity and rationality of the current team, as well as the winning rate of the current team in the game, thereby improving the user's gaming experience.

[0096] Furthermore, the above-mentioned output module is also used to input the object code of the first virtual object into the embedding layer, so that the embedding layer outputs a first feature vector of the alternative virtual object according to the attribute characteristics of the mapped virtual object; wherein the first feature vector of the alternative virtual object contains probability information of the alternative virtual object being recommended in the current team; input the first feature vector into the hidden layer of the pre-trained recommendation network model, so that the hidden layer outputs a second feature vector of the alternative virtual object; input the second feature vector into the activation function of the pre-trained recommendation network model, so that the activation function outputs an initial recommendation score of the alternative virtual object.

[0097] Furthermore, the above-mentioned device also includes a training module, which is used to: obtain a second virtual object included in the winning lineup from the historical battle data of the target game, and randomly obtain a first preset number of third virtual objects; wherein the second virtual object carries a first identifier for indicating that the second virtual object is a training positive sample, and the third virtual object carries a second identifier for indicating that the third virtual object is a training negative sample; according to the training positive samples and the training negative samples, the model parameters of the recommendation network model are updated so that the embedding layer learns the attribute characteristics of the second virtual object included in the winning lineup, and a trained recommendation network model is obtained.

[0098] Furthermore, the above-mentioned training module is also used to: input the training positive sample into the recommendation network model, calculate the first loss value of the training positive sample; input the training negative sample into the recommendation network model, calculate the second loss value of the training negative sample; based on the sum of the first loss value and the second loss value, update the model parameters of the recommendation network model through reverse gradient propagation.

[0099] Furthermore, the above-mentioned training module is also used to: input the object encoding of the first preset number of virtual objects in the second virtual object into the recommendation network model, and output the predicted virtual object; calculate the first loss value of the predicted virtual object based on the predicted virtual object and the standard virtual objects in the second virtual object except the first preset number of virtual objects.

[0100] Furthermore, the above-mentioned training module is also used to: input the object encoding of the third virtual object into the embedding layer of the recommendation network model to obtain the feature vector of the third virtual object; calculate the product value between the feature vectors of the third virtual object through a preset auxiliary branch, and determine the sum of the product values ​​as the second loss value.

[0101] Furthermore, the above-mentioned recommendation module is also used to: obtain the target battles of the target account for each virtual object within a preset number of battles or a preset time from historical battles; and recommend the target virtual object to the target account based on the initial recommendation score, the target battles, and the proficiency of the target account for the virtual object.

[0102] Furthermore, the above-mentioned recommendation module is also used to: for each virtual object, perform a weighted calculation on the initial recommendation score of the virtual object according to the target number of battles and proficiency of the target account for the virtual object, and obtain the target recommendation score of the alternative virtual objects in the target game match; delete the virtual objects that the target account cannot select from the alternative virtual objects, and obtain the target recommendation score of the alternative virtual objects to be recommended for the target account; and recommend the target virtual object to the target account from the alternative virtual objects to be recommended based on the target recommendation score and the branch pre-specified by the target account.

[0103] Furthermore, the above-mentioned recommendation module is also used to: obtain a fourth virtual object that meets preset conditions from the candidate virtual objects to be recommended, and determine the fourth virtual object as the target virtual object; wherein the preset conditions include: the target account's proficiency in the virtual object is lower than a first preset threshold, and the recommendation score of the virtual object is higher than a second preset threshold.

[0104] The virtual object recommendation device provided in the embodiment of the present invention has the same technical features as the virtual object recommendation method provided in the above embodiment, and can therefore solve the same technical problems and achieve the same technical effects.

[0105] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the above virtual object recommendation method. The electronic device can be a server or a terminal device.

[0106] See also Figure 5 As shown, the electronic device includes a processor 100 and a memory 101 , wherein the memory 101 stores machine executable instructions that can be executed by the processor 100 , and the processor 100 executes the machine executable instructions to implement the above-mentioned virtual object recommendation method.

[0107] Further, Figure 5 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0108] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0109] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

[0110] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned virtual object recommendation method.

[0111] The computer program products of the virtual object recommendation method, device, electronic device and system provided in the embodiments of the present invention include a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0113] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0114] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0115] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0116] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A virtual object recommendation method, It is characterized in that The method comprises: Obtaining a first virtual object selected in a current team of a target game match; wherein the first virtual objects include at least two; Input the object code of the first virtual object into a pre-trained recommendation network model, and output the initial recommendation score of the candidate virtual object in the target game; wherein the recommendation network model includes an embedding layer, and the embedding layer is used to determine the probability information of the candidate virtual object being recommended in the current team based on the attribute characteristics of the first virtual object and the attribute characteristics of the candidate virtual object; the attribute characteristics of the virtual object mapped in the embedding layer are obtained by training the virtual objects of the winning lineup, and the attribute characteristics of the virtual object mapped in the embedding layer at least include the following: the position attribute, skill attribute, growth attribute, physical attribute, health attribute, and attributes of different equipment of the virtual object; According to the initial recommendation score of the candidate virtual object, the historical battle number of the target account, and the proficiency of the target account in the candidate virtual object, a target virtual object is recommended to the target account from the candidate virtual objects; wherein the target account is an account in the current team that has not selected a virtual object.

2. The method according to claim 1, It is characterized in that The step of inputting the object code of the first virtual object into a pre-trained recommendation network model and outputting an initial recommendation score of the candidate virtual object in the target game match includes: Inputting the object code of the first virtual object into the embedding layer, so that the embedding layer outputs a first feature vector of the candidate virtual object according to the mapped attribute characteristics of the virtual object; wherein the first feature vector of the candidate virtual object includes probability information of the candidate virtual object being recommended in the current team; Inputting the first feature vector into the hidden layer of the pre-trained recommendation network model, so that the hidden layer outputs the second feature vector of the candidate virtual object; The second feature vector is input into the activation function of the pre-trained recommendation network model, so that the activation function outputs an initial recommendation score of the candidate virtual object.

3. The method according to claim 1, It is characterized in that The recommendation network model is trained in the following way: From the historical battle data of the target game, obtain a second virtual object included in the winning lineup, and randomly obtain a first preset number of third virtual objects; wherein the second virtual object carries a first identifier for indicating that the second virtual object is a training positive sample, and the third virtual object carries a second identifier for indicating that the third virtual object is a training negative sample; According to the training positive samples and the training negative samples, the model parameters of the recommendation network model are updated so that the embedding layer learns the attribute characteristics of the second virtual object included in the winning lineup, thereby obtaining the trained recommendation network model.

4. The method according to claim 3, It is characterized in that The step of updating the model parameters of the recommendation network model according to the training positive samples and the training negative samples comprises: Inputting the training positive sample into the recommendation network model, and calculating a first loss value of the training positive sample; Inputting the training negative sample into the recommendation network model, and calculating a second loss value of the training negative sample; Based on the sum of the first loss value and the second loss value, the model parameters of the recommendation network model are updated through reverse gradient propagation.

5. The method according to claim 4, It is characterized in that The step of inputting the training positive sample into the recommendation network model and calculating the first loss value of the training positive sample comprises: Inputting object codes of a first preset number of virtual objects in the second virtual objects into the recommendation network model, and outputting predicted virtual objects; A first loss value of the predicted virtual object is calculated according to the predicted virtual object and standard virtual objects among the second virtual objects except the first preset number of virtual objects.

6. The method according to claim 4, It is characterized in that The step of inputting the training negative sample into the recommendation network model and calculating the second loss value of the training negative sample comprises: Input the object encoding of the third virtual object into the embedding layer of the recommendation network model to obtain a feature vector of the third virtual object; The product values ​​between the feature vectors of the third virtual object are calculated through a preset auxiliary branch, and the sum of the product values ​​is determined as the second loss value.

7. The method according to claim 1, It is characterized in that The step of recommending a target virtual object from the candidate virtual objects to the target account according to the initial recommendation score of the candidate virtual object, the historical battle number of the target account, and the proficiency of the target account for the candidate virtual object comprises: From the historical battles, obtaining a target battle number of the target account for each virtual object in a preset number of battles or within a preset time; A target virtual object is recommended to the target account according to the initial recommendation score, the target number of battles, and the target account's proficiency in the virtual object.

8. The method according to claim 7, It is characterized in that The step of recommending a target virtual object to the target account according to the initial recommendation score, the target number of battles, and the target account's proficiency with respect to the virtual object comprises: For each of the virtual objects, weighted calculation is performed on the initial recommendation score of the virtual object according to the target number of battles and proficiency of the target account for the virtual object, to obtain the target recommendation score of the candidate virtual object in the target game match; Deleting virtual objects that cannot be selected by the target account from the candidate virtual objects, and obtaining a target recommendation score of the candidate virtual objects to be recommended for the target account; According to the target recommendation score and the branch pre-specified by the target account, a target virtual object is recommended to the target account from the candidate virtual objects to be recommended.

9. The method according to claim 8, It is characterized in that After the step of recommending a target virtual object to the target account from the candidate virtual objects to be recommended according to the target recommendation score and the branch pre-specified by the target account, the method further includes: A fourth virtual object that meets preset conditions is obtained from the candidate virtual objects to be recommended, and the fourth virtual object is determined as the target virtual object; wherein the preset conditions include: the target account's proficiency in the virtual object is lower than a first preset threshold, and the recommendation score of the virtual object is higher than a second preset threshold.

10. A virtual object recommendation device, It is characterized in that The device comprises: An acquisition module, used to acquire a first virtual object selected in a current team of a target game match; wherein the first virtual objects include at least two; An output module is used to input the object code of the first virtual object into a pre-trained recommendation network model, and output an initial recommendation score of the candidate virtual object in the target game; wherein the recommendation network model includes an embedding layer, and the embedding layer is used to determine the probability information of the candidate virtual object being recommended in the current team based on the attribute characteristics of the first virtual object and the attribute characteristics of the candidate virtual object; the attribute characteristics of the virtual object mapped in the embedding layer are obtained by training the virtual objects of the winning lineup, and the attribute characteristics of the virtual object mapped in the embedding layer at least include the following: position attributes, skill attributes, growth attributes, physical attributes, health attributes, and attributes of different equipment of the virtual object; A recommendation module is used to recommend a target virtual object to the target account from the candidate virtual objects according to an initial recommendation score of the candidate virtual object, the target account's historical battles, and the target account's proficiency in the candidate virtual object; wherein the target account is an account in the current team that has not selected a virtual object.

11. An electronic device, It is characterized in that The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor executes the machine executable instructions to implement the virtual object recommendation method according to any one of claims 1 to 9.

12. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the virtual object recommendation method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Game role recommending method and device

    CN107866071A

  • Resource object recommendation method and device and data prediction model training method and device

    CN111369315A