A computing power resource dynamic allocation method and device

By parsing user input text to obtain task priorities and dynamically allocating them to appropriate computing devices, the problem of unreasonable computing resource allocation in the natural language interaction platform is solved, task response speed and resource utilization are improved, and user experience is improved.

CN120371545BActive Publication Date: 2025-10-10国家超级计算天津中心
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510873462.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-10
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

When processing different tasks, the existing natural language interaction platform allocates computing resources irrationally, resulting in tasks that require higher computing resources not being processed in a timely manner, increased response delays, poor user experience, serious resource waste, and low overall task processing efficiency.

Method used

By parsing the user input text to obtain the task priority score, high-priority and low-priority tasks are distinguished, and dynamically allocated to the corresponding fast computing device or slow computing device according to the device call status, ensuring that high-priority tasks are processed in a timely manner and fully utilize idle resources.

Benefits of technology

It improves the response speed of high-priority tasks, reduces user waiting time, improves user satisfaction, avoids resource waste, and maintains the overall task processing capability of the platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371545B_ABST
    Figure CN120371545B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of computing resource dynamic allocation method and device, it is related to computing allocation technical field, the method is specifically as follows: the user input text is analyzed, to obtain the task priority score of target task corresponding to user input text;If task priority score is greater than or equal to first preset threshold, then determine that target task is high priority task;The calling state of each first device is obtained;Calling state includes idle state and use state;When there are multiple first devices to be used in idle state, determine target first device from multiple first devices to be used, and distribute target task to target first device;When multiple first devices are all in use state, then distribute target task to second device in idle state.The application can improve the satisfaction and experience of user in the interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computing power allocation, and in particular to a method and device for dynamically allocating computing power resources. Background Art

[0002] With the development of intelligent interaction technology, user demands for natural language interaction platforms like ChatGPT are becoming more frequent and diverse. Currently, natural language interaction platforms typically assign all tasks to the same computing resources for processing, making it difficult to balance tasks with varying computing power requirements. This results in both high- and low-computing-power-requirement tasks occupying the same computing power when processing different tasks. Consequently, tasks with high computing power requirements compete with a large number of other tasks with lower computing power requirements for the same resources, preventing them from being processed promptly. This increases response latency and degrades the user experience.

[0003] At the same time, due to the unreasonable allocation of computing resources, it is easy to cause waste of resources. The above problems make the overall task processing efficiency of the entire platform low, making it difficult to meet the growing user needs. Summary of the Invention

[0004] In view of this, an embodiment of the present application provides a method and device for dynamically allocating computing resources, which can improve user satisfaction and experience during the interaction process.

[0005] In a first aspect, an embodiment of the present application provides a method for dynamically allocating computing resources, including:

[0006] Parse the user input text to obtain the task priority score of the target task corresponding to the user input text;

[0007] If the task priority score is greater than or equal to the first preset threshold, the target task is determined to be a high priority task; a high priority task is a high priority task that needs to be processed in real time;

[0008] Obtaining a call state of each first device; the first device is a fast computing device used to process high-priority tasks; the call state includes an idle state and a used state;

[0009] When there are multiple first devices in an idle state, determining a target first device from the multiple first devices, and allocating the target task to the target first device;

[0010] When all of the multiple first devices are in use, the target task is assigned to a second device in an idle state; the second device is a slow computing device used to process low-priority tasks.

[0011] As an optional implementation of the embodiment of the present application, when there are multiple first devices in an idle state, determining a target first device from the multiple first devices includes:

[0012] Obtain computing power resources corresponding to the plurality of first devices to be used, and computing power requirements corresponding to the target task, to calculate predicted response times corresponding to the plurality of first devices to be used;

[0013] The target first device is determined based on a relationship between the predicted response time and a preset response time threshold.

[0014] As an optional implementation of the embodiment of the present application, after parsing the user input text to obtain the task priority score of the target task corresponding to the user input text, the method further includes:

[0015] If the task priority score is less than or equal to a second preset threshold, the target task is determined to be a low priority task; the second preset threshold is less than the first preset threshold;

[0016] Get the call status of each second device;

[0017] A second device to be used that is in an idle state is determined from a plurality of second devices, a target second device is determined from the plurality of second devices to be used, and the target task is allocated to the target second device.

[0018] As an optional implementation of the embodiment of the present application, determining a second device to be used in an idle state from a plurality of second devices, and determining a target second device from the plurality of second devices to be used, includes:

[0019] Obtain computing power resources corresponding to the plurality of second devices to be used, and computing power requirements corresponding to the target task, to determine the maximum task throughput efficiency;

[0020] Based on the maximum task throughput efficiency, a target second device is determined.

[0021] As an optional implementation of the embodiment of the present application, parsing the user input text to obtain the task priority of the target task corresponding to the user input text includes:

[0022] Based on the lightweight user intention recognition model, the urgency and real-time requirements of the target task corresponding to the user input text are analyzed to obtain the corresponding task priority score.

[0023] As an optional implementation of the embodiment of the present application, the method further includes:

[0024] Obtain the status information of the target task and predict the expected task delay tolerance based on the user's historical behavior;

[0025] Monitor the current response time corresponding to the target task;

[0026] The computing power resources of the target first device are adjusted according to the relationship between the current response time and the expected task delay tolerance.

[0027] As an optional implementation of the embodiment of the present application, the method further includes:

[0028] After the target task is completed, the complete response time and computing power usage corresponding to the target task are collected;

[0029] The first preset threshold and the second preset threshold are updated according to the complete response time and the computing power usage rate.

[0030] In a second aspect, an embodiment of the present application provides a device for dynamically allocating computing resources, including:

[0031] A parsing unit, configured to parse the user input text to obtain a task priority score of the target task corresponding to the user input text;

[0032] a determining unit, configured to determine that the target task is a high-priority task if the task priority score is greater than or equal to a first preset threshold; a high-priority task is a high-priority task that needs to be processed in real time;

[0033] an acquiring unit, configured to acquire a call state of each first device; the first device is a fast computing device configured to process high-priority tasks; the call state includes an idle state and a used state;

[0034] a first allocating unit, which, when there are a plurality of first devices in an idle state, determines a target first device from the plurality of first devices and allocates the target task to the target first device;

[0035] The second allocating unit is configured to allocate the target task to a second device in an idle state when all of the multiple first devices are in use; the second device is a slow computing device configured to process low-priority tasks.

[0036] As an optional implementation of an embodiment of the present application, the first allocation unit is specifically used to obtain computing power resources corresponding to multiple first devices to be used, and computing power requirements corresponding to the target task, so as to calculate the predicted response time corresponding to the multiple first devices to be used; based on the relationship between the predicted response time and the preset response time threshold, determine the target first device.

[0037] As an optional implementation of an embodiment of the present application, the parsing unit is also used to determine that the target task is a low-priority task if the task priority score is less than or equal to a second preset threshold; the low-priority task is a low-priority task that needs to be processed in batches; obtain the calling status of each second device; determine a second device to be used that is in an idle state from multiple second devices, and determine a target second device from multiple second devices to be used, and assign the target task to the target second device.

