State updating method and device
By introducing state machines into digital humans and using stable and unstable states to manage behaviors and states, the problems of system complexity and poor scalability are solved, and the user experience and system stability are improved.
Patent Information
- Application Number
- CN202410906229.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-15
AI Technical Summary
Existing digital human systems are complex and difficult to maintain and expand. Especially as the complexity of behavioral patterns increases, the system has poor scalability and is difficult to manage multiple interaction methods and states, resulting in poor user interaction experience.
Introduce state machines into digital humans, and use state machines to manage behaviors and states by setting stable and unstable types of states to achieve flexible user interaction, reduce server load through client-side rendering, and improve response speed and system stability.
Effectively manage the behavior and status of digital humans, improve system scalability and maintainability, improve user experience and system stability, reduce expansion complexity, and avoid system complexity caused by an increase in the number of statuses.
Smart Images

Figure CN118779031A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of human-machine interaction (HMI), and in particular to a state updating method and device. Background Art
[0002] In recent years, digital human (DH) technology has developed rapidly. It provides users with more intelligent and humane services by imitating human behavior and thinking patterns.
[0003] Since the interaction between users and digital humans will trigger different behaviors and states of digital humans, and the user's interaction methods are endless, digital humans need to be set up with a variety of different behaviors and states. However, when the complexity of digital humans' behavior patterns increases, the system will become chaotic and difficult to maintain and expand.
[0004] Therefore, how to effectively manage the behavior and status of digital humans is an urgent problem that needs to be solved. Summary of the invention
[0005] The embodiment of the present invention provides a state updating method and device for managing the behavior and state of a digital human.
[0006] In a first aspect, an embodiment of the present invention provides a state updating method, which is applied to a digital human. A state machine is provided in the digital human, and the states in the state machine include a stable type state and an unstable type state. The stable type state is a state in which the next state is determined, and the unstable type state is a state in which the next state is uncertain. The method includes: receiving a first operation request from a user; determining that the first operation request corresponds to a first state in the state machine; updating the state machine from a current state to a first state; if the first state belongs to a stable type state, waiting for a second operation request from the user; if the first state belongs to an unstable type state, waiting for the user to input the first operation request, determining the corresponding second state according to the first operation request, and updating the state machine from the first state to the second state.
[0007] Through the above scheme, by setting a state machine in the digital human and setting stable type states and unstable type states in the state machine, the state machine can be used to effectively manage the state corresponding to the current behavior of the digital human, so that the digital human can perform various behaviors in an orderly manner, so that the interaction between the digital human and the user can be more flexible, and not appear too mechanical and rigid.
[0008] Optionally, the state machine includes multiple state groups, each state group includes at least one state, and each state in each state group has the same migration rule; the method also includes: obtaining characteristic information of the third state to be added, the characteristic information is used to indicate the state of the next migration of the state; according to the state of the next migration of the state, determining the target state group to which the third state belongs in the state machine, the target state group is one of multiple state groups, and each state in the target state group has the same migration rule; reusing the migration rules of each state in the target state group, adding a third state to the state machine, and adding the third state to the target state group.
[0009] Through the above scheme, when the state machine needs to add a new state, it finds the group corresponding to the new state, and then reuses the configuration information of the group. In this way, the behavior pattern of the digital human can be expanded more conveniently. When new business rules are added or changed, the changes and impacts can be controlled within a limited number of states, effectively avoiding the risk of a single move affecting the entire system, greatly reducing the cost of subsequent expansion and maintenance, and improving the scalability of the system. The expansion of the system will not become complicated due to the increase in the number of states, and there is no need to repeatedly process existing behaviors, reducing the complexity of system expansion.
[0010] Optionally, the state machine is constructed in the following manner: obtaining characteristic information of each state, the characteristic information of a state including at least one of the following: state name, and migration relationship between the state and other states; constructing the state of each state in the initial state machine according to the characteristic information of each state, and setting migration rules between each state; dividing each state into multiple state groups, and each state in a state group has the same migration rules.
[0011] Through the above solution, complex behavioral logic can be simplified into an easy-to-manage state, thereby ensuring that the various behavioral logics of the digital human can be constrained by the state, and the behavior and state of the digital human can be managed more conveniently.
[0012] Optionally, the multiple state groups include an interactive state group and a non-interactive state group. In this way, the user's interaction request can be processed more efficiently, ensuring that the digital human can smoothly transition between different states, thereby improving the user experience and the stability of the system.
[0013] Optionally, the user's first operation request is used to instruct the start of the digital human, the current state is the "uninitialized" state, and the first state is the "initializing" state; after updating the state machine from the current state to the first state, it also includes: if the state machine is initialized successfully, the state machine is updated from the first state to the third state, and the third state is the "idle" state; if the state machine fails to initialize, the state machine is updated from the first state to the current state.
[0014] Through the above solution, the digital human is initialized, which can enhance the response speed of the system. The digital human can respond to user instructions faster and more accurately, ensuring smoother interaction with the user.
[0015] Optionally, the user's first operation request is used to instruct to close the digital human, and the first state is the "end" state; after updating the state machine from the current state to the first state, it also includes: destroying the user data of the digital human during this interaction process, and updating the state machine from the first state to the "uninitialized" state.
[0016] The above solution provides an effective way to handle and end the digital human process, ensuring the integrity and stability of the system.
[0017] Optionally, the digital human is located on the client side. This can effectively avoid the problem of poor user interaction experience caused by network delays and slow response speeds. The user interaction experience will be significantly improved. In addition, client-side rendering can better utilize local computing resources and reduce the load on the server, thereby improving the efficiency and response speed of the entire system.
[0018] In a second aspect, an embodiment of the present invention provides a state updating device, which is applied to a digital human. A state machine is provided in the digital human. The states in the state machine include a stable type state and an unstable type state. The stable type state is a state where the next state is determined, and the unstable type state is a state where the next state is uncertain. The device includes:
[0019] A receiving module, the receiving module is used to receive a first operation request from a user;
[0020] A determination module, the determination module is used to determine that the first operation request corresponds to a first state in the state machine;
[0021] The update module is used to update the state machine from the current state to the first state; if the first state is a stable type state, wait for the user's second operation request; if the first state is an unstable type state, wait for the user to enter the first operation request, determine the corresponding second state according to the first operation request, and update the state machine from the first state to the second state.
[0022] Optionally, the state machine includes multiple state groups, each state group includes at least one state, and each state in each state group has the same migration rule. The update module is also used to: obtain characteristic information of a third state to be added, the characteristic information is used to indicate the state of the next migration of the state; determine the target state group to which the third state belongs in the state machine according to the state of the next migration of the state, the target state group is one of multiple state groups, and each state in the target state group has the same migration rule; reuse the migration rules of each state in the target state group, add a third state to the state machine, and add the third state to the target state group.
[0023] Optionally, a construction module may also be included. Before the determination module determines that the first operation request corresponds to the first state in the state machine, the construction module is used to obtain characteristic information of each state, construct the state of each state in the initial state machine according to the characteristic information of each state, and set the migration rules between each state, and then divide each state into multiple state groups, and each state in a state group has the same migration rule. The characteristic information of a state includes at least one of the following: state name, and migration relationship between the state and other states.
[0024] Optionally, the multiple state groups include an interactive state group and a non-interactive state group.
[0025] Optionally, the user's first operation request is used to instruct the start of the digital human, the current state is the "uninitialized" state, and the first state is the "initializing" state; after the update module updates the state machine from the current state to the first state, it is also used to: if the state machine is initialized successfully, then update the state machine from the first state to the third state, the third state is the "idle" state; if the state machine fails to initialize, then update the state machine from the first state to the current state.
[0026] Optionally, the user's first operation request is used to instruct to close the digital human, and the first state is the "end" state; after updating the state machine from the current state to the first state, the update module is also used to: destroy the user data of the digital human during this interaction process, and update the state machine from the first state to the "uninitialized" state.
[0027] Optionally, the digital human is located on the client side.
[0028] In a third aspect, the present application also provides a status update device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, it implements the method described in the various possible designs of the first aspect.
[0029] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program or instructions are stored. When the computer program or instructions are executed by a processor, the method described in the various possible designs of the first aspect is implemented.
[0030] In a fifth aspect, an embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect or the first aspect above.
[0031] These implementations or other implementations of the present application will be more concise and understandable in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 A schematic diagram of the architecture of a digital human provided by an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a state update process provided by an embodiment of the present invention;
[0035] Figure 3 A schematic diagram of the states and the transition relationship between the states in a state machine provided in an embodiment of the present invention;
[0036] Figure 4 A schematic diagram of a process of updating a state in an initialization scenario provided by an embodiment of the present invention;
[0037] Figure 5 A schematic diagram of a process of updating a state in an output scenario provided by an embodiment of the present invention;
[0038] Figure 6 A schematic diagram of a process of updating a state in an input scenario provided by an embodiment of the present invention;
[0039] Figure 7 A schematic diagram of a process of updating a state in an ending scenario provided by an embodiment of the present invention;
[0040] Figure 8 A schematic diagram of a process for constructing a state machine in a digital human provided by an embodiment of the present invention;
[0041] Fig. 9 A schematic diagram of a status updating device provided by an embodiment of the present invention;
[0042] Fig.10 A schematic diagram of another status updating device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] To facilitate understanding of this solution, the application scenario of this solution is introduced below.
[0045] Digital human technology has been applied in many specific scenarios. For example, in the field of education, digital humans can serve as virtual teachers or trainers to provide personalized teaching and training services. Especially in distance education and online training, digital humans can enhance the learning experience and effect through interaction. In the medical field, digital humans can play a variety of roles, including virtual nurses, health consultants, etc. It can help patients monitor their health, provide health advice, and even play a role in psychological counseling. In the entertainment industry, digital humans can be used as virtual idols, hosts or actors to participate in various entertainment activities such as movies, TV shows, and concerts. Its realistic performance and interactive capabilities can greatly enhance the audience's experience. In the field of smart homes, digital humans can serve as home assistants to help users manage home devices and provide daily life suggestions such as weather forecasts and schedules. Digital human technology is constantly expanding its application areas through its intelligent and humanized services, providing a richer and more personalized user experience.
[0046] In the financial field, digital humans can combine artificial intelligence (AI), augmented reality (AR), three-dimensional (3D), mixed reality (MR) and other technologies to form virtual images and provide financial services to customers. For example, digital humans can be used as financial stewards to answer customers' questions and provide manual customer service. That is, by imitating human behavior and language, digital humans can answer customers' common questions, handle simple service requests, and even recommend and sell products. In addition, digital humans can also provide companionship when users use APPs, guide users to operate, and send greetings on birthdays. Digital humans can also notify users of fund arrival and arrangements, provide intimate reminders, and help customers complete transactions, purchase financial products, or transfer money. It can be seen that digital human technology can not only enhance user experience, but also bring more convenience and efficiency.
[0047] As described in the background technology, there are many problems with existing digital human technology, mainly including the following two:
[0048] First, the digital human system is complex. Specifically, there are many ways for users to interact with digital humans, including clicking, dragging, etc. Different ways of interaction will trigger different feedback from digital humans, including expressions, actions, and language feedback. For example, when a user clicks on a digital human, the digital human will smile and say "Hello"; when a user drags the digital human, the digital human will wave and say "How can I help you?" If the user clicks first and then drags the digital human, the digital human will smile first, then wave and say "Welcome to our service." Based on this, the more ways of interaction there are, the more behaviors and states a digital human needs to have. Different ways of interaction and feedback mechanisms will increase the complexity of the system, causing the system to become chaotic and difficult to maintain and expand;
[0049] Second, the digital human system has the problem of poor scalability. Specifically, as the complexity of the digital human's behavior pattern increases, the system becomes chaotic and difficult to expand and maintain. Each new behavior state may require redefining the system behavior and migration rules, which increases the complexity of system expansion.
[0050] In order to solve the above problems, we can consider introducing a state machine into the digital human. That is to say, the digital human can introduce some "objects" that can represent its internal operation. These "objects" can be facial expressions, body movements, language expression processes, and even network connection conditions, etc. These objects are called "states". All states in the digital human constitute the state machine in the digital human. The behavior of the digital human can depend on its state, and its related behavior can be changed according to the change of its state.
[0051] A state machine, usually a finite state machine (FSM), is a mathematical computational model used to represent a finite number of states and behaviors such as transitions and actions between these states. FSM is widely used in many different fields, such as electronic engineering, linguistics, computer science, philosophy, biology, mathematics, and logic. For example, state machines are used in everyday devices such as access control gates and vending machines. When the gate accepts a card swipe, the gate will change from a closed state to an open state; when a coin of the appropriate number and denomination is inserted, the vending machine will spit out the corresponding product.
[0052] But in the existing state machine, all states are stable. That is, if it is in one of these states, without any external input, the state machine will not undergo any migration or state change. The state machine will immediately enter the next state after receiving any input. However, when the user interacts with the digital human, the user's interactive input is completely random and cannot be exhaustive. During the process of the user interacting with the state machine, the state machine cannot immediately determine the next state. Therefore, the existing state machine cannot meet the system's control over the digital human. In other words, there are problems in directly introducing the existing state machine into the digital human.
[0053] In view of this, the present invention provides a state updating method, which introduces a state machine into a digital human and adds an unstable type of state to the state machine to cope with random operations of users and solve the above problems.
[0054] Before introducing the specific status update method, the architecture of the digital human is explained below.
[0055] See also Figure 1 The architecture includes a digital human 110, in which a state machine 111 is provided, and the digital human 110 is located in a client 100. The client 100 may be a smart device such as a personal computer, a smart phone, or a tablet computer.
[0056] When the client 100 is working, the client 100 accepts the user's operation request and calls the internal digital human 110 to respond to the user's operation request. When responding, the digital human 110 will use the local state machine 111 to maintain or manage the state of the digital human 110. In this way, even if there are problems with the current network, resulting in network delays and slow response speeds, by setting the digital human 110 on the client 100, the problem of poor user interaction experience caused by this can be effectively avoided, and the user's interaction experience will be significantly improved. In addition, the rendering of the client 100 can better utilize local computing resources and reduce the load on the server, thereby improving the efficiency and response speed of the entire system.
[0057] based on Figure 1 See the system architecture shown in Figure 2 , showing a flow chart of a state updating method provided by the present application, the method is applicable to a digital human, in which a state machine is provided. Exemplarily, the digital human may be the above Figure 1 Digital man 110 in.
[0058] like Figure 2 As shown, the method includes:
[0059] Step 201: The digital human receives a first operation request from a user.
[0060] Here, when the user needs to interact with the digital human, he will open the program in the client, wake up the digital human in the program, and send instructions to the digital human, that is, the digital human receives the operation instructions from the user.
[0061] Step 202: The digital human determines that the first operation request corresponds to the first state in the state machine.
[0062] Here, the user's operation request is used as an external event triggering action, and the state machine determines the first state in the state machine corresponding to the triggering action according to the triggering action at this time.
[0063] For example, see Figure 3 , showing a possible state machine structure schematic diagram. The state machine may have a "waiting for initialization" state, an "initializing" state, a "destroying" state, a "sleeping" state, an "idle" state, a "pause" state, a "hidden" state, an "input" state, a "working" state, an "output" state, etc., without limitation here.
[0064] based on Figure 3 If the user initiates a consultation operation request to the digital human, the digital human determines that the state corresponding to the consultation operation request is the "input" state. For another example, if the user initiates a broadcast operation request to the digital human, the digital human determines that the state corresponding to the broadcast operation request is the "output" state.
[0065] Step 203: The digital human updates the state machine from the current state to the first state.
[0066] For example, assuming that the digital human was previously in the "idle" state, the digital human is updated from the "idle" state to the "input" state, or, the digital human is updated from the "idle" state to the "output" state.
[0067] Understandably, the digital human can also parse the current user operation request, determine the user's operation purpose, and perform corresponding actions.
[0068] Step 204: The digital human determines the type to which the first state belongs:
[0069] If the first state is a stable state, execute step 205;
[0070] If the first state is an unstable state, step 206 is executed.
[0071] In the present application, the states in the state machine include stable type states and unstable type states. Among them, the stable type state is a state where the next state is determined, such as the static state when the digital human is hidden. The unstable type state is a state where the next state is uncertain, such as the "input" state of the digital human. The next state of the unstable type state is determined after the user enters the operation request, so the unstable state is a transitional state.
[0072] For example, Figure 3 Taking the state machine shown in the figure as an example, assume that the state machine is in the "input" state at this time and continues to accept user input. The "input" state here is an unstable state, because the digital human will not always be in this state. When the digital human is in an unstable state, there is no way to determine which state the system will migrate to. Until the user's continuous input ends, all the information input by the user will be uniformly obtained by the digital human, and the digital human will migrate to the "working" state. The digital human interacts with the server to perform the corresponding work, and the digital human waits for the server to respond. However, if the user cancels the input at any time during the input process, the operation related to the digital human system and the user consultation input will be interrupted. At this time, the digital human's movements, expressions, mouth shapes and corresponding marks are interrupted and reset, and the digital human returns to the "idle" state. Before new input, the digital human will remain in the "idle" state. By setting an unstable state, the behavior of the digital human can be more flexible, rather than appearing too mechanical and rigid.
[0073] Step 205: Waiting for the second operation request from the user.
[0074] Here, if the first state is a stable state, that is, the first state is a state where the next state is determined, after the user sends an operation request to the state machine, the state machine can directly update from the current state to the first state, and then wait for the user's next operation request.
[0075] Step 206: After waiting for the user to input the first operation request, determine the second state according to the first operation request, and update the state machine from the first state to the second state.
[0076] Here, if the first state is an unstable state, when the user sends an operation request to the state machine, the state machine updates from the current state to the first state, waiting for the user to continue to send operation requests until the user enters the first operation request. The state machine determines the second state according to the first operation request and updates the state machine from the first state to the second state.
[0077] In order to more clearly introduce the above status update method, the implementation method of different operation requests corresponding to the above steps is introduced below.
[0078] Before introducing the process, a state architecture diagram of a state machine provided in this application is given as an example.
[0079] Still Figure 3 Take the state machine in as an example. In this state machine, in addition to multiple states, it also includes transition rules between different states.
[0080] The arrow between two states refers to the migration rule between the two states. The arrow can be unidirectional or bidirectional. For example, there is a bidirectional arrow between the "idle" state and the "input" state, which means that the state machine can migrate from the "idle" state to the "input" state, and can also transfer from the "input" state to the "idle" state. For another example, there is a unidirectional arrow between the "input" state and the "working" state, which means that the state machine can only migrate from the "input" state to the "working" state, but cannot transfer from the "working" state to the "input" state.
[0081] In addition, there may be other forms of transition between two states, which are not limited here.
[0082] based on Figure 3 The state machine example shown in the figure is described separately for different scenarios.
[0083] (I) Initialization scene.
[0084] See also Figure 4 , a possible state update flow chart in an initialization scenario is given as an example, in which the digital human is in an "uninitialized" state by default. The method includes the following steps:
[0085] Step 401: The digital human receives a start instruction from the user.
[0086] Here, the start instruction is used to instruct to start the digital human. The start instruction can be understood as the first operation request in the above content.
[0087] Step 402: The digital human determines that the user's start-up instruction corresponds to the "initializing" state in the state machine.
[0088] Here, the "initializing" state is the first state in the above content.
[0089] Step 403: The digital human updates the state machine from the “uninitialized” state to the “initializing” state.
[0090] Among them, the "initializing" state is a stable type state, so combined with the above Figure 2 In step 204, the next step is to wait for the user's second operation request.
[0091] At the same time, the digital human will also parse the user's start-up instruction to determine that the user instructs to start the digital human. Therefore, the digital human can start initialization according to the user's start-up instruction, and after waiting for the initialization to be completed, step 404 can be executed.
[0092] Optional, a series of initialization actions, which may include building models, textures, etc.
[0093] Step 404: Determine whether the state machine is initialized successfully, if so, execute step 405, otherwise, execute step 406.
[0094] Step 405: Update the state machine from the "initializing" state to the "idle" state.
[0095] Step 406: Update the state machine from the "initializing" state to the "uninitialized" state.
[0096] Optionally, if the digital human determines that the initialization has failed, it may also return an indication message of "initialization failed" to the user, and then wait for the user's next operation. If the user instructs the digital human to initialize again, step 401 may be restarted.
[0097] In the above initialization scenario, the digital human is in the "uninitialized" state before the client is initialized. After receiving the command to start the digital human, the digital human migrates to the "initializing" state and performs a series of corresponding initialization behaviors. After successful initialization, it migrates to the "idle" state. If the initialization fails, it returns to the "uninitialized" state. Initializing the digital human can enhance the response speed of the system. The digital human can respond to user commands faster and more accurately, ensuring smoother interaction with the user.
[0098] (2) Output scenario
[0099] See also Figure 5 , a possible state update flow chart in an output scenario is given as an example, in which the digital human is in the "idle" state by default. The method includes the following steps:
[0100] Step 501: The digital human receives a "broadcast" operation request from the user.
[0101] After the state machine in the digital human is initialized successfully, the user can interact with the digital human. For example, the user sends a "broadcast" operation request to the digital human.
[0102] Here, the "broadcast" operation request is used to instruct the digital human to broadcast. The "broadcast" operation request can be understood as the first operation request in the above content.
[0103] Step 502: The digital human determines that the user's operation request corresponds to the "output" state in the state machine.
[0104] Here, the "output" state is the first state in the above content.
[0105] Step 503: The digital human updates the state machine from the “idle” state to the “output” state.
[0106] Among them, the state of "output" is a stable type state, so combined with the above Figure 2 In step 204, the next step is to wait for the user's second operation request.
[0107] When the digital human is in the "output" state, the digital human can enable the player to broadcast information to the user and control the model to show corresponding mouth shape, expression and movement.
[0108] Optionally, after the digital human finishes the broadcast, it returns to the "idle" state.
[0109] Step 504: The digital human waits for the next operation request from the user.
[0110] (3) Input scenario
[0111] See also Figure 6 , a possible state update flow chart in an input scenario is given as an example, in which the digital human is in the "idle" state by default. The flow chart includes the following steps:
[0112] Step 601: The digital human receives an “input” operation request from the user.
[0113] After the state machine in the digital human is initialized successfully, the user can interact with the digital human, for example, the user sends an "input" operation request to the digital human.
[0114] For example, users can initiate consultations with digital humans by using “text” or “voice” as input.
[0115] Here, the "input" operation request is used to instruct the digital human to perform input. The "input" operation request can be understood as the first operation request in the above content.
[0116] Step 602: The digital human determines that the user's "input" operation request corresponds to the "input" state in the state machine.
[0117] Here, the "input" state is the first state in the above content.
[0118] Step 603: The digital human updates the state machine from the “idle” state to the “input” state.
[0119] Among them, the state of "input" is an unstable type state, so combined with the above Figure 2 In step 204, the next step is to wait for the user to complete the first operation request (i.e., wait for the user to complete the input), determine the corresponding second state according to the first operation request, and update the state machine from the first state to the second state. If the user cancels the input at any time during the input process, the "input" state of the digital human is interrupted, and the digital human returns to the "idle" state. Before the new input, the digital human will remain in the "idle" state.
[0120] Step 604: The digital human waits for the user to finish inputting, determines the next state, and updates the state machine from the "input" state to the next state.
[0121] Here, the next state is the second state in the above content.
[0122] Optionally, when the user's continuous input ends, the digital human will send the user's consultation content to the background server, and the state machine will migrate to the "working" state and wait for the server to respond.
[0123] By following these steps, you can ensure that the system can always respond appropriately to changing user input.
[0124] (iv) Ending scene.
[0125] See also Figure 7 , a possible state update flow chart in the end scenario is given as an example, in which the digital human is in the "idle" state by default. The method includes the following steps:
[0126] Step 701: The digital human receives an operation request of “closing the digital human” from the user.
[0127] Here, the operation request of "turning off the digital person" is used to instruct to turn off the digital person. The operation request of "turning off the digital person" can be understood as the first operation request in the above content.
[0128] Step 702: The digital human determines that the operation request of “turning off the digital human” corresponds to the “end” state in the state machine.
[0129] Here, the "end" state is the first state in the above content.
[0130] Step 703: The digital human updates the state machine from the "idle" state to the "end" state.
[0131] Among them, the "end" state is a stable type state, so combined with the above Figure 2 In step 204, the next step is to wait for the user's second operation request.
[0132] At the same time, the digital human will also parse the user's closing instruction to determine that the user instructs to close the digital human. Therefore, the digital human can close the digital human according to the user's closing instruction, and then step 704 can be executed.
[0133] Step 704: The digital human destroys the user data in this interaction process and updates the state machine from the "end" state to the "uninitialized" state.
[0134] In this way, an effective way can be provided to handle and end the digital human process, ensuring the integrity and stability of the system.
[0135] It should be noted that the above are only examples of several possible scenarios. Digital humans may also have other scenarios, which will not be listed here one by one.
[0136] The implementation process of the above state update method requires a state machine, which can be built in advance and stored in the digital human. Next, a possible construction method of the state machine in the digital human is introduced, such as Figure 8 As shown, the following steps are included:
[0137] Step 801: Acquire characteristic information of each state. The characteristic information of a state includes at least one of the following items: state name, and transition relationship between the state and other states.
[0138] Optionally, the characteristic information of each state can be input into the digital human by the developer. The developer can determine multiple behaviors that the digital human should have according to business requirements, and determine multiple states corresponding to the multiple behaviors, and the multiple states can include stable type states and unstable type states.
[0139] Further, optionally, the number of multiple states is limited. After determining multiple states according to various behaviors of the digital human, a specific state slot can be assigned to each state, and a unique identifier, i.e., the state name in the feature information, can be configured for it. Among them, the state slot refers to a specific slot used to allocate and manage various behavioral states in the digital human behavior state management system. Each state slot has a unique identifier, which can be used to simplify and manage complex behavior logic. By defining the behavior logic as a limited state description and assigning it to a specific state slot, the clarity and maintainability of the system can be greatly improved.
[0140] Based on the above content, by determining the behavior and state of the digital human according to the actual application scenario, the complex behavioral logic can be simplified into an easy-to-manage state. By abstracting each state of the digital human, all the behaviors and states of the digital human will operate according to the "behavioral norms", thereby ensuring that the various behavioral logics of the digital human can be constrained by the state, and various unexpected exceptions will not occur, which greatly improves the clarity and maintainability of the system.
[0141] Step 802: construct the states of each state in the initial state machine according to the characteristic information of each state, and set the transition rules between each state.
[0142] Specifically, firstly, each state is created in the initial state machine according to the state name in the characteristic information of each state, and then, according to the transition relationship between each state, each state with transition association is determined, and the transition rules between these states are set.
[0143] Among them, the transition rule means: when the user interacts with the state machine, the user's interactive action is used as external input to trigger the corresponding state in the state machine to update, that is, the state machine migrates from one state to another. The rules of this migration process are the transition rules. Defining state transition rules can ensure that the system can respond appropriately to user interactions.
[0144] Step 803: Divide each state into multiple state groups, and each state in a state group has the same transition rule.
[0145] Optionally, there are many possible ways to group multiple status groups. For example:
[0146] One possible grouping method is to combine Figure 3 The state machine shown can define states such as "input", "working", "initializing", and "destroying" as the "non-interactive" state group, that is, when the state machine is in these states, the user cannot interact with the digital human. In contrast, states such as "idle", "sleeping", and "output" are defined as the "interactive" state group, that is, when the state machine is in these states, the user can interact with the digital human. For example, the digital human can accept user input at any time, interrupt and reset the digital human's movements, expressions, mouth shapes, etc. Through this grouping method, the system can process user interaction requests more efficiently, ensuring that the digital human can smoothly transition between different states, thereby improving user experience and system stability.
[0147] Another possible grouping method is to group together the transitions associated with the same state. Figure 3 In the state machine shown, the "input" state and the "output" state can be put in one group because both the "input" state and the "output" state can migrate to the "idle" state.
[0148] Of course, there may be other grouping methods without limitation.
[0149] The above introduces the construction method of the state machine in the digital human. After the state machine is built, the state in the state machine can also be updated. The following takes the addition of a new state as an example to introduce.
[0150] Optionally, when a developer needs to add a new state, he can first obtain the configuration information of the state to be added based on the above step 801, and then determine the target state group to which the new state belongs in the state machine according to the state of the next migration of the new state, reuse the migration rules of each state in the target state group, and finally, add the new state to the state machine and add the new state to the target state group.
[0151] For example, based on Figure 3The state machine shown, for example, when the state machine needs to add a new state, this state, like the "input" state, will eventually migrate to the "idle" state, then, make sure that the newly added state is in the same group as the "input" state. When any state in this group migrates to the "idle" state, the state machine only needs to process the migration rules and conditions from this state to the "idle" state, and does not need to process other states except this state and the "idle" state. Reuse the migration rules of each state in this group, that is, reuse the migration rules from other states in this group to the "idle" state. Finally, add the newly added state to the state machine, and add the newly added state to the same group as the "input" state.
[0152] Based on the above method, when the state machine needs to add a new state, it only needs to pay attention to the migration method, binding behavior and migration conditions of the new state, and then the configuration information of the group can be reused. In this way, the behavior mode of the digital human can be expanded more conveniently. When the business rules are added or changed, the changes and impacts can be controlled within a limited number of states, effectively avoiding the risk of a single move affecting the entire system, greatly reducing the cost of subsequent expansion and maintenance, and improving the scalability of the system. Moreover, the expansion of the system will not become complicated due to the increase in the number of states, and there is no need to repeatedly process existing behaviors, reducing the complexity of system expansion.
[0153] Based on the above content, it can be known that: the present invention provides a state updating method, which is applied to a digital human, in which a state machine is provided, and the states in the state machine include a stable type state and an unstable type state, wherein the stable type state is a state in which the next state is determined, and the unstable type state is a state in which the next state is uncertain; the method comprises: receiving a first operation request from a user; determining that the first operation request corresponds to a first state in the state machine; updating the state machine from the current state to the first state; if the first state belongs to a stable type state, waiting for a second operation request from the user; if the first state belongs to an unstable type state, waiting for the user to input the first operation request, determining the corresponding second state according to the first operation request, and updating the state machine from the first state to the second state.
[0154] Through the above scheme, by setting a state machine in the digital human and setting stable type states and unstable type states in the state machine, the state machine can be used to effectively manage the state corresponding to the current behavior of the digital human, so that the digital human can perform various behaviors in an orderly manner, so that the interaction between the digital human and the user can be more flexible, and not appear too mechanical and rigid.
[0155] Based on the same concept, an embodiment of the present application also provides a status update device, which can execute the status update method introduced in the above content.
[0156] Please participate Fig. 9 , a schematic diagram of the structure of a status updating device provided in an embodiment of the present application is given, such as Fig. 9 As shown, the order processing device includes:
[0157] The receiving module 901 is used to receive a first operation request from a user.
[0158] The determination module 902 is used to determine that the first operation request corresponds to a first state in the state machine.
[0159] Update module 903 is used to update the state machine from the current state to the first state; if the first state is a stable type state, wait for the user's second operation request; if the first state is an unstable type state, wait for the user to input the first operation request, determine the corresponding second state according to the first operation request, and update the state machine from the first state to the second state.
[0160] Optionally, the state machine includes multiple state groups, each state group includes at least one state, and each state in each state group has the same migration rule. The update module 903 is also used to: obtain characteristic information of the third state to be added, the characteristic information is used to indicate the state of the next migration of the state; determine the target state group to which the third state belongs in the state machine according to the state of the next migration of the state, the target state group is one of multiple state groups, and each state in the target state group has the same migration rule; reuse the migration rules of each state in the target state group, add a third state to the state machine, and add the third state to the target state group.
[0161] Optionally, a construction module 904 may also be included. Before the determination module 902 determines that the first operation request corresponds to the first state in the state machine, the construction module 904 is used to obtain characteristic information of each state, construct the state of each state in the initial state machine according to the characteristic information of each state, and set the migration rules between each state, and then divide each state into multiple state groups, and each state in a state group has the same migration rule. The characteristic information of a state includes at least one of the following: state name, and migration relationship between the state and other states.
[0162] Optionally, the multiple state groups include an interactive state group and a non-interactive state group.
[0163] Optionally, the user's first operation request is used to instruct the start of the digital human, the current state is the "uninitialized" state, and the first state is the "initializing" state; after updating the state machine from the current state to the first state, the update module 903 is also used to: if the state machine is initialized successfully, update the state machine from the first state to the third state, and the third state is the "idle" state; if the state machine fails to initialize, update the state machine from the first state to the current state.
[0164] Optionally, the user's first operation request is used to instruct to close the digital human, and the first state is the "end" state; after updating the state machine from the current state to the first state, the update module 903 is also used to: destroy the user data of the digital human in this interaction process, and update the state machine from the first state to the "uninitialized" state.
[0165] Optionally, the digital human is located on the client side.
[0166] Please participate Fig.10 , showing a schematic diagram of the structure of another state updating device provided in an embodiment of the present application, such as Fig.10 As shown, the state updating device includes: a memory 1001 and a processor 1002, and the processor 1002 is coupled to the memory 1001. The memory 1001 is used to store program instructions, and the processor 1002 is used to call the program instructions stored in the memory 1001 and execute the above-mentioned state updating method according to the obtained program.
[0167] Optionally, the state update device may further include an interface circuit 1003, which may be a transceiver or an input / output interface. The input / output interface is used to input and / or output information, where output may be understood as sending and input may be understood as receiving. The processor 1002 may communicate with other devices in the state update device or other devices other than the state update device through the interface circuit 1003 to obtain information required for executing the above state update method.
[0168] When the state updating device 1000 is used to implement Figure 2 When performing the method shown, the processor 1002 is used to implement the functions of the above-mentioned receiving module 901, determining module 902, updating module 903 and constructing module 904.
[0169] It is understandable that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0170] The memory in the embodiments of the present application can be a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a compact disc read-only memory (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. The storage medium can also be a component of the processor.
[0171] Based on the same technical concept, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the computer executes the above-mentioned transaction processing method.
[0172] Based on the same technical concept, an embodiment of the present invention further provides a computer-readable program product, which, when executed, enables a computer to execute the above transaction processing method.
[0173] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0174] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0175] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0177] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A state updating method, characterized in that: Applied to a digital human, the digital human is provided with a state machine, the states in the state machine include a stable type state and an unstable type state, the stable type state is a state where the next state is determined, and the unstable type state is a state where the next state is uncertain; the method comprises: receiving a first operation request from a user; Determining that the first operation request corresponds to a first state in the state machine; Updating the state machine from a current state to the first state; If the first state belongs to the stable type state, waiting for a second operation request from the user; If the first state belongs to the unstable type state, after waiting for the user to input the first operation request, the corresponding second state is determined according to the first operation request, and the state machine is updated from the first state to the second state.
2. The method according to claim 1, characterized in that The state machine includes a plurality of state groups, each state group includes at least one state, and each state in each state group has the same transition rule; the method further includes: Acquire characteristic information of a third state to be added, where the characteristic information is used to indicate a next transition state of the state; Determine, according to a state of a next transition of the state, a target state group to which the third state belongs in the state machine, wherein the target state group is one of the multiple state groups, and each state in the target state group has the same transition rule; The transition rules of each state in the target state group are reused, the third state is newly added to the state machine, and the third state is added to the target state group.
3. The method according to claim 1, characterized in that The state machine is constructed as follows: Acquire characteristic information of each state, wherein the characteristic information of a state includes at least one of the following: a state name, and a transition relationship between the state and other states; According to the characteristic information of each state, construct each state in the initial state machine and set the transition rules between each state; The states are divided into a plurality of state groups, and the states in a state group have the same transition rule.
4. The method according to claim 2 or 3, characterized in that The multiple state groups include an interactive state group and a non-interactive state group.
5. The method according to claim 1, characterized in that The first operation request of the user is used to instruct to start the digital human, the current state is the "uninitialized" state, and the first state is the "initializing" state; After the state machine is updated from the current state to the first state, the method further includes: If the state machine is initialized successfully, the state machine is updated from the first state to a third state, where the third state is an "idle" state; If the state machine fails to be initialized, the state machine is updated from the first state to the current state.
6. The method according to claim 1, characterized in that The first operation request of the user is used to instruct to close the digital human, and the first state is the "end" state; After the state machine is updated from the current state to the first state, the method further includes: Destroy the user data of the digital human in this interaction process, and update the state machine from the first state to the "uninitialized" state.
7. The method according to claim 1, characterized in that The digital human is located at the client.
8. A status updating device, characterized in that: Applied to a digital human, the digital human is provided with a state machine, the states in the state machine include a stable type state and an unstable type state, the stable type state is a state where the next state is determined, and the unstable type state is a state where the next state is uncertain; the device comprises: A receiving module, wherein the receiving module is used to receive a first operation request from a user; a determination module, the determination module being configured to determine that the first operation request corresponds to a first state in the state machine; An update module, wherein the update module is used to update the state machine from the current state to the first state; if the first state belongs to the stable type state, wait for the second operation request of the user; if the first state belongs to the unstable type state, wait for the user to input the first operation request, determine the corresponding second state according to the first operation request, and update the state machine from the first state to the second state.
9. A status updating device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method according to any one of claims 1 to 7 are implemented when the processor executes the program.
10. A computer-readable storage medium, characterized in that: It stores a computer program executable by a computer device, and when the program is run on the computer device, the computer device executes the steps of any method described in claims 1 to 7.
