Game interaction method, device, system and computer readable storage medium
By acquiring the location and behavior information of virtual controlled characters, and using a neural network model to evaluate non-player characters and generate control commands, the problem of insufficient flexibility and intelligence in the interaction process of non-player characters is solved, thereby improving the interactive fun of the game and the player experience.
Patent Information
- Application Number
- CN202210839017.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-07-15
AI Technical Summary
In existing technologies, the interaction between non-player characters and controlled virtual characters is characterized by low flexibility and intelligence, resulting in a poor gaming experience for players.
By acquiring the location and behavior information of the virtual controlled character, and using a preset game map and neural network model, the system evaluates the target non-player character and generates matching control commands to control the non-player character to interact with the controlled character.
It enhances the interactive fun and player experience in the game, strengthens user engagement, and prevents players from repeatedly triggering interactions with non-player characters in the game.
Smart Images

Figure CN115245682B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of games, in particular to a game interaction method, device, system and computer readable storage medium. BACKGROUND
[0002] In an application based on a virtual environment, such as a Multi-Player Online Game (MMOG), a user can control different virtual characters, such as a virtual character controlled by the user being a strategist. Multiple virtual characters controlled by users can form a team online and cooperate to complete a task in the same virtual environment.
[0003] To enrich the game scene, many games cannot be absent of non-player characters (NPCs). In an actual game process, a controlled virtual character can interact with an NPC or other NPCs. In the current technical solution, for an NPC, if the dialogue text of the dialogue object is detected during the interaction with the NPC, a fixed reply text corresponding to the dialogue text is directly queried based on the dialogue text, and then the NPC is controlled to dialogue based on the fixed reply text.
[0004] However, the fixed reply text is usually irrelevant to the dialogue scene of the NPC, and since the player often mistakenly triggers the interaction scene with the NPC when controlling the controlled virtual character, the player needs to repeatedly perform the dialogue, which is very annoying.
[0005] In summary, the flexibility and intelligence of the interaction process between the NPC and the controlled virtual character are low, which makes the game experience of the player poor. SUMMARY
[0006] The main purpose of the present application is to provide a game interaction method, device, system and computer readable storage medium. The purpose is to solve the problem that the flexibility and intelligence of the interaction process between the NPC and the controlled virtual character are low.
[0007] To achieve the above purpose, the present application provides a game interaction method, which comprises the following steps:
[0008] obtaining position information and behavior information of a virtual controlled character, and obtaining a target virtual NPC corresponding to the virtual controlled character according to the position information and a preset game map;
[0009] According to the behavior information and a preset neural network model, the target virtual non-player character is controlled to make an emotional judgment on the virtual controlled character, and a judgment result is obtained;
[0010] A control command matched with the judgment result is generated, and an interactive operation corresponding to the control command is controlled to be performed by the target virtual non-player character.
[0011] Optionally, the step of obtaining the target virtual non-player character corresponding to the virtual controlled character according to the position information and a preset game map comprises:
[0012] According to the position information, a plurality of first non-player characters within a preset range of the virtual controlled character in a preset game map are obtained;
[0013] First attribute information of the plurality of first non-player characters and second attribute information of the virtual controlled character are respectively obtained;
[0014] The second attribute information is matched with the first attribute information, and a matching result is obtained;
[0015] According to the matching result, the target virtual non-player character corresponding to the virtual controlled character is determined.
[0016] Optionally, after the step of obtaining the plurality of first non-player characters within the preset range of the virtual controlled character in the preset game map according to the position information, the method further comprises:
[0017] The distances between the virtual controlled character and the plurality of first non-player characters are obtained;
[0018] According to the distances and a preset time length, distance change values between the virtual controlled character and the plurality of first non-player characters within the preset time length are respectively obtained;
[0019] According to the distance change values, the target virtual non-player character corresponding to the virtual controlled character is determined.
[0020] Optionally, the step of controlling the target virtual non-player character to make an emotional judgment on the virtual controlled character according to the behavior information and a preset neural network model, and obtaining a judgment result comprises:
[0021] Action information and speech information in the behavior information are obtained, and the action information and the speech information are input into a preset neural network model;
[0022] The preset neural network model is controlled to make an emotional judgment on the action information and the speech information respectively, and outputs judgment results corresponding to the action information and the speech information.
[0023] Optionally, the step of controlling the preset neural network model to perform sentiment evaluation on the action information and the speech information respectively, and output evaluation results corresponding to the action information and the speech information comprises:
[0024] According to the preset neural network model, a good value and an aversion value corresponding to the action information and the speech information are respectively obtained;
[0025] The good value and the aversion value are weighted and summed to obtain a target evaluation value corresponding to the virtual controlled character;
[0026] According to the target evaluation value and a preset evaluation table, an evaluation result corresponding to the target evaluation value is output.
[0027] Optionally, before the step of generating a control command matched with the evaluation result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command, the game interaction device further comprises:
[0028] An activity event of the virtual controlled character is obtained;
[0029] The step of generating a control command matched with the evaluation result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command comprises:
[0030] According to the evaluation result, a control command corresponding to the activity event is generated, and the target virtual non-player character is controlled to set an additional trigger event corresponding to the activity event and the control command.
[0031] Optionally, the evaluation result comprises a good level;
[0032] The step of generating a control command corresponding to the activity event according to the evaluation result, and controlling the target virtual non-player character to set an additional trigger event corresponding to the activity event and the control command comprises:
[0033] According to the good level, a control command corresponding to the activity event is generated, wherein the control command comprises a difficult command, a medium command, a simple command, and a keep command;
[0034] According to the difficult command, the medium command, the simple command, and the keep command, a difficult trigger event, a medium trigger event, a simple trigger event, and a keep trigger event corresponding to the activity event are respectively set by the target virtual non-player character.
[0035] In addition, to achieve the above-mentioned purposes, the game interaction device comprises:
[0036] an analysis module, configured to acquire position information and behavior information of a virtual controlled role, and acquire a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map;
[0037] a judgment module, configured to control the target virtual non-player character to perform emotional judgment on the virtual controlled role according to the behavior information and a preset neural network model, and obtain a judgment result;
[0038] a control module, configured to generate a control command matched with the judgment result, and control the target virtual non-player character to perform an interactive operation corresponding to the control command.
[0039] In addition, to achieve the above object, the present application further provides a game interactive system, which comprises a game interactive device, a memory, a processor, and a game interactive program stored in the memory and executable on the processor, and the game interactive program realizes the steps of the game interactive method when executed by the processor.
[0040] In addition, to achieve the above object, the present application further provides a computer readable storage medium, which stores a game interactive program, and the game interactive program realizes the steps of the game interactive method when executed by a processor.
[0041] The present application provides a game interactive method, device, system and computer readable storage medium, comprising the following steps: acquiring position information and behavior information of a virtual controlled role, and acquiring a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map; controlling the target virtual non-player character to perform emotional judgment on the virtual controlled role according to the behavior information and a preset neural network model, and obtaining a judgment result; generating a control command matched with the judgment result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command. Through the above method, the present application can control the non-player character to interact with the player in different types in the game based on the behavior of the player, and can select the corresponding non-player character to interact according to the position information of the player, avoid the player repeatedly triggering the interaction of the non-player character in the game, and at the same time, based on the behavior of the player, feedback different interactive operations to the player, improve the interest in the game, improve the experience of the player in the game, and further enhance the user stickiness. BRIEF DESCRIPTION OF DRAWINGS
[0042] Figure 1 is the device structure schematic diagram of the hardware running environment involved in the embodiment scheme of the present application;
[0043] Figure 2 is a flowchart of an embodiment of the game interaction method of the present application.
[0044] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0045] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0046] As shown in Figure 1 , the terminal structure shown in Figure 1 is a schematic diagram of the terminal structure of the hardware running environment involved in the embodiment of the present application.
[0047] The terminal of the embodiment of the present application can be a computer, or a smart phone, a tablet computer, a portable computer or other movable terminal device with display function.
[0048] As shown in Figure 1 , the terminal can include a processor 1001 such as a CPU, a communication bus 1002, a user interface 1003, a DVI interface 1004, a USB interface 1005 and a memory 1006. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 can include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 can further include a standard wired interface and a wireless interface. The DVI interface 1004 can optionally include a standard wired interface and is connected with other external devices through a DVI line. The USB interface 1005 can optionally include a standard wired interface and is connected with other external devices through a USB connection line. The memory 1006 can be a high-speed RAM memory or a stable memory (non-volatile memory) such as a disk memory. The memory 1006 can optionally be a storage device independent of the aforementioned processor 1001.
[0049] Optionally, the terminal can further include an audio circuit and the like, which will not be described here.
[0050] Those skilled in the art can understand that the terminal structure shown in Figure 1 does not constitute a limitation on the terminal, and can include more or fewer components than shown in the figure, or combine certain components, or different component arrangements.
[0051] As shown in Figure 1As shown, the memory 1006 as a computer storage medium can include an operating system, a DVI interface module, a USB interface module, a user interface module, and a blockchain-based game interaction program.
[0052] In Figure 1 In the terminal shown, the DVI interface 1004 is mainly used to connect external devices and communicate data with the external devices; the USB interface 1005 is mainly used to connect external devices and communicate data with the external devices; the user interface 1003 is mainly used to connect clients and communicate data with the clients; and the processor 1001 can be used to call the blockchain-based game interaction program stored in the memory 1006 and perform the following operations:
[0053] Obtain position information and behavior information of a virtual controlled role, and obtain a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map;
[0054] According to the behavior information and a preset neural network model, control the target virtual non-player character to perform emotional evaluation on the virtual controlled role, and obtain an evaluation result;
[0055] Generate a control command matched with the evaluation result, and control the target virtual non-player character to perform an interactive operation corresponding to the control command.
[0056] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006 and further perform the following operations:
[0057] According to the position information, obtain a plurality of first non-player characters within a preset range of the virtual controlled role in a preset game map;
[0058] Respectively obtain first attribute information of a plurality of the first non-player characters, and second attribute information of the virtual controlled role;
[0059] Match the second attribute information with a plurality of the first attribute information to obtain a matching result;
[0060] According to the matching result, determine a target virtual non-player character corresponding to the virtual controlled role.
[0061] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006 and further perform the following operations:
[0062] Obtain distances between the virtual controlled role and a plurality of the first non-player characters;
[0063] According to the distance and a preset time length, a distance change value between the virtual controlled role and the first non-player role within the preset time length is obtained respectively;
[0064] According to the distance change value, a target virtual non-player role corresponding to the virtual controlled role is determined.
[0065] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006, and further perform the following operations:
[0066] Obtain the action information and the speech information in the behavior information, and input the action information and the speech information into a preset neural network model;
[0067] Control the preset neural network model to respectively perform sentiment evaluation on the action information and the speech information, and output an evaluation result corresponding to the action information and the speech information.
[0068] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006, and further perform the following operations:
[0069] According to the preset neural network model, a like value and a dislike value corresponding to the action information and the speech information are obtained respectively;
[0070] The like value and the dislike value are weighted and summed to obtain a target evaluation value corresponding to the virtual controlled role;
[0071] According to the target evaluation value and a preset evaluation table, an evaluation result corresponding to the target evaluation value is output.
[0072] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006, and further perform the following operations:
[0073] Obtain the activity event of the virtual controlled role;
[0074] The step of generating a control command matched with the evaluation result and controlling the target virtual non-player role to perform an interactive operation corresponding to the control command comprises:
[0075] According to the evaluation result, a control command corresponding to the activity event is generated, and the target virtual non-player role is controlled to set an additional trigger event corresponding to the activity event and the control command.
[0076] Further, the processor 1001 can call the blockchain-based game interaction program stored in the memory 1006, and further perform the following operations:
[0077] generate a control command corresponding to the activity event according to the favor level, wherein the control command comprises a difficult command, a medium command, a simple command and a keep command;
[0078] control the target virtual non-player character to set a difficult trigger event, a medium trigger event, a simple trigger event and a keep trigger event corresponding to the activity event according to the difficult command, the medium command, the simple command and the keep command.
[0079] The specific embodiments of the game transaction device of the application are basically the same as the following embodiments of the game interaction program based on the blockchain, and are not described here.
[0080] Please refer to Figure 2 , Figure 2 The game interaction method provided in the first embodiment of the application includes the following steps:
[0081] In step S10, the position information and the behavior information of the virtual controlled character are acquired, and a target virtual non-player character corresponding to the virtual controlled character is acquired according to the position information and a preset game map;
[0082] In this embodiment, the virtual controlled character is a virtual character created by a game user through a game account; the non-player character is a virtual character set in the game to promote the game; the position information is the position of the virtual controlled character in the game; and the behavior information is the action and the statement of the virtual controlled character in the game, such as an attack action and a statement in chat or a message.
[0083] In an embodiment, the step S10 includes:
[0084] In step A11, a plurality of first non-player characters within a preset range of the virtual controlled character in the preset game map are acquired according to the position information;
[0085] In this embodiment, the preset range can be a circle with the virtual controlled character as the center and 1 meter, 2 meters or 3 meters as the radius, which is defined according to the scale of the map in the game. Different preset ranges can be set by those skilled in the art according to needs, and the application is not limited herein. Since there can be multiple non-player characters in a game, a plurality of first non-player characters within the preset range of the virtual controlled character are acquired in real time according to the real-time position information of the virtual controlled character.
[0086] In step A12, first attribute information of the plurality of first non-player characters and second attribute information of the virtual controlled character are acquired respectively;
[0087] In the embodiment, the first attribute information includes a task event to which the current first non-player character belongs and a function of the first non-player character, for example, the task event to which the current first non-player character belongs is task one, and the function of the first non-player character is buying and selling, and the first attribute is the attribute of task one and the attribute of buying and selling. The second attribute information includes a task event in which the current virtual controlled player is located and a state of the virtual controlled player, for example, the task event includes task one, task two or task three, and the state of the virtual controlled player, for example, low blood volume, few props and the like. It should be noted that the state of the virtual controlled player matches the function of the first non-controlled player, for example, low blood volume corresponds to the function of treatment, and few props correspond to the functions of buying and selling or casting and the like. Specifically, a corresponding table of functions and states can be set in the game, so as to match the subsequent according to the corresponding table.
[0088] Step A13, matching the second attribute information with a plurality of first attribute information to obtain a matching result;
[0089] Step A14, determining a target virtual non-player character corresponding to the virtual controlled character according to the matching result.
[0090] In the embodiment, the task event in the second attribute information is matched with the task event in a plurality of first attribute information, if the task event in the plurality of first attribute information matches the task event in the second attribute, it is determined that the first non-player character corresponding to the matched first attribute information is the target virtual non-player character. Meanwhile, the state information in the second attribute information is matched with the function in a plurality of first attribute information, if the function in the plurality of first attribute information matches the state in the second attribute, it is determined that the first non-player character corresponding to the matched first attribute information is the target virtual non-player character.
[0091] In an embodiment, the step S10 further includes:
[0092] Step A15, obtaining a distance between the virtual controlled character and a plurality of first non-player characters;
[0093] Step A16, respectively obtaining a distance change value between the virtual controlled character and a plurality of first non-player characters within a preset time length according to the distance and the preset time length;
[0094] Step A17, determining a target virtual non-player character corresponding to the virtual controlled character according to the distance change value.
[0095] In the embodiment, the distance is a distance defined by a scale of a map in the game. The preset time length can be 0.5s, 1s or 1.5s, and a person skilled in the art can set different preset time lengths according to actual needs, which are not limited in the present application. Since the controlled virtual character needs to move towards the first non-player character, the target virtual non-player character can be determined only according to the distance change value between the controlled virtual character and the first non-player character. After the distance change value between the virtual controlled character and the first non-player character is obtained, the first non-player character with the maximum distance change value can be determined as the target virtual non-player character. It should be noted that, since there are impassable areas in the game map, the above distance is the distance of the specific path in the map, rather than the displacement distance. In addition, in order to avoid the controlled virtual character from colliding with other non-player characters on the path during the travel, and thus causing misjudgment, the first attribute information and the second attribute information can be combined for joint judgment. Through the above method of determining the non-player character, the problem that the virtual controlled character mistakenly touches the non-player character, and thus the player experience is not high, is avoided.
[0096] In step S20, the target virtual non-player character is controlled to make emotional judgment on the virtual controlled character according to the behavior information and a preset neural network model, and a judgment result is obtained.
[0097] In the embodiment, the preset neural network model is used to judge whether the behavior information of the virtual controlled character is a negative behavior or a positive behavior. The negative behavior is, for example, beating a non-player character, making remarks that are not conducive to the game and do not conform to social customs, etc. The positive behavior is, for example, friendly conversation with a non-player character, or friendly action to a non-player character, etc.
[0098] In an embodiment, step S20 further includes:
[0099] In step A21, action information and remark information in the behavior information are obtained, and the action information and the remark information are input into a preset neural network model.
[0100] In the embodiment, the behavior information includes action information and remark information. The action information includes actions of the virtual controlled character to the non-player character, including attack actions and other special actions preset in the game, etc. The remark information includes the speaking content of the virtual controlled character in a forum or an open chat. The behavior information of the virtual controlled character in the game process can be monitored at any time, and the behavior information is input into the preset neural network model.
[0101] Step A22, controlling the preset neural network model to perform sentiment evaluation on the action information and the speech information respectively, and outputting evaluation results corresponding to the action information and the speech information.
[0102] In an embodiment, the step A22 further includes:
[0103] Step A221, obtaining corresponding like values and dislike values of the action information and the speech information according to the preset neural network model;
[0104] In this embodiment, each action information and speech information has corresponding like values and dislike values. For example, if the action information is to attack a non-player character, there is a corresponding dislike value, and if the speech information is to make violent speeches, there is also a dislike value. If the action information is to show kindness to a non-player character, or the speech information is to make friendly and complimentary speeches, there is a like value. The like values and dislike values of the virtual controlled character in a preset time period can be obtained, and then the next operation is performed.
[0105] Step A222, performing weighted summation on the like values and the dislike values to obtain a target evaluation value corresponding to the virtual controlled character;
[0106] In this embodiment, since the virtual controlled character may cause both like values and dislike values, it is necessary to judge between the two, and then judge whether the character's all behaviors ultimately cause dislike or like. The coefficients of the weighted summation can be 0.5 and 0.5 respectively.
[0107] Step A223, outputting an evaluation result corresponding to the target evaluation value according to the target evaluation value and a preset evaluation table.
[0108] In this embodiment, the target evaluation value can be high or low, so a preset evaluation table is used to divide the evaluation values into different intervals in advance, so that the target evaluation value can obtain an evaluation result according to the preset evaluation table. The evaluation result can be divided into levels one to ten. The first five levels can be divided into dislike degrees, and the last five levels can be divided into like degrees. The higher the level, the higher the like degree.
[0109] Step S30, generating a control command matched with the evaluation result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command.
[0110] In an embodiment, the step S30 further includes:
[0111] Step A301, obtaining an activity event of the virtual controlled character;
[0112] In the embodiment, the activity event is a game activity in which the virtual controlled character is participating.
[0113] The step S30 comprises:
[0114] The step A31 comprises: generating a control command corresponding to the activity event according to the evaluation result, and controlling the target virtual non-player character to set an additional trigger event corresponding to the activity event and the control command.
[0115] In an embodiment, the step A31 further comprises:
[0116] The step A311 comprises: generating a control command corresponding to the activity event according to the affection level, wherein the control command comprises a difficult command, a medium command, a simple command and a keep command.
[0117] The step A312 comprises: controlling the target virtual non-player character to set a difficult trigger event, a medium trigger event, a simple trigger event and a keep trigger event corresponding to the activity event according to the difficult command, the medium command, the simple command and the keep command, respectively.
[0118] In the embodiment, the control command is a command corresponding to the evaluation result, and different commands can be set for the activity event of the virtual controlled character, including a difficult command, a medium command, a simple command and a keep command, and a mute command, etc. The difficult command, the medium command, the simple command and the keep command can set different difficulties for the activity in which the virtual controlled character is participating, for example, increasing the number of wild monsters, reducing the rewards obtained by the player after completing the activity, experience, etc. A person skilled in the art can set different difficulty trigger events according to the needs, and the present application does not limit this.
[0119] The application provides a game interaction method, comprising the following steps: acquiring position information and behavior information of a virtual controlled role, acquiring a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map, controlling the target virtual non-player character to make an emotional judgment on the virtual controlled role according to the behavior information and a preset neural network model, and obtaining a judgment result, generating a control command matched with the judgment result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command. Through the above method, the application can control the non-player character to interact with the player in different types in the game based on the behavior of the player, and can select the corresponding non-player character to interact according to the position information of the player, avoid the player repeatedly triggering the interaction of the non-player character in the game, and at the same time, based on the behavior of the player, feedback different interactive operations to the player, improve the interest in the game, improve the experience of the player in the game, and further enhance the user stickiness.
[0120] Further, the second embodiment of the game interaction method of the application provides a game interaction device, which comprises:
[0121] an analysis module, configured to acquire position information and behavior information of a virtual controlled role, and acquire a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map;
[0122] a judgment module, configured to control the target virtual non-player character to make an emotional judgment on the virtual controlled role according to the behavior information and a preset neural network model, and obtain a judgment result;
[0123] a control module, configured to generate a control command matched with the judgment result, and control the target virtual non-player character to perform an interactive operation corresponding to the control command.
[0124] The implementation scheme in the embodiment can refer to the above embodiment, and the application will not be described here.
[0125] In addition, the embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a game interaction program based on a blockchain, and the game interaction program based on the blockchain performs the following operations when executed by a processor:
[0126] acquire position information and behavior information of a virtual controlled role, and acquire a target virtual non-player character corresponding to the virtual controlled role according to the position information and a preset game map;
[0127] control the target virtual non-player character to make an emotional judgment on the virtual controlled role according to the behavior information and a preset neural network model, and obtain a judgment result;
[0128] generating a control command matched with the evaluation result, and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command.
[0129] Further, the game interaction program based on the blockchain, when executed by the processor, further implements the following operations:
[0130] The step of obtaining the target virtual non-player character corresponding to the virtual controlled character according to the position information and a preset game map comprises:
[0131] According to the position information, a plurality of first non-player characters within a preset range of the virtual controlled character in the preset game map are obtained.
[0132] First attribute information of the plurality of first non-player characters and second attribute information of the virtual controlled character are respectively obtained.
[0133] The second attribute information is matched with the plurality of first attribute information to obtain a matching result.
[0134] According to the matching result, a target virtual non-player character corresponding to the virtual controlled character is determined.
[0135] Further, the game interaction program based on the blockchain, when executed by the processor, further implements the following operations:
[0136] After the step of obtaining a plurality of first non-player characters within a preset range of the virtual controlled character in the preset game map according to the position information, the following further comprises:
[0137] The distance between the virtual controlled character and the plurality of first non-player characters is obtained.
[0138] According to the distance and a preset time length, distance change values between the virtual controlled character and the plurality of first non-player characters within the preset time length are respectively obtained.
[0139] According to the distance change values, a target virtual non-player character corresponding to the virtual controlled character is determined.
[0140] Further, the game interaction program based on the blockchain, when executed by the processor, further implements the following operations:
[0141] The step of controlling the target virtual non-player character to perform emotional evaluation on the virtual controlled character according to the behavior information and a preset neural network model, and obtaining an evaluation result comprises:
[0142] obtain action information and speech information in the behavior information, and input the action information and the speech information into a preset neural network model;
[0143] control the preset neural network model, perform emotion evaluation on the action information and the speech information respectively, and output evaluation results corresponding to the action information and the speech information.
[0144] Further, the blockchain-based game interaction program executed by the processor further implements the following operations:
[0145] The step of controlling the preset neural network model, performing emotion evaluation on the action information and the speech information respectively, and outputting evaluation results corresponding to the action information and the speech information includes:
[0146] According to the preset neural network model, obtain a like value and a dislike value corresponding to the action information and the speech information respectively;
[0147] Weighted sum of the like value and the dislike value to obtain a target evaluation value corresponding to the virtual controlled character;
[0148] According to the target evaluation value and a preset evaluation table, output an evaluation result corresponding to the target evaluation value.
[0149] Further, the blockchain-based game interaction program executed by the processor further implements the following operations:
[0150] The step of generating a control command matched with the evaluation result and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command further includes:
[0151] Obtain an activity event of the virtual controlled character;
[0152] The step of generating a control command matched with the evaluation result and controlling the target virtual non-player character to perform an interactive operation corresponding to the control command includes:
[0153] According to the evaluation result, generate a control command corresponding to the activity event, and control the target virtual non-player character to set an additional trigger event corresponding to the activity event and the control command.
[0154] Further, the blockchain-based game interaction program executed by the processor further implements the following operations:
[0155] The evaluation result includes a like level;
[0156] The step of generating a control command corresponding to the activity event according to the evaluation result and controlling the target virtual non-player character to set an additional trigger event corresponding to the activity event and the control command comprises:
[0157] Generating a control command corresponding to the activity event according to the favor level, wherein the control command comprises a difficult command, a medium command, a simple command and a keep command;
[0158] Controlling the target virtual non-player character to set a difficult trigger event, a medium trigger event, a simple trigger event and a keep trigger event corresponding to the activity event according to the difficult command, the medium command, the simple command and the keep command.
[0159] The specific embodiments of the computer readable storage medium of the present application are basically the same as the above-mentioned embodiments of the game interaction program based on the blockchain, and are not repeated here.
[0160] It should be noted that in this paper, the term "including", "containing" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or system including the element.
[0161] The above-mentioned embodiment numbers of the present application are only for description, not representing the advantages and disadvantages of the embodiments.
[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by software and necessary general hardware platform, of course, also can be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, including a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner or network device) execute the method described in each embodiment of the present application.
[0163] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A game interaction method, characterized in that, The game interaction method includes the following steps: Obtain the location and behavior information of the virtual controlled character, and obtain the target virtual non-player character corresponding to the virtual controlled character based on the location information and the preset game map; Based on the behavioral information and a preset neural network model, the target virtual non-player character is controlled to perform emotional judgment on the virtual controlled character and obtain the judgment result; Generate a control command that matches the evaluation result, and control the target virtual non-player character to perform the interactive operation corresponding to the control command; The step of obtaining the target virtual non-player character corresponding to the virtual controlled character based on the location information and the preset game map includes: Based on the location information, obtain several first non-player characters within a preset range of the virtual controlled character in the preset game map; Acquire first attribute information of several first non-player characters and second attribute information of the virtual controlled character respectively. The first attribute information includes the task event to which the first non-player character belongs and the function given to the first non-player character. The second attribute information includes the task event to which the virtual controlled player is currently located and the state of the virtual controlled player. The task events in the second attribute information are matched with several task events in the first attribute information. If several task events in the first attribute information match task events in the second attribute information, then the first non-player character corresponding to the matched first attribute information is determined to be the target virtual non-player character. The status information in the second attribute information is matched with the functions in several first attribute information. If the functions in several first attribute information match the status in the second attribute information, the first non-player character corresponding to the matched first attribute information is determined to be the target virtual non-player character. The step of obtaining several first non-player characters within a preset range of the virtual controlled character in a preset game map based on the location information further includes: Obtain the distance between the virtual controlled character and several of the first non-player characters, wherein the distance is the distance of a specific path in the map; Based on the distance and the preset duration, the distance change values between the virtual controlled character and several first non-player characters within the preset duration are obtained respectively. The target virtual non-player character corresponding to the virtual controlled character is determined based on the first non-player character with the largest distance change value, the first attribute information, and the second attribute information.
2. The game interaction method as described in claim 1, characterized in that, The step of controlling the target virtual non-player character to perform emotional judgment on the virtual controlled character based on the behavioral information and a preset neural network model, and obtaining the judgment result, includes: Obtain action information and speech information from the behavioral information, and input the action information and speech information into a preset neural network model; The preset neural network model is controlled to perform emotion evaluation on the action information and the speech information respectively, and output the evaluation results corresponding to the action information and the speech information.
3. The game interaction method as described in claim 2, characterized in that, The step of controlling the preset neural network model to perform sentiment evaluation on the action information and the speech information respectively, and outputting the evaluation results corresponding to the action information and the speech information includes: Based on the preset neural network model, the favorability and aversion values corresponding to the action information and the speech information are obtained respectively; The favorability and aversion values are weighted and summed to obtain the target evaluation value corresponding to the virtual controlled character. Based on the target evaluation value and the preset evaluation table, output the evaluation result corresponding to the target evaluation value.
4. The game interaction method as described in claim 3, characterized in that, Before the step of generating a control command that matches the evaluation result and controlling the target virtual non-player character to perform the interactive operation corresponding to the control command, the method further includes: Obtain the activity events of the virtual controlled character; The steps of generating a control command that matches the evaluation result and controlling the target virtual non-player character to perform the interactive operation corresponding to the control command include: Based on the evaluation result, a control command corresponding to the activity event is generated, and the target virtual non-player character is controlled to set additional trigger events corresponding to the activity event and the control command.
5. The game interaction method as described in claim 4, characterized in that, The evaluation results include a level of favorability; The step of generating a control command corresponding to the activity event based on the evaluation result, and controlling the target virtual non-player character to set additional trigger events corresponding to the activity event and the control command, includes: Based on the favorability level, control commands corresponding to the activity events are generated, wherein the control commands include difficult commands, medium commands, easy commands, and hold commands; Based on the difficult command, the medium command, the easy command, and the hold command, the target virtual non-player character is controlled to set the difficult trigger event, the medium trigger event, the easy trigger event, and the hold trigger event corresponding to the activity event, respectively.
6. A game interaction device, characterized in that, The game interaction device includes: The analysis module is used to obtain the location and behavior information of the virtual controlled character, and to obtain the target virtual non-player character corresponding to the virtual controlled character based on the location information and the preset game map; The evaluation module is used to control the target virtual non-player character to perform emotional evaluation on the virtual controlled character based on the behavioral information and a preset neural network model, and to obtain the evaluation result; The control module is used to generate control commands that match the evaluation results and control the target virtual non-player character to perform interactive operations corresponding to the control commands. Specifically, the analysis module is used for: Based on the location information, obtain several first non-player characters within a preset range of the virtual controlled character in the preset game map; Acquire first attribute information of several first non-player characters and second attribute information of the virtual controlled character respectively. The first attribute information includes the task event to which the first non-player character belongs and the function given to the first non-player character. The second attribute information includes the task event to which the virtual controlled player is currently located and the state of the virtual controlled player. The task events in the second attribute information are matched with several task events in the first attribute information. If several task events in the first attribute information match task events in the second attribute information, then the first non-player character corresponding to the matched first attribute information is determined to be the target virtual non-player character. The status information in the second attribute information is matched with the functions in several first attribute information. If the functions in several first attribute information match the status in the second attribute information, the first non-player character corresponding to the matched first attribute information is determined to be the target virtual non-player character. The analysis module is further configured to obtain the distance between the virtual controlled character and several first non-player characters, wherein the distance is the distance of a specific path on the map; based on the distance and a preset duration, obtain the distance change value between the virtual controlled character and several first non-player characters within the preset duration; and determine the target virtual non-player character corresponding to the virtual controlled character based on the first non-player character with the largest distance change value, the first attribute information, and the second attribute information.
7. A game interaction system, characterized in that, The game interaction system includes a game interaction device, a memory, a processor, and a game interaction program stored in the memory and executable on the processor. When the game interaction program is executed by the processor, it implements the steps of the game interaction method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a game interaction program, which, when executed by a processor, implements the steps of the game interaction method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
NPC control method based on artificial intelligence, NPC control device based on artificial intelligence, equipment and medium
CN110496394A