[0038] As an optional implementation of an embodiment of the present application, the second allocation unit is specifically used to obtain computing power resources corresponding to multiple second devices to be used, and computing power requirements corresponding to the target task, so as to determine the maximum task throughput efficiency; based on the maximum task throughput efficiency, determine the target second device.

[0039] As an optional implementation of the embodiment of the present application, the parsing unit is specifically used to parse the urgency and real-time requirements of the target task corresponding to the user input text based on a lightweight user intention recognition model to obtain the corresponding task priority score.

[0040] As an optional implementation of the embodiment of the present application, the acquisition unit is also used to obtain status information of the target task, and predict the expected task delay tolerance in combination with the user's historical behavior; monitor the current response time corresponding to the target task; and adjust the computing power resources of the target first device according to the relationship between the current response time and the expected task delay tolerance.

[0041] As an optional implementation of an embodiment of the present application, the computing power resource dynamic allocation device also includes an update unit, which is specifically used to collect the complete response time and computing power utilization rate corresponding to the target task after the execution of the target task is completed; and update the first preset threshold and the second preset threshold according to the complete response time and computing power utilization rate.

[0042] In a third aspect, an embodiment of the present application provides an electronic device comprising: a memory and a processor, the memory being used to store a computer program; the processor being used to enable the electronic device to implement the method for dynamic allocation of computing resources of any of the above embodiments when executing the computer program.

[0043] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a computing device, the computing device implements the method for dynamic allocation of computing power resources of any of the above embodiments.

[0044] The method for dynamic allocation of computing power resources provided by the embodiment of the present application is specifically as follows: parsing the user input text to obtain the task priority score of the target task corresponding to the user input text; if the task priority score is greater than or equal to the first preset threshold, determining the target task as a high priority task; a high priority task is a high priority task that needs to be processed in real time; obtaining the call status of each first device; the first device is a fast computing device used to process high priority tasks; the call status includes an idle state and a use state; when there are multiple first devices in an idle state, determining the target first device from the multiple first devices, and assigning the target task to the target first device; when all of the multiple first devices are in use, assigning the target task to the second device in an idle state; the second device is a slow computing device used to process low priority tasks. The above method obtains the task priority score by parsing the user input text, and can accurately distinguish between high priority tasks and low priority tasks. This allows high-priority tasks to be promptly assigned to appropriate computing devices, namely high-speed computing devices, to avoid competing for resources with low-priority tasks, ensuring that tasks with high computing resource requirements are processed first, and effectively reducing the response delay of high-priority tasks; and in the natural language interaction platform, urgent questions or highly complex demands raised by users can be responded to and processed in a timely manner, reducing user waiting time and improving user satisfaction and experience during the interaction process.

[0045] At the same time, when all fast computing devices are in use, high-priority tasks are assigned to idle slow computing devices, namely the second device; thereby making full use of idle computing resources to avoid resource waste, while also ensuring that tasks can still be processed when resources are tight, maintaining the overall task processing capabilities of the platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0048] Figure 1 One of the step flow charts of the method for dynamically allocating computing resources provided in an embodiment of the present application;

[0049] Figure 2 This is a flowchart of the second step of the method for dynamically allocating computing resources provided in an embodiment of the present application;

[0050] Figure 3 This is a flowchart of the third step of the method for dynamically allocating computing resources provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of the structure of the computing power resource dynamic allocation device provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0055] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete way. In addition, in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more.

[0056] It should be noted that, in this document, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or apparatus that includes a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0057] The present invention provides a method for dynamically allocating computing resources. Figure 1 As shown, the method for dynamically allocating computing resources includes the following steps S101-S105:

[0058] S101: Parse the user input text to obtain the task priority score of the target task corresponding to the user input text.

[0059] In intelligent interactive platforms, users input a wide variety of tasks with varying computing requirements and urgency. This embodiment of the application analyzes user input text to further mine the key information behind the tasks corresponding to the user input text, thereby determining the priority score of the task and providing a basis for the subsequent reasonable allocation of computing resources.

[0060] Specifically, the specific implementation method of parsing the user input text to obtain the task priority score of the target task corresponding to the user input text can be: based on a lightweight user intention recognition model, the urgency and real-time requirements of the target task corresponding to the user input text are inferred and analyzed to obtain the corresponding task priority score.

[0061] In some embodiments, a lightweight user intent recognition model can be constructed using a miniaturized language model with model parameters between 1.5B and 3B, where B is an order of magnitude unit representing billions. Through technical means such as parameter pruning and model quantization, the model size and computational complexity are significantly reduced, reducing the computing power consumption during inference, enabling inference to be completed within milliseconds, meeting real-time processing requirements.

[0062] Furthermore, the user input text is parsed through a lightweight user intention recognition model to quickly and accurately evaluate the urgency and real-time requirements of the task corresponding to the user input text, and then based on this, the task priority is scored. The priority of the task corresponding to the current user input text is obtained through the task priority score, which facilitates the subsequent allocation of corresponding computing resources for the task.

[0063] Specifically, after receiving the user input text, the lightweight user intent recognition model will first parse it and convert it into the corresponding task. For example, the user input text A is converted into the target task after parsing, and then the embedding operation is performed on the target task: ;in, Represents an embedding operation, which is used to map text-based tasks into a fixed-dimensional vector space, converting the text into a numerical vector representation that can be processed by a computer to extract key semantic features of the text for subsequent analysis and calculation.

[0064] Then, refer to the following formula, based on the embedded features, use the lightweight user intent recognition model and model parameter weights for reasoning, and then calculate the task priority score:

[0065] .

[0066] in, It is a lightweight user intent recognition model. is the model parameter weight; P is the task priority score, the value range of P is [0, 1], and the value of P is the main basis for measuring task priority.

[0067] Through this step, the urgency and real-time requirements of the target task corresponding to the user input text can be analyzed to obtain the task priority score, which provides a basis for subsequent task scheduling and resource allocation.

[0068] S102: If the task priority score is greater than or equal to a first preset threshold, determine that the target task is a high priority task.

[0069] In the embodiment of the present application, the task priority level can be determined by the task priority score corresponding to each user input text; specifically, the present application divides tasks into two priority levels based on their priority level, including high-priority tasks and low-priority tasks. Among them, high-priority tasks refer to tasks that require immediate response. Such tasks usually require real-time processing and will be subsequently assigned to fast computing devices to ensure that responses can be obtained in milliseconds; low-priority tasks refer to tasks that allow delayed processing and are often tasks that can be processed in batches. Such tasks have lower real-time requirements and will be assigned to slow computing devices for processing.

[0070] It should be noted that, in the embodiment of the present application, after determining the priority level corresponding to each task, each task can be marked with a corresponding priority label by marking a label, for example, a high priority task is marked with a high priority tag. Indicates that low priority is used Indicates that the task with the corresponding identifier is then allocated to the resource pool of the corresponding fast computing device, or the resource pool of the slow computing device, so as to facilitate the subsequent allocation of the corresponding computing device to the task.

[0071] Combined with the above S101, if P> (like Set to 0.7), indicating that the task has high urgency and real-time requirements, and is thus determined to be a high-priority task. (like Set to 0.3), indicating that the task has low urgency and real-time requirements, and is a low-priority task. and The size can be set by the developer according to actual needs, and this embodiment of the application does not impose any limitation.

[0072] It's also important to note that when a task's priority score falls in the middle range, meaning it doesn't meet the high or low priority thresholds, the system will further assess the task's real-time requirements. By analyzing factors such as the nature of the task, its relationship to other tasks, and its impact on business processes, the system determines whether a faster response is required or whether a certain delay can be tolerated. Tasks that connect to key business processes or have a direct impact on other tasks may have their priority increased. Tasks that are not time-sensitive and don't impact overall business progress may have their priority lowered.

[0073] The task allocation strategy can also be dynamically adjusted based on the system's current resource utilization. If the fast computing device (first device) has ample resources, even if the task doesn't clearly meet the high-priority threshold, it can be assigned to the fast computing device for processing, thereby accelerating task execution. If the slow computing device (second device) has a low load and the task doesn't have strict real-time requirements, even if the task's priority is slightly above the low-priority threshold, it can be assigned to the slow computing device, fully utilizing the slow computing device's batch processing capabilities and improving overall resource utilization.

[0074] S103: Obtain the calling status of each first device.

[0075] The first device is a fast computing device used to process high-priority tasks; the calling state includes an idle state and a used state.

[0076] Specifically, after determining that the target task corresponding to the user input text is a high-priority task, that is, a high-priority task, it is necessary to immediately allocate the corresponding computing device from the computing power resource pool corresponding to the fast computing device to process the target task in a timely manner; before determining the target first device, it is necessary to obtain the calling status of multiple fast computing devices (first devices) to accurately grasp the resource status of the fast computing device, ensure that high-priority tasks can be allocated to available devices for processing in a timely manner, avoid task waiting and backlogs, and ensure the efficiency and timeliness of system response.

[0077] S104: When there are multiple first devices in an idle state, determine a target first device from the multiple first devices, and allocate the target task to the target first device.

[0078] In some embodiments, determining a target first device from multiple first devices can be based on a comprehensive assessment of the computing power of the devices and the specific requirements of the current task, determining a target first device that is optimal for processing the current target task; and then allocating the target task to the target first device, which then completes the target task. The embodiments of the present application clarify the device status and rationally determine the target first device that is suitable for processing the target task.

[0079] It should be noted that in many scenarios, the target task can be divided into multiple subtasks, and these subtasks can be respectively assigned to the corresponding target first devices in the idle state to complete. Therefore, the embodiment of the present application does not limit the number of target first devices.

[0080] Hypothetical Task The computational requirements are (the required computing power of a unit task), the scheduling matching relationship of high-priority tasks is as follows:

[0081] .

[0082] in, Indicates the current usage of fast computing device i (can be 0 or 1, 1 means available, that is, in idle state, 0 means unavailable, in use); represents the computing power of fast computing device i; is the number of slow computing devices; Indicates a task It is a high priority task.

[0083] S105: When all of the multiple first devices are in use, the target task is assigned to a second device that is in an idle state.

[0084] The second device is a slow computing device used to process low-priority tasks.

[0085] In some embodiments, after obtaining the calling status of each first device, it may be encountered that all first devices are in use, that is, there is no idle fast computing device available to process the current high-priority target task; at this time, slow computing devices can be flexibly deployed to ensure the advancement of the task, and then find an idle second device to replace the first device to process the target task; although the processing speed of the second device is relatively slow, it can also be used to process high-priority tasks to avoid long-term waiting or even backlog of tasks due to lack of available resources, thereby ensuring that the tasks can continue to advance.

[0086] Similarly, before calling the second device, it is necessary to check whether it is idle. If an idle second device is available, the task scheduling module will assign the target task to it. During the processing, the second device will gradually complete the task according to its own processing capabilities and task scheduling rules. At the same time, the system continuously monitors the status of the first device. If the first device becomes idle, it may transfer some high-priority tasks being processed on the second device back to the first device to speed up processing.

[0087] It should be noted that when multiple first devices are in use, when the target task is assigned to the second device in the idle state, if there are a large number of second devices in the idle state, the second device that can meet the current target task can be selected to process the target task. Specifically, the computing power margin of each second device in the idle state can be compared with the computing power required for the current target task. To determine the size of the second device used to process the target task, the above process can be expressed as the following formula:

[0088] .

[0089] in, Indicates the computing power margin of a second device. Indicates the computing power required for the current target task, Represents the current target task, that is Indicates that the current target task is a high priority task.

[0090] Then, the above formula is used to determine the computing power margin of a second device. Can high-priority tasks be met? If the computing requirements are met. , the high priority task is temporarily assigned to the slow computing device for execution.

[0091] It should also be noted that in the actual computing power resource allocation process, you may encounter the following situation: after allocating the target task to the target first device, due to other reasons, the remaining computing power of the target first device cannot support the completion of the target task during the processing of the target task. At this time, part of the target task can also be transferred to the idle second device, and the second device will share the current target task to ensure the smooth completion of the current target task.

[0092] The method for dynamic allocation of computing power resources provided by the embodiment of the present application is specifically as follows: parsing the user input text to obtain the task priority score of the target task corresponding to the user input text; if the task priority score is greater than or equal to the first preset threshold, determining the target task as a high priority task; a high priority task is a high priority task that needs to be processed in real time; obtaining the call status of each first device; the first device is a fast computing device used to process high priority tasks; the call status includes an idle state and a use state; when there are multiple first devices in an idle state, determining the target first device from the multiple first devices, and assigning the target task to the target first device; when all of the multiple first devices are in use, assigning the target task to the second device in an idle state; the second device is a slow computing device used to process low priority tasks. The above method obtains the task priority score by parsing the user input text, and can accurately distinguish between high priority tasks and low priority tasks. This allows high-priority tasks to be promptly assigned to appropriate computing devices, namely high-speed computing devices, to avoid competing for resources with low-priority tasks, ensuring that tasks with high computing resource requirements are processed first, and effectively reducing the response delay of high-priority tasks; and in the natural language interaction platform, urgent questions or highly complex demands raised by users can be responded to and processed in a timely manner, reducing user waiting time and improving user satisfaction and experience during the interaction process.

[0093] At the same time, when all fast computing devices are in use, high-priority tasks are assigned to idle slow computing devices, namely the second device; thereby making full use of idle computing resources to avoid resource waste, while also ensuring that tasks can still be processed when resources are tight, maintaining the overall task processing capabilities of the platform.

[0094] As an extension and refinement of the above embodiment, refer to Figure 2 As shown, the embodiment of the present application further provides a method for dynamically allocating computing resources, including the following S201 to S204:

[0095] S201: Parse the user input text to obtain the task priority score of the target task corresponding to the user input text.

[0096] The description of this step refers to the description of S101 above and will not be repeated here.

[0097] S202: If the task priority score is less than or equal to a second preset threshold, determine that the target task is a low-priority task.

[0098] The second preset threshold is smaller than the first preset threshold.

[0099] Specifically, when the task priority score is less than or equal to the second preset threshold, the target task is determined to be a low-priority task, that is, a low-priority task. The characteristic of this type of task is that a certain delay is allowed and it is suitable for batch processing.

[0100] S203: Obtain the calling status of each second device.

[0101] Specifically, before calling the second device to process the target task, the calling status of the second device is obtained to determine whether each device is currently processing the task. Then, based on the status information of the second device obtained, the idle devices are screened out from multiple second devices to provide accurate information for subsequent task allocation, ensuring that the task can be assigned to the appropriate device, and avoiding inefficient task processing or waste of device resources due to improper device selection.

[0102] S204: Determine a second device to be used that is in an idle state from the multiple second devices, determine a target second device from the multiple second devices to be used, and allocate the target task to the target second device.

[0103] In an embodiment of the present application, for the screened idle second devices, the system will further evaluate their performance indicators, and select multiple devices that are most suitable for processing the target task from the idle second devices as target second devices based on the characteristics and requirements of the target task, and then send the target task to the corresponding target second device, which will process the target task.

[0104] Assume that the computational requirements of task Tk are (the required computing power of a unit task), the scheduling relationship of low-priority tasks is as follows:

[0105] .

[0106] in, Indicates slow computing devices The usage status of the device (the value can be 0 or 1, 1 means available, that is, in idle state, 0 means unavailable, in use); Indicates slow computing devices computing power; Represents the total computational requirements of low-priority tasks, typically batch tasks; is the number of slow computing devices; Indicates a task It is a low priority task.

[0107] The embodiment of the present application obtains the task priority score by parsing the user input text, and compares it with the second preset threshold to accurately determine the low-priority task. Then, the second device, that is, the call status of the slow computing device is obtained, and the idle second device to be used is determined from multiple second devices and the target device is further selected to assign the task; thus, the resources of the slow computing device can be utilized so that the low-priority task can be processed on the appropriate device, which helps to balance the computing resource load in the system. Avoid competing with high-priority tasks for computing resources. High-priority tasks are processed by fast computing devices, and low-priority tasks are processed by slow computing devices, ensuring the stable operation of the system and improving the overall task processing capability.

[0108] Specifically, the specific implementation method of determining the idle second device from the plurality of second devices and determining the plurality of target second devices from the idle second devices in S204 can refer to the following steps 1 and 2:

[0109] Step 1: Obtain computing power resources corresponding to multiple second devices to be used and computing power requirements corresponding to the target task to determine the maximum task throughput efficiency.

[0110] In the embodiments of the present application, slow computing devices often work in batch mode to process low-priority tasks. Since throughput efficiency refers to the total amount of tasks processed within a certain period of time, it can effectively measure the ability of slow computing devices to process tasks. Throughput efficiency can be calculated using the following formula:

[0111]

[0112] in, represents the throughput efficiency, represents the total computational requirements of low-priority tasks, Indicates the total computing power of slow computing devices, is the number of slow computing devices, Indicates slow computing devices computing power.

[0113] Specifically, the aforementioned formula is used to combine multiple idle, unused second devices, calculate the throughput efficiencies of these combinations, and determine which device combinations offer the highest throughput efficiency, making them the most suitable for processing the current target task. For example, when multiple slow computing devices are available, the throughput efficiencies of different device combinations are compared, and the most efficient combinations are prioritized as target second devices for task allocation, thereby improving overall processing efficiency and maximizing resource utilization.

[0114] Step 2: Determine the target second device based on the maximum task throughput efficiency.

[0115] Furthermore, multiple target second devices are further determined based on the throughput efficiency calculated in S2041, so as to facilitate subsequent allocation of the target tasks to the multiple second devices.

[0116] Similarly, in many scenarios, the target task can be divided into multiple subtasks, and these subtasks can be respectively assigned to the corresponding target first devices in the idle state to complete. Therefore, the number of target first devices is not limited in the embodiments of the present application.

[0117] In the embodiment of the present application, the slow computing device can be further optimized based on its actual usage. Specifically, the throughput of the slow computing device can be obtained to further measure whether resource allocation for low-priority tasks needs to be optimized. The throughput is calculated by referring to the following formula:

[0118] .

[0119] in, Indicates throughput; is the total computational effort of low-priority tasks; is the total task execution time for all slow computing devices. Throughput is iteratively obtained during the optimization process to maximize the throughput value. This guides slow computing devices to process low-priority tasks, allocating resources and scheduling tasks more efficiently. This allows more low-priority tasks to be processed per unit time, improving overall processing efficiency.

[0120] As an extension and refinement of the above embodiment, in combination with the embodiments shown in S101 to S105 and S201 to S204 above, the embodiment of the present application further includes the following steps A and B:

[0121] Step A: After the target task is executed, the complete response time and computing power usage corresponding to the target task are collected.

[0122] In an embodiment of the present application, after the execution of the target task is completed, by collecting the complete response time and computing power utilization rate corresponding to the target task, key feedback is provided for the system to optimize resource allocation and scheduling strategies. If it is found that the complete response time of a certain type of task always exceeds expectations, but the computing power utilization rate is not high, the system can adjust the task allocation rules accordingly, such as trying to assign such tasks to different devices or adjusting the device combination to improve processing efficiency. Similarly, if the computing power utilization rate is at an unreasonable level for a long time, whether it is too high or too low, the scheduling strategy can be adjusted in a targeted manner. For example, when the computing power utilization rate is too high, the device resources can be increased or the task queuing mechanism can be optimized to avoid device overload; when the computing power utilization rate is too low, the task allocation method can be re-evaluated to allow the device to make better use of computing power.

[0123] Specifically, the complete response time for a target task is the total time span from the generation of the target task to the completion of task processing and the feedback of the results. This covers the time spent in various stages of the task, including queuing, scheduling, and device processing. The computing power utilization rate measures the percentage of computing power resources actually utilized during task execution. By monitoring the operating status of the device's computing cores, such as the CPU and GPU, and the usage of resources such as memory and storage, the average percentage of computing power used during task execution is calculated.

[0124] Step B: Update the first preset threshold and the second preset threshold according to the complete response time and the computing power utilization rate.

[0125] If the collected complete response times are generally short, it indicates that the current system is processing tasks efficiently. The first preset threshold can be appropriately lowered to further improve the real-time requirements of task processing. If the complete response time is longer than expected, the first preset threshold may need to be raised to avoid unreasonable task allocation due to excessively high requirements. For example, if the first preset threshold for high-priority tasks was originally set at 10 milliseconds (ms), but the average response time in actual processing is only 5 milliseconds (ms), the threshold can be lowered to 8 milliseconds (ms).

