Task scheduling method and device based on edge computing, equipment and storage medium

Through the multi-dimensional state construction of edge computing environments and the adaptive learning of deep Q network models, the problems of resource waste and QoS fluctuations in the existing technology are solved, and efficient and stable task scheduling and energy consumption optimization are achieved in complex environments.

CN120448069AActive Publication Date: 2025-08-08NORTH CHINA UNIV OF WATER RESOURCES & ELECTRIC POWER

Patent Information

Application Number
CN202510591484.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-08
Publication Date
2025-08-08
Estimated Expiration
2045-05-08

AI Technical Summary

Technical Problem

Existing task scheduling methods are difficult to quantify network delay fluctuations and interference risks in complex and time-varying edge environments, resulting in resource waste, QoS fluctuations and energy consumption that cannot be effectively controlled.

Method used

By conducting multi-dimensional state construction and spatiotemporal correlation analysis on heterogeneous edge node resources, using deep Q network model for adaptive deep reinforcement learning, combining Monte Carlo simulation and nonlinear planning, a dynamic scheduling strategy and resource allocation optimal combination is generated.

Benefits of technology

It realizes efficient and stable task scheduling in complex heterogeneous environments, improves scheduling flexibility and generalization capabilities, reduces system energy consumption, and ensures task delay and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448069A_ABST
    Figure CN120448069A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of task scheduling, and provides a task scheduling method and device based on edge computing, equipment and a storage medium. The method comprises the following steps: performing multi-dimensional state construction on heterogeneous edge node resources and task instructions to obtain a real-time resource state data set, and performing space-time correlation analysis on the real-time resource state data set to obtain a task-resource matching feature matrix; performing adaptive deep reinforcement learning on the task-resource matching feature matrix through a deep Q network model to obtain a dynamic scheduling strategy, performing interference analysis of Monte Carlo simulation on the dynamic scheduling strategy to obtain an interference probability matrix, and performing nonlinear programming on a real-time resource state data set and a task instruction to obtain a target function; and performing constraint solution on the target function in combination with the interference probability matrix to obtain an optimal combination of resource allocation. According to the method, efficient and reliable scheduling in a complex heterogeneous environment is realized through multi-dimensional perception, space-time correlation, deep reinforcement learning, probability robust analysis and nonlinear optimal solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of task scheduling technology, and in particular to a task scheduling method, apparatus, device and storage medium based on edge computing. Background Art

[0002] With the rapid development of cloud computing, mobile internet, and the Internet of Things, the variety and scale of tasks are constantly increasing, and node heterogeneity and network volatility are becoming increasingly prominent. Traditional static or centralized scheduling methods are no longer able to meet the multiple demands for real-time performance, reliability, and energy optimization. An efficient scheduling strategy can proactively perceive resource status, rationally balance load and communication, maximize computing power, and provide users with a stable, low-latency service experience.

[0003] Existing task scheduling methods can be broadly categorized into two main categories: classic static scheduling algorithms and dynamic scheduling algorithms. Static methods utilize pre-acquired resource and task information for a single round of scheduling. Dynamic methods include threshold scheduling based on load monitoring, heuristic search (such as genetic algorithms and particle swarm optimization), resource allocation based on game theory or market mechanisms, and the recently emerging reinforcement learning scheduling models. These methods have been successfully applied in large-scale data centers and cloud platforms, achieving a balance between task completion time and resource utilization, and supporting simple rescheduling in the event of node failure or load surges.

[0004] However, existing task scheduling methods can usually only perform allocation based on rough indicators or fixed thresholds. They have difficulty quantifying network latency fluctuations and interference risks, and cannot continuously update strategies through online learning. As a result, resource waste, QoS fluctuations, and energy consumption cannot be effectively controlled in complex and time-varying edge environments. Summary of the Invention

[0005] In view of this, the present application provides a task scheduling method, apparatus, device and storage medium based on edge computing to solve the problem of efficient and stable execution of tasks in heterogeneous and complex environments.

[0006] The first aspect of the present application provides a task scheduling method based on edge computing, the method comprising: Perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and received task instructions to obtain a real-time resource status dataset; Performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix; Adaptive deep reinforcement learning is performed on the task-resource matching feature matrix through a preset deep Q-network model to obtain a dynamic scheduling strategy; performing an interference analysis of the dynamic scheduling strategy using Monte Carlo simulation to obtain an interference probability matrix; Nonlinear programming is performed on the real-time resource status data set and the task instructions to obtain an objective function, and constraint solving is performed on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

[0007] In an optional embodiment, the heterogeneous edge node resources include computing resource data, communication resource data, and inter-node distances, and performing multi-dimensional state construction processing on the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource state data set includes: Performing real-time node resource collection on heterogeneous edge nodes to obtain the computing resource data, the communication resource data, and the distance between the nodes; Performing state vector construction on the computing resource data, the communication resource data, and the inter-node distance to obtain a resource state vector; Performing task upload analysis based on the communication resource data using a preset channel capacity model to obtain a maximum rate at which tasks are uploaded to the edge node; Performing task execution prediction processing according to the task quantity in the received task instruction, the computing resource data, and the communication resource data to obtain an execution time of the edge node; Data structure fusion is performed on the resource state vector, the maximum rate, and the execution time according to a time series to obtain the real-time resource state data set.

[0008] In an optional embodiment, performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix includes: Performing mean calculation on the computing resource data in the real-time resource status data set according to a preset sliding window to obtain a CPU utilization mean; Calculating the transmission time of the inter-node distances in the real-time resource status data set to obtain transmission delay data between the nodes, and constructing a communication delay matrix based on the preset edge node coordinates and the transmission delay data; The preset task attribute data, the CPU utilization mean, and the communication delay matrix are subjected to resource state parameter fusion and normalization processing to obtain the task-resource matching feature matrix.

[0009] In an optional embodiment, the adaptive deep reinforcement learning of the task-resource matching feature matrix using a preset deep Q network model to obtain a dynamic scheduling strategy includes: Performing principal component analysis and dimensionality reduction on the task-resource matching feature matrix to obtain a state space optimization vector; Performing deep reinforcement learning on the state space optimization vector through a preset deep Q network model to obtain an (N+1)-dimensional Q-value vector; The Q value vector is subjected to maximum Q value action screening processing according to a preset ε-greedy strategy to obtain the dynamic scheduling strategy.

[0010] In an optional embodiment, performing a Monte Carlo simulation interference analysis on the dynamic scheduling strategy to obtain an interference probability matrix includes: Extract relevant parameters from the real-time resource status data set according to the dynamic scheduling strategy to obtain a model parameter set corresponding to each task; Constructing an interference scenario model for the model parameter set to obtain an interference scenario model corresponding to each task; Performing Monte Carlo simulation on the interference scenario model to obtain the interference probability corresponding to each task; All interference probabilities are vectorized according to the dynamic scheduling strategy to obtain the interference probability matrix.

