Virtual object control method and device, medium, equipment and product
By determining behavioral targets based on object information and scene information in virtual objects, and dynamically adjusting behavior sequences with interaction information, the problem of single NPC interaction mode is solved, and a more realistic and natural virtual object interaction is achieved.
Patent Information
- Application Number
- CN202510308645.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-04-15
AI Technical Summary
The interaction methods of NPCs in existing games are single and fixed, making it difficult to achieve diversified and real interaction logic.
By determining behavioral goals based on object information and scene information of virtual objects, combining interaction information for behavioral intention analysis, dynamically generating and adjusting the behavior sequence of virtual objects to achieve more realistic and natural interaction.
It improves the accuracy of determining the behavior sequence of virtual objects and the diversity of interactions, conforms to the interaction logic in real scenarios, and makes virtual objects interaction more realistic and natural.
Smart Images

Figure CN119818945A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, medium, equipment and product for controlling a virtual object. Background Art
[0002] In many game projects, the interactive response of NPC (non-player character) is usually based on question-and-answer chat interaction. In another scenario, NPC can implement simple instructions from players, such as the player sends the NPC the instruction "jump", and the NPC can respond to the instruction to achieve interaction with the player. However, through the above solution, the NPC's interactive method is to respond to the user's operation, and the NPC's feedback performance is relatively simple and fixed. Summary of the invention
[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, the present disclosure provides a method for controlling a virtual object, the method comprising: Determining a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; In response to receiving the interaction information, performing a behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; In a case where it is determined that the first behavior sequence is not to be continued, generating a second behavior sequence for the virtual object based on the interaction information, the object information and the behavior target; The virtual object is controlled to execute the behaviors in the second behavior sequence.
[0005] In a second aspect, the present disclosure provides a control device for a virtual object, the device comprising: A first determination module, configured to determine a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; a second determination module, configured to, in response to receiving the interaction information, perform a behavior intention analysis based on the interaction information and the behavior target of the virtual object, and determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; A first generating module, configured to generate a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued; The first control module is used to control the virtual object to execute the behavior in the second behavior sequence.
[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.
[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0009] Therefore, through the above technical solution, in the process of controlling virtual objects, the behavior target of the virtual object can be actively determined based on the object information of the virtual object, and the behavior sequence of the virtual object can be determined based on the behavior target drive, so as to improve the accuracy of the behavior sequence determination, realize the active planning of the virtual object behavior, improve the diversity of virtual object interaction, and conform to the interaction logic in the real scene, so that the virtual object interaction is more real and natural. In addition, in the process of controlling virtual objects based on the behavior sequence of virtual objects, it is possible to determine whether the current behavior sequence continues to be executed based on the behavior intention of the interaction information and the behavior intention analysis of the current execution operation, so that the behavior sequence of the virtual object can be interrupted by the interaction information during the execution process, so as to dynamically adjust the behavior sequence of the virtual object based on the interaction information, improve the real-time feedback response of the virtual object, be more in line with the actual application scenario, improve the authenticity and rationality of virtual object control, and further improve the diversity of virtual object control.
[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1is a flowchart of a method for controlling a virtual object provided according to an embodiment of the present disclosure.
[0012] Figure 2 is a flowchart of a method for controlling a virtual object provided according to another embodiment of the present disclosure.
[0013] Figure 3 A block diagram of a virtual object control device provided according to an embodiment of the present disclosure.
[0014] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0026] Figure 1 As shown, it is a flowchart of a method for controlling a virtual object according to an embodiment of the present disclosure, as shown in Figure 1 As shown, the method may include: In step 11, a behavior target of the virtual object is determined based on object information of the virtual object and scene information of a virtual scene, wherein the virtual scene includes at least one virtual object.
[0027] The virtual scene may be an environment in which a virtual object rendered in a computer is located, such as a game scene. The virtual object may be a non-player character, i.e., an NPC, which may be controlled by a computer and one or more virtual objects may be set in a virtual scene in a preconfigured manner.
[0028] The object information of the virtual object may include preset setting information of the virtual object, such as the setting information of the virtual object is a homeless person, when other people appear around him, he can greet other people. The scene information of the virtual scene may represent information such as virtual objects and virtual environment contained in the virtual scene, such as the virtual scene may include virtual objects V1 and V2, and the virtual environment may include information such as building L1, supermarket L2, and bakery L3.
[0029] In this step, for a virtual object, its object information and scene information can be input into the large language model LLM (Large Language Model), so that the large language model can determine the behavior target of the virtual object based on the setting information and scene information of the virtual object. The behavior target is used to constrain the behavior of the virtual object in the future time period. The behavior target can be a short-term goal of the virtual object. For example, the duration of the future time period can be set in advance. If the duration can be set to 30s, the large language model can be used for analysis to determine the behavior target of the virtual object in the next 30s. Among them, the output format of the behavior target can be constrained by the prompt word prompt of the large language model, which can be set based on the actual application scenario, and the present disclosure does not limit this.
[0030] As an example, the determined behavior target of the virtual object is expressed as follows: Immediately remove the player sleeping in the tent. If multiple attempts fail, force the player out.
[0031] Then, the virtual object can perform operations based on the behavior goal within the next 30 seconds to achieve the behavior goal.
[0032] In step 12, in response to receiving the interaction information, a behavior intention analysis is performed based on the interaction information and the behavior goal of the virtual object to determine whether the first behavior sequence of the virtual object continues to be executed, wherein the first behavior sequence of the virtual object is determined based on the behavior goal of the virtual object and the object information of the virtual object.
[0033] As an example, for any virtual object, when the virtual object does not interact, the first behavior sequence of the virtual object can be generated based on the behavior target and object information of the virtual object. For example, the behavior target and object information can be input into the large language model so that the large language model can be analyzed to determine the behavior sequence required for the virtual object to complete the behavior target, wherein the behavior sequence can include multiple behaviors, and the multiple behaviors can be serially executed behaviors, such as the virtual object moves to the side of the stool and sits on the stool, wherein the behavior of moving and the behavior of sitting are serial. For another example, multiple behaviors can also be parallel behaviors, such as the virtual object replies to agree and nods to confirm, wherein the behavior of replying and the behavior of nodding are parallel. For another example, multiple behaviors in the behavior sequence can include both multiple parallel behaviors and serial behaviors, such as the virtual object moves to the side of the stool and sits on the stool, and then the virtual object shows the corresponding expression while speaking. After that, the virtual object can be controlled to perform the behavior in the first behavior sequence. If the first behavior sequence indicates the behavior that the virtual object needs to perform to achieve its behavior target, the behavior sequence can be parsed to obtain behavior instructions, and the behavior instructions can be sent to the virtual object to achieve control of the virtual object.
[0034] For example, the behavior instruction includes instruction 1 for the virtual object to move to the side of the stool, and instruction 2 for the virtual object to sit on the stool. Then, the virtual object can be controlled to move to the side of the stool based on instruction 1, and then the virtual object can be controlled to sit on the stool based on instruction 2. For another example, the behavior instruction includes instruction 1 for the virtual object to reply and nod to confirm. Then, the virtual object can be controlled to output "agree" based on instruction 1 and the virtual object can be controlled to perform the nodding action at the same time. Among them, the way to output text can also be displayed in the form of a dialogue bubble at the dialogue position corresponding to the virtual object, so that the user can view the text to interact. For another example, the way to output text can be output in the form of voice, such as based on the output text and speech synthesis technology, such as TTS (Text To Speech, from text to speech) conversion method, to generate the voice corresponding to the output text, thereby outputting the voice, realizing voice interaction with the user, so that the virtual object can perform personalized voice output. The specific output method can be set based on the actual application scenario, and the present disclosure is not limited to this.
[0035] Among them, the interaction information is used to represent information that can trigger the virtual object to interact. The interaction information may include but is not limited to information corresponding to the player's interactive operation or input text, information corresponding to the interactive operation of other virtual objects, messages received by the virtual object, and information about events perceived by the virtual object.
[0036] As an example, the interaction information may be information corresponding to the player's interaction operation or input text, such as a user can interact with a virtual object in a virtual scene by controlling the corresponding player object to move in a virtual scene. For example, when a user controls a player object to walk toward a virtual object to interact with it. For example, an interaction button may be displayed when the distance between the player object and the virtual object is less than a distance threshold or the player object enters the trigger area of the virtual object, and the user may trigger the interaction operation with the virtual object by clicking the interaction button. For example, a user may input the text "Can you help me buy a bottle of drink at the supermarket?", and the text input by the user may be used as the interaction information. For example, a virtual object is set as a salesperson, and a player may control his player object to enter and take away a drink. Then, the interaction operation is an operation for a user to take a drink, and the corresponding interaction information may be information describing the drink taken by the user, which may be configured based on the actual application scenario.
[0037] As another example, the interaction information may be information corresponding to interaction operations of other virtual objects. For example, virtual object V1 is set as a patrol officer, and virtual object V2 is set as a community resident. When the player controls the player object to request virtual object V2 to help find lost items, virtual object V2 may request help from virtual object V1. Virtual object V2 may then initiate an interaction operation with virtual object V1, and the corresponding interaction information may be information about virtual object V2 requesting help.
[0038] As another example, the interaction information may be a message received by the virtual object. For example, the virtual object receives a message sent by a player or other virtual object, and the message invites the virtual object to participate in a community activity. The message may be used as the interaction information.
[0039] As another example, the interaction information may be information about an event perceived by the virtual object. The virtual object may be configured with visual perception, auditory perception, and tactile perception. For example, the virtual object is currently placing bread in a bakery. When it hears the sound of a fire truck on the street, the virtual object may perceive a fire incident. The information about the fire incident (such as the direction and size of the perceived sound) may be used as the interaction information.
[0040] In some scenarios, the execution time of the behavior sequence of the virtual object is usually relatively long. For example, if the above example determines that the virtual object is a behavior sequence within the next 30 seconds, then the virtual object usually needs 30 seconds to execute the corresponding behavior. However, other interactions may occur during the process of the virtual object executing the behavior in the behavior sequence, such as the interactive information described above. If the interactive information can only be responded to after the virtual object's behavior sequence is completed, the response waiting time may be long. Considering the interaction between people, when people decide to do something, they may be interrupted by other things in the middle. In this embodiment, the behavior intention analysis can be performed based on the interactive information and the behavior target of the virtual object to determine whether the first behavior sequence of the virtual object continues to execute, so that the behavior intention of the current behavior target of the virtual object and the behavior intention of the interactive information can be analyzed to determine whether the virtual object continues to execute its behavior sequence or stops executing the behavior sequence and responds to the interactive information. As shown in the example above, the behavior sequence performed by the virtual object V1 is to place bread in the bakery. When it hears the sound of a fire truck on the street, the virtual object can perceive the fire incident. Based on the behavior sequence and the perceived fire incident, a behavior intention analysis can be performed to determine whether the virtual object V1 continues to place bread or interactively responds to the perceived fire incident, for example, by going to the street to check the situation.
[0041] In step 13, when it is determined that the first behavior sequence is not to be continued, a second behavior sequence of the virtual object is generated based on the interaction information, the object information and the behavior target.
[0042] When it is determined that the first behavior sequence does not continue to be executed, it means that the virtual object stops executing the current behavior and responds to the interaction information. At this time, it is necessary to determine the behavior sequence required for the virtual object to respond to the interaction information. As an example, the interaction information, object information, and behavior target can be input into the large language model for analysis by the large language model to regenerate a new behavior sequence, that is, the second behavior sequence.
[0043] In step 14, the virtual object is controlled to execute behaviors in the second behavior sequence.
[0044] Among them, the second behavior sequence is determined in combination with the interactive information, and it can serve as the behavior sequence for the virtual object to respond to the interactive information. In this step, the second behavior sequence can be parsed to obtain the behavior instructions corresponding to the behaviors therein, and then the virtual object can be controlled based on the behavior instructions, so that the virtual object can interrupt its behavior and respond to the interactive information during the execution of its existing behavior sequence.
[0045] Therefore, through the above technical solution, in the process of controlling virtual objects, the behavior target of the virtual object can be actively determined based on the object information of the virtual object, and the behavior sequence of the virtual object can be determined based on the behavior target drive, so as to improve the accuracy of the behavior sequence determination, realize the active planning of the virtual object behavior, improve the diversity of virtual object interaction, and conform to the interaction logic in the real scene, so that the virtual object interaction is more real and natural. In addition, in the process of controlling virtual objects based on the behavior sequence of virtual objects, it is possible to determine whether the current behavior sequence continues to be executed based on the behavior intention of the interaction information and the behavior intention analysis of the current execution operation, so that the behavior sequence of the virtual object can be interrupted by the interaction information during the execution process, so as to dynamically adjust the behavior sequence of the virtual object based on the interaction information, improve the real-time feedback response of the virtual object, be more in line with the actual application scenario, improve the authenticity and rationality of virtual object control, and further improve the diversity of virtual object control.
[0046] In some embodiments, the performing behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute the first behavior sequence of the virtual object may include: Based on the interaction information and the behavior target of the virtual object, priorities of the behavior intentions respectively corresponding to the interaction information and the behavior target are determined.
[0047] Among them, the interaction information and the behavior target of the virtual object can be input into the large language model, so that the large language model can perform behavior intention analysis to determine the priority of the behavior intention corresponding to the interaction information and the priority of the behavior intention corresponding to the behavior target. As an example, in order to improve the accuracy of the output results of the large language model, the current context of the virtual object can also be input into the large language model. For example, the behavior intention corresponding to the behavior target of the virtual object is to exercise, and the behavior intention corresponding to the interaction information is to put out the fire in the tent. Then, the priority of the two can be determined based on the large language model. As an example, the actual priority of each behavior intention can be directly determined based on the large language model, such as pre-setting the priority for different intentions, such as setting the priority to 7 levels such as 1-7, and the priority increases step by step from level 1 to level 7. As in the above example, the priority of the behavior intention corresponding to the interaction information is determined to be level 7, and the priority of the behavior intention corresponding to the behavior target is determined to be level 2.
[0048] As another example, the relative priorities of two behavioral intentions can be determined based on the large language model, that is, the high priority is determined to be 1 and the low priority is determined to be 0. As in the above example, the priority of the behavioral intention corresponding to the interaction information is determined to be level 1, and the priority of the behavioral intention corresponding to the behavioral target is determined to be level 0.
[0049] Afterwards, if the priority of the behavior intention corresponding to the interaction information is higher than the priority of the behavior intention corresponding to the behavior target, it is determined that the first behavior sequence will not continue to be executed.
[0050] Continuing with the above example, it can be determined that the priority of the behavior intention corresponding to the interactive information is higher than the priority of the behavior intention corresponding to the behavior target. In this case, it is considered that the virtual object should respond to the interactive information first, that is, the interactive information will interrupt the execution process of the current behavior sequence (that is, the first behavior sequence) of the virtual object. If it is determined that the priority of the behavior intention corresponding to the interactive information is not higher than the priority of the behavior intention corresponding to the behavior target, it is considered that the virtual object can continue to execute its behavior sequence, and the virtual object can be controlled based on the current behavior sequence, such as Figure 2 As shown in the process.
[0051] Therefore, through the above technical solution, by determining the priority between the behavioral intention corresponding to the interactive information and the behavioral intention corresponding to the behavioral target of the virtual object, it can be determined whether the interactive information interrupts the execution of the current behavioral sequence of the virtual object and generates a new behavioral sequence, so that the control logic of the virtual object can be updated based on the interactive information during the control process of the virtual object, ensuring the real-time nature of the interactive response. And the analysis of the behavioral intention based on the interactive information determines whether the current behavioral sequence continues to be executed, which can be applied to any scenario that triggers the virtual object to interact, broadening the scope of use of the disclosed method.
[0052] In some embodiments, the method may further include: Based on the interaction information and the behavior target of the virtual object, it is determined whether the behavior target of the virtual object is updated; if it is determined that the behavior target of the virtual object is updated, a new behavior target of the virtual object is generated.
[0053] Among them, the interaction information, the object information of the virtual object, and the behavior target can be input into the large language model for analysis based on the large language model. In order to improve the comprehensiveness and accuracy of the information, the context and scene information of the virtual object can be input into the large language model in this step to provide more data for the large language model to analyze. Then, through the analysis of the large language model, it can be determined whether the behavior target needs to be updated. If it is determined that the behavior target needs to be updated, the updated behavior target will be output together. Its output format can be determined based on the prompt word prompt of the large language model, and this disclosure does not limit this.
[0054] Accordingly, in the case of determining that the first behavior sequence is not to be continued, generating a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target includes: In the case where it is determined that the first behavior sequence is not to be continued, the second behavior sequence is generated based on the interaction information, the object information and the new behavior target.
[0055] The step of determining whether to update the behavior target and the step of determining whether to update the behavior sequence can be performed in parallel, such as Figure 2 As shown in , in this embodiment, a second behavior sequence can be generated based on the interaction information, the object information and the new behavior target, and the second behavior sequence includes multiple behaviors for controlling the virtual object to achieve the new behavior target. Therefore, when receiving the interaction information, it can be determined whether to update the behavior target and whether to update the behavior sequence based on the interaction information, and the determination is made in combination with the new behavior target during the process of generating the new behavior sequence, so that the new behavior sequence and the new behavior target are matched, thereby improving the accuracy of virtual object control.
[0056] In some embodiments, the method may further include: The interaction information is added to the memory data of the virtual object, thereby realizing the recording of the interaction information.
[0057] Accordingly, generating a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target may include: The second behavior sequence is generated based on the interaction information, the memory data, the object information and the behavior target.
[0058] Among them, the interaction information, memory data, object information and behavior target can be input into the large language model for analysis to obtain a new behavior sequence. In this process, the interaction information is stored in the memory data of the virtual object so that the interaction information can be combined with the interaction information when a new behavior sequence is generated later, thereby further improving the accuracy of the new behavior sequence.
[0059] In some embodiments, different behaviors in the second behavior sequence are separated by separators, and the separators include serial separators and parallel separators. Similarly, behaviors in each behavior sequence corresponding to the virtual can be separated by the above method.
[0060] The serial separator and parallel separator can be preset based on the actual application scenario. For example, the serial separator SEQ_SEPARATOR is represented as "<->", and the parallel separator PAR_SEPARATOR is represented as "<=>". The definition of the behavior can be determined by the behavior name and the behavior parameter. For example: the behavior name, such as: action_bubble_talk; the behavior parameter, such as: hello. The separation between the behavior parameters can be represented by a space.
[0061] As an example, when generating an action sequence based on a large language model, the action in the output action sequence can be represented in the prompt word prompt, and the prompt word prompt is represented as follows: Please generate a sequence of actions following these rules: 1.Each action is defined by an action name and action parameters. 2.The action format should be: action_name{ACTION_PAR_SEPARATOR}action_parameters 3.Use {SEQ_SEPARATOR} to separate sequential actions. 4.Use {PAR_SEPARATOR} to indicate parallel actions. Example: If the actions are to make a bubble talk with the message "hello" first, then move left and express happy in parallel, the output should be: action_bubb{ACTION_PAR_SEPARATOR}hello{SEQ_SEPARATOR}action_move{ACTION_PAR_SEPARATOR}left{PAR_SEPARATOR}action_express{ACTION_PAR_SEPARATOR}happy This allows the behaviors in the behavior sequence output by the large language model to be represented in a unified format.
[0062] Accordingly, controlling the virtual object to execute the behavior in the second behavior sequence may include: The second behavior sequence is parsed, and if the parallel separator is parsed, the behavior adjacent to the parallel separator is added to the behavior group; if the serial separator or the end marker of the behavior sequence is parsed, a behavior instruction is generated based on the parsed behavior, wherein the behavior instruction is used to indicate one behavior or multiple behaviors in the behavior group to be executed in parallel.
[0063] The behavior instructions are streamed according to the parsing order of the behavior instructions, and the behavior instructions are used to control the virtual object to execute the behavior indicated by the behavior instructions.
[0064] Take the behavior sequence action_bubble, hello<->action_move, left<=>action_wait, 2s as an example to illustrate.
[0065] Parse in sequence based on the order of the behavior sequence. First, parse to the serial separator <->. At this time, a behavior instruction 1 can be generated based on action_bubble, hello. The behavior instruction 1 is used to indicate a behavior. After parsing behavior instruction 1, continue parsing. Then parse to the parallel separator <=>. The behaviors adjacent to the parallel separator can be added to the behavior group, that is, action_move, left and action_wait, 2s are added to the behavior group. Then, parse to the end mark of the behavior sequence, and generate behavior instruction 2 based on the parsed behaviors action_move, left and action_wait, 2s. The behavior instruction 2 is used to indicate multiple behaviors executed in parallel in the behavior group.
[0066] Since the behavior instruction is sent in a streaming manner in the present disclosure, when the behavior instruction 1 is parsed, the behavior instruction 1 can be sent to the client corresponding to the virtual object, and the virtual object can be controlled to output hello based on the behavior instruction 1 to achieve interaction. After the behavior instruction 1 is executed, a callback is performed to trigger the sending of the behavior instruction 2, that is, by sending the behavior instruction 2, the virtual object is controlled to continue to execute the behavior instruction 2.
[0067] It should be noted that if user interaction information is received in the process of controlling the virtual object to perform the behavior indicated by behavior instruction 2, and a new behavior sequence is generated based on the interaction information, after behavior instruction 3 is parsed based on the new behavior sequence and issued, all behaviors in the behavior group of behavior instruction 2 will stop executing, that is, action_move, left and action_wait, 2s will stop executing, and the behavior indicated by behavior instruction 3 will be executed.
[0068] Therefore, through the above technical solution, the behaviors in the behavior sequence can be separated by delimiters, and the serial behaviors and parallel behaviors in the behavior sequence can be limited to support the interruption of the behavior sequence, so that the control of the virtual object can be achieved in combination with the streaming sending of behavior instructions. When a behavior instruction in the behavior sequence is parsed, it can be issued to control the virtual object to perform the corresponding behavior without waiting for all the behaviors in the entire behavior sequence to be parsed, thereby effectively reducing the time for the virtual object to respond based on the first behavior instruction in the behavior sequence, reducing the response delay of the virtual object, and improving the user interaction experience.
[0069] In some embodiments, the method may further include: After controlling the virtual object to execute the behavior in the second behavior sequence, determining whether the virtual object completes the current behavior goal.
[0070] Wherein, the behaviors in the behavior sequence are used to control the virtual object to achieve its behavior goal. However, there may be deviations in the actual behavior execution process of the virtual object. Then, after controlling the virtual object to execute the behaviors in the second behavior sequence, it is possible to further determine whether the virtual object has completed the behavior goal to determine whether to continue to control the virtual object based on the behavior goal. If the behavior intention analysis is performed based on the interaction information and the behavior goal of the virtual object, and it is determined that the first behavior sequence of the virtual object continues to be executed, it is possible to determine whether the virtual object has completed the behavior goal of the virtual object after controlling the virtual object to execute the behaviors in the first behavior sequence.
[0071] It is worth explaining that the behavior target of the virtual object may be updated during the control process of the virtual object. In this step, after controlling the virtual object based on the behavior sequence, when determining whether the virtual object has completed the behavior target, the current behavior target is the latest behavior target of the virtual object.
[0072] If it is determined that the virtual object completes the behavior goal of the virtual object, new interaction information may be waited for to redetermine a new behavior goal and subsequent steps thereof.
[0073] If it is determined that the virtual object has not completed the current behavior goal, a third behavior sequence of the virtual object is generated based on the current behavior goal, the object information, and the historical behavior performed by the virtual object based on the second behavior sequence.
[0074] Among them, the historical behavior performed by the virtual object based on the second behavior sequence, the current behavior goal and object information can be input into the large language model for analysis to obtain the judgment result of the large language model, and then it can be determined whether the behavior goal is completed based on the judgment result. If it is determined that the virtual object has not completed the current behavior goal, it is necessary to control the virtual object to continue to perform the corresponding behavior so that the virtual object can complete the current behavior goal. In this embodiment, the current behavior goal, object information and historical behavior can be input into the large language model for analysis to obtain a new behavior sequence, that is, a third behavior sequence, such as Figure 2 As shown in the process.
[0075] The virtual object is controlled to execute the behaviors in the third behavior sequence. The implementation of this step is the same as the implementation of the behaviors in the second behavior sequence described above, and will not be repeated here.
[0076] Therefore, through the above technical scheme, after controlling the virtual object to execute the behavior in its behavior sequence, it is possible to determine whether the virtual object has completed its current behavior goal, and to generate a new behavior sequence when the behavior goal has not been completed, so that the behavior control of the virtual object can be actively and continuously performed during the control process to complete the behavior goal, which can not only ensure the initiative and continuity of the virtual object's behavior, but also improve the accuracy and flexibility of the control of the virtual object, thereby enhancing the user experience.
[0077] As another example, controlling the virtual object to perform the behavior in the second behavior sequence may include: If the current behavior determined based on the second behavior sequence includes a dialogue behavior but does not include a movement behavior, the body movement of the virtual object is determined based on the voice information corresponding to the dialogue behavior. Among them, the behavior sequence can be parsed based on the method described above, and the type of the behavior can be determined based on the parsed behavior name. For example, if the current behavior includes a dialogue behavior but does not include a movement behavior, it means that the virtual object does not need to move when outputting a dialogue. In this scenario, in order to increase the diversity of virtual object feedback, the voice information corresponding to the dialogue behavior can be obtained. Among them, the voice information can be generated based on speech synthesis technology and the dialogue text of the dialogue behavior. In this embodiment, the body movement when outputting the voice information can be further generated. For example, the corresponding body movement can be generated based on the voice information through Co-Speech technology.
[0078] Based on the voice information and the body movement, the virtual object is controlled to perform the current behavior. Accordingly, based on the behavior parameters of the current behavior, the dialogue text of the dialogue behavior can be displayed in the virtual scene, and the voice information can be output at the same time and the virtual object can be controlled to display the body movement, so as to further improve the diversity of virtual object control and make the feedback of the virtual object more real and natural.
[0079] Based on the same inventive concept, the present disclosure also provides a control device for a virtual object, such as Figure 3 As shown, the device 10 comprises: A first determination module 100, configured to determine a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; A second determination module 200 is used for, in response to receiving the interaction information, performing a behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute a first behavior sequence of the virtual object, where the first behavior sequence of the virtual object is determined based on the behavior target and the object information; A first generating module 300 is used to generate a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued; The first control module 400 is used to control the virtual object to execute the behavior in the second behavior sequence.
[0080] Optionally, the second determining module includes: A first determination submodule, configured to determine priorities of behavior intentions corresponding to the interaction information and the behavior target, respectively, based on the interaction information and the behavior target of the virtual object; The second determination submodule is used to determine that the first behavior sequence will not continue to be executed if the priority of the behavior intention corresponding to the interaction information is higher than the priority of the behavior intention corresponding to the behavior target.
[0081] Optionally, the device further comprises: A third determination module, configured to determine whether the behavior target of the virtual object is updated based on the interaction information and the behavior target of the virtual object; A second generating module, configured to generate a new behavior target of the virtual object when it is determined that the behavior target of the virtual object is updated; The first generation module comprises: The first generating submodule is used to generate the second behavior sequence based on the interaction information, the object information and the new behavior target when it is determined that the first behavior sequence is not to be continued.
[0082] Optionally, the device further comprises: An adding module, used for adding the interaction information to the memory data of the virtual object; The first generation module comprises: The second generating submodule is used to generate the second behavior sequence based on the interaction information, the memory data, the object information and the behavior target.
[0083] Optionally, different behaviors in the second behavior sequence are separated by separators, and the separators include serial separators and parallel separators; The first control module comprises: A parsing submodule, configured to parse the second behavior sequence, and if the parallel delimiter is parsed, add the behavior adjacent to the parallel delimiter to the behavior group; if the serial delimiter or the end mark of the behavior sequence is parsed, generate a behavior instruction based on the parsed behavior, wherein the behavior instruction is used to indicate one behavior or multiple behaviors in the behavior group to be executed in parallel; The sending submodule is used to stream the behavior instructions according to the parsing order of the behavior instructions, and the behavior instructions are used to control the virtual object to execute the behavior indicated by the behavior instructions.
[0084] Optionally, the device further comprises: a fourth determination module, configured to determine whether the virtual object has completed a current behavior goal after controlling the virtual object to perform the behavior in the second behavior sequence; A third generating module, configured to generate a third behavior sequence for the virtual object based on the current behavior target, the object information, and the historical behavior performed by the virtual object based on the second behavior sequence if it is determined that the virtual object has not completed the current behavior target; The second control module is used to control the virtual object to execute the behaviors in the third behavior sequence.
[0085] Optionally, the first control module includes: A third determination submodule, configured to determine a body movement of the virtual object based on voice information corresponding to the dialogue behavior if the current behavior determined based on the second behavior sequence includes a dialogue behavior but does not include a movement behavior; A control submodule is used to control the virtual object to perform the current behavior based on the voice information and the body movement.
[0086] Reference below Figure 4, which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0087] like Figure 4 As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0088] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0089] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0090] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0091] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0092] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0093] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the behavior target of the virtual object based on the object information of the virtual object and the scene information of the virtual scene; determines the behavior target of the virtual object based on the object information of the virtual object and the scene information of the virtual scene; in response to receiving interaction information, performs behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; in the case of determining that the first behavior sequence does not continue to execute, generates a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target; and controls the virtual object to execute the behavior in the second behavior sequence.
[0094] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0095] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0096] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of the module does not limit the module itself in some cases. For example, the first determination module may also be described as "a module for determining the behavior target of the virtual object based on the object information of the virtual object and the scene information of the virtual scene".
[0097] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0098] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0099] According to one or more embodiments of the present disclosure, Example 1 provides a method for controlling a virtual object, the method comprising: Determining a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; In response to receiving the interaction information, performing a behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; In a case where it is determined that the first behavior sequence is not to be continued, generating a second behavior sequence for the virtual object based on the interaction information, the object information and the behavior target; The virtual object is controlled to execute the behaviors in the second behavior sequence.
[0100] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein the step of performing behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute the first behavior sequence of the virtual object includes: Based on the interaction information and the behavior target of the virtual object, determining the priorities of the behavior intentions corresponding to the interaction information and the behavior target respectively; If the priority of the behavior intention corresponding to the interaction information is higher than the priority of the behavior intention corresponding to the behavior target, it is determined that the first behavior sequence will not continue to be executed.
[0101] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the method further includes: Based on the interaction information and the behavior target of the virtual object, determining whether the behavior target is updated; In the case where it is determined that the behavior target is updated, generating a new behavior target for the virtual object; The step of generating a second behavior sequence for the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued includes: In the case where it is determined that the first behavior sequence is not to be continued, the second behavior sequence is generated based on the interaction information, the object information and the new behavior target.
[0102] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the method further includes: adding the interaction information to the memory data of the virtual object; The generating a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target includes: The second behavior sequence is generated based on the interaction information, the memory data, the object information and the behavior target.
[0103] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein different behaviors in the second behavior sequence are separated by delimiters, and the delimiters include serial delimiters and parallel delimiters; The controlling the virtual object to execute the behavior in the second behavior sequence includes: Parsing the second behavior sequence, if the parallel delimiter is parsed, adding the behavior adjacent to the parallel delimiter to the behavior group; if the serial delimiter or the end mark of the behavior sequence is parsed, generating a behavior instruction based on the parsed behavior, wherein the behavior instruction is used to indicate one behavior or multiple behaviors in the behavior group to be executed in parallel; The behavior instructions are streamed according to the parsing order of the behavior instructions, and the behavior instructions are used to control the virtual object to execute the behavior indicated by the behavior instructions.
[0104] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, wherein the method further includes: After controlling the virtual object to perform the behavior in the second behavior sequence, determining whether the virtual object completes the current behavior goal; If it is determined that the virtual object has not completed the current behavior goal, generating a third behavior sequence for the virtual object based on the current behavior goal, the object information, and the historical behavior performed by the virtual object based on the second behavior sequence; The virtual object is controlled to execute behaviors in the third behavior sequence.
[0105] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 1, wherein controlling the virtual object to perform the behavior in the second behavior sequence includes: If the current behavior determined based on the second behavior sequence includes a dialogue behavior but does not include a movement behavior, determining a body movement of the virtual object based on voice information corresponding to the dialogue behavior; The virtual object is controlled to perform the current behavior based on the voice information and the body movement.
[0106] According to one or more embodiments of the present disclosure, Example 8 provides a control device for a virtual object, the device comprising: A first determination module, configured to determine a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; a second determination module, configured to, in response to receiving the interaction information, perform a behavior intention analysis based on the interaction information and the behavior target of the virtual object, and determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; A first generating module, configured to generate a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued; The first control module is used to control the virtual object to execute the behavior in the second behavior sequence.
[0107] According to one or more embodiments of the present disclosure, Example 9 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-7 when executed by a processing device.
[0108] According to one or more embodiments of the present disclosure, Example 10 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of any one of the methods described in Examples 1-7.
[0109] According to one or more embodiments of the present disclosure, Example 11 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-7 when executed by a processor.
[0110] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0111] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0112] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A method for controlling a virtual object, characterized in that: The method comprises: Determining a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; In response to receiving the interaction information, performing a behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; In a case where it is determined that the first behavior sequence is not to be continued, generating a second behavior sequence for the virtual object based on the interaction information, the object information and the behavior target; The virtual object is controlled to execute the behaviors in the second behavior sequence.
2. The method according to claim 1, characterized in that The performing behavior intention analysis based on the interaction information and the behavior target of the virtual object to determine whether the first behavior sequence of the virtual object continues to be executed includes: Based on the interaction information and the behavior target of the virtual object, determining the priorities of the behavior intentions corresponding to the interaction information and the behavior target respectively; If the priority of the behavior intention corresponding to the interaction information is higher than the priority of the behavior intention corresponding to the behavior target, it is determined that the first behavior sequence will not continue to be executed.
3. The method according to claim 1, characterized in that The method further comprises: Based on the interaction information and the behavior target of the virtual object, determining whether the behavior target is updated; In the case where it is determined that the behavior target is updated, generating a new behavior target for the virtual object; The step of generating a second behavior sequence for the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued includes: In the case where it is determined that the first behavior sequence is not to be continued, the second behavior sequence is generated based on the interaction information, the object information and the new behavior target.
4. The method according to claim 1, characterized in that The method further comprises: adding the interaction information to the memory data of the virtual object; The generating a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target includes: The second behavior sequence is generated based on the interaction information, the memory data, the object information and the behavior target.
5. The method according to claim 1, characterized in that Different behaviors in the second behavior sequence are separated by separators, and the separators include serial separators and parallel separators; The controlling the virtual object to execute the behavior in the second behavior sequence includes: Parsing the second behavior sequence, if the parallel delimiter is parsed, adding the behavior adjacent to the parallel delimiter to the behavior group; if the serial delimiter or the end mark of the behavior sequence is parsed, generating a behavior instruction based on the parsed behavior, wherein the behavior instruction is used to indicate one behavior or multiple behaviors in the behavior group to be executed in parallel; The behavior instructions are streamed according to the parsing order of the behavior instructions, and the behavior instructions are used to control the virtual object to execute the behavior indicated by the behavior instructions.
6. The method according to claim 1, characterized in that The method further comprises: After controlling the virtual object to perform the behavior in the second behavior sequence, determining whether the virtual object completes the current behavior goal; If it is determined that the virtual object has not completed the current behavior goal, generating a third behavior sequence for the virtual object based on the current behavior goal, the object information, and the historical behavior performed by the virtual object based on the second behavior sequence; The virtual object is controlled to execute behaviors in the third behavior sequence.
7. The method according to claim 1, characterized in that The controlling the virtual object to execute the behavior in the second behavior sequence includes: If the current behavior determined based on the second behavior sequence includes a dialogue behavior but does not include a movement behavior, determining a body movement of the virtual object based on voice information corresponding to the dialogue behavior; The virtual object is controlled to perform the current behavior based on the voice information and the body movement.
8. A control device for a virtual object, characterized in that: The device comprises: A first determination module, configured to determine a behavior target of the virtual object based on object information of the virtual object and scene information of the virtual scene; a second determination module, configured to, in response to receiving the interaction information, perform a behavior intention analysis based on the interaction information and the behavior target of the virtual object, and determine whether to continue to execute a first behavior sequence of the virtual object, the first behavior sequence of the virtual object being determined based on the behavior target and the object information; A first generating module, configured to generate a second behavior sequence of the virtual object based on the interaction information, the object information and the behavior target when it is determined that the first behavior sequence is not to be continued; The first control module is used to control the virtual object to execute the behavior in the second behavior sequence.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Virtual object control method and device
CN120884889A