Task management method and system for digital human

By adopting a continuous real-time dynamic computing allocation framework, master-slave architecture design and in-memory database solution in the task management system, the existing system's low resource utilization rate and insufficient responsiveness when facing complex task management scenarios is solved, and efficient, flexible and reliable task allocation is achieved.

CN119512706APending Publication Date: 2025-02-25ZHEJIANG FENGWO IOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411531029.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When existing task management systems face complex situations such as a large number of tasks, diverse task types, uncertain execution time, and dynamic changes in priority and distribution rate, the resource utilization rate is low, it is difficult to quickly respond to changing needs, and the dependence relationship and urgency between tasks cannot be fully considered, resulting in uneven task allocation and low execution efficiency.

Method used

Adopt a continuous real-time dynamic computing allocation framework, ensuring high system availability and cross-platform compatibility through master-slave architecture design, using in-memory databases significantly reduces data latency and improves performance, achieving accuracy, flexibility and efficiency of task allocation, and automatically switches slave nodes to take over task allocation in the event of master node failure through distributed architecture and automatic switching mechanisms.

Benefits of technology

Improve the accuracy, flexibility and efficiency of task allocation, enhance the adaptability and availability of the system, significantly reduce operational costs and server costs, and improve resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512706A_ABST
    Figure CN119512706A_ABST
Patent Text Reader

Abstract

The invention discloses a task management method and system for a digital person. The method comprises the following steps: initializing loading task information and state information and distribution rules of the digital person; state change information and distribution rules are monitored and updated in real time; based on the state and the task priority of the digital person in the memory, allocating a single task or a batch task to the digital person meeting the condition according to a preset allocation rule, setting a receiving timeout locking condition during task allocation, and reallocating if timeout is not confirmed; after it is detected that the task expires or is completed, corresponding task information is cleared up to recycle memory resources; through a distributed architecture and a master-slave node automatic switching mechanism, when the master node fails, the slave node automatically takes over task allocation. Through the technical scheme of the invention, the accuracy, flexibility and efficiency of task allocation and the ability to adapt to continuous changes are improved, high availability and stability are ensured, the load pressure of a traditional database is reduced, and the operation cost is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of task management, and in particular to a task management method for digital humans and a task management system for digital humans. Background Art

[0002] At present, the server-side dynamic task allocation system mainly adopts two core modes to meet different business needs.

[0003] The first mode is the task pre-generation mode, in which tasks are generated before a specific time point according to pre-defined rules and assigned to the corresponding digital human for subsequent execution. This mode is widely used in fields such as factory automation production lines. For example, robots or automation systems can perform specific production tasks at a specified time according to a predetermined plan.

[0004] The second mode is a dynamic calculation allocation mode based on real-time multi-dimensional information. In this mode, the allocation of tasks relies on real-time collected data for calculation and generation, and then the tasks are immediately pushed to the executor digital human. This method is particularly suitable for service scenarios that require fast response, such as dynamic dispatching in food delivery or taxi services to ensure the most efficient use of resources.

[0005] As for the task pre-generation mode, this traditional task allocation mechanism usually faces the problem of low resource utilization and is difficult to respond quickly to changing needs. For example, when the task volume is very large, the generation of tasks not only consumes a lot of resources, but also takes a long time. Especially when faced with complex situations such as diverse task types, uncertain execution time, dynamically changing priorities and distribution rates, this mode is particularly insufficient. In addition, when processing batch tasks, it often fails to fully consider the dependencies between tasks and the urgency of different tasks, resulting in unbalanced task allocation and inefficient execution.

[0006] In the current dynamic computing task allocation model, the operation of the system mostly depends on key trigger points, such as the customer's order behavior in the dispatch system. This mechanism ensures that the data range of the calculation is centralized and accurate, and can be calculated for each specific service request. Although this method provides fast and accurate service matching, its non-continuous real-time dynamic calculation mode may sometimes fail to capture the instant changes between trigger points or related attributes, which limits the system's rapid response ability and adaptability. Summary of the invention

[0007] In view of the above problems, the present invention provides a task management method and system for digital humans, which improves the accuracy, flexibility, efficiency and ability to adapt to changing tasks by continuously and dynamically calculating and allocating single and batch tasks in real time. The master-slave architecture design ensures that the system is compatible with various operating systems and has high availability in the event of failures. The use of an in-memory database solution not only significantly reduces data latency, but also greatly improves performance, reduces the load pressure on traditional databases, and effectively reduces operating costs.

[0008] To achieve the above object, the present invention provides a task management method for digital humans, comprising:

[0009] Initialize and load the task information to be assigned, the digital human's status information and the assignment rules;

[0010] Monitor and update the state change information and allocation rules of the digital human in real time, so that the task allocation is carried out by the digital human in the latest state according to the latest allocation rules;

[0011] Based on the status and task priority of the digital human in the memory, single tasks or batch tasks are assigned to the digital human who meets the conditions according to the preset assignment rules, and the receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task will be reassigned;

[0012] After detecting that a task has expired or completed, clean up the corresponding task information to reclaim memory resources;

[0013] Through the distributed architecture and automatic master-slave node switching mechanism, the slave node automatically takes over the task allocation when the master node fails.

[0014] In the above technical solution, preferably, the initialization loading of the task information to be assigned, the digital human status information and the assignment rules specifically includes:

[0015] Load the single tasks and batch tasks to be assigned, as well as the associated assignment rules;

[0016] Load the details of all online digital people and all the attributes involved in the calculation allocation;

[0017] Loading the allocation rules of the digital person;

[0018] Load the assigned task information of the ongoing batch tasks.

[0019] In the above technical solution, preferably, the real-time monitoring and updating of the state change information and allocation rules of the digital human so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules, specifically includes:

[0020] Monitor the state of the digital human in real time, and update the state information of the digital human in real time when the state or information of the digital human changes;

[0021] The allocation rules of the digital human are monitored in real time, and changes are made synchronously and immediately effective according to the adjusted allocation rules of the digital human, so that the digital human in the latest state can be allocated according to the latest allocation rules during the task allocation process.

[0022] In the above technical solution, preferably, the real-time monitoring and updating of the state change information and allocation rules of the digital human so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules, specifically includes:

[0023] After receiving the task, the digital human reports the execution status and cancels the receiving timeout locking condition;

[0024] After the digital human completes the task, it reports the success or failure status of the execution and updates the completion status of the task.

[0025] In the above technical solution, preferably, based on the status of the digital human in the memory and the task priority, a single task or batch task is assigned to the digital human who meets the conditions according to the preset assignment rules, and a receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task is reallocated. The specific process includes:

[0026] Traversing the memory to find a digital human in an idle state, and checking whether the digital human has a single task to be performed;

[0027] If there are single tasks that need to be executed, check each single task in turn;

[0028] If the digital human is assigned a single task, a reception timeout lock condition is set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time;

[0029] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned;

[0030] Check, in order of priority, whether the digital human meets the environmental conditions for executing a certain batch task, whether the limit on the number of executions of a single digital human for the batch task is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit;

[0031] If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set, so that no other tasks will be assigned to the digital human within the preset lock time;

[0032] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned.

[0033] In the above technical solution, preferably, after detecting that a task is expired or completed, the corresponding task information is cleaned up to reclaim memory resources, and the specific process includes:

[0034] Start the timer and check the task execution status at preset intervals;

[0035] If the single task has expired, the single task is removed from the memory and the memory resources are recovered in time;

[0036] If the batch task has expired, the related information of the batch task in the memory is deleted to recycle the memory resources in time.

[0037] In the above technical solution, preferably, the distributed architecture and the master-slave node automatic switching mechanism are used to automatically take over the task allocation by the slave node when the master node fails. The specific process includes:

[0038] During the initial startup process, the master node and a preset number of slave nodes are activated;

[0039] The master node and the slave node are synchronized in real time to ensure the consistency of task status, digital human status and allocation rules;

[0040] The master node calculates task allocation in real time, and when the master node fails, a slave node is switched to the master node.

[0041] The present invention further proposes a task management system for digital humans, which uses the task management method for digital humans disclosed in any one of the above technical solutions, including:

[0042] The task rule loading module is used to initialize and load the task information to be assigned, the digital human's status information and the assignment rules;

[0043] A status rule monitoring module is used to monitor and update the status change information and allocation rules of the digital human in real time, so that the task allocation is carried out by the digital human in the latest status according to the latest allocation rules;

[0044] The task allocation module is used to allocate single tasks or batch tasks to qualified digital humans based on the status and task priority of the digital humans in the memory according to the preset allocation rules, and set the receiving timeout lock condition when allocating tasks. If the timeout is not confirmed, the task will be reallocated;

[0045] The task cleanup and recovery module is used to clean up the corresponding task information to recycle memory resources after detecting that the task has expired or completed;

[0046] The master-slave node switching module is used to automatically take over task allocation by the slave node when the master node fails through the distributed architecture and the master-slave node automatic switching mechanism.

[0047] In the above technical solution, preferably, the state rule monitoring module is specifically used for:

[0048] Monitor the state of the digital human in real time, and update the state information of the digital human in real time when the state or information of the digital human changes;

[0049] Monitor the allocation rules of the digital human in real time, and make changes synchronously and immediately effective according to the adjusted allocation rules of the digital human, so that the digital human in the latest state can be allocated according to the latest allocation rules during the task allocation process;

[0050] After receiving the task, the digital human reports the execution status and cancels the receiving timeout locking condition;

[0051] After the digital human completes the task, it reports the success or failure status of the execution and updates the completion status of the task.

[0052] In the above technical solution, preferably, the task regulation allocation module is specifically used for:

[0053] Traversing the memory to find a digital human in an idle state, and checking whether the digital human has a single task to be performed;

[0054] If there are single tasks that need to be executed, check each single task in turn;

[0055] If the digital human is assigned a single task, a reception timeout lock condition is set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time;

[0056] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned;

[0057] Check, in order of priority, whether the digital human meets the environmental conditions for executing a certain batch task, whether the limit on the number of executions of a single digital human for the batch task is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit;

[0058] If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set, so that no other tasks will be assigned to the digital human within the preset lock time;

[0059] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned.

[0060] Compared with the prior art, the present invention has the following beneficial effects:

[0061] 1. A continuous real-time dynamic computing allocation framework is proposed. The framework adopts a master-slave architecture design to ensure the system is compatible with various operating systems and has high availability in the event of failures. This framework not only provides a quick solution for similar application scenarios, but also effectively reduces R&D costs and significantly accelerates the product development cycle.

[0062] 2. A comprehensive and flexible task allocation rule solution is proposed, which not only meets the administrator's needs to set and adjust task allocation rules from multiple dimensions, but also provides convenience for future expansion. The design takes into account various potential business scenarios, ensures the adaptability and sustainability of the system allocation logic, and enables administrators to flexibly formulate rules based on actual operating conditions.

[0063] 3. A more efficient data structure is adopted, which significantly reduces memory usage, thereby improving the overall performance and resource utilization of the system, and further reducing server costs.

[0064] 4. Based on the task allocation rule scheme, a set of efficient task allocation rule algorithms is implemented, which can significantly improve the speed and accuracy of task matching and ensure the efficiency of the task allocation process.

[0065] 5. The in-memory database solution is adopted, based on which real-time query of system data can be realized, supporting in-depth analysis and comprehensive statistics in multiple dimensions. This solution not only significantly reduces data latency, but also greatly improves performance. By reducing the load pressure of traditional databases, operating costs are effectively reduced. Thanks to the low-latency real-time data processing capability of the in-memory database, administrators can monitor and respond to system anomalies in a timely manner, greatly reducing the risk of potential problems spreading. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flowchart of a task management method for a digital human disclosed in an embodiment of the present invention;

[0067] Figure 2 This is a module diagram of a task management system for digital humans disclosed in an embodiment of the present invention.

[0068] In the figure, the corresponding relationship between each component and the reference numeral is as follows:

[0069] 1. Task rule loading module, 2. Status rule monitoring module, 3. Task rule allocation module, 4. Task cleanup and recovery module, 5. Master-slave node switching module. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0071] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0072] like Figure 1 As shown, a task management method for digital human provided by the present invention includes:

[0073] Initialize and load the task information to be assigned, the digital human's status information and the assignment rules;

[0074] Monitor and update the status change information and allocation rules of digital humans in real time, so that the task allocation is carried out by the digital humans in the latest status according to the latest allocation rules;

[0075] Based on the status and task priority of the digital human in the memory, single tasks or batch tasks are assigned to the digital human who meets the conditions according to the preset assignment rules, and the receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task will be reassigned;

[0076] After detecting that a task has expired or completed, clean up the corresponding task information to reclaim memory resources;

[0077] Through the distributed architecture and automatic master-slave node switching mechanism, the slave node automatically takes over the task allocation when the master node fails.

[0078] In this implementation, single and batch tasks are allocated through continuous real-time dynamic calculation to improve the accuracy, flexibility, efficiency and ability to adapt to constant changes in task allocation. The master-slave architecture design ensures that the system is compatible with various operating systems and has high availability in the event of failures. By adopting an in-memory database solution, not only data latency is significantly reduced, but performance is also greatly improved, the load pressure on traditional databases is reduced, and operating costs are effectively reduced.

[0079] Specifically, the present invention constructs a continuous real-time dynamic computing allocation framework, which can instantly respond to changes in the state of digital humans and dynamic updates of allocation rules, thereby realizing a comprehensive and flexible task allocation rule solution, which can not only meet the administrator's needs to set and adjust task allocation rules from multiple dimensions, but also provide convenience for future expansion. The design of this solution takes into account various potential business scenarios, allowing administrators to flexibly formulate rules according to actual operating conditions, ensuring the adaptability and sustainability of the system allocation logic. In addition, the master-slave architecture design ensures that the system is compatible with various operating systems and has high availability in the event of failures. It adopts a more efficient memory data structure, significantly reduces memory usage, and supports cross-platform efficient and compatible operation on mainstream operating system platforms such as Widnows, Linux, and MacOS.

[0080] In the above implementation, preferably, the initialization process of loading the task information to be assigned, the digital human status information and the assignment rules includes:

[0081] Load the single tasks and batch tasks to be assigned, as well as the associated assignment rules;

[0082] Load the details of all online digital people and all the attributes involved in the calculation allocation;

[0083] Load the allocation rules of digital people;

[0084] Load the assigned task information of the ongoing batch tasks, including the completion status of the digital human, such as the number of executions, success and failure statistics, etc.

[0085] In the above implementation, preferably, the state change information and allocation rules of the digital human are monitored and updated in real time, so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules. The specific process includes:

[0086] Monitor the status of the digital human in real time. When the status or information of the digital human changes (for example, when executing a task, on standby or offline, or when the system version changes, etc.), notify the system in real time through the message queue to update the status information of the digital human in real time.

[0087] The allocation rules of digital humans are monitored in real time, and managers make changes synchronously and immediately based on the adjusted allocation rules of digital humans, so that digital humans in the latest status can be allocated according to the latest allocation rules during the task allocation process.

[0088] Specifically, for single and batch task updates, when adding or changing single and batch tasks, they are synchronized to this system, and random sorting is performed on tasks of the same priority level according to the set task priority.

[0089] In the above implementation, preferably, the state change information and allocation rules of the digital human are monitored and updated in real time, so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules. The specific process also includes:

[0090] After receiving the task, the digital human reports the execution status and cancels the receiving timeout lock condition;

[0091] After completing the task, the digital human reports the success or failure status and updates the completion status of the task.

[0092] In the above implementation, preferably, based on the status of the digital human in the memory and the task priority, a single task or batch task is assigned to the digital human that meets the conditions according to the preset assignment rule, and a receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task is reassigned. The specific process includes:

[0093] Traverse the memory to find the digital human in idle state, and check whether the digital human has a single task to be executed;

[0094] If there are single tasks that need to be executed, check each single task in turn;

[0095] If a digital human is assigned a single task, a receiving timeout lock condition will be set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time;

[0096] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times (for example, three times), the current task is abandoned;

[0097] In order of priority, check whether the digital human meets the environmental conditions for executing a certain batch task, whether the number of executions (successes, failures) of the batch task on a single digital human is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit;

[0098] If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set. No other tasks will be assigned to the digital human within the preset lock time.

[0099] If the digital person does not confirm receipt within the specified time, it will try to push again. If the push fails for a preset number of times (for example, three times), the current task will be abandoned, the task count will be withdrawn, and other digital people will be arranged to execute it later. During the implementation process, batch tasks will be randomly sorted according to the set priority.

[0100] In the above implementation, preferably, after detecting that a task has expired or has been completed, the corresponding task information is cleaned up to reclaim memory resources. The specific process includes:

[0101] Start the timer and check the task execution status at preset intervals;

[0102] If a single task has expired, the single task will be removed from the memory and memory resources will be recovered in time;

[0103] If the batch task has expired, the related information of the batch task in the memory will be deleted to recycle the memory resources in time.

[0104] In the above implementation, the task allocation is monitored in real time, the system memory data is queried immediately, and the data is converted into intuitive charts for display. By setting periodic scheduled tasks for real-time monitoring, any abnormal conditions that may occur during the task allocation process are detected. Once an abnormality is detected, the system will quickly start the alarm program and send notifications to relevant personnel via SMS and email.

[0105] In the above implementation, preferably, through the distributed architecture and the master-slave node automatic switching mechanism, when the master node fails, the slave node automatically takes over the task allocation, and the specific process includes:

[0106] During the initial system startup, the master node and a preset number of slave nodes are activated;

[0107] Real-time synchronization of master nodes and slave nodes to ensure consistency of task status, digital human status, and allocation rules;

[0108] The master node is responsible for real-time computing task allocation. When the master node encounters downtime or other failures, a slave node will be switched to the master node.

[0109] The service reconstruction process includes first safely taking a slave node offline, then reconstructing it. After the slave node completes the reconstruction and successfully starts, it will enter the data synchronization phase. After the slave node data synchronization is completed, the system will perform the master-slave role switching operation. At this time, the original master node will be temporarily downgraded to a slave node. Subsequently, the original master node is also taken offline for reconstruction. After the reconstruction is completed and data synchronization is completed, the system reconstruction process ends.

[0110] like Figure 2 As shown, the present invention further proposes a task management system for digital humans, applying the task management method for digital humans disclosed in any one of the above-mentioned implementation modes, including:

[0111] Task rule loading module 1, used to initialize and load the task information to be assigned, the digital human status information and the assignment rules;

[0112] The state rule monitoring module 2 is used to monitor and update the state change information and allocation rules of the digital human in real time, so that the task allocation is carried out by the digital human in the latest state according to the latest allocation rules;

[0113] Task allocation module 3 is used to allocate single tasks or batch tasks to qualified digital humans based on the status and task priority of the digital humans in the memory according to the preset allocation rules, and set the receiving timeout lock condition when allocating tasks. If the timeout is not confirmed, the task will be reallocated;

[0114] The task cleaning and recycling module 4 is used to clean up the corresponding task information to recycle memory resources after detecting that the task has expired or completed;

[0115] The master-slave node switching module 5 is used to automatically take over the task allocation by the slave node when the master node fails through the distributed architecture and the master-slave node automatic switching mechanism.

[0116] In the above implementation, preferably, the state rule monitoring module 2 is specifically used for:

[0117] Monitor the status of the digital human in real time, and update the status information of the digital human in real time when the status or information of the digital human changes;

[0118] Monitor the allocation rules of digital humans in real time, and make changes synchronously and immediately based on the adjusted allocation rules of digital humans, so that the latest digital humans can be allocated according to the latest allocation rules during the task allocation process;

[0119] After receiving the task, the digital human reports the execution status and cancels the receiving timeout lock condition;

[0120] After completing the task, the digital human reports the success or failure status and updates the completion status of the task.

[0121] In the above implementation, preferably, the task rule-based allocation module 3 is specifically used for:

[0122] Traverse the memory to find the digital human in idle state, and check whether the digital human has a single task to be executed;

[0123] If there are single tasks that need to be executed, check each single task in turn;

[0124] If a digital human is assigned a single task, a receiving timeout lock condition will be set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time;

[0125] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for the preset number of times, the current task will be abandoned.

[0126] In order of priority, check whether the digital human meets the environmental conditions for executing a batch task, whether the limit on the number of executions of a single digital human for the batch task is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit;

[0127] If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set. No other tasks will be assigned to the digital human within the preset lock time.

[0128] If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for the preset number of times, the current task will be abandoned.

[0129] According to the task management system for digital humans disclosed in the above-mentioned implementation mode, the functions to be implemented by each module thereof correspond to the steps in the task management method for digital humans disclosed in the above-mentioned implementation mode. During the implementation process, the operations are performed with reference to the above-mentioned implementation mode, which will not be described in detail here.

[0130] According to the task management method and system for digital humans disclosed in the above implementation, in order to verify the effects of the key technologies such as the continuous real-time dynamic computing allocation framework and the memory database solution proposed in the present invention in actual applications, the performance differences when using the current mainstream database technologies: Mysql database and Redis database are compared. The specific steps include:

[0131] 1. Experimental environment

[0132] 1.1. Hardware environment: The server configuration is Intel(R)Xeon(R)CPU E5-2680 v2@2.80GHz, 16GBRAM, SSD hard disk.

[0133] 1.2. Software environment: The operating system is Ubuntu 22.04LTS, the Node.js version is 20.11.0, the Redis version is 6.2.6, and the MySQL version is 5.7.

[0134] 2. Experimental Materials

[0135] 2.1. Simulate 10,000 digital humans of different models and states.

[0136] 2.2. Simulate 5000 single tasks and 500 batch tasks with different priorities and allocation rules.

[0137] 3. Experimental methods

[0138] 3.1. Instance group settings

[0139] 3.1.1. Example 1: Use real-time dynamic calculation method, adopt MySQL database for data storage and query, and perform task allocation.

[0140] 3.1.2. Example 2: Use real-time dynamic calculation method, adopt Redis database for data storage and query, and perform task allocation.

[0141] 3.1.3. Example 3: Using real-time dynamic computing, adopting in-memory database for data storage and query, and performing task allocation.

[0142] 4. Experimental steps

[0143] 4.1. In each instance, simulate scenarios such as digital human status changes, task updates, and allocation rule adjustments, and record corresponding indicators.

[0144] 4.2. Record key indicators such as task allocation time, resource utilization, etc. for each instance under the same conditions.

[0145] 5. Experimental results

[0146] 5.1. Example 1 (MySQL database solution): The average task allocation time is 35 milliseconds and the resource utilization rate is 50%.

[0147] 5.2. Example 2 (Redis database solution): The average task allocation time is 25 milliseconds and the resource utilization rate is 35%.

[0148] 5.3. Example 3 (the in-memory database solution of the present invention): the average task allocation time is 6 milliseconds and the resource utilization rate is 20%.

[0149] 6. Conclusion

[0150] Compared with Example 1, the present invention has significant improvements in average task allocation time and resource utilization, as follows:

[0151] 6.1. Example 2, based on Example 1, the average task allocation time is shortened by 28.57% and the resource utilization rate is reduced by 30%.

[0152] 6.2. Example 3, based on Example 1, the average task allocation time is shortened by 82.86% and the resource utilization rate is reduced by 60%.

[0153] 7. Observation and analysis

[0154] 7.1. The average task allocation time of Instance 1 (Mysql database solution) and Instance 2 (Redis database solution) will gradually increase with the increase in the number of digital people and tasks. As a result, the pressure on the database continues to increase, the intranet bandwidth traffic continues to increase, and the server pressure also continues to increase.

[0155] 7.2. In Example 3 (memory database solution), as the number of digital humans and tasks increases, since only key information is recorded in the memory, the memory grows slowly and the average task allocation time also grows very slowly.

[0156] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A task management method for digital humans, characterized in that: include: Initialize and load the task information to be assigned, the digital human's status information and the assignment rules; Monitor and update the state change information and allocation rules of the digital human in real time, so that the task allocation is carried out by the digital human in the latest state according to the latest allocation rules; Based on the status and task priority of the digital human in the memory, single tasks or batch tasks are assigned to the digital human who meets the conditions according to the preset assignment rules, and the receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task will be reassigned; After detecting that a task has expired or completed, clean up the corresponding task information to reclaim memory resources; Through the distributed architecture and automatic master-slave node switching mechanism, the slave node automatically takes over the task allocation when the master node fails.

2. The task management method for digital humans according to claim 1, characterized in that: The initialization process of loading the task information to be assigned, the digital human status information and the assignment rules includes: Load the single tasks and batch tasks to be assigned, as well as the associated assignment rules; Load the details of all online digital people and all the attributes involved in the calculation allocation; Loading the allocation rules of the digital person; Load the assigned task information of the ongoing batch tasks.

3. The task management method for digital humans according to claim 1, characterized in that: The real-time monitoring and updating of the state change information and allocation rules of the digital human so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules, specifically includes: Monitor the state of the digital human in real time, and update the state information of the digital human in real time when the state or information of the digital human changes; The allocation rules of the digital human are monitored in real time, and changes are made synchronously and immediately effective according to the adjusted allocation rules of the digital human, so that the digital human in the latest state can be allocated according to the latest allocation rules during the task allocation process.

4. The task management method for digital human according to claim 3, characterized in that: The real-time monitoring and updating of the state change information and allocation rules of the digital human so that the task allocation is performed by the digital human in the latest state according to the latest allocation rules, specifically includes: After receiving the task, the digital human reports the execution status and cancels the receiving timeout locking condition; After the digital human completes the task, it reports the success or failure status of the execution and updates the completion status of the task.

5. The task management method for digital humans according to claim 1, characterized in that: Based on the status of the digital human in the memory and the task priority, a single task or batch task is assigned to the digital human who meets the conditions according to the preset assignment rules, and a receiving timeout lock condition is set when assigning tasks. If the timeout is not confirmed, the task is reassigned. The specific process includes: Traversing the memory to find a digital human in an idle state, and checking whether the digital human has a single task to be performed; If there are single tasks that need to be executed, check each single task in turn; If the digital human is assigned a single task, a reception timeout lock condition is set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time; If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned; Check, in order of priority, whether the digital human meets the environmental conditions for executing a certain batch task, whether the limit on the number of executions of a single digital human for the batch task is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit; If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set, so that no other tasks will be assigned to the digital human within the preset lock time; If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned.

6. The task management method for digital humans according to claim 5, characterized in that: After detecting that a task has expired or has been completed, the corresponding task information is cleaned up to reclaim memory resources. The specific process includes: Start the timer and check the task execution status at preset intervals; If the single task has expired, the single task is removed from the memory and the memory resources are recovered in time; If the batch task has expired, the related information of the batch task in the memory is deleted to recycle the memory resources in time.

7. The task management method for digital humans according to claim 5, characterized in that: Through the distributed architecture and the master-slave node automatic switching mechanism, when the master node fails, the slave node automatically takes over the task allocation. The specific process includes: During the initial startup process, the master node and a preset number of slave nodes are activated; The master node and the slave node are synchronized in real time to ensure the consistency of task status, digital human status and allocation rules; The master node calculates task allocation in real time, and when the master node fails, a slave node is switched to the master node.

8. A task management system for digital humans, characterized in that: The task management method for digital humans according to any one of claims 1 to 7 is applied, comprising: The task rule loading module is used to initialize and load the task information to be assigned, the digital human's status information and the assignment rules; A status rule monitoring module is used to monitor and update the status change information and allocation rules of the digital human in real time, so that the task allocation is carried out by the digital human in the latest status according to the latest allocation rules; The task allocation module is used to allocate single tasks or batch tasks to qualified digital humans based on the status and task priority of the digital humans in the memory according to the preset allocation rules, and set the receiving timeout lock condition when allocating tasks. If the timeout is not confirmed, the task will be reallocated; The task cleanup and recovery module is used to clean up the corresponding task information to recycle memory resources after detecting that the task has expired or completed; The master-slave node switching module is used to automatically take over task allocation by the slave node when the master node fails through the distributed architecture and the master-slave node automatic switching mechanism.

9. The task management system for digital humans according to claim 8, characterized in that: The state rule monitoring module is specifically used for: Monitor the state of the digital human in real time, and update the state information of the digital human in real time when the state or information of the digital human changes; Monitor the allocation rules of the digital human in real time, and make changes synchronously and immediately effective according to the adjusted allocation rules of the digital human, so that the digital human in the latest state can be allocated according to the latest allocation rules during the task allocation process; After receiving the task, the digital human reports the execution status and cancels the receiving timeout locking condition; After the digital human completes the task, it reports the success or failure status of the execution and updates the completion status of the task.

10. The task management system for digital humans according to claim 9, characterized in that: The task allocation module is specifically used for: Traversing the memory to find a digital human in an idle state, and checking whether the digital human has a single task to be performed; If there are single tasks that need to be executed, check each single task in turn; If the digital human is assigned a single task, a reception timeout lock condition is set after the single task is sent to the digital human, and no other tasks will be assigned to the digital human within the preset lock time; If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned; Check, in order of priority, whether the digital human meets the environmental conditions for executing a certain batch task, whether the limit on the number of executions of a single digital human for the batch task is met, the number of tasks that the batch task currently needs to execute, and whether the number of executions of the batch task at the current time point has reached the upper limit; If the digital human meets all the execution conditions of the batch task, the batch task will be sent to the digital human, and a receiving timeout lock condition will be set, so that no other tasks will be assigned to the digital human within the preset lock time; If the digital person does not confirm receipt within the specified time, try to push again. If the push fails for a preset number of times, the current task will be abandoned.