CN116983624A - Recommendation method and device for game strategy, electronic equipment and storage medium - Google Patents
Recommendation method and device for game strategy, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116983624A CN116983624A CN202211097845.8A CN202211097845A CN116983624A CN 116983624 A CN116983624 A CN 116983624A CN 202211097845 A CN202211097845 A CN 202211097845A CN 116983624 A CN116983624 A CN 116983624A
- Authority
- CN
- China
- Prior art keywords
- information
- game
- strategy
- target
- behavior sequence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 230000006399 behavior Effects 0.000 claims description 172
- 238000011156 evaluation Methods 0.000 claims description 94
- 239000013598 vector Substances 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 24
- 238000012545 processing Methods 0.000 claims description 7
- 230000000694 effects Effects 0.000 claims description 6
- 238000012549 training Methods 0.000 claims description 6
- 230000004044 response Effects 0.000 claims description 5
- 230000001960 triggered effect Effects 0.000 claims description 5
- 238000013473 artificial intelligence Methods 0.000 abstract description 3
- 238000012546 transfer Methods 0.000 description 22
- 239000000463 material Substances 0.000 description 12
- 230000009182 swimming Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 5
- 238000005295 random walk Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000004083 survival effect Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 238000005070 sampling Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000006073 displacement reaction Methods 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 230000004927 fusion Effects 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 230000002194 synthesizing effect Effects 0.000 description 2
- 230000007704 transition Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000003058 natural language processing Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 230000001012 protector Effects 0.000 description 1
- 208000015041 syndromic microphthalmia 10 Diseases 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application provides a recommendation method and device for game strategies, electronic equipment and a computer-readable storage medium, and relates to the field of artificial intelligence and games. The method comprises the following steps: obtaining current game information of a target virtual character in a current game; determining at least one target reference pair information according to the matching degree of each reference pair information in the reference pair information set and the current pair information; obtaining a reference game strategy corresponding to each target reference game information; and recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information. The embodiment of the application realizes the great improvement of flexibility and can recommend the game strategy to the target virtual role more timely.
Description
Technical Field
The application relates to the technical field of artificial intelligence and games, in particular to a recommendation method, a recommendation device, an electronic device, a computer readable storage medium and a computer program product of a game strategy.
Background
With the rapid development of computer technology and internet technology, electronic games are becoming increasingly popular. In some game scenarios, an electronic device-controlled virtual character, otherwise known as an agent, may assist a player-controlled virtual character in the fight, e.g., the agent provides a game policy to the player-controlled virtual character.
The prior art scheme usually enumerates the states of virtual roles possibly involved manually, and performs policy pushing in a rule manner. For example, a rule: when the blood volume of the virtual character is lower than a preset percentage and the knapsack of the virtual character comprises a medicine bag, recommending a strategy to the virtual character, wherein the strategy is as follows: and (5) taking a medicine.
Rule-based schemes have the disadvantage that they rely heavily on manually formulated policies and the corresponding rules are combed, which results in a very long period from the generation of new policies to the online; and the disadvantage of constructing strategy points in this way to a rule-based scheme is that the strategy points are seriously dependent on manually formulating strategies and combing corresponding rules, which results in quite long period from the generation of new strategies to online; and the policy point is constructed in such a way that the policy point is inaccurate due to the fact that the state of the virtual character is not considered widely enough.
Disclosure of Invention
Embodiments of the present application provide a game policy recommendation method, apparatus, electronic device, computer readable storage medium, and computer program product, which can solve the above-mentioned problems of the prior art. The technical scheme is as follows:
according to an aspect of an embodiment of the present application, there is provided a recommendation method of a game policy, including:
obtaining current game information of a target virtual character in a current game;
determining at least one target reference pair information according to the matching degree of each reference pair information in the reference pair information set and the current pair information;
obtaining a reference game strategy corresponding to each target reference game information;
and recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information.
According to another aspect of the embodiment of the present application, there is provided a recommendation device for a game policy, the device including:
the game information acquisition module is used for acquiring current game information of the target virtual character in the current game;
the match module is used for determining at least one target reference match information according to the match degree of each piece of reference match information in the reference match information set and the current match information;
The reference strategy activity module is used for obtaining a reference game strategy corresponding to each target reference game information;
and the strategy recommendation module is used for recommending the game strategy to the target virtual roles based on the reference game strategy corresponding to each target reference game information.
As an alternative embodiment, for each of the current and reference pair information sets, the pair information includes virtual environment information, state information of a corresponding virtual character, and local behavior sequence information.
As an alternative embodiment, the office matching module includes:
the matching degree submodule is used for determining the matching degree of the current contrast information and a plurality of reference contrast information clusters, and the plurality of reference contrast information clusters are obtained by carrying out clustering processing on the reference contrast information sets;
the target reference opposite office module is used for taking the reference opposite office information in the reference opposite office information cluster with the highest matching degree as the target reference opposite office information.
As an alternative embodiment, the matching degree submodule includes:
the feature vector unit is used for respectively carrying out feature coding on the virtual environment information, the corresponding virtual character state information and the local behavior sequence information in the current game information, and obtaining the current feature vector of the current game information according to the feature coding results of the virtual environment information, the corresponding virtual character state information and the local behavior sequence information;
The distance determining unit is used for determining the distance between the current feature vector and the cluster center of each reference cluster, and taking the distance corresponding to each reference cluster as the matching degree corresponding to the reference cluster, wherein the smaller the distance is, the higher the matching degree is;
the reference pair information clusters are obtained by clustering reference feature vectors of each piece of reference pair information in the reference pair information set, and the reference feature vectors are obtained according to feature coding results obtained by respectively carrying out feature coding on virtual environment information, corresponding virtual character state information and local behavior sequence information in the reference pair information.
As an alternative embodiment, the feature encoding result of the local behavior sequence information is a word embedded representation of the local behavior sequence information;
the feature vector unit is specifically configured to:
determining a target type of the local behavior sequence information in the current game information, and embedding a word corresponding to the target type as a word embedded representation of the local behavior sequence information in the current game information;
the word embedding representation corresponding to the local behavior sequence information of each kind is obtained by referring to the local behavior sequence information training word embedding model of each kind in the office information set.
As an alternative embodiment, the policy recommendation module includes:
the evaluation index unit is used for acquiring the evaluation index of each reference game strategy corresponding to each target reference game information;
and the target strategy unit is used for determining a target game strategy according to the evaluation indexes of the reference game strategies, generating and providing recommendation information according to the target game strategy, wherein the recommendation information comprises execution suggestion information related to the target game strategy.
As an alternative embodiment, the target policy unit is configured to:
and providing the recommendation information in response to obtaining a strategy providing instruction, wherein the strategy providing instruction is triggered by voice or a preset game control.
As an alternative embodiment, the target game strategy includes at least one of:
at least one reference game strategy with highest evaluation index;
at least one reference game strategy with the lowest evaluation index;
a reference game strategy having an evaluation index higher than a first threshold;
a reference game strategy having an evaluation index below a second threshold.
As an alternative embodiment, the evaluation index of each of the reference game strategies is determined by:
Acquiring an evaluation index of each piece of reference game information in the reference game information set and a reference game strategy of each piece of reference game information;
for each reference game strategy, if the reference game strategy corresponds to one piece of reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy, and if the reference game strategy corresponds to at least two pieces of reference game information, determining the evaluation index of the reference game strategy according to the evaluation indexes of the at least two pieces of reference game information.
As an alternative embodiment, the reference game policy corresponding to the reference game information set and each reference game information in the reference game information game is obtained by:
acquiring global game information of a plurality of historical game games corresponding to at least one reference virtual character, wherein each global game information comprises a global behavior sequence of the reference virtual character in the historical game games;
determining a local behavior sequence meeting the triggering rule in the global behavior sequence of each piece of global game information according to a preset game strategy triggering rule, wherein the triggering rule comprises at least one triggering rule corresponding to a game strategy;
For each local behavior sequence meeting the triggering rule, determining target local game information corresponding to the target game strategy in global game information corresponding to the local behavior sequence according to the target game strategy corresponding to the triggering rule met by the local behavior sequence;
and taking each piece of determined target local game information as reference game information, and determining a target game strategy corresponding to the target local game information as a reference game strategy of the reference game information.
According to another aspect of an embodiment of the present application, there is provided an electronic device including a memory, a processor, and a computer program stored on the memory, the processor executing the computer program to implement the steps of the recommendation method of the above-described game policy.
According to still another aspect of the embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the recommendation method of game policies described above.
According to an aspect of an embodiment of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, performs the steps of the above-mentioned recommendation method of a game strategy.
The technical scheme provided by the embodiment of the application has the beneficial effects that:
the method comprises the steps of obtaining current game information of a target virtual character in a current game, not limiting the time for obtaining the current game information, namely meeting the requirement of obtaining the game information at any time in the game, determining at least one target reference game information matched with the current game information through the matching degree of each reference game information area in the pre-obtained reference game information set, further obtaining a reference game strategy corresponding to each target reference game information, recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information, and greatly improving flexibility and recommending the game strategy to the target virtual character more timely.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic diagram of an embodiment environment for implementation of the solution provided by an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for recommending game strategies according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of determining target reference pair information according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of a word embedding representation for obtaining local behavior sequence information of various kinds according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a game interface according to an embodiment of the present application;
FIG. 6 is a flowchart of providing recommendation information according to an embodiment of the present application;
FIG. 7 is a schematic flow chart of a method for constructing an information base according to an embodiment of the present application;
FIG. 8 is a flowchart of retrieving information base and providing game strategy by using current game information according to the embodiment of the present application;
fig. 9 is a schematic structural diagram of a recommendation device for game policy according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the drawings in the present application. It should be understood that the embodiments described below with reference to the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application, and the technical solutions of the embodiments of the present application are not limited.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and "comprising," when used in this specification, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, all of which may be included in the present specification. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates that at least one of the items defined by the term, e.g., "a and/or B" may be implemented as "a", or as "B", or as "a and B".
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
First, several terms related to the present application are described and explained:
1) Stage: the method refers to a stage in a game, different stages often have different characteristics, and specific division rules can be set according to actual application scenes.
2) Game strategy: through manual writing or automatic generation, after the intelligent target object is applied to the intelligent target object, the intelligent target object can execute corresponding operations, such as controlling a game role to move. Wherein the game policy may be in code form or other form.
3) The intelligent object: the artificial intelligence program participating in the game play can complete corresponding game tasks, such as man-machine fight tasks, game accompany and play tasks, automatic on-hook tasks and the like by controlling game elements in the game play.
4) Game element: broadly, elements of a game pair that may be controlled by a user or smart object include, but are not limited to, virtual characters and organizational units (e.g., buildings, resources, etc.) within the game pair.
5) Real-Time Strategy (RTS) game: one type of policy game, the RTS game, rather than being played in round, is played in real-time. Two or more parties participating in the RTS game continuously develop their own organization units by performing tactics, thereby acting together or against each other.
6) First-person shooter-based games (FPS), which are regarded as the name of a player, are shooting games with a subjective view of the player.
7) The virtual character may be regarded as a character of the player in game control. The avatar may be a virtual character, a virtual animal, a cartoon character, or the like. The virtual character is a three-dimensional model created based on an animated skeleton technique. Each virtual character has its own shape and volume in the virtual environment, occupying a portion of the space in the virtual environment.
Game play is one direction of application of artificial intelligence, in which virtual characters in a game pair may be suggested or controlled to perform corresponding operations by applying specific game strategies. In the scheme provided by the related art, the states of virtual roles possibly related are enumerated manually, and policy pushing is performed in a rule mode. The scheme provided by the related art mainly has the following two problems:
1. the writing workload of the game strategy is large, and because the game strategy is manually specified, a long time is required to be spent from writing the game strategy to online;
2. the prior rules are difficult to write, because the situations in game play are usually very many, the strategy selection by hard coding is very complicated, very complex rules and conditions need to be generated, many experience parameters need to be manually adjusted, and the final implementation effect usually cannot be expected, especially in RTS games and MOBA games with complex environments, if the game strategy is recommended according to the prior rules, the recommended game strategy has low precision.
The application provides a recommendation method, a recommendation device, an electronic device, a computer readable storage medium and a computer program product of a game strategy, and aims to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and technical effects produced by the technical solutions of the present application are described below by describing several exemplary embodiments. It should be noted that the following embodiments may be referred to, or combined with each other, and the description will not be repeated for the same terms, similar features, similar implementation steps, and the like in different embodiments.
FIG. 1 is a schematic diagram of an implementation environment for an embodiment of the present application. The implementation environment of the scheme can be realized as a computer system, such as an interface display system and a game application program system. The implementation environment of the scheme can comprise: a first terminal 110, a server 120, and a second terminal 130.
The first terminal 110 installs and runs an application supporting a virtual environment. The application may be a game-like application, as well as other applications capable of providing game functionality. For example, the game application in the first terminal device 110 is an FPS-type game application. The first terminal 110 is a terminal used by a first player, and the first player uses the first terminal 110 to control the first virtual character to play, for example, including at least one of lifting the level of the virtual prop, synthesizing a new virtual prop by using different virtual props, attacking by using the virtual props, and moving.
The first terminal 110 is connected to the server 120 through a wireless network or a wired network.
Server 120 includes at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. Illustratively, the server 120 includes a processor 121, a player account database 122, a combat service module 123, and a user-oriented Input/Output Interface (I/O Interface) 124. Wherein the processor 121 is configured to load instructions stored in the server 120, process data in the player account database 122 and the combat service module 123; the user account database 122 is used for storing data of user accounts used by the first terminal 110 and the second terminal 130, such as an avatar of the user account, a nickname of the user account, and a service area where the user account is located; the combat service module 123 is used for implementing combat using the virtual cards; the user-oriented I/O interface 124 is used to establish communication exchanges of data with the first terminal 110 via a wireless network or a wired network.
Optionally, the server 120 takes on primary computing work, and the first terminal 110 and the second terminal 130 take on secondary computing work; alternatively, the server 120 performs a secondary computing job, and the first terminal 110 and the second terminal 130 perform a primary computing job; alternatively, the server 120, the first terminal 110 and the second terminal 130 perform cooperative computing by using a distributed computing architecture.
The second terminal 130 installs and runs an application supporting a virtual environment. The application may be a game-like application, as well as other applications capable of providing game functionality. For example, the game application in the second terminal device 130 is an FPS-type game application. The second terminal 130 is a terminal used by a second player, and the second player controls the second virtual character to play a game using the second terminal 130. Including, for example, at least one of lifting the level of virtual props, synthesizing new virtual props using different virtual props, attacking using virtual props, moving.
Alternatively, the applications installed on the first terminal 110 and the second terminal 130 are the same, or the applications installed on the two terminals are the same type of application of different control system platforms. The first terminal 110 may refer broadly to one of a plurality of terminals, and the second terminal 130 may refer broadly to one of a plurality of terminals, the present embodiment being illustrated with only the first terminal 110 and the second terminal 130. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device types include: at least one of an AR device, VR device, smart wearable device, smart phone, tablet, e-book reader, MP3 player, MP4 player, laptop portable computer, and desktop computer. The following embodiments are illustrated with the terminal comprising a smart phone.
Those skilled in the art will recognize that the number of terminals may be greater or lesser. Such as the above-mentioned terminals may be only one, or the above-mentioned terminals may be several tens or hundreds, or more. The embodiment of the application does not limit the number of terminals and the equipment type. The embodiment of the application mainly uses the application scene of a single terminal for explanation.
In the following, a data transmission procedure between the terminal device 110 and the server 120 will be described by taking the target application as an example of the FPS game application.
The embodiment of the present application provides a recommendation method for a game policy, where the recommendation method in the embodiment of the present application may be executed by a terminal or may be executed by a server, and the embodiment of the present application is not limited in particular, as shown in fig. 2, and the method includes:
s101, obtaining current game play information of the target virtual character in the current game play.
The target virtual character in the embodiment of the application can be a virtual character controlled by a player or an intelligent object.
The current contrast information in the embodiment of the present application may refer to the contrast information at the current time, or may be contrast information including a plurality of times in the current period, and if the current contrast information includes the contrast information at the plurality of times, the current contrast information may be understood as a sequence formed by the contrast information at the plurality of times.
The game information, that is, various information in the game, generally, the game information is information that changes with the game, and may include, for example, a life state and a material state of a target virtual character, a life state and a material state of a virtual character that is the same as or different from the target virtual character, a behavior of the target virtual character, and the like, and the embodiment of the present application is not particularly limited. It should be understood that when the recommendation method of the embodiment of the present application is executed by the terminal, various information of part or all of the virtual characters in different camps from the target virtual character may not be obtained due to the game rule. When the recommendation method is executed by the server, the server can acquire control instructions output by all terminals in the game and feed back the control instructions, so that the server can obtain various information of all virtual roles in the game, namely the game information can be more comprehensive, and further a relatively more accurate game strategy can be obtained.
S102, determining at least one target reference pair information according to the matching degree of each reference pair information in the reference pair information set and the current pair information.
After the current contrast information is acquired, the embodiment of the application determines the matching degree between each piece of reference contrast information in the reference contrast information set and the current contrast information, and takes one or more pieces of reference contrast information with the highest or higher matching degree as target reference contrast information.
The reference game information in the embodiment of the application can be the game information of the player controlling the target virtual character in the historical game, and can also be the game information of other players in the historical game. In some embodiments, vector representation may be performed on the reference pair information in advance, which may improve efficiency of calculating the matching degree, or
According to the feature similarity of the vector representation of the current contrast information and the vector representation of each reference contrast information, the feature similarity is taken as the matching degree, the higher the feature similarity is, the higher the matching degree is, the feature similarity can be represented by cosine similarity, euclidean distance and the like, and the embodiment of the application is not particularly limited.
S103, obtaining a reference game strategy corresponding to each target reference game information.
The embodiment of the application can pre-determine the game strategy of each piece of reference game information, thereby determining the reference game strategy corresponding to the target reference game information after determining the target reference game information. The game policy of the embodiment of the application can be used for indicating the behavior of the virtual character at the next moment and also can be used for indicating the behavior of the virtual character at the next stage, and in order to reduce the fine granularity of the manual setting rule, the game policy of the embodiment of the application can be used for indicating the behavior of the virtual character at the next stage. The next phase of behavior, i.e. macroscopic, coarse-grained behavior. In the embodiment of the application, different reference game information can correspond to the same game strategy, namely one game strategy can correspond to at least one reference game information.
The game strategy of the embodiment of the application can comprise three types of transferring, fighting and acquiring materials. The transfer strategy may include regional transfer, swimming transfer, and carrier transfer, etc., wherein regional transfer is transferred from one region to another region in the virtual environment, and swimming transfer and carrier transfer are categorizations of the transfer mode. Combat strategies may include filling bullets, restoring life, shooting, withdrawing, etc.
S104, recommending the game strategy to the target virtual character based on the reference game strategy corresponding to the target reference game information.
After determining the reference game policy corresponding to each target reference game information, the embodiment of the application can recommend the game policy to the target virtual character based on the reference game policy, for example, one game policy can be randomly selected from the reference game policies corresponding to each target reference game information to recommend the target virtual character.
According to the recommendation method of the game strategy, the current game information of the target virtual character in the current game is obtained, the time for obtaining the current game information is not required to be limited, namely the game information is obtained at any time in the game, the matching degree of the current game information of each reference game information area in the reference game information set obtained in advance is used for determining at least one target reference game information matched with the current game information, the reference game strategy corresponding to each target reference game information is further obtained, the game strategy recommendation is carried out on the target virtual character based on the reference game strategy corresponding to each target reference game information, the flexibility is greatly improved, and the game strategy can be recommended to the target virtual character more timely.
On the basis of the above embodiments, as an alternative embodiment, each of the current game information and the reference game information set includes virtual environment information, state information of a corresponding virtual character, and local behavior sequence information.
The virtual environment information of the embodiment of the application is the information of game elements except the virtual roles in the game, and the basic information of the game process can be more accurately measured and the stage of the game can be more accurately understood by collecting the virtual environment information. The virtual environment information may include map information (e.g., potential range, movable range, non-movable range, etc. of each camp), game duration, material placement location, material placement situation, location of virtual vehicles, etc. The material throwing conditions of the embodiment of the application can comprise the number of materials which are thrown, the number of materials which are thrown but not collected by the virtual character, the number of materials which are not thrown and the like. The positions of the virtual vehicles may include the positions of the virtual vehicles being controlled by the virtual character, or the positions of the virtual vehicles that have not been controlled by the virtual character.
The status information of the virtual character according to the embodiment of the present application may include a life status of the virtual character, such as survival or defeat (i.e., a life value is not higher than a preset threshold, which may be 0), a material status, that is, a material held by the virtual character (such as a virtual blood bag, a virtual attack tool, a virtual protector, etc. for restoring the life status), a type and a position of a virtual carrier controlled by the virtual character, and so on. It should be appreciated that for current game information, the corresponding avatar includes the target avatar, and for reference game information, the avatar of the game includes the reference avatar.
Because the virtual environment information and the state of the virtual character reflect a short time, such as a time state, in order to enable the game information to reflect the game state of the virtual character more accurately, considering that the behavior sequence of the virtual character can strengthen the degree of distinction of different stages, the current game information of the embodiment of the application further comprises the corresponding local behavior sequence of the virtual character.
The local behavior sequence information is a sequence of behaviors of the virtual character in the entire game pair with respect to the global behavior sequence information, and the local behavior sequence information is a sequence of behaviors of the virtual character in one time window in the game pair accordingly. It should be understood that, for the local behavior sequence information in the current office information, the last time of the corresponding event window is the current time. For example, with respect to the current game play information obtained when the game play is performed to the 4 th minute 15 seconds, if the time window is set to 30 seconds, the local behavior sequence information included in the current game play information is a sequence of behavior composition of the target virtual character during the 3 rd minute 45 seconds to the 4 th minute 15 seconds.
On the basis of the foregoing embodiments, as an optional embodiment, determining at least one target reference pair information according to a matching degree of each reference pair information in the reference pair information set and the current pair information includes:
s201, determining the matching degree of the current contrast information and a plurality of reference contrast information clusters, wherein the plurality of reference contrast information clusters are obtained by carrying out clustering processing on the reference contrast information sets;
s202, taking the reference contrast information in the reference contrast information cluster with the highest matching degree as the target reference contrast information.
Referring to fig. 3, a flow chart of determining target reference pair information in the embodiment of the present application is exemplarily shown, where clustering is performed on each reference pair information in a reference pair information set, so that similar reference pair information is formed into a reference pair information cluster, when determining the matching degree between each reference pair information in the reference pair information set and the current pair information, only the matching degree between the current pair information and each reference pair information cluster can be calculated, and finally, the reference pair information in the reference pair information cluster with the highest matching degree is used as the target reference pair information, so that the data amount for calculating the matching degree is significantly reduced, and thus, the matching result can be obtained more quickly.
On the basis of the foregoing embodiments, as an optional embodiment, determining the matching degree of the current office information and the multiple reference office information clusters includes:
s301, respectively carrying out feature coding on virtual environment information, corresponding virtual character state information and local behavior sequence information in the current game information, and obtaining a current feature vector of the current game information according to feature coding results of the virtual environment information, the corresponding virtual character state information and the local behavior sequence information;
s302, determining the distance between the current feature vector and the cluster center of each reference cluster, and taking the distance corresponding to each reference cluster as the matching degree corresponding to the reference cluster, wherein the smaller the distance is, the higher the matching degree is.
In the embodiment of the application, when the matching degree of the current contrast information and the reference contrast information cluster is determined, the feature coding is needed to be carried out on each reference contrast information in the current contrast information and the reference contrast information cluster respectively, after the reference feature vector of the reference contrast information is obtained, the cluster center of the reference contrast information cluster can be obtained, in one embodiment, the cluster center of the reference contrast information cluster is the average value of all the reference feature vectors in the reference contrast information cluster, for example, one reference contrast information cluster comprises 4 reference feature vectors, wherein the reference feature vector 1 is expressed as (1, 1), the reference feature vector 2 is expressed as (2,2,1,1), the reference feature vector 3 is expressed as (1, 2), and the reference feature vector 4 is expressed as (2,2,2,1), and then the cluster center of the reference contrast information cluster can be expressed as (1.5,1.75,1.5,1.25). And obtaining the matching degree corresponding to the reference contrast information clusters by calculating the distance between the current feature vector of the current contrast information and the feature vector of the cluster center of each reference contrast information cluster. The embodiment of the application is not limited to a specific way of calculating the distance, and may be, for example, a Ming's distance, an Euclidean distance, a Mahalanobis distance, and the like.
In some embodiments, the similarity between the current feature vector and the feature vector at the cluster center may also be determined, and used as a reference to the matching degree corresponding to the office information cluster.
When the embodiment of the application obtains the feature vector of any one of the current game information and the reference game information, the virtual environment information, the corresponding virtual character state information and the local behavior sequence information are respectively subjected to feature coding, and then feature fusion is carried out based on three feature coding results to obtain the feature vector.
The embodiment of the application is not limited to a specific mode of feature fusion, for example, three feature vector results can be converted into the same dimension by using a plurality of layers of linear layers, and then the dimension is added, so that the feature vector of the office information can be obtained. For example, the three feature encoding results may be converted into the high-order feature expression, then the commonality of the three feature encoding results in the high-dimensional space is obtained, and then the commonality of the three feature encoding results in the high-dimensional space is connected or summed, and the feature vector of the office information may also be obtained.
It should be noted that, since the virtual environment information, the state information of the corresponding virtual character, and the data type of the local behavior sequence information are different and various, when vectorization is performed, if the distribution of the data dimension can be ensured not to be too dispersed as much as possible, the complexity of the subsequent matching can be obviously reduced. Considering the virtual environment information and the state information of the virtual character can be understood as description of the state, therefore, the embodiment of the application can adopt One-Hot coding on the virtual environment information and the state information of the virtual character, and the One-Hot coding is the representation of the classification variable as a binary vector. First, it is required to map the classification value to an integer value. Each integer value is then represented as a binary vector, which is zero except for the index of the integer, which is labeled 1.
In one embodiment, for any one of virtual environment information and virtual character status information, the number of categories N of the information, then the information of each category is integer encoded: type 1:0, type 2:1, type 3:2, …, type N: n-1. The sizes of the integer codes of all N categories are arranged from front to back, so that for any category of virtual environment information or virtual role information, a corresponding coding result can be obtained according to the codes of the category.
For example, with virtual environment information: for example, if the game duration is set to be 3 types, namely 0-5 minutes, 5-10 minutes and more than 10 minutes, the types to be encoded are determined to be three types, namely: the "0-5 minutes", "5-10 minutes" and "10 minutes or more" are given an integer code of 0 for the "0-5 minutes" category, an integer code of 1 for the "5-10 minutes" category, and an integer code of 2 for the "10 minutes or more" category, and if the game duration in a certain pair of game information is 6 minutes, the result of the code is [0,1,0] because it belongs to the second category.
It should be noted that, in practical application, by performing One-Hot encoding on the virtual environment information and the state information of the corresponding virtual character, although there may be differences in feature encoding results of different types of information, dimension unification of the feature encoding results may be achieved by unifying to the maximum dimension.
Considering that the behavior of the virtual character can obviously strengthen the distinction of different stages of the game, the feature coding result of the optimized behavior sequence is a key link for understanding the game state. The feature coding result of the local behavior sequence information in the embodiment of the application is word embedded representation of the local behavior sequence information. In advanced tasks of natural language processing, a method using machine learning requires converting words into mathematical representations, and then performing computation with the mathematical representations to complete the task at the semantic level. The embodiment of the application completes the processing of the local behavior sequence of the virtual character by using word embedding, which is a key technology of the application. In one embodiment, feature encoding the local behavior sequence information in the current game information includes:
Determining a target type of the local behavior sequence information in the current game information, and embedding a word corresponding to the target type as a word embedded representation of the local behavior sequence information in the current game information;
the word embedding representation corresponding to the local behavior sequence information of each kind is obtained by referring to the local behavior sequence information training word embedding model of each kind in the office information set.
After the reference pair information set is obtained, the local behavior sequence information of each reference pair information can be classified, wherein the classification of the local behavior sequence information can be as follows: if the two local behavior sequence information are different, the two types of local behavior information are considered. After obtaining each type of reference contrast information, a word embedding model can be trained, word embedding representations of each type of reference contrast information output by the word embedding model are obtained, when feature encoding is carried out on the local behavior sequence information of the current contrast information, the target type of the local behavior sequence information in the current contrast information is firstly determined, and word embedding representations corresponding to the target type are searched to be used as word embedding representations of the local behavior sequence information in the current contrast information. Because the process of obtaining the word embedding representation corresponding to the local behavior sequence information of each kind can be completed in advance, the efficiency of obtaining the word embedding representation of the local behavior sequence information in the current office information is greatly improved.
Referring to fig. 4, a flowchart of a word embedding representation of obtaining local behavior sequence information of each kind in the embodiment of the present application is shown schematically, and as shown in the figure, first, the embodiment of the present application may obtain local behavior sequence information of a reference virtual character in a massive game pair, and may filter the obtained local behavior sequence information based on a preset filtering rule, for example, delete the local behavior sequence information containing less than a preset number of behaviors, where (a) in fig. 4 shows local behavior sequence information of multiple virtual characters, it should be understood that time windows corresponding to all the local behavior sequence information are consistent, but the number of behaviors contained in different local behavior sequence information may be different, for example, the number of 3 local behavior sequence information shown in (a) is different, and it should be understood that a to F in (a) respectively represent different behaviors.
In fig. 4, (b) shows that the behaviors appearing in the local behavior sequence information of each reference virtual character are mined for association relation to obtain an association relation graph, specifically, when the number of times that two consecutively occurring behaviors appear in each local behavior sequence information is greater than a preset number of times threshold, it is determined that the two consecutively occurring behaviors have association relation, based on this logic, the behaviors having association relation can be connected in pairs, and directional information can be added at the time of connection, for example, if the number of times that the case where the behavior 2 is executed immediately after the behavior 1 appears in the local behavior sequence information is greater than the preset number of times threshold, two nodes exist in the association relation graph, wherein the node 1 and the node 2 represent the behavior 1 and the behavior 2, respectively, and a line from the node 1 to the node 2 exists between the node 1 and the node 2.
After the association diagram is obtained, as shown in (c) in fig. 4, a starting point is randomly selected by adopting a random walk mode, and a plurality of local behavior sequence information is regenerated, wherein the number, the length and the like of random walk sampling belong to super parameters, and the random walk sampling is required to be adjusted according to actual conditions. According to the embodiment of the application, the random walk mode is used for sampling the association relation graph to obtain the co-occurrence relation of the nodes in the association relation graph, and the regenerated local behavior sequence information can be used as a training sample to be transmitted to a model (such as word2vec and item2vec waiting) for training, so that a word embedding vector, namely the empedding is obtained.
As shown in fig. 4 (d), by inputting the regenerated local behavior sequence information generated by the random walks into the word embedding model of (d), a word embedded representation corresponding to each regenerated local behavior sequence information is generated. It should be understood that when the feature encoding result of the local behavior sequence information in the current counterpart information is acquired, the corresponding local behavior sequence information may be determined from the regenerated local behavior sequence information obtained according to (c) in fig. 4, and then the word of the local behavior sequence information is embedded in the feature encoding result representing the local behavior sequence information as the current counterpart information.
Through verification of practical application, the feature codes which can sufficiently cover the local behavior sequence information generated in almost all scenes can be obtained by acquiring the local behavior sequence information (the time window size is 30 seconds) in about ten thousand game pairs.
On the basis of the foregoing embodiments, as an optional embodiment, performing game policy recommendation to the target virtual character based on a reference game policy corresponding to each target reference game pair information, including:
s401, acquiring evaluation indexes of each reference game strategy corresponding to each target reference game information;
s402, determining a target game strategy according to the evaluation indexes of the reference game strategies, and generating and providing recommendation information according to the target game strategy, wherein the recommendation information comprises execution suggestion information related to the target game strategy.
According to the embodiment of the application, the evaluation index of each reference game strategy corresponding to the target reference game information can be determined according to the evaluation index of the game in which the target reference game information is located, generally, after the game is played, the system feeds back each evaluation index of the game, such as survival time, single game ranking, killing number, MVP (Multi-video language) or the like, to the player, so that the score of the game can be obtained according to each evaluation index of the game, and the higher the score is, the better the performance in the game is, and accordingly, the evaluation index of the reference game information in the single game can be used. Since one reference game piece information may appear in a plurality of game pieces, the evaluation index of the reference game piece information can be obtained based on the evaluation indexes of the reference game piece information in all the game pieces that appear.
It will be appreciated that a reference game strategy corresponding to one local behavior sequence information is generally unique, but a plurality of local behavior sequence information may correspond to the same reference game strategy, so for a reference game strategy, if the reference game strategy corresponds to one reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy.
If the reference game policy corresponds to at least two pieces of reference game information, determining an evaluation index of the reference game policy according to the evaluation indexes of the at least two pieces of reference game information, and in one embodiment, a mean value of the evaluation indexes of the at least two pieces of reference game information may be used as the evaluation index of the reference game policy. In another embodiment, the evaluation indexes of the at least two reference game pieces may be weighted and summed, and the result of the weighted and summed is used as the evaluation index of the reference game strategy. The embodiment of the application does not limit the weight of the reference game information, for example, the number of occurrences of the local behavior sequence information in the reference game information set, or the number of occurrences in the history game information can be determined, and the higher the number of occurrences is, the higher the weight is.
In one embodiment, the embodiment of the present application may use the reference game policy with the highest evaluation index as the target game policy, and the corresponding recommended information includes execution advice information for instructing the player to execute the target game policy, for example, "pinch the game, advice to withdraw first, where the withdrawal rate is 90%", and in another embodiment, the embodiment of the present application may further use the reference game policy with the lowest evaluation index as the target game policy, and the corresponding recommended information includes execution advice information for instructing the player not to execute the target game policy. For example, "according to analysis, withdrawal is not currently recommended, and the withdrawal rate is 20%". The target game strategy indicated in the two recommended information examples is "retired" and the winning rate of executing the strategy is further provided to help the player make decisions as soon as possible.
On the basis of the above embodiments, as an alternative embodiment, providing recommendation information includes:
and providing the recommendation information in response to obtaining a strategy providing instruction, wherein the strategy providing instruction is triggered by voice or a preset game control.
Referring to fig. 5, a schematic diagram of a game interface according to an embodiment of the present application is shown in an exemplary manner, as shown in fig. 5 (a), where the game interface includes a target virtual character 501 controlled by a player, a virtual environment 502 where the target virtual character 501 is located, an attack control 503, a displacement control 504, and a voice control 505, where the player can control the target virtual character 501 to move in the virtual environment 502 by performing a preset operation on the displacement control 504, and can control the target virtual character 501 to attack a target 507 in the virtual environment 502 by using a virtual prop 506 by performing a preset operation on the attack control 503. When the player triggers a preset operation on the voice control 505, the terminal receives a voice command of the player, where the voice command may be a command for indicating to acquire a policy, i.e. a policy providing command, such as "present main", "present go", etc., and the terminal obtains and displays the recommendation information. It should be understood that in the embodiment of the application, the server can generate the recommendation information and return the recommendation information to the terminal, and the terminal can also generate the recommendation information by itself. Further shown in fig. 5 (b) are an auxiliary robot 508 and recommendation information 509, and it should be noted that the auxiliary robot is a virtual character for assisting a target virtual character in a game, and is mainly used for recommending a game policy to the target virtual character, and the auxiliary robot may appear around the target virtual character at the beginning of a game or may appear around the target virtual character at a specific trigger time (for example, when determining to recommend the game policy to the target virtual character), and the auxiliary robot in the embodiment of the present application appears for the latter, that is, when determining to recommend the game policy to the target virtual character, and disappears after a preset time period after completing the recommendation. The target game strategy corresponding to the recommended information provided by the auxiliary robot can be the reference game strategy with the highest evaluation index or the reference game strategy with the lowest evaluation index, the recommended information in the drawing is positive, but not negative, and the target game strategy corresponding to the recommended information can be known to belong to the reference game strategy with the highest evaluation index.
In addition to the above operations based on the player, the embodiments of the present application may provide the recommendation information by passive triggering, or may provide the recommendation information by active triggering. Specifically, the embodiment of the application can provide recommendation information when the obtained evaluation index of the reference game strategy exceeds or is lower than a preset threshold value.
As an alternative embodiment, the target game strategy of the embodiment of the present application includes at least one of the following:
a reference game strategy having an evaluation index higher than a first threshold;
a reference game strategy having an evaluation index below a second threshold.
By setting the two thresholds, the embodiment of the application realizes that the recommended information is provided for the player only when the reference game strategy higher than the first threshold or lower than the second threshold appears, namely, the embodiment of the application can realize the frequency when the recommended information is actively provided by controlling the sizes of the two thresholds.
In one embodiment, the time interval for providing the recommended information for two adjacent times can be counted, if the time interval is larger than the preset interval threshold, the first threshold can be adjusted smaller and/or the second threshold can be adjusted larger, and if the time interval is smaller than the preset interval threshold, the first threshold can be adjusted larger and/or the second threshold can be adjusted smaller, so that the frequency for providing the recommended information is controlled in a reasonable range, and the discomfort of players caused by too frequent or rare recommendation is avoided.
It should be noted that, in response to obtaining the policy providing instruction, when providing the recommendation information, the target game policy corresponding to the recommendation instruction may also be a reference game policy with an evaluation index higher than the first threshold value and/or a reference game policy with an evaluation index lower than the second threshold value.
Based on the above embodiments, a recommendation switch may be further added to the game interface, where when the recommendation switch is in an on state, it indicates that the player wishes to actively provide recommendation information, and when the recommendation switch is in an off state, the recommendation information is provided when the player triggers a voice or a preset game control.
On the basis of the above embodiments, as an alternative embodiment, in order to ensure diversity of recommendation information, the composition of recommendation information in the embodiment of the present application includes a beginning phrase, a target game policy, and a recommendation reason, for example, for a forward target game policy, the recommendation information is shown in table 1.
Table 1 a table of combinations of recommended information according to an embodiment of the present application
As can be seen from Table 1, the application provides a plurality of speaking templates for three key components in the recommendation information, so that the speaking templates can be randomly selected from the three components when the recommendation information is provided, and the three components are combined into texts in natural language form, thereby improving the diversity of recommendation strategies.
Based on the above embodiments, in order to avoid providing repeated probability values to trigger a player scenario, embodiments of the present application may further add information related to the winning rate in the cause, and map the winning rate to natural language for expression, see table 2.
TABLE 2 mapping relationship table of probability and natural language according to the embodiment of the application
Referring to fig. 6, a flowchart of providing recommendation information according to an embodiment of the present application is shown, and the flowchart includes:
s501, setting a first threshold and a second threshold, wherein the first threshold is higher than the second threshold, and creating a first talent template of each reference game strategy, a second talent template of each beginning phrase and a third talent template of each recommendation reason;
s502, for each target, referring to the reference game strategy corresponding to the game information, determining the reference game strategy with the highest evaluation index and the reference game strategy with the lowest evaluation index in each reference game strategy;
s503, determining a target game strategy according to the lowest evaluation index of the reference game strategy;
s504, randomly selecting a first target conversation template from first conversation templates of a target game strategy, randomly selecting a second target conversation template from each second conversation template, and randomly selecting a third target conversation template from each third conversation template;
S505, according to the first target voice template, the second target voice template and the third target voice template, the recommendation information of the natural language text is constructed.
On the basis of the above embodiments, as an alternative embodiment, the evaluation index of each of the reference game strategies is determined by:
s601, acquiring an evaluation index of each piece of reference game information in the reference game information set and a reference game strategy of each piece of reference game information;
s602, for each reference game strategy, if the reference game strategy corresponds to one piece of reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy, and if the reference game strategy corresponds to at least two pieces of reference game information, determining the evaluation index of the reference game strategy according to the evaluation indexes of the at least two pieces of reference game information.
It should be noted that, since the reference game information is determined from the completed game, the behavior performed after the period corresponding to each reference game information is also determined, and at the same time, each evaluation index of the game in which the reference game information is located is also determined, and therefore, the evaluation index of each reference game information and the reference game strategy. But different reference game play information may correspond to the same reference game strategy, e.g., a virtual character may choose to withdraw when the mission value is low or withdraw when more enemies are seen. The embodiment of the application considers two cases for each reference game strategy:
And if the reference game strategy corresponds to one piece of reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy.
And if the reference game strategy corresponds to at least two pieces of reference game information, determining an evaluation index of the reference game strategy according to the evaluation indexes of the at least two pieces of reference game information. Specifically, an average value of the evaluation indexes of at least two reference game information may be used as the evaluation index of the reference game strategy.
On the basis of the above embodiments, as an alternative embodiment, the reference game policy corresponding to the reference game information set and each reference game information in the reference game information office is obtained by the following method, including the following steps S701 to S704:
s701, acquiring global game information of a plurality of historical game games corresponding to at least one reference virtual character, wherein each global game information comprises a global behavior sequence of the reference virtual character in the historical game games;
s702, determining a local behavior sequence meeting the triggering rule in the global behavior sequence of each piece of global game information according to a preset game strategy triggering rule, wherein the triggering rule comprises at least one triggering rule corresponding to the game strategy;
S703, for each local behavior sequence meeting the triggering rule, determining target local game information corresponding to the target game strategy in global game information corresponding to the local behavior sequence according to the target game strategy corresponding to the triggering rule met by the local behavior sequence;
s704, taking each piece of determined target local game information as reference game information, and determining a target game strategy corresponding to the target local game information as a reference game strategy of the reference game information.
According to the embodiment of the application, a plurality of reference virtual roles are needed to be determined, and the virtual roles controlled by each player can be classified according to the levels of the players because the levels of different players are different, and the virtual roles in the same class have the same or similar levels. It will be appreciated that there are many ways to evaluate player levels, and most games will determine the player's segment based on player level, so that virtual characters can be categorized based on the same or similar segments.
Accordingly, the reference virtual character corresponding to the target virtual character may be a virtual character having the same player level as the target virtual character, or may be a virtual character having a higher player level than the target virtual character or having the highest level of player control. When the virtual character with the highest level of player control is selected, the game strategy that is subsequently recommended to the player will have a higher guiding significance with a higher probability of helping the player to win.
The global behavior sequence of the embodiment of the present application refers to a sequence of all behaviors from the start of generating behaviors to the end of a game or when a character is defeated. It will be appreciated that, in addition to the global behavior sequence, the global game information may also include global virtual environment information, i.e. virtual environment information from the start to the end of the game, and status information of the virtual characters, i.e. status information of one virtual character from the start to the end of the game.
The embodiment of the application can determine the local behavior sequence of the trigger rule for the global behavior sequence according to the preset game measurement trigger rule. The game strategy triggering rule of the embodiment of the application comprises triggering time and triggering conditions, wherein the triggering time is the starting time of the behavior sequence triggering the game strategy, and the triggering conditions are the conditions met by the behavior sequence triggering the game strategy.
The game strategy of the embodiment of the application can comprise three types of transferring, fighting and acquiring materials. The transfer strategy may include regional transfer, swimming transfer, and carrier transfer, etc., wherein regional transfer is transferred from one region to another region in the virtual environment, and swimming transfer and carrier transfer are categorizations of the transfer mode. Combat strategies may include filling bullets, restoring life, shooting, withdrawing, etc.
For zone transfer, the trigger time is the moment of leaving the zone, and the trigger condition includes moving across the zone and moving a distance exceeding a preset distance within a certain time. That is, when it is determined from the global behavior sequence that the virtual character moves from the region 1 to the region 2 and the movement distance of the virtual character exceeds the preset distance within a certain time, the determination that the behavior of the virtual character triggers the region transfer strategy, and accordingly, a time window is generated from the moment that the virtual character leaves the region 1, and the behavior sequence corresponding to the time window in the global behavior sequence is used as the local behavior sequence of the game strategy.
For a swimming transition, the trigger time is the previous moment when swimming begins, and the trigger condition includes when the behavior of the virtual character is updated to swimming. That is, when it is determined that the virtual character starts swimming according to the global behavior sequence, a strategy for triggering swimming transition is determined, and accordingly, a time window is generated from the previous moment when the virtual character starts swimming, and the behavior sequence corresponding to the time window in the global behavior sequence is used as the local behavior sequence of the game strategy.
For the transfer of the vehicle, the triggering time is the previous moment when the vehicle starts to ride, and the triggering condition includes when the behavior of the virtual character is updated to be the vehicle. That is, when the virtual character starts riding the vehicle according to the global behavior sequence, a strategy for triggering the vehicle transfer is determined, and accordingly, a time window is generated from the previous moment when the virtual character starts riding the vehicle, and the behavior sequence corresponding to the time window in the global behavior sequence is taken as the local behavior sequence of the game strategy.
For evacuation, the trigger time includes the moment when the virtual character of the enemy camping appears in the visual field, and the trigger condition is that no combat action exists in a period of time. That is, when it is determined that there is an enemy in the visual field of the virtual character according to the global behavior information and the virtual character has no combat behavior for a period of time, a strategy for triggering withdrawal is determined, and accordingly, a time window is generated from the moment when the enemy-linered virtual character appears in the visual field of the virtual character, and a behavior sequence corresponding to the time window in the global behavior sequence is used as a local behavior sequence of the game strategy.
According to the embodiment of the application, after the triggered target game strategy is determined according to the game strategy triggering rule, the local behavior sequence corresponding to the target game strategy is determined, and because the local behavior sequence contains time information, the target local game information of corresponding time information can be obtained from the global game information, each determined target local game information is used as reference game information, the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information, so that the automatic searching of the local game information and the corresponding game strategy can be realized, and the overall efficiency is greatly improved.
Further, in the embodiment of the application, when the global game play information of the historical game play corresponding to the reference virtual character is obtained, the corresponding evaluation index of the historical game play can be obtained, so that after the reference game play information and the corresponding reference game strategy are obtained each time, the corresponding relation among the reference game play information, the reference game strategy and the game index can be established. Referring to table 3, a table of correspondence between reference pair game information, reference game strategy, and reference game metrics according to an embodiment of the present application is exemplarily shown.
Reference to the game information | Reference game strategy | Duration of survival | Single office ranking | Single office evaluationGrade |
XXXXXX | Carrier transfer | 28 minutes | 2 | SSS |
Table 3 correspondence table referring to game information, reference game strategy and reference game index
Table 3 shows the 3 game metrics, which are survival time, single game rank, and single game rating, respectively, each row of data in the table is used to record one reference game information in a game, the reference game strategy corresponding to the reference game information, and the respective metrics of the game.
Based on the above embodiments, as an alternative embodiment, the recommendation method of the game policy according to the embodiment of the present application may include an offline portion and an online portion. For the offline part, the method comprises the steps of constructing an information base, wherein the information base comprises a plurality of reference game information clusters, each reference game information cluster comprises a plurality of reference game information, and meanwhile, the offline information base also comprises a reference game strategy corresponding to each reference game information and an evaluation index of each reference game strategy; and for the online part, searching the information base according to the current game play information of the player in the current game play, obtaining a target game strategy, and recommending the game strategy.
Referring to fig. 7, a schematic flow chart of constructing an information base according to an embodiment of the present application is shown, and the method includes:
s801, acquiring global game play information of a plurality of historical game plays corresponding to at least one reference virtual character, wherein each global game play information comprises a global behavior sequence of the reference virtual character in the historical game play;
s802, determining a local behavior sequence meeting the triggering rule in the global behavior sequence of each piece of global game information according to a preset game strategy triggering rule, wherein the triggering rule comprises at least one triggering rule corresponding to the game strategy;
s803, for each local behavior sequence meeting the triggering rule, determining target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence according to the target game strategy corresponding to the triggering rule met by the local behavior sequence;
s804, each piece of determined target local game information is used as reference game information, and a target game strategy corresponding to the target local game information is determined as a reference game strategy of the reference game information;
s805, respectively performing feature coding results after feature coding according to virtual environment information, corresponding virtual character state information and local behavior sequence information in the reference contrast information to obtain reference feature vectors of each reference contrast information, and performing clustering processing according to the reference feature vectors of each reference contrast information to obtain a plurality of reference contrast information clusters;
S806, for each reference game strategy, determining an evaluation index of the reference game strategy in each reference game information cluster, specifically, if the reference game strategy corresponds to one reference game information in one reference game information cluster, determining the evaluation index of the reference game information as the evaluation index of the reference game strategy in one reference game information cluster, and if the reference game strategy corresponds to at least two reference game information in one reference game information cluster, determining the evaluation index of the reference game strategy in one reference game information cluster according to the evaluation indexes of the at least two reference game information. That is, when the reference game information corresponding to one reference game policy appears in a plurality of reference game information clusters, the evaluation indexes of the reference game policy also have differences, and the evaluation indexes of the reference game policy obtained by the embodiment of the application can reflect the quality of the reference game policy more accurately.
S807, an information base is constructed according to the obtained multiple pieces of reference game information, the reference game strategies corresponding to each piece of reference game information and the evaluation indexes of each piece of reference game strategy.
Referring to fig. 8, a process of retrieving a current game information database and providing a game policy is shown by an example, in which in the process of playing a game in real time by a player, current game information of a target virtual character in the current game is obtained, including virtual environment information, state information of the target virtual character and local behavior sequence information, reference game information clusters matching with the current game information are retrieved from an offline information database, the offline information database includes m reference game information clusters, the number of reference game information in each reference game information cluster is not the same, reference game information cluster 1 includes p reference game information, reference game information m includes q reference game information, where m, p and q are integers greater than 1, the offline database also stores a game policy and an evaluation index corresponding to each reference game information, the target game information clusters are obtained by calculating matching degrees of the current game information and each reference game information cluster, the reference game information clusters are further combined with each reference game information cluster, and the recommendation information is provided according to the recommendation policy, and the recommendation information is generated, and the recommendation information is provided according to the recommendation information.
In order to better evaluate the advantages and disadvantages of the embodiment of the application, the application is compared with the existing random strategy, the evaluation index adopts an F1 value, and in particular, the application adopts two modes, wherein the game information in the mode 1 only comprises virtual environment information and corresponding virtual character state information, and the game information in the mode 2 only comprises virtual environment information, corresponding virtual character state information and local behavior sequence information. Finally, the F1 value of mode 1 of the present application is 14.24, the F1 value of mode 2 is 17.82, and the F1 value of the existing random strategy is 6.9.
The embodiment of the application provides a recommendation device for a game strategy, as shown in fig. 9, the recommendation device for the game strategy may include: a match information acquisition module 901, a match matching module 902, a reference policy activity module 903, and a policy recommendation module 904, wherein,
the game information acquisition module 901 is used for acquiring current game information of a target virtual character in a current game;
a match module 902, configured to determine at least one target reference match information according to a matching degree between each reference match information in the reference match information set and the current match information;
A reference policy activity module 903, configured to obtain a reference game policy corresponding to each target reference game information;
and the strategy recommendation module 904 is used for recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information.
The device of the embodiment of the present application may perform the method provided by the embodiment of the present application, and its implementation principle is similar, and actions performed by each module in the device of the embodiment of the present application correspond to steps in the method of the embodiment of the present application, and detailed functional descriptions of each module of the device may be referred to the descriptions in the corresponding methods shown in the foregoing, which are not repeated herein.
As an alternative embodiment, for each of the current and reference pair information sets, the pair information includes virtual environment information, state information of a corresponding virtual character, and local behavior sequence information.
As an alternative embodiment, the office matching module includes:
the matching degree submodule is used for determining the matching degree of the current contrast information and a plurality of reference contrast information clusters, and the plurality of reference contrast information clusters are obtained by carrying out clustering processing on the reference contrast information sets;
The target reference opposite office module is used for taking the reference opposite office information in the reference opposite office information cluster with the highest matching degree as the target reference opposite office information.
As an alternative embodiment, the matching degree submodule includes:
the feature vector unit is used for respectively carrying out feature coding on the virtual environment information, the corresponding virtual character state information and the local behavior sequence information in the current game information, and obtaining the current feature vector of the current game information according to the feature coding results of the virtual environment information, the corresponding virtual character state information and the local behavior sequence information;
the distance determining unit is used for determining the distance between the current feature vector and the cluster center of each reference cluster, and taking the distance corresponding to each reference cluster as the matching degree corresponding to the reference cluster, wherein the smaller the distance is, the higher the matching degree is;
the reference pair information clusters are obtained by clustering reference feature vectors of each piece of reference pair information in the reference pair information set, and the reference feature vectors are obtained according to feature coding results obtained by respectively carrying out feature coding on virtual environment information, corresponding virtual character state information and local behavior sequence information in the reference pair information.
As an alternative embodiment, the feature encoding result of the local behavior sequence information is a word embedded representation of the local behavior sequence information;
the feature vector unit is specifically configured to:
determining a target type of the local behavior sequence information in the current game information, and embedding a word corresponding to the target type as a word embedded representation of the local behavior sequence information in the current game information;
the word embedding representation corresponding to the local behavior sequence information of each kind is obtained by referring to the local behavior sequence information training word embedding model of each kind in the office information set.
As an alternative embodiment, the policy recommendation module includes:
the evaluation index unit is used for acquiring the evaluation index of each reference game strategy corresponding to each target reference game information;
and the target strategy unit is used for determining a target game strategy according to the evaluation indexes of the reference game strategies, generating and providing recommendation information according to the target game strategy, wherein the recommendation information comprises execution suggestion information related to the target game strategy.
As an alternative embodiment, the target policy unit is configured to:
And providing the recommendation information in response to obtaining a strategy providing instruction, wherein the strategy providing instruction is triggered by voice or a preset game control.
As an alternative embodiment, the target game strategy includes at least one of:
at least one reference game strategy with highest evaluation index;
at least one reference game strategy with the lowest evaluation index;
a reference game strategy having an evaluation index higher than a first threshold;
a reference game strategy having an evaluation index below a second threshold.
As an alternative embodiment, the evaluation index of each of the reference game strategies is determined by:
acquiring an evaluation index of each piece of reference game information in the reference game information set and a reference game strategy of each piece of reference game information;
for each reference game strategy, if the reference game strategy corresponds to one piece of reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy, and if the reference game strategy corresponds to at least two pieces of reference game information, determining the evaluation index of the reference game strategy according to the evaluation indexes of the at least two pieces of reference game information.
As an alternative embodiment, the reference game policy corresponding to the reference game information set and each reference game information in the reference game information game is obtained by:
acquiring global game information of a plurality of historical game games corresponding to at least one reference virtual character, wherein each global game information comprises a global behavior sequence of the reference virtual character in the historical game games;
determining a local behavior sequence meeting the triggering rule in the global behavior sequence of each piece of global game information according to a preset game strategy triggering rule, wherein the triggering rule comprises at least one triggering rule corresponding to a game strategy;
for each local behavior sequence meeting the triggering rule, determining target local game information corresponding to the target game strategy in global game information corresponding to the local behavior sequence according to the target game strategy corresponding to the triggering rule met by the local behavior sequence;
and taking each piece of determined target local game information as reference game information, and determining a target game strategy corresponding to the target local game information as a reference game strategy of the reference game information.
The embodiment of the application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to realize the steps of a recommendation method of a game strategy, and compared with the related technology, the method can realize the following steps: the method comprises the steps of obtaining current game information of a target virtual character in a current game, not limiting the time for obtaining the current game information, namely meeting the requirement of obtaining the game information at any time in the game, determining at least one target reference game information matched with the current game information through the matching degree of each reference game information area in the pre-obtained reference game information set, further obtaining a reference game strategy corresponding to each target reference game information, recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information, and greatly improving flexibility and recommending the game strategy to the target virtual character more timely.
In an alternative embodiment, there is provided an electronic device, as shown in fig. 10, the electronic device 4000 shown in fig. 10 includes: a processor 4001 and a memory 4003. Wherein the processor 4001 is coupled to the memory 4003, such as via a bus 4002. Optionally, the electronic device 4000 may further comprise a transceiver 4004, the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data, etc. It should be noted that, in practical applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The processor 4001 may be a CPU (Central Processing Unit ), general purpose processor, DSP (Digital Signal Processor, data signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 4001 may also be a combination that implements computing functionality, e.g., comprising one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
Bus 4002 may include a path to transfer information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture ) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 10, but not only one bus or one type of bus.
Memory 4003 may be, but is not limited to, ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, RAM (Random Access Memory ) or other type of dynamic storage device that can store information and instructions, EEPROM (Electrically Erasable Programmable Read Only Memory ), CD-ROM (Compact Disc Read Only Memory, compact disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer.
The memory 4003 is used for storing a computer program for executing an embodiment of the present application, and is controlled to be executed by the processor 4001. The processor 4001 is configured to execute a computer program stored in the memory 4003 to realize the steps shown in the foregoing method embodiment.
Embodiments of the present application provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor, implements the steps of the foregoing method embodiments and corresponding content.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program can realize the steps and corresponding contents of the embodiment of the method when being executed by a processor.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims and in the above figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate, such that the embodiments of the application described herein may be implemented in other sequences than those illustrated or otherwise described.
It should be understood that, although various operation steps are indicated by arrows in the flowcharts of the embodiments of the present application, the order in which these steps are implemented is not limited to the order indicated by the arrows. In some implementations of embodiments of the application, the implementation steps in the flowcharts may be performed in other orders as desired, unless explicitly stated herein. Furthermore, some or all of the steps in the flowcharts may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or phases may be performed at the same time period, or each of these sub-steps or phases may be performed at different time periods, respectively. In the case of different execution periods, the execution sequence of the sub-steps or stages may be flexibly configured according to the requirements, which is not limited by the embodiment of the present application.
The foregoing is merely an optional implementation manner of some of the implementation scenarios of the present application, and it should be noted that, for those skilled in the art, other similar implementation manners based on the technical ideas of the present application are adopted without departing from the technical ideas of the scheme of the present application, and the implementation manner is also within the protection scope of the embodiments of the present application.
Claims (14)
1. A method for recommending game strategies, comprising:
obtaining current game information of a target virtual character in a current game;
determining at least one target reference pair information according to the matching degree of each reference pair information in the reference pair information set and the current pair information;
obtaining a reference game strategy corresponding to each target reference game information;
and recommending the game strategy to the target virtual character based on the reference game strategy corresponding to each target reference game information.
2. The method of claim 1, wherein for each of the current and reference sets of game information, the game information includes virtual environment information, state information of a corresponding virtual character, and local behavior sequence information.
3. The method of claim 2, wherein said determining at least one target reference pair information based on a degree of matching of each reference pair information in the set of reference pair information with the current pair information comprises:
Determining the matching degree of the current contrast information and a plurality of reference contrast information clusters, wherein the plurality of reference contrast information clusters are obtained by carrying out clustering processing on the reference contrast information sets;
and taking the reference contrast information in the reference contrast information cluster with the highest matching degree as the target reference contrast information.
4. The method of claim 3, wherein said determining a degree of matching of the current pair information with a plurality of clusters of reference pair information comprises:
respectively carrying out feature coding on the virtual environment information, the corresponding virtual character state information and the local behavior sequence information in the current game information, and obtaining the current feature vector of the current game information according to the feature coding results of the virtual environment information, the corresponding virtual character state information and the local behavior sequence information;
determining the distance between the current feature vector and the cluster center of each reference cluster, and taking the distance corresponding to each reference cluster as the matching degree corresponding to the reference cluster, wherein the smaller the distance is, the higher the matching degree is;
the reference pair information clusters are obtained by clustering reference feature vectors of each piece of reference pair information in the reference pair information set, and the reference feature vectors are obtained according to feature coding results obtained by respectively carrying out feature coding on virtual environment information, corresponding virtual character state information and local behavior sequence information in the reference pair information.
5. The method of claim 4, wherein the characteristic encoding result of the local behavior sequence information is a word embedded representation of the local behavior sequence information;
the feature encoding of the local behavior sequence information in the current game information comprises the following steps:
determining a target type of the local behavior sequence information in the current game information, and embedding a word corresponding to the target type as a word embedded representation of the local behavior sequence information in the current game information;
the word embedding representation corresponding to the local behavior sequence information of each kind is obtained by referring to the local behavior sequence information training word embedding model of each kind in the office information set.
6. The method of claim 1, wherein the game policy recommendation to the target virtual character based on the reference game policy corresponding to each target reference game pair information comprises:
acquiring evaluation indexes of each reference game strategy corresponding to each target reference game information;
determining a target game strategy according to the evaluation index of each reference game strategy, and generating and providing recommendation information according to the target game strategy, wherein the recommendation information comprises execution suggestion information related to the target game strategy.
7. The method of claim 6, wherein providing recommendation information comprises:
and providing the recommendation information in response to obtaining a strategy providing instruction, wherein the strategy providing instruction is triggered by voice or a preset game control.
8. The method of claim 6, wherein the target game strategy comprises at least one of:
at least one reference game strategy with highest evaluation index;
at least one reference game strategy with the lowest evaluation index;
a reference game strategy having an evaluation index higher than a first threshold;
a reference game strategy having an evaluation index below a second threshold.
9. The method of claim 6, wherein the evaluation index of each of the reference game strategies is determined by:
acquiring an evaluation index of each piece of reference game information in the reference game information set and a reference game strategy of each piece of reference game information;
for each reference game strategy, if the reference game strategy corresponds to one piece of reference game information, determining the evaluation index of the reference game information as the evaluation index corresponding to the reference game strategy, and if the reference game strategy corresponds to at least two pieces of reference game information, determining the evaluation index of the reference game strategy according to the evaluation indexes of the at least two pieces of reference game information.
10. The method of claim 1, wherein the set of reference game information and the reference game strategy corresponding to each of the reference game information in the reference game information is obtained by:
acquiring global game information of a plurality of historical game games corresponding to at least one reference virtual character, wherein each global game information comprises a global behavior sequence of the reference virtual character in the historical game games;
determining a local behavior sequence meeting the triggering rule in the global behavior sequence of each piece of global game information according to a preset game strategy triggering rule, wherein the triggering rule comprises at least one triggering rule corresponding to a game strategy;
for each local behavior sequence meeting the triggering rule, determining target local game information corresponding to the target game strategy in global game information corresponding to the local behavior sequence according to the target game strategy corresponding to the triggering rule met by the local behavior sequence;
and taking each piece of determined target local game information as reference game information, and determining a target game strategy corresponding to the target local game information as a reference game strategy of the reference game information.
11. A recommendation device for a game strategy, comprising:
the game information acquisition module is used for acquiring current game information of the target virtual character in the current game;
the match module is used for determining at least one target reference match information according to the match degree of each piece of reference match information in the reference match information set and the current match information;
the reference strategy activity module is used for obtaining a reference game strategy corresponding to each target reference game information;
and the strategy recommendation module is used for recommending the game strategy to the target virtual roles based on the reference game strategy corresponding to each target reference game information.
12. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the steps of the recommendation method of a game strategy according to any one of claims 1-10.
13. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the recommendation method of a game strategy according to any of claims 1-10.
14. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the recommendation method of a game strategy according to any one of claims 1-10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211097845.8A CN116983624A (en) | 2022-09-08 | 2022-09-08 | Recommendation method and device for game strategy, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211097845.8A CN116983624A (en) | 2022-09-08 | 2022-09-08 | Recommendation method and device for game strategy, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116983624A true CN116983624A (en) | 2023-11-03 |
Family
ID=88532709
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211097845.8A Pending CN116983624A (en) | 2022-09-08 | 2022-09-08 | Recommendation method and device for game strategy, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116983624A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117899487A (en) * | 2024-03-15 | 2024-04-19 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment, storage medium and program product |
-
2022
- 2022-09-08 CN CN202211097845.8A patent/CN116983624A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117899487A (en) * | 2024-03-15 | 2024-04-19 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment, storage medium and program product |
CN117899487B (en) * | 2024-03-15 | 2024-05-31 | 腾讯科技(深圳)有限公司 | Data processing method, device, equipment, storage medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11709902B2 (en) | Recommendation method and apparatus, and storage medium | |
CN110443284B (en) | Artificial intelligence AI model training method, calling method, server and readable storage medium | |
CN109460463A (en) | Model training method, device, terminal and storage medium based on data processing | |
CN110351318B (en) | Application recommendation method, terminal and computer storage medium | |
CN111860101B (en) | Training method and device for face key point detection model | |
CN111632379A (en) | Game role behavior control method and device, storage medium and electronic equipment | |
CN108537567A (en) | A kind of determination method and apparatus of targeted user population | |
US20160132601A1 (en) | Hybrid Explanations In Collaborative Filter Based Recommendation System | |
CN111701240B (en) | Virtual article prompting method and device, storage medium and electronic device | |
CN112138394B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN110215710B (en) | In-game event determination method and device, electronic equipment and storage medium | |
CN112905013B (en) | Agent control method, device, computer equipment and storage medium | |
CN111111203B (en) | Robot training method and device and skill releasing method and device | |
CN110325965B (en) | Object processing method, device and storage medium in virtual scene | |
CN116983624A (en) | Recommendation method and device for game strategy, electronic equipment and storage medium | |
CN111652673B (en) | Intelligent recommendation method, device, server and storage medium | |
CN110020007A (en) | Robot interactive control method and device, storage medium, server | |
CN112507104B (en) | Dialog system acquisition method, apparatus, storage medium and computer program product | |
CN106096653B (en) | Ascribed characteristics of population estimating method based on cross-platform user social contact multimedia behavior | |
CN113254788A (en) | Big data based recommendation method and system and readable storage medium | |
CN111461188A (en) | Target service control method, device, computing equipment and storage medium | |
CN114344916B (en) | Data processing method and related device | |
CN116370959A (en) | Method and device for controlling virtual object in game, terminal equipment and storage medium | |
CN117217286A (en) | Model training and information processing method and device, electronic equipment and storage medium | |
Arias | An introduction to artificial intelligence |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |