A cloud-edge resource scheduling method, system, device and medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TOWER CO LTD
- Filing Date
- 2026-06-25
- Publication Date
- 2026-08-07
AI Technical Summary
全连接网络无法有效捕捉长期依赖;而RNN存在梯度消失/爆炸问题,且难以并行化,训练效率低
本公开考虑了分布式计算任务中任务间的复杂依赖关系及边云环境的异构特性,以DAG任务描述(任务特征)及服务器特征作为模型输入,设计基于低秩投影注意力机制的深度强化学习模型,对任务调度决策过程进行高效学习与优化,实现对多目标加权代价的快速最小化;
Smart Images

Figure CN122534072A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of edge computing network technology, and in particular relates to a cloud-edge resource scheduling method, system, device and medium. Background Technology
[0002] With the rapid development of edge computing, fields such as smart homes, industrial IoT, and smart cities have generated massive demands for real-time data processing. While cloud computing centers possess powerful computing capabilities, the physical distance between them and terminal devices often results in high network latency, making it difficult to meet the millisecond-level response requirements of many edge computing applications (such as autonomous driving and real-time video analytics). To address this challenge, the edge-cloud collaborative computing paradigm has emerged, which moves computing, storage, and network resources from centralized cloud data centers to the network edge, processing edge data locally, thereby significantly reducing latency and saving bandwidth.
[0003] However, distributed computing resource scheduling in an edge-cloud collaborative environment is an extremely complex problem. First, distributed computing tasks typically consist of multiple dependent tasks, often modeled using directed acyclic graphs (DAGs), requiring strict constraints on task execution order during scheduling. Second, edge-cloud environments are highly heterogeneous, with significant differences between edge devices (such as embedded sensors, gateways, and edge servers) and cloud servers in terms of computing power, memory, energy consumption, and cost (pay-as-you-go vs. electricity consumption). Furthermore, the arrival of application requests and the availability of computing resources are dynamic and stochastic. This makes the IoT application scheduling problem essentially an NP-hard stochastic optimization problem, typically aiming to minimize conflicting objectives such as system response time, energy consumption, and monetary costs while meeting application completion deadlines.
[0004] Existing solutions to this problem mainly include heuristic rules, metaheuristic algorithms (such as genetic algorithms), and deep reinforcement learning methods. Among them, deep reinforcement learning shows great potential due to its ability to learn optimal strategies autonomously through trial and error in complex dynamic environments without prior knowledge. However, existing scheduling methods based on DRL (Deep Reinforcement Learning) still have significant shortcomings. The DAG structure of distributed computing and its scheduling in edge-cloud environments is a typical sequential decision problem, where the value of the current state is highly dependent on historical scheduling decisions. Many existing DRL schedulers use fully connected networks or recurrent neural networks to handle state sequences. Fully connected networks cannot effectively capture long-term dependencies; while RNNs suffer from the vanishing / exploding gradient problem and are difficult to parallelize, resulting in low training efficiency. In recent years, although some research has attempted to introduce the Transformer model with its powerful self-attention mechanism to capture global dependencies, the computational complexity of the standard Transformer's self-attention mechanism increases quadratically with the sequence length. When faced with long task sequences generated by large-scale distributed computing tasks, this leads to huge computational overhead and memory consumption, making it difficult to deploy efficiently and perform real-time inference on resource-constrained edge devices.
[0005] Therefore, there is an urgent need in this field for a novel deep reinforcement learning scheduling technology that can balance scheduling performance, learning efficiency, and the ability to model long-sequence dependencies, so as to truly achieve efficient and adaptive scheduling of cloud-edge resources in an edge-cloud collaborative environment. Summary of the Invention
[0006] The purpose of this disclosure is to provide a cloud-edge resource scheduling method, system, device, and medium to solve the above-mentioned problems.
[0007] This disclosure achieves the above objectives through the following technical solutions: A cloud-edge resource scheduling method includes the following steps: Construct a task scheduling scenario and generate a simulated scheduling training dataset; Construct a deep reinforcement learning model based on an improved Linformer model; The deep reinforcement learning model is iteratively trained using the simulated scheduling training dataset to generate the optimal task allocation scheme. The optimal task allocation scheme is evaluated. If the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved. Deploy the frozen network weights and the trained deep reinforcement learning model to the server; The task to be scheduled is input into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and cloud-edge resource scheduling is performed based on the optimal scheduling scheme.
[0008] As a further optimization of this disclosure, a task scheduling scenario is constructed, and a simulated scheduling training dataset is generated, including: A distributed computing task scheduling scenario in a heterogeneous computing environment is constructed using a simulation platform. Based on predefined transmission time models, response time models, total energy models, and monetary cost models, a simulated scheduling training dataset containing task dependencies, resource requirements, and timing constraints is generated. The task characteristics of the distributed computing task scheduling scenario are CPU cycle count, data transmission volume, and critical path identifier based on DAG structure, and server characteristics are frequency, memory, electricity price, and pricing parameters based on edge / cloud classification. The task-server allocation relationship is preprocessed to obtain the final state-action mapping relationship and generate a simulation scheduling training dataset.
[0009] As a further optimization of this disclosure, a deep reinforcement learning model based on an improved Linformer model is constructed, including: A deep reinforcement learning model is constructed, consisting of a low-rank projection attention layer, a feature extraction network based on a multi-head mechanism, and a policy-value dual output head connected in sequence. The model uses preprocessed task features, server status, and historical scheduling sequences as input data to analyze and simulate the weighted joint cost of task response time, energy consumption, and cost.
[0010] As a further optimization of this disclosure, the deep reinforcement learning model is iteratively trained using the simulated scheduling training dataset to generate an optimal task allocation scheme, including: Using the simulated scheduling training dataset as input, the low-rank projection attention layer is used to progressively compress redundant dependencies in the input sequence. Then, the feature extraction network of the multi-head mechanism learns the task-server interaction features and continuously extracts the critical path and resource constraint distribution features to optimize the scheduling decision. Finally, the strategy-value dual output head is used to generate the optimal task allocation scheme in combination with the current state.
[0011] As a further optimization of this disclosure, the optimal task allocation scheme is evaluated. If the overall cost obtained from the evaluation is lower than a given parameter threshold, the model training is deemed to have reached a predetermined standard, and the network weights are frozen and saved, including: The optimal task allocation scheme is evaluated using weighted normalized cost to compare the samples with the ideal scheduling benchmark. The weighted normalized cost includes three dimensions: response time, energy consumption, and cost. When the comprehensive cost obtained from the evaluation is lower than a given parameter threshold, the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved.
[0012] As a further optimization of this disclosure, the frozen network weights and the trained deep reinforcement learning model are deployed to the server, including: The frozen network weights and the trained deep reinforcement learning model are deployed to host devices in a pre-built edge-cloud collaborative environment. Edge devices distributed in different locations in the region are used as local execution nodes to obtain real-time task requests and server resource status.
[0013] As a further optimization of this disclosure, the task to be scheduled is input into the trained deep reinforcement learning model to obtain an optimal scheduling scheme, and cloud-edge resource scheduling is performed based on the optimal scheduling scheme, including: The task to be scheduled is transformed into a feature vector and input together with the real-time status data of the edge / cloud server into the trained deep reinforcement learning model. This model makes resource allocation decisions for the task to be scheduled and outputs the optimal task-server mapping scheme, which is the optimal scheduling scheme. Cloud-edge resource scheduling is then performed based on the optimal scheduling scheme.
[0014] A cloud-edge resource scheduling system includes: The training data generation module is used to construct task scheduling scenarios and generate simulated scheduling training datasets; The model building module is used to build deep reinforcement learning models based on the Linformer improvement. The model training module is used to iteratively train the deep reinforcement learning model using the simulated scheduling training dataset to generate the optimal task allocation scheme. The model evaluation module is used to evaluate the optimal task allocation scheme. If the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, it is determined that the model training has reached the predetermined standard, and the network weights are frozen and saved. The model deployment module is used to deploy the frozen network weights and the trained deep reinforcement learning model to the server. The resource scheduling module is used to input the task to be scheduled into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and to perform cloud-edge resource scheduling based on the optimal scheduling scheme.
[0015] An electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to execute the program stored in the memory to implement the cloud-edge resource scheduling method.
[0016] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the cloud-edge resource scheduling method.
[0017] The beneficial effects of this disclosure are as follows: This disclosure considers the complex dependencies between tasks in distributed computing tasks and the heterogeneous characteristics of edge-cloud environments. Using DAG task descriptions (task features) and server features as model inputs, a deep reinforcement learning model based on a low-rank projection attention mechanism is designed to efficiently learn and optimize the task scheduling decision process, thereby achieving rapid minimization of the weighted cost of multiple objectives. This disclosure adopts a distributed architecture and a priority experience replay mechanism, with multiple executors collecting environmental interaction data in parallel. It has good scalability, and the number of executors can be flexibly adjusted according to the actual system scale, without being limited by the hardware environment. This disclosure reduces the computational complexity of long sequence dependency modeling from quadratic to linear by introducing a Linformer attention module to replace the traditional Transformer, significantly improving the speed of model training and inference. It is suitable for real-time scheduling needs on resource-constrained edge sides, thereby supporting fine-grained and adaptive resource allocation and task scheduling in highly dynamic edge-cloud environments. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a method in an embodiment of this disclosure; Figure 2 This is a system structure block diagram of an embodiment of this disclosure; Figure 3 This is a block diagram of the device structure in an embodiment of this disclosure. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] like Figure 1 As shown, a cloud-edge resource scheduling method includes the following steps: S1. Construct a task scheduling scenario and generate a simulated scheduling training dataset, specifically including: A distributed computing task scheduling scenario in a heterogeneous computing environment is constructed using a simulation platform, generating a simulated scheduling training dataset that includes task dependencies, resource requirements, and timing constraints. The task features are CPU cycle count, data transfer volume, and critical path identifiers based on a DAG structure, while the server features are frequency, memory, electricity price, and pricing parameters based on edge / cloud classification. The task-server allocation relationship is preprocessed to obtain the final state-action mapping relationship, generating the simulated scheduling training dataset.
[0022] Let the set of applications be:
[0023] in, Indicates the first One application, Indicates the number of applications. Each An application contains one or more tasks, and its task set is represented as follows:
[0024] in, Indicates application The first in One task, Indicates application The number of tasks included.
[0025] Let the server set be:
[0026] in, Represents a collection of cloud servers. Represents a set of edge servers. Indicates the first One server, This indicates the total number of servers.
[0027] For distributed computing tasks The scheduling configuration set is defined as follows:
[0028] in, Indicates application The set of scheduling configurations, Indicates application middle Task The scheduling configuration. The value can be the server set. One of the servers in, namely:
[0029] when When, it indicates a task. Assigned to server Execution, in order to Indicates scheduling configuration The corresponding actual server.
[0030] For data task execution, we have: ; in Indicates task In scheduling configuration The response time model below, Indicates task Data arrival time model, Indicates task The execution time model.
[0031] Task Data arrival time is defined as:
[0032] in, Indicates task The set of precursor tasks; Indicates task Any of the precursor missions. Indicates a precursor mission Scheduling configuration; Indicates task Scheduling configuration; Indicates a precursor mission The output data arrives at the current task execution server Time required. If If there is no predecessor mission, then .
[0033] Current mission With the current task When data is assigned to different servers, the arrival time can be expressed as:
[0034] Current mission With the current task When data is assigned to the same server, the arrival time can be expressed as:
[0035] in, Indicates server With server Data transmission latency between them.
[0036] For the transmission time model ,have:
[0037] in, Indicates task Required data from the predecessor mission execution server Transfer to current task execution server Data size; Indicates server With server The current available bandwidth between them.
[0038] For execution time model ,have:
[0039] in, Indicates task Number of CPU processing cycles required Indicates scheduling configuration The CPU frequency of the corresponding server.
[0040] Therefore, the task In scheduling configuration The response time model under the following conditions can be expressed as:
[0041] application In the scheduling configuration set The response time model under the following conditions can be expressed as:
[0042] in, Indicates application The number of tasks included. Indicates the critical path indicator. When a task... Located in the application On the critical path, ;otherwise, .
[0043] For the energy model, we have:
[0044] in, Indicates task In scheduling configuration The total energy consumption generated below. Indicates the energy consumption during execution. Indicates the energy consumed during transmission; Indicates task Does an indicator exist for a successor task? When the task... When there is a successor task, ;otherwise, .
[0045] For the execution energy model, we have:
[0046] in, Indicates scheduling configuration The computing power of the corresponding server when performing the task.
[0047] For the energy transfer model, we have:
[0048] in, Indicates task The set of subsequent tasks, Indicates task Any subsequent task, Indicates the successor task Scheduling configuration; Indicates task The output data comes from its execution server. Transmit to subsequent tasks execution server Data size; Display server With server The current available bandwidth between; Indicates server Transmission power during data transmission; Indicates task and subsequent tasks An indicator function indicating whether they are located on different servers. When hour, ;when hour, ; Therefore, application In the scheduling configuration set The total energy model under the following conditions can be expressed as:
[0049] For the monetary cost model, the task is... In scheduling configuration The monetary cost model under the following conditions can be expressed as:
[0050] in, Indicates scheduling configuration The unit time rental price of the corresponding cloud server, Indicates scheduling configuration The unit energy consumption electricity price of the corresponding edge server.
[0051] Similarly, applications In the scheduling configuration set The total monetary cost model under the following conditions can be expressed as:
[0052] S2. Construct a deep reinforcement learning model based on an improved Linformer model, specifically including: An improved deep reinforcement learning model based on Linformer is constructed. This model takes preprocessed task features, server status, and historical scheduling sequences as input data, and analyzes and simulates the weighted joint cost of task response time, energy consumption, and cost. The model includes a low-rank projection attention layer (the core module of Linformer) connected in sequence, a feature extraction network based on a multi-head mechanism, and a policy-value dual output head. Measuring the Importance of Empirical Replay in the Linformer Model The expression is: ; in, Represents an instant reward. Represents the discount factor. The reward function represents the current state. This represents a user-defined empirical constant.
[0053] Based on priority sampling experience, we have: ; This indicates that the priority p_i of the i-th experience is raised to the power of α; This indicates that the priority p_i of the k-th experience is raised to the power of α.
[0054] For importance sampling weights, we have: ; in Represents the sampling probability, and α represents the priority intensity coefficient. β represents the importance sampling weight, N represents the total number of experiences in the experience playback buffer, and β represents the bias correction strength coefficient.
[0055] The Lineformer attention mechanism can be expressed as the following set of formulas. ; ; ; ; ; in X A matrix representing the input sequence. , , These represent the learnable weight matrices used to generate queries, keys, and values, respectively. : respectively represent the first A query, key, and value matrix for each attention head. , This represents a low-rank projection matrix specific to Linformer, used to compress sequence dimensions. This represents the key-value matrix after projection. dk This represents the dimension of each attention head, used to calculate attention weights.
[0056] The Linformer attention mechanism can be represented as: ; Where softmax represents the normalization exponential function. This represents the key matrix after projection in the T-th round. This represents the value matrix after projection in the Tth round.
[0057] S3. Iteratively train the deep reinforcement learning model using the simulated scheduling training dataset to generate the optimal task allocation scheme, specifically including: The Linformer deep reinforcement learning model is iteratively trained. A low-rank projection attention layer is used to progressively compress redundant dependencies in the input sequence. Then, multi-head feature extraction is used to learn the task-server interaction features of the network and continuously extract the key path and resource constraint distribution features to optimize the scheduling decision. Finally, a policy-value dual output head is used to generate the optimal task allocation scheme by combining the current state (the real-time environment state of the system when the model makes scheduling decisions).
[0058] The model selects actions: ; in, Represents a time step. Indicates the selection of an action. This refers to an edge server with a specific ID, k.
[0059] Planning reward selection function: ; in The reward obtained by the model. Defined in scheduling configuration The weighted joint cost function on.
[0060] The target value of the V-trace algorithm is calculated to correct the discrepancy between the behavioral policy and the target policy during distributed training, using the following formula:
[0061] in, This represents the target value of the V-trace algorithm. Represents the current estimated value; γ: represents the discount factor used to weigh the importance of current rewards against future rewards. , The importance of the truncation sampling weights is represented by c, which affects the convergence speed, while ρ affects the solution to which the value function V converges. This represents the time difference error, where x represents the current time step index, t is the index variable in the summation symbol, and n represents the number of steps forward or the length of the trajectory segment.
[0062] For time difference error ,have: ; Regarding the importance sampling weights for truncation, we have: ; ; Where ai represents the task action at time i, si represents the environment state at time i, and at represents the task action at time t. This represents the environmental state at time t. Represents the average value of c. ρ represents the average value, and μ represents the behavioral strategy. The importance sampling weights of the truncation are calculated at time step t. This represents the action chosen by policy μ at time step t. This represents the environmental state at time step t.
[0063] For target strategy ,have: ; Where μ represents the update action strategy; This represents the probability distribution of the model agent choosing an action 'a' given a state x (i.e., the current environmental information of the system). The normalized placeholder denominator represents the probability of all possible pruning.
[0064] Define the total loss function ,have: ; in Represents the value of network loss. This represents the network loss value of the policy. This represents the loss value of the entropy network. This represents the corresponding weight parameters.
[0065] For the value network loss value, we have: ; in, represent The environmental state at any given moment.
[0066] in The value function representing the θ parameterization.
[0067] For the policy network loss value, we have: ; in, This indicates the truncation importance sampling weight. This represents the bias constant at time x. This represents the v-trace weight parameters. This represents the predicted advantage of v-trace in the next moment. This represents the parameterized target strategy.
[0068] For the loss value of the entropy network, we have: ; in :Strategy Entropy, a measure of randomness. : A possible action at time step x The environment state at time step x.
[0069] For parameters Updates should follow the following: ; The learning rate coefficient or weight parameters representing the value network. It is the gradient operator, which means taking the partial derivative with respect to the parameter θ.
[0070] For parameters Updates should follow the following guidelines: ; in, Representative policy network parameters The update amount (gradient step size); The learning rate coefficient or weight parameters represent the policy network; This represents the truncation importance sampling weight at time step x; This represents the immediate reward obtained at time step x; γ represents the discount factor, which is used to weigh the importance of current rewards against future rewards, and its value range is usually [0,1); This represents the target value estimate at the next time step s+1; This represents the value estimated by the value network with parameter θ in the state. The value of the state under the following conditions; It represents the overall composition time difference error or advantage estimation, and represents the estimation error of the current state value; It is the gradient operator, which indicates that the gradient is applied to the parameters. Find the partial derivative; It is a target strategy In state Select action The logarithmic probability; Logarithmic probability with respect to policy parameters The gradient of the policy is called the policy gradient. It specifies how the parameters should be adjusted. To increase (or decrease) the selection action The probability of.
[0071] in, This refers to the updated v-trace function. This represents the weighting parameter.
[0072] S4. Evaluate the optimal task allocation scheme. If the overall cost obtained from the evaluation is lower than a given parameter threshold, then the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved. Specifically, this includes: For the scheduling scheme generated by the Linformer model, a weighted normalized cost (including response time, energy consumption, and cost) is used to evaluate the samples against the ideal scheduling benchmark. When the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved.
[0073] For weighted cost model ,have: ; in, , , , representing the maximum and minimum values of time, energy consumption, and cost, respectively. This represents the weight parameters, therefore, the application The weighted cost model can be defined as: ; in This indicates normalization.
[0074] Let the following notation be used: Let the set of servers be...
[0075] in Indicates the first One server, This indicates the total number of servers.
[0076] Application The Middle Each task is denoted as ,Task The scheduling configuration is denoted as Its meaning is task Assigned to the target server; when the task Assigned to server When, recorded as
[0077] application The set of scheduling configurations is denoted as
[0078] Regarding the constraints, there are the following six constraint expressions: C1: ; This constraint means that each task has only one target server, meaning that each task can only be assigned to one server for execution.
[0079] C2: For any task and any of its precursor missions ,like ,
[0080] Then there is
[0081] in Indicates task The set of precursor tasks; Indicates task Required input data from the server Transmitted to server The amount of data; Indicates server With server The current bandwidth between; This constraint states that when there is a data transmission relationship between tasks, the amount of data transmitted should be non-negative, and the transmission link bandwidth must be greater than 0.
[0082] C3: ; in, Indicates server CPU frequency; Indicates server Memory capacity.
[0083] This constraint means that each server has available computing and storage resources.
[0084] C4: ; in Indicates task Required memory resources; As an indicator function, when the task Scheduled to server When executed, the value is 1; otherwise, the value is 0. Indicates server Memory capacity.
[0085] This constraint indicates the allocation to the server. The total memory requirement of all tasks does not exceed the server's Memory capacity.
[0086] C5: ; in Indicates task Completion time; Indicates task The start time of execution; Indicates task The set of precursor tasks.
[0087] This constraint means that any task can only begin execution after all its predecessor tasks have been completed, thus satisfying the dependencies between tasks.
[0088] C6: ; in, These represent the weight parameters for the three dimensions of response time, energy consumption, and monetary cost in the weighted cost model, respectively.
[0089] This constraint means that the weights of each dimension are non-negative, and the sum of the three is 1.
[0090] C1 enforces the rule that each task can only be assigned to one server. C2 specifies transmission constraints on data size and bandwidth. Furthermore, C3 defines constraints related to the server's CPU frequency and RAM size. Additionally, C4 ensures that each server has sufficient RAM resources to handle all tasks scheduled on it. C5 specifies that each task is only eligible for processing after its predecessor task has completed, ensuring that the cumulative cost is not less than the cost of the predecessor task. Finally, C6 imposes restrictions on the control parameters of the weighted cost model.
[0091] S5. Deploy the frozen network weights and the trained deep reinforcement learning model to the server, specifically including: The frozen network weights and the trained Linformer model are deployed to host devices in a pre-built edge-cloud collaborative environment. Edge devices (such as Raspberry Pi and Jetson Nano) distributed in different locations in the region are used as local execution nodes to obtain real-time task requests and server resource status.
[0092] S6. Input the task to be scheduled into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and perform cloud-edge resource scheduling based on the optimal scheduling scheme, specifically including: The task to be scheduled (local task DAG) graph is transformed into a feature vector and fed into the Linformer model along with the real-time status data of the edge / cloud server. This completes the resource allocation decision for the task to be scheduled and outputs the optimal task-server mapping scheme, achieving low-latency and low-energy edge-cloud collaborative scheduling.
[0093] The edge-cloud collaborative scheduling method further includes the following steps: Freeze the trained model and deploy it to the server: ; in, Represents the real-time environmental status. The model outputs the action. This represents the target policy function.
[0094] like Figure 2 As shown, embodiments of this disclosure provide a cloud-edge resource scheduling system, including: The training data generation module is used to construct task scheduling scenarios and generate simulated scheduling training datasets; The model building module is used to build deep reinforcement learning models based on the Linformer improvement. The model training module is used to iteratively train the deep reinforcement learning model using the simulated scheduling training dataset to generate the optimal task allocation scheme. The model evaluation module is used to evaluate the optimal task allocation scheme. If the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, it is determined that the model training has reached the predetermined standard, and the network weights are frozen and saved. The model deployment module is used to deploy the frozen network weights and the trained deep reinforcement learning model to the server. The resource scheduling module is used to input the task to be scheduled into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and to perform cloud-edge resource scheduling based on the optimal scheduling scheme.
[0095] The implementation process of the functions and roles of each module in the above system is detailed in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0096] For the system embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The system embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0097] See Figure 3 The electronic device provided in the embodiments of this disclosure includes a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. Memory 1130 is used to store computer programs; The processor 1110, when executing the program stored in the memory 1130, implements the cloud-edge resource scheduling method described above.
[0098] The aforementioned communication bus 1140 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.
[0099] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0100] The memory 1130 may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory 1130 may also be at least one storage device located remotely from the aforementioned processor 1110.
[0101] Embodiments of this disclosure also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the cloud-edge resource scheduling method described above.
[0102] The embodiments described above are merely examples of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these modifications and improvements all fall within the protection scope of this disclosure.
Claims
1. A cloud-edge resource scheduling method, characterized in that, Includes the following steps: Construct a task scheduling scenario and generate a simulated scheduling training dataset; Construct a deep reinforcement learning model based on an improved Linformer model; The deep reinforcement learning model is iteratively trained using the simulated scheduling training dataset to generate the optimal task allocation scheme. The optimal task allocation scheme is evaluated. If the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved. Deploy the frozen network weights and the trained deep reinforcement learning model to the server; The task to be scheduled is input into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and cloud-edge resource scheduling is performed based on the optimal scheduling scheme.
2. The cloud-edge resource scheduling method according to claim 1, characterized in that, Construct a task scheduling scenario and generate a simulated scheduling training dataset, including: A distributed computing task scheduling scenario in a heterogeneous computing environment is constructed using a simulation platform. Based on predefined transmission time models, response time models, total energy models, and monetary cost models, a simulated scheduling training dataset containing task dependencies, resource requirements, and timing constraints is generated. The task characteristics of the distributed computing task scheduling scenario are CPU cycle count, data transmission volume, and critical path identifier based on DAG structure, and server characteristics are frequency, memory, electricity price, and pricing parameters based on edge / cloud classification. The task-server allocation relationship is preprocessed to obtain the final state-action mapping relationship and generate a simulation scheduling training dataset.
3. The cloud-edge resource scheduling method according to claim 1, characterized in that, Constructing a deep reinforcement learning model based on an improved Linformer model, including: A deep reinforcement learning model is constructed, consisting of a low-rank projection attention layer, a feature extraction network based on a multi-head mechanism, and a policy-value dual output head connected in sequence. The model uses preprocessed task features, server features, and historical scheduling sequences as input data to analyze and simulate the weighted joint cost of task response time, energy consumption, and cost.
4. The cloud-edge resource scheduling method according to claim 3, characterized in that, The deep reinforcement learning model is iteratively trained using the simulated scheduling training dataset to generate an optimal task allocation scheme, including: Using the simulated scheduling training dataset as input, the low-rank projection attention layer is used to progressively compress redundant dependencies in the input sequence; Then, the network learning task-server interaction features are extracted through the multi-head mechanism, and the critical path and resource constraint distribution features are continuously extracted from them; The scheduling decision is optimized, and then the optimal task allocation scheme is generated by combining the strategy-value dual output head with the current state.
5. The cloud-edge resource scheduling method according to claim 1, characterized in that, The optimal task allocation scheme is evaluated. If the overall cost obtained from the evaluation is lower than a given parameter threshold, the model training is considered to have reached a predetermined standard, and the network weights are frozen and saved, including: The optimal task allocation scheme is evaluated using weighted normalized cost to compare the samples with the ideal scheduling benchmark. The weighted normalized cost includes three dimensions: response time, energy consumption, and cost. When the comprehensive cost obtained from the evaluation is lower than a given parameter threshold, the model training is considered to have reached the predetermined standard, and the network weights are frozen and saved.
6. The cloud-edge resource scheduling method according to claim 1, characterized in that, Deploying the frozen network weights and the trained deep reinforcement learning model to the server includes: The frozen network weights and the trained deep reinforcement learning model are deployed to host devices in a pre-built edge-cloud collaborative environment. Edge devices distributed in different locations in the region are used as local execution nodes to obtain real-time task requests and server resource status.
7. The cloud-edge resource scheduling method according to claim 1, characterized in that, The task to be scheduled is input into the trained deep reinforcement learning model to obtain the optimal scheduling scheme. Cloud-edge resource scheduling is then performed based on the optimal scheduling scheme, including: The task to be scheduled is transformed into a feature vector and input together with the real-time status data of the edge / cloud server into the trained deep reinforcement learning model. The model makes resource allocation decisions for the task to be scheduled and outputs the optimal task-server mapping scheme to obtain the optimal scheduling scheme. Cloud-edge resource scheduling is then performed based on the optimal scheduling scheme.
8. A cloud-edge resource scheduling system, characterized in that, include: The training data generation module is used to construct task scheduling scenarios and generate simulated scheduling training datasets; The model building module is used to build deep reinforcement learning models based on the Linformer improvement. The model training module iteratively trains the deep reinforcement learning model using the simulated scheduling training dataset to generate the optimal task allocation scheme. The model evaluation module is used to evaluate the optimal task allocation scheme. If the comprehensive cost obtained from the evaluation is lower than the given parameter threshold, it is determined that the model training has reached the predetermined standard, and the network weights are frozen and saved. The model deployment module is used to deploy the frozen network weights and the trained deep reinforcement learning model to the server. The resource scheduling module is used to input the task to be scheduled into the trained deep reinforcement learning model to obtain the optimal scheduling scheme, and to perform cloud-edge resource scheduling based on the optimal scheduling scheme.
9. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor is used to execute a program stored in a memory to implement the cloud-edge resource scheduling method according to any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the cloud-edge resource scheduling method according to any one of claims 1-7.