Resource scheduling method, device, program product and storage medium

By using the decision-making network model in the edge computing platform to automatically learn and optimize resource scheduling decisions, it solves the problem of low efficiency of resource scheduling in complex scenarios in the existing technology, achieves efficient resource utilization and timely service execution, and reduces communication delays. .

CN118916180BActive Publication Date: 2025-01-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411379987.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The existing resource scheduling methods are difficult to achieve efficient resource utilization and timely service execution in complex and changeable edge computing scenarios, and are prone to causing communication delay problems.

Method used

By obtaining the resource remaining information of the edge node and the resource request information of the edge service, the edge service request vector and the edge node information vector are generated, and input into the decision network model to automatically learn and optimize the scheduling decision to select the optimal edge node Allocate resources.

Benefits of technology

It achieves efficient resource utilization and timely execution of services, reduces communication delays, and improves the overall performance of the edge computing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916180B_ABST
    Figure CN118916180B_ABST
Patent Text Reader

Abstract

The present invention discloses a resource scheduling method, device, program product and storage medium, which are applied to the field of cloud computing to solve the problems of communication delay and unreasonable resource allocation. By obtaining the remaining resource information of the edge node and the resource request information of the edge service, an edge service request vector and an edge node information vector are generated respectively. The vector covers the number, type, submission time, priority and preset execution time of resources, etc., to ensure a comprehensive understanding of the current resource demand and edge node capabilities; the vector is input into the decision network model, and the model automatically learns and optimizes scheduling decisions based on environmental factors, thereby selecting the optimal edge node. The present application does not rely on fixed rules and preset formulas, has adaptability and flexibility, can effectively cope with complex and changeable scenarios, ensures efficient resource utilization and timely execution of services, reduces communication delays and improves the overall performance of the edge computing platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing, and in particular to a resource scheduling method, device, program product and storage medium. Background Art

[0002] With the rapid development of cloud computing technology, terminals such as mobile devices can access a large amount of computing resources through cloud data centers. However, this centralized computing model inevitably causes communication delay problems in some scenarios, especially when a large amount of data needs to be transmitted from the terminal to a remote data center. In order to solve this problem, the concept of edge computing came into being. Edge computing is a decentralized computing architecture that migrates the computing tasks of applications, data, and services from central nodes to edge nodes closer to data sources or users for processing, reducing communication delays. In an edge computing environment, resources are diverse and complex, so it is crucial to select appropriate edge nodes and allocate resources reasonably, and an efficient scheduling strategy is crucial to the performance of the edge computing platform.

[0003] The existing resource scheduling methods mainly use heuristic decision scheduling methods. Among them, the heuristic scheduling method is based on human experience and domain knowledge. Through the formulation of rules, the system can make decisions quickly. This method relies on preset calculation formulas and factor adjustments, and it is difficult to cope with complex and changing scenarios. Summary of the invention

[0004] The purpose of the present invention is to provide a resource scheduling method, device, program product and storage medium that do not rely on fixed rules and preset formulas, have adaptability and flexibility, can effectively cope with complex and changeable scenarios, ensure efficient resource utilization and timely execution of services, reduce communication delays and improve the overall performance of the edge computing platform.

[0005] On the one hand, the present application provides a resource scheduling method, which is applied to an edge computing cluster server, and the edge computing cluster server is communicatively connected to all edge nodes. The resource scheduling method includes: obtaining resource remaining information of all the edge nodes, and obtaining resource request information of all edge services received by itself, the resource request information including resource quantity, resource type, submission time, priority and preset execution time of the edge service; generating an edge service request vector according to the resource request information of all the edge services, and generating an edge node information vector according to the resource remaining information of all the edge nodes; inputting the edge service request vector and the edge node information vector into a decision network model to determine the optimal edge node; allocating resources to the edge service according to the resource remaining information of the optimal edge node and the resource request information of the edge service.

[0006] Wherein, the edge service request vector and the edge node information vector are input into the decision network model to determine the optimal edge node, including: inputting the edge service request vector and the edge node information vector into the policy network, the policy network at least includes a plurality of multi-layer perceptrons and a timing feature learning network connected in sequence, the timing feature learning network includes a long short-term memory network and a residual network, and the decision network model includes the policy network; using a plurality of the multi-layer perceptrons to learn the static features of the edge service, and using the timing feature learning network to learn the timing features in the edge service, to determine the probability of each edge node being the optimal edge node; determining the optimal edge node according to the probability.

[0007] Among them, after determining the optimal edge node according to the probability, it also includes: determining the expected start execution time of the edge service when allocating the resources of the optimal edge node to the edge service; determining the predicted reward value of the event of allocating the resources of the optimal edge node to the edge service according to the resource request information of the edge service, the expected start execution time, and a preset reward function; determining the expected reward value of the event of allocating the resources of the optimal edge node to the edge service according to the value network in the decision network model, the value network includes at least several convolutional layers, and the decision network model also includes the policy network; updating and adjusting the network parameters of the policy network according to the predicted reward value and the expected reward value.

[0008] Wherein, the expression of the preset reward function is: , where r i =-(T e -T S )× ; R is the predicted reward value accumulated over N actions, r i is the single reward for the ith action, is the discount factor of the reward corresponding to the ith action, which is related to the number of iterations, N is the number of edge services, i is an integer between 1 and N, i indicates that the currently executed action is the ith one, and the action is the process of allocating the resources of the optimal edge node to the edge service, T e is the execution start time, T S The submission time for the edge service, is the attenuation factor, The priority of the edge service and the actual waiting time are determined, where the actual waiting time is the difference between the start execution time and the submission time.