[0011] In an optional embodiment, performing nonlinear programming on the real-time resource status dataset and the task instructions to obtain an objective function, and performing constraint solving on the objective function according to the interference probability matrix to obtain an optimal resource allocation combination includes: Extracting and processing the real-time resource status data set to obtain the computing capacity, bandwidth, and transmission power of each node, and parsing and processing the task instructions to obtain the task data volume and the maximum tolerable delay; Performing nonlinear weighted planning on the computing capacity, the bandwidth, the transmission power, and the task data volume according to a preset energy consumption weight to obtain the objective function; Constraining the objective function according to the maximum tolerable delay and the interference probability matrix to obtain a function constraint condition set; The objective function is subjected to Lagrangian dual decomposition and sub-gradient solution processing according to the function constraint condition set to obtain the optimal combination of resource allocation.

[0012] In an optional embodiment, the method further comprises: Performing execution monitoring on the optimal resource allocation combination to obtain real-time task flow data samples; Performing data cleaning and feature extraction processing on the real-time task flow data sample to obtain tuple data; Randomly sampling the tuple data to obtain a training set, and updating the main network parameters of the deep Q network model according to the training set through a preset mean square error loss function; When the number of updates of the main network parameters reaches a preset update number threshold, the main network parameters are synchronized with the target network parameters in the deep Q network model to update the deep Q network model.

[0013] A second aspect of the present application provides a task scheduling device based on edge computing, the device comprising: The resource monitoring module is used to perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource status data set; A spatiotemporal analysis module, configured to perform spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix; A dynamic scheduling module is used to perform adaptive deep reinforcement learning on the task-resource matching feature matrix through a preset deep Q-network model to obtain a dynamic scheduling strategy; An interference simulation module, configured to perform a Monte Carlo simulation interference analysis on the dynamic scheduling strategy to obtain an interference probability matrix; The optimal allocation module is used to perform nonlinear programming on the real-time resource status data set and the task instructions to obtain an objective function, and to perform constraint solving on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

[0014] The third aspect of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the edge computing-based task scheduling method as described above are implemented.

[0015] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the edge computing-based task scheduling method as described above are implemented.

[0016] In summary, this application has at least the following beneficial technical effects: 1. By performing PCA dimensionality reduction on the feature matrix and then inputting it into the deep Q network, and using the ε-greedy strategy for continuous exploration and utilization, it can automatically adjust according to runtime changes, avoiding the risk of "rigidity" of static scheduling rules, and improving the flexibility and generalization of scheduling.

[0017] 2. Through Monte Carlo simulation, the interference probability in different scenarios is quantified and an interference probability matrix is formed, which enables the resource allocation plan to maintain a high success rate and service quality in the face of sudden network congestion or node failure.

[0018] 3. Nonlinearly weighting factors such as computing power, bandwidth, transmission power, and task delay tolerance in the form of energy consumption weights maximizes resource utilization while ensuring task delay and reliability, significantly reduces system energy consumption, and achieves a balanced optimization of performance and cost. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 This is a flowchart of a task scheduling method based on edge computing provided by an embodiment of the present application; Figure 2 This is a functional module diagram of a task scheduling device based on edge computing provided by an embodiment of the present application; Figure 3 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0022] The edge computing-based task scheduling method provided in the embodiment of the present application is executed by an electronic device, and accordingly, the edge computing-based task scheduling device runs in the electronic device. The electronic device is any device in a distributed edge computing system (for example, an industrial Internet of Things system, an Internet of Vehicles system, etc.). The electronic device can automatically trigger the execution of the edge computing-based task scheduling method provided in the embodiment of the present application after receiving a new task instruction or detecting a resource load fluctuation at a preset periodic interval. The edge computing-based task scheduling method provided in the embodiment of the present application is described below from the perspective of the electronic device in combination with the task scheduling process after receiving a new task instruction.

[0023] like Figure 1FIG2 is a flowchart of a task scheduling method based on edge computing provided by an embodiment of the present application. The task scheduling method based on edge computing provided by an embodiment of the present application includes the following steps.

[0024] Step S1: Perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource state data set.

[0025] It should be understood that heterogeneous edge nodes differ in hardware architecture, network conditions, and geographical locations. Real-time collection of resource data from each edge node in the edge computing system can accurately reflect the current load of the system. Accurate node resource data can provide reliable input for modeling and scheduling, ensuring the effectiveness and accuracy of scheduling decisions. In terms of computing resource collection, electronic devices use central processing unit utilization sensors and RAPL interfaces to periodically read the number of CPU cores N of each node. core , real-time utilization η cpu And available memory M free And extract information such as memory usage and cache occupancy through the operating system kernel monitoring module (for example, Linux). In terms of communication resource collection, use the network card driver ethtool or SNMP protocol to obtain the link bandwidth B j and current throughput, and read the channel gain H through the SCI interface i And noise power N0. If the node supports multiple frequency bands, the available bandwidth and current occupancy of 5G / 4G / Wi-Fi6 are recorded respectively. In the distance measurement between nodes, the coordinate information of the corresponding node can be directly read by equipping the node with a positioning module, and the straight-line distance d(i, j) between the nodes can be calculated according to the geodetic formula. For nodes that are not equipped with a positioning module, the RSSI-based triangulation algorithm is used to calculate the straight-line distance d(i, j) between the local device i and the node j. The embodiment of the present application starts the acquisition when a new task instruction is received through an event trigger mechanism. At the same time, in order to facilitate the time domain alignment of the data, all acquisition items are stamped with a unified timestamp.

[0026] The original collected data has many dimensions, large amounts and is not easy to be used directly as model input. Different types of collected data need to be combined and standardized to construct a resource state vector in a unified format. The original data collected by each node j at time t is mapped to the resource state vector S j (t)=[N core ,η cpu ,M free ,B j ,H i ,d(i,j)] T , where percentage data (e.g., real-time utilization η cpu) is converted to a real number in the [0,1] interval to unify with other magnitudes. At the same time, the channel gain H i Perform exponential inverse function calculation to convert the decibel value into a linear value. And each resource state vector S j (t) is written as a row into the memory table, and (node ID, timestamp) is used as the state vector S of each resource j (t) The corresponding index is used for subsequent quick retrieval, thereby obtaining a standardized and formatted resource state vector stream {S j (t)}.

[0027] Furthermore, from the resource state vector flow {S j (t)} to extract the bandwidth B j , channel gain H i And the straight-line distance d(i,j) between nodes, combined with the collected uplink transmission power p of local device i i up , using the Shannon theorem channel capacity theoretical calculation formula to estimate the theoretical maximum rate V of the task uploaded from local device i to node j ij up Finally, the theoretical maximum rate V of each task-node link is obtained. ij up Recorded in a memory table, thus forming a rate table {V ij up The maximum rate can be used to evaluate task upload latency and bandwidth allocation.

[0028] At the same time, the task instructions are parsed to obtain the task data volume D i , the computing resource data C required for task execution represented by the number of cup cycles i , and the maximum tolerable delay T i tol . Then, according to the bandwidth B between local device i and node j ij , local device computing power f i l and node j computing power f j e , combined with the task data volume D in the task instruction i , respectively calculate the time T required for the local device to execute the task instruction ij l And the time T required for node i to execute the task instruction ij e , thus obtaining the execution time matrix of each task locally and on each candidate edge node {T ij l ,T ij e}.

[0029] Finally, the above data are aligned according to the time series. That is, the static resource state vector stream {S j (t)}, maximum rate V ij up (t) and execution time T ij l (t) and T ij e (t) is combined into a record. Furthermore, the header of the memory table is defined according to the node ID and timestamp t to write the above data records into a time series database (e.g., InfluxDB) or a CSV file, so that each record contains complete computing, communication, geographic and task prediction information C(t) = [node ID, t, N core ,η cpu ,M free ,B j ,H i ,d(i,j),V ij up ,T ij l ,T ij e ], thereby generating a real-time resource status dataset {C(t)}.

[0030] Step S2: performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix.

[0031] It should be understood that the original cpu utilization data shows violent short-term fluctuations, and direct use will cause the scheduling model to be sensitive to instantaneous noise. The embodiment of the present application adopts a sliding window mean smoothing technology to eliminate the impact of short-term bursts, highlight the average level representing the long-term load trend, and provide a stable input for subsequent feature fusion. Specifically, according to a preset fixed-length time window W (for example, 5 consecutive sampling points, corresponding to 5×500ms=2.5s), the continuously collected cpu utilization values are batched in chronological order to obtain a sequence of cpu utilization values within W time slices {η cpu (t-W+1),η cpu (t-W+2),……,η cpu (t)}. And use the mean summation formula to calculate the mean CPU utilization of each group of CPU utilization values cpu And take the average CPU utilization of the past W collection points cpu Represents the average CPU utilization at time point t cpu (t).

[0032] Since the node distribution in edge environments is spatially heterogeneous, the distance between nodes directly affects the data transmission latency. Calculating and matrixing the transmission delay between all node pairs can quantify the network cost of different node collaborations for the scheduling model. Specifically, the theoretical transmission time is calculated based on the node distance d and the speed of light constant, and the additional processing time Γ at the preset switches / network interfaces is combined. proc (i.e., the delay in message processing or queuing overhead between nodes), calculate the end-to-end transmission delay data T between each pair of nodes comm It should be understood that edge nodes are logically numbered 1...N, and each has corresponding physical coordinate information. comm After that, the transmission delay data T comm The N×N delay two-dimensional matrix is stored, and its row and column indices correspond to the node numbers. Furthermore, the matrix can be serialized into a database such as CSV, JSON, etc. for easy query in subsequent steps. Finally, the communication delay matrix {T jk comm} clearly reflects the network delay characteristics between any two nodes j and k.

[0033] It should be understood that the task-resource matching feature matrix needs to comprehensively consider the attributes of the task itself (e.g., data volume, delay tolerance) and the spatiotemporal state of the node (i.e., CPU load, network latency). Metrics with different dimensions and value ranges must be normalized to the same interval to prevent excessively large values in a single dimension from biasing the model. Feature fusion can efficiently quantify the degree of matching of each node to each task, providing multi-dimensional, comparable input to the scheduling algorithm.

[0034] Specifically, the received task instruction is analyzed through the above analysis to obtain the task data volume D including but not limited to: i , maximum tolerable delay T i tol And task attribute data such as priority. At the same time, for task attribute data, communication delay matrix {T jk comm} and the average of all CPU utilization cpu , the Min-Max normalization operation is used to normalize each data in the data set one by one, so as to map each physical quantity to the interval [0,1]. Further, each task i is combined with each node j to construct the feature vector F ij ={D ’ i ,T ’ i tol , cpu (t),T’ jk comm}. Among them, D ’ i is the normalized task data volume, T ’ i tol is the normalized tolerance delay, cpu (t) is the normalized mean CPU utilization, T ’ jk comm is the normalized transmission delay data. And construct the feature matrix M with node j as the row and task i as the column. By traversing all node and task pairs, the task-resource matching feature matrix M is formed. N×K .

[0035] Step S3: Adaptive deep reinforcement learning is performed on the task-resource matching feature matrix through a preset deep Q network model to obtain a dynamic scheduling strategy.

[0036] Among them, the task-resource matching feature matrix M N×K The high-dimensionality of the task-resource matching feature matrix (e.g., normalized task data volume, latency tolerance, average CPU load, communication delay, etc.) and the high redundancy between features can easily lead to overfitting or gradient convergence difficulties. Principal component analysis (PCA) reduces the dimensionality of the high-dimensional task-resource matching feature matrix. This method extracts mutually orthogonal principal components while preserving as much of the original variance information as possible, thereby reducing the input dimension and compressing the network size. It also removes redundant related features, improving model generalization.

[0037] Specifically, the z-score normalization formula is applied to each column of the task-resource matching feature matrix. Each eigenvalue of the task-resource matching feature matrix is normalized one by one to eliminate differences in dimension and dimensional mean, ensuring that each column of features has zero mean and unit variance. Next, the covariance matrix of the normalized task-resource matching feature matrix is calculated to measure the linear correlation between the standardized features. Furthermore, the covariance matrix is subjected to eigenvalue decomposition to extract the principal component directions of the covariance matrix and obtain eigenvalue-eigenvector pairs. Eigenvalues reflect the variance contribution of the corresponding vector direction, while eigenvectors represent the principal component directions. After obtaining the eigenvalue-eigenvector pairs, the corresponding eigenvectors are sorted in descending order according to their eigenvalues, and the eigenvectors corresponding to the first r largest eigenvalues are selected as the dimensionality reduction basis. The eigenvalues of the dimensionality reduction basis and all eigenvalue-eigenvector pairs are then summed to calculate the variance contribution rate γ(r) of the dimensionality reduction basis. When γ(r) ≥ a preset threshold (e.g., 90%), the dimension reduction basis is constructed as a dimension reduction projection matrix P = [v1, ..., v r]∈R d×r Finally, the standardized task-resource matching feature matrix is multiplied with the dimension-reduced projection matrix P to obtain the dimension-reduced state space optimization vector, thereby mapping the high-dimensional features to the low-dimensional principal component space.

[0038] Furthermore, the Deep Q Network model, combined with the state space optimization vector obtained through principal component analysis, enables the value assessment of different offloading actions (i.e., whether the local device executes the task instructions or migrates the task instructions to the edge node for collaborative processing). Through continuous interaction and iterative optimization, the Deep Q Network model learns the optimal action strategy, balancing multiple objective factors such as task completion delay and energy consumption, and generates an (N+1)-dimensional Q-value vector, providing a quantitative basis for scheduling decisions. The structure of the Deep Q Network model is shown below: Input layer: receives the state space optimization vector S of the r-dimensional principal component t .

[0039] Hidden layer: Contains two fully connected layers, each consisting of 128 neurons and using the ReLU function as the activation function. The hidden layer can be expressed as follows: h (1) =ReLU(W (1) S t +b (1) );h (2) =ReLU(W (2) h (1) +b (2) ) Among them, h (l) is the lth fully connected layer. W (l) 、b (l) are the weight of layer l and the bias of layer l respectively. ReLU(x)=max(0,x).

[0040] Output layer: Contains N+1 neurons, no activation function (i.e., linear output), and the corresponding action set A={a0,...,aN}. The output layer can be expressed as follows: Q(S t ;θ)=W (3) h (2) +b (3) ,Q∈R N+1 Where θ={W (1) ,b (1) ,W (2) ,b (2) ,W (3) ,b (3)}.

[0041] The specific operations of the deep Q network model are as follows: The input layer receives the state space optimization vector S after dimensionality reduction t After that, the input layer does not change the data dimension in essence, but only completes data reception and format verification. The input layer first optimizes the state space vector S t Verify whether the vector dimension is consistent with the network preset input dimension r. If the dimension does not match, the input layer throws an exception or performs zero padding / truncation to ensure that the network forward calculation is correct, and then the state space optimization vector S after verification or processing is used. t Passed to the first hidden layer. The first hidden layer transforms the original state space optimization vector S through linear transformation combined with nonlinear activation. t Mapped to a high-dimensional feature space to capture the complex combination relationship between the original features. The first hidden layer distributes the weight of the input dimension for each neuron corresponding to each row through the preset weight matrix in the first hidden layer, and provides an adjustable baseline for each neuron through the bias vector of the first hidden layer, thereby achieving the optimization of the state space vector S t Each element in is linearly weighted and superimposed with the bias vector to obtain the linear output vector of the first hidden layer. Then, the first hidden layer performs nonlinear activation processing on the linear output vector through the ReLU function to force all negative values in the linear output vector to be output as 0, while introducing nonlinearity and improving sparsity, which helps to resist gradient disappearance. After processing the first hidden layer, the activation vector h is obtained. (1) =[h1 (1) ,,h H (1) ] T , and input this vector into the second hidden layer. A deeper transformation is performed on the basic features extracted by the first hidden layer, and the high-order feature combination in the state vector is mined again to provide a richer data representation for the output layer. The data processing process of the second hidden layer is the same as that of the first hidden layer, so it will not be described here. For details, please refer to the data processing process of the first hidden layer. After the processing of the second hidden layer, the activation vector h is obtained. (2) =[h1 (2) ,,h H (2) ] T , and inputs the vector to the output layer. The output layer maps the high-dimensional features extracted by the second hidden layer into the value estimation of each action, that is, the (N+1)-dimensional Q-value vector, where each element corresponds to a scheduling action (i.e., local execution or migration to a certain node). The output layer is in the activation vector h (2) After linear transformation, the Q value vector is output, and the element q j Corresponding action a jThe output layer does not use a nonlinear activation function, but directly uses the linear result as the Q value to retain the negative possibility and unbounded nature of the value estimate. The final Q value vector can be expressed as Q(S t ;θ)=[Q(S t ,a0),……,Q(S t ,a N )] T , the length of this vector is N+1, which provides the basis for the subsequent ε-greedy strategy.

[0042] Ultimately, the ε-greedy strategy achieves an “exploration-exploitation” balance by selecting the optimal action with high probability and randomly exploring with low probability, thus ensuring optimal long-term performance. Specifically, the initial exploration rate ε0 (for example, 0.2) and the minimum exploration rate ε min (e.g., 0.01), the decay rate δ (e.g., per step ε t+1 =max(ε min ,0.995*ε t )). And for each state decision time t, generate a uniformly distributed random number u∈[0,1]. The maximum Q value action screening process can be expressed by the following formula: in, is the Q-value vector of all actions at time t. Returns the index of the action with the maximum Q value. is uniformly randomly selected from the action set A. is the current exploration probability.

[0043] Thus, the action a is selected t Record to the dynamic scheduling strategy P∋(S t → a t ), and (S t ,a t ) is stored in the experience replay pool together with the subsequent rewards and new states to support subsequent online learning. After each online or offline training is completed, the attenuation rate δ is updated , to ensure that there is sufficient exploration in the early stages of training, and more use of learned knowledge in the later stages.

[0044] Through the ε-greedy strategy, each state input generates a deterministic action choice, forming a complete dynamic scheduling strategy. This strategy balances immediate benefits with long-term optimization, providing feasible and stable offloading decisions for real-world tasks in heterogeneous edge networks.

[0045] Step S4: performing a Monte Carlo simulation interference analysis on the dynamic scheduling strategy to obtain an interference probability matrix.

[0046] Before performing interference analysis, it is necessary to → The scheduling decision of node j extracts the physical and network parameters necessary for building the interference model. These parameters come from the real-time resource status dataset and scheduling policy table collected and processed in the previous step. Extracting these parameters can provide accurate and complete input for subsequent interference scenario modeling, making the entire Monte Carlo simulation based on a real environment, and ultimately obtaining a reliable interference probability estimate to guide scheduling optimization. Specifically, by traversing the dynamic scheduling policy, all entries are read from the dynamic scheduling policy. Each entry format (k, j) indicates that task k is offloaded or executed on node j. The table is read into the memory structure in row order or batches, and each (k, j) pair is prepared for processing. Therefore, for each (k, j) pair, the record corresponding to the timestamp t in the real-time resource status dataset is queried, containing {N j core ,η j cpu ,M j free ,B j ,H j,k ,d(j,k),V jk up ,T jk l ,T jk e}. Where N j core is the number of CPU cores of node j, η j cpu is the average CPU utilization of node j, M j free is the available memory of node j, B j is the available bandwidth of node j, H j,k is the channel gain between node j and task k, d(j,k) is the straight-line distance between node j and device k, V jk up is the maximum upload rate of task k to node j, T jk l 、T jk e Predict local and edge execution times for task k on node j.

[0047] In terms of interference source parameter configuration, in order to complete the construction of the interference scenario model, it is necessary to specify a potential interference source set {1, ..., n}. The embodiment of the present application adopts a regional pre-configuration method (i.e., pre-defining the static coordinates and transmit power of n interference sources in the deployment area (e.g., 5km × 5km)), or a random distribution method (i.e., randomly generating n interference source positions and channel gains before each simulation). At the same time, for the static method, it is necessary to load {(x m ,y m ),p m up ,H m,k (0)} n m=1 . Among them, (x m ,y m ) is the coordinate of the mth interference source, p m up is the transmission power of the mth interference source, H m,k (0) is the basic channel gain. Then, a model parameter set P is generated for each task-node pair (k, j) jk ={P j up ,H j,k ,d(j,k),B j ,{(x m ,y m ),p m up ,H m,k (0)} n m=1}, where P j up is the uplink transmission power of node j. Finally, all model parameter sets P jk Organize into lists or dictionaries and store them in memory or serialized files for fast access.

[0048] It should be understood that the interference scenario model strictly describes the main link (task k → The relationship between power transmission and path loss between node j) and all potential interference sources. By establishing an interference scenario model and using the laws of physics to accurately simulate signal propagation and interference superposition behavior, a core calculation formula is provided for Monte Carlo simulation. Specifically, the free space path loss or urban model is used to estimate the power loss of the signal after distance attenuation. The free space path loss formula is applicable to unobstructed environments; if there is obstruction, a shadow fading model can be added to the basis. Furthermore, the received power of the main link reaching the node (i.e., the main link signal strength) is calculated using the transmit power, path loss, and channel gain using the formula shown below: in, is the transmit power of node j. is the link channel gain. is the path loss for the corresponding distance. The main link signal strength is used to quantify the actual received signal power of the main link and serves as an interference comparison benchmark.

[0049] At the same time, the received powers of all interference sources are accumulated according to the energy superposition principle using the formula shown below to obtain the total interference power.

[0050] in, 、 、 is the transmission power, channel gain and distance to node j of the mth interference source.

[0051] The ratio of the primary link signal strength to the interfering link power is then calculated as the interference determination metric for a single simulation (i.e., the signal-to-interference ratio). The signal-to-interference ratio is then compared with a preset protection threshold θ to determine whether unacceptable interference has occurred.

[0052] Finally, the above calculation process and necessary parameters are encapsulated to form the object M of the interference scene model jk ={dRSS,iRSS,PL(d),θ}, where PL(d) is the path loss at distance d. jk And the corresponding task k → The interference scenario model of node j is combined for repeated calls of Monte Carlo simulation.

[0053] It should be understood that Monte Carlo simulation simulates a variety of possible interference environments and link conditions through a large number of random sampling, and counts the frequency of unacceptable interference (signal-to-interference ratio below the threshold) on the main link under these environments, that is, the interference probability. Monte Carlo simulation does not need to solve complex analytical formulas, and can take into account both channel randomness and the diversity of interference sources, providing a probabilistic risk assessment for scheduling decisions. Monte Carlo simulation first needs to configure simulation parameters such as the preset total number of simulations N, the number of interference sources n, and the protection ratio threshold θ. At the same time, for each simulation m=1…N, the interference source locations are uniformly and randomly distributed within a given area (for example, 5km×5km), and the channel gain is randomly sampled for each interference source, as well as using fixed or random transmission power. Next, the interference scenario model is called to calculate the dRSS and iRSS of the current test, and the signal-to-interference ratio is calculated using the following formula: in, is the signal-to-interference ratio. Further, the obtained signal-to-interference ratio is compared with the preset protection ratio threshold θ. When <θ, it is recorded as an “interference event” Im=1; otherwise Im=0.

[0054] Finally, the interference probability q of task k on node j is calculated through the mean summation formula k,j (i.e., the average occurrence rate of interference events under a large statistical sample). Interference probability q k,j It can accurately reflect the interference risk faced by the scheduling decision in the current and random environment.

[0055] Furthermore, it is necessary to combine the tasks according to a unified structure – the node interference probability q k,j , thus forming the interference probability matrix {q k,j}, so that the subsequent nonlinear programming solution steps can be quickly called and constraint judgment can be made. Specifically, in the pre-created empty matrix Q, the row index corresponds to task k, and the column index corresponds to the action (local execution a0 or migration to node 1...N). For each strategy record (task k → Node j), if j>0 (i.e. migrate to node j), the interference probability q of the combination k,j Write the empty matrix Q in row k and column j; if j = 0 (i.e., local execution), the interference can be set to 0 or the local interference probability can be estimated separately. Finally, the matrix in the filled interference probability matrix is serialized into a CSV, JSON, or binary file and written to a database or memory table for direct reading and constraint checking in subsequent steps. In the complete interference probability matrix Q, each element q k,j It represents the interference risk when assigning task k to node j under the current dynamic scheduling strategy. The two-dimensional structure facilitates the call of constraint functions in subsequent nonlinear programming modeling.

[0056] Step S5: performing nonlinear programming on the real-time resource status data set and the task instructions to obtain an objective function, and performing constraint solving on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

[0057] It should be understood that nonlinear programming requires converting all physical quantities and task requirements involved in optimization into numerical variables, with clear upper and lower bounds and meanings. Key variables must be extracted from real-time resource status datasets and externally received task instructions to provide the necessary parameters for constructing the optimization model's objective function and constraints.

[0058] First, read the corresponding resource status entry in the resource status dataset at the current scheduling time t from the time series database or memory cache. Each entry record contains S j (t)=[Ncore ,η cpu ,M free ,B j ,H i ,d(i,j)], the record is indexed by node IDj to ensure one-to-one matching. For the obtained resource status entry, computing power extraction, bandwidth extraction and transmission power extraction are required. Among them, computing power f j e is the number of CPU cycles that can be executed per second by the corresponding node j, and the computing power f is measured by timely benchmarking j e , and stored in the node configuration table. For those not directly provided in the configuration table, the computing power f can be estimated by measuring the single cycle execution time under no-load. j e Bandwidth B j For the external link bandwidth available to node j, the current theoretical bandwidth limit can be queried in real time through the network card driver or SNMP, or the existing fields can be directly read from the real-time status data set. For nodes with multiple links (for example, 5G+Wi-Fi), the primary link bandwidth is selected according to the configuration strategy or the bandwidths of multiple links are recorded separately. Transmission power p j up is the uplink transmit power of node j, which can be obtained in real time from the hardware monitoring unit (e.g., the driver interface or RRM module), or read from the static configuration file and then determined in combination with the current power adjustment policy. For nodes that adjust transmit power to adapt to network conditions (e.g., based on RSCP / RSRP), the policy module calculates the current power in real time and writes the obtained value into the runtime parameter set. At the same time, the received external task instructions are parsed as mentioned in the above steps to obtain information including but not limited to the task data volume D. k , maximum tolerable delay T k tol And the computing requirements C required for task execution k Etc. And the task information obtained by the above analysis is stored in the task description dictionary. In order to facilitate subsequent data retrieval, after completing the real-time resource status data extraction and task instruction parsing, the above data set is combined into a model parameter set, that is, for each node and task instruction node-task combination (j, k) to form a model parameter set entry P j,k =(f j e ,B j ,p j up ,D k ,T k tol ,C k ).

[0059] To comprehensively consider the two objectives of task execution delay and energy consumption, the present embodiment employs a nonlinear programming model to construct the aforementioned model parameter set entries based on preset energy consumption weights. The objective function of this nonlinear programming model uses the energy consumption weights to adjust the balance between task execution delay and energy consumption. Specifically, the objective function shown below is used to perform a weighted combination of physical quantities, converting a multi-objective optimization into a single-objective weighted sum.

[0060] in, , The maximum upload rate. . , is the amount of result data (i.e., the size of the output data that needs to be sent back to the local device after task k completes the calculation on the corresponding node j). . . . is the energy consumption weight of task k.

[0061] Therefore, the weighted sum of the local costs of all task-node combinations is performed according to the single objective function to form the global optimization objective .in, ∈{0,1} is a binary decision variable used to indicate whether task k is assigned to the corresponding node j.

[0062] Furthermore, during the nonlinear programming process, in addition to minimizing the objective, multiple functional constraints must be met, including task deadlines (i.e., latency constraints), interference risk limits (i.e., interference probability constraints), and system resource limits (i.e., bandwidth and computing resource constraints), to ensure that the optimization results are both cost-effective and feasible. The functional constraint set can be expressed as follows: in, is the interference probability obtained in step S4. is the preset interference probability threshold. The ratio of the available bandwidth of each node j occupied by each task, and the total ratio does not exceed 100%. Each node j is assigned CPU resources for task k, and the total does not exceed the node's total computing capacity. The set of function constraints defines the feasible domain of all optimization variables and various performance and safety constraints, providing input to the constraint processing module of the dual solver.

[0063] Finally, in order to reduce the complexity of the mixed integer nonlinear programming, the embodiment of the present application first adopts Lagrange dual decomposition for the objective function, and introduces Lagrange multipliers to relax the complex constraints into the objective function, decomposing the original problem into easy-to-handle sub-problems, and combining it with the sub-gradient method iteration to effectively solve large-scale nonlinear constrained optimization. Specifically, first introduce bandwidth and computing resource constraints into the objective function and introduce multipliers μ j and υ j , to obtain the formula shown below: By adjusting μ j ,υ j Punish illegal solutions, thus integrating resource constraints into the goal. The formula is solved iteratively using the subgradient method to achieve , , Minimize, μ j ,υ j Maximize. μ is calculated by the following formula j ,υ j Alternating optimization is performed to achieve the overall optimum.

[0064] in, Indicates that the step size decays with the number of iterations.

[0065] Specifically, in each dual iteration, fix the current μ j ,υ j , solve the original problem to obtain , , . And based on the current , , Excessive computing resource usage , Therefore, according to the excess use of computing resources, μ j ,υ j Repeat the previous steps until Less than the preset threshold. When the current value is less than the preset threshold, the , , is an approximate optimal solution. Thus, the optimal solution is combined into the optimal resource allocation combination Z*={ , *, *}. Based on the optimal resource allocation combination Z*, the system can be guided to schedule computing resources for the received task instructions to minimize the total cost of executing the task instructions.

[0066] In an optional embodiment, in order to utilize real execution feedback to perform closed-loop online optimization of the deep Q network model and case library to continuously improve the system's adaptability and scheduling effect in a dynamic heterogeneous edge environment, the method further includes: After a task is scheduled, it is necessary to execute and monitor the results in the actual network and computing environment to obtain the performance indicators of the task during real-time operation. Only by obtaining real-world execution latency, energy consumption, and resource load data can it be fed back to the reinforcement learning model for online updates and adaptive optimization of the scheduling strategy. Specifically, the actual completion indicators of each task k on the assigned node j are recorded by intercepting and recording the following data at node j or the central controller: T jk actual : The actual total execution delay of task k, including uploading, calculation and return; E jk actual : The total energy consumption during the actual execution process, including the energy consumption of device transmission, waiting and receiving; λ jk actual : The actual proportion of task k in the bandwidth allocation of node j; η cpu (j) (t): sampling curve of CPU utilization of node j over time during execution; N interfered : The number of interference events actually detected during the execution of task k.

[0067] The data scattered in different modules and moments are integrated into a unified "online experience" format, and the timestamp t when the task is completed is used as the index, and the above records are encapsulated into structured entries X jk (t)=(S t ,a t ,T jk actual ,E jk actual ,η cpu (j) (t),λ jk actual ,N interfered ). Among them, S t is the resource state vector before action selection, a tThe action selected at time t (i.e., the local device execution or transmission node number). During execution monitoring, the sampling frequency needs to be controlled to avoid excessive writes that cause storage pressure. The experience replay buffer is written uniformly by setting a sampling window. If the buffer is full, the oldest entry is ejected using a FIFO to ensure the freshness of subsequent model training samples.

[0068] Online collected data inevitably contains outliers, missing values or noise, which will affect the stability and convergence of the model if used directly for training. Cleaning and feature extraction convert the original samples into standardized and structured training tuples (S t ,a t ,r t ,S t+1 ), so that it meets the input requirements of deep reinforcement learning. Specifically, the upper and lower bounds of the delay and energy consumption values are checked. When the delay or energy consumption value is greater than the preset fault tolerance threshold, the sample is marked as abnormal and discarded. cpu (j) (t) or λ jk actual Key indicators such as are calculated using sliding window mean to compensate for missing data. At the same time, a reward signal is constructed based on the instant execution results, i.e., r t =-( ). Immediately after the action is executed, the new resource state vector is collected and reduced in dimension by principal component analysis to obtain S t+1 . t Mapping from node number to one-hot encoding vector e of length N+1 at . Thus, the cleaned and extracted data are encapsulated as training tuples (S t ,e at ,r t ,S t+1 ) is stored in the standard experience replay buffer D.

[0069] Thus, a sample set {(S t ,a t ,r t ,S t+1 )} i=1 B The target Q value calculation formula and mean squared error loss function in the deep Q-network model are applied to the sample set to obtain the target Q value and mean squared error loss. The Adam optimizer is then used to perform gradient descent on the main network parameter θ in the deep Q-network model to reduce the mean squared error and make the main network's Q value prediction more accurate. Furthermore, after each gradient update, the update count u in the update counter is automatically incremented by 1. This update count is used for subsequent target network synchronization judgments.

[0070] When the number of updates u reaches the preset synchronization period C, all weights and biases are copied at once using a dedicated interface available in the deep learning framework to assign the current parameters θ of the main network to the target network θ as a whole. - After synchronization, the target network uses the new parameters in the next Q-target calculation of the Deep Q-Network model, ensuring that its estimate has a certain degree of timeliness. The master network in the Deep Q-Network model continues to perform the above-mentioned free updates, forming a "master-target" collaborative learning mechanism.

[0071] This application is applied to the field of task scheduling technology. By constructing a multi-dimensional state of heterogeneous edge node resources and task instructions to obtain a real-time resource status data set, performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix, performing adaptive deep reinforcement learning on the task-resource matching feature matrix through a deep Q network model to obtain a dynamic scheduling strategy, performing Monte Carlo simulation interference analysis on the dynamic scheduling strategy to obtain an interference probability matrix, performing nonlinear programming on the real-time resource status data set and task instructions to obtain an objective function, and combining the interference probability matrix to perform constraint solving on the objective function to obtain the optimal resource allocation combination. This application organically integrates multi-dimensional perception, spatiotemporal correlation, deep reinforcement learning, probabilistic robust analysis, and nonlinear optimal solution to not only achieve efficient and reliable scheduling in complex heterogeneous environments, but also significantly improve the comprehensive performance of edge computing systems in terms of latency, throughput, energy consumption, and robustness.

[0072] like Figure 2 As shown, it is a functional module diagram of a task scheduling device based on edge computing provided in an embodiment of the present application.

[0073] In some embodiments, the task scheduling device 2 based on edge computing may include multiple functional modules composed of computer program segments. The computer program of each program segment in the task scheduling device 2 based on edge computing may be stored in the memory of the server and executed by at least one processor to execute (see Figure 1 (Describes) the functionality of a task scheduling method based on edge computing.

[0074] In this embodiment, the edge computing-based task scheduling device 2 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a resource monitoring module 21, a spatiotemporal analysis module 22, a dynamic scheduling module 23, an interference simulation module 24, an optimal allocation module 25, and a feedback optimization module 26. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0075] The resource monitoring module 21 is used to perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource state data set.

[0076] In an optional embodiment, the resource monitoring module 21 is specifically configured to: Performing real-time node resource collection on heterogeneous edge nodes to obtain the computing resource data, the communication resource data, and the distance between the nodes; Performing state vector construction on the computing resource data, the communication resource data, and the inter-node distance to obtain a resource state vector; Performing task upload analysis based on the communication resource data using a preset channel capacity model to obtain a maximum rate at which tasks are uploaded to the edge node; Performing task execution prediction processing according to the task quantity in the received task instruction, the computing resource data, and the communication resource data to obtain an execution time of the edge node; Data structure fusion is performed on the resource state vector, the maximum rate, and the execution time according to a time series to obtain the real-time resource state data set.

[0077] The spatiotemporal analysis module 22 is configured to perform spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix.

[0078] In an optional embodiment, the spatiotemporal analysis module 22 is specifically configured to: Performing mean calculation on the computing resource data in the real-time resource status data set according to a preset sliding window to obtain a CPU utilization mean; Calculating the transmission time of the inter-node distances in the real-time resource status data set to obtain transmission delay data between the nodes, and constructing a communication delay matrix based on the preset edge node coordinates and the transmission delay data; The preset task attribute data, the CPU utilization mean, and the communication delay matrix are subjected to resource state parameter fusion and normalization processing to obtain the task-resource matching feature matrix.

[0079] The dynamic scheduling module 23 is used to perform adaptive deep reinforcement learning on the task-resource matching feature matrix through a preset deep Q network model to obtain a dynamic scheduling strategy.

[0080] In an optional embodiment, the dynamic scheduling module 23 is specifically configured to: Performing principal component analysis and dimensionality reduction on the task-resource matching feature matrix to obtain a state space optimization vector; Performing deep reinforcement learning on the state space optimization vector through a preset deep Q network model to obtain an (N+1)-dimensional Q-value vector; The Q value vector is subjected to maximum Q value action screening processing according to a preset ε-greedy strategy to obtain the dynamic scheduling strategy.

[0081] The interference simulation module 24 is configured to perform an interference analysis of the dynamic scheduling strategy using Monte Carlo simulation to obtain an interference probability matrix.

[0082] In an optional implementation, the interference simulation module 24 is specifically configured to: Extract relevant parameters from the real-time resource status data set according to the dynamic scheduling strategy to obtain a model parameter set corresponding to each task; Constructing an interference scenario model for the model parameter set to obtain an interference scenario model corresponding to each task; Performing Monte Carlo simulation on the interference scenario model to obtain the interference probability corresponding to each task; All interference probabilities are vectorized according to the dynamic scheduling strategy to obtain the interference probability matrix.

[0083] The optimal allocation module 25 is used to perform nonlinear programming on the real-time resource status data set and the task instructions to obtain an objective function, and perform constraint solving on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

[0084] In an optional embodiment, the optimal allocation module 25 is specifically configured to: Extracting and processing the real-time resource status data set to obtain the computing capacity, bandwidth, and transmission power of each node, and parsing and processing the task instructions to obtain the task data volume and the maximum tolerable delay; Performing nonlinear weighted planning on the computing capacity, the bandwidth, the transmission power, and the task data volume according to a preset energy consumption weight to obtain the objective function; Constraining the objective function according to the maximum tolerable delay and the interference probability matrix to obtain a function constraint condition set; The objective function is subjected to Lagrangian dual decomposition and sub-gradient solution processing according to the function constraint condition set to obtain the optimal combination of resource allocation.

[0085] In an optional embodiment, the edge computing-based task scheduling device 2 further includes a feedback optimization module 26, and the feedback optimization module 26 is specifically used to: Performing execution monitoring on the optimal resource allocation combination to obtain real-time task flow data samples; Performing data cleaning and feature extraction processing on the real-time task flow data sample to obtain tuple data; Randomly sampling the tuple data to obtain a training set, and updating the main network parameters of the deep Q network model according to the training set through a preset mean square error loss function; When the number of updates of the main network parameters reaches a preset update number threshold, the main network parameters are synchronized with the target network parameters in the deep Q network model to update the deep Q network model.

[0086] It should be understood that the various variations and specific embodiments of the methods provided in the above embodiments are also applicable to the edge computing-based task scheduling device of this embodiment. Through the above detailed description of the edge computing-based task scheduling method, those skilled in the art can clearly understand the implementation method of the edge computing-based task scheduling device of this embodiment. For the sake of brevity of the specification, it will not be described in detail here.

[0087] like Figure 3 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0088] In a preferred embodiment of the present invention, the electronic device 3 may include, but is not limited to: a memory 31 , at least one processor 32 and at least one communication bus 33 .

[0089] Those skilled in the art should understand that Figure 3 The structure of the electronic device 3 shown does not constitute a limitation of the embodiment of the present invention. The electronic device 3 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.

[0090] In some embodiments, the electronic device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors and embedded devices.

[0091] It should be noted that the electronic device 3 is only an example. Other existing or future electronic products that are suitable for this application should also be included in the scope of protection of this application and included here by reference.

[0092] In some embodiments, the memory 31 stores a computer program that, when executed by the at least one processor 32, implements all or part of the steps in the edge computing-based task scheduling method. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data. Furthermore, the computer-readable storage medium may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like.

[0093] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the electronic device 3. It connects the various components of the entire electronic device 3 using various interfaces and lines. It executes or runs programs or modules stored in the memory 31 and calls data stored in the memory 31 to perform various functions of the electronic device 3 and process data. For example, when the at least one processor 32 executes the computer program stored in the memory 31, it implements all or part of the steps of the edge computing-based task scheduling method described in the embodiments of the present application; or it implements all or part of the functions of the edge computing-based task scheduling device. The at least one processor 32 can be composed of an integrated circuit, such as a single packaged integrated circuit or multiple packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips.

[0094] In some embodiments, the at least one communication bus 33 is configured to enable communication between the memory 31 and the at least one processor 32. Although not shown, the electronic device 3 may also include a power supply (e.g., a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 32 via a power management device, thereby enabling the power management device to manage charging, discharging, and power consumption. The power supply may also include one or more DC or AC power supplies, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other components. The electronic device 3 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be detailed here.

[0095] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module stored in a storage medium includes a number of instructions for causing an electronic device (which can be a personal computer, electronic device, or network device, etc.) or a processor to execute portions of the methods described in various embodiments of the present application.

[0096] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is only a logical function division, and other division methods may be used in actual implementation.

[0097] 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 units, and may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of this embodiment based on actual needs.

[0098] The above are all preferred embodiments of the present application, and are not intended to limit the scope of protection of the present application. Therefore, any equivalent changes made based on the structure, shape, and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A task scheduling method based on edge computing, characterized in that: The method comprises: Perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and received task instructions to obtain a real-time resource status dataset; Performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix; Adaptive deep reinforcement learning is performed on the task-resource matching feature matrix through a preset deep Q-network model to obtain a dynamic scheduling strategy; performing an interference analysis of the dynamic scheduling strategy using Monte Carlo simulation to obtain an interference probability matrix; Nonlinear programming is performed on the real-time resource status data set and the task instructions to obtain an objective function, and constraint solving is performed on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

2. According to the task scheduling method based on edge computing in claim 1, the heterogeneous edge node resources include computing resource data, communication resource data and inter-node distance, characterized in that: The multi-dimensional state construction process of the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource state data set includes: Performing real-time node resource collection on heterogeneous edge nodes to obtain the computing resource data, the communication resource data, and the inter-node distance; Performing state vector construction on the computing resource data, the communication resource data, and the inter-node distance to obtain a resource state vector; Performing task upload analysis based on the communication resource data using a preset channel capacity model to obtain a maximum rate at which tasks are uploaded to the edge node; Performing task execution prediction processing according to the number of tasks in the received task instruction, the computing resource data, and the communication resource data to obtain an execution time of the edge node; Data structure fusion is performed on the resource state vector, the maximum rate, and the execution time according to a time series to obtain the real-time resource state data set.

3. The task scheduling method based on edge computing according to claim 1, characterized in that: The performing spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix includes: Performing mean calculation on the computing resource data in the real-time resource status data set according to a preset sliding window to obtain a CPU utilization mean; Calculating the transmission time of the inter-node distances in the real-time resource status data set to obtain transmission delay data between the nodes, and constructing a communication delay matrix based on the preset edge node coordinates and the transmission delay data; The preset task attribute data, the CPU utilization mean, and the communication delay matrix are subjected to resource state parameter fusion and normalization processing to obtain the task-resource matching feature matrix.

4. The task scheduling method based on edge computing according to claim 1, characterized in that: The adaptive deep reinforcement learning of the task-resource matching feature matrix by a preset deep Q network model to obtain a dynamic scheduling strategy includes: Performing principal component analysis and dimensionality reduction on the task-resource matching feature matrix to obtain a state space optimization vector; Performing deep reinforcement learning on the state space optimization vector through a preset deep Q network model to obtain an (N+1)-dimensional Q-value vector; The Q value vector is subjected to maximum Q value action screening processing according to a preset ε-greedy strategy to obtain the dynamic scheduling strategy.

5. The task scheduling method based on edge computing according to claim 1, characterized in that: The interference analysis of the dynamic scheduling strategy by performing Monte Carlo simulation to obtain an interference probability matrix includes: Extract relevant parameters from the real-time resource status data set according to the dynamic scheduling strategy to obtain a model parameter set corresponding to each task; Constructing an interference scenario model for the model parameter set to obtain an interference scenario model corresponding to each task; Performing Monte Carlo simulation on the interference scenario model to obtain the interference probability corresponding to each task; All interference probabilities are vectorized according to the dynamic scheduling strategy to obtain the interference probability matrix.

6. The task scheduling method based on edge computing according to claim 1, characterized in that: The performing nonlinear programming on the real-time resource status data set and the task instructions to obtain an objective function, and performing constraint solving on the objective function according to the interference probability matrix to obtain an optimal resource allocation combination includes: Extracting and processing the real-time resource status data set to obtain the computing capacity, bandwidth, and transmission power of each node, and parsing and processing the task instructions to obtain the task data volume and the maximum tolerable delay; Performing nonlinear weighted planning on the computing capacity, the bandwidth, the transmission power, and the task data volume according to a preset energy consumption weight to obtain the objective function; Constraining the objective function according to the maximum tolerable delay and the interference probability matrix to obtain a function constraint condition set; The objective function is subjected to Lagrangian dual decomposition and sub-gradient solution processing according to the function constraint condition set to obtain the optimal combination of resource allocation.

7. The task scheduling method based on edge computing according to claim 4, characterized in that: The method further comprises: Performing execution monitoring on the optimal resource allocation combination to obtain real-time task flow data samples; Performing data cleaning and feature extraction processing on the real-time task flow data sample to obtain tuple data; Randomly sampling the tuple data to obtain a training set, and updating the main network parameters of the deep Q network model according to the training set through a preset mean square error loss function; When the number of updates of the main network parameters reaches a preset update number threshold, the main network parameters are synchronized with the target network parameters in the deep Q network model to update the deep Q network model.

8. A task scheduling device based on edge computing, characterized in that: The device comprises: The resource monitoring module is used to perform multi-dimensional state construction processing on the obtained heterogeneous edge node resources and the received task instructions to obtain a real-time resource status data set; A spatiotemporal analysis module, configured to perform spatiotemporal correlation analysis on the real-time resource status data set to obtain a task-resource matching feature matrix; A dynamic scheduling module is used to perform adaptive deep reinforcement learning on the task-resource matching feature matrix through a preset deep Q-network model to obtain a dynamic scheduling strategy; An interference simulation module, configured to perform a Monte Carlo simulation interference analysis on the dynamic scheduling strategy to obtain an interference probability matrix; The optimal allocation module is used to perform nonlinear programming on the real-time resource status data set and the task instructions to obtain an objective function, and to perform constraint solving on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the edge computing-based task scheduling method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the task scheduling method based on edge computing according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Automatic task allocation method and system for elevator emergency rescue platform

    CN119624062A

  • Edge computing resource allocation optimization method and system based on reinforcement learning

    CN119862029A

  • Service proxy method and system based on Dores front-end node

    CN119938335A

  • Multi-robot multi-task collaborative working method, and server

    WO2022094746A1

Cited By

  • Power distribution network dynamic planning investment decision-making method and system based on deep double-Q network

    CN121073262A

  • Multi-dimensional phase space scheduling method and device, equipment and medium

    CN121462583A

  • Machine learning-based emerging cloud resource elastic scheduling method and system

    CN122248068A

  • An emerging cloud resource elastic scheduling method and system based on machine learning

    CN122248068B