A social robot cluster dynamic scheduling method and related system
By using a dynamic scheduling method to dynamically match resources based on task complexity and social robot capability profiles, the problems of resource waste and task failure in social robot clusters are solved, achieving efficient resource utilization and improved task success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UCAP INTERNET INFORMATION TECH
- Filing Date
- 2026-01-06
- Publication Date
- 2026-05-15
AI Technical Summary
In existing large-scale social robot cluster scheduling schemes, resource allocation is static and fails to differentiate between task complexity, resulting in resource waste and task failure, and failing to achieve on-demand allocation and capability matching.
By using a task-resource coupling-aware dynamic scheduling method, resource requirements are dynamically matched based on task complexity and social robot capability profiles. Suitable social robots are selected and temporary resources are added to execute tasks. After the temporary resources are reclaimed, the basic quota is restored.
It enables on-demand allocation and efficient utilization of hardware resources, avoids resource waste, improves task success rate, and enhances overall throughput efficiency.
Smart Images

Figure CN121455700B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to the fields of social robots, virtualization technology and cluster scheduling, and particularly to a method and system for dynamic scheduling of social robot clusters. Background Technology
[0002] In large-scale social bot platforms, virtualization technologies (such as containers or lightweight virtual machines) are typically used to deploy tens of thousands to hundreds of thousands of bot instances. Each bot performs independent tasks, such as content publishing, interactive commenting, and information collection. To support high concurrency, the system often relies on resource schedulers such as Kubernetes and Docker Swarm for container orchestration. A typical approach is to package the bot into a container image and deploy it to physical nodes with a fixed resource quota (e.g., 0.5 CPU, 256MB memory); the scheduler allocates new instances based on the remaining resources on the nodes; and a task queue system (such as RabbitMQ or Kafka) distributes tasks to idle bots. This "static resource allocation + random task distribution" model is the mainstream solution in the current industry.
[0003] However, because all robots use the same fixed resource quota, it's impossible to distinguish the actual resource requirements of lightweight tasks (such as liking posts) versus heavy-duty tasks (such as video generation and multi-platform publishing). Furthermore, task allocation is decoupled from robot resource status, causing robots performing heavy-duty tasks to time out or fail due to insufficient resources, while robots performing lightweight tasks remain under low load for extended periods, resulting in "resource mismatch." Since scheduling is based solely on the total resource level of nodes (e.g., CPU > 85%), it cannot perceive the dynamic coupling relationship between tasks, robots, and resources. Even if the nodes are generally idle, individual heavy-duty tasks may still fail due to local resource contention. Simultaneously, the lack of real-time profiling of robot execution capabilities prevents the priority allocation of high-complexity tasks to high-capability robots, reducing overall throughput efficiency.
[0004] In summary, existing large-scale social robot cluster scheduling schemes suffer from significant resource waste: CPU idleness and memory idleness; and the contradiction of task execution failure exists, making it impossible to achieve the scheduling goals of on-demand allocation, capacity matching, and efficient utilization. Summary of the Invention
[0005] This application provides a dynamic scheduling method and related system for social robot clusters to solve the problem of on-demand allocation and efficient utilization of hardware resources in clusters of tens of thousands of social robots, based on the dynamic matching relationship between task complexity and robot real-time resource capabilities. This avoids resource waste and task failure caused by static quotas and blind distribution. Through a task-resource coupling-aware dynamic scheduling method, on-demand scheduling and allocation of social robots and resources are achieved, enabling efficient and dynamic resource utilization and ensuring successful task execution.
[0006] The technical solution is as follows:
[0007] Firstly, a method for dynamically scheduling a social robot cluster is provided, wherein a social robot cluster consisting of several social robots is distributed and deployed in a virtualized manner across multiple physical servers, the method comprising:
[0008] After the target task enters the task queue, the task complexity score of the target task is calculated based on the task type, the number of target physical servers, and the method of generating task content.
[0009] Real-time monitoring and collection of each social robot's remaining CPU quota, available memory, and historical success rate to generate a capability profile for each social robot;
[0010] Traverse all available social robots: Calculate the matching degree between each social robot and the target task based on the social robot's capability profile information;
[0011] Select K social robots whose matching degree meets the set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or randomly select one candidate social robot as the target social robot, where K is a positive integer greater than 1;
[0012] Based on the task type and task content generation method of the target task, combined with the task complexity score of the target task, the resource requirement of the target task is estimated, and it is determined whether the current idle resources of the target social robot meet the resource requirement.
[0013] If so, the target task will be directly assigned to the target social robot for execution;
[0014] Otherwise, additional temporary resources are allocated to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
[0015] In one possible implementation, the matching degree between each social robot and the target task is calculated based on the social robot's capability profile information, specifically including:
[0016] The matching degree between the social robot and the target task is calculated using the following formula:
[0017]
[0018] Among them, the , , The following are the capabilities profile information of the social robot: remaining CPU quota, available memory, and historical success rate; and These are the CPU requirement quota and memory requirement determined based on the task complexity score of the target task, respectively; , and These are the weights for CPU quota, memory, and success rate, respectively.
[0019] In one possible implementation, the , and The system will dynamically adjust its resource requirements in real time based on the different needs of the target tasks.
[0020] In one possible implementation, when calculating the matching degree between each social robot and the target task based on the social robot's capability profile information, the method further includes:
[0021] Based on the target task, the CPU quota and memory requirement that match the task complexity score of the target task are searched from the preset score database table.
[0022] The preset score database table is established in the following way:
[0023] The task complexity scores of a large number of different tasks that social robots can perform are statistically analyzed.
[0024] Based on the task complexity score, tasks are categorized into groups corresponding to different task complexity scores;
[0025] For each task group, the CPU quota and memory requirement corresponding to the task group are estimated based on the task content generation method of all tasks in the task group.
[0026] In one possible implementation, when multiple target tasks are competing for the same target social robot, the method further includes, after determining the target social robot and before estimating the resource requirements of the target tasks:
[0027] The multiple target tasks are prioritized based on their task type and task complexity score.
[0028] The target task with the highest priority is assigned to the target social robot, and for each of the other target tasks, a non-conflicting social robot is selected from the corresponding candidate social robots as the target social robot.
[0029] In one possible implementation, after reclaiming the temporary resources released by the target social robot, the method further includes:
[0030] Read the task execution results;
[0031] If the task execution result is successful, then update the historical success rate of the target robot.
[0032] Secondly, a dynamic scheduling system for a social robot cluster is provided. The scheduling system includes a scheduling device and multiple physical servers. The social robot cluster, consisting of several social robots, is distributed and deployed on the multiple physical servers in a virtualized manner. The scheduling device allocates resources and tasks to the social robots deployed on the physical servers. Specifically, the scheduling device includes:
[0033] The calculation module is used to calculate the task complexity score of the target task after the target task enters the task queue, based on the task type, the number of target physical servers, and the method of generating task content.
[0034] The generation module is used to monitor and collect the remaining CPU quota, available memory and historical success rate of each social robot in real time to generate capability profile information for each social robot.
[0035] The traversal module is used to traverse all idle social robots: calculate the matching degree between each social robot and the target task based on the social robot's capability profile information;
[0036] The selection module is used to select K social robots whose matching degree meets a set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or a randomly selected candidate social robot as the target social robot, wherein K is a positive integer greater than 1;
[0037] The judgment module is used to estimate the resource requirements of the target task based on the task type, task content generation method and task complexity score of the target task, and to determine whether the current idle resources of the target social robot meet the resource requirements.
[0038] The processing module is used to directly assign the target task to the target social robot for execution when the judgment result is yes;
[0039] The processing module is further configured to allocate additional temporary resources to the target social robot when the judgment result is negative, assign the target task to the target social robot for execution, and reclaim the temporary resources released by the target social robot after execution; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
[0040] Thirdly, an electronic device is provided, comprising:
[0041] At least one processor; and
[0042] A memory communicatively connected to the at least one processor; wherein,
[0043] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described above and any possible implementations.
[0044] Fourthly, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the aspects described above and any possible implementation thereof.
[0045] Fifthly, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the aspects and any possible implementations described above.
[0046] The beneficial effects of the technical solution provided in this application include at least the following:
[0047] As can be seen from the above technical solution, the embodiments of this application can quantify the complexity of the target task to be executed, obtain the capability profile of each social robot, calculate the matching degree between each social robot and the target task, and then select candidate social robots whose matching degree meets the threshold, and select the target social robot for scheduling; then, it is determined whether the idle resources of the target social robot meet the resource requirements of the target task. If so, the target task is directly assigned to the target social robot for execution; otherwise, temporary resources are added to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution. This application, by designing a task-resource coupling-aware dynamic scheduling mechanism, can achieve dynamic matching based on task complexity and the idle resource capabilities of social robots, ensuring on-demand allocation and efficient utilization of hardware server resources, avoiding resource waste while improving task success rate.
[0048] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a schematic diagram illustrating the steps of a dynamic scheduling method for a social robot cluster provided in an embodiment of this application.
[0051] Figure 2 This is a schematic diagram of the scenario architecture of a dynamic scheduling system for a social robot cluster provided in another embodiment of this application.
[0052] Figure 3 This is a schematic diagram of the dynamic scheduling process of a social robot cluster provided in one embodiment of this application.
[0053] Figure 4 This is a structural block diagram of a social robot cluster dynamic scheduling device provided in another embodiment of this application.
[0054] Figure 5 This is a block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation
[0055] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0056] Obviously, the described embodiments are only some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0057] It should be noted that the terminal devices involved in the embodiments of this application may include, but are not limited to, smart devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablet computers; the display devices may include, but are not limited to, personal computers, televisions, and other devices with display functions.
[0058] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0059] In view of the problems of resource waste and task failure caused by static resource quotas and blind task distribution in existing social robot clusters of tens of thousands, this application proposes a dynamic scheduling scheme for social robot clusters. The main inventive concept is as follows: The complexity of the target task to be executed is quantified, and a capability profile of each social robot is constructed. The matching degree between each social robot and the target task is calculated, and candidate social robots whose matching degree meets the threshold are selected, from which the target social robot is chosen for scheduling. Then, it is determined whether the idle resources of the target social robot meet the resource requirements of the target task. If so, the target task is directly assigned to the target social robot for execution; otherwise, temporary resources are added to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution. This application, by designing a task-resource coupling-aware dynamic scheduling mechanism, can achieve dynamic matching based on task complexity and the idle resource capabilities of social robots, ensuring on-demand allocation and efficient utilization of hardware server resources, avoiding resource waste while improving task success rate.
[0060] Figure 1 The diagram illustrates the steps of a dynamic scheduling method for a social robot cluster provided in this application. It should be understood that the executing entity of this method is a dynamic scheduling device for the social robot cluster. This device can be an electronic device or software module with data computing, processing, and storage functions, such as a terminal or server composed of hardware electronic devices like computers, tablets, smart wearable devices, and smart terminals. Alternatively, it can be a software module or component integrated or installed in these hardware electronic devices; this application does not limit this. Here, this application uses a server as an example of a scheduling device. By establishing communication connections with multiple physical servers, it achieves scheduling and management of a social robot cluster composed of several social robots distributed and deployed in a virtualized manner across multiple physical servers.
[0061] Reference Figure 2 The diagram illustrates the scenario architecture of a dynamic scheduling system for a social robot cluster. A social robot cluster consisting of several social robots B is distributed across multiple physical servers S1. The scheduling device D can be deployed on physical server S2; in fact, it can also be deployed on any physical server S1, but this is not shown in the diagram. The scheduling device uses the scheduling method of this application to schedule matching social robots B for the target task and adds temporary resources when resources are insufficient, so that social robots B can successfully execute the target task. This achieves on-demand allocation and efficient utilization, avoids resource waste, and improves the task execution success rate.
[0062] like Figure 1 As shown, the dynamic scheduling method for the social robot cluster includes the following steps:
[0063] Step 102: After the target task enters the task queue, calculate the task complexity score of the target task based on the task type, the number of target physical servers, and the method of generating task content.
[0064] In this application's solution, a task queue can be established in advance. After a target task enters the task queue, tasks in the queue are processed sequentially according to their order. For each target task to be processed, to calculate its task complexity score, parameters related to task complexity can be obtained, such as task type, number of target physical servers, and task content generation method. The task type can include: like tasks, image / text publishing tasks, video generation tasks, information retrieval tasks, etc. The number of target physical servers can be the number of physical servers required to execute the task. For example, a like task may only require one physical server, an image / text publishing task can also be completed with a single physical server, while a video generation task requires three physical servers. It is evident that different task types can correspond to different requirements for the number of target physical servers.
[0065] Optionally, after obtaining the three types of parameters—task type, number of target physical servers, and task content generation method—the different parameters can be quantified into specific indicator scores (e.g., each parameter is scored from 1 to 5 based on its respective dimension). The task complexity score of the target task is then calculated according to the weighting ratios set for different parameters. For example, the task complexity score for a "like" task. Task complexity score for image and text publishing tasks Task complexity score for video generation task .
[0066] Alternatively, a pre-trained large model, such as a task complexity score prediction model, can be used. The task type, the number of target physical servers, and the task content generation method can be input as three-dimensional features into the task complexity score prediction model, which then outputs the predicted task complexity score. Specifically, the task complexity score prediction model can be based on historical target tasks' task type, number of target physical servers, and task content generation method as sample features, combined with the historical target task's task complexity score as sample labels. The corresponding large model can be repeatedly debugged to optimize parameters, ultimately resulting in a converged task complexity score prediction model.
[0067] It should be noted that this application does not limit the method for determining the task complexity score of the target task. It should be understood that other methods besides the two methods mentioned above can also be used, such as taking the average or the best result after determining the score using the two methods mentioned above.
[0068] Step 104: Monitor and collect the remaining CPU quota, available memory, and historical success rate of each social robot in real time to generate a capability profile of each social robot.
[0069] Specifically, the operational status of all social robots deployed on different physical servers can be monitored in real time. This includes monitoring CPU resource usage (CPU utilization rate, remaining CPU quota, etc.), memory usage (used memory, available memory, etc.), and task execution status (historical success rate, etc.). Furthermore, all or part of these operational data can be collected as capability profile information representing the operational capabilities of each social robot. In this application's solution, the remaining CPU quota, available memory, and historical success rate of each social robot can be selected as its capability profile information.
[0070] For example, the operation status of all social robots can be continuously monitored and periodically collected through corresponding data collection modules. Taking one social robot as an example, its remaining CPU quota (e.g., currently 0.3 cores used, basic quota is 1 core, then 0.7 cores remain), available memory (e.g., 512 MB is the quota limit, 300 MB used, 212 MB remaining), and historical success rate (95 successful out of the past 100 tasks, then the success rate is 0.95) can be used to generate a capability profile of the social robot and represent it as follows: Among them, the aforementioned , , The information includes the social robot's capability profile: remaining CPU quota, available memory, and historical success rate.
[0071] Step 106: Traverse all idle social robots: Calculate the matching degree between each social robot and the target task based on the social robot's capability profile information.
[0072] Optionally, in this application, the matching degree between the social robot and the target task can be calculated using the following formula:
[0073]
[0074] Among them, the , , The following are the capabilities profile information of the social robot: remaining CPU quota, available memory, and historical success rate; and These are the CPU requirement quota and memory requirement determined based on the task complexity score of the target task, respectively; , and These are the weights for CPU quota, memory, and success rate, respectively.
[0075] One feasible way is to... , and Set them to the same value, that is, the weight ratio of the three terms in the matching degree formula of the target task is the same.
[0076] Optionally, the , and The resource requirements of the target task are dynamically adjusted in real time. For example, if the target task is a "like" task, its task complexity score is... This task requires 0.1 cores and 50MB of memory, indicating that the resource and memory requirements are not high. Therefore, the weighting of these two items can be set relatively low, while the weighting of the success rate item can be set higher. Specific weight values can be adjusted based on experience, and this application does not impose any limitations on them. For example, weights can be set... , and .
[0077] Optionally, when calculating the matching degree between each social robot and the target task based on the social robot's capability profile information, the CPU quota and memory requirement matching the task complexity score of the target task can also be retrieved from a preset score database table. In this way, the corresponding CPU quota and memory requirement can be retrieved from the preset score database table based on the task complexity score of each target task, and then used in the calculation of the matching degree formula described above.
[0078] In this application, the preset score database table can be established in the following way:
[0079] First, the task complexity scores of a large number of different tasks that the social robot can perform are statistically analyzed. Then, tasks are categorized according to their complexity scores to obtain task groups corresponding to different complexity scores. Finally, for each task group, the CPU quota and memory requirements for that task group are estimated based on the task content generation methods of all tasks within that group. The pre-defined score database can be divided into 10 categories according to task complexity scores from 1 to 10, with each category corresponding to a set of parameters: CPU quota and memory requirements. Using this pre-defined score database, the corresponding CPU quota and memory requirements can be quickly retrieved based on the task complexity score of each target task, for use in subsequent matching degree formula calculations.
[0080] Step 108: Select K social robots with a matching degree that meets the set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or randomly select one candidate social robot as the target social robot, where K is a positive integer greater than 1.
[0081] In this application, the threshold can be a score determined based on experience, and the selectable range for the threshold is any integer between 1 and 10. This threshold can be a fixed value, such as 5; it can also be dynamically adjusted according to the type of the target task. For example, for tasks involving likes, the threshold can be set to 3, while for content publishing tasks, the threshold can be set to 6. Furthermore, the number of candidate social robots, K, can also be dynamically adjusted based on experience or task type. This application uses K=3 as an example, but does not limit the value of K.
[0082] Optionally, when multiple target tasks compete for the same target social robot, after determining the target social robot and before estimating the resource requirements of the target tasks, the multiple target tasks can be prioritized according to their task type and task complexity score. The target task with the highest priority is assigned to the target social robot, and each of the other target tasks selects a non-conflicting social robot from its corresponding candidate social robots as its target social robot. In other words, normally each target task is processed and assigned sequentially according to its order in the task queue. However, considering the possibility of abnormal situations, such as two or more target tasks being processed and assigned simultaneously, it is possible that after calculating the matching degree, these two or more target tasks will find that they are competing for the same target social robot. In this case, it is necessary to prioritize these target tasks and assign the target task with the highest priority to the target social robot. The other target tasks can then select a social robot from their respective candidate social robots according to their respective priorities. When selecting a social robot, non-conflict with the target social robots of other target tasks should be taken into consideration.
[0083] Step 110: Based on the task type and task content generation method of the target task, combined with the task complexity score of the target task, estimate the resource requirement of the target task, and determine whether the current idle resources of the target social robot meet the resource requirement.
[0084] If yes, proceed to step 112; otherwise, proceed to step 114.
[0085] After identifying the target social robot, its basic quota may not be sufficient to meet the resource requirements of the current target task. Therefore, it is necessary to estimate the resource requirements of the target task and then determine whether the idle resources of the target social robot meet the resource requirements.
[0086] Step 112: Directly assign the target task to the target social robot for execution.
[0087] If the idle resources of the target social robot reach the resource requirement, the target task can be directly assigned to the target social robot for processing, that is, the target social robot is scheduled to execute the target task.
[0088] Step 114: Allocate additional temporary resources to the target social robot, assign the target task to the target social robot for execution, and reclaim the temporary resources released by the target social robot after execution; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
[0089] If the target social robot's idle resources do not meet its resource requirements, it indicates that although the target social robot has a high degree of matching with the target task, it may still be unable to successfully execute the target task with the current idle resources. Therefore, it is necessary to allocate additional temporary resources to the target social robot. The amount of temporary resources can be calculated based on the estimated resource requirements of the target task and the target social robot's idle resources. After the target social robot has received additional temporary resources, the target task can be assigned to it for execution. After the target social robot finishes executing the target task,
[0090] Furthermore, after reclaiming the temporary resources released by the target social robot, the task execution result can be read; if the task execution result is successful, the historical success rate of the target robot is updated. If the task execution result is failure, the historical success rate of the target robot is not updated, and the previously updated historical success rate is retained.
[0091] Therefore, through the above technical solution, the complexity of the target task to be executed can be quantified, and a capability profile of each social robot can be obtained. The matching degree between each social robot and the target task can be calculated, and then candidate social robots with matching degrees meeting the threshold can be selected, from which the target social robot can be selected for scheduling. Then, it is determined whether the idle resources of the target social robot meet the resource requirements of the target task. If so, the target task is directly assigned to the target social robot for execution; otherwise, temporary resources are added to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution. This application, by designing a task-resource coupling-aware dynamic scheduling mechanism, can achieve dynamic matching based on task complexity and the idle resource capabilities of social robots, ensuring on-demand allocation and efficient utilization of hardware server resources, avoiding resource waste while improving task success rate.
[0092] In this application's solution, lightweight tasks utilize low-capacity social robots, while heavy-load tasks are temporarily scaled up, avoiding the phenomena of "high-capacity underutilization" or "low-capacity overload," significantly improving hardware resource utilization. Heavy-load tasks are assigned to high-capacity social robots with guaranteed resources, preventing timeouts or crashes due to insufficient resources and reducing task failure rates. Through dynamic resource reuse, higher loads can be supported without increasing physical servers, reducing unnecessary server expansion: for example, 50,000 social robots that originally required 120 servers can now be met with 100. High-performing social robots prioritize handling complex tasks, forming a positive cycle of "the capable do more," achieving differentiated utilization of social robot capabilities.
[0093] The following reference Figure 3The diagram shown illustrates the dynamic scheduling process of a social robot cluster. Figure 3 The schematic diagram of the scenario architecture of the social robot cluster dynamic scheduling system shown herein describes this application.
[0094] Assume the platform runs 50,000 social bots deployed across 100 physical servers, each with 32 CPU cores and 64GB of memory. The current task queue contains two types of tasks: lightweight task T1 and heavyweight task T2; for example, T1 (lightweight): liking a blog post. Requires 0.1 cores and 50MB of memory; T2 (overload): Generates 15-second lipstick swatch videos and publishes them to blogs and short video social media platforms (e.g., Douyin, Xiaolvshu, etc.). It requires 0.8 cores and 400MB of memory.
[0095] The social bots running on the platform are divided into two categories: B_low and B_high. There is no limit to the ratio of the two types of social bots, nor is there a limit to the ratio of the number of bots deployed on each physical server. Specifically, B_low has a basic quota of 0.3 cores / 128MB; B_high has a basic quota of 0.6 cores / 256MB.
[0096] When scheduling task T2, all social robots with available resources can be traversed, and their matching degree can be calculated. For social robots of class B_low, Currently idle, with a historical success rate of 0.85; the calculated matching degree is 0.375. For social bots of the B_high class, Currently idle, with a historical success rate of 0.96, the calculated matching degree is 1. Other social bots, whose basic quotas are partially occupied but still have available resources, clearly have lower matching degrees and are not suitable for priority task allocation.
[0097] Social bots of class B_high with significantly higher overall matching scores and completely idle base quotas are assigned T2, and their CPU quota is temporarily increased to 0.9 cores and memory to 512MB to accommodate the resources required for T2 task execution. After the task is completed, B_high releases its temporary resources; if T2 succeeds, its... Increased to 0.97.
[0098] When scheduling T1, it can be processed according to the same process, which will not be elaborated here.
[0099] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0100] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0101] Figure 4 This application provides a structural block diagram of a social robot cluster dynamic scheduling system according to an embodiment of the present application. Figure 4As shown. The social robot cluster dynamic scheduling system 400 of this embodiment may include a scheduling device 401 and multiple physical servers 402. A social robot cluster composed of several social robots 403 is distributed and deployed in a virtualized manner across multiple physical servers 402. The scheduling device 401 allocates resources and tasks to the social robots 403 deployed on the physical servers 402. Specifically, the scheduling device 401 includes: a calculation module 4011, used to calculate the task complexity score of the target task based on the task type, the number of target physical servers, and the task content generation method after the target task enters the task queue; a generation module 4012, used to monitor and collect the remaining CPU quota, available memory, and historical success rate of each social robot in real time to generate capability profile information for each social robot; and a traversal module 4013, used to traverse all idle social robots and calculate the matching degree between each social robot and the target task based on the capability profile information of the social robots. The selection module 4014 is used to select K social robots with a matching degree that meets a set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or a randomly selected candidate social robot as the target social robot, where K is a positive integer greater than 1. The judgment module 4015 is used to estimate the resource requirement of the target task based on the task type, task content generation method, and task complexity score of the target task, and to determine whether the current idle resources of the target social robot meet the resource requirement. The processing module 4016 is used to directly assign the target task to the target social robot for execution when the judgment result is yes; the processing module 4016 is also used to allocate additional temporary resources to the target social robot, assign the target task to the target social robot for execution, and reclaim the temporary resources released by the target social robot after execution is completed; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
[0102] It should be noted that some or all of the scheduling device in this embodiment may be an application located on a local terminal, or it may be a plugin or software development kit (SDK) or other functional unit set in an application located on a local terminal, or it may be a processing engine located on a network-side server, or it may be a distributed system located on the network side. This embodiment does not impose any particular limitations on these.
[0103] It is understood that the application can be a native program installed on the local terminal, or it can be a web application of a browser on the local terminal. This embodiment does not limit this.
[0104] Optionally, in one possible implementation of this embodiment, when the traversal module 4013 calculates the matching degree between each social robot and the target task based on the social robot's capability profile information, it is specifically used to calculate the matching degree between the social robot and the target task using the following formula:
[0105]
[0106] Among them, the , , The following are the capabilities profile information of the social robot: remaining CPU quota, available memory, and historical success rate; and These are the CPU requirement quota and memory requirement determined based on the task complexity score of the target task, respectively; , and These are the weights for CPU quota, memory, and success rate, respectively.
[0107] Alternatively, in one possible implementation of this embodiment, the... , and The system will dynamically adjust its resource requirements in real time based on the different needs of the target tasks.
[0108] Optionally, in one possible implementation of this embodiment, when the traversal module 4013 calculates the matching degree between each social robot and the target task based on the social robot's capability profile information, it is also used to search for the CPU quota and memory requirement matching the task complexity score of the target task from a preset score database table; wherein, the preset score database table is established by: statistically analyzing the task complexity scores of a large number of different tasks that the social robot can execute; classifying them according to the task complexity scores to obtain task groups corresponding to different task complexity scores; and for each task group, estimating the CPU quota and memory requirement corresponding to the task group based on the task content generation method of all tasks in the task group.
[0109] Optionally, in one possible implementation of this embodiment, when multiple target tasks compete for the same target social robot, after the selection module 4014 determines the target social robot and before the judgment module 4015 estimates the resource requirements of the target task, the selection module 4014 is further configured to prioritize the multiple target tasks according to the task type and task complexity score of each target task; assign the target task with the highest priority to the target social robot, and select non-conflicting social robots from their respective candidate social robots for the other target tasks as their respective target social robots.
[0110] Optionally, in one possible implementation of this embodiment, the system further includes: an update module, used to read the task execution result after the processing module 4016 reclaims the temporary resources released by the target social robot; if the task execution result is successful, then update the historical success rate of the target robot.
[0111] In this embodiment, the complexity of the target task to be executed can be quantified, and a capability profile of each social robot can be obtained. The matching degree between each social robot and the target task can be calculated, and candidate social robots whose matching degree meets the threshold can be selected. The target social robot can then be selected for scheduling. Next, it is determined whether the idle resources of the target social robot meet the resource requirements of the target task. If so, the target task is directly assigned to the target social robot for execution; otherwise, temporary resources are added to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution. This application, by designing a task-resource coupling-aware dynamic scheduling mechanism, can achieve dynamic matching based on task complexity and the idle resource capabilities of social robots, ensuring on-demand allocation and efficient utilization of hardware server resources, avoiding resource waste while improving task success rate.
[0112] One embodiment of this application provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the dynamic scheduling method for a social robot cluster as described above.
[0113] One embodiment of this application provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, which is loaded and executed by the processor to implement the dynamic scheduling method for a social robot cluster as described above.
[0114] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0115] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0116] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0117] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of monitors, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0118] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the social robot swarm dynamic scheduling method. For example, in some embodiments, the social robot swarm dynamic scheduling method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the social robot swarm dynamic scheduling method described above can be performed. Alternatively, in other embodiments, the computing unit 501 can be configured to perform the social robot swarm dynamic scheduling method by any other suitable means (e.g., by means of firmware).
[0119] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, at least one input device, and at least one output device.
[0120] The program code used to implement the methods of this application may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0121] In the context of this application, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0123] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0124] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0125] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this application can be achieved, and this is not limited herein.
[0126] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for dynamic scheduling of a social robot cluster, characterized in that, A social robot cluster consisting of several social robots is deployed in a virtualized manner across multiple physical servers. The method includes: After the target task enters the task queue, the task complexity score of the target task is calculated based on the task type, the number of target physical servers, and the method of generating task content. Real-time monitoring and collection of each social robot's remaining CPU quota, available memory, and historical success rate to generate a capability profile for each social robot; Traverse all idle social robots: Calculate the matching degree between each social robot and the target task based on the social robot's capability profile information; when calculating the matching degree between each social robot and the target task based on the social robot's capability profile information, the method further includes: searching for the CPU quota and memory requirement matching the task complexity score of the target task from a preset score database table; wherein, the preset score database table is established in the following way: statistically analyze the task complexity scores of a large number of different tasks that the social robot can execute; classify according to the task complexity scores to obtain task groups corresponding to different task complexity scores; for each task group, estimate the CPU quota and memory requirement corresponding to the task group based on the task content generation method of all tasks in the task group; Select K social robots whose matching degree meets the set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or randomly select one candidate social robot as the target social robot, where K is a positive integer greater than 1; Based on the task type and task content generation method of the target task, combined with the task complexity score of the target task, the resource requirement of the target task is estimated, and it is determined whether the current idle resources of the target social robot meet the resource requirement. If so, the target task will be directly assigned to the target social robot for execution; Otherwise, additional temporary resources are allocated to the target social robot, the target task is assigned to the target social robot for execution, and the temporary resources released by the target social robot are reclaimed after execution; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
2. The method as described in claim 1, characterized in that, The matching degree between each social robot and the target task is calculated based on the social robot's capability profile information, specifically including: The matching degree between the social robot and the target task is calculated using the following formula: Among them, the , , The following are the capabilities profile information of the social robot: remaining CPU quota, available memory, and historical success rate; and These are the CPU requirement quota and memory requirement determined based on the task complexity score of the target task, respectively; , and These are the weights for CPU quota, memory, and success rate, respectively.
3. The method as described in claim 2, characterized in that, The , and The system will dynamically adjust its resource requirements in real time based on the different needs of the target tasks.
4. The method as described in claim 1, characterized in that, When multiple target tasks compete for the same target social robot simultaneously, the method further includes, after determining the target social robot and before estimating the resource requirements of the target task: The multiple target tasks are prioritized based on their task type and task complexity score. The target task with the highest priority is assigned to the target social robot, and for each of the other target tasks, a non-conflicting social robot is selected from the corresponding candidate social robots as the target social robot.
5. The method according to any one of claims 1-4, characterized in that, After recovering the temporary resources released by the target social robot, the method further includes: Read the task execution results; If the task execution result is successful, then update the historical success rate of the target social robot.
6. A dynamic scheduling system for a social robot swarm, characterized in that, The scheduling system includes a scheduling device and multiple physical servers. A social robot cluster consisting of several social robots is deployed in a virtualized manner across the multiple physical servers. The scheduling device allocates resources and tasks to the social robots deployed on the physical servers. Specifically, the scheduling device includes: The calculation module is used to calculate the task complexity score of the target task after the target task enters the task queue, based on the task type, the number of target physical servers, and the method of generating task content. The generation module is used to monitor and collect the remaining CPU quota, available memory and historical success rate of each social robot in real time to generate capability profile information for each social robot. The traversal module is used to traverse all idle social robots: calculate the matching degree between each social robot and the target task based on the social robot's capability profile information; and, based on the target task, search a preset score database table for the CPU quota and memory requirement that match the task complexity score of the target task; wherein, the preset score database table is established in the following way: statistically analyze the task complexity scores of a large number of different tasks that the social robots can execute; classify them according to the task complexity scores to obtain task groups corresponding to different task complexity scores; for each task group, estimate the CPU quota and memory requirement corresponding to the task group based on the task content generation method of all tasks in the task group; The selection module is used to select K social robots whose matching degree meets a set threshold as candidate social robots, and select the candidate social robot with the highest matching degree or a randomly selected candidate social robot as the target social robot, wherein K is a positive integer greater than 1; The judgment module is used to estimate the resource requirements of the target task based on the task type, task content generation method and task complexity score of the target task, and to determine whether the current idle resources of the target social robot meet the resource requirements. The processing module is used to directly assign the target task to the target social robot for execution when the judgment result is yes; The processing module is further configured to allocate additional temporary resources to the target social robot when the judgment result is negative, assign the target task to the target social robot for execution, and reclaim the temporary resources released by the target social robot after execution; wherein, the target social robot returns to the basic resource quota after releasing the temporary resources.
7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1-5.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-5.
9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-5.