[0126] If computing power utilization remains low for a long time, indicating that resources are underutilized, the second threshold can be adjusted to allow the device to operate at a higher load, thereby allocating more tasks and improving resource utilization. If computing power utilization is frequently too high, putting the device on the verge of overload, the second threshold may need to be lowered to reduce the number of tasks assigned to ensure stable device operation. For example, if the computing power utilization of a device remains at 40%, far below the device's carrying capacity, the second threshold can be appropriately raised to allow the device to take on more tasks.

[0127] Then, the first preset threshold and the second threshold are updated through the actual data after each task execution (complete response time and computing power utilization rate), so that the task scheduling and resource allocation strategies are more in line with the actual operation situation and dynamic optimization is achieved.

[0128] As an extension and refinement of the above embodiment, refer to Figure 3 As shown, the embodiment of the present application also provides a method for dynamically allocating computing resources, including the following S301 to S306:

[0129] S301: Parse the user input text to obtain the task priority score of the target task corresponding to the user input text.

[0130] The description of this step refers to the description of S101 above and will not be repeated here.

[0131] S302: If the task priority score is greater than or equal to a first preset threshold, determine that the target task is a high priority task.

[0132] The description of this step refers to the description of S102 above and will not be repeated here.

[0133] S303: Obtain the calling status of each first device.

[0134] The first device is a fast computing device used to process high-priority tasks; the calling state includes an idle state and a used state.

[0135] The description of this step refers to the description of S103 above and will not be repeated here.

[0136] S304. When at least one first device among the multiple first devices is in an idle state, the computing power resources corresponding to the multiple first devices to be used and the computing power requirements corresponding to the target task are obtained to calculate the predicted response times corresponding to the multiple first devices to be used.

[0137] In this step, when at least one first device among multiple first devices is in an idle state, the specific implementation method for determining the target first device from multiple first devices may be to first obtain the computing power resources corresponding to the multiple first devices to be used, and the computing power requirements corresponding to the target task, so as to calculate the predicted response time corresponding to the multiple first devices to be used.

[0138] Specifically, it is necessary to obtain the computing power requirements of the target task, which include the computational complexity of the task, the amount of data, etc. Then, based on the computing power resources of each first device and the computing power requirements of the current target task, calculate the predicted response time of each idle first device to process the target task. The predicted response time refers to the estimated time required for the device to complete the task from the start of processing the task. The calculation formula for the predicted response time can be referred to as follows:

[0139] .

[0140] in, represents the predicted response time, and W is the task computing power requirement; Indicates the computing power capacity of fast computing devices; It is the maximum response time set for high-priority tasks, that is, the preset response time threshold, for example, 10 milliseconds (ms). Then, the above formula is used to calculate the predicted response time of each first device in the idle state. This is convenient for subsequent comparison with the preset response time threshold. For comparison, the threshold is determined based on the real-time requirements of the task and the overall performance goals of the system.

[0141] S305: Determine a target first device based on a relationship between the predicted response time and a preset response time threshold, and allocate the target task to the target first device.

[0142] The predicted response times corresponding to the multiple first devices calculated in S304 are compared with a preset response time threshold. The preset response time threshold is a time limit set for high-priority tasks, indicating the maximum acceptable time range for processing the task on the device.

[0143] Based on the calculated predicted response time, the first device whose predicted response time meets the preset response time threshold is selected as the target first device. If the predicted response times of multiple devices meet the requirements, the target first device can be further determined based on other factors, such as the device's remaining resources and its historical processing performance. Once the target first device is determined, the target task can be assigned to that device for processing. By determining the target first device based on response time through these steps, high-priority tasks can be processed in a timely manner, improving the overall performance and response speed of the system.

[0144] In the embodiment of the present application, the fast computing device can be further optimized based on the actual usage of the fast computing device, that is, the optimization is performed based on the average response delay size of the feedback from the fast computing device. The specific calculation formula of the average response delay size is as follows:

[0145]

[0146] Where L represents the average response delay; It represents the sum of the complete response time of each high-priority task, that is, the sum of the difference between the completion time and the start time; is the number of high-priority tasks. By obtaining the above ratio L and continuously minimizing it, the system can optimize the scheduling and execution of high-priority tasks on fast computing devices, enabling tasks to be completed faster.

[0147] S306: When all of the multiple first devices are in use, the target task is assigned to a second device that is in an idle state.

[0148] The second device is a slow computing device used to process low-priority tasks.

[0149] The embodiments of this application further illustrate how to determine the target first device, that is, by calculating the predicted response time, giving priority to devices that can quickly process tasks, avoiding assigning tasks to idle but inefficient devices, making more rational use of fast computing device resources, preventing idle or inefficient resource use, and improving overall resource utilization efficiency. At the same time, selecting devices and assigning tasks based on the predicted response time can avoid situations where some devices are overloaded while others are idle, balancing the load between fast computing devices, extending the service life of the devices, and ensuring long-term stable operation of the system.

[0150] As an extension and refinement of the above embodiment, after each task is executed, in order to improve the user interaction experience, the dynamic allocation method of computing power resources will be continuously optimized based on the user task data and the results of user interaction feedback.

[0151] Specifically, it is necessary to collect the response time, task delay tolerance, and interaction satisfaction of each task completed over a period of time. Interaction satisfaction is derived from the user experience score and is used to assess whether the task results meet user needs. Then, high-priority tasks are divided into high-priority and low-priority tasks, and the corresponding average interaction satisfaction is calculated for each high-priority task. The strategy for allocating fast and slow computing devices is adjusted based on the feedback of the average interaction satisfaction. The calculation formula for average interaction satisfaction is as follows:

[0152]

[0153] in, The interaction satisfaction corresponding to each task; is the actual response time of the i-th task; N is the total number of tasks; is the delay tolerance of the i-th task; S represents the average interaction satisfaction; , this condition is that for all tasks i, the actual response time of the i-th task must be less than or equal to its delay tolerance .

[0154] Furthermore, by averaging the interaction satisfaction, we can further decide whether to optimize the way of allocating computing resources to high-priority tasks; then, for the optimization method of fast computing devices, when the average interaction satisfaction of high-priority tasks is lower than the preset threshold, we can increase the computing resources allocated to high-priority tasks by fast computing devices to further meet the real-time requirements of high-priority tasks; specifically, we can optimize the scheduling parameters used in allocating computing resources to high-priority tasks. :

[0155] .

[0156] in, is the new scheduling parameter obtained through optimization; is the learning factor (determines the magnitude of each update of the scheduling parameters), It is the gradient update of the current scheduling strategy on the interaction satisfaction, reflecting the changing direction and degree of the impact of the current scheduling method on the interaction satisfaction; The resource allocation method in the current scheduling is used to update the interaction satisfaction gradient, so that the resource allocation of fast computing devices is more in line with the needs of high-priority tasks; through the above update formula, the resource allocation of fast computing devices is more in line with the needs of high-priority tasks. At the same time, according to the average interaction satisfaction of task execution feedback, the scheduling parameters are continuously updated iteratively, so that the system can dynamically adjust the strategy when allocating resources to adapt to different task loads and changes in user needs. It should be noted that the scheduling parameters These are multiple parameters related to task resource allocation. There is no limitation on them here and they can be set according to actual conditions.

