Task scheduling optimization method and device and storage medium
By updating and optimizing the scheduling table during the scheduling process and adjusting the strategy using a large language model, the lag problem of cloud scheduling edge nodes is solved, enabling self-evolution and autonomous decision-making, improving resource utilization efficiency and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-03
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the decision-making mode of cloud scheduling edge node processing tasks is lagging, unable to respond to changes in user needs in a timely manner, resulting in low resource utilization efficiency and high operation and maintenance costs.
By updating the scheduling task table, decision table, and execution result table during the scheduling process, filtering sample data related to the target indicators, and adjusting the scheduling strategy using a large language model, self-evolution and autonomous decision-making are achieved, thereby optimizing resource allocation.
It improves the dynamic adaptability of scheduling, reduces reliance on manual configuration, achieves efficient resource utilization and self-healing capabilities, and reduces long-term operation and maintenance costs.
Smart Images

Figure CN121636103A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of artificial intelligence, and particularly relates to a task scheduling optimization method, device and storage medium. BACKGROUND
[0002] With the complication of AI (artificial intelligence) application scenarios, such as multi-round dialogue systems, code generation tools and enterprise-level data analysis, multiple types of LLM (Large Language Model) are deployed in different edge nodes, users initiate different types of tasks through clients, and the cloud schedules appropriate edge nodes to process the tasks.
[0003] The decision mode of scheduling is usually that engineers analyze logs according to business conditions, and thus configure the process of scheduling, which has a lag. SUMMARY
[0004] Therefore, the present application provides a task scheduling optimization method, device and storage medium to improve the timeliness of end-edge-cloud collaborative task scheduling changes.
[0005] The first aspect of the present application provides a task scheduling optimization method, comprising:
[0006] In the process of scheduling the edge node to execute the task of the client, a scheduling task table, a scheduling decision table and an execution result table are updated; the scheduling task table records information of a requested task; the scheduling decision table records information of selected edge nodes according to a scheduling strategy; and the execution result table records information of the execution of the task by the edge node;
[0007] The target index to be optimized is determined for the execution of the task by the scheduling edge node;
[0008] Sample data related to the target index is screened from the scheduling task table, the scheduling decision table and the execution result table;
[0009] A large language model is called to adjust the scheduling strategy according to the sample data and the target index.
[0010] The second aspect of the present application provides a task scheduling optimization device, comprising:
[0011] A scheduling data updating module is configured to update a scheduling task table, a scheduling decision table and an execution result table in the process of scheduling the edge node to execute the task of the client; the scheduling task table records information of a requested task; the scheduling decision table records information of selected edge nodes according to a scheduling strategy; and the execution result table records information of the execution of the task by the edge node;
[0012] The target metric determination module is used to determine the target metrics to be optimized for the tasks executed by the scheduling edge nodes;
[0013] The sample data filtering module is used to filter sample data related to the target indicator in the scheduling task table, the scheduling decision table and the execution result table.
[0014] The scheduling strategy adjustment module is used to call the large language model to adjust the scheduling strategy based on the sample data and the target index.
[0015] A third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the task scheduling optimization method as described in the first aspect above.
[0016] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the task scheduling optimization method as described in the first aspect above.
[0017] A fifth aspect of the present invention provides a computer program product that, when run on a computer, causes the computer to perform the task scheduling optimization method as described in the first aspect above.
[0018] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0019] In this embodiment, during the process of scheduling edge nodes to execute client tasks, the scheduling task table, scheduling decision table, and execution result table are updated. The scheduling task table records information about the requested task; the scheduling decision table records information about the edge nodes selected according to the scheduling strategy; the execution result table records information about the edge nodes executing tasks; the target indicators to be optimized are determined for scheduling edge nodes to execute tasks; sample data related to the target indicators are filtered in the scheduling task table, scheduling decision table, and execution result table; and the large language model is invoked to adjust the scheduling strategy based on the sample data and target indicators. This embodiment has self-evolution capabilities, can learn from actual scheduling data, and continuously adjust and optimize its own decision logic, achieving automation to autonomy. This helps improve dynamic adaptability, thereby automatically adjusting the focus of the scheduling strategy according to long-term changes in task patterns and infrastructure, maintaining efficient resource utilization, reducing reliance on manual configuration of the scheduling process, enabling scheduling to have self-healing and self-optimizing capabilities, and reducing long-term operation and maintenance costs. Attached Figure Description
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0021] Figure 1 is a schematic diagram of a task scheduling optimization method provided by an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of a task scheduling optimization device provided by an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following description, specific details are set forth in order to provide a thorough understanding of embodiments of the present application. However, persons skilled in the art will understand that embodiments of the present application can be practiced without these specific details. In other instances, well-known systems, devices, circuits, and methods have not been described in detail so as not to obscure the description of the present application.
[0025] The technical solutions of the present application will be described below through specific embodiments.
[0026] Referring to Figure 1 , a schematic diagram of a task scheduling optimization method provided by an embodiment of the present application is shown, which can specifically include the following steps:
[0027] Step 101, in the process of scheduling edge nodes to perform tasks of a client, updating a scheduling task table, a scheduling decision table, and an execution result table.
[0028] This embodiment can be applied to a cloud, which is responsible for scheduling a plurality of edge nodes and providing various services based on artificial intelligence (especially LLM) for a client (i.e. a user).
[0029] In the process of scheduling edge nodes to perform tasks of a client in the cloud, a scheduling task table (Scheduling_Requests), a scheduling decision table (Scheduling_Decisions), and an execution result table (Execution_Results) are updated.
[0030] The scheduling task table (Scheduling_Requests) records information of a requested task, that is, records original information of each scheduling request as an input context for analysis.
[0031] The scheduling decision table (Scheduling_Decisions) records information of an edge node selected according to a scheduling strategy
[0032] The execution result table (Execution_Results) records information of an execution of a task by an edge node, that is, records an execution effect of the task on the edge node, to evaluate a quality of a scheduling decision.
[0033] The scheduling task table (Scheduling_Requests), the scheduling decision table (Scheduling_Decisions), and the execution result table (Execution_Results) can completely record full-link data from a decision, an execution, to a result when an edge node is scheduled to execute a task, and the data is stored in a scheduling decision database in a structured manner.
[0034] In an embodiment of the present application, the step 101 (especially the scheduling strategy) can include the following steps:
[0035] The step 1011 calculates a matching degree of an execution of a task by a large language model deployed in each edge node.
[0036] Different edge nodes deploy different large language models with different capabilities, and different tasks have different requirements for capabilities of the large language models, so in the process of scheduling decision, each edge node can be traversed to calculate a matching degree of an execution of an expected task by a large language model deployed in the edge node.
[0037] In a specific implementation, the first name and the first version of the large language model suitable for executing the task can be determined based on a similarity between a description information of the large language model and the task, and the first version is usually the latest version of the large language model under the first name.
[0038] The second name of the large language model deployed in the edge node is compared with the first name, and the second version of the large language model deployed in the edge node is compared with the first version.
[0039] If the second name of the large language model deployed in the edge node is the same as the first name, and the second version of the large language model deployed in the edge node is the same as the first version, it means that the large language models are the same and the versions are the same, the function can meet the requirement, and the two belong to complete matching, so the first value (such as 1.0) is set as the matching degree of the edge node.
[0040] If the second name of the large language model deployed in the edge node is the same as the first name, and the second version of the large language model deployed in the edge node is different from the first version, it means that the large language model is the same but the version is different, and the function basically meets the demand, and the two belong to partial matching, then the second value (such as 0.7) is set as the matching degree of the edge node.
[0041] If the second name of the large language model deployed in the edge node is different from the first name, and the type of the large language model deployed in the edge node is the same as the type of the large language model suitable for performing the task, it means that the large language models are of the same type but the accuracy or structure does not meet the demand, and the two belong to similar large language models, then the third value (such as 0.3) is set as the matching degree of the edge node.
[0042] Further, each large language model (especially a pre-trained LLM) is usually tested for different types of tasks to obtain scores under different types, and the third value is positively related to the score of the large language model deployed in the edge node under the type corresponding to the current task, that is, the higher the score of the large language model deployed in the edge node under the type corresponding to the current task, the larger the third value, and vice versa. The lower the score of the large language model deployed in the edge node under the type corresponding to the current task, the smaller the third value.
[0043] If the second name of the large language model deployed in the edge node is different from the first name, and the type of the large language model deployed in the edge node is different from the type of the large language model suitable for performing the task, it means that there is no related large language model deployed in the edge node, and the two do not match, then the fourth value (such as 0) is set as the matching degree of the edge node.
[0044] Wherein, the first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
[0045] Step 1012, calculate the sufficiency of resources in each edge node.
[0046] The large language model consumes a lot of resources in each edge node (machine device), so in the process of scheduling decision, the sufficiency of resources in each edge node (machine device) can be calculated.
[0047] In a specific implementation, the resources in the edge node (machine device) include central processing unit (CPU), graphics processing unit (GPU), and memory, etc., so the first usage rate of the central processing unit (CPU), the second usage rate of the graphics processing unit (GPU), and the third usage rate of the memory in the edge node can be determined.
[0048] The first usage rate is mapped to a first resource value using a piecewise function or the like; wherein the first resource value is negatively correlated with the first usage rate, that is, the higher the first usage rate of the CPU, the smaller the first resource value, and vice versa, the lower the first usage rate of the CPU, the larger the first resource value.
[0049] Exemplarily, when the first usage rate of the CPU is ≤50%, the first resource value is 1.0, when 50%< the first usage rate of the CPU ≤70%, the first resource value is 0.7, and when 70%< the first usage rate of the CPU ≤100%, the first resource value is 0.3.
[0050] The second usage rate is mapped to a second resource value using a piecewise function or the like; wherein the second resource value is negatively correlated with the second usage rate, that is, the higher the second usage rate of the GPU, the smaller the second resource value, and vice versa, the lower the second usage rate of the GPU, the larger the second resource value.
[0051] Exemplarily, when the second usage rate of the GPU is ≤50%, the second resource value is 1.0, when 50%< the second usage rate of the GPU ≤70%, the second resource value is 0.7, and when 70%< the second usage rate of the GPU ≤100%, the second resource value is 0.3.
[0052] The third usage rate is mapped to a third resource value using a piecewise function or the like; wherein the third resource value is negatively correlated with the third usage rate, that is, the higher the third usage rate of the memory, the smaller the third resource value, and vice versa, the lower the third usage rate of the memory, the larger the third resource value.
[0053] Exemplarily, when the third usage rate of the memory is ≤50%, the third resource value is 1.0, when 50%< the third usage rate of the memory ≤70%, the third resource value is 0.7, and when 70%< the third usage rate of the memory ≤100%, the third resource value is 0.3.
[0054] The first resource value of the CPU, the second resource value of the GPU, and the third resource value of the memory are fused into the sufficiency of resources in the edge node using a linear or nonlinear manner.
[0055] Exemplarily, the first resource value of the CPU, the second resource value of the GPU, and the third resource value of the memory can be fused into the sufficiency of resources in the edge node using a linear or nonlinear manner. mem An average value of the third resource value of the memory is calculated as the sufficiency of resources in the edge node, and then the sufficiency of resources in the edge node can be represented as: S resource (i)=(S cpu +S gpu +S mem ) / 3, wherein S resource (i) is the sufficiency of resources in the ith edge node, S cpu is the first resource value of the CPU, S gpuS is a second resource value for the GPU mem S is a third resource value for the memory.
[0056] Step 1013, adaptability in latency when each edge node calculates to execute the task.
[0057] Different edge nodes call large language models to execute tasks, which is a comprehensive operation, and the inference latency of the large language model has a relatively obvious influence on user experience. Therefore, in the process of scheduling decisions, the adaptability in latency when each edge node calculates to execute the task can be traversed.
[0058] In a specific implementation, each edge node can be scheduled to execute a health probe of the same type regularly, and the results of each edge node executing the health probe of the same type are recorded. The values in the latency when each edge node executes the health probe are queried from the results as detection values.
[0059] Among them, the other task is of the same type as the current task.
[0060] The detection values are mapped to the adaptability in latency when the edge node executes the task using a segmented function or the like. The adaptability is negatively related to the detection value, that is, the greater the detection value in the latency when the edge node executes the health probe, the smaller the adaptability in the latency when the edge node is expected to execute the current task, and vice versa. The smaller the detection value in the latency when the edge node executes the health probe, the greater the adaptability in the latency when the edge node is expected to execute the current task.
[0061] For example, when the detection value in the latency when the edge node executes the health probe is ≤50ms, the detection in the latency when the edge node executes the health probe is 1.0, when 50ms
[0062] Step 1014, for the same edge node, the matching degree, the adequacy, and the adaptability are fused into a comprehensive score of the edge node.
[0063] In a specific implementation, the matching degree, the adequacy, and the adaptability in the same edge node can be fused into the comprehensive score of the edge node using a linear or nonlinear manner.
[0064] In one fusion mode, the matching degree, the sufficiency and the adaptability in the same edge node can be fused into the comprehensive score of the edge node by using weighted summation.
[0065] In this fusion mode, for the same edge node, the product between the matching degree and the preset first weight, the product between the sufficiency and the preset second weight, and the product between the adaptability and the preset third weight are combined to obtain the comprehensive score of the edge node.
[0066] Then, the comprehensive score of the edge node can be represented as Score i =w model ×S model (i)+w resource ×S resource (i)+w latency ×S latency (i), wherein Score i is the comprehensive score of the i-th edge node, S model (i) is the matching degree of the i-th edge node, S resource (i) is the sufficiency of the i-th edge node, S latency (i) is the adaptability of the i-th edge node, w model is the first weight, w resource is the second weight, and w latency is the third weight.
[0067] Step 1015, selecting the edge node with the highest comprehensive score to perform the task.
[0068] The cloud compares the comprehensive scores of the edge nodes and selects the edge node with the highest comprehensive score to perform the task.
[0069] Step 1016, writing the comprehensive score and the selected edge node into the scheduling decision table.
[0070] The cloud writes the detailed information of the generated comprehensive score and the selected edge node into the scheduling decision table (Scheduling_Decisions).
[0071] Step 102, determining the target index to be optimized for the scheduling edge node performing the task.
[0072] In this embodiment, the cloud can determine the target index to be optimized for the scheduling operation of the scheduling edge node performing the task in a periodic or non-periodic manner by polling, etc., for example, optimizing the delay of real-time video analysis task, optimizing the accuracy of searching documents, etc.
[0073] Further, when the cloud receives the optimization demand information input by the operation and maintenance personnel using natural language, the cloud can analyze the optimization demand information based on NLP (natural language processing) techniques (such as word segmentation, part-of-speech tagging, vectorization, and classification) to obtain the target index to be optimized.
[0074] Step 103: Filtering sample data related to the target index in the scheduling task table, the scheduling decision table, and the execution result table.
[0075] In this embodiment, the sample data related to the target index to be optimized can be filtered from the scheduling task table (Scheduling_Requests), the scheduling decision table (Scheduling_Decisions), and the execution result table (Execution_Results).
[0076] For example, if the target index to be optimized involves the delay of real-time video analysis tasks, sample data with task_type='real_time_video_analysis' (task type is real-time video analysis) and execution_status='success' (execution status is success) can be filtered.
[0077] In a specific implementation, the optimization result when the target index was last optimized is queried.
[0078] If the optimization result is optimization success, sample data related to the target index and having a first data size are filtered from the scheduling task table (Scheduling_Requests), the scheduling decision table (Scheduling_Decisions), and the execution result table (Execution_Results).
[0079] If the optimization result is optimization failure, sample data related to the target index and having a second data size are filtered from the scheduling task table (Scheduling_Requests), the scheduling decision table (Scheduling_Decisions), and the execution result table (Execution_Results).
[0080] The first data size is smaller than the second data size, that is, when the last optimization of the same target index fails, the size of the sample data is expanded to provide more sufficient context information for subsequent large language model optimization of the scheduling strategy, so as to improve the probability of successful optimization of the target index.
[0081] Step 104: Calling the large language model to adjust the scheduling strategy according to the sample data and the target index.
[0082] In this embodiment, the pattern recognition and inference capability of the LLM can be used to mine the correlation related to the target index from massive high-dimensional sample data to adjust the scheduling strategy, so that the decision is more scientific.
[0083] In one embodiment of the application, step 104 can include the following steps:
[0084] Step 1041, count the first historical index value of the sample data under the target index.
[0085] In this embodiment, the first historical index value of the sample data under the target index can be counted by using the mean value, weighted summation (according to the time decay weight), etc.
[0086] Step 1042, optimize the first historical index value to the target index value.
[0087] In this embodiment, the first historical index value can be optimized to the target index value by using an optimization rule or an LLM on the basis of the first historical index value.
[0088] For example, an optimization coefficient is configured according to the optimization direction (i.e. increase, decrease, etc.), the optimization coefficient is greater than 1 when the optimization direction is increase, and the optimization coefficient is less than 1 when the optimization direction is decrease, the first historical index value is multiplied by the optimization coefficient to obtain the target index value.
[0089] For another example, an optimization step is configured according to the optimization direction (i.e. increase, decrease, etc.), the optimization coefficient is a positive value when the optimization direction is increase, and the optimization coefficient is a negative value when the optimization direction is decrease, the first historical index value is added to the optimization coefficient to obtain the target index value.
[0090] Exemplarily, the optimization process is to reduce the average delay of real-time video analysis tasks from 95ms to below 80ms, to increase the accuracy of searching literature from 85% to 87%, etc.
[0091] Step 1043, construct a prompt word using the sample data and the target index value.
[0092] In this embodiment, the information (such as the path, etc.) of the sample data and the target index value are written into a preset prompt template, so as to construct a prompt word Prompt for the LLM.
[0093] Step 1044, input the prompt word into the large language model to generate suggestion information for the scheduling strategy.
[0094] In this embodiment, the prompt word Prompt is input into the LLM, the LLM performs deep pattern recognition and causal reasoning according to the guidance of the prompt word Prompt, and generates suggestion information for the scheduling strategy, for example, the suggestion information is “it is suggested to increase the adaptive third weight from 0.2 to 0.35, because the analysis finds that the system is not sensitive to delay under the current third weight”.
[0095] Step 1045, adjusting the scheduling strategy according to the suggestion information.
[0096] In this embodiment, the scheduling strategy can be adjusted according to the suggestion information of the LLM.
[0097] Step 1046, if the adjustment is completed, a contrast test is performed on the scheduling strategy, and a test result is obtained.
[0098] In this embodiment, the scheduling strategy before adjustment and the scheduling strategy after adjustment can be tested by using other tasks of the same type as the current task (i.e., A / B testing), and a test result is obtained.
[0099] Step 1047, generating an optimization result for the scheduling strategy according to the test result.
[0100] In this embodiment, the test result of the contrast test can be analyzed, and the scheduling strategy before adjustment and the scheduling strategy after adjustment can be compared, so as to generate an optimization result.
[0101] In a specific implementation, other indicators related to the target indicator can be determined based on Pearson correlation coefficient and the like, as the correlation indicators.
[0102] The second historical indicator value of the sample data under the correlation indicator is calculated by using the mean value, weighted summation (according to the time decay weight), and the like.
[0103] In the test result, the first test indicator value under the target indicator value and the second test indicator value under the correlation indicator are calculated for the scheduling strategy before adjustment, and the third test indicator value under the target indicator value and the fourth test indicator value under the correlation indicator are calculated for the scheduling strategy after adjustment.
[0104] If the target optimization condition and the correlation maintenance condition are met, it is determined that the optimization result of the scheduling strategy is optimization success, at this time, the scheduling strategy after adjustment can be fully promoted.
[0105] If the target optimization condition or the correlation maintenance condition is not met, it is determined that the optimization result of the scheduling strategy is optimization failure, at this time, the scheduling strategy before adjustment is maintained to be effective, and the scheduling strategy after adjustment is not promoted.
[0106] The target optimization condition is that the third test index value is within the fluctuation range of the target index value, and the third test index value is better than the first test index value, that is, the value of the optimized target index reaches the expectation, and the value of the optimized target index is better than the value of the target index before optimization.
[0107] The association maintaining condition is that the fourth test index value is within the fluctuation range of the second historical index value, and the fourth test index value is within the fluctuation range of the second test index value, that is, the optimization of the target index does not affect other associated indexes.
[0108] In the embodiment, in the process of scheduling the edge node to perform the task of the client, the scheduling task table, the scheduling decision table and the execution result table are updated; the scheduling task table records information of a requested task; the scheduling decision table records information of selection of the edge node according to the scheduling strategy; the execution result table records information of execution of the task by the edge node; a target index to be optimized is determined for the edge node performing the task; sample data related to the target index is screened from the scheduling task table, the scheduling decision table and the execution result table; and a large language model is called to adjust the scheduling strategy according to the sample data and the target index. The embodiment has self-evolution capability, can learn from actual scheduling data, continuously adjusts and optimizes the decision logic of itself, realizes automation to autonomy, which helps to improve dynamic adaptability, so as to automatically adjust the focus of the scheduling strategy according to long-term task mode changes and infrastructure changes, maintain efficient use of resources, reduce the dependence of manual configuration on the scheduling process, make the scheduling have self-recovery and self-optimization capability, and reduce long-term operation and maintenance cost.
[0109] It should be noted that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0110] Referring to Figure 2 , a schematic diagram of a task scheduling optimization device provided by an embodiment of the present application is shown, which can specifically include the following modules:
[0111] The scheduling data updating module 201 is configured to update a scheduling task table, a scheduling decision table and an execution result table in the process of scheduling the edge node to perform the task of the client; the scheduling task table records information of a requested task; the scheduling decision table records information of selection of the edge node according to the scheduling strategy; and the execution result table records information of execution of the task by the edge node.
[0112] The target index determining module 202 is configured to determine a target index to be optimized for the edge node performing the task.
[0113] The sample data screening module 203 is configured to screen sample data related to the target index from the scheduling task table, the scheduling decision table and the execution result table.
[0114] The scheduling strategy adjustment module 204 is configured to call the large language model to adjust the scheduling strategy according to the sample data and the target index.
[0115] In an embodiment of the present application, the scheduling data updating module 201 comprises:
[0116] The matching degree calculation module is configured to calculate the matching degree of the large language model deployed in each edge node in executing the task.
[0117] The sufficiency calculation module is configured to calculate the sufficiency of resources in each edge node.
[0118] The adaptability calculation module is configured to calculate the adaptability of each edge node in executing the task in terms of time delay.
[0119] The comprehensive score fusion module is configured to fuse the matching degree, the sufficiency and the adaptability into a comprehensive score of the edge node for the same edge node.
[0120] The edge node selection module is configured to select the edge node with the highest comprehensive score to execute the task.
[0121] The scheduling decision table updating module is configured to write the comprehensive score and the selected edge node into the scheduling decision table.
[0122] In an embodiment of the present application, the matching degree calculation module is further configured to:
[0123] determine a first name and a first version of the large language model suitable for executing the task;
[0124] if a second name of the large language model deployed in the edge node is the same as the first name and a second version of the large language model deployed in the edge node is the same as the first version, set a first value as the matching degree of the edge node;
[0125] if the second name of the large language model deployed in the edge node is the same as the first name and the second version of the large language model deployed in the edge node is different from the first version, set a second value as the matching degree of the edge node;
[0126] if the second name of the large language model deployed in the edge node is different from the first name, and the type of the large language model deployed in the edge node is the same as the type of the large language model suitable for performing the task, a third value is set as the matching degree of the edge node; the third value is positively correlated with the score of the large language model deployed in the edge node under the type of the task;
[0127] if the second name of the large language model deployed in the edge node is different from the first name, and the type of the large language model deployed in the edge node is different from the type of the large language model suitable for performing the task, a fourth value is set as the matching degree of the edge node;
[0128] wherein the first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
[0129] In an embodiment of the present application, the sufficiency calculation module is further configured to:
[0130] determine a first usage rate of a central processing unit, a second usage rate of a graphics processing unit, and a third usage rate of a memory in the edge node;
[0131] map the first usage rate to a first resource value; the first resource value is negatively correlated with the first usage rate;
[0132] map the second usage rate to a second resource value; the second resource value is negatively correlated with the second usage rate;
[0133] map the third usage rate to a third resource value; the third resource value is negatively correlated with the third usage rate;
[0134] fuse the first resource value, the second resource value, and the third resource value into the sufficiency of resources in the edge node.
[0135] In an embodiment of the present application, the adaptability calculation module is further configured to:
[0136] query a detection value of a latency when each edge node executes a health probe; the health probe is of another task of the same type as the current task type;
[0137] map the detection value to an adaptability of a latency when the edge node executes the task; the adaptability is negatively correlated with the detection value.
[0138] In an embodiment of the present application, the sample data screening module 203 comprises:
[0139] an optimization result query module configured to query an optimization result when the target indicator is last optimized;
[0140] The first sample screening module is configured to screen sample data related to the target index and having a first data amount from the scheduling task table, the scheduling decision table and the execution result table if the optimization result is optimization success.
[0141] The second sample screening module is configured to screen sample data related to the target index and having a second data amount from the scheduling task table, the scheduling decision table and the execution result table if the optimization result is optimization failure.
[0142] The first data amount is less than the second data amount.
[0143] In an embodiment of the present application, the scheduling strategy adjustment module 204 comprises:
[0144] The first index statistical module is configured to count a first historical index value of the sample data under the target index.
[0145] The target index value optimization module is configured to optimize the first historical index value into a target index value.
[0146] The prompt word construction module is configured to construct a prompt word using the sample data and the target index value.
[0147] The suggestion information generation module is configured to input the prompt word into a large language model to generate suggestion information for the scheduling strategy.
[0148] The suggestion adjustment module is configured to adjust the scheduling strategy according to the suggestion information.
[0149] The contrast test module is configured to perform a contrast test on the scheduling strategy if the adjustment is completed to obtain a test result.
[0150] The optimization result generation module is configured to generate an optimization result for the scheduling strategy according to the test result.
[0151] In an embodiment of the present application, the optimization result generation module comprises:
[0152] The associated index determination module is configured to determine an associated index related to the target index.
[0153] The second index statistical module is configured to count a second historical index value of the sample data under the associated index.
[0154] The third index statistics module is configured to count, in the test result, a first test index value under the target index value and a second test index value under the associated index for the scheduling strategy before adjustment, and count a third test index value under the target index value and a fourth test index value under the associated index for the scheduling strategy after adjustment.
[0155] The optimization success determination module is configured to determine that the optimization result of the scheduling strategy is optimization success if the target optimization condition and the associated maintenance condition are satisfied.
[0156] The optimization failure determination module is configured to determine that the optimization result of the scheduling strategy is optimization failure if the target optimization condition or the associated maintenance condition is not satisfied.
[0157] The target optimization condition is that the third test index value is within a fluctuation range of the target index value, and the third test index value is better than the first test index value.
[0158] The associated maintenance condition is that the fourth test index value is within a fluctuation range of the second historical index value, and the fourth test index value is within a fluctuation range of the second test index value.
[0159] The task scheduling optimization device provided by the embodiment of the application can realize each step in each task scheduling optimization method embodiment.
[0160] It should be noted that the division of the modules in the various task scheduling optimization devices provided by the above embodiments is illustrative, and is merely a logical function division. In actual implementation, another division mode can be used. In addition, each function module in each embodiment of the application can be integrated in one processor, or can be physically separated, or two or more modules can be integrated into one module. The above integrated module can be realized in the form of hardware or in the form of a software function module.
[0161] The integrated module, if implemented in the form of a software function module and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such an understanding, all or part of the technical solutions of the embodiments of the application can be embodied in the form of a computer program product stored in a computer storage medium, including a plurality of instructions for causing an electronic device or a processor to perform all or part of the steps of the methods in the various embodiments of the application. The aforementioned computer storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.
[0162] In addition, the task scheduling optimization apparatus and the task scheduling optimization method provided by the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0163] Referring to Figure 3 , a schematic diagram of an electronic device is shown. As Figure 3 indicated, the electronic device in the embodiment of the application includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps in the task scheduling optimization method embodiments described above. Alternatively, the processor executes the computer program to implement the functions of the modules in the task scheduling optimization apparatus embodiments described above.
[0164] For example, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which can be used to describe the execution process of the computer program in the electronic device.
[0165] The electronic device can be a desktop computer, a cloud server, or other computing devices. The electronic device can include, but is not limited to, a processor, a memory. Those skilled in the art can understand, Figure 3 is only an example of an electronic device and does not constitute a limitation on the electronic device, which can include more or fewer components than those shown, or combine certain components, or different components, for example, the electronic device can also include an input / output device, a network access device, a bus, etc.
[0166] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0167] The memory can be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. The memory can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory can include both the internal storage unit and the external storage device of the electronic device. The memory is used to store the computer program and other programs and data required by the electronic device. The memory can also be used to temporarily store data that has been output or will be output.
[0168] The embodiments of the present application also disclose an electronic device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the task scheduling optimization method according to the foregoing embodiments when executing the computer program.
[0169] The embodiments of the present application also disclose a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the task scheduling optimization method according to the foregoing embodiments.
[0170] The embodiments of the present application also disclose a computer program product, which, when running on a computer, enables the computer to execute the task scheduling optimization method according to the foregoing embodiments.
[0171] The above-described embodiments are merely used to illustrate the technical solutions of the present application, but not to limit the same. Although the present application is described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some of the technical features can be replaced equivalently, and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for task scheduling optimization, the method comprising: The method comprises the following steps: updating a scheduling task table, a scheduling decision table and an execution result table in the process of scheduling an edge node to execute a task of a client; the scheduling task table records information of a requested task; the scheduling decision table records information of an edge node selected according to a scheduling strategy; the execution result table records information of the edge node executing the task; determining a target index to be optimized for the edge node executing the task; screening sample data related to the target index from the scheduling task table, the scheduling decision table and the execution result table; calling a large language model to adjust the scheduling strategy according to the sample data and the target index.
2. The method of claim 1, wherein, The updating of the scheduling task table, the scheduling decision table and the execution result table comprises: calculating a matching degree of a large language model deployed in each edge node for executing the task; calculating a sufficiency of resources in each edge node; calculating an adaptability of each edge node in terms of time delay when executing the task; for the same edge node, fusing the matching degree, the sufficiency and the adaptability into a comprehensive score of the edge node; selecting the edge node with the highest comprehensive score to execute the task; writing the comprehensive score and the selected edge node into the scheduling decision table.
3. The method of claim 2, wherein, The calculation of the matching degree of the large language model deployed in each edge node for executing the task comprises: determining a first name and a first version of a large language model suitable for executing the task; if a second name of a large language model deployed in an edge node is the same as the first name, and a second version of the large language model deployed in the edge node is the same as the first version, setting a first value as the matching degree of the edge node; if a second name of a large language model deployed in an edge node is the same as the first name, and a second version of the large language model deployed in the edge node is different from the first version, setting a second value as the matching degree of the edge node; if a second name of a large language model deployed in an edge node is different from the first name, and a type of the large language model deployed in the edge node is the same as a type of the large language model suitable for executing the task, setting a third value as the matching degree of the edge node; the third value is positively correlated with a score of the large language model deployed in the edge node in a test of the type of the task; if a second name of a large language model deployed in an edge node is different from the first name, and a type of the large language model deployed in the edge node is different from a type of the large language model suitable for executing the task, setting a fourth value as the matching degree of the edge node; wherein the first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
4. The method of claim 2, wherein, The calculation of the sufficiency of resources in each edge node comprises: determining a first usage rate of a central processing unit, a second usage rate of a graphics processing unit and a third usage rate of memory in the edge node; mapping the first usage rate into a first resource value; the first resource value is negatively correlated with the first usage rate; mapping the second usage rate into a second resource value; the second resource value is negatively correlated with the second usage rate; map the third usage rate to a third resource value; the third resource value is negatively related to the third usage rate; fuse the first resource value, the second resource value and the third resource value into sufficiency of resources in the edge node.
5. The method of claim 2, wherein, the adaptability of each edge node in performing the task in terms of latency, including: query a detection value of each edge node in performing a health probe in terms of latency; the health probe is of another task of the same type as the current task; map the detection value to the adaptability of the edge node in performing the task in terms of latency; the adaptability is negatively related to the detection value.
6. The method according to any one of claims 1-5, characterized in that, the filtering of sample data related to the target index in the scheduling task table, the scheduling decision table and the execution result table, including: query the optimization result when the target index is last optimized; if the optimization result is optimization success, filter sample data related to the target index in the scheduling task table, the scheduling decision table and the execution result table, with a first data amount; if the optimization result is optimization failure, filter sample data related to the target index in the scheduling task table, the scheduling decision table and the execution result table, with a second data amount; wherein the first data amount is less than the second data amount.
7. The method according to any one of claims 1-5, characterized in that, the calling of the large language model to adjust the scheduling strategy according to the sample data and the target index, including: statistically determine a first historical index value of the sample data under the target index; optimize the first historical index value to a target index value; use the sample data and the target index value to construct a prompt word; input the prompt word into the large language model to generate suggestion information for the scheduling strategy; adjust the scheduling strategy according to the suggestion information; if the adjustment is completed, perform a contrast test on the scheduling strategy to obtain a test result; generate an optimization result for the scheduling strategy according to the test result.
8. The method of claim 7, wherein, the generation of an optimization result for the scheduling strategy according to the test result, including: determine an associated index related to the target index; statistically determine a second historical index value of the sample data under the associated index; in the test result, statistically determine a first test index value under the target index and a second test index value under the associated index for the scheduling strategy before adjustment, and a third test index value under the target index and a fourth test index value under the associated index for the scheduling strategy after adjustment; if a target optimization condition and an associated maintenance condition are met, determine that the optimization result of the scheduling strategy is optimization success; if the target optimization condition or the associated maintenance condition is not met, determine that the optimization result of the scheduling strategy is optimization failure; wherein the target optimization condition is that the third test index value is within the fluctuation range of the target index value, and the third test index value is better than the first test index value; the associated maintenance condition is that the fourth test index value is within the fluctuation range of the second historical index value, and the fourth test index value is within the fluctuation range of the second test index value.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The computer program is executed by the processor to implement the task scheduling optimization method in any one of claims 1-8.
10. A computer-readable storage medium storing a computer program, the computer-readable storage medium comprising: The computer program is executed by the processor to implement the task scheduling optimization method in any one of claims 1-8.