Game strategy recommendation method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202211097845.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-08
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-09-08
AI Technical Summary
[0004]基于规则的方案劣势在于其严重依赖于人工制定策略以及梳理对应的规则,这导致新策略的产生到上线的周期十分漫长;且这种方式构建策略点往基于规则的方案劣势在于其严重依赖于人工制定策略以及梳理对应的规则,这导致新策略的产生到上线的周期十分漫长;且这种方式构建策略点往由于虚拟角色的状态考虑的面不够广,而导致的不准确的问题
[0050] By acquiring the current game information of the target virtual character in the current game, there is no need to limit the time of acquisition of the current game information, that is, the game information can be acquired at any time during the game. By comparing the matching degree of the current game information of each reference game information domain in the pre-acquired reference game information set, at least one target reference game information matching the current game information is determined. Furthermore, the reference game strategy corresponding to each target reference game information is obtained. Based on the reference game strategy corresponding to each target reference game information, game strategy recommendations are made to the target virtual character. The flexibility is greatly improved, and game strategies can be recommended to the target virtual character more timely.
Smart Images

Figure CN116983624B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of artificial intelligence and game technology. Specifically, this application relates to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for recommending game strategies. Background Technology
[0002] With the rapid development of computer and internet technologies, video games are becoming increasingly popular. In some game scenarios, virtual characters controlled by electronic devices, or intelligent agents, can assist the virtual characters controlled by players in combat; for example, the intelligent agent can provide game strategies to the player-controlled virtual characters.
[0003] Existing technical solutions typically involve manually enumerating the states of potential virtual characters and then pushing strategies based on rules. For example, one rule might be: when a virtual character's health is below a preset percentage and the character has a medkit in their inventory, recommend the strategy of using a medkit.
[0004] The disadvantages of rule-based solutions are that they rely heavily on manual strategy development and rule compilation, resulting in a very long cycle from the generation of new strategies to their implementation. Furthermore, this approach to building strategy points is prone to inaccuracies due to insufficient consideration of the virtual character's state. Summary of the Invention
[0005] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for recommending game strategies, which can solve the above-mentioned problems of the prior art. The technical solution is as follows:
[0006] According to one aspect of the embodiments of this application, a method for recommending game strategies is provided, the method comprising:
[0007] Obtain the current game information of the target virtual character in the current game;
[0008] At least one target reference game is determined based on the matching degree between each reference game information in the reference game information set and the current game information;
[0009] Obtain the reference game strategy corresponding to the reference game information of each target;
[0010] Based on the reference game strategies corresponding to the reference game information of each target, game strategies are recommended to the target virtual character.
[0011] According to another aspect of the embodiments of this application, a game strategy recommendation device is provided, the device comprising:
[0012] The game information acquisition module is used to obtain the current game information of the target virtual character in the current game;
[0013] The match matching module is used to determine at least one target reference match information based on the matching degree between each reference match information in the reference match information set and the current match information;
[0014] The reference strategy activity module is used to obtain the reference game strategy corresponding to each target reference game information;
[0015] The strategy recommendation module is used to recommend game strategies to the target virtual character based on the reference game strategies corresponding to each target reference game information.
[0016] As an optional implementation, for each piece of game information in the current game information and the reference game information set, the game information includes virtual environment information, the state information of the corresponding virtual character, and local behavior sequence information.
[0017] As an optional implementation, the matchmaking module includes:
[0018] The matching degree submodule is used to determine the matching degree between the current game information and multiple reference game information clusters, which are obtained by clustering the reference game information set.
[0019] The target reference game module is used to select the reference game information from the reference game information cluster with the highest matching degree as the target reference game information.
[0020] As an optional implementation, the matching degree submodule includes:
[0021] The feature vector unit is used to encode the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information in the current game information, and to obtain the current feature vector of the current game information based on the feature encoding results of the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information.
[0022] The distance determination unit is used to determine the distance between the current feature vector and the cluster center of each reference game information cluster, and to take the distance corresponding to each reference game information cluster as the matching degree corresponding to the reference game information cluster. The smaller the distance, the higher the matching degree.
[0023] The reference game information cluster is obtained by clustering the reference feature vectors of each reference game information in the reference game information set. The reference feature vector is obtained by feature encoding the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information in the reference game information.
[0024] As an optional implementation, the feature encoding result of the local behavior sequence information is the word embedding representation of the local behavior sequence information;
[0025] The eigenvector unit is specifically used for:
[0026] Determine the target category of the local behavior sequence information in the current game information, and use the word embedding representation corresponding to the target category as the word embedding representation of the local behavior sequence information in the current game information;
[0027] The word embedding representations corresponding to the local behavior sequence information of each type are obtained by training the word embedding model with reference to the local behavior sequence information of each type in the game information set.
[0028] As an optional implementation, the strategy recommendation module includes:
[0029] The evaluation index unit is used to obtain the evaluation index of each reference game strategy corresponding to each of the target reference game information;
[0030] The target strategy unit is used to determine a target game strategy based on the evaluation index of each reference game strategy, and to generate and provide recommendation information based on the target game strategy. The recommendation information includes execution suggestion information related to the target game strategy.
[0031] As an optional implementation, the target strategy unit is used for:
[0032] In response to receiving a strategy provision instruction, the recommended information is provided, the strategy provision instruction being triggered by voice or a preset game control.
[0033] As an optional implementation, the target game strategy includes at least one of the following:
[0034] At least one reference game strategy with the highest rating;
[0035] The lowest-rated reference game strategy;
[0036] Reference game strategies with an evaluation index higher than the first threshold;
[0037] Reference game strategies with an evaluation index below the second threshold.
[0038] As an optional implementation, the evaluation index of each of the reference game strategies is determined in the following manner:
[0039] Obtain the evaluation index of each reference game in the reference game information set, and the reference game strategy for each reference game;
[0040] For each of the reference game strategies, if the reference game strategy corresponds to one reference match information, then the evaluation index of the reference match information is determined as the evaluation index corresponding to the reference game strategy; if the reference game strategy corresponds to at least two reference match information, then the evaluation index of the reference game strategy is determined based on the evaluation indices of the at least two reference match information.
[0041] As an optional implementation, the reference game information set and the reference game strategy corresponding to each reference game information set are obtained in the following way:
[0042] Obtain global game information for multiple historical game matches corresponding to at least one reference virtual character, wherein each global game information includes a global behavior sequence of the reference virtual character in the historical game match;
[0043] According to the preset game strategy triggering rules, determine the local behavior sequence that satisfies the triggering rules in the global behavior sequence of each global game information, wherein the triggering rules include at least one triggering rule corresponding to the game strategy;
[0044] For each local behavior sequence that satisfies the triggering rule, the target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence is determined according to the target game strategy corresponding to the triggering rule satisfied by the local behavior sequence.
[0045] Each of the identified target local game information is used as reference game information, and the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information.
[0046] According to another aspect of the embodiments of this application, an electronic device is provided, the electronic device including a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method for recommending game strategies.
[0047] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the steps of the above-described method for recommending game strategies.
[0048] According to one aspect of the embodiments of this application, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the steps of the above-described method for recommending game strategies are provided.
[0049] The beneficial effects of the technical solutions provided in this application are:
[0050] By acquiring the current game information of the target virtual character in the current game, there is no need to limit the time of acquisition of the current game information, that is, the game information can be acquired at any time during the game. By comparing the matching degree of the current game information of each reference game information domain in the pre-acquired reference game information set, at least one target reference game information matching the current game information is determined. Furthermore, the reference game strategy corresponding to each target reference game information is obtained. Based on the reference game strategy corresponding to each target reference game information, game strategy recommendations are made to the target virtual character. The flexibility is greatly improved, and game strategies can be recommended to the target virtual character more timely. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0052] Figure 1 A schematic diagram illustrating the implementation environment of the solution provided in the embodiments of this application;
[0053] Figure 2 A flowchart illustrating a game strategy recommendation method provided in an embodiment of this application;
[0054] Figure 3 This application provides a schematic flowchart for determining target reference game information in an embodiment of the present application.
[0055] Figure 4 A schematic diagram illustrating a process for obtaining word embedding representations of various types of local behavioral sequence information, provided in an embodiment of this application;
[0056] Figure 5 A schematic diagram of a game interface provided in an embodiment of this application;
[0057] Figure 6 This application provides a schematic diagram of a process for providing recommendation information.
[0058] Figure 7 A schematic diagram illustrating a process for constructing an information database, provided as an embodiment of this application;
[0059] Figure 8 This application provides a process for retrieving information from a database and providing game strategies using current game information;
[0060] Figure 9 A schematic diagram of the structure of a game strategy recommendation device provided in an embodiment of this application;
[0061] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0062] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0063] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0065] First, let's introduce and explain several terms used in this application:
[0066] 1) Stage: refers to the stage in a game. Different stages often have different characteristics, and the specific division rules can be set according to the actual application scenario.
[0067] 2) Game Strategy: This strategy is created manually or automatically. When applied to a smart target object, it enables the smart target object to perform corresponding operations, such as controlling the movement of a game character. The game strategy can be in the form of code or other forms.
[0068] 3) Intelligent Objects: Artificial intelligence programs that participate in game matches. They can complete corresponding game tasks by controlling game elements in the game, such as human-computer battle tasks, game companion tasks, and automatic AFK tasks.
[0069] 4) Game elements: refers to elements in a game that can be controlled by the user or intelligent objects, including but not limited to virtual characters and organizational units in the game (such as buildings, resources, etc.).
[0070] 5) Real-Time Strategy (RTS) Games: A type of strategy game where gameplay is not turn-based but real-time. Players in an RTS game develop their units by executing tactics, cooperating in battles or engaging in direct confrontation.
[0071] 6) First-person shooter (FPS) games: As the name suggests, first-person shooter games are shooting games played from the player's subjective perspective.
[0072] 7) Virtual characters, which can be considered as characters controlled by the player in the game. These virtual characters can be virtual figures, virtual animals, anime characters, etc. Virtual characters are three-dimensional models created based on animation skeletal technology. Each virtual character has its own shape and volume in the virtual environment, occupying a portion of the space within that environment.
[0073] Game control is an application of artificial intelligence. In game matches, specific game strategies can be applied to suggest or control virtual characters to perform corresponding actions. Current solutions typically involve manually enumerating the possible states of virtual characters and pushing strategies based on rules. These solutions mainly suffer from the following two problems:
[0074] 1. The workload of writing game strategies is large. Since game strategies are specified manually, it takes a long time from writing the game strategy to launching it.
[0075] 2. The writing of prior rules is difficult. Since there are usually many situations in a game, it is very tedious to choose a strategy by hard coding. It requires generating very complex rules and conditions, and many empirical parameters need to be manually adjusted. The final result usually does not meet expectations, especially in RTS and MOBA games with complex environments. If the game strategy is recommended based on prior rules, the accuracy of the recommended game strategy will be low.
[0076] The methods, apparatuses, electronic devices, computer-readable storage media, and computer program products for recommending game strategies provided in this application are intended to solve the aforementioned technical problems of the prior art.
[0077] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0078] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application. This implementation environment can be implemented as a computer system, such as a user interface display system or a game application system. The implementation environment may include: a first terminal 110, a server 120, and a second terminal 130.
[0079] The first terminal 110 has an application installed and running that supports a virtual environment. This application can be a game application or other applications that can provide game functionality. For example, the game application in the first terminal device 110 is an FPS game application. The first terminal 110 is the terminal used by the first player, who uses the first terminal 110 to control a first virtual character to play the game, including at least one of the following: upgrading virtual items, combining different virtual items to create new virtual items, using virtual items to attack, and moving.
[0080] The first terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0081] Server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Schematic, server 120 includes a processor 121, a player account database 122, a battle service module 123, and a user-facing input / output interface (I / O interface) 124. The processor 121 loads instructions stored in server 120 and processes data in the player account database 122 and the battle service module 123. The player account database 122 stores data of user accounts used by the first terminal 110 and the second terminal 130, such as user account avatars, nicknames, and server regions. The battle service module 123 enables gameplay using virtual cards. The user-facing I / O interface 124 establishes communication and exchanges data with the first terminal 110 via a wireless or wired network.
[0082] Optionally, server 120 undertakes the main computing work, and first terminal 110 and second terminal 130 undertake secondary computing work; or, server 120 undertakes secondary computing work, and first terminal 110 and second terminal 130 undertake the main computing work; or, server 120, first terminal 110 and second terminal 130 collaborate on computing using a distributed computing architecture.
[0083] The second terminal 130 has an application installed and running that supports a virtual environment. This application can be a game application or other applications that provide gaming functionality. For example, the game application in the second terminal device 130 is an FPS game application. The second terminal 130 is the terminal used by the second player, who uses the second terminal 130 to control a second virtual character to play the game. This includes at least one of the following: upgrading virtual items, combining different virtual items to create new virtual items, using virtual items to attack, and moving.
[0084] Optionally, 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 from different control system platforms. The first terminal 110 can refer to one of multiple terminals, and the second terminal 130 can refer to one of multiple terminals; this embodiment only uses the first terminal 110 and the second terminal 130 as examples. The device types of the first terminal 110 and the second terminal 130 may be the same or different, and these device types include at least one of the following: AR devices, VR devices, smart wearable devices, smartphones, tablets, e-book readers, MP3 players, MP4 players, laptops, and desktop computers. The following embodiment uses a smartphone as an example.
[0085] Those skilled in the art will understand that the number of terminals described above can be more or less. For example, there may be only one terminal, or there may be dozens or hundreds, or even more terminals. This application does not limit the number of terminals or the type of device. This application mainly describes the application scenario of a single terminal.
[0086] The following section describes the data transmission process between terminal device 110 and server 120, using an FPS game application as an example.
[0087] This application provides a method for recommending game strategies. This method can be executed by a terminal or a server; however, this application does not impose specific limitations. Figure 2 As shown, the method includes:
[0088] S101. Obtain the current game information of the target virtual character in the current game.
[0089] The target virtual character in this application embodiment can be a virtual character controlled by a player or a virtual character controlled by a smart object.
[0090] The current game information in this application embodiment can refer to the game information at the current moment, or it can include the game information at multiple moments within the current time period. If the current game information includes the game information at multiple moments, then the current game information can be understood as a sequence of game information at multiple moments.
[0091] Match information refers to various information within a game match. Generally, match information changes as the match progresses. Examples include the target virtual character's health and resource status, the health and resource status of virtual characters in the same or different factions as the target virtual character, the target virtual character's behavior, etc. This application embodiment does not impose specific limitations on these details. It should be understood that when the recommendation method in this application embodiment is executed by a terminal, the game rules may prevent the acquisition of various information about some or all virtual characters in a different faction from the target virtual character. When the recommendation method is executed by a server, the server collects and responds to all control commands output by terminals during the game match. Therefore, the server can obtain various information about all virtual characters in the game match, resulting in more comprehensive match information and a more accurate game strategy.
[0092] S102. Determine at least one target reference game information based on the matching degree between each reference game information in the reference game information set and the current game information.
[0093] After obtaining the current game information, this application embodiment determines the matching degree between each reference game information in the reference game information set and the current game information, and takes one or more reference game information with the highest or higher matching degree as the target reference game information.
[0094] The reference match information in this application embodiment can be match information of the player controlling the target virtual character in historical game matches, or match information of other players in historical game matches. In some embodiments, the reference match information can be pre-represented as a vector, which can improve the efficiency of calculating the matching degree, and also...
[0095] Based on the feature similarity between the vector representation of the current game information and the vector representation of each reference game information, the feature similarity is used as the matching degree. The higher the feature similarity, the higher the matching degree. In this application embodiment, feature similarity can be characterized by cosine similarity, Euclidean distance, etc. This application embodiment does not make specific limitations.
[0096] S103. Obtain the reference game strategy corresponding to the reference game information of each target.
[0097] This application embodiment can predetermine the game strategy for each reference match information, thereby determining the reference game strategy corresponding to the target reference match information after determining the target reference match information. The game strategy in this application embodiment can be used to instruct the virtual character's behavior in the next moment, or it can be used to instruct the virtual character's behavior in the next stage. To reduce the fine-grainedness of manually setting rules, the game strategy in this application embodiment can be used to instruct the virtual character's behavior in the next stage. The behavior in the next stage is also a macroscopic, coarse-grained behavior. In this application embodiment, different reference match information can correspond to the same game strategy; that is, one game strategy can correspond to at least one reference match information.
[0098] The game strategies in this application embodiment can include three types: movement, combat, and resource acquisition. Movement strategies can include area movement, swimming movement, and vehicle movement, etc. Area movement refers to moving from one area in the virtual environment to another, while swimming movement and vehicle movement are classifications of movement methods. Combat strategies can include reloading ammunition, restoring health, shooting, and retreating.
[0099] S104. Recommend game strategies to the target virtual character based on the reference game strategies corresponding to the reference game information of each target.
[0100] In this embodiment of the application, after determining the reference game strategy corresponding to each target reference game information, a game strategy recommendation can be made to the target virtual character based on the reference game strategy. For example, a game strategy can be randomly selected from the reference game strategies corresponding to each target reference game information and recommended to the target virtual character.
[0101] The game strategy recommendation method of this application embodiment obtains the current game information of the target virtual character in the current game, without limiting the time of obtaining the current game information, that is, it can obtain the game information at any time in the game. By using the matching degree of the current game information of each reference game information domain in the pre-obtained reference game information set, at least one target reference game information matching the current game information is determined. Further, the reference game strategy corresponding to each target reference game information is obtained. Based on the reference game strategy corresponding to each target reference game information, game strategy is recommended to the target virtual character. The flexibility is greatly improved, and game strategies can be recommended to the target virtual character more timely.
[0102] Based on the above embodiments, as an optional embodiment, the current game information and each game information in the reference game information set include virtual environment information, the state information of the corresponding virtual character, and local behavior sequence information.
[0103] The virtual environment information in this application embodiment refers to information about game elements other than virtual characters during a game match. By collecting virtual environment information, the basic information of the game process can be measured more accurately, and the stage of the game can be understood more accurately. Virtual environment information may include map information (e.g., the spheres of influence, traversable areas, and inaccessible areas of each faction), game duration, resource placement locations, resource placement status, virtual vehicle locations, etc. The resource placement status in this application embodiment may include the quantity of resources already placed, the quantity of resources placed but not yet collected by the virtual character, the quantity of resources yet to be placed, etc. The location of virtual vehicles may include the location of virtual vehicles currently controlled by a virtual character, or the location of virtual vehicles not yet controlled by a virtual character.
[0104] The virtual character's status information in this application embodiment may include the virtual character's health status, such as whether it is alive or defeated (i.e., its health is not higher than a preset threshold, which can be 0), resource status, i.e., the resources held by the virtual character (e.g., virtual health packs to restore health, virtual attack tools, virtual armor, etc.), the type and location of the virtual vehicle controlled by the virtual character, etc. It should be understood that, for the current game information, the corresponding virtual character includes the target virtual character, and for the reference game information, the virtual character of the game includes the reference virtual character.
[0105] Since virtual environment information and the state of virtual characters reflect a short period of time, such as a specific moment, in order to make the game information more accurately reflect the game state of the virtual characters, and considering that the behavior sequence of virtual characters can enhance the differentiation between different stages, the current game information in this application embodiment also includes the local behavior sequence of the corresponding virtual characters.
[0106] Local behavior sequence information is relative to global behavior sequence information. Global behavior sequence information is the sequence of actions of the virtual character throughout the entire game, while local behavior sequence information is the sequence of actions of the virtual character within a specific time window of the game. It should be understood that for local behavior sequence information in the current game information, the last moment of the corresponding event window is the current moment. For example, for current game information obtained at 4 minutes and 15 seconds into the game, if the time window is set to 30 seconds, the local behavior sequence information contained in the current game information is the sequence of actions of the target virtual character between 3 minutes and 45 seconds and 4 minutes and 15 seconds.
[0107] Based on the above embodiments, as an optional embodiment, at least one target reference game information is determined according to the matching degree between each reference game information in the reference game information set and the current game information, including:
[0108] S201. Determine the matching degree between the current game information and multiple reference game information clusters, wherein the multiple reference game information clusters are obtained by clustering the reference game information set;
[0109] S202. The reference game information in the reference game information cluster with the highest matching degree is taken as the target reference game information.
[0110] Please see Figure 3 The figure illustrates a flowchart of the process for determining target reference game information in an embodiment of this application. As shown, the reference game information in the reference game information set is first clustered to group similar reference game information into a reference game information cluster. When determining the matching degree between each reference game information in the reference game information set and the current game information, only the matching degree between the current game information and each reference game information cluster needs to be calculated. Finally, the reference game information in the reference game information cluster with the highest matching degree is taken as the target reference game information, which significantly reduces the amount of data for calculating the matching degree and thus allows for faster matching results.
[0111] Based on the above embodiments, as an optional embodiment, determining the matching degree between the current game information and multiple reference game information clusters includes:
[0112] S301. Perform feature encoding on the virtual environment information, the corresponding virtual character's state information, and the local behavior sequence information in the current game information, and obtain the current feature vector of the current game information based on the feature encoding results of the virtual environment information, the corresponding virtual character's state information, and the local behavior sequence information.
[0113] S302. Determine the distance between the current feature vector and the cluster center of each reference game information cluster, and use the distance corresponding to each reference game information cluster as the matching degree corresponding to the reference game information cluster. The smaller the distance, the higher the matching degree.
[0114] In determining the matching degree between the current game information and the reference game information clusters, this embodiment requires feature encoding of each reference game information in both the current game information and the reference game information clusters. After obtaining the reference feature vectors of the reference game information, the cluster center of the reference game information cluster can be obtained. In one embodiment, the cluster center of the reference game information cluster is the average value of all reference feature vectors in the cluster. For example, if a reference game information cluster includes four reference feature vectors, where reference feature vector 1 is represented as (1,1,1,1), reference feature vector 2 as (2,2,1,1), reference feature vector 3 as (1,2,2,2), and reference feature vector 4 as (2,2,2,1), then the cluster center of the reference game information cluster can be represented as (1.5,1.75,1.5,1.25). By calculating the distance between the current feature vector of the current game information and the feature vector of the cluster center of each reference game information cluster, the matching degree corresponding to the reference game information cluster can be obtained. The embodiments of this application do not limit the specific method of calculating the distance, such as Minkowski distance, Euclidean distance, Mahalanobis distance, etc.
[0115] In some embodiments, the similarity between the current feature vector and the feature vector of the cluster center can also be used as a reference for the matching degree of the corresponding game information cluster. The specific method for calculating the similarity is not limited in the embodiments of this application. For example, it can be cosine similarity, Pearson correlation coefficient, etc.
[0116] In this embodiment of the application, when obtaining the feature vector of any one of the current game information and the reference game information, the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information are respectively feature-encoded, and then feature fusion is performed based on the three feature encoding results to obtain the feature vector.
[0117] This application does not limit the specific method of feature fusion. For example, the three feature vector results can be transformed into the same dimension using multiple linear layers, and then added together to obtain the feature vector of the game information. Alternatively, the three feature encoding results can be first transformed into high-bit feature representations, then the commonalities of the three feature encoding results in the high-dimensional space can be obtained, and then the commonalities of the three feature encoding results in the high-dimensional space can be concatenated or summed to obtain the feature vector of the game information.
[0118] It should be noted that since the data types of virtual environment information, corresponding virtual character state information, and local behavior sequence information are not only different but also diverse, ensuring that the data dimensions are not too dispersed during vectorization can significantly reduce the complexity of subsequent matching. Considering that virtual environment information and virtual character state information can be understood as descriptions of states, this embodiment can use One-Hot encoding for both. One-Hot encoding represents categorical variables as binary vectors. First, categorical values are mapped to integer values. Then, each integer value is represented as a binary vector, with all integer values except for the index being zero, marked as 1.
[0119] In one embodiment, for any type of virtual environment information and virtual character status information, if the number of categories of this information is N, then each category of information is encoded with an integer: Type 1: 0, Type 2: 1, Type 3: 2, ..., Type N: N-1. All N categories of integer encodings are arranged from front to back. Therefore, for any category of virtual environment information or virtual character information, the corresponding encoding result can be obtained based on the encoding of that category.
[0120] For example, taking virtual environment information such as game duration as an example, if there are three categories of game duration, namely 0-5 minutes, 5-10 minutes, and more than 10 minutes, then there are three categories that need to be encoded: "0-5 minutes", "5-10 minutes", and "more than 10 minutes". The integer code for the "0-5 minutes" category is 0, the integer code for the "5-10 minutes" category is 1, and the integer code for the "more than 10 minutes" category is 2. So if the game duration in a certain match information is 6 minutes, since it belongs to the second category, its encoding result is [0,1,0].
[0121] It should be noted that in practical applications, by performing One-Hot encoding on virtual environment information and the corresponding virtual character's state information, although the feature encoding results of different types of information may differ, the dimensionality of the feature encoding results can be unified by unifying them to the maximum dimension.
[0122] Considering that the behavior of virtual characters can significantly enhance the differentiation between different stages of the game, optimizing the feature encoding result of behavior sequences is a key step in understanding the game state. In this application embodiment, the feature encoding result of local behavior sequence information is a word embedding representation of the local behavior sequence information. In advanced tasks of natural language processing, machine learning methods require converting words into mathematical representations, and then using these mathematical representations for computation to complete semantic-level tasks. This application embodiment uses word embeddings to process the local behavior sequences of virtual characters, which is a key technology of this application. In one embodiment, feature encoding of the local behavior sequence information in the current game information includes:
[0123] Determine the target category of the local behavior sequence information in the current game information, and use the word embedding representation corresponding to the target category as the word embedding representation of the local behavior sequence information in the current game information;
[0124] The word embedding representations corresponding to the local behavior sequence information of each type are obtained by training the word embedding model with reference to the local behavior sequence information of each type in the game information set.
[0125] After obtaining the reference game information set in this embodiment, the local action sequence information of each reference game information can be classified. The classification of local action sequence information can be as follows: if two local action sequence information differs, they are considered as two different types of local action information. After obtaining the reference game information of each type, a word embedding model can be trained, and the word embedding representations of each type of reference game information output by the word embedding model can be obtained. When performing feature encoding on the local action sequence information of the current game information, the target type of the local action sequence information in the current game information is first determined. By finding the word embedding representation corresponding to the target type, it can be used as the word embedding representation of the local action sequence information in the current game information. Since the process of obtaining the word embedding representations corresponding to each type of local action sequence information can be completed in advance, the efficiency of obtaining the word embedding representations of the local action sequence information in the current game information is greatly improved.
[0126] Please see Figure 4 The figure exemplifies the flowchart illustrating the word embedding representation of various types of local behavior sequence information obtained according to embodiments of this application. As shown, embodiments of this application can first obtain a massive amount of local behavior sequence information of reference virtual characters in game matches, and can filter the obtained local behavior sequence information based on preset filtering rules, such as deleting local behavior sequence information containing fewer than a preset number of behaviors. Figure 4(a) shows local behavior sequence information for multiple virtual characters. It should be understood that the time windows corresponding to all local behavior sequence information are consistent, but the number of behaviors contained in different local behavior sequence information may differ. For example, the number of behaviors in the three local behavior sequence information shown in (a) is different. It should be understood that A to F in (a) represent different behaviors.
[0127] Figure 4 (b) in the diagram represents mining the relationships between the behaviors appearing in the local behavior sequence information of each reference virtual character to obtain a relationship graph. Specifically, when the number of times two consecutive behaviors appear in each local behavior sequence information is greater than a preset threshold, it is determined that the two consecutive behaviors are related. Based on this logic, behaviors that are related can be connected, and directional information can be added when connecting them. For example, if the number of times behavior 2 is executed immediately after behavior 1 in the local behavior sequence information is greater than a preset threshold, then there are two nodes in the relationship graph, where node 1 and node 2 represent behavior 1 and behavior 2 respectively, and there is a line between node 1 and node 2 pointing from node 1 to node 2.
[0128] After obtaining the relationship diagram, such as Figure 4 As shown in (c), a random walk is used to randomly select the starting point and regenerate multiple local behavior sequence information. The number of random walks and their length are hyperparameters and need to be adjusted according to the actual situation. In this embodiment, the random walk method samples the association graph to obtain the co-occurrence relationships between nodes. The regenerated local behavior sequence information can be used as training samples to feed into a model (such as word2vec, item2vec, etc.) for training, thereby obtaining word embedding vectors, i.e., embeddings.
[0129] like Figure 4 As shown in (d), by inputting the regenerated local action sequence information generated by these random walks into the word embedding model of (d), a word embedding representation corresponding to each regenerated local action sequence information is generated. It should be understood that when obtaining the feature encoding results of the local action sequence information in the current game information, it can be derived from... Figure 4 In (c) of the process, the corresponding local behavior sequence information is determined from the regenerated local behavior sequence information, and then the word embedding representation of the local behavior sequence information is used as the feature encoding result of the local behavior sequence information in the current game information.
[0130] Verified through practical applications, by acquiring local behavioral sequence information from approximately 10,000 game sessions (with a time window size of 30 seconds), feature encodings sufficient to cover local behavioral sequence information generated in almost all scenarios can be obtained.
[0131] Based on the above embodiments, as an optional embodiment, game strategy recommendations are made to the target virtual character based on the reference game strategies corresponding to each target reference game information, including:
[0132] S401. Obtain the evaluation index of each reference game strategy corresponding to each of the target reference game information;
[0133] S402. Determine the target game strategy based on the evaluation index of each reference game strategy, and generate and provide recommendation information based on the target game strategy. The recommendation information includes execution suggestion information related to the target game strategy.
[0134] This application embodiment can determine the evaluation index of each reference game strategy corresponding to the target reference game information based on the evaluation index of the game in which the target reference game information is located. Generally, after a game, the system will provide players with feedback on various evaluation indicators of the game, such as survival time, single-game ranking, number of kills, whether it is MVP, etc. Therefore, the game score can be obtained based on the various evaluation indicators of the game. The higher the score, the better the performance in the game, and correspondingly, it can be used as the evaluation index of the reference game information in a single game. Since a reference game information may appear in multiple game games, the evaluation index of the reference game information can be obtained based on the evaluation index of the reference game information in all the game games in which it appears.
[0135] It is understandable that the reference game strategy corresponding to a local behavior sequence information is usually unique, but multiple local behavior sequence information may correspond to the same reference game strategy. Therefore, for a reference game strategy, if the reference game strategy corresponds to a reference game information, the evaluation index of the reference game information is determined as the evaluation index corresponding to the reference game strategy.
[0136] If the reference game strategy corresponds to at least two reference game information sets, then the evaluation index of the reference game strategy is determined based on the evaluation indices of the at least two reference game information sets. In one embodiment, the average of the evaluation indices of the at least two reference game information sets can be used as the evaluation index of the reference game strategy. In another embodiment, the evaluation indices of the at least two reference game information sets can be weighted and summed, and the result of the weighted summation can be used as the evaluation index of the reference game strategy. This application does not limit the weight of the reference game information sets. For example, it can be determined based on the frequency of occurrence of local behavior sequence information in the reference game information set or in historical game information; the higher the frequency of occurrence, the higher the weight.
[0137] In one embodiment, this application embodiment can use the reference game strategy with the highest evaluation index as the target game strategy. The corresponding recommendation information includes execution suggestions to instruct the player to execute the target game strategy, such as "Based on calculations, it is recommended to retreat first; the win rate of retreating at this time is 90%." In another embodiment, this application embodiment can also use the reference game strategy with the lowest evaluation index as the target game strategy. The corresponding recommendation information includes execution suggestions to instruct the player not to execute the target game strategy, such as "Based on analysis, retreating is not recommended at present; the win rate of retreating at this time is 20%." In the above two examples of recommendation information, the target game strategy indicated is "retreat," and the win rate of executing this strategy is further provided to help players make decisions as quickly as possible.
[0138] Based on the above embodiments, as an optional embodiment, recommended information is provided, including:
[0139] In response to receiving a strategy provision instruction, the recommended information is provided, the strategy provision instruction being triggered by voice or a preset game control.
[0140] Please see Figure 5 The diagram illustrates, exemplarily, a schematic representation of the game interface of an embodiment of this application, such as... Figure 5As shown in (a), the game interface includes a target virtual character 501 controlled by the player, a virtual environment 502 in which the target virtual character 501 is located, an attack control 503, a movement control 504, and a voice control 505. The player can control the target virtual character 501 to move within the virtual environment 502 by performing a preset operation on the movement control 504. By performing a preset operation on the attack control 503, the player can control the target virtual character 501 to attack the target position 507 in the virtual environment 502 using virtual items 506. It should be understood that the specific attack method can change depending on the virtual item held by the target virtual character. For example, if it is a virtual shooting item, the attack method is shooting; if it is a virtual striking item, the attack method is striking. This embodiment does not impose specific limitations. When the player triggers a preset operation on the voice control 505, the terminal receives the player's voice command. This voice command can be an instruction such as "What to do now?" or "Where to go now?" used to indicate the acquisition of a strategy, i.e., a strategy provision instruction. The terminal obtains and displays recommended information. It should be understood that, in the embodiments of this application, the recommendation information can be generated by the server and returned to the terminal, or the recommendation information can be generated by the terminal itself. Figure 5 (b) further illustrates the auxiliary robot 508 and the recommendation information 509. It's important to note that the auxiliary robot is a virtual character used to assist a target virtual character during a game. Its main function is to recommend game strategies to the target virtual character. The auxiliary robot can appear around the target virtual character at the start of the game, or it can appear at a specific triggering time (e.g., when a strategy recommendation is determined). In this embodiment, the auxiliary robot appears when a game strategy recommendation is determined and disappears after a preset time after the recommendation is completed. The target game strategy corresponding to the recommendation 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 recommendation information in the illustration is positive, not negative, indicating that the target game strategy corresponding to this recommendation information belongs to the reference game strategy with the highest evaluation index.
[0141] In addition to the passive provision of recommendation information based on player actions, as described above, this application embodiment can also provide recommendation information through active triggering. Specifically, this application embodiment can provide recommendation information when the evaluation index of the obtained reference game strategy exceeds or falls below a preset threshold.
[0142] As an optional embodiment, the target game strategy of this application includes at least one of the following:
[0143] Reference game strategies with an evaluation index higher than the first threshold;
[0144] Reference game strategies with an evaluation index below the second threshold.
[0145] This application embodiment sets two thresholds to ensure that recommended information is only provided to players when a reference game strategy is found that is higher than the first threshold or lower than the second threshold. In other words, this application embodiment can control the magnitude of the two thresholds to determine the frequency of actively providing recommended information.
[0146] In one embodiment, the present application embodiment can count the time interval between two consecutive provision of recommendation information. If the time interval is greater than a preset interval threshold, the first threshold can be reduced and / or the second threshold can be increased. When the time threshold is less than the preset interval threshold, the first threshold can be increased and / or the second threshold can be reduced, thereby controlling the frequency of providing recommendation information within a reasonable range and avoiding excessively frequent or infrequent recommendations that may cause player resentment.
[0147] It should be noted that when providing recommendation information in response to a strategy provision instruction, the target game strategy corresponding to the recommendation instruction can also be a reference game strategy with an evaluation index higher than the first threshold and / or a reference game strategy with an evaluation index lower than the second threshold.
[0148] Based on the above embodiments, a recommendation switch can be further added to the game interface. When the recommendation switch is on, it means that the player wants to actively provide recommendation information. When the recommendation switch is off, recommendation information is only provided when the player triggers voice or preset game controls.
[0149] Based on the above embodiments, as an optional embodiment, in order to ensure the diversity of recommendation information, the recommendation information in this application embodiment includes an opening phrase, a target game strategy, and a recommendation reason. For example, for a positive target game strategy, the recommendation information is shown in Table 1.
[0150]
[0151] Table 1. Recommended Information Combination Methods in Embodiments of this Application
[0152] As can be seen from Table 1, this application provides multiple word templates for the three key components of the recommendation information. Thus, when providing recommendation information, word templates can be randomly selected from the three components and combined into text in natural language form, thereby improving the diversity of recommendation strategies.
[0153] Based on the above embodiments, in order to avoid providing duplicate probability values that could trigger player decisions, this application embodiment can also add win rate-related information to the cause and map the win rate into natural language for description, as shown in Table 2.
[0154]
[0155]
[0156] Table 2. Mapping Relationship between Probabilities and Natural Language in Embodiments of this Application
[0157] Please see Figure 6 The figure illustrates an exemplary flowchart of the process for providing recommendation information according to an embodiment of this application. As shown, the process includes:
[0158] S501. Set a first threshold and a second threshold, wherein the first threshold is higher than the second threshold. Create a first dialogue template for each reference game strategy, a second dialogue template for each opening phrase, and a third dialogue template for each recommendation reason.
[0159] S502. For each target reference game information, determine the reference game strategy with the highest evaluation index and the reference game strategy with the lowest evaluation index among the reference game strategies.
[0160] S503. Determine the target game strategy based on the lowest evaluation index of the reference game strategy;
[0161] S504. Randomly select a first target dialogue template from the first dialogue template of the target game strategy, randomly select a second target dialogue template from each second dialogue template, and randomly select a third target dialogue template from each third dialogue template.
[0162] S505. Construct recommendation information for natural language text based on the first target speech template, the second target speech template, and the third target speech template.
[0163] Based on the above embodiments, as an optional embodiment, the evaluation index of each reference game strategy is determined in the following way:
[0164] S601. Obtain the evaluation index of each reference game information in the reference game information set, and the reference game strategy of each reference game information;
[0165] S602. For each of the reference game strategies, if the reference game strategy corresponds to one reference match information, then the evaluation index of the reference match information is determined as the evaluation index corresponding to the reference game strategy; if the reference game strategy corresponds to at least two reference match information, then the evaluation index of the reference game strategy is determined based on the evaluation index of the at least two reference match information.
[0166] It should be noted that since the reference game information is determined from completed game matches, the actions to be performed after the corresponding time period for each reference game match are also determined. Simultaneously, the evaluation metrics of the game match containing that reference game match are also determined. Therefore, each reference game match has a defined evaluation index and reference game strategy. However, different reference game match information may correspond to the same reference game strategy. For example, a virtual character may choose to retreat when their health is low, or they may choose to retreat when they see a large number of enemies. This application embodiment considers two cases for each reference game strategy:
[0167] If the reference game strategy corresponds to a reference match information, then the evaluation index of the reference match information is determined as the evaluation index corresponding to the reference game strategy.
[0168] If the reference game strategy corresponds to at least two reference game records, then the evaluation index of the reference game strategy is determined based on the evaluation indices of the at least two reference game records. Specifically, the average of the evaluation indices of the at least two reference game records can be used as the evaluation index of the reference game strategy.
[0169] Based on the above embodiments, as an optional embodiment, the reference game information set and the reference game strategy corresponding to each reference game information in the reference game information set are obtained through the following steps, including S701 to S704:
[0170] S701. Obtain global game information of multiple historical game matches corresponding to at least one reference virtual character, wherein each global game information includes a global behavior sequence of the reference virtual character in the historical game match;
[0171] S702. Based on the preset game strategy triggering rules, determine the local behavior sequence that satisfies the triggering rules in the global behavior sequence of each global game information, wherein the triggering rules include at least one triggering rule corresponding to a game strategy.
[0172] S703. For each local behavior sequence that satisfies the triggering rule, based on the target game strategy corresponding to the triggering rule satisfied by the local behavior sequence, determine the target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence;
[0173] S704. Each of the determined target local game information is used as reference game information, and the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information.
[0174] This application embodiment first requires determining multiple reference virtual characters. Since different players have different skill levels, this application embodiment can classify the virtual characters controlled by each player according to their skill level. Virtual characters in the same category have the same or similar skill levels. It is understood that there are many ways to evaluate player skill levels, and most games determine a player's rank based on their skill level. Therefore, virtual characters can be classified based on similar or identical ranks.
[0175] Correspondingly, the reference virtual character for the target virtual character can be a virtual character of the same skill level as the player corresponding to the target virtual character, or a virtual character of a higher skill level than the player corresponding to the target virtual character, or a virtual character controlled by a player of the highest skill level. When a virtual character controlled by a player of the highest skill level is selected, the game strategies subsequently recommended to the player will be more instructive and have a higher probability of helping the player achieve victory.
[0176] The global behavior sequence in this application embodiment is a sequence of all behaviors of the reference virtual character from the start of the game to the end or defeat. It can be understood that, in addition to the global behavior sequence, the global game information may also include global virtual environment information and virtual character state information. The global virtual environment information is the virtual environment information from the start to the end of the game, and the global virtual character state information is the state information of a virtual character from the start to the end of the game.
[0177] This application embodiment can determine the local behavior sequence of the triggering rule based on the preset game measurement triggering rule for the global behavior sequence. The game strategy triggering rule of this application embodiment includes triggering time and triggering condition, wherein the triggering time is the start time of the behavior sequence that triggers the game strategy, and the triggering condition is the condition that the behavior sequence that triggers the game strategy satisfies.
[0178] The game strategies in this application embodiment can include three types: movement, combat, and resource acquisition. Movement strategies can include area movement, swimming movement, and vehicle movement, etc. Area movement refers to moving from one area in the virtual environment to another, while swimming movement and vehicle movement are classifications of movement methods. Combat strategies can include reloading ammunition, restoring health, shooting, and retreating.
[0179] For area transfers, the trigger time is the moment the character leaves the area. Triggering conditions include moving across areas and moving a distance exceeding a preset distance within a certain time. In other words, when it is determined from the global behavior sequence that the virtual character has moved from area 1 to area 2, and the virtual character has moved a distance exceeding the preset distance within a certain time, then the virtual character's behavior has triggered the area transfer strategy. Accordingly, a time window is generated starting from the moment the virtual character leaves area 1, and the behavior sequence in the global behavior sequence corresponding to this time window is used as the local behavior sequence of this game strategy.
[0180] For swimming transitions, the trigger time is the moment before swimming begins, and the triggering condition includes when the virtual character's behavior is updated to swimming. In other words, when it is determined that the virtual character has started swimming based on the global behavior sequence, the strategy to trigger a swimming transition is determined. Accordingly, a time window is generated starting from the moment before the virtual character starts swimming, and the behavior sequence in the global behavior sequence corresponding to this time window is used as the local behavior sequence of the game strategy.
[0181] For vehicle transfer, the trigger time is the moment before the virtual character begins to ride in a vehicle, and the triggering condition includes when the virtual character's behavior is updated to ride in a vehicle. That is, when it is determined from the global behavior sequence that the virtual character begins to ride in a vehicle, the strategy to trigger vehicle transfer is determined. Accordingly, a time window is generated starting from the moment before the virtual character begins to ride in a vehicle, and the behavior sequence in the global behavior sequence corresponding to this time window is used as the local behavior sequence of this game strategy.
[0182] For retreat, the trigger time includes the moment when an enemy virtual character appears in the field of vision, and the trigger condition is that there is no combat behavior for a period of time. That is to say, when it is determined from the global behavior information that there is an enemy in the virtual character's field of vision, and the virtual character has not engaged in combat behavior for a period of time, the strategy of retreat is determined. Accordingly, a time window is generated starting from the moment when an enemy virtual character appears in the virtual character's field of vision, and the behavior sequence in the global behavior sequence corresponding to the time window is used as the local behavior sequence of this game strategy.
[0183] In this embodiment, after determining the target game strategy based on the game strategy triggering rules, the local behavior sequence corresponding to the target game strategy is then determined. Since the local behavior sequence contains time information, the target local game information with corresponding time information can be obtained from the global game information. Each of the determined target local game information is used as reference game information, and the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information. This can achieve automatic search of local game information and corresponding game strategies, greatly improving overall efficiency.
[0184] Furthermore, in this embodiment of the application, when obtaining global game information of historical game matches corresponding to the reference virtual character, the corresponding evaluation indicators of the historical game matches can also be obtained. Therefore, after obtaining reference game information and the corresponding reference game strategy each time, a correspondence between reference game information, reference game strategy, and game indicators can be established. Please refer to Table 3, which exemplarily shows the correspondence table between reference game information, reference game strategy, and reference game indicators in this embodiment of the application.
[0185] XXXXXX Vehicle transfer 28 minutes 2 SSS
[0186] Table 3. Correspondence between reference game information, reference game strategies, and reference game metrics.
[0187] Table 3 shows three game metrics: survival time, single-game ranking, and single-game rating. Each row in the table records a reference game information, the corresponding reference game strategy, and various metrics of the game.
[0188] Based on the above embodiments, as an optional embodiment, the game strategy recommendation method of this application embodiment may include an offline part and an online part. The offline part includes the step of constructing an information database, which includes multiple reference game information clusters, each reference game information cluster including multiple reference game information, and also includes a reference game strategy corresponding to each reference game information, as well as an evaluation index for each reference game strategy. The online part includes retrieving the information database based on the player's current game information in the current game, obtaining the target game strategy, and recommending the game strategy.
[0189] Please see Figure 7 The figure illustrates an exemplary flowchart of the process for constructing an information database according to an embodiment of this application, as shown in the figure, including:
[0190] S801. Obtain global game information for multiple historical game matches corresponding to at least one reference virtual character, wherein each global game information includes a global behavior sequence of the reference virtual character in the historical game match;
[0191] S802. Based on the preset game strategy triggering rules, determine the local behavior sequence that satisfies the triggering rules in the global behavior sequence of each global game information, wherein the triggering rules include at least one triggering rule corresponding to the game strategy.
[0192] S803. For each local behavior sequence that satisfies the triggering rule, determine the target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence, based on the target game strategy corresponding to the triggering rule satisfied by the local behavior sequence.
[0193] S804. Take each determined target local game information as reference game information, and determine the target game strategy corresponding to the target local game information as the reference game strategy of the reference game information.
[0194] S805. Based on the virtual environment information, the corresponding virtual character's state information, and the local behavior sequence information in the reference game information, respectively, the feature encoding results are obtained after feature encoding. Then, the reference feature vectors of each reference game information are clustered to obtain multiple reference game information clusters.
[0195] S806. For each reference game strategy, determine the 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 a reference game information cluster, then the evaluation index of the reference game information is determined as the evaluation index of the reference game strategy in the reference game information cluster. If the reference game strategy corresponds to at least two reference game information in a reference game information cluster, then the evaluation index of the reference game strategy in the reference game information cluster is determined based on the evaluation indices of the at least two reference game information. That is to say, when the reference game information corresponding to a reference game strategy appears in multiple reference game information clusters, the evaluation index of the reference game strategy will also differ. The evaluation index of the reference game strategy obtained in this embodiment can more accurately reflect the quality of the reference game strategy.
[0196] S807. Construct an information database based on the multiple reference game information obtained, the reference game strategy corresponding to each reference game information, and the evaluation index of each reference game strategy.
[0197] Please see Figure 8The figure exemplifies the process of retrieving information from an information database and providing game strategies using current game information in an embodiment of this application. As shown in the figure, during a real-time game match, the current game information of the target virtual character in the current game match is obtained, including virtual environment information, the target virtual character's state information, and local behavior sequence information. Reference game information clusters matching the current game information are then retrieved from an offline information database. The offline information database in the figure includes m reference game information clusters, and the number of reference game information clusters in each cluster is not identical. Reference game information cluster 1 contains... The system includes p reference game information clusters, where each reference game information cluster m contains q reference game information clusters, and m, p, and q are all integers greater than 1. The offline database also stores the game strategy and evaluation index corresponding to each reference game information cluster. By calculating the matching degree between the current game information and each reference game information cluster, a target game information cluster is obtained. Furthermore, by combining the game strategy and evaluation index corresponding to each reference game information cluster in the target game information cluster, a target game strategy is selected. Recommendation information is generated and provided based on the target game strategy. The recommendation information includes execution suggestion information related to the target game strategy.
[0198] To better evaluate the merits of the embodiments of this application, it is compared with existing random strategies. The evaluation metric is the F1 score. Specifically, this application employs two methods: Method 1 includes only virtual environment information and the state information of the corresponding virtual character, while Method 2 includes virtual environment information, the state information of the corresponding virtual character, and local behavior sequence information. Ultimately, Method 1 of this application achieves an F1 score of 14.24, Method 2 achieves an F1 score of 17.82, and the existing random strategy achieves an F1 score of 6.9. This application doubles the performance compared to the prior art, and Method 2's F1 score is 3 higher than Method 1, further demonstrating the effectiveness of statistical local behavior sequence information.
[0199] This application provides a game strategy recommendation device, such as... Figure 9 As shown, the game strategy recommendation device may include: a game information acquisition module 901, a game matching module 902, a reference strategy activity module 903, and a strategy recommendation module 904, wherein,
[0200] The game information acquisition module 901 is used to obtain the current game information of the target virtual character in the current game game;
[0201] Match matching module 902 is used to determine at least one target reference match information based on the matching degree between each reference match information in the reference match information set and the current match information;
[0202] Reference strategy activity module 903 is used to obtain the reference game strategy corresponding to each target reference game information;
[0203] The strategy recommendation module 904 is used to recommend game strategies to the target virtual character based on the reference game strategies corresponding to each target reference game information.
[0204] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0205] As an optional implementation, for each piece of game information in the current game information and the reference game information set, the game information includes virtual environment information, the state information of the corresponding virtual character, and local behavior sequence information.
[0206] As an optional implementation, the matchmaking module includes:
[0207] The matching degree submodule is used to determine the matching degree between the current game information and multiple reference game information clusters, which are obtained by clustering the reference game information set.
[0208] The target reference game module is used to select the reference game information from the reference game information cluster with the highest matching degree as the target reference game information.
[0209] As an optional implementation, the matching degree submodule includes:
[0210] The feature vector unit is used to encode the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information in the current game information, and to obtain the current feature vector of the current game information based on the feature encoding results of the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information.
[0211] The distance determination unit is used to determine the distance between the current feature vector and the cluster center of each reference game information cluster, and to take the distance corresponding to each reference game information cluster as the matching degree corresponding to the reference game information cluster. The smaller the distance, the higher the matching degree.
[0212] The reference game information cluster is obtained by clustering the reference feature vectors of each reference game information in the reference game information set. The reference feature vector is obtained by feature encoding the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information in the reference game information.
[0213] As an optional implementation, the feature encoding result of the local behavior sequence information is the word embedding representation of the local behavior sequence information;
[0214] The eigenvector unit is specifically used for:
[0215] Determine the target category of the local behavior sequence information in the current game information, and use the word embedding representation corresponding to the target category as the word embedding representation of the local behavior sequence information in the current game information;
[0216] The word embedding representations corresponding to the local behavior sequence information of each type are obtained by training the word embedding model with reference to the local behavior sequence information of each type in the game information set.
[0217] As an optional implementation, the strategy recommendation module includes:
[0218] The evaluation index unit is used to obtain the evaluation index of each reference game strategy corresponding to each of the target reference game information;
[0219] The target strategy unit is used to determine a target game strategy based on the evaluation index of each reference game strategy, and to generate and provide recommendation information based on the target game strategy. The recommendation information includes execution suggestion information related to the target game strategy.
[0220] As an optional implementation, the target strategy unit is used for:
[0221] In response to receiving a strategy provision instruction, the recommended information is provided, the strategy provision instruction being triggered by voice or a preset game control.
[0222] As an optional implementation, the target game strategy includes at least one of the following:
[0223] At least one reference game strategy with the highest rating;
[0224] The lowest-rated reference game strategy;
[0225] Reference game strategies with an evaluation index higher than the first threshold;
[0226] Reference game strategies with an evaluation index below the second threshold.
[0227] As an optional implementation, the evaluation index of each of the reference game strategies is determined in the following manner:
[0228] Obtain the evaluation index of each reference game in the reference game information set, and the reference game strategy for each reference game;
[0229] For each of the reference game strategies, if the reference game strategy corresponds to one reference match information, then the evaluation index of the reference match information is determined as the evaluation index corresponding to the reference game strategy; if the reference game strategy corresponds to at least two reference match information, then the evaluation index of the reference game strategy is determined based on the evaluation indices of the at least two reference match information.
[0230] As an optional implementation, the reference game information set and the reference game strategy corresponding to each reference game information set are obtained in the following way:
[0231] Obtain global game information for multiple historical game matches corresponding to at least one reference virtual character, wherein each global game information includes a global behavior sequence of the reference virtual character in the historical game match;
[0232] According to the preset game strategy triggering rules, determine the local behavior sequence that satisfies the triggering rules in the global behavior sequence of each global game information, wherein the triggering rules include at least one triggering rule corresponding to the game strategy;
[0233] For each local behavior sequence that satisfies the triggering rule, the target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence is determined according to the target game strategy corresponding to the triggering rule satisfied by the local behavior sequence.
[0234] Each of the identified target local game information is used as reference game information, and the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information.
[0235] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement a method for recommending game strategies. Compared with related technologies, this method can achieve the following: by acquiring the current game information of a target virtual character in the current game, there is no need to limit the time of acquiring the current game information, that is, the game information can be acquired at any time during the game. By using the matching degree of the current game information in each reference game information domain of the pre-acquired reference game information set, at least one target reference game information matching the current game information is determined. Further, reference game strategies corresponding to each target reference game information are obtained. Based on the reference game strategies corresponding to each target reference game information, game strategies are recommended to the target virtual character. The flexibility is greatly improved, and game strategies can be recommended to the target virtual character more promptly.
[0236] In one alternative embodiment, an electronic device is provided, such as Figure 10 As shown, Figure 10 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0237] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0238] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0239] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0240] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0241] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.
[0242] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0243] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the figures or text.
[0244] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this application, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this application, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different time periods. In scenarios with different execution time periods, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and the embodiments of this application do not limit this.
[0245] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A method for recommending game strategies, characterized in that, include: Obtain the current game information of the target virtual character in the current game; At least one target reference game information is determined based on the matching degree between each reference game information in the reference game information set and the current game information, wherein the reference game information is the game information of other players in the historical game games; Obtain the reference game strategies and evaluation indices corresponding to each target's reference game information; Based on the evaluation index of the reference game strategy corresponding to each target reference game information, a reference game strategy higher than the first threshold or lower than the second threshold is recommended to the target virtual character. The time interval between two consecutive provision of recommendation information is counted. If the time interval is greater than a preset interval threshold, the first threshold is reduced and / or the second threshold is increased. If the time threshold is less than the preset interval threshold, the first threshold is increased and / or the second threshold is reduced. Specifically, at least one target reference game information is determined based on the matching degree between each reference game information in the reference game information set and the current game information, including: Feature encoding is performed on each reference game information in the current game information and reference game information clusters respectively to obtain the current feature vector of the current game information. After obtaining the reference feature vector of the reference game information, the cluster center of the reference game information cluster is obtained. The distance between the current feature vector and the cluster center of each reference game information cluster is determined. The distance corresponding to each reference game information cluster is used as the matching degree corresponding to the reference game information cluster. The smaller the distance, the higher the matching degree. The reference game information in the reference game information cluster with the highest matching degree is used as the target reference game information.
2. The method according to claim 1, characterized in that, For each game information in the current game information and the reference game information set, the game information includes virtual environment information, the state information of the corresponding virtual character, and local behavior sequence information.
3. The method according to claim 2, characterized in that, The step of performing feature encoding on the current game information and each reference game information to obtain the current feature vector of the current game information and the reference feature vectors of each reference game information includes: The virtual environment information, the corresponding virtual character's state information, and the local behavior sequence information in the current game information are respectively feature encoded. Based on the feature encoding results of the virtual environment information, the corresponding virtual character's state information, and the local behavior sequence information, the current feature vector of the current game information is obtained. Feature encoding results are obtained by performing feature encoding on the virtual environment information, the state information of the corresponding virtual character, and the local behavior sequence information in the reference game information. Based on the feature encoding results, the reference feature vector of the reference game information is obtained.
4. The method according to claim 3, characterized in that, The feature encoding result of the local behavior sequence information is the word embedding representation of the local behavior sequence information; The feature encoding of the local behavior sequence information in the current game information includes: Determine the target category of the local behavior sequence information in the current game information, and use the word embedding representation corresponding to the target category as the word embedding representation of the local behavior sequence information in the current game information; The word embedding representations corresponding to the local behavior sequence information of each type are obtained by training the word embedding model with reference to the local behavior sequence information of each type in the game information set.
5. The method according to claim 1, characterized in that, The process of recommending game strategies to the target virtual character based on the reference game strategies corresponding to each target reference game information includes: Obtain the evaluation index of each reference game strategy corresponding to each of the target reference game information; The target game strategy is determined based on the evaluation index of each reference game strategy, and recommendation information is generated and provided based on the target game strategy. The recommendation information includes execution suggestions related to the target game strategy.
6. The method according to claim 5, characterized in that, The provision of recommendation information includes: In response to receiving a strategy provision instruction, the recommended information is provided, the strategy provision instruction being triggered by voice or a preset game control.
7. The method according to claim 5, characterized in that, The target game strategy includes at least one of the following: At least one reference game strategy with the highest rating; The lowest-rated reference game strategy; Reference game strategies with an evaluation index higher than the first threshold; Reference game strategies with an evaluation index below the second threshold.
8. The method according to claim 5, characterized in that, The evaluation index for each of the aforementioned reference game strategies was determined in the following manner: Obtain the evaluation index of each reference game in the reference game information set, and the reference game strategy for each reference game; For each of the reference game strategies, if the reference game strategy corresponds to one reference match information, then the evaluation index of the reference match information is determined as the evaluation index corresponding to the reference game strategy; if the reference game strategy corresponds to at least two reference match information, then the evaluation index of the reference game strategy is determined based on the evaluation indices of the at least two reference match information.
9. The method according to claim 1, characterized in that, The reference game strategy corresponding to each reference game information in the reference game information set is obtained through the following method: Obtain global game information for multiple historical game matches corresponding to at least one reference virtual character, wherein each global game information includes a global behavior sequence of the reference virtual character in the historical game match; According to the preset game strategy triggering rules, determine the local behavior sequence that satisfies the triggering rules in the global behavior sequence of each global game information, wherein the triggering rules include at least one triggering rule corresponding to the game strategy; For each local behavior sequence that satisfies the triggering rule, the target local game information corresponding to the target game strategy in the global game information corresponding to the local behavior sequence is determined according to the target game strategy corresponding to the triggering rule satisfied by the local behavior sequence. Each of the identified target local game information is used as reference game information, and the target game strategy corresponding to the target local game information is determined as the reference game strategy of the reference game information.
10. A game strategy recommendation device, characterized in that, include: The game information acquisition module is used to obtain the current game information of the target virtual character in the current game; The match matching module is used to determine at least one target reference match information based on the matching degree between each reference match information in the reference match information set and the current match information. The reference match information is the match information of other players in their historical game matches. The reference strategy activity module is used to obtain the reference game strategy and evaluation index corresponding to each target reference game information; The strategy recommendation module is used to recommend reference game strategies that are higher than a first threshold or lower than a second threshold to the target virtual character based on the evaluation index of the reference game strategy corresponding to each target reference game information. The time interval between two consecutive provision of recommendation information is counted. If the time interval is greater than a preset interval threshold, the first threshold is reduced and / or the second threshold is increased. If the time threshold is less than the preset interval threshold, the first threshold is increased and / or the second threshold is reduced. Specifically, at least one target reference game information is determined based on the matching degree between each reference game information in the reference game information set and the current game information, including: Feature encoding is performed on each reference game information in the current game information and reference game information clusters respectively to obtain the current feature vector of the current game information. After obtaining the reference feature vector of the reference game information, the cluster center of the reference game information cluster is obtained. The distance between the current feature vector and the cluster center of each reference game information cluster is determined, and the distance corresponding to each reference game information cluster is used as the matching degree corresponding to the reference game information cluster. The smaller the distance, the higher the matching degree. The reference game information in the reference game information cluster with the highest matching degree is used as the target reference game information.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method for recommending game strategies according to any one of claims 1-9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for recommending game strategies according to any one of claims 1-9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for recommending game strategies according to any one of claims 1-9.
Citation Information
Patent Citations
Game data processing method, device thereof and equipment and computer readable storage medium
CN113599827A