[0157] You can also optimize the ratio of computing resources used when allocating computing resources to high-priority tasks :

[0158] .

[0159] in, Indicates the proportion of computing resources for high-priority tasks; is the learning rate ( Determine the extent of each update of the computing resource ratio); and then use the average interaction satisfaction of real-time feedback during the execution of high-priority tasks to Continuous iterative updates to get the latest , in order to further dynamically adapt to changes in user needs.

[0160] Similarly, the average interaction satisfaction is used to further decide whether to optimize the way of allocating computing resources to low-priority tasks; then the optimization method for slow computing devices, that is, when the average interaction satisfaction of low-priority tasks is lower than the preset threshold, the optimization method can be to reasonably arrange task batches so that slow computing devices can perform batch processing more efficiently, increase the task processing volume per unit time, and thus improve throughput. Similarly, based on the feedback data after the execution of low-priority tasks, such as whether the response time is within an acceptable range and the interaction satisfaction level, the task allocation strategy for slow computing devices is gradually adjusted. For example, if it is found that the interaction satisfaction level of a certain type of low-priority task is low when processed on a slow computing device, the task allocation can be adjusted to other more suitable slow computing devices, or the device configuration can be optimized to improve the overall interaction satisfaction.

[0161] Then, the above formula is used to obtain the average interaction satisfaction for all tasks within a period of time. By adjusting the task allocation strategy and observing the average interaction satisfaction from real-time feedback over a subsequent period of time, we can determine whether the previous adjustments were effective. This method is then iterated and adjusted gradually to achieve the optimal average interaction satisfaction.

[0162] In the embodiment of the present application, the above-mentioned computing resource scheduling methods of high-priority tasks and low-priority tasks are optimized by averaging interaction satisfaction, and the objective function shown in the following formula can be minimized. , optimize the whole system, balance the overall computing and interactive performance, and make the system have dynamic load optimization capabilities. Take into account both user interaction satisfaction and computing resource utilization efficiency, while satisfying user experience and making efficient use of computing resources; specifically, the objective function Expressed as:

[0163]

[0164] in, is the average response time of the task, is the average delay tolerance of the task. ,This part measures the difference between the actual average response time and the ,average delay tolerance. The smaller the difference, the more the task response conforms to the ,user's acceptable range and the higher the interaction satisfaction. is the weight coefficient, which is used to adjust the importance of this part in the objective function. The larger it is, the more the system focuses on interaction satisfaction.

[0165] M represents the total number of computing power devices, is the total computing capacity of the computing power equipment being used ( The device usage status. is the computing capacity of the device); in the formula This part reflects the efficiency of computing resource utilization. The smaller the value, the higher the computing resource utilization. is a weight coefficient used to adjust the degree of attention to computational efficiency, The larger it is, the more the system emphasizes efficient use of computing resources.

[0166] In actual operation, according to different application scenarios and needs, reasonable settings and For example, in online gaming scenarios with extremely high real-time requirements, the value can be appropriately increased. , giving priority to ensuring interactive satisfaction; in scenarios where large-scale data processing and real-time requirements are relatively low, it can be increased , improving the efficiency of computing resource utilization. By continuously optimizing this objective function, the system can dynamically adjust task allocation and resource scheduling strategies to adapt to different task loads and user needs, achieving a balance between computing and interactive performance.

[0167] As an extension and refinement of the above embodiment, a method for dynamically allocating computing resources shown in this application further includes the following steps 1 to 3:

[0168] Step 1: Obtain the status information of the target task and predict the expected task delay tolerance based on the user's historical behavior.

[0169] In some embodiments, the target task status information may include task priority, task type (data search, data analysis, etc.), task size, resource utilization, etc. User historical behavior includes the user's tolerance for delay when performing similar tasks in the past (i.e., the user's historical delay tolerance data). The expected task delay tolerance is the maximum delay time allowed by the user for the task.

[0170] Then, based on various relevant information of the target task and the user's historical behavior, the user's ideal delay tolerance for the target task is calculated by referring to the task delay tolerance prediction function shown in the following formula: :

[0171] .

[0172] Where g(*) is the tolerance prediction function; is the context information of the current task (such as priority, task type, etc.); H is the user's historical delay tolerance data; U is the hardware resource utilization of the current task.

[0173] It should be noted that in order to ensure smooth interaction with the user, the expected task delay tolerance is It needs to fall within a reasonable range, that is, set reasonable upper and lower limits for it, which are expressed as: .in, and They represent the upper and lower bounds of the predicted expected task delay tolerance respectively.

[0174] Step 2: Monitor the current response time corresponding to the target task.

[0175] In some embodiments, the current response time Rk is obtained by monitoring the progress of the target task, that is, recording the time taken for the target task from the start of processing to the current moment in real time.

[0176] Step 3: Adjust the computing power resources of the target first device according to the relationship between the current response time and the expected task delay tolerance.

[0177] Then, the current response time Rk is compared with the expected task delay tolerance For comparison. (δ is a constant, such as 0.9), it means that the current task response time is within the user's acceptable range, and the computing power resource allocation of the current target first device (fast computing device) can be maintained without adjustment. , which means that the task response time is too long, approaching or exceeding the user's acceptable range. At this time, you can increase the computing power resources for the target first device, increase the operating frequency of the target first device, etc., to reduce the current task response time and ensure that the task can be completed within the user's acceptable delay tolerance.

[0178] Based on the actual task execution and the user's tolerance for delays, the computing power resources of fast computing devices are dynamically adjusted to ensure the efficient completion of high-priority tasks. In resource allocation, a balance is found between throughput and responsiveness, avoiding waste caused by over-allocation of resources while preventing excessive task delays caused by insufficient resources, thereby improving user experience and overall system performance.

[0179] As an extension and refinement of the above embodiment, the embodiment of the present application also provides a corresponding dynamic allocation system for computing power resources for the dynamic allocation method of computing power resources. The system includes: an analysis module, a calculation module, an interface module, and a scheduling module. Specifically:

[0180] The analysis module is used to parse the user input text to determine the device for processing the task corresponding to the user input text in combination with the method of the above embodiment.

[0181] The computing module consists of multiple sub-computing units, including fast computing device sub-units, slow computing device computing sub-units, etc.; different sub-units are equipped with their own computing power resource pools.

[0182] The interface module uses standardized interface design to enable on-demand connection and dynamic scheduling of hardware modules. This can be accomplished through PCIe and NVLink interfaces. PCIe is a common high-speed serial computer expansion bus standard used to connect motherboards to various hardware devices. NVLink enables high-speed interconnection between GPUs, increasing data transmission bandwidth.

[0183] The scheduling module can dynamically select and call appropriate modules from numerous computing sub-units according to current task requirements, while optimizing the allocation of computing power to ensure efficient task execution.

[0184] When building a dynamic computing resource allocation system, in order to be able to count the total computing power of currently connected and available devices in real time and to reasonably allocate tasks later, it is necessary to obtain the total computing power of the entire system. The calculation formula is as follows:

[0185] .

[0186] in, is the total computing power of the system; M is the total number of connected sub-computing units; is the computing power of the i-th device (e.g., teraflops per second); Indicates the device connection status (1 for connected, 0 for disconnected).

[0187] The above formula can be used to calculate the overall computing power of the system. When the system is expanded, for example, a new computing sub-unit is added, only the size of M needs to be increased. If is 1, Further update according to the formula.

[0188] It should be noted that the dynamic computing resource allocation system also includes the following three functions:

[0189] Part 1: Testing new equipment when expanding the system

[0190] When a new computing device is connected to the system, the device registration module uses the standardized interface to register the device according to the compatibility parameters. To calibrate the device, an example calibration expression is as follows:

[0191] .

[0192] in, Is the verification result (1 means passed, 0 means failed), Device compatibility parameters (involving hardware architecture, communication protocols, etc.), The result of the above verification expression is 1, which means that the device Meeting the minimum requirements: When the device compatibility parameters meet the minimum requirements, it is considered to have passed the verification. The device that passes the verification will be added to the computing resource pool, becoming a computing resource that can be called by the system and dynamically added to the scheduling process to prepare for subsequent task allocation.

[0193] Furthermore, after the new equipment passes the inspection, it can be put into normal use.

[0194] Part II: Distributed Task Execution and Migration of the System

[0195] For a certain task , you can Decompose into a set of subtasks executed by multiple threads or multiple computing subunits , each subtask yes A subset of , and the sum of all subtask calculation requirements Equal to the global task computing requirements , refer to the following formula for details:

[0196] .

[0197] For example, in big data distributed computing, large-scale data processing tasks can be split into multiple subtasks based on data partitioning. Based on the overall system's computing resource status, these subtasks are assigned to available sub-computing units for execution. The scheduling module coordinates data flow between modules via a bus or network interface, ensuring that the subtasks work together.

[0198] When the system executes the above multiple subtasks, it is also necessary to constantly monitor the resource utilization of each sub-computing unit in the system; when the resource utilization of a sub-computing unit module exceeds the specified threshold, the sub-computing unit is determined to be overloaded. For example, if the server CPU utilization is continuously higher than 80% (assuming is 80%). If the sub-computation unit exists , the system migrates tasks according to the following formula:

[0199] .

[0200] in, is the computational amount of the task to be migrated, is the migration scaling factor; This is the resource utilization of the current sub-computing unit. By migrating tasks, we can achieve a more balanced load across modules, preventing performance bottlenecks on a single device from impacting overall system efficiency. For example, in a distributed file storage system, we can migrate some file transfer tasks from overloaded storage nodes to idle nodes.

[0201] Part II: Targeted Resource Expansion and Compatibility

[0202] When faced with multiple types of computing tasks, for example, when the target task is a high-priority task, there may be a scenario where both fast and slow computing devices need to work together to complete it. Therefore, when deciding the computing device corresponding to the target task, it is necessary to consider whether the current overall computing power resources can support the target task to facilitate the subsequent deployment and expansion of computing power resources. Since the computing power resources in this application are divided into two main categories, fast computing devices and slow computing devices; assuming that the entire system currently has a fast computing device and a slow computing device, the total computing power resources can be described as follows:

[0203] .

[0204] in, Indicates the computing power of the i-th fast computing device; represents the computing power of the jth slow computing device; It is a quick way to calculate the number of devices; is the number of slow computing devices.

[0205] The above formula can be used to calculate the total computing power resources of fast computing devices and slow computing devices, providing a basis for subsequent scheduling and allocation. Then, based on the total computing power and task requirements, tasks can be reasonably assigned to different devices to achieve efficient resource utilization, which helps to determine whether there is sufficient computing power to handle newly submitted high-priority tasks.

[0206] Therefore, when the system needs to be expanded according to the above formula, new equipment can be introduced in a planned manner to address the problem of insufficient computing power. The computing power of the equipment to be introduced needs to be calculated according to the following formula:

[0207] .

[0208] in, is the total computing power required for the current task, is the available computing power of the current system. For example, if the total computing power requirement is 100TFLOPS and the available computing power of the current system is 80TFLOPS, then , which means that new equipment with at least 20TFLOPS computing power needs to be introduced.

[0209] At the same time, it should be noted that before expanding new sub-computing units, it is necessary to automatically adapt the hardware protocol through the interface layer design to ensure the uniformity of the global environment. The formula corresponding to the above conditions is:

[0210] .

[0211] in, is the hardware compatibility parameter, is the interface protocol compatibility parameter, This parameter is a node device compatibility parameter. For example, between the interface protocol of a new hardware device and the compatibility of the node device itself, the lower compatibility parameter value is used as the overall hardware compatibility standard.

[0212] Furthermore, the above method ensures that the new sub-computing unit can be seamlessly integrated into the existing architecture, achieving dynamic performance expansion in complex scenarios and avoiding system failures or performance degradation due to hardware compatibility issues.

[0213] Therefore, the computing power resource dynamic allocation system of the embodiment of the present application can dynamically propose expansion requirements based on the current task load changes, ensuring that computing power resources are consistent with the actual load. During task peak periods, computing power gaps can be promptly assessed and expansion plans can be made to avoid the impact of insufficient computing power on task processing efficiency.

[0214] Based on the same inventive concept, as an implementation of the above method, an embodiment of the present application also provides a computing power resource dynamic allocation device, which corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will no longer repeat the details of the aforementioned method embodiment one by one, but it should be clear that a computing power resource dynamic allocation device in this embodiment can correspond to and implement all the contents of the aforementioned method embodiment.

[0215] The present invention provides a device for dynamically allocating computing resources. Figure 4 This is a schematic diagram of the structure of the computing power resource dynamic allocation device, such as Figure 4 As shown, the computing power resource dynamic allocation device 400 includes:

[0216] The parsing unit 401 is used to parse the user input text to obtain the task priority score of the target task corresponding to the user input text;

[0217] The determining unit 402 is configured to determine that the target task is a high priority task if the task priority score is greater than or equal to a first preset threshold; a high priority task is a high priority task that needs to be processed in real time;

[0218] The acquisition unit 403 is configured to acquire the call status of each first device; the first device is a fast computing device configured to process high-priority tasks; the call status includes an idle state and a used state;

[0219] A first allocating unit 404 , when there are multiple first devices in an idle state, determines a target first device from the multiple first devices and allocates the target task to the target first device;

[0220] The second allocating unit 405 is configured to allocate the target task to a second device in an idle state when all of the multiple first devices are in use; the second device is a slow computing device configured to process low-priority tasks.

