A method, device, equipment and storage medium for controlling a game character
By identifying and classifying the player's voice information and matching preset command modes, the problems of low freedom and efficiency in game character control methods are solved, and fast and accurate game character control is achieved, improving user experience.
Patent Information
- Application Number
- CN202411014971.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The existing game character control methods limit the freedom of game characters and the low input efficiency of control commands, resulting in delayed game character operation and affecting the user's gaming experience.
By obtaining player voice information, voice attribute recognition and classification processing, matching preset command modes based on tone information and content information, target game control commands are determined, and voice control of game characters is realized.
It improves the input efficiency of control commands, avoids delay in game character operation, and improves the user's gaming experience.
Smart Images

Figure CN118976240B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a method, device, equipment, and storage medium for controlling game characters. Background Art
[0002] In the game world, game characters can have various states. For example, they can run, jump, attack, die, be happy, etc. The expressions or behaviors of game characters can be controlled by setting corresponding control commands. Game character control is mainly a mechanism for operating and controlling characters in a game, and this control can be achieved through the player's input, thereby affecting the behavior of the character and the game process. In different game types, the ways and importance of character control also vary.
[0003] In related technologies, control commands are usually input through a physical controller or a touch screen, and game characters are controlled according to the control commands. However, the existing game character control methods limit the degree of freedom of controlling game characters. Control commands can only be input by selecting fixed identifiers displayed on the touch screen or the physical controller, thereby controlling the activities of game characters. Moreover, the method of inputting control commands through a physical controller or a touch screen will also cause a delay in the operation of game characters due to low input efficiency, thus affecting the user's gaming experience. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, equipment, and storage medium for controlling game characters, which solve the problems that the existing game character control methods limit the degree of freedom of game characters and the low input efficiency of control commands causes delays in the operation of game characters. It can control game characters through voice, can freely control game characters, improves the input efficiency of control commands, avoids delays in game characters, and correspondingly enhances the user's gaming experience.
[0005] In a first aspect, the embodiments of the present application provide a method for controlling game characters, including:
[0006] Obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes multiple pieces of voice information for controlling different game characters;
[0007] Classify and process the player voice information according to the timbre information in the voice attribute information, and determine the corresponding character voice attribute information and character content information for each game character according to the classification result;
[0008] Match the character voice attribute information with a preset command pattern, and determine a target command pattern according to the matching result;
[0009] Perform content analysis on the character content information, and determine the target game control instruction in the target command mode according to the analysis result. The target command mode includes multiple game control instructions;
[0010] Control the corresponding game character according to the target game control instruction.
[0011] Optionally, the player voice information includes multiple character voice attribute information and multiple character content information. Classify the player voice information according to the timbre information in the voice attribute information, and determine the character voice attribute information and character content information corresponding to each game character according to the classification result, including:
[0012] Determine the first association relationship between each timbre information and each character voice attribute information and each character content information;
[0013] Classify the player voice information according to the first association relationship, and determine the character voice attribute information and character content information corresponding to each game character in the classification result according to the preset second association relationship.
[0014] Optionally, the classifying the player voice information according to the first association relationship and determining the character voice attribute information and character content information corresponding to each game character in the classification result according to the preset second association relationship includes:
[0015] Determine each timbre information and the character voice attribute information and character content information associated with each timbre information as the same classification information according to the first association relationship;
[0016] Determine the game characters associated with the timbre information in each classification information according to the second association relationship, and the character voice attribute information and character content information corresponding to each game character.
[0017] Optionally, the determining the first association relationship between each timbre information and each character voice attribute information and each character content information includes:
[0018] Respectively determine the first start time point and timbre detection duration of each timbre information, and the second start time point and each attribute detection duration of each voice attribute in the character voice attribute information;
[0019] Compare the first start time point with the second start time point to obtain a first comparison result, compare the timbre detection duration with each attribute detection duration to obtain a second comparison result, calculate the content length according to the timbre detection duration and the speech rate information in the character voice attribute information, and obtain a third comparison result by comparing the content length with the content length in each character content information;
[0020] Based on the first comparison result, the second comparison result, and the third comparison result, associate each timbre information with the corresponding character voice attribute information and character content information to determine the first association relationship.
[0021] Optionally, the matching of the character voice attribute information with a preset command mode and determining the target command mode according to the matching result includes:
[0022] Determine the sound intensity information and pitch information in the character voice attribute information, and calculate the character voice level according to the sound intensity information, pitch information, and preset weight coefficients;
[0023] Match the character voice level with the preset command mode to determine the target command mode.
[0024] Optionally, the preset command mode includes a movement mode, an attack mode, and a command mode. The matching of the character voice level with the preset command mode to determine the target command mode includes:
[0025] When the character voice level is a first-level voice, determine the movement model matching the first-level voice as the target command mode;
[0026] When the character voice level is a second-level voice, determine the command model matching the second-level voice as the target command mode;
[0027] When the character voice level is a third-level voice, determine the attack model matching the third-level voice as the target command mode.
[0028] Optionally, the content parsing of the character content information and determining the target game control instruction in the target command mode according to the parsing result includes:
[0029] Perform word segmentation on the character content information to obtain multiple keywords, perform semantic analysis on each of the multiple keywords respectively, determine the game control instruction with the same meaning as the keyword according to the analysis result, and determine the game control instruction as the target game control instruction.
[0030] In a second aspect, an embodiment of the present application provides a game character control device, including:
[0031] A voice attribute recognition module, configured to obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes multiple pieces of voice information for controlling different game characters;
[0032] A voice information classification module, which is used to classify the player voice information according to the timbre information in the voice attribute information, and determine the corresponding character voice attribute information and character content information of each game character according to the classification result;
[0033] A mode matching module, which is used to match the character voice attribute information with a preset command mode, and determine a target command mode according to the matching result;
[0034] A content analysis module, which is used to analyze the content of the character content information;
[0035] A control instruction determination module, which is used to determine the target game control instruction in the target command mode according to the analysis result, and the target command mode includes multiple game control instructions;
[0036] A character control module, which is used to control the corresponding game character according to the target game control instruction.
[0037] In a third aspect, an embodiment of the present application provides a game character control device, which includes: one or more processors; a storage device configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the game character control method described in the first aspect.
[0038] In a fourth aspect, an embodiment of the present application provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the game character control method described in the first aspect when executed by a computer processor.
[0039] In the embodiments of the present application, by obtaining player voice information, performing voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes multiple pieces of voice information for controlling different game characters; classifying the player voice information according to the timbre information in the voice attribute information, and determining the corresponding character voice attribute information and character content information for each game character according to the classification result; matching the character voice attribute information with a preset command pattern, and determining a target command pattern according to the matching result; performing content parsing on the character content information, and determining the target game control instruction in the target command pattern according to the parsing result, where the target command pattern includes multiple game control instructions; and controlling the corresponding game character according to the target game control instruction. It is possible to distinguish the voices of multiple players in the player voice information according to the timbre information, so as to accurately identify the character content information and character voice attribute information emitted by different game characters. It is also possible to judge the mood or needs of the player based on the character voice attribute information and determine the target command pattern. By further analyzing the character content information, it is possible to quickly and accurately determine the target game control instruction, avoiding the problem of operation delay caused by the traditional character control scheme and improving the game experience of the player. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flowchart of a game character control method provided by an embodiment of the present application;
[0041] Figure 2 is a flowchart of a classification processing method for player voice information provided by an embodiment of the present application;
[0042] Figure 3 is a flowchart of a first association relationship determination method provided by an embodiment of the present application;
[0043] Figure 4 is a flowchart of a target command model determination method provided by an embodiment of the present application;
[0044] Figure 5 is a schematic structural diagram of a game character control device provided by an embodiment of the present application;
[0045] Figure 6 is a schematic structural diagram of a game character control device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] To make the objectives, technical solutions, and advantages of the present application clearer, the following further describes specific embodiments of the present application in conjunction with the accompanying drawings. It can be understood that the specific embodiments described herein are only for explaining the present application and not for limiting the present application. Additionally, it should be noted that for ease of description, only parts related to the present application are shown in the drawings rather than all the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0047] The following will clearly describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.
[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents an "or" relationship between the associated objects before and after.
[0049] The following describes in detail the game character control method, device, equipment, and medium provided by the embodiments of the present application in conjunction with the accompanying drawings, through specific embodiments and their application scenarios.
[0050] The game character control method provided by the embodiments of the present application is used for the scenario of controlling characters in a game through voice commands during the game process. Based on the above usage scenario, it can be understood that the execution subject of this solution is a mobile phone, a tablet computer, a laptop computer, etc.
[0051] Figure 1 is a flowchart of a game character control method provided by the embodiments of the present application, as Figure 1 shown, and includes:
[0052] Step S101: Obtain the player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information. The player voice information includes multiple voice information for controlling different game characters.
[0053] Among them, the player voice information is the voice information uttered by the player during the game process. This player voice information can include character information, control information, and dialogue information between characters, etc. The voice attribute information can be used to represent the characteristics of the voice, which can be used to distinguish the object that produces the voice and the characteristics of different voices, etc. This voice attribute information can include the volume of the voice and the pitch of the tone, etc. The game character is a virtual character controlled and played by the player in the game. The player can control the game character to run, jump, or attack, etc. by sending corresponding control commands on the game terminal. In one embodiment, the player voice information can be obtained through a microphone. There may be the voice information of one or more players in the player voice information. After obtaining the player voice information, perform voice attribute recognition on the player voice information to obtain one or more tone information in the player voice information.
[0054] In a possible embodiment, since the player may be in a noisy environment, the obtained player voice information will also contain noisy sounds. In order to improve the accuracy of voice attribute recognition, noise reduction processing and echo processing can be performed on the player voice information to obtain the processed player voice information, and then perform voice attribute recognition on the processed player voice information, so as to obtain the voice attribute information corresponding to the player voice information.
[0055] Step S102: Classify the player voice information according to the timbre information in the voice attribute information, and determine the corresponding character voice attribute information and character content information for each game character according to the classification result.
[0056] Among them, timbre information is the distinctive characteristic of sound in terms of waveform. Different object vibrations have their unique features, which determine the quality and characteristics of sound, and can distinguish the sources and characteristics of various sounds based on timbre information. Therefore, different player voices can be distinguished through timbre information. The character voice attribute information can be the voice attribute information corresponding to each game character, such as the pitch information of each character. The character content information can be used to represent the specific voice content of each character. The character content information can be voice content or text content, and the text content corresponding to each character can also be text content in different languages, such as Chinese, English, etc. If the character content information is voice content, the voice content can be dialects from different regions. In one embodiment, the association relationship between each timbre information and other player voice information is determined, and the player voice information associated with different timbre information is determined as different classes. Since different player characters can be distinguished through timbre information, the association relationship between each classification and the player character can be determined based on the pre-set association relationship between the player character and the timbre information. The player voice information in each classification can represent the character voice attribute information and the character content information corresponding to each player character.
[0057] Step S103: Match the character voice attribute information with a preset command mode, and determine the target command mode according to the matching result.
[0058] Among them, the preset command mode is the control mode of the character, such as the character hiding mode, which is used to control the position or timing of the character's hiding, etc. The target command mode can be the execution mode for finally controlling the character. In one embodiment, the speech rate information is matched with multiple preset command modes. When the speech rate information meets the speech rate value range corresponding to the corresponding preset command mode, it can be determined that the speech rate information matches the preset command mode corresponding to the speech rate value range, and the preset command mode corresponding to the speech rate value range is determined as the target command mode. Exemplarily, if the speech rate information is 100 words per minute and the speech rate value range corresponding to the character hiding mode is 95 - 110, it can be determined that the voice information matches the character hiding mode, and the character hiding mode is the target command mode.
[0059] Step S104: Perform content analysis on the character content information, and determine the target game control instruction in the target command mode according to the analysis result. The target command mode includes multiple game control instructions.
[0060] Among them, the target game control instruction is a command for finally controlling the game character. Optionally, the target command mode includes multiple game control instructions. Exemplarily, if the target command mode is the character hiding mode, the character hiding mode may include control instructions such as hiding in place, hiding in a tree, and hiding in a house. In one embodiment, the character content information is parsed for words to obtain one or more parsed words, and it is determined whether there is a parsed word among the one or more parsed words that is the same as the preset control instruction name. Different control names are used to represent different game control instructions. If there is a parsed word that is the same as the preset control instruction name, the target game control instruction is determined according to the control instruction name corresponding to the parsed word. Exemplarily, if the character content information is "hide in place at point A", after parsing the character content information, parsed words such as "at point A", "perform", and "hide in place" can be obtained. The target command mode is the character hiding mode, and the character hiding mode includes game control instructions such as hiding in place, hiding in a tree, and hiding in a house. According to the above parsed words, it can be seen that the parsed word "hide in place" is the same as the game control instruction with the control name "hide in place", so the target game control instruction can be determined to be the hide-in-place instruction.
[0061] Step S105, control the corresponding game character according to the target game control instruction.
[0062] Exemplarily, if it is determined that the target game control instruction is the hide-in-place instruction, control the game character to hide in place.
[0063] By obtaining the player voice information, performing voice attribute recognition on the player voice information to obtain voice attribute information, the player voice information includes multiple voice information for controlling different game characters; classifying the player voice information according to the voice color information in the voice attribute information, and determining the corresponding character voice attribute information and character content information of each game character according to the classification result; matching the character voice attribute information with the preset command mode, and determining the target command mode according to the matching result; parsing the character content information, and determining the target game control instruction in the target command mode according to the parsing result, the target command mode includes multiple game control instructions; controlling the corresponding game character according to the target game control instruction. It is possible to distinguish the voices of multiple players in the player voice information according to the voice color information, so as to accurately distinguish the character content information and character voice attribute information issued by different game characters. It is also possible to judge the mood or needs of the player based on the character voice attribute information and determine the target command mode. By further analyzing the character content information, the target game control instruction can be determined quickly and accurately, avoiding the problem of operation delay caused by the traditional character control scheme and improving the player's game experience.
[0064] In one embodiment, parsing the character content information and determining the target game control instruction in the target command mode according to the parsing result includes:
[0065] Performing word segmentation on the character content information to obtain multiple keywords, respectively performing semantic analysis on the multiple keywords, determining game control instructions with the same meaning as the keywords according to the analysis result, and determining the game control instructions as the target game control instructions.
[0066] Exemplarily, if the character content information is "hide at the current position", then performing word segmentation on the character content information to obtain multiple keywords which are "at the current position", "perform", and "hide" respectively. The target command mode is the character hiding mode, and the character hiding mode includes game control instructions such as hiding in place, hiding in a tree, and hiding in a house. By performing semantic analysis on the above keywords, it can be known that the parsed word "at the current position" has the same meaning as "in place" in the control name "hide in place". Therefore, the target game control instruction can be determined as the hide in place instruction.
[0067] As described above, by performing word segmentation on the character content information and performing semantic analysis on the keywords, and determining the target game control instruction based on the meaning of the keywords, it is possible to avoid the need for players to pre-learn the control instruction names before using the voice control function, further improving the user experience, and also improving the applicable range of the voice control method.
[0068] Figure 2 It is a flowchart of a classification processing method for player voice information provided by an embodiment of the present application. As Figure 2 shown, it includes:
[0069] Step S201, determining the first association relationship between each timbre information and each character voice attribute information and each character content information.
[0070] Optionally, the player voice information includes multiple character voice attribute information and multiple character content information. Among them, since the player voice information may include the voice information of multiple players, and the voice information of each player has corresponding character voice attribute information and character content information. Therefore, the player voice information contains the character voice attribute information and character content information corresponding to multiple players.
[0071] The first association relationship is the association relationship between each timbre information and the corresponding character voice attribute information and character content information. In one embodiment, the association relationship between the timbre information and the character voice attribute information is determined according to the overlapping duration between the voice duration corresponding to the timbre information and the voice duration corresponding to the pitch or the intensity duration in the character voice attribute information. When the overlapping duration exceeds the set duration threshold, it is determined that the timbre information is associated with the character voice attribute information. The duration of the character content information is calculated according to the preset speech rate information. If the difference between the duration of the character content information and the voice duration corresponding to the timbre information is within the preset time range, it is determined that the timbre information is associated with the character content information, and the first association relationship is determined according to the association relationship between the timbre information and the character voice attribute information and the association relationship between the timbre information and the character content information.
[0072] Step S202: Classify the player voice information according to the first association relationship, and determine the character voice attribute information and character content information corresponding to each game character in the classification result according to the preset second association relationship.
[0073] Among them, the second association relationship refers to the association relationship between the timbre information and the game character, and the association relationship between the timbre information and the game character information can be determined based on the historical game character control data. In one embodiment, since the player voice information contains multiple timbre information, and each timbre information corresponds to a first association relationship, when classifying the player voice information, the player voice information corresponding to each first association relationship can be determined as one category. The character voice attribute information and character content information associated with the same timbre information are determined as the same category according to each first association relationship, and the game character corresponding to the timbre information is determined according to the second association relationship, so as to determine the character voice attribute information and character content information corresponding to each game character based on the classification result and the relationship between the timbre information and the game character.
[0074] As described above, through the timbre information, the first association relationship, and the second association relationship, the character information, the character voice attribute information, and the character content information can be determined quickly and accurately, which is beneficial to improving the efficiency and accuracy of determining the target control instruction based on the character voice attribute information and the character content information in the subsequent process.
[0075] In one embodiment, the step of classifying the player voice information according to the first association relationship and determining the character voice attribute information and character content information corresponding to each game character in the classification result according to the preset second association relationship includes:
[0076] Determine each timbre information and the character voice attribute information and character content information associated with the each timbre information as the same classification information according to the first association relationship;
[0077] Determine the game characters associated with the timbre information in each classification information according to the second association relationship, as well as the character voice attribute information and character content information corresponding to each game character.
[0078] Exemplarily, the timbre information corresponding to each classification, as well as the character voice attribute information and character content information associated with the timbre information, are determined as the same classification information. Different classifications have different timbre information. According to the preset second association relationship, the timbre information in each classification can be determined to correspond to game characters. After determining the classification corresponding to the game character, the character voice attribute information and character content information in each classification corresponding to each game character can be determined.
[0079] Since each classification information contains corresponding timbre information as described above, it is possible to directly represent each classification information through the timbre information when determining the classification information, and based on the second association relationship, quickly determine the game characters corresponding to each classification, improving the efficiency of determining the character voice attribute information and character content information corresponding to each game character.
[0080] Figure 3 is a flowchart of a method for determining a first association relationship provided by an embodiment of the present application. As Figure 3 shown, it includes:
[0081] Step S301: Respectively determine the first start time point and timbre detection duration of each timbre information, and the second start time point and each attribute detection duration of each voice attribute in the character voice attribute information.
[0082] Among them, the first start time point of the timbre information can be the time point when the timbre information starts to be detected and the time point when the timbre information disappears. The timbre detection duration is used to represent the total duration of detecting the timbre information and can be determined according to the time interval of the first start time. The second start time of the voice attribute can be the time point when other voice attributes except the timbre information start to be detected and the time point when the voice attribute disappears. The attribute detection duration is also used to represent the total duration of detecting other attribute information except the timbre. In one embodiment, the start detection time of each timbre information, the total detection duration of the timbre information, the start detection time of the voice attribute, and the total detection duration of the voice attribute are respectively determined. Among them, the character voice attribute information may include multiple voice attributes, such as pitch and speech rate.
[0083] Step S302: Compare the first start time point with the second start time point to obtain a first comparison result, compare the timbre detection duration with each attribute detection duration to obtain a second comparison result, calculate the content length according to the timbre detection duration and the speech rate information in the character voice attribute information, and obtain a third comparison result by comparing the content length with the content length in each character content information.
[0084] In one embodiment, the first starting time point is compared with the second starting time point. If the first starting time point is the same as the second starting time point, and the timbre detection duration is the same as the detection duration of each attribute, it can be considered that the timbre information and the voice attribute information of each role are generated and disappear synchronously, and there is no interruption in the middle. At this time, it can be determined that the player who generates the timbre information and the player who generates the voice attribute information of the role are the same player. At the same time, the total duration of the player's voice transmission can also be determined according to the timbre detection duration of the player. The content length is calculated according to the total duration of the voice transmission and the recognized speech rate information, and the content length can be represented by the number of characters. The calculated content length is compared with the content length in the role content information to determine whether the calculated number of characters is the same as the character length of the actual role content information.
[0085] Step S303: Associate each timbre information with the corresponding voice attribute information and role content information according to the first comparison result, the second comparison result, and the third comparison result to determine the first association relationship.
[0086] Exemplarily, if the first starting time point is the same as the second starting time point, the timbre detection duration is the same as the detection duration of each attribute, and the calculated number of characters is the same as the character length of the actual role content information, it can be determined that the association relationship composed of the timbre information, the voice attribute information of the role, and the role content information is the first association relationship, that is, the player who sends the role content information and the player corresponding to the timbre information and the voice attribute information of the role are the same player.
[0087] As described above, by determining the first association relationship between the timbre information and the voice attribute information and content information of each role respectively based on the starting time point, detection duration, and content length of the timbre information and each voice attribute, the accuracy of determining game characters based on player voice information can be improved, thereby further improving the accuracy of game character control.
[0088] Figure 4 It is a flowchart of a method for determining a target command model provided by an embodiment of the present application. As Figure 4 shown, it includes:
[0089] Step S401: Determine the sound intensity information and pitch information in the voice attribute information of the role, and calculate the voice level of the role according to the sound intensity information, pitch information, and preset weight coefficient.
[0090] Among them, the sound intensity information can be that the sound intensity refers to the strength of the sound, which is the basis for distinguishing musical sounds and is determined by the strength of the main tone in the sound signal. The objective evaluation scale of sound intensity is the amplitude of the sound, that is, the amplitude of the mechanical wave in the sound signal. The amplitude is directly proportional to the sound intensity. The larger the amplitude, the stronger the sound intensity, and vice versa. The pitch information can be that the pitch refers to various sounds of different heights, that is, the height of the sound, which is one of the basic characteristics of the sound. The height of the pitch is determined by the vibration frequency, and the two are positively correlated. The higher the frequency, the higher the pitch, and vice versa. Since the strength or height of the sound can represent the player's emotion, such as being more excited during a fight, the sound intensity information and pitch information will be relatively high. Specifically, the sound intensity coefficient and pitch coefficient can be preset according to the degree of influence of historical sound intensity information and historical pitch information on the player's game emotion, such as 60% and 40% respectively. Calculate the total value of the sound attributes according to the actually recognized sound intensity information, preset sound intensity coefficient, pitch information, and preset pitch coefficient, and determine the corresponding character sound level according to the total value of the sound attributes. Exemplarily, if the total value of the sound attributes is less than or equal to 50%, the character sound level is the first-level sound; if the total value of the sound attributes is greater than 50% and less than or equal to 70%, the character sound level is the second-level sound; if the total value of the sound attributes is greater than 70%, the character sound level is the third-level sound.
[0091] Step S402: Match the character sound level with a preset command mode to determine the target command mode.
[0092] Determine the target command mode that matches the character sound level according to the preset command mode matching rule. Exemplarily, when it is determined that the character sound level is the first-level sound, according to the preset command mode matching rule, the first-level sound level can be respectively matched with the character hiding mode and the movement mode, and it is determined that both the character hiding mode and the movement mode are the target command modes.
[0093] As described above, by determining the sound intensity information and pitch information in the character sound attribute information, calculating the character sound level according to the sound intensity information, pitch information, and preset weight coefficient, and matching the character sound level with the preset command mode to determine the target command mode, the range for determining the target control instruction can be correspondingly narrowed, thereby improving the control efficiency of the game character. Moreover, the total value of the sound attributes can be calculated through the preset weight coefficient to ensure the accuracy of determining the target command mode.
[0094] In one embodiment, the preset command mode includes a movement mode, an attack mode, and a command mode. The matching of the character sound level with the preset command mode to determine the target command mode includes:
[0095] When the character sound level is the first-level sound, determine the movement model that matches the first-level sound as the target command mode;
[0096] When the character voice level is the second-level voice, determine the command model matching the second-level voice as the target command mode;
[0097] When the character voice level is the third-level voice, determine the attack model matching the third-level voice as the target command mode.
[0098] Among them, the movement mode is a mode for controlling the movement behavior of the player. The movement mode may include control instructions such as forward, backward, and rotation. The attack mode is a mode for controlling the attack behavior of the player, such as control instructions for shooting and attacking. The command mode is a mode for controlling the player to command teammates, and may include control instructions such as retreating and arranging formations. When it is determined that the character voice level is the first-level voice, match the first-level voice with the movement model and determine the movement model as the target command mode. When it is determined that the character voice level is the second-level voice, match the second-level voice with the command model and determine the command model as the target command mode. When it is determined that the character voice level is the third-level voice, match the third-level voice with the attack model and determine the attack model as the target command mode. It is possible to improve the determination efficiency of the target command mode by matching each voice level with a target command mode, avoiding further screening among multiple target commands based on the character content information, thereby avoiding the situation of delayed execution of control instructions.
[0099] Figure 5 It is a schematic structural diagram of a game character control device provided by an embodiment of the present application, as Figure 5 shown, including:
[0100] A voice attribute recognition module 51, configured to obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes a plurality of voice information for controlling different game characters;
[0101] A voice information classification module 52, configured to classify the player voice information according to the timbre information in the voice attribute information, and determine the character voice attribute information and character content information corresponding to each game character according to the classification result;
[0102] A mode matching module 53, configured to match the character voice attribute information with a preset command mode, and determine the target command mode according to the matching result;
[0103] A content parsing module 54, configured to perform content parsing on the character content information;
[0104] A control instruction determination module 55, configured to determine the target game control instruction in the target command mode according to the parsing result, where the target command mode includes a plurality of game control instructions;
[0105] A character control module 56, configured to control a corresponding game character according to the target game control instruction.
[0106] In the embodiment of the present application, by obtaining player voice information, performing voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes multiple pieces of voice information for controlling different game characters; classifying the player voice information according to the timbre information in the voice attribute information, and determining the corresponding character voice attribute information and character content information of each game character according to the classification result; matching the character voice attribute information with a preset command mode, and determining a target command mode according to the matching result; performing content parsing on the character content information, and determining a target game control instruction in the target command mode according to the parsing result, where the target command mode includes multiple game control instructions; and controlling the corresponding game character according to the target game control instruction. It is possible to distinguish the voices of multiple players in the player voice information according to the timbre information, so as to accurately identify the character content information and character voice attribute information emitted by different game characters. It is also possible to judge the mood or needs of the player based on the character voice attribute information and determine the target command mode. By further analyzing the character content information, it is possible to quickly and accurately determine the target game control instruction, avoiding the problem of operation delay caused by the traditional character control scheme and improving the game experience of the player.
[0107] In a possible embodiment, the player voice information includes multiple pieces of character voice attribute information and multiple pieces of character content information. The voice information classification module 52 is specifically configured to:
[0108] Determine a first association relationship between each timbre information and each piece of character voice attribute information and each piece of character content information;
[0109] Classify the player voice information according to the first association relationship, and determine the corresponding character voice attribute information and character content information of each game character in the classification result according to a preset second association relationship.
[0110] In a possible embodiment, the voice information classification module 52 is specifically configured to:
[0111] Determine each timbre information and the associated character voice attribute information and character content information as the same classification information according to the first association relationship;
[0112] Determine the game characters associated with the timbre information in each classification information according to the second association relationship, and the corresponding character voice attribute information and character content information of each game character.
[0113] In a possible embodiment, the voice information classification module 52 includes a correlation determination unit, and the correlation determination unit is configured to:
[0114] respectively determine a first start time point and a timbre detection duration of each timbre information, and a second start time point and an attribute detection duration of each voice attribute in each character voice attribute information;
[0115] compare the first start time point with the second start time point to obtain a first comparison result, compare the timbre detection duration with the attribute detection durations to obtain a second comparison result, calculate a content length according to the timbre detection duration and the speech rate information in the character voice attribute information, and obtain a third comparison result by comparing the content length with the content lengths in the character content information;
[0116] associate each timbre information with the corresponding character voice attribute information and character content information according to the first comparison result, the second comparison result, and the third comparison result to determine a first association relationship.
[0117] In a possible embodiment, the control instruction determination module 55 is specifically configured to:
[0118] determine the sound intensity information and pitch information in the character voice attribute information, and calculate a character voice level according to the sound intensity information, the pitch information, and a preset weight coefficient;
[0119] match the character voice level with a preset command mode to determine a target command mode.
[0120] In a possible embodiment, the preset command mode includes a movement mode, an attack mode, and a command mode. The control instruction determination module 55 is specifically configured to:
[0121] when the character voice level is a first-level voice, determine a movement model matching the first-level voice as the target command mode;
[0122] when the character voice level is a second-level voice, determine a command model matching the second-level voice as the target command mode;
[0123] when the character voice level is a third-level voice, determine an attack model matching the third-level voice as the target command mode.
[0124] In a possible embodiment, the control instruction determination module 55 is specifically configured to:
[0125] Perform word segmentation on the character content information to obtain multiple keywords. Semantically analyze each of the multiple keywords, determine game control instructions with the same meaning as the keywords according to the analysis results, and determine the game control instructions as target game control instructions.
[0126] An embodiment of the present application further provides a game character control device, which can integrate a game character control device provided in an embodiment of the present application. Figure 6 It is a schematic structural diagram of a game character control device provided in an embodiment of the present application. Refer to Figure 6 This game character control device includes: an input device 63, an output device 64, a memory 62, and one or more processors 61; the memory 62 is used to store one or more programs; when the one or more programs are executed by the one or more processors 61, the one or more processors 61 implement the game character control method provided in the above embodiment. Among them, the input device 63, the output device 64, the memory 62, and the processor 61 can be connected through a bus or other means, Figure 6 Taking connection through a bus as an example.
[0127] The memory 62, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the game character control method provided in any embodiment of the present application. The memory 62 may mainly include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the device, etc. In addition, the memory 62 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 62 may further include a memory remotely set relative to the processor 61, and these remote memories can be connected to the device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0128] The input device 63 can be used to receive input digital or character information, and generate key signal inputs related to user settings and function control of the device. The output device 64 may include a display device such as a display screen.
[0129] The processor 61 executes various functional applications and data processing of the device by running software programs, instructions, and modules stored in the memory 62, that is, implements the above game character control method.
[0130] The game character control device, equipment, and computer provided above can be used to execute the game character control method provided in any of the above embodiments, and have corresponding functions and beneficial effects.
[0131] An embodiment of the present application further provides a storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a computer processor, they are used to execute the game character control method provided in the above embodiment. The game character control method includes:
[0132] Obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information. The player voice information includes a plurality of voice information for controlling different game characters;
[0133] Classify the player voice information according to the timbre information in the voice attribute information, and determine the character voice attribute information and character content information corresponding to each game character according to the classification result;
[0134] Match the character voice attribute information with a preset command pattern, and determine a target command pattern according to the matching result;
[0135] Perform content parsing on the character content information, and determine a target game control instruction in the target command pattern according to the parsing result. The target command pattern includes a plurality of game control instructions;
[0136] Control the corresponding game character according to the target game control instruction.
[0137] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media such as CD-ROMs, floppy disks, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (such as hard disks or optical storage); register or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. Additionally, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system that is connected to the first computer system through a network (such as the Internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media that may reside in different locations (such as in different computer systems connected through a network). The storage medium may store program instructions (such as specifically implemented as a computer program) executable by one or more processors.
[0138] Of course, for a storage medium containing computer-executable instructions provided in an embodiment of the present application, the computer-executable instructions are not limited to the game character control method described above, and can also execute related operations in the game character control method provided in any embodiment of the present application.
[0139] The game character control device, equipment, and storage medium provided in the above embodiments can execute the game character control method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, reference can be made to the game character control method provided in any embodiment of the present application.
[0140] The above is only a preferred embodiment of the present application and the technical principles applied. The present application is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions that can be made by those skilled in the art will not depart from the protection scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments. Without departing from the concept of the present application, more other equivalent embodiments can be included, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for controlling a game character, characterized in that, Including: Obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information. The player voice information includes multiple voice information for controlling different game characters, and the player voice information further includes multiple character voice attribute information and multiple character content information; Respectively determine the first start time point and voice color detection duration of each voice color information, and the second start time point and each attribute detection duration of each voice attribute in the character voice attribute information. Compare the first start time point with the second start time point to obtain a first comparison result. Compare the voice color detection duration with each attribute detection duration to obtain a second comparison result. Calculate the content length according to the voice color detection duration and the speech rate information in the character voice attribute information. Obtain a third comparison result by comparing the content length with the content length in each character content information. According to the first comparison result, the second comparison result, and the third comparison result, associate each voice color information with the corresponding character voice attribute information and character content information to determine a first association relationship. Classify the player voice information according to the first association relationship, and determine the character voice attribute information and character content information corresponding to each game character in the classification result according to a preset second association relationship; Match the character voice attribute information with a preset command mode, and determine a target command mode according to the matching result; Perform content parsing on the character content information, and determine the target game control instruction in the target command mode according to the parsing result. The target command mode includes multiple game control instructions; Control the corresponding game character according to the target game control instruction.
2. The game character control method according to claim 1, wherein The classifying the player voice information according to the first association relationship and determining the character voice attribute information and character content information corresponding to each game character in the classification result according to a preset second association relationship includes: Determine each voice color information and the character voice attribute information and character content information associated with the voice color information as the same classification information according to the first association relationship; Determine the game characters associated with the voice color information in each classification information, and the character voice attribute information and character content information corresponding to each game character according to the second association relationship.
3. The game character control method according to claim 1, wherein The matching the character voice attribute information with a preset command mode and determining a target command mode according to the matching result includes: Determine the sound intensity information and pitch information in the character voice attribute information, and calculate the character voice level according to the sound intensity information, the pitch information, and a preset weight coefficient; Match the character voice level with the preset command mode to determine the target command mode.
4. The game character control method according to claim 3, wherein The preset command mode includes a movement mode, an attack mode, and a command mode. The matching the character voice level with the preset command mode to determine the target command mode includes: When the character voice level is a first-level voice, determine the movement model matching the first-level voice as the target command mode; When the character voice level is the second-level voice, determine the command model that matches the second-level voice as the target command mode; When the character voice level is the third-level voice, determine the attack model that matches the third-level voice as the target command mode.
5. The game character control method according to claim 1, characterized in that, The content analysis of the character content information and the determination of the target game control instruction in the target command mode according to the analysis result include: Perform word segmentation processing on the character content information to obtain a plurality of keywords, respectively perform semantic analysis on the plurality of keywords, determine the game control instruction with the same meaning as the keyword according to the analysis result, and determine the game control instruction as the target game control instruction.
6. A game character control device, characterized in that, Include: A voice attribute recognition module, configured to obtain player voice information, perform voice attribute recognition on the player voice information to obtain voice attribute information, where the player voice information includes a plurality of voice information for controlling different game characters, and the player voice information further includes a plurality of character voice attribute information and a plurality of character content information; A voice information classification module, configured to respectively determine the first start time point and the tone detection duration of each tone color information, and the second start time point and each attribute detection duration of each voice attribute in the character voice attribute information, compare the first start time point with the second start time point to obtain a first comparison result, compare the tone detection duration with each attribute detection duration to obtain a second comparison result, calculate the content length according to the tone detection duration and the speech rate information in the character voice attribute information, obtain a third comparison result by comparing the content length with the content length in each character content information, associate each tone color information with the corresponding character voice attribute information and character content information according to the first comparison result, the second comparison result, and the third comparison result to determine a first association relationship, perform classification processing on the player voice information according to the first association relationship, and determine the character voice attribute information and character content information corresponding to each game character in the classification result according to a preset second association relationship; A mode matching module, configured to match the character voice attribute information with a preset command mode, and determine the target command mode according to the matching result; A content analysis module, configured to perform content analysis on the character content information; A control instruction determination module, configured to determine the target game control instruction in the target command mode according to the analysis result, where the target command mode includes a plurality of game control instructions; A character control module, configured to control the corresponding game character according to the target game control instruction.
7. A game character control device, the device comprising: One or more processors; A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, enable the one or more processors to implement the game character control method according to any one of claims 1-5.
8. A storage medium storing computer-executable instructions, which are used to execute the game character control method according to any one of claims 1-5 when executed by a computer processor.
Citation Information
Patent Citations
AR game control method and device, electronic equipment and storage medium
CN112295220A