Task scheduling method and device based on edge computing, equipment and storage medium
By constructing a real-time resource status dataset through edge computing and performing deep reinforcement learning and Monte Carlo simulation, the problems of task scheduling flexibility and resource utilization in edge environments are solved, achieving efficient and stable task allocation and energy consumption optimization.
Patent Information
- Application Number
- CN202510591484.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-05-08
AI Technical Summary
Existing task scheduling methods struggle to quantify network latency fluctuations and interference risks in complex, time-varying edge environments, leading to resource waste, QoS fluctuations, and ineffective energy consumption control.
By using edge computing-based methods, a real-time resource status dataset is constructed, spatiotemporal correlation analysis and adaptive deep reinforcement learning are performed to generate dynamic scheduling strategies, and resource allocation is optimized through Monte Carlo simulation and nonlinear programming to form an interference probability matrix and optimal combination.
It improves the flexibility and generalization of scheduling, ensuring a high success rate and quality of service when facing sudden network congestion or node failures, while maximizing resource utilization and reducing system energy consumption while ensuring task latency and reliability.
Smart Images

Figure CN120448069B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of task scheduling, in particular to a task scheduling method and device based on edge computing, equipment and storage medium. BACKGROUND
[0002] With the rapid development of cloud computing, mobile Internet and Internet of Things, the types and scale of tasks are growing, the node heterogeneity and network volatility are increasingly prominent, and the traditional static or centralized scheduling method has been difficult to meet the multiple demands for real-time, reliability and energy consumption optimization. An efficient scheduling strategy can perceive resource state in advance, reasonably balance load and communication, maximize the release of computing power, and provide stable and low-latency service experience for users.
[0003] The existing task scheduling method can be mainly divided into two categories: classic static scheduling algorithm and dynamic scheduling algorithm. The static method makes a round of planning through pre-acquired resource and task information; the dynamic method includes threshold scheduling based on load monitoring, heuristic search (such as genetic algorithm, particle swarm optimization), resource allocation based on game theory or market mechanism, and reinforcement learning scheduling model rising in recent years. There are many successful applications in large-scale data centers and cloud platforms, which can take into account task completion time and resource utilization to some extent, and support simple rescheduling when nodes fail or load surges.
[0004] However, the existing task scheduling method can usually only perform allocation based on rough indicators or fixed thresholds, and it is difficult to quantify network delay fluctuations and interference risks, and it is also impossible to continuously update the strategy through online learning, resulting in problems such as resource waste, QoS fluctuation and energy consumption that cannot be effectively controlled in complex and time-varying edge environments. SUMMARY
[0005] Therefore, the present application provides a task scheduling method and device based on edge computing, equipment and storage medium to solve the problem of efficiently and stably executing tasks in a heterogeneous complex environment.
[0006] The first aspect of the present application provides a task scheduling method based on edge computing, which comprises:
[0007] 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;
[0008] Performing spatio-temporal correlation analysis processing on the real-time resource state data set to obtain a task-resource matching feature matrix;
[0009] Performing adaptive deep reinforcement learning on the task-resource matching feature matrix through a preset deep Q network model to obtain a dynamic scheduling strategy;
[0010] performing interference analysis on the dynamic scheduling strategy by Monte Carlo simulation to obtain an interference probability matrix;
[0011] performing nonlinear programming on the real-time resource state data set and the task instruction 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.
[0012] In an optional implementation, the heterogeneous edge node resources include computing resource data, communication resource data, and inter-node distance, and the multi-dimensional state construction processing performed on the obtained heterogeneous edge node resources and the received task instruction to obtain a real-time resource state data set includes:
[0013] performing real-time collection of node resources of the heterogeneous edge node to obtain the computing resource data, the communication resource data, and the inter-node distance;
[0014] constructing a state vector from the computing resource data, the communication resource data, and the inter-node distance to obtain a resource state vector;
[0015] performing task uploading analysis according to the communication resource data by a preset channel capacity model to obtain a maximum rate of task uploading to an edge node;
[0016] performing task execution prediction processing according to a 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;
[0017] performing data structure fusion on the resource state vector, the maximum rate, and the execution time according to a time sequence to obtain the real-time resource state data set.
[0018] In an optional implementation, the spatio-temporal correlation analysis processing performed on the real-time resource state data set to obtain a task-resource matching feature matrix includes:
[0019] performing mean value calculation on the computing resource data in the real-time resource state data set according to a preset sliding window to obtain a CPU utilization mean value;
[0020] performing transmission time consumption calculation on the inter-node distance in the real-time resource state data set to obtain inter-node transmission delay data, and constructing a communication delay matrix according to a preset edge node coordinate and the transmission delay data;
[0021] The preset task attribute data, the CPU utilization average and the communication delay matrix are fused and normalized to obtain a task-resource matching feature matrix.
[0022] In an optional implementation, the adaptive deep reinforcement learning on the task-resource matching feature matrix by the preset deep Q network model to obtain the dynamic scheduling strategy includes:
[0023] The task-resource matching feature matrix is subjected to principal component analysis and dimension reduction processing to obtain a state space optimization vector.
[0024] The state space optimization vector is subjected to deep reinforcement learning by a preset deep Q network model to obtain a (N+1) -dimensional Q value vector.
[0025] 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.
[0026] In an optional implementation, the interference analysis on the dynamic scheduling strategy by Monte Carlo simulation to obtain an interference probability matrix includes:
[0027] The real-time resource state data set is subjected to relevant parameter extraction according to the dynamic scheduling strategy to obtain a model parameter set corresponding to each task;
[0028] The model parameter set is subjected to interference scenario model construction to obtain an interference scenario model corresponding to each task;
[0029] The interference scenario model is subjected to Monte Carlo simulation processing to obtain an interference probability corresponding to each task;
[0030] All interference probabilities are subjected to vector construction according to the dynamic scheduling strategy to obtain the interference probability matrix.
[0031] In an optional implementation, the nonlinear programming on the real-time resource state data set and the task instruction to obtain a target function, and the constraint solving on the target function according to the interference probability matrix to obtain a resource allocation optimal combination includes:
[0032] The real-time resource state data set is subjected to extraction processing to obtain the computing capacity, bandwidth and transmission power of each node, and the task instruction is subjected to analysis processing to obtain the task data volume and maximum tolerable delay;
[0033] The computing capacity, bandwidth, transmission power and task data volume are subjected to nonlinear weighted programming according to a preset energy consumption weight to obtain the target function.
[0034] constraining the objective function according to the maximum tolerated delay and the interference probability matrix to obtain a set of function constraint conditions;
[0035] performing Lagrange dual decomposition and sub-gradient method solving processing on the objective function according to the set of function constraint conditions to obtain the optimal combination of resource allocation.
[0036] In an optional implementation, the method further includes:
[0037] performing execution monitoring on the optimal combination of resource allocation to obtain real-time task flow data samples;
[0038] performing data cleaning and feature extraction processing on the real-time task flow data samples to obtain tuple data;
[0039] performing random sampling on the tuple data to obtain a training set, and updating main network parameters of the deep Q network model according to the training set through a preset mean square error loss function;
[0040] when the number of updates of the main network parameters reaches a preset update number threshold, synchronizing the main network parameters with target network parameters in the deep Q network model to update the deep Q network model.
[0041] The second aspect of the application provides a task scheduling device based on edge computing, the device comprising:
[0042] a resource monitoring module configured to perform multi-dimensional state construction processing on obtained heterogeneous edge node resources and received task instructions to obtain a real-time resource state data set;
[0043] a space-time analysis module configured to perform space-time correlation analysis processing on the real-time resource state data set to obtain a task-resource matching feature matrix;
[0044] a dynamic scheduling module configured 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;
[0045] an interference simulation module configured to perform interference analysis on the dynamic scheduling strategy through Monte Carlo simulation to obtain an interference probability matrix;
[0046] an optimal allocation module configured to perform nonlinear programming on the real-time resource state 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.
[0047] The third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the edge computing-based task scheduling method when executing the computer program.
[0048] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the edge computing-based task scheduling method.
[0049] In summary, the present application at least has the following beneficial technical effects:
[0050] 1. By inputting the feature matrix into the deep Q network after PCA dimension reduction, and using the ε-greedy strategy to constantly explore and utilize, the system can automatically adjust according to the changes in runtime, avoiding the "rigidity" risk of static scheduling rules, and improving the flexibility and generalization ability of scheduling.
[0051] 2. By Monte Carlo simulation, the interference probability in different scenarios is quantified to form an interference probability matrix, which can enable the resource allocation scheme to maintain high success rate and service quality when facing sudden network congestion or node failure.
[0052] 3. The computing power, bandwidth, transmission power, and task delay tolerance are nonlinearly weighted in the form of energy consumption weight, which maximizes resource utilization rate under the premise of ensuring task delay and reliability, significantly reduces system energy consumption, and balances performance and cost. BRIEF DESCRIPTION OF DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiment or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0054] Figure 1 is a flowchart of an edge computing-based task scheduling method provided by an embodiment of the present application;
[0055] Figure 2 is a functional module diagram of an edge computing-based task scheduling device provided by an embodiment of the present application;
[0056] Figure 3 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0057] 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, and 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.
[0058] The edge computing-based task scheduling method provided in this application is executed by an electronic device, and correspondingly, the edge computing-based task scheduling device runs in the electronic device. The electronic device can be any device in a distributed edge computing system (e.g., an industrial IoT system, a vehicle-to-everything (V2X) system, etc.). The electronic device can automatically trigger the execution of the edge computing-based task scheduling method provided in this application after receiving a new task instruction or after detecting resource load fluctuations at a preset periodic interval. The following description, from the perspective of the electronic device and in conjunction with the task scheduling process after receiving a new task instruction, illustrates the edge computing-based task scheduling method provided in this application.
[0059] like Figure 1 The diagram shows a flowchart of a task scheduling method based on edge computing provided in an embodiment of this application. The task scheduling method based on edge computing provided in this embodiment includes the following steps.
[0060] 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 dataset.
[0061] It should be understood that heterogeneous edge nodes differ in hardware architecture, network conditions, and geographical location. Real-time acquisition of resource data from each edge node in an edge computing system can accurately reflect the current system load. Accurate node resource data provides reliable input for modeling and scheduling, ensuring the effectiveness and accuracy of scheduling decisions. For computing resource acquisition, electronic devices utilize a CPU utilization sensor and a RAPL interface to periodically read the number of CPU cores N of each node. core Real-time utilization rate η cpu And available memory M free It also extracts information such as memory usage and cache occupancy through the operating system kernel monitoring module (e.g., Linux). For communication resource acquisition, it uses the network card driver's ethtool or SNMP protocol to obtain the link bandwidth B. j And the current throughput, and read the channel gain H through the SCI interface. iand noise power N0. If the node supports multiple frequency bands, record the available bandwidth, current occupancy of 5G / 4G / Wi-Fi6 respectively. In the inter-node distance measurement, through the node equipped with a positioning module, the coordinate information of the corresponding node can be directly read, and the straight-line distance d(i,j) between nodes is calculated according to the geodetic measurement formula. For the node without positioning module, the inter-node straight-line distance d(i,j) between local device i and node j is calculated by using the RSSI-based triangular positioning algorithm. The embodiments of the application start collection when receiving new task instructions through the event triggering mechanism. At the same time, in order to facilitate the time domain alignment of data, all collection items are marked with a uniform timestamp.
[0062] The originally collected data has multiple dimensions, large amount and is not easy to be directly used for model input. It is necessary to combine and standardize different types of collected data 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 , wherein the percentage type data (for example, real-time utilization rate η cpu ) is converted to [0,1] interval real number, so as to be unified with other magnitudes. At the same time, the channel gain H i is calculated by the exponential inverse function, so as to convert the decibel value to the linear value. And each resource state vector S j (t) is written as a row in the memory table, and (node ID, timestamp) is used as the index of each resource state vector S j (t) for subsequent fast retrieval, so as to obtain the standardized and formatted resource state vector stream {S j (t)}.
[0063] Further, the bandwidth B j , the channel gain H i and the inter-node straight-line distance d(i,j) are extracted from the resource state vector stream {S j (t)}, and combined with the collected uplink transmission power p i up , the theoretical maximum rate V ij up of the task uploaded from the local device i to the node j is estimated by using the channel capacity theoretical calculation formula of Shannon theorem. ij up Finally, the obtained theoretical maximum rate V ij up of each task-node link is recorded in a memory table, so as to form a rate table {V ij up}.Maximum speed can be used to estimate task upload latency and bandwidth allocation.
[0064] Simultaneously, the task instructions are parsed to obtain the task data volume D. i The number of CPU cycles represents the computing resource data C required for task execution. i and maximum tolerable delay T i tol Furthermore, based on the bandwidth B between local device i and node j... ij Local device computing power f i l And the computing power f of node j j e Combined with the task data volume D in the task instruction i 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 This allows us to obtain the execution time matrix {T} of each task locally and at each candidate edge node. ij l ,T ij e}
[0065] Finally, the data above is aligned by time series correlation. That is, the static resource state vector stream {S} is aligned according to the timestamp of each data point. j (t)}、Maximum speed V ij up (t) and execution time T ij l (t) and T ij e (t) are combined into a single record. Further, the header of the in-memory table is defined based on the node ID and timestamp t to write the above data records into a time-series database (e.g., InfluxDB) or a CSV file, forming a record where each record fully contains computational, 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 This generates a real-time resource status dataset {C(t)}.
[0066] Step S2, spatio-temporal correlation analysis is performed on the real-time resource state data set to obtain a task-resource matching feature matrix.
[0067] It should be understood that the original CPU utilization rate data presents severe short-term fluctuations, and direct use will cause the scheduling model to be sensitive to instantaneous noise. The sliding window mean smoothing technology is adopted in the embodiment of the application to eliminate the influence of short-term bursts and highlight the average level representing the long-term load trend, thereby providing stable input for subsequent feature fusion. Specifically, according to a preset fixed length time window W (for example, 5 consecutive sampling points, corresponding to 5x500ms=2.5s), the continuously collected CPU utilization rate values are batched in time sequence to obtain a CPU utilization rate value sequence {η cpu (t-W+1),η cpu (t-W+2),……,η cpu (t)} in W time slices. The CPU utilization rate mean value of each group of CPU utilization rate values is calculated using the mean summation formula cpu , and the CPU utilization rate mean value of the past W acquisition points cpu represents the CPU utilization rate mean value of the time point t cpu (t).
[0068] Since the nodes in the edge environment present spatial heterogeneity, the distance between nodes directly affects the data transmission delay. The transmission delay between all pairs of nodes is calculated and matrixed, which can quantify the network cost of different node cooperation for the scheduling model. Specifically, based on the distance d between nodes and the constant speed of light, the theoretical transmission time is calculated, and combined with the additional processing time Γ proc of the preset switch / network interface, etc. (i.e., inter-node message processing or queuing overhead delay), the end-to-end transmission delay data T comm between each pair of nodes is calculated. It should be understood that the edge nodes are logically distinguished by numbers 1……N, each having corresponding physical coordinate information. After obtaining the transmission delay data T comm , the transmission delay data T comm is stored in an N*N delay two-dimensional matrix, and the row and column indexes of which correspond to the node numbers. Further, the matrix can be serialized into a CSV, JSON, etc. database for subsequent step query. Finally, the obtained communication delay matrix {T jk comm} clearly reflects the network delay characteristics between any two nodes j and k.
[0069] It should be understood that the task-resource matching feature matrix needs to comprehensively consider the attributes of the task itself (for example, data volume, tolerance delay) and the spatiotemporal state of the node (that is, CPU load, network delay). Different dimensions, value range indexes need to be normalized to the same interval to prevent the model from being biased due to the too large numerical range of a certain dimension. Through feature fusion, the matching degree of each node to each task can be efficiently quantified to provide multi-dimensional comparable input for the scheduling algorithm.
[0070] Specifically, the received task instruction is obtained after the above analysis, including but not limited to task data volume D i , maximum tolerance delay T i tol and priority and other task attribute data. At the same time, for the task attribute data, the communication delay matrix {T jk comm} and the average 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 a feature vector F ij ={D ’ i , T ’ i tol , cpu (t), T ’ jk comm}. Wherein, D ’ i is the normalized task data volume, T ’ i tol is the normalized tolerance delay, cpu (t) is the normalized average CPU utilization, T ’ jk comm is the normalized transmission delay data. And according to the node j as the row and the task i as the column to construct the feature matrix M, the task-resource matching feature matrix M N×K is composed by traversing all node and task pairs.
[0071] Step S3, performing adaptive deep reinforcement learning on the task-resource matching feature matrix through a preset deep Q network model to obtain a dynamic scheduling strategy.
[0072] Wherein, the task-resource matching feature matrix M N×KThe task-resource matching feature matrix is high-dimensional and has high redundancy among features, which is prone to overfitting or gradient difficulty in convergence. By principal component analysis for dimension reduction of the high-dimensional task-resource matching feature matrix, the orthogonal principal components can be extracted to reduce the input dimension and compress the network size while preserving as much original variance information as possible. The redundant and related features are removed to improve the model generalization ability.
[0073] Specifically, the z-score standardization formula is used for each column feature in the task-resource matching feature matrix, and each feature value of the task-resource matching feature matrix is normalized one by one to eliminate the dimension and mean value difference, so that each column feature has zero mean and unit variance. Then, the covariance matrix of the standardized task-resource matching feature matrix is calculated to measure the linear correlation between the standardized features. Further, the covariance matrix is decomposed to extract the principal component direction of the covariance matrix and obtain the eigenvalue-eigenvector pair. The eigenvalue is used to reflect the variance contribution of the corresponding vector direction. The eigenvector represents the principal component direction. After obtaining the eigenvalue-eigenvector pair, the corresponding eigenvectors are sorted in descending order according to the eigenvalue size, and the eigenvectors corresponding to the first r largest eigenvalues are selected as the dimension reduction basis. Then, the eigenvalues of the dimension reduction basis and all eigenvalue-eigenvector pairs are summed up to calculate the variance contribution rate γ(r) of the dimension reduction basis. When γ(r) ≥ a preset threshold (for example, 90%), the dimension reduction basis is constructed into a dimension reduction projection matrix P = [v1, …, vr], and the dimension reduction projection matrix P is used to project the standardized task-resource matching feature matrix to obtain a dimension-reduced state space optimization vector. r d×r Finally, the standardized task-resource matching feature matrix is multiplied by the dimension reduction projection matrix P to obtain a dimension-reduced state space optimization vector, which realizes the mapping of high-dimensional features to low-dimensional principal component space.
[0074] Further, the state space optimization vector obtained by using the deep Q network model combined with principal component analysis is used to realize the value evaluation of different offloading actions (i.e., executing task instructions locally or migrating to edge nodes for collaborative processing of task instructions). Through continuous interaction and iterative optimization, the deep Q network model can learn the optimal action policy to balance multiple objective factors such as task completion delay and energy consumption, and generate an (N+1)-dimensional Q value vector to provide a quantitative basis for scheduling decisions. The structure of the deep Q network model is as follows:
[0075] Input layer: receives the r-dimensional principal component state space optimization vector S t .
[0076] Hidden layers: contains two fully connected layers, each of which consists of 128 neurons and uses a ReLU function as an activation function. The hidden layers can be expressed by the formula as shown below:
[0077] h (1) = ReLU(W (1) h t + b (1) ); h (2) = ReLU(W (2) h (1) + b (2) )
[0078] where h (l) is the l-th fully connected layer. W (l) , b (l) are the weights of the l-th layer and the bias of the l-th layer, respectively. ReLU(x) = max(0, x).
[0079] Output layer: contains N+1 neurons without activation function (i.e., linear output), corresponding to the action set A = {a0, …, aN}. The output layer can be expressed by the formula as shown below:
[0080] Q(S t ; θ) = W (3) h (2) + b (3) , Q ∈ R N+1
[0081] where θ = {W (1) , b (1) , W (2) , b (2) , W (3) , b (3)}.
[0082] The specific operations of the deep Q-network model are as follows:
[0083] After receiving the state space optimization vector S t after dimensionality reduction, the input layer essentially does not change the data dimension, only completes data reception and format verification. The input layer first verifies whether the dimension of the state space optimization vector S t is consistent with the preset input dimension r of the network. When the dimensions are not consistent, 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 t after verification or processing is passed to the first hidden layer. The first hidden layer transforms the original state space optimization vector S tMapping to a high-dimensional feature space captures the complex combinations of original features. The first hidden layer distributes the weights of each neuron in each row to the input dimension using a pre-defined weight matrix, and provides an adjustable baseline for each neuron using the bias vector of the first hidden layer, thereby optimizing the state space vector S. t Each element in the vector is linearly weighted and summed, and then the bias vectors are superimposed to obtain the linear output vector of the first hidden layer. Then, the first hidden layer performs a non-linear activation process on the linear output vector using the ReLU function, forcing all negative values in the linear output vector to be output as 0. This introduces non-linearity while improving sparsity, which helps resist gradient vanishing. The activation vector h is obtained after the processing of the first hidden layer. (1) =[h1 (1) ,,h H (1) ] T This vector is then input into the second hidden layer. Further transformations are performed on the basic features extracted in the first hidden layer to further mine higher-order feature combinations in the state vector, providing a richer data representation for the output layer. The data processing procedure for the second hidden layer is the same as that for the first hidden layer, and will not be elaborated further here; please refer to the data processing procedure for the first hidden layer for details. The activation vector h is obtained after processing by the second hidden layer. (2) =[h1 (2) ,,h H (2) ] T The vector is then input into the output layer. The output layer maps the high-dimensional features extracted by the second hidden layer to value estimates for each action, i.e., an (N+1)-dimensional Q-value vector, where each element corresponds to a scheduling action (i.e., local execution or migration to a node). The output layer then applies the activation vector h... (2) After performing a linear transformation, the output is a Q-value vector, with elements q. j Corresponding action a j The value estimation is performed. The output layer does not use a non-linear activation function, directly using the linear result as the Q-value to preserve the negative probability and unbounded nature of the value estimation. The final Q-value vector can be represented as Q(S) t ;θ)=[Q(S t ,a0),……,Q(S t ,a N )] T The length of this vector is N+1, which provides a basis for the subsequent ε-greedy strategy.
[0084] Ultimately, the ε-greedy strategy achieves an "exploration-exploitation" balance by selecting the optimal action with high probability and exploring randomly with low probability, thus ensuring optimal long-term performance. Specifically, it first presets an initial exploration rate ε0 (e.g., 0.2) and a minimum exploration rate ε...min (for example, 0.01), a decay rate δ (for example, per step ε t+1 =max(ε min ,0.995*ε t ) ). And for each state decision moment t, a uniformly distributed random number u ∈ [0, 1] is generated. The maximum Q value action screening process can be represented by the following formula:
[0085]
[0086] wherein, is the Q value vector of all actions at the t moment. is the index of the action with the maximum Q value. is uniformly randomly selected from the action set A. is the current exploration probability.
[0087] Thus, the selected action a t is recorded 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 reward and new state to support subsequent online learning. After each online or offline training is completed, the exploration probability ε is updated according to the decay rate δ to ensure sufficient exploration at the beginning of training and more use of learned knowledge at the later stage.
[0088] Through the ε-greedy strategy, a determined action selection can be generated for each state input, forming a complete dynamic scheduling strategy. The strategy takes into account both immediate benefits and long-term optimality, providing a feasible and stable offloading decision in a heterogeneous edge network for actual tasks.
[0089] Step S4, performing interference analysis on the dynamic scheduling strategy through Monte Carlo simulation to obtain an interference probability matrix.
[0090] Before performing the interference analysis, it is necessary to generate a "task k → The node j" schedules decision extracts physical and network parameters necessary for constructing the interference model. These parameters come from the real-time resource state dataset and the scheduling policy table collected and processed before in step. Extracting these parameters can provide accurate and complete input for subsequent interference scenario modeling, make the entire Monte Carlo simulation have a real environment basis, and finally obtain reliable interference probability estimation to guide scheduling optimization. Specifically, by traversing the dynamic scheduling policy, all entries in the dynamic scheduling policy are read, and each entry format (k, j) represents that task k is offloaded or executed on node j. The table is read into the memory structure in row order or batch, and is ready to process each (k, j) pair. Thus, for each (k, j) pair, the record of the real-time resource state dataset corresponding to the timestamp t 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}. Among them, 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 of 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 is the local and edge execution time prediction of task k on node j.
[0091] In the interference source parameter configuration, to complete the interference scenario model construction, the potential interference source set {1, …, n} needs to be specified. The embodiment of the application adopts a regional pre-configuration method (that is, the static coordinates and transmission power of n interference sources are defined in the deployment area (for example, 5km x 5km)) or a random distribution method (that is, n interference source positions and channel gains are randomly generated before each simulation). At the same time, for the static method, {(x m ,y m ), p mup ,H m,k (0)} n m=1 . Where (x m ,y m ) is the mth interferer coordinate, p m up is the mth interferer transmit power, H m,k (0) is the base channel gain. Further, generate a model parameter set P 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} for each task-node pair (k,j). Where P j up is the uplink transmit power of node j. Finally, store all model parameter sets P jk into a list or dictionary in memory or a serialized file for quick access.
[0092] It should be understood that the interference scenario model strictly describes the power transmission and path loss relationship between the main link (task k → node j) and all potential interferers under given environmental and transmission conditions. By establishing an interference scenario model, the signal propagation and interference superposition behavior is accurately simulated using physical laws to provide core calculation formulas for Monte Carlo simulation. Specifically, the power loss of the signal after distance attenuation is estimated using free space path loss or urban models. The free space path loss formula is suitable for unobstructed environments; if there is an obstruction, a shadow fading model can be added on top of it. Further, the received power of the main link to the node (i.e., the main link signal strength) is calculated using the transmit power, path loss, and channel gain by the formula shown below:
[0093]
[0094] where, is the transmit power of node j. is the link channel gain. is the path loss corresponding to the distance. The main link signal strength is used to quantify the actual received signal power of the main link as a reference for interference comparison.
[0095] Meanwhile, the received power of all interference sources is accumulated according to the energy superposition principle by the following formula to obtain the total interference power.
[0096]
[0097] wherein, , , is the transmission power of the mth interference source, the channel gain and the distance to node j.
[0098] Then, by calculating the ratio of the main link signal strength and the interference link power as the interference judgment quantity of a single simulation (i.e., the signal-to-interference ratio), the signal-to-interference ratio is compared with the preset protection threshold θ to determine whether unacceptable interference occurs.
[0099] Finally, the above calculation process is encapsulated with necessary parameters to form the object M of the interference scenario model jk ={dRSS,iRSS,PL(d),θ}, wherein PL(d) is the path loss at a distance d. Each object M jk is combined with the corresponding task k → of node j to form an interference scenario model for repeated calling of the Monte Carlo simulation.
[0100] It should be understood that the Monte Carlo simulation simulates a plurality of possible interference environments and link conditions through a large number of random samplings, and statistically obtains the frequency that the main link is subjected to unacceptable interference (the signal-to-interference ratio is lower than the threshold) in these environments, i.e., the interference probability. The Monte Carlo simulation does not need to solve complex analytical formulas, can take into account the channel randomness and the diversity of interference sources, and provides probabilistic risk assessment for scheduling decisions. The Monte Carlo simulation first needs to configure simulation parameters such as the preset total simulation number N, the number of interference sources n, and the protection ratio threshold θ, and simultaneously, for each simulation m=1……N, the interference source positions are uniformly randomly distributed in a given area (for example, 5km×5km), the channel gain is randomly sampled for each interference source, and the fixed or random transmission power is used.
[0101]
[0102] wherein, 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.
[0103] Finally, the interference probability q k,j(i.e., the average interference event occurrence rate under a large sample of statistics). Interference probability q k,j The interference risk faced by the scheduling decision in the current and random environment can be accurately reflected.
[0104] Further, it is necessary to combine each task-node interference probability q k,j according to a unified structure, thereby forming an interference probability matrix {q k,j} for key constraint input of resource allocation optimization model, so as to facilitate fast calling and constraint judgment in subsequent nonlinear programming solving steps. Specifically, in the pre-created empty matrix Q, the row index corresponds to the task k, and the column index corresponds to the action (local execution a0 or migration to node 1……N). For each policy record (task k → node j), if j>0 (i.e., migration to node j), write the combined interference probability q k,j of this group to the kth row and jth column of the empty matrix Q; 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 as a CSV, JSON or binary file, and written to a database or in-memory table for direct reading and checking constraints in subsequent steps. In the complete interference probability matrix Q, each element q k,j represents the interference risk when task k is assigned to node j under the current dynamic scheduling policy, and the two-dimensional structure facilitates the calling of constraint functions in subsequent nonlinear programming modeling.
[0105] Step S5, nonlinear programming is performed on the real-time resource state data set and the task instruction to obtain a target function, and the target function is constrained and solved according to the interference probability matrix to obtain an optimal combination of resource allocation.
[0106] It should be understood that nonlinear programming solving needs to convert all physical quantities and task requirements involved in optimization into numerical variables and explicitly define their upper and lower bounds and meanings. For the real-time resource state data set and the task instruction received externally, key variables need to be extracted to provide the required parameter basis for constructing the objective function and constraint conditions of the optimization model.
[0107] First, the corresponding resource state entries in the resource state data set at the current scheduling time t are read from the time series database or in-memory cache. Each entry record contains S j (t)=[N core ,η cpu ,M free ,B j ,H i ,d(i,j)], which is indexed according to node ID j to ensure one-to-one matching. For the obtained resource state entries, the calculation capability fj e The number of executable CPU cycles per second for the corresponding node j is calculated by measuring the computing power f through real-time benchmarking. j e And is 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 idle. j e Bandwidth B j The available link bandwidth of the corresponding node j can be queried in real time through the network card driver or SNMP to obtain the current theoretical bandwidth upper limit, or the existing field can be directly read from the real-time state data set. For nodes with multiple links (for example, 5G+Wi-Fi), the main link bandwidth is selected according to the configuration strategy or multiple link bandwidths are recorded respectively. Transmission power p j up The uplink transmission power of the corresponding node j can be obtained in real time from the hardware monitoring unit (for example, the driver interface or the RRM module), or the maximum supported power can be read from the static configuration file and combined with the current power adjustment strategy to determine. For nodes that adjust the transmission power to adapt to network conditions (for example, according to RSCP / RSRP), the current power is calculated in real time through the strategy module, and the obtained value is written into the runtime parameter set. At the same time, for the received external task instructions, the above-mentioned analysis and processing are performed to obtain, including but not limited to, task data volume D k , maximum tolerated delay T k tol and computing demand C k required for task execution, etc. 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 state data extraction and task instruction analysis, the above-mentioned data set is combined into a model parameter set, that is, for each node-task combination (j, k) of each node and task instruction, a model parameter set entry P j,k =(f j e ,B j ,p j up ,D k ,T k tol ,C k ) is formed.
[0108] In order to comprehensively consider the two goals of task execution delay and energy consumption, the embodiments of the present application adopt a non-linear programming model construction according to the preset energy consumption weight for the above-mentioned model parameter set entry, and the objective function of the non-linear programming model adjusts the balance between task execution delay and energy consumption through the energy consumption weight. Specifically, the physical quantities are combined by weighting through the objective function as shown below, that is, the multi-objective optimization is converted into a single-objective weighted sum.
[0109]
[0110]
[0111]
[0112] wherein, , is the maximum upload rate. . , is the result data size (i.e., the output data size of task k that needs to be returned to the local device after the corresponding node j completes the calculation). . . . is the energy consumption weight of task k.
[0113] Thus, the local cost of all task-node combinations is weighted and summed according to the single-objective function to form the global optimization target . Wherein, ∈{0,1} is a binary decision variable used to represent whether task k is assigned to the corresponding node j.
[0114] At the same time, in the process of nonlinear programming solution, in addition to the objective minimization, various function constraint condition sets such as task deadline requirement (i.e., delay constraint), interference risk limit (i.e., interference probability constraint), system resource upper limit (i.e., bandwidth and computing resource constraint) need to be met to ensure that the optimization result is both low cost and feasible. The function constraint condition set can be represented by the formula as shown below:
[0115]
[0116] wherein, is the interference probability obtained in step S4. is the preset interference probability threshold. is the proportion of the bandwidth available to each node j occupied by each task, and the total proportion does not exceed 100%. is the CPU resource allocated to task k by each node j, and the total does not exceed the total computing capacity of the node. Through the function constraint condition set, the feasible region of all optimization variables and various performance and safety constraints are clarified to provide input for the constraint processing module of the dual solver.
[0117] Finally, to reduce the complexity of the above mixed integer nonlinear programming, the embodiments of the present application first decompose the above objective function by Lagrange dual decomposition, relax the complex constraints into the objective function by introducing Lagrange multipliers, decompose the original problem into easy-to-handle sub-problems, and combine the sub-gradient method iteration to effectively solve large-scale nonlinear constraint optimization. Specifically, first introduce the bandwidth and computing resource constraints into the objective function j and j to obtain the formula as follows:
[0118]
[0119] By adjusting j , j penalize the violation solution, so as to integrate the resource constraints into the objective. Further, for the formula, the sub-gradient method is used for iterative solution, so as to realize the minimization of , , and the maximization of j , j . The j , j are alternately optimized by the following formula to achieve the overall optimization.
[0120]
[0121]
[0122] wherein, represents the step size decay with the iteration number.
[0123] Specifically, in each dual iteration, the current j , j is fixed, and the original problem is solved to obtain , , . And according to the current obtained , , computing resource usage excess , . Thus, according to the computing resource usage excess, the j , j is updated. Repeat the previous operation until is less than the preset threshold. When is less than the preset threshold, the current obtained , , is the approximate optimal solution. Thus, the optimal solution is combined into the resource allocation optimal combination Z*={ , According to the optimal combination of resource allocation Z*, the system can guide the calculation resource scheduling of the received task instructions, and realize the minimum total cost of task instruction execution.
[0124] In an optional embodiment, in order to utilize the real execution feedback to perform closed-loop online optimization on the deep Q network model and the case library, and continuously improve the adaptability and scheduling effect of the system in the dynamic heterogeneous edge environment, the method further comprises:
[0125] After a task scheduling is completed, the scheduling result needs to be executed in the actual network and computing environment and monitored, so as to obtain the performance indicators of the task in the real running time. Only when the real execution delay, energy consumption and resource load data are obtained, can the reinforcement learning model be fed back for online updating, and the adaptive optimization of the scheduling strategy is realized. Specifically, the actual completion indicators of each task k on the allocated node j are recorded, and the following data are intercepted and recorded at the node j or the central controller:
[0126] T jk actual : the real total execution delay of the task k, including the uploading, computing and backhaul three links;
[0127] E jk actual : the total energy consumption in the real execution process, including the device transmission, waiting and receiving energy consumption;
[0128] λ jk actual : the actual proportion of the task k in the bandwidth allocation of the node j;
[0129] η cpu (j) (t): the sampling curve of the CPU utilization of the node j with time in the execution process;
[0130] N interfered : the number of interference events actually detected during the execution of the task k.
[0131] The data scattered in different modules and moments are integrated into a unified "online experience" format, and the above records are encapsulated as structured entries X jk (t)=(S t ,a t ,T jk actual ,E jk actual ,η cpu (j) (t),λ jk actual ,Ninterfered ). Wherein, S t is the resource state vector before action selection, a t is the action selected at time t (i.e., the local device executes or transmits the node number). In the execution of the monitoring process, the sampling frequency needs to be controlled to avoid excessive frequent writing and cause storage pressure. By setting the sampling window to uniformly write the experience replay buffer, if the buffer is full, the earliest entry is popped out using FIFO to ensure the freshness of the subsequent model training samples.
[0132] The data collected online inevitably contains abnormal values, missing values or noise, which will affect the stability and convergence of the model if directly used 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 ) to meet the input requirements of deep reinforcement learning. Specifically, the upper and lower bound checks are applied to the delay and energy consumption values. When the delay or energy consumption value is greater than the preset fault tolerance threshold, the sample is marked as abnormal and discarded. For key indicators such as η cpu (j) (t) or λ jk actual , the sliding window mean value is calculated to compensate for missing data. At the same time, the reward signal is constructed according to the immediate execution result, i.e., r t = ( ). After the action is executed, the new resource state vector is collected and reduced by principal component analysis to obtain S t+1 . The action a t is mapped from the node number to a one-hot encoding vector e at of length N+1. Thus, the cleaned and extracted data is packaged into training tuples (S t ,e at ,r t ,S t+1 ) and stored in the standard experience replay buffer D.
[0133] Thus, a sample set {(S t ,a t ,r t ,S t+1 )} i=1 BThe target Q value calculation formula in the deep Q network model and the mean square error loss function are used on the sample set to obtain the target Q value and the mean square error loss value. Then, the Adam optimizer is used to perform gradient descent on the main network parameter θ in the deep Q network model to reduce the mean square error and make the main network more accurate in Q value prediction. Meanwhile, after each time the above gradient update is completed, the update count u of the update count counter is automatically increased by 1. The update count is used for subsequent target network synchronization judgment.
[0134] When the update count u reaches the preset synchronization period C, all the weights and biases are copied at one time through a special interface available in the deep learning framework to assign the current parameters θ of the main network to the target network θ - After synchronization, the target network uses the new parameters in the next Q target calculation under the deep Q network model to ensure that its estimation has a certain timeliness. The main network in the deep Q network model continues to perform the above free update to form a “main-target” two-network collaborative learning mechanism.
[0135] The application is applied to the technical field of task scheduling. Real-time resource state data sets are obtained by constructing multi-dimensional states of heterogeneous edge node resources and task instructions. Task-resource matching feature matrices are obtained by spatiotemporal correlation analysis on the real-time resource state data sets. Dynamic scheduling strategies are obtained by adaptive deep reinforcement learning on the task-resource matching feature matrices through a deep Q network model. Interference probability matrices are obtained by interference analysis of Monte Carlo simulation on the dynamic scheduling strategies. Target functions are obtained by nonlinear programming on the real-time resource state data sets and the task instructions. The resource allocation optimal combination is obtained by constraint solving on the target functions in combination with the interference probability matrices. The application realizes efficient and reliable scheduling in a complex heterogeneous environment by the organic integration of multi-dimensional perception, spatiotemporal correlation, deep reinforcement learning, probability robustness analysis, and nonlinear optimal solving. The comprehensive performance of the edge computing system in terms of time delay, throughput, energy consumption, and robustness is significantly improved.
[0136] As shown in Figure 2 FIG. 1 is a functional module diagram of an edge computing-based task scheduling device provided by an embodiment of the application.
[0137] In some embodiments, the edge computing-based task scheduling device 2 can include a plurality of functional modules composed of computer program segments. The computer programs of each program segment in the edge computing-based task scheduling device 2 can be stored in the memory of a server and executed by at least one processor to perform the functions of the edge computing-based task scheduling method (see Figure 1 for detailed description).
[0138] In this embodiment, the task scheduling device 2 based on edge computing can be divided into a plurality of functional modules according to the functions performed by the device. The functional modules can include a resource monitoring module 21, a space-time 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 application refers to a series of computer program segments that can be executed by at least one processor and can complete a fixed function, which are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0139] The resource monitoring module 21 is configured 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.
[0140] In an optional implementation, the resource monitoring module 21 is specifically configured to:
[0141] collecting node resources of the heterogeneous edge nodes in real time to obtain the computing resource data, the communication resource data, and the inter-node distance;
[0142] constructing a state vector based on the computing resource data, the communication resource data, and the inter-node distance to obtain a resource state vector;
[0143] performing task uploading analysis based on the communication resource data according to a preset channel capacity model to obtain a maximum rate of task uploading to the edge nodes;
[0144] performing task execution prediction processing based on the number of tasks in the received task instructions, the computing resource data, and the communication resource data to obtain an execution time of the edge nodes;
[0145] performing data structure fusion on the resource state vector, the maximum rate, and the execution time according to a time sequence to obtain the real-time resource state data set.
[0146] The space-time analysis module 22 is configured to perform space-time correlation analysis processing on the real-time resource state data set to obtain a task-resource matching feature matrix.
[0147] In an optional implementation, the space-time analysis module 22 is specifically configured to:
[0148] performing mean value calculation on the computing resource data in the real-time resource state data set according to a preset sliding window to obtain a CPU utilization mean value;
[0149] transmission time delay data of the nodes is obtained by performing transmission time delay calculation on the inter-node distance in the real-time resource state data set, and a communication delay matrix is constructed according to preset edge node coordinates and the transmission time delay data;
[0150] The 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.
[0151] The dynamic scheduling module 23 is configured to perform adaptive deep reinforcement learning on the task-resource matching feature matrix by using a preset deep Q network model to obtain a dynamic scheduling strategy.
[0152] In an optional embodiment, the dynamic scheduling module 23 is specifically configured to:
[0153] The task-resource matching feature matrix is subjected to principal component analysis and dimension reduction processing to obtain a state space optimization vector;
[0154] The state space optimization vector is subjected to deep reinforcement learning by using a preset deep Q network model to obtain a Q value vector of (N+1) dimensions;
[0155] 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.
[0156] The interference simulation module 24 is configured to perform interference analysis on the dynamic scheduling strategy by using Monte Carlo simulation to obtain an interference probability matrix.
[0157] In an optional embodiment, the interference simulation module 24 is specifically configured to:
[0158] According to the dynamic scheduling strategy, relevant parameters of the real-time resource state data set are extracted to obtain a model parameter set corresponding to each task;
[0159] The model parameter set is subjected to interference scenario model construction to obtain an interference scenario model corresponding to each task;
[0160] The interference scenario model is subjected to Monte Carlo simulation processing to obtain an interference probability corresponding to each task;
[0161] All interference probabilities are subjected to vector construction according to the dynamic scheduling strategy to obtain the interference probability matrix.
[0162] An optimal allocation module 25 is configured to perform nonlinear programming on the real-time resource state dataset and the task instruction to obtain a target function, and perform constraint solving on the target function according to the interference probability matrix to obtain an optimal combination of resource allocation.
[0163] In an optional implementation, the optimal allocation module 25 is specifically configured to:
[0164] extract the real-time resource state dataset to obtain computing power, bandwidth and transmission power of each node, and parse the task instruction to obtain task data volume and maximum tolerable delay;
[0165] perform nonlinear weighted programming on the computing power, the bandwidth, the transmission power and the task data volume according to a preset energy consumption weight to obtain the target function;
[0166] perform constraint definition on the target function according to the maximum tolerable delay and the interference probability matrix to obtain a function constraint condition set;
[0167] perform Lagrange dual decomposition and sub-gradient method solving processing on the target function according to the function constraint condition set to obtain the optimal combination of resource allocation.
[0168] In an optional implementation, the edge computing-based task scheduling apparatus 2 further includes a feedback optimization module 26, and the feedback optimization module 26 is specifically configured to:
[0169] perform execution monitoring on the optimal combination of resource allocation to obtain real-time task flow data samples;
[0170] perform data cleaning and feature extraction processing on the real-time task flow data samples to obtain tuple data;
[0171] perform random sampling on the tuple data to obtain a training set, and update main network parameters of the deep Q network model according to the training set through a preset mean square error loss function;
[0172] when the number of times of updating the main network parameters reaches a preset number of times threshold, synchronize the main network parameters with target network parameters in the deep Q network model to update the deep Q network model.
[0173] It should be understood that the various changes and specific embodiments of the method provided by the above embodiments are also applicable to the edge computing-based task scheduling device of the present embodiment. Through the foregoing 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 in the present embodiment. For the sake of brevity of the description, it will not be described in detail here.
[0174] As shown in Figure 3 , a structural schematic diagram of an electronic device provided by an embodiment of the present application.
[0175] In the preferred embodiment of the present application, the electronic device 3 can include, but is not limited to, a memory 31, at least one processor 32, and at least one communication bus 33.
[0176] Those skilled in the art should understand that Figure 3 The structure of the electronic device 3 shown is not a limitation of the embodiments of the present application. The electronic device 3 can also include more or less other hardware or software, or different component arrangements.
[0177] In some embodiments, the electronic device 3 is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. The hardware thereof includes, but is not limited to, a microprocessor, an application-specific integrated circuit, a programmable gate array, a digital processor, and an embedded device.
[0178] It should be noted that the electronic device 3 is only an example. Other existing or future electronic products, such as those that can be adapted to the present application, should also be included within the scope of protection of the present application and are hereby incorporated by reference.
[0179] In some embodiments, the memory 31 stores a computer program which, when executed by the at least one processor 32, implements all or part of the steps of the edge computing based task scheduling method as described. 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 Electrically-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 medium of computer readable storage which can be used to carry or store data. Further, the computer readable storage medium can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required by at least one function, and the like.
[0180] In some embodiments, the at least one processor 32 is a control unit of the electronic device 3, which connects various components of the entire electronic device 3 through various interfaces and lines, and performs various functions of the electronic device 3 and processes data by running or executing programs or modules stored in the memory 31 and calling data stored in the memory 31. For example, the at least one processor 32 implements all or part of the steps of the edge computing based task scheduling method as described in the embodiments of the present application when executing the computer program stored in the memory 31, or implements all or part of the functions of the edge computing based task scheduling apparatus. The at least one processor 32 can be composed of integrated circuits, for example, can be composed of a single packaged integrated circuit, or can be composed of multiple packaged integrated circuits with the same function or different functions, including one or more combinations of central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.
[0181] In some embodiments, the at least one communication bus 33 is configured to enable connection communication between the memory 31 and the at least one processor 32. Although not shown, the electronic device 3 can further include a power supply (such as a battery) for powering the various components of the electronic device 3. Preferably, the power supply is logically connected to the at least one processor 32 via a power management device, thereby enabling management of charging, discharging, and power consumption management, etc. by the power management device. The power supply can also include one or more direct current or alternating current power sources, recharging circuits, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 3 can further include a variety of sensors, a Bluetooth module, a Wi-Fi module, and the like, which are not described herein.
[0182] The integrated units in the form of software function modules described above can be stored in a computer readable storage medium. The software function modules described above are stored in a storage medium, and include a plurality of instructions for causing an electronic device (which can be a personal computer, an electronic device, or a network device, etc.) or a processor to execute part of the method described in various embodiments of the present application.
[0183] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely illustrative. For example, the division of the modules is merely a logical function division. There can be another division manner in actual implementation.
[0184] The modules illustrated as separated components can or can not be physically separated, and the components illustrated as modules can or can not be physical units. They can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purposes of the embodiments of the present application.
[0185] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Therefore, any equivalent changes made on the structure, shape, and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A method for task scheduling based on edge computing, characterized in that, The method comprises: obtaining the isomerization edge node resource and the received task instruction and carrying out multi-dimensional state construction processing to obtain a real-time resource state data set; calculating the mean value of the computing resource data in the real-time resource state data set according to a preset sliding window to obtain a CPU utilization rate mean value; calculating the transmission time consumption of the inter-node distance in the real-time resource state data set to obtain transmission delay data between nodes, and constructing a communication delay matrix according to a preset edge node coordinate and the transmission delay data; carrying out resource state parameter fusion and normalization processing on the preset task attribute data, the CPU utilization rate mean value and the communication delay matrix to obtain a task-resource matching feature matrix; carrying out principal component analysis and dimension reduction processing on the task-resource matching feature matrix to obtain a state space optimization vector; carrying out deep reinforcement learning on the state space optimization vector through a preset deep Q network model to obtain a (N+1)-dimensional Q value vector; carrying out maximum Q value action screening processing on the Q value vector according to a preset ε-greedy strategy to obtain a dynamic scheduling strategy; carrying out interference analysis on the dynamic scheduling strategy through Monte Carlo simulation to obtain an interference probability matrix; carrying out nonlinear programming on the real-time resource state data set and the task instruction to obtain an objective function, and carrying out constraint solving on the objective function according to the interference probability matrix to obtain an optimal combination of resource allocation. 2.The edge computing based task scheduling method according to claim 1, wherein the heterogeneous edge node resources comprise computing resource data, communication resource data, and inter-node distance. The method comprises: carrying out real-time collection of node resources of the heterogeneous edge node to obtain the computing resource data, the communication resource data and the inter-node distance; constructing a state vector from the computing resource data, the communication resource data and the inter-node distance to obtain a resource state vector; carrying out task uploading analysis on the communication resource data through a preset channel capacity model to obtain the maximum rate of task uploading to the edge node; carrying out 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 the execution time of the edge node; carrying out data structure fusion on the resource state vector, the maximum rate and the execution time according to a time sequence to obtain the real-time resource state data set. 3.The edge computing based task scheduling method of claim 1, wherein, The method comprises: extracting relevant parameters from the real-time resource state data set according to the dynamic scheduling strategy to obtain a model parameter set corresponding to each task; constructing an interference scenario model from the model parameter set to obtain an interference scenario model corresponding to each task; carrying out Monte Carlo simulation processing on the interference scenario model to obtain an interference probability corresponding to each task; constructing a vector from all the interference probabilities according to the dynamic scheduling strategy to obtain the interference probability matrix. 4.The edge computing based task scheduling method of claim 1, wherein, The nonlinear programming is performed on the real-time resource state data set and the task instruction to obtain a target function, and constraint solving is performed on the target function according to the interference probability matrix to obtain the resource allocation optimal combination, and the nonlinear programming is performed on the real-time resource state data set and the task instruction to obtain a target function, and constraint solving is performed on the target function according to the interference probability matrix to obtain the resource allocation optimal combination. The real-time resource state data set is extracted to obtain the computing power, bandwidth and transmission power of each node, and the task instruction is parsed to obtain the task data volume and maximum tolerance delay; The computing power, bandwidth, transmission power and task data volume are nonlinearly weighted and programmed according to a preset energy consumption weight to obtain the target function; The target function is constrained and limited according to the maximum tolerance delay and the interference probability matrix to obtain a function constraint condition set; The target function is Lagrange dual decomposed and solved by a subgradient method according to the function constraint condition set to obtain the resource allocation optimal combination. 5.The edge computing based task scheduling method of claim 1, wherein, The method further comprises: The resource allocation optimal combination is monitored to obtain real-time task flow data samples; The real-time task flow data samples are data cleaned and feature extracted to obtain tuple data; The tuple data are randomly sampled to obtain a training set, and a preset mean square error loss function is used to update main network parameters of the deep Q network model according to the training set; When the number of times of updating the main network parameters reaches a preset number of times threshold, the main network parameters are synchronized with target network parameters in the deep Q network model to update the deep Q network model. 6.A task scheduling apparatus based on edge computing, applied to the task scheduling method based on edge computing in claim 1, characterized in that, The device comprises: A resource monitoring module configured to perform multi-dimensional state construction processing on obtained heterogeneous edge node resources and received task instructions to obtain a real-time resource state data set; A space-time analysis module configured to perform space-time correlation analysis processing on the real-time resource state data set to obtain a task-resource matching feature matrix; A dynamic scheduling module configured to perform adaptive deep reinforcement learning on the task-resource matching feature matrix by a preset deep Q network model to obtain a dynamic scheduling strategy; An interference simulation module configured to perform interference analysis on the dynamic scheduling strategy by Monte Carlo simulation to obtain an interference probability matrix; An optimal allocation module configured to perform nonlinear programming on the real-time resource state data set and the task instruction to obtain a target function, and perform constraint solving on the target function according to the interference probability matrix to obtain the resource allocation optimal combination.
7. An electronic device, comprising: The electronic device comprises a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the edge computing-based task scheduling method according to any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the edge computing-based task scheduling method according to any one of claims 1 to 5.
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