[0009] Wherein, updating and adjusting the network parameters of the policy network according to the predicted reward value and the expected reward value includes: determining the difference between the predicted reward value and the expected reward value according to the predicted reward value and the expected reward value and a preset formula; updating and adjusting the network parameters of the policy network according to the difference; the preset formula is: ; i means the currently executed action is the i-th one, i' means the currently executed action is the i'th one, i'>i, a i represents the i-th action, which is the process of allocating the resources of the optimal edge node to the edge service, x i Indicates the state corresponding to executing the i-th action, For state x i Next, perform action a i The difference between the predicted reward value and the expected reward value corresponding to the time, r i is the single reward for the ith action, Indicates that action a is executed in the current state i The predicted reward value obtained after is the state value function of the value network, representing the value based on the current state x i and the expected reward value determined by the network parameters of the current policy network.

[0010] Among them, allocating resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service includes: taking the optimal edge node determined in any iterative process of updating and adjusting the network parameters of the policy network as the final allocated edge node; allocating resources to the edge service according to the remaining resource information of the final allocated edge node and the resource request information of the edge service.

[0011] Among them, after allocating resources to the edge service according to the resource remaining information of the optimal edge node and the resource request information of the edge service, it also includes: judging whether the resources of the optimal edge node after being allocated to the edge service are greater than the minimum resource threshold; if greater than, re-entering the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node; if not greater than, deleting the optimal edge node from all the edge nodes, and re-entering the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node.

[0012] Among them, when the number of all the edge nodes is a set number, an edge node information vector is generated according to the resource remaining information of all the edge nodes, including: determining whether there are edge nodes among all the edge nodes whose resources are less than the minimum resource threshold; if so, eliminating the edge nodes whose resources are less than the minimum resource threshold, and using empty nodes to replace the edge nodes whose resources are less than the minimum resource threshold; generating an edge node information vector according to the edge nodes whose resources are not less than the minimum resource threshold and the empty nodes, and the sum of the number of edge nodes whose resources are not less than the minimum resource threshold and the empty nodes is the set number.

[0013] Among them, generating an edge service request vector according to the resource request information of all the edge services includes: screening all the edge services according to pre-set screening requirements and the resource request information of all the edge services; determining the edge service that meets the screening requirements as the target edge service, and generating the edge service request vector according to the resource request information of the target edge service.

[0014] Among them, all the edge services are screened according to the pre-set screening requirements and the resource request information of all the edge services, including: dividing all the edge services into a plurality of groups according to the number; determining the intra-group metric value according to the resource request information of each group of the edge services; screening the edge services in each group according to the intra-group metric value to determine the target edge service; generating the edge service request vector according to the resource request information of the target edge service.

[0015] Among them, determining the intra-group metric value according to the resource request information of each group of edge services, including: determining the average waiting time in the group according to the request time and the expected execution time of each edge service in each group, the average waiting time=the sum of the expected waiting time of each edge service in the group / the number of edge services in the group, the expected waiting time is the difference between the expected execution time and the submission time, and the intra-group metric value is the average waiting time; screening the edge services in each group according to the intra-group metric value to determine the target edge service, including: screening the edge services in each group according to the expected waiting time of each edge service and the average waiting time to determine the target edge service.

[0016] Among them, the edge services in each group are screened according to the estimated waiting time and the average waiting time of each edge service to determine the target edge service, including: calculating the difference between the estimated waiting time and the average waiting time of each edge service; and determining the edge service corresponding to the difference being less than a set maximum threshold and greater than a set minimum threshold as the target edge service.

[0017] On the other hand, the present application provides a resource scheduling device, including: a memory for storing a computer program; a processor for implementing the steps of the resource scheduling method described above when executing the computer program.

[0018] On the other hand, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the resource scheduling method described above when executed by a processor.

[0019] On the other hand, the present application provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the resource scheduling method as described above are implemented.

[0020] The present invention provides a resource scheduling method, device, program product and storage medium, which are applied to the field of edge services to solve the problems of communication delay and unreasonable resource allocation. By obtaining the remaining resource information of the edge node and the resource request information of the edge service, an edge service request vector and an edge node information vector are generated respectively. The vector covers the number, type, submission time, priority and preset execution time of resources, etc., to ensure a comprehensive understanding of the current resource demand and edge node capabilities; the vector is input into the decision network model, and the model automatically learns and optimizes scheduling decisions based on environmental factors, thereby selecting the optimal edge node. The present application does not rely on fixed rules and preset formulas, has adaptability and flexibility, can effectively cope with complex and changeable scenarios, ensures efficient resource utilization and timely execution of services, reduces communication delays and improves the overall performance of the edge computing platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flow chart of a resource scheduling method provided by the present invention;

[0023] Figure 2 A schematic diagram of a strategy network provided by the present invention;

[0024] Figure 3 A schematic diagram of a value network provided by the present invention;

[0025] Figure 4 A specific flow chart of a resource scheduling method provided by the present invention;

[0026] Figure 5 A schematic diagram of a resource scheduling device provided by the present invention;

[0027] Figure 6 A schematic diagram of a non-volatile storage medium provided by the present invention. DETAILED DESCRIPTION

[0028] The core of the present invention is to provide a resource scheduling method, device, program product and storage medium, which do not rely on fixed rules and preset formulas, are adaptable and flexible, can effectively cope with complex and changeable scenarios, ensure efficient resource utilization and timely execution of services, reduce communication delays and improve the overall performance of the edge computing platform.

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

[0030] On the one hand, if Figure 1 As shown, the present application provides a resource scheduling method, which is applied to an edge computing cluster server, where the edge computing cluster server is connected to all edge nodes in communication, and the resource scheduling method includes:

[0031] S11: Obtain the remaining resource information of all edge nodes, and obtain the resource request information of all edge services received by itself, the resource request information includes the resource quantity, resource type, submission time, priority and preset execution time of the edge service.

[0032] In this step, by obtaining the remaining resource information of all edge nodes and the resource request information of edge services, data support is provided for subsequent scheduling decisions. First, the remaining resource information of edge nodes refers to the available resources currently available at each edge node, including but not limited to computing power, storage space, bandwidth, etc. By communicating with all edge nodes, the cluster server can obtain these remaining resource information of each node in real time to ensure a complete node status view when allocating resources. At the same time, the cluster server will also receive resource request information from multiple edge services, including the number and type of resources required for the service request, such as CPU (Central Processing Unit), memory, etc. The submission time indicates when the service initiates the request, the priority is used to distinguish the importance of different edge services, and the preset execution time is used to indicate the expected execution time of the service.

[0033] These information together constitute the basic demand characteristics of the service request, laying the foundation for the subsequent generation of the service request vector and node information vector. By comprehensively collecting this information, we can accurately describe the resource supply and demand status of the current system, provide an accurate basis for subsequent resource allocation and scheduling, and ensure the reasonable allocation of resources and efficient execution of services in a complex edge computing environment.

[0034] As a preferred embodiment, resource request information of all edge services received by itself is obtained, including: obtaining the resource quantity, resource type and submission time of all edge services, evaluating the edge services, determining the priority of the edge services according to the evaluation results, and determining the preset execution time of the edge services according to the evaluation results and the submission time.

[0035] In this preferred embodiment, obtaining resource request information for all edge services includes comprehensively evaluating and processing the resource requirements of edge services in order to better optimize resource allocation. First, by obtaining the number and type of resources for each edge service, the specific resources required by each service, such as CPU, memory, bandwidth, etc., are clarified, which lays the foundation for subsequent resource matching. Next, the submission time of each edge service is recorded to reflect the time point when the service initiates the request. The submission time can be used to judge the urgency and time sensitivity of the service. After obtaining these basic information, each edge service is evaluated, and the evaluation may be based on a series of factors, such as the urgency of resource requirements, the importance of tasks, and the impact of services on overall system performance. By combining these factors, a priority is assigned to each edge service, so that key tasks are prioritized in resource shortages or competition. In addition to the priority, the preset execution time of each service is calculated based on the evaluation results and the submission time. The preset execution time takes into account the complexity, resource requirements, and urgency of the task, ensuring that the execution order and duration of the task can be reasonably arranged when resources are allocated. This comprehensive evaluation mechanism can not only accurately identify the resource requirements of services, but also provide a strong basis for resource scheduling, ensuring that resources are allocated first to important and urgent services, and improving the efficiency and response speed of the overall computing platform.

[0036] S12: Generate an edge service request vector according to the resource request information of all edge services, and generate an edge node information vector according to the resource surplus information of all edge nodes.

[0037] In this step, the resource request information of the edge service and the resource surplus information of the edge node are converted into an edge service request vector and an edge node information vector respectively, which are important data inputs for the subsequent decision network model to analyze and optimize. First, the generation of the edge service request vector is based on the collected resource request information, including the number of resources, resource type, submission time, priority, and preset execution time. This information is structured to form a vector, in which each dimension represents a certain type of specific information, such as the demand for CPU and memory, the urgency of the service, etc. Through this vectorization processing, the complex requirements of the edge service are simplified into feature expressions in the mathematical model, providing standardized data input for subsequent calculations. Similarly, the edge node information vector is generated based on the resource surplus information of each edge node, reflecting the current available resource status of each node, such as the remaining computing power, storage space, and bandwidth. By structuring the resource information of these nodes into vectors, the status of each node is also converted into standardized data that can be processed by the decision model. For example, the identifier of the edge service request vector is , , A is the length of the vector, and B is the number of features requested by the edge service.

[0038] This vectorized processing not only improves data processing efficiency, but also ensures the complete expression of information in different dimensions, enabling subsequent decision-making network models to comprehensively analyze the demand for edge services and the supply of edge nodes, thereby providing support for optimal resource allocation.

[0039] S13: Input the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node.

[0040] S14: Allocate resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service.

[0041] In this step, the core of the resource scheduling method is to input the generated edge service request vector and edge node information vector into the decision network model, and then determine the optimal edge node and complete resource allocation. This process relies on the powerful computing power and adaptability of the decision network model. By analyzing the input service request and node information, the model can comprehensively consider various factors, such as the resource requirements, priority, execution time of the service, and the available resources and load of each node. After receiving these vectors, the decision network model optimizes the calculation through the trained algorithm. The model may use deep learning or other machine learning technologies, combined with a large amount of historical data and environmental factors, to effectively predict and evaluate the effects of different resource allocation strategies, so as to make the best decision.

[0042] Through this intelligent decision-making process, the model can dynamically select the edge node that best suits the current task, ensuring efficient use of resources. After determining the optimal edge node, the scheduling system matches the resource surplus information of the node with the resource requirements of the service request, thereby allocating appropriate computing resources to the edge service. This not only improves resource utilization, but also effectively reduces computing latency, ensuring the overall performance and service quality of the edge computing platform.

[0043] Based on the above embodiments:

[0044] As a preferred embodiment, the edge service request vector and the edge node information vector are input into the decision network model to determine the optimal edge node, including: inputting the edge service request vector and the edge node information vector into the policy network, the policy network at least includes a plurality of multi-layer perceptrons and a timing feature learning network connected in sequence, the timing feature learning network includes a long short-term memory network and a residual network, and the decision network model includes a policy network; using a plurality of multi-layer perceptrons to learn the static features of the edge service, and using the timing feature learning network to learn the timing features in the edge service, and determining the probability of each edge node being the optimal edge node; determining the optimal edge node according to the probability.

[0045] In the preferred embodiment, the edge service request vector and the edge node information vector are input into the decision network model, which determines the optimal edge node through the policy network. Figure 2 As shown in the figure, the policy network consists of several sequentially connected multilayer perceptrons (MLP) and a temporal feature learning network, which includes a long short-term memory network (LSTM) and a residual network. This network architecture is designed to make full use of static and temporal features to improve the accuracy of decision-making.

[0046] First, the multi-layer perceptron is responsible for learning the static features of edge services. Static features include the number of resources, types, submission time, priority, etc. of the service, which do not change over time. Through the layer-by-layer processing of the multi-layer perceptron, the network can extract useful feature representations from these static inputs to ensure a full understanding of service resource requirements and node resource status.

[0047] Next, the time series feature learning network processes the time series features. Time series features refer to dynamic information related to time, such as the arrival order of service requests and the dynamic changes of node resources. The long short-term memory network (LSTM) can capture the dependencies in these time series through its internal memory units, and is particularly suitable for dealing with long-term dependency problems. The residual network solves the problem of gradient disappearance or explosion in deep networks through jump connections, making the network more stable and efficient when processing time series information.

[0048] Through comprehensive learning of static and temporal features, a probability value of each edge node as the optimal node is calculated. These probabilities represent the degree of adaptation of each node to the service request under the current conditions. Finally, the system selects the optimal edge node for resource allocation based on these probability values, ensuring the maximization of resource utilization and optimization of service performance in a complex and changing edge computing environment.

[0049] As a preferred embodiment, after determining the optimal edge node according to probability, it also includes: determining the expected start execution time of the edge service when allocating the resources of the optimal edge node to the edge service; determining the predicted reward value of the event of allocating the resources of the optimal edge node to the edge service according to the resource request information of the edge service, the expected start execution time, and the preset reward function; determining the expected reward value of the event of allocating the resources of the optimal edge node to the edge service according to the value network in the decision network model, the value network includes at least several convolutional layers, and the decision network model also includes a value network; updating and adjusting the network parameters of the policy network according to the predicted reward value and the expected reward value.

[0050] In this embodiment, after determining the optimal edge node, the resource allocation process is further optimized. First, based on the current resource status of the optimal edge node and the needs of the edge service, the expected start execution time of the edge service is calculated. This step ensures that the time planning of task execution is coordinated with resource allocation, so that resources can be effectively used at the right time. Next, based on the resource request information of the edge service, the calculated expected start execution time, and the preset reward function, the predicted reward value of the allocation event is calculated. The preset reward function is used to quantify the effectiveness of edge node resource allocation, and factors usually considered include resource utilization efficiency, task execution delay, node load balancing, etc. The predicted reward value represents the system benefit expected to be brought after allocating resources.

[0051] At the same time, the expected reward value of the event is calculated through the value network in the decision network model. Figure 3As shown in the figure, the value network uses several convolutional layers to deeply learn and extract input features, and evaluate the long-term impact of allocating resources and overall system performance under given conditions. Convolutional layers are good at processing spatial and local features. By learning edge node status and service request information, the value network can provide a more comprehensive system status assessment and help the model make more intelligent decisions.

[0052] Finally, the predicted reward value is compared with the expected reward value, and the parameters of the policy network are adjusted according to the difference. This adjustment is completed through an optimization process, with the aim of making the output of the policy network closer to the actual system benefit, thereby continuously improving the accuracy of decision-making and the efficiency of resource scheduling. Through this feedback mechanism, the policy network can self-learn and improve in a dynamic environment, ensuring that the edge computing platform achieves optimal resource utilization and service quality under complex conditions.

[0053] As a preferred embodiment, the expression of the preset reward function is: , where r i =-(T e -T S )× ; R is the predicted reward value accumulated over N actions, r i is the single reward for the ith action, is the discount factor of the reward corresponding to the ith action, which is related to the number of iterations. N is the number of edge services. i is an integer between 1 and N. i indicates that the currently executed action is the ith one. The action is the process of allocating the resources of the optimal edge node to the edge service. T e is the start time of execution, T S Submission time for edge services, is the attenuation factor, It is determined based on the priority of the edge service and the actual waiting time, where the actual waiting time is the difference between the start execution time and the submission time.

[0054] As a preferred embodiment, updating and adjusting the network parameters of the policy network according to the predicted reward value and the expected reward value includes: determining the difference between the expected actual reward value and the predicted reward value according to the predicted reward value, the expected reward value and a preset formula; updating and adjusting the network parameters of the policy network according to the difference; the preset formula is: ; i means the currently executed action is the i-th one, i' means the currently executed action is the i'th one, i'>i, a i represents the i-th action, which is the process of allocating the resources of the optimal edge node to the edge service. i Indicates the state corresponding to executing the i-th action, For state x i Next, perform action a iThe difference between the predicted reward value and the expected reward value corresponding to the time, r i is the single reward for the ith action, Indicates that action a is executed in the current state i The predicted reward value obtained after The state value function of the value network represents the value of the current state x. i and the expected reward value determined by the network parameters of the current policy network.

[0055] In this embodiment, in the preset reward function, is the decay factor, whose value is determined by the priority of the service and the actual waiting time, and is used to adjust the weight of different services under delay conditions. According to this formula, the longer the waiting time of the service, the more negative the reward value, indicating that this resource allocation method is less effective. At the same time, is the reward discount factor, which is related to the number of iterations and indicates the degree of attenuation of the reward at each step. N is the total number of services, and is calculated by accumulating the single reward value r of each service. i To calculate the total reward R.

[0056] The system makes adjustments based on a preset formula for the difference between the predicted reward value R and the expected reward value. This formula ensures that the policy network can be updated in a timely manner at each decision step. By comparing the expected actual reward value with the predicted reward value, the difference can be calculated to guide the parameter update of the policy network. This update process is based on the error feedback mechanism in reinforcement learning. The larger the difference, the greater the deviation between the policy network's prediction and the actual situation, so a larger parameter adjustment will be made, and vice versa. This optimization mechanism is achieved by adjusting the value network state value function V(x i ) allows the network to continuously optimize its decision-making process. The value network processes spatial and local features through convolutional layers to evaluate the state x i Next, perform action a i The long-term benefits make each resource allocation decision more reasonable and efficient.

[0057] Through this optimization process, the accuracy of the policy network can be gradually improved, so that the predicted reward value of edge node resource allocation gradually approaches the actual system benefit, thereby ensuring that the overall performance and service responsiveness of the edge computing platform are continuously optimized.

[0058] As a preferred embodiment, resources are allocated to edge services based on the remaining resource information of the optimal edge node and the resource request information of the edge service, including: taking the optimal edge node determined in any iterative process of updating and adjusting the network parameters of the policy network as the final allocated edge node; and allocating resources to the edge service based on the remaining resource information of the final allocated edge node and the resource request information of the edge service.

[0059] In this embodiment, the key to the resource allocation process is how to use the output results of the policy network to determine the final edge node allocation. Specifically, the policy network continuously updates its network parameters through multiple iterations during the training process to optimize resource scheduling decisions. During these iterative processes, the policy network generates different edge nodes as possible optimal edge nodes. Finally, the optimal edge node after the network parameters of the policy network are updated and adjusted is determined as the final allocated edge node, which is usually performed after the iterative process reaches the preset end condition. This method ensures that the resource allocation decision is based on the latest network optimization results, thereby improving the accuracy of the decision and the system performance.

[0060] On the other hand, in the real-time iteration process, the optimal edge node output by the current iteration can be used as the final allocation node. This real-time processing method can quickly respond to dynamically changing service requests and node states, reducing waiting time and potentially improving the system's response speed.

[0061] Regardless of the method, the final resource allocation is based on the resource remaining information of the optimal edge node and the resource request information of the edge service. After determining the final allocated edge node, the system will make specific resource allocations based on the current resource status of the node and the demand for edge services. This approach ensures the rational use of resources and efficient execution of services, whether through complete iterative optimization or real-time dynamic adjustment, to improve the overall performance and resource utilization efficiency of the edge computing platform.

[0062] As a preferred embodiment, after allocating resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service, it also includes: judging whether the resources of the optimal edge node after being allocated to the edge service are greater than the minimum resource threshold; if greater than, re-entering the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node; if not greater than, deleting the optimal edge node from all edge nodes, and re-entering the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node.

[0063] In this embodiment, the system also includes a resource validity check mechanism after resource allocation to ensure the rationality of resource allocation and the continued validity of edge nodes. Specifically, after allocating resources to edge services, it is first checked whether the remaining resources of the optimal edge node after resource allocation are higher than the preset minimum resource threshold. This threshold is set to ensure that each edge node still has sufficient remaining resources after resource allocation to maintain its normal operation and the processing capacity of other potential tasks.

[0064] If the remaining resources of the optimal edge node after resource allocation are greater than the minimum resource threshold, it means that the node still has enough resources to cope with future tasks after processing the current edge service. Therefore, it will re-enter the decision-making process, input the edge service request vector and the edge node information vector into the decision network model, and re-determine the optimal edge node. This process aims to further improve the efficiency of resource allocation and service quality through continuous optimization decisions, ensuring that the best resource configuration can be continuously provided under changing resource requirements and environmental conditions.

[0065] If the remaining resources of the optimal edge node after resource allocation are less than or equal to the minimum resource threshold, it means that the resources of the node are close to saturation after processing the current service and cannot effectively support additional tasks. At this time, in order to avoid overuse of resources of a single node and ensure the fairness and efficiency of resource allocation, the optimal edge node will be deleted from all edge nodes, and the edge service request vector and edge node information vector will be re-input into the decision network model to re-determine the optimal edge node.

[0066] Through this mechanism, the system can eliminate nodes with insufficient resources, re-optimize resource allocation, and avoid service quality degradation or system performance problems caused by insufficient resources, thereby maintaining the efficiency and stability of the entire edge computing platform.

[0067] As a preferred embodiment, when the number of all edge nodes is a set number, an edge node information vector is generated based on the resource remaining information of all edge nodes, including: determining whether there are edge nodes among all edge nodes whose resources are less than a minimum resource threshold; if so, eliminating the edge nodes whose resources are less than the minimum resource threshold, and using empty nodes to replace the edge nodes whose resources are less than the minimum resource threshold; generating an edge node information vector based on edge nodes whose resources are not less than the minimum resource threshold and empty nodes, wherein the sum of the number of edge nodes whose resources are not less than the minimum resource threshold and the number of empty nodes is the set number.

[0068] In this embodiment, in order to ensure that the edge node information vector can meet the unified requirements of the model input, the resource information of the edge nodes needs to be processed first to meet the set number of nodes. In this process, all edge nodes will first be checked to see if they have resources below the preset minimum resource threshold. If it is found that the resources of any edge node are below this threshold, these nodes will be removed from the actual resource information. The purpose of this step is to exclude those nodes with insufficient resources to prevent them from affecting subsequent resource scheduling decisions.

[0069] In order to ensure that the number of edge nodes input to the model is consistent with the set standard number, these edge nodes with insufficient resources are replaced with "empty nodes" (empty nodes and vectors of all 0s). Empty nodes do not participate in the calculation in actual resource allocation, but they act as placeholders when inputting into the decision network model to ensure that the dimension and number of input data remain consistent. This processing method can effectively solve the problem of inconsistent node numbers, allowing the model to process a fixed number of node inputs, thereby maintaining the stability and consistency of the model.

[0070] Next, the edge nodes with resources not less than the minimum resource threshold and the empty nodes are combined to generate an edge node information vector. The dimension of this vector matches the set number, where the edge nodes with resources not less than the minimum resource threshold provide actual resource information, while the empty nodes fill the node number requirement.

[0071] This embodiment ensures that the edge node information vector meets the input requirements of the model in terms of quantity, while excluding low-resource nodes that may have a negative impact on system performance and decision quality, thereby improving the efficiency and accuracy of the overall scheduling system.

[0072] As a preferred embodiment, an edge service request vector is generated according to the resource request information of all edge services, including: screening all edge services according to pre-set screening requirements and the resource request information of all edge services; determining the edge service that meets the screening requirements as the target edge service, and generating the edge service request vector according to the resource request information of the target edge service.

[0073] In this embodiment, in order to generate an edge service request vector, the resource request information of all edge services is first screened to ensure that the vector finally generated contains only service information related to actual needs. The first step in this process is to evaluate all edge services using pre-set screening requirements. Screening requirements typically include key factors such as the resource requirements of the service, the priority of the request, and the expected execution time. These requirements are used to determine which service requests the current system needs to focus on, ensuring that only service information that meets specific criteria is included in further processing.

[0074] After screening, edge services that meet these requirements are identified as target edge services. Target edge services refer to service requests that have actual scheduling value in the current environment, and whose resource requirements and scheduling requirements meet the preset standards of the system. This step not only optimizes the calculation process, but also enables subsequent resource allocation decisions to focus on service requests with the most actual needs, thereby improving scheduling efficiency and resource utilization.

[0075] Finally, an edge service request vector is generated based on the resource request information of these target edge services. This vector contains detailed resource demand data for each target edge service, including resource type, quantity, service priority, etc.

[0076] This approach ensures that the generated edge service request vector can accurately reflect the most important service requirements in the current system, and provides a structured data input form for further analysis and processing by the decision network model. In this way, the system can more effectively concentrate resources to handle key services and improve the performance and response speed of the overall scheduling system.

[0077] As a preferred embodiment, all edge services are screened according to pre-set screening requirements and resource request information of all edge services, including: dividing all edge services into several groups according to the number; determining the intra-group metric value according to the resource request information of each group of edge services; screening the edge services in each group according to the intra-group metric value to determine the target edge service; generating an edge service request vector according to the resource request information of the target edge service.

[0078] In this embodiment, in order to efficiently generate edge service request vectors, all edge services are first systematically processed through preset screening requirements. The first step of this process is to divide all edge services into several groups according to the number. This grouping method can decompose a large number of edge services into smaller and more manageable subsets based on the request characteristics of the service or other relevant parameters, thereby simplifying the subsequent screening and processing process.

[0079] Next, the edge services in each group are measured to determine the metric values ​​for each group. These metric values ​​can include indicators such as the total resource demand of the service, the average level of request priority, and the time urgency of the request, which are used to measure the overall importance or resource consumption of the services in the group. By calculating the metric values ​​within the group, the overall requirements and characteristics of each group of edge services can be quantified, providing a basis for subsequent screening.

[0080] Then, based on the intra-group metric values, the edge services in each group are screened to select the target edge services that meet the set requirements. The screening criteria may include the resource request volume, priority, expected execution time, etc. of the service. These criteria help the system prioritize those service requests that best meet the actual scheduling requirements. Finally, the resource request information of the target edge services is aggregated to generate an edge service request vector.

[0081] This vector contains key resource demand data extracted from the target edge service, ensuring that the information input into the model is filtered and processed and highly relevant to the current scheduling task. In this way, the most critical service requests can be quickly and accurately identified among a large number of edge services, resource allocation decisions can be optimized, and the overall efficiency and responsiveness of the system can be improved.

[0082] As a preferred embodiment, the intra-group metric value is determined according to the resource request information of each group of edge services, including: determining the average waiting time in the group according to the request time and the expected execution time of each edge service in each group, the average waiting time = the sum of the expected waiting time of each edge service in the group / the number of edge services in the group, the expected waiting time is the difference between the expected execution time and the submission time, and the intra-group metric value is the average waiting time; the edge services in each group are screened according to the intra-group metric value to determine the target edge service, including: screening the edge services in each group according to the expected waiting time and the average waiting time of each edge service to determine the target edge service.

[0083] In this embodiment, in order to effectively screen out important edge services and generate the final edge service request vector, it is first necessary to calculate the metric value within the group based on the resource request information of each group of edge services. The core of this process is to evaluate the urgency and processing priority of the service request through the waiting time information of the edge services within the group.

[0084] Specifically, the average waiting time for each group of edge services is first calculated. To obtain this metric, the expected waiting time for each edge service needs to be determined, which is calculated by the difference between the expected execution time and the submission time. The expected waiting time reflects the time interval between the submission of the service and the expected start of execution. Then, the expected waiting time of all edge services in the group is summed up and divided by the total number of edge services in the group to obtain the average waiting time for the group. The average waiting time provides information about the overall latency of service requests within a group, helping the system understand the time requirements of service requests for the entire group.

[0085] Next, based on the calculated intra-group metrics, the edge services in each group are screened to determine which service requests should be prioritized. The specific screening criteria include comparing the expected waiting time of each edge service with the average waiting time of the group. In this way, the target edge services that need to be prioritized can be identified in each service group, ensuring that the requests that need the most timely response can be focused on during actual resource allocation, improving the overall efficiency and service quality of the scheduling system.

[0086] As a preferred embodiment, the edge services in each group are screened according to the expected waiting time and the average waiting time of each edge service to determine the target edge service, including: calculating the difference between the expected waiting time and the average waiting time of each edge service; and determining the edge service corresponding to the difference less than a set maximum threshold and greater than a set minimum threshold as the target edge service.

[0087] In this embodiment, in order to accurately screen the target edge services, the estimated waiting time of each edge service is compared with the average waiting time in the group to ensure that the selected service request can reflect the actual time requirement and meet the set screening criteria. The specific process includes calculating the difference between the estimated waiting time of each edge service and the average waiting time in the group. The estimated waiting time is the time interval between the submission and the estimated execution of each service, and the average waiting time is the average of the waiting time of all service requests in the group.

[0088] The calculated difference reflects the average waiting time of each edge service relative to other services in the group. A larger difference means that the waiting time of the service is significantly longer than other services in the group, which may indicate that the service request has a higher time urgency; a smaller difference means that the waiting time is relatively average and the urgency is lower. In order to ensure that the filtered service requests can help the reinforcement learning model learn and optimize the scheduling strategy more effectively, the specific method can be to compare these differences with the set maximum and minimum thresholds to ensure that only those service requests that have a certain urgency in time requirements and contribute more to model learning are selected. This helps to filter out requests with extremely short or too long waiting times, ensuring that the model focuses on requests that have a greater impact on scheduling decisions, thereby improving the effectiveness of learning.

[0089] Specifically, a maximum threshold and a minimum threshold are set to filter service requests whose differences are outside these ranges. Service requests whose differences are less than the set maximum threshold and greater than the set minimum threshold are identified as target edge services. The purpose of this screening mechanism is to filter out simple edge services (edge ​​services corresponding to differences less than the minimum threshold) and complex edge services (edge ​​services corresponding to differences greater than the maximum threshold). These simple edge services contribute little to the learning of the model in actual model training and do not provide effective information and experience, so they are directly filtered out; these complex edge services may be due to abnormal or unreasonable conditions in the service request itself (such as insufficient system resources). Such services may cause the model to deviate from the normal decision boundary during learning and contribute little to the learning of the model. By filtering out these unrepresentative service requests, the model can focus on learning those requests that have reasonable differences in time requirements and can effectively reflect the real situation. This will help the model capture more effective patterns and rules, thereby improving the optimization ability of the scheduling strategy.

[0090] It should be noted that the present invention can, but is not limited to, use the Shortest Job First (SJF) algorithm to calculate the difference in metric values ​​between groups. The core principle of the SJF algorithm is to give priority to jobs or services with the shortest expected execution time to minimize the overall waiting time. In the present invention, the SJF algorithm is applied to the scheduling of edge services by calculating the average waiting time of each group of edge services, and screening and determining the target edge services based on these times. The SJF algorithm is used for data preprocessing, and the training process is optimized by screening the data, thereby optimizing the response speed of the service.

[0091] After this data preprocessing, the remaining target edge service generation vectors are passed to the model for training, while the filtered data is directly used in the trained decision model for decision making. This approach not only simplifies the model training process, but also improves the performance and decision-making efficiency of the scheduling model.

[0092] like Figure 4 As shown, in a specific embodiment, the specific process of the above resource scheduling method is: first, information acquisition is performed to obtain the requested resource information of the edge service and the resource occupancy of the edge node, and then the data is preprocessed to screen out the edge services that do not meet the screening requirements; then resource scheduling and resource allocation are performed to determine the optimal edge node, and the resources of the optimal edge node are allocated to the edge service; after resource allocation, the resources of the optimal edge node are monitored.

[0093] On the other hand, Figure 5 As shown, the present application provides a resource scheduling device, including: a memory 11, used to store a computer program; a processor 12, used to implement the steps of the above-mentioned resource scheduling method when executing the computer program.

[0094] For an introduction to the resource scheduling device, please refer to the above embodiments, and this application is not limited thereto.

[0095] On the other hand, the present application provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned resource scheduling method when executed by a processor.

[0096] For an introduction to the computer program product, please refer to the above embodiments, and this application is not limited thereto.

[0097] On the other hand, Figure 6As shown, the present application provides a non-volatile storage medium 21, on which a computer program 22 is stored, and when the computer program 22 is executed by a processor, the steps of the resource scheduling method described above are implemented. For the introduction of the non-volatile storage medium 21, please refer to the above embodiment, and the present application is no longer limited here.

[0098] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0099] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A resource scheduling method, characterized in that: Applied to an edge computing cluster server, the edge computing cluster server is communicatively connected with all edge nodes, and the resource scheduling method includes: Obtaining resource remaining information of all edge nodes, and obtaining resource request information of all edge services received by itself, wherein the resource request information includes resource quantity, resource type, submission time, priority and preset execution time of the edge service; Generate an edge service request vector according to resource request information of all edge services, and generate an edge node information vector according to resource surplus information of all edge nodes; Inputting the edge service request vector and the edge node information vector into a decision network model to determine an optimal edge node; Allocate resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service; Inputting the edge service request vector and the edge node information vector into a decision network model to determine an optimal edge node includes: Inputting the edge service request vector and the edge node information vector into a policy network, wherein the policy network at least includes a plurality of multi-layer perceptrons and a time series feature learning network connected in sequence, wherein the time series feature learning network includes a long short-term memory network and a residual network, and the decision network model includes the policy network; Using a plurality of the multi-layer perceptrons to learn the static features of the edge service, and using the temporal feature learning network to learn the temporal features in the edge service, to determine the probability of each edge node being the optimal edge node; Determine the optimal edge node according to the probability; After determining the optimal edge node according to the probability, the method further includes: determining an expected start execution time of the edge service when allocating resources of the optimal edge node to the edge service; Determine, according to the resource request information of the edge service, the expected start execution time, and a preset reward function, a predicted reward value for an event of allocating resources of the optimal edge node to the edge service; Determine the expected reward value of the event of allocating the resources of the optimal edge node to the edge service according to the value network in the decision network model, the value network includes at least a plurality of convolutional layers, and the decision network model also includes the policy network; The network parameters of the policy network are updated and adjusted according to the predicted reward value and the expected reward value.

2. The resource scheduling method according to claim 1, characterized in that: The expression of the preset reward function is: ,in, r i =-( T e - T S )× ; R is the predicted reward value accumulated for N actions, r i is the single reward for the ith action, is the discount factor of the reward corresponding to the ith action, which is related to the number of iterations, N is the number of edge services, i is an integer between 1 and N, i indicates that the currently executed action is the i-th one, and the action is the process of allocating the resources of the optimal edge node to the edge service. T e is the execution start time, T S The submission time for the edge service, is the attenuation factor, The priority of the edge service and the actual waiting time are determined, where the actual waiting time is the difference between the start execution time and the submission time.

3. The resource scheduling method according to claim 1, characterized in that: Updating and adjusting the network parameters of the policy network according to the predicted reward value and the expected reward value includes: Determine the difference between the predicted reward value and the expected reward value according to the predicted reward value, the expected reward value and a preset formula; Updating and adjusting the network parameters of the strategy network according to the difference; The preset formula is: ; i means the currently executed action is the i-th one, i' means the currently executed action is the i'th one, i'>i, a i represents the i-th action, which is a process of allocating resources of the optimal edge node to the edge service, x i Indicates the state corresponding to executing the i-th action, For the status x i Next action a i The difference between the predicted reward value and the expected reward value corresponding to r i is the single reward for the ith action, Indicates that an action is performed in the current state a i The predicted reward value obtained after is the state value function of the value network, representing the current state x i and the expected reward value determined by the network parameters of the current policy network.

4. The resource scheduling method according to claim 1, characterized in that: Allocating resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service, including: The optimal edge node determined in any iterative process of updating and adjusting the network parameters of the policy network is used as the final allocation edge node; Resources are allocated to the edge service according to the remaining resource information of the finally allocated edge node and the resource request information of the edge service.

5. The resource scheduling method according to claim 1, characterized in that: After allocating resources to the edge service according to the remaining resource information of the optimal edge node and the resource request information of the edge service, the method further includes: Determine whether the resources of the optimal edge node after being allocated to the edge service are greater than a minimum resource threshold; If it is greater than, re-entering the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node; If not, the optimal edge node is deleted from all the edge nodes, and the step of inputting the edge service request vector and the edge node information vector into the decision network model to determine the optimal edge node is re-entered.

6. The resource scheduling method according to claim 1, characterized in that: When the number of all the edge nodes is the set number, an edge node information vector is generated according to the resource surplus information of all the edge nodes, including: Determine whether there is an edge node among all the edge nodes whose resources are less than a minimum resource threshold; If so, remove the edge nodes whose resources are less than the minimum resource threshold, and use empty nodes to replace the edge nodes whose resources are less than the minimum resource threshold; An edge node information vector is generated according to the edge nodes whose resources are not less than a minimum resource threshold and the empty nodes, and the sum of the number of edge nodes whose resources are not less than a minimum resource threshold and the empty nodes is the set number.

7. The resource scheduling method according to any one of claims 1 to 6, characterized in that: Generating an edge service request vector according to the resource request information of all the edge services includes: Screening all the edge services according to the preset screening requirements and the resource request information of all the edge services; An edge service that meets the screening requirement is determined as a target edge service, and the edge service request vector is generated according to resource request information of the target edge service.

8. The resource scheduling method according to claim 7, characterized in that: According to the preset screening requirements and the resource request information of all the edge services, all the edge services are screened, including: Dividing all the edge services into a plurality of groups according to the number; Determine a metric value within a group according to resource request information of each group of edge services; Screening the edge services in each group according to the intra-group metric values ​​to determine a target edge service; The edge service request vector is generated according to the resource request information of the target edge service.

9. The resource scheduling method according to claim 8, characterized in that: Determining a metric value within a group according to the resource request information of each group of edge services includes: Determine the average waiting time in the group according to the request time and the estimated execution time of each edge service in each group, the average waiting time=the sum of the estimated waiting time of each edge service in the group / the number of edge services in the group, the estimated waiting time is the difference between the estimated execution time and the submission time, and the metric value in the group is the average waiting time; The edge services in each group are screened according to the intra-group metric values ​​to determine a target edge service, including: The edge services in each group are screened according to the estimated waiting time of each edge service and the average waiting time to determine the target edge service.

10. The resource scheduling method according to claim 9, characterized in that: The edge services in each group are screened according to the estimated waiting time of each edge service and the average waiting time to determine the target edge service, including: Calculate the difference between the estimated waiting time of each edge service and the average waiting time; The edge service corresponding to the difference value being smaller than a set maximum threshold and larger than a set minimum threshold is determined as the target edge service.

11. A resource scheduling device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the resource scheduling method as described in any one of claims 1 to 10 when executing a computer program.

12. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the resource scheduling method described in any one of claims 1 to 10 are implemented.

13. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the resource scheduling method according to any one of claims 1 to 10 are implemented.

Citation Information

Patent Citations

  • Task scheduling method based on deep reinforcement learning in hierarchical edge computing environment

    CN113778648A