[0221] As an optional implementation of an embodiment of the present application, the first allocation unit 404 is specifically used to obtain computing power resources corresponding to multiple first devices to be used, and computing power requirements corresponding to the target task, so as to calculate the predicted response time corresponding to the multiple first devices to be used; based on the relationship between the predicted response time and the preset response time threshold, determine the target first device.

[0222] As an optional implementation of an embodiment of the present application, the parsing unit 401 is also used to determine that the target task is a low-priority task if the task priority score is less than or equal to a second preset threshold; the second preset threshold is less than the first preset threshold; obtain the calling status of each second device; determine a second device to be used that is in an idle state from multiple second devices, and determine a target second device from multiple second devices to be used, and assign the target task to the target second device.

[0223] As an optional implementation of an embodiment of the present application, the second allocation unit 405 is specifically used to obtain computing power resources corresponding to multiple second devices to be used, and computing power requirements corresponding to the target task, so as to determine the maximum task throughput efficiency; based on the maximum task throughput efficiency, determine the target second device.

[0224] As an optional implementation of the embodiment of the present application, the parsing unit 401 is specifically used to parse the urgency and real-time requirements of the target task corresponding to the user input text based on a lightweight user intention recognition model to obtain the corresponding task priority score.

[0225] As an optional implementation of the embodiment of the present application, the acquisition unit 403 is also used to obtain the status information of the target task, and predict the expected task delay tolerance in combination with the user's historical behavior; monitor the current response time corresponding to the target task; and adjust the computing power resources of the target first device according to the relationship between the current response time and the expected task delay tolerance.

[0226] As an optional implementation of an embodiment of the present application, the computing power resource dynamic allocation device also includes an update unit, which is specifically used to collect the complete response time and computing power utilization rate corresponding to the target task after the execution of the target task is completed; and update the first preset threshold and the second preset threshold according to the complete response time and computing power utilization rate.

[0227] Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device. Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as Figure 5 As shown, the electronic device provided in this embodiment includes: a memory 501 and a processor 502, the memory 501 is used to store computer programs; the processor 502 is used to execute the dynamic allocation method of computing power resources provided in the above embodiment when executing the computer program.

[0228] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the computing device implements the dynamic allocation method of computing power resources provided in the above embodiment.

[0229] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0230] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0231] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0232] Computer-readable media includes both permanent and non-permanent, removable and non-removable storage media. Storage media can implement any method or technology for storing information, which can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0233] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for dynamically allocating computing resources, characterized in that: include: Parsing the user input text to obtain a task priority score of the target task corresponding to the user input text; If the task priority score is greater than or equal to a first preset threshold, determining that the target task is a high priority task; Get the calling status of each first device; The first device is a fast computing device for processing the high-priority task; the calling state includes an idle state and a used state; When there are multiple first devices to be used in an idle state, determining a target first device from the multiple first devices to be used, and allocating the target task to the target first device; When all of the first devices are in use, the target task is assigned to a second device in an idle state; the second device is a slow computing device used to process low-priority tasks; The parsing of the user input text to obtain the task priority score of the target task corresponding to the user input text includes: Based on the lightweight user intention recognition model, the target task corresponding to the user input text is embedded, the semantic features corresponding to the target task are obtained, and the corresponding task priority score is obtained by combining the task priority score calculation formula and the semantic features; the task priority score calculation formula is: ; in, It is a lightweight user intent recognition model. is the model parameter weight; P is the task priority score, and the value range of P is [0, 1]. Represents the semantic features corresponding to the target task.

2. The method according to claim 1, characterized in that When there are a plurality of first devices in an idle state, determining a target first device from the plurality of first devices includes: Obtaining computing power resources respectively corresponding to the plurality of first devices to be used and computing power requirements corresponding to the target task, so as to calculate predicted response times respectively corresponding to the plurality of first devices to be used; The target first device is determined based on a magnitude relationship between the predicted response time and a preset response time threshold.

3. The method according to claim 1, characterized in that After parsing the user input text to obtain the task priority score of the target task corresponding to the user input text, the method further includes: If the task priority score is less than or equal to a second preset threshold, determining that the target task is a low priority task; the second preset threshold is less than the first preset threshold; Obtaining a call status of each second device; A second device to be used that is in an idle state is determined from the plurality of second devices, a target second device is determined from the plurality of second devices to be used, and the target task is allocated to the target second device.

4. The method according to claim 3, characterized in that The step of determining a second device to be used that is in an idle state from the plurality of second devices, and determining a target second device from the plurality of second devices to be used, includes: Obtain computing power resources corresponding to the plurality of second devices to be used, and computing power requirements corresponding to the target task, to determine a maximum task throughput efficiency; The target second device is determined based on the maximum task throughput efficiency.

5. The method according to claim 1, wherein The parsing of the user input text to obtain the task priority of the target task corresponding to the user input text includes: The urgency and real-time requirements of the target task corresponding to the user input text are analyzed based on a lightweight user intention recognition model to obtain the corresponding task priority score.

6. The method according to claim 1, characterized in that The method further comprises: Obtaining the status information of the target task and predicting the expected task delay tolerance based on the user's historical behavior; Monitoring the current response time corresponding to the target task; The computing power resources of the target first device are adjusted according to the relationship between the current response time and the expected task delay tolerance.

7. The method according to claim 3, characterized in that The method further comprises: After the target task is completed, the complete response time and computing power usage rate corresponding to the target task are collected; The first preset threshold and the second preset threshold are updated according to the complete response time and the computing power usage rate.

8. A computing resource dynamic allocation device, characterized in that: include: A parsing unit, configured to parse the user input text to obtain a task priority score of the target task corresponding to the user input text; a determining unit, configured to determine that the target task is a high priority task if the task priority score is greater than or equal to a first preset threshold; an acquiring unit, configured to acquire a calling status of each first device; The first device is a fast computing device for processing the high-priority task; the calling state includes an idle state and a used state; a first allocating unit, which, when there are a plurality of the first devices in an idle state, determines a target first device from the plurality of the first devices and allocates the target task to the target first device; a second allocating unit, configured to allocate the target task to a second device in an idle state when all of the first devices are in use; the second device is a slow computing device configured to process low-priority tasks; The parsing unit is specifically configured to perform an embedding operation on the target task corresponding to the user input text based on a lightweight user intention recognition model, obtain the semantic features corresponding to the target task, and obtain the corresponding task priority score by combining the task priority score calculation formula and the semantic features; the task priority score calculation formula is: ; in, It is a lightweight user intent recognition model. is the model parameter weight; P is the task priority score, and the value range of P is [0, 1]. Represents the semantic features corresponding to the target task.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store a computer program; and the processor is used to enable the electronic device to implement the method for dynamically allocating computing resources according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a computing device, the computing device implements the method for dynamically allocating computing power resources according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Task optimization method and device

    CN114741075A

  • Intelligent scheduling system and method based on calculation power demand prediction

    CN120066720A