A self-learning service deployment method for industrial critical path resources
Patent Information
- Application Number
- CN202611187909.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本发明提供的一种面向工业关键路径资源的自学习服务部署方法,能够解决现有技术因无法兼顾工业边缘场景中DAG有向无环图任务依赖建模、负载主动预测、拓扑感知与动态鲁棒调度,引起关键路径任务因隐性资源抢占而超时失效、边缘节点突发波动时缺乏自适应恢复能力、以及大规模异构边缘环境中求解效率与解质量难以兼顾,最终致使工业实时业务的服务质量无法得到稳定保障的问题,最后满足工业边缘场景下实时性、可靠性与资源高效利用的核心需求
本发明通过构建节点属性矩阵和带宽邻近矩阵,利用图卷积网络提取各边缘节点的嵌入向量,并结合聚类损失与对比损失的联合优化进行深度图聚类,将大规模边缘节点划分为若干个高内聚的逻辑域。由于划分过程深度融合了节点的资源属性与物理拓扑特征,且通过对比损失强化了不同域之间的特征区分,因此能够有效压缩后续部署算法的搜索空间,同时保证域内节点间的通信效率,解决了大规模异构边缘环境中因搜索空间爆炸导致求解效率低下的问题。
Smart Images

Figure CN123020448A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial Internet of Things, and in particular relates to a method for deploying self-learning services for industrial critical path resources. Background Technology
[0002] In latency-sensitive scenarios such as industrial defect detection and real-time stream analysis, an industrial internet edge architecture is often adopted. This architecture continuously pushes computing resources to the network edge to meet high concurrency and low latency QoS requirements. Terminal requests are often directed acyclic graph tasks with complex dependencies, requiring priority to be given to the longest-running critical path during deployment. If critical path tasks are scheduled to nodes with insufficient computing power or high load, overall response latency will increase significantly. Furthermore, if parent-child tasks with strong data dependencies are deployed on physically distant nodes, cross-node transmission will introduce high communication latency, reducing system real-time performance and execution efficiency, ultimately leading to reduced industrial data processing efficiency. In addition, edge nodes exhibit strong uncertainties such as heterogeneous computing power and dynamic load fluctuations, making edge service deployment not a simple static allocation but a complex combination optimization problem that balances computational and communication overhead in a dynamically heterogeneous environment.
[0003] Traditional optimization methods such as mixed-integer programming and game theory can find optimal solutions on small scales, but their computational complexity increases exponentially with problem size, failing to meet the real-time requirements of large-scale edge environments. Most existing heuristic algorithms focus on static network topology to optimize connectivity and transmission latency, ignoring the dynamic and drastic fluctuations in node load, such as a node suddenly being overloaded with video analysis tasks. This implicit resource contention can cause the originally planned optimal path to time out and become invalid. Reinforcement learning algorithms possess adaptive capabilities, but their decision-making is based on… It's always running, but performance degradation due to resource contention is occurring. When the moment arrives, it's difficult for the agent to figure out which step in the deployment went wrong. Furthermore, once faced with sudden high loads or other extreme non-stationary fluctuations, the agent may fail due to overfitting to previous normal patterns, requiring a long period of trial and error, and thus failing to guarantee stability under extreme conditions. Summary of the Invention
[0004] This invention provides a self-learning service deployment method for industrial critical path resources. It can solve the problems of existing technologies that cannot take into account the task dependency modeling, proactive load prediction, topology awareness and dynamic robust scheduling of DAG in industrial edge scenarios. These problems cause critical path tasks to time out due to implicit resource preemption, lack of adaptive recovery capability when edge nodes experience sudden fluctuations, and difficulty in balancing solution efficiency and solution quality in large-scale heterogeneous edge environments. Ultimately, these technologies cannot guarantee the stable service quality of industrial real-time services. Finally, this invention meets the core requirements of real-time performance, reliability and efficient resource utilization in industrial edge scenarios.
[0005] To achieve the above objectives, the technical solution adopted by this invention is: a self-learning service deployment method for industrial critical path resources, comprising the following steps: S1: Based on the physical topology information and node resource information in the actual industrial scenario, construct the node attribute matrix and bandwidth proximity matrix, and extract the embedding vector of each edge node through the graph convolutional network. Then, perform clustering processing on the extracted embedding vectors to divide the edge nodes into several edge domains. S2: Obtain the dependencies between subtasks in the task to be deployed, convert them into a directed acyclic graph and identify the critical path. Based on the critical path and edge domain, perform double-layer chromosome encoding on each subtask to obtain the initial population of the service deployment scheme. S3: Based on the initial population, in the current iteration of the genetic algorithm, the reinforcement learning agent perceives the evolutionary state of the current population and outputs the crossover probability and mutation probability that match the current population. S4: Based on the crossover probability and mutation probability, perform selection, crossover, and mutation operations on the current population to obtain a new generation of population; S5: Based on the preset joint optimization objective function, calculate the population fitness of each service deployment scheme in the new generation population and select the optimal service deployment scheme. Generate a reward signal based on the population fitness and feed it back to the reinforcement learning agent. S6: Determine whether the current iteration round has reached the preset termination condition. If so, output the optimal service deployment scheme; otherwise, return to step S3 to enter the next iteration round.
[0006] Furthermore: the process of dividing the edge nodes into several edge domains specifically includes: S101: Obtain physical topology information and node resource information in actual industrial scenarios; physical topology information includes the physical distance between each edge node, and node resource information includes the available CPU capacity and available memory capacity of each edge node; S102: Based on the available CPU capacity and available memory capacity of each edge node, after normalization processing, the nodes are stacked row by row to obtain the node attribute matrix; S103: Construct a physical bandwidth matrix based on the physical distance between each edge node, and construct a sparse adjacency matrix through the K-nearest neighbor pruning strategy. Then, introduce an identity matrix to supplement the self-connected edges to obtain the bandwidth proximity matrix. S104: Based on the node attribute matrix and bandwidth proximity matrix, the embedding vectors of each edge node are extracted using a deep graph clustering algorithm through a graph convolutional network to obtain the node embedding matrix; S105: Based on the preset soft assignment matrix, calculate the probability that each edge node in the node embedding matrix is assigned to a certain type of edge domain, and obtain the soft assignment probability matrix of each edge node being assigned to each edge domain. S106: Construct the target assignment matrix based on the soft assignment probability matrix, and measure the difference between the soft assignment probability matrix and the target assignment matrix based on the pre-designed joint assignment loss function. Iteratively optimize the graph convolutional network until the convergence condition is met, and obtain the converged graph convolutional network. S107: Based on the converged graph convolutional network, repeat S104 and S105 to output the optimal soft assignment probability matrix, and assign each edge node to the edge region with the highest probability based on the optimal soft assignment probability matrix to obtain several edge regions.
[0007] The further beneficial effects mentioned above are as follows: This invention integrates edge node resources with physical topology and performs end-to-end graph clustering through joint optimization of clustering loss and contrast loss. This can compress the search space of subsequent deployment algorithms while preserving the communication efficiency between nodes in the edge domain, thereby improving the accuracy and rationality of edge domain partitioning.
[0008] Furthermore, the expression for the bandwidth proximity matrix is as follows:
[0009]
[0010]
[0011] in, It is a bandwidth proximity matrix. It is a sparse adjacency matrix. It is the identity matrix. For edge nodes The set of neighboring nodes, The K-nearest neighbor pruning strategy operation represents the operation on the bandwidth matrix. In the middle, select the one with the largest bandwidth. The node constructs the first Line 1 List the neighbor set of each edge node. These are matrix elements in the physical bandwidth matrix. This represents the maximum communication bandwidth capacity of the link. For edge nodes and edge nodes The physical distance between them The maximum communication radius of the edge node; the expression for the node attribute matrix is as follows:
[0012] in, Representative node attribute matrix The dimension is , The dimension representing the bandwidth proximity matrix is , This represents the total number of edge nodes.
[0013] Furthermore: the expression for the preset soft allocation matrix is as follows: The expression for the soft-assignment probability matrix is as follows:
[0014]
[0015]
[0016] in, The dimension representing the soft allocation matrix is , The total number of edge nodes. The total number of edge domains, For soft-assignment probability matrices, For each element in the soft assignment probability matrix, represents the node in the node embedding matrix. The embedding vector of the edge node is assigned to the first edge node. The probability of each edge region, For the node embedding matrix, the first Embedding vectors of edge nodes, The squared Euclidean distance between the embedding vector and the cluster center is given by . For the first The central location of each edge domain For the first The central location of each edge domain Embed the matrix for the node. For graph convolutional networks, This is a matrix of node attributes. It is a bandwidth proximity matrix. The dimension of the embedded vector. For the index of the edge domain, For the index of the edge node; The expression for the target distribution matrix is as follows:
[0017]
[0018] in, The target distribution matrix, For the elements of the target distribution matrix, For the first The expected number of edge nodes for each edge domain For the first The expected number of edge nodes for each edge domain.
[0019] Furthermore, the expression for the joint allocation loss function is as follows:
[0020]
[0021]
[0022] in, For the joint allocation loss function, For clustering loss, To compare the losses, To balance the hyperparameters, a value of 0-1 can be used. As a measure of KL divergence, The target distribution matrix, For soft-assignment probability matrices, For the index of the edge domain, For the index of the edge node, The total number of edge nodes. The total number of edge domains, For the elements of the target distribution matrix, For the elements of the soft-assignment probability matrix, The cosine similarity between two vectors. The temperature coefficient, used to control the model's discrimination and penalty for negative samples during comparative learning, can be set to 0.1. For the node embedding matrix, the first Embedding vectors of edge nodes, For the node embedding matrix, the first Positive sample feature vectors of edge nodes, For the node embedding matrix, the first The negative sample feature vector of each edge node.
[0023] Further: the initial population for obtaining the service deployment scheme specifically includes: S201: Obtain the dependencies between subtasks in the task to be deployed, and convert the task to be deployed into a directed acyclic graph based on the dependencies; S202: Traverse all directed acyclic graphs to obtain all feasible execution paths, and calculate the response time of each feasible execution path; S203: Select the feasible execution path with the longest response time as the critical path, where the response time of the critical path is the service response time; S204: Based on the critical path, determine the execution order constraints of each subtask, and establish a task dependency table in combination with the dependencies between each subtask. The task dependency table includes a list of predecessor subtasks and a list of successor subtasks. S205: Determine the range of edge nodes that can be deployed for each subtask based on the edge domain, and obtain the legal mapping set of the server allocation layer; S206: Based on the execution order constraints and task dependency table of each subtask, map each subtask to the task dependency layer, and based on the legal mapping set, map each subtask to the server allocation layer. Perform double-layer chromosome encoding on each subtask of the task to be deployed to obtain multiple chromosome individuals of the service deployment scheme. S207: Based on multiple chromosome individuals of the service deployment scheme, construct the initial population of the service deployment scheme; The dual-layer chromosome encoding includes a task dependency layer and a server allocation layer. The task dependency layer is used to characterize the execution order constraints between subtasks, and the server allocation layer is used to characterize the mapping relationship between each subtask and a specific edge node in the edge domain.
[0024] The further beneficial effects mentioned above are as follows: Before chromosome encoding, the present invention identifies and prioritizes the critical path that determines the upper limit of service response latency, and simultaneously encodes the execution order constraints of subtasks and the mapping relationship of physical nodes through a double-layer chromosome structure. Therefore, it can ensure that all individuals in the initial population satisfy the inter-task dependency constraints and have physical feasibility, laying a high-quality solution space foundation for the stable evolution of the subsequent genetic algorithm.
[0025] Furthermore: the calculation of the response time for each feasible execution path specifically includes: When on a feasible execution path When all subtasks are deployed on edge nodes, the response time expression is as follows:
[0026]
[0027]
[0028] in, For the first Feasible execution path time Response time For a moment Upload time between the terminal and edge nodes, For a moment The return time between the terminal and the edge node. For a moment Subtask Processing time, For subtasks The amount of data, For the current node at time Available computing power For a moment Subtask Kazuko's Mission Communication time between them For subtasks Transfer to subtask The amount of data, For a moment edge nodes and edge nodes Transmission bandwidth between; When the available computing power of edge nodes is insufficient and all subtasks are offloaded to the cloud for processing, the response time expression is as follows:
[0029] in, For a moment Upload time between the terminal and the cloud, For a moment The return time between the terminal and the cloud. For a moment Cloud task processing time; When a feasible execution path is found Each subtask is deployed on an edge node. When a subtask is offloaded to the cloud for processing due to insufficient available computing power, the response time is expressed as follows:
[0030] in, This is the index of the edge node in a feasible execution path. This represents the total number of edge nodes in a feasible execution path.
[0031] Furthermore: the double-layer chromosome encoding specifically includes: Based on the total number of subtasks of the task to be deployed, set the encoding length of each chromosome individual, where the encoding length is equal to the total number of subtasks, so that each subtask corresponds to a unique gene locus in the chromosome; Based on the task dependency table, determine the topological order of each subtask in the directed acyclic graph, so that any subtask is located before all its successor subtasks in the topological order. Arrange the identifiers of each subtask in sequence according to the topological order to obtain the task dependency layer encoding sequence. Based on the edge domain to which each subtask is assigned, a set of legal values for the server allocation layer encoding is determined for each subtask; each element in the set of legal values is a tuple, which contains a domain number and a node number. The domain number is used to identify the index of the edge domain, and the node number is used to identify the index of the edge node within the edge domain. For each gene locus on the chromosome, a pair is selected from the set of valid values and assigned to the position corresponding to that gene locus in the server allocation layer, thus obtaining the server allocation layer encoding sequence; Align the task dependency layer encoding sequence and the server allocation layer encoding sequence by gene position to obtain a chromosome individual. Each gene position in the chromosome individual contains task dependency layer information and server allocation layer information. The task dependency layer information is used to identify a subtask, and the server allocation layer information is used to identify the edge domain and edge node to which the subtask is deployed.
[0032] The further beneficial effects mentioned above are as follows: This invention adopts a two-layer chromosome encoding. Since the task dependency layer strictly follows the topological order and the legal values of the server allocation layer are limited to the edge domain range, it can ensure that each chromosome individual logically satisfies the dependency constraints between tasks and physically satisfies the legality of node deployment, thereby ensuring the feasibility of the initial population and all individuals in subsequent iterations in the genetic algorithm.
[0033] Furthermore: the crossover probability and mutation probability of the output matching the current population specifically include: S301: Based on the initial population, in the current iteration of the genetic algorithm, extract the evolutionary state of the current population. The evolutionary state features include population diversity, average population fitness, and optimal individual fitness. S302: Based on the population diversity index, the average fitness index of the population, and the fitness index of the best individual, the population is weighted and fused according to the preset weights to obtain the comprehensive status value of the current population. S303: Map the integrated state values according to the preset state discrete interval to obtain the state space set of the reinforcement learning agent; S304: Map the preset crossover probability and mutation probability according to the preset action discrete interval to obtain the preset crossover probability action set and the preset mutation probability action set, and construct the action space of the reinforcement learning agent. S305: Based on the current state of the reinforcement learning agent, select a crossover probability action from the preset set of crossover probability actions and select a mutation probability action from the preset set of mutation probability actions. S306: Based on the crossover probability value corresponding to the crossover probability action and the mutation probability value corresponding to the mutation probability action, output the crossover probability and mutation probability that match the current population.
[0034] The further beneficial effects mentioned above are as follows: The reinforcement learning agent established by this invention can dynamically output the crossover probability and mutation probability that match the current population based on the evolutionary state of the current population's diversity, average fitness, and optimal individual fitness. This enables the search behavior of the genetic algorithm to adaptively adjust with the population's evolutionary stage, thereby achieving a balance between global exploration and local development, and improving the convergence speed and solution quality of the genetic algorithm.
[0035] Furthermore, the expression for the preset joint optimization objective function is as follows:
[0036] in, The pre-defined joint optimization objective function is... , and All are weighting coefficients, and , For all services at all times Average response time For all services at all times The average deployment cost, For edge computing clusters at time The load variance; All services at time Average response time The expression is as follows:
[0037]
[0038] in, For a moment The collection of all service requests. For a moment The total number of all service requests. For a moment No. Response time for each service request For the first The set of all feasible execution paths corresponding to a service request. An index for feasible execution paths. For a moment No. The response time of a feasible execution path; All services at time average deployment cost The expression is as follows:
[0039]
[0040]
[0041] in, For a moment Deployment costs at the edge For a moment Deployment costs in the cloud For the first The set of subtasks allocated to the edge in a service request. For the first A set of subtasks assigned to the cloud in a service request. For the first subtask in the set Sub-tasks The unit price of CPUs at the edge. The unit price of memory at the edge. The unit price for network transmission at the edge. For subtasks CPU requirements For subtasks Memory requirements, For subtasks The amount of data, The unit price of CPU in the cloud. The unit price of memory in the cloud. The unit price for network transmission in the cloud; The edge computing cluster at time Load variance The expression is as follows:
[0042]
[0043]
[0044]
[0045] in, The total number of edge nodes. For a moment No. The overall resource utilization rate of each edge node For a moment Average overall resource utilization rate of all edge nodes The parameter used to balance the weights between CPU utilization and memory utilization. , For a moment No. The predicted future CPU load of each edge node For a moment No. Actual memory utilization of each edge node For a moment No. Actual CPU utilization of each edge node As the weight of the current CPU utilization, To predict the total number of time steps, For the index of the predicted time step, For the first Prediction weights for each future time step The time of output for the load prediction model No. Predicted CPU utilization of each edge node. For the first Each prediction time step.
[0046] The further beneficial effects mentioned above are as follows: This invention constructs a joint optimization objective function derived from three indicators: average response time, average deployment cost, and load variance. Service response latency, resource overhead, and cluster load are incorporated into the optimization process. The average response time in the objective function is determined based on critical path latency, the average deployment cost differentiates between edge and cloud billing, and the load variance introduces future load prediction values. Therefore, the joint optimization objective function can comprehensively evaluate the overall performance of the deployment scheme, guide the genetic algorithm and reinforcement learning agent to evolve towards optimal latency, cost economy, and load balance, and ultimately generate a service deployment scheme that meets the multi-dimensional QoS constraints of industrial edge scenarios.
[0047] The beneficial effects of this invention are: This invention constructs a node attribute matrix and a bandwidth proximity matrix, extracts the embedding vectors of each edge node using a graph convolutional network, and performs deep graph clustering by combining clustering loss and contrastive loss to divide a large number of edge nodes into several highly cohesive logical domains. Because the partitioning process deeply integrates the resource attributes and physical topology features of the nodes, and strengthens the feature distinction between different domains through contrastive loss, it can effectively compress the search space of subsequent deployment algorithms while ensuring communication efficiency between nodes within a domain. This solves the problem of low solution efficiency caused by search space explosion in large-scale heterogeneous edge environments.
[0048] This invention transforms the task to be deployed into a directed acyclic graph and identifies the critical path. Based on the critical path and edge domain, it performs two-layer chromosome encoding on each subtask. This ensures that the task dependency layer strictly follows the topological execution order of the subtasks, and the server allocation layer is strictly limited to the set of legal nodes in its respective edge domain. Because the encoding process prioritizes the critical path that determines the upper limit of the overall response latency, and the two-layer structure guarantees the logical and physical feasibility of individual chromosomes, it ensures that all deployment schemes in the initial population and during the iteration process satisfy the task dependency constraints and node deployment constraints, laying the foundation for the stable convergence of the genetic algorithm.
[0049] This invention utilizes a reinforcement learning agent to perceive the multi-dimensional evolutionary state of the current population, including diversity, average fitness, and optimal individual fitness. It dynamically outputs crossover and mutation probabilities that match the current population, enabling the genetic algorithm's search behavior to adaptively adjust with the population's evolutionary stage. Because the agent can achieve a dynamic balance between global exploration and local exploitation based on the real-time evolutionary state of the population, it significantly improves the algorithm's ability to escape local optima and its global convergence speed, solving the problem of traditional genetic algorithms easily getting trapped in local optima due to fixed parameters.
[0050] This invention integrates load prediction results into the load variance term of the joint optimization objective function, enabling deployment decisions to be aware of future resource competition risks at edge nodes. Since the objective function includes three indicators—average response time, average deployment cost, and load variance—and the average response time is determined based on critical path latency, while the load variance incorporates future load predictions, it can achieve joint optimization of system latency, deployment cost, and cluster load balancing while ensuring the quality of service on the critical path. The resulting deployment scheme is robust to cope with dynamic fluctuations at edge nodes. Attached Figure Description
[0051] Figure 1 A schematic diagram illustrating a self-learning service deployment method for industrial critical path resources; Figure 2 This is a schematic diagram of the edge domain partitioning process based on topology awareness according to the present invention; Figure 3 A schematic diagram of the algorithm deployment process for self-learning services. Detailed Implementation
[0052] The specific embodiments of the present invention are described below to enable those skilled in the art to understand the present invention. However, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the present invention as defined and determined by the appended claims. All inventions utilizing the concept of the present invention are protected.
[0053] Example 1 like Figure 1 The diagram shown is a flowchart illustrating a self-learning service deployment method for industrial critical path resources. This invention provides a self-learning service deployment method for industrial critical path resources, comprising the following steps: S1: Based on the physical topology information and node resource information in the actual industrial scenario, construct the node attribute matrix and bandwidth proximity matrix, and extract the embedding vector of each edge node through the graph convolutional network. Then, perform clustering processing on the extracted embedding vectors to divide the edge nodes into several edge domains. S2: Obtain the dependencies between subtasks in the task to be deployed, convert them into a directed acyclic graph and identify the critical path. Based on the critical path and edge domain, perform double-layer chromosome encoding on each subtask to obtain the initial population of the service deployment scheme. S3: Based on the initial population, in the current iteration of the genetic algorithm, the reinforcement learning agent perceives the evolutionary state of the current population and outputs the crossover probability and mutation probability that match the current population. S4: Based on the crossover probability and mutation probability, perform selection, crossover, and mutation operations on the current population to obtain a new generation of population; S5: Based on the preset joint optimization objective function, calculate the population fitness of each service deployment scheme in the new generation population and select the optimal service deployment scheme. Generate a reward signal based on the population fitness and feed it back to the reinforcement learning agent. S6: Determine whether the current iteration round has reached the preset termination condition. If so, output the optimal service deployment scheme; otherwise, return to step S3 to enter the next iteration round.
[0054] In industrial IoT scenarios such as industrial defect detection and real-time stream analytics, computing resources are continuously being pushed to the network edge to meet the service quality requirements of high concurrency and low latency. However, industrial edge nodes generally suffer from strong uncertainties, including heterogeneous computing power, limited resource capacity, and drastic dynamic load fluctuations. Furthermore, terminal requests are often modeled as directed acyclic graph tasks with complex serial-parallel dependencies, and their overall response latency depends on the longest critical path. Existing service deployment methods often focus on static network topology optimization, neglecting the dynamic fluctuations in node load. This leads to the planned optimal path becoming invalid due to implicit resource preemption. While reinforcement learning methods possess adaptive capabilities, their decision-making suffers from reward lag, and they are prone to overfitting and failure when faced with sudden high loads or other extreme non-stationary fluctuations, failing to guarantee the stability and reliability of the edge environment.
[0055] To address this, this invention provides a self-learning service deployment method for industrial critical path resources. It utilizes graph convolutional networks to fuse the node resources and physical topology of edge nodes, and performs end-to-end graph clustering optimization through a dual loss function of clustering and contrast, dividing the large-scale edge node network into several edge domains. This compresses the search space of the deployment algorithm while preserving the local communication efficiency between nodes within the domain. The invention transforms the service task to be deployed into a directed acyclic graph and identifies the critical path that determines the overall response time. Based on the topological order determined by the critical path and the edge domain partitioning results, a two-layer chromosome encoding is used to encode each subtask with a task dependency layer and a server allocation layer, ensuring that individual chromosomes simultaneously satisfy execution order constraints and physical deployment constraints. During the genetic algorithm iteration process, this invention introduces a reinforcement learning agent to perceive the population's evolutionary state, outputting crossover and mutation probabilities matching the current population, guiding the genetic algorithm to escape local optima and accelerate global convergence. Finally, the load prediction results are integrated into the joint optimization objective function, enabling deployment decisions to proactively avoid future resource competition risks. Through the synergistic effect of the above-mentioned technical features, this invention can quickly generate robust service deployment solutions that balance service response time, deployment cost, and load balancing in complex high-dimensional decision-making and sudden load fluctuations.
[0056] In specific embodiments of the present invention, such as Figure 2 The diagram illustrates the edge domain partitioning process based on topology awareness according to the present invention. In step S1, edge nodes are partitioned into several edge domains, specifically including: S101: Obtain physical topology information and node resource information in actual industrial scenarios; physical topology information includes the physical distance between each edge node, which can be calculated through GPS coordinates or deployment location; node resource information includes the available CPU capacity and available memory capacity of each edge node, which can be collected and queried through the monitoring platform. S102: Based on the available CPU and memory capacity of each edge node, after normalization, stack the nodes row by row to obtain the node attribute matrix. ; Representative node attribute matrix The dimension is Each row of this node attribute matrix corresponds to an edge node. The first column is the normalized CPU available capacity, and the second column is the normalized memory available capacity. Through this matrix, the graph convolutional network can perceive the resource endowment of each node, providing a basis for subsequent edge domain partitioning. S103: Construct a physical bandwidth matrix based on the physical distance between each edge node, and construct a sparse adjacency matrix through the K-nearest neighbor pruning strategy. Then, introduce an identity matrix to supplement the self-connected edges to obtain the bandwidth proximity matrix. For any two edge nodes and The expression for the matrix elements in its physical bandwidth matrix is as follows:
[0057] in, This represents the maximum communication bandwidth capacity of the link. For edge nodes and edge nodes The physical distance between them The maximum communication radius of the edge node; when At that time, edge nodes and edge nodes The signal attenuation caused by the great distance prevented communication. ; To avoid introducing redundant information through full connectivity, this invention employs a K-nearest neighbor pruning strategy based on bandwidth affinity for each edge node. From the physical bandwidth matrix The Select the row with the largest bandwidth value Each node constitutes its neighbor set. :
[0058] in, For edge nodes The set of neighboring nodes, The K-nearest neighbor pruning strategy means selecting the neighbor with the largest bandwidth. Each node forms a neighbor set; First, the physical bandwidth between nodes is calculated based on the physical distance between edge nodes. Then, a K-nearest neighbor pruning strategy is used to select several neighbor nodes with the best bandwidth for each node to form a neighbor set. Finally, the matrix elements are assigned values according to the affiliation of the neighbor sets to construct a sparse adjacency matrix. By employing a K-nearest neighbor pruning strategy, the dense physical bandwidth matrix is sparsified, reducing the computational complexity of subsequent graph convolutions while preserving key topological information. Finally, in the sparse adjacency matrix... Introducing the identity matrix based on By adding self-connected edges, we obtain the bandwidth proximity matrix. :
[0059] By introducing the identity matrix It enables graph convolutional networks to retain the resource attribute features of nodes when aggregating features, avoiding the loss of their own information during the convolution process, thereby improving the representational ability of node embedding; S104: Based on the node attribute matrix and bandwidth proximity matrix, the embedding vectors of each edge node are extracted using a deep graph clustering algorithm through a graph convolutional network to obtain the node embedding matrix; S105: Based on the preset soft assignment matrix, calculate the probability that each edge node in the node embedding matrix is assigned to a certain type of edge region, thus obtaining the soft assignment probability matrix of each edge node being assigned to each edge region; the expression of the preset soft assignment matrix is as follows: The expression for the soft-assignment probability matrix is as follows:
[0060]
[0061]
[0062] in, The dimension representing the soft allocation matrix is , The total number of edge nodes. The total number of edge domains, For soft-assignment probability matrices, For each element in the soft assignment probability matrix, represents the node in the node embedding matrix. The embedding vector of the edge node is assigned to the first edge node. The probability of each edge region, For the node embedding matrix, the first Embedding vectors of edge nodes, The squared Euclidean distance between the embedding vector and the cluster center is given by . For the first The central location of each edge domain For the first The central location of each edge domain Embed the matrix for the node. For graph convolutional networks, This is a matrix of node attributes. It is a bandwidth proximity matrix. The dimension of the embedded vector. For the index of the edge domain, For the index of the edge node; S106: Construct the target assignment matrix based on the soft assignment probability matrix, and measure the difference between the soft assignment probability matrix and the target assignment matrix based on the pre-designed joint assignment loss function. Iteratively optimize the graph convolutional network until the convergence condition is met, resulting in a converged graph convolutional network. The expression for the target distribution matrix is as follows:
[0063]
[0064] in, The target distribution matrix, For the elements of the target distribution matrix, For the first The expected number of edge nodes for each edge domain For the first The expected number of edge nodes for each edge domain.
[0065] In one embodiment of the present invention, a joint allocation loss function is designed for the iterative optimization of graph convolutional networks:
[0066] in, For the joint allocation loss function, For clustering loss, To compare the losses, To balance the hyperparameters, a value of 0-1 can be used to adjust the weight between clustering loss and contrast loss.
[0067] Clustering loss KL divergence is used to measure the soft-assignment probability matrix. With target allocation matrix The difference in distributions between them can be expressed as follows:
[0068] in, As a measure of KL divergence, The target distribution matrix, For soft-assignment probability matrices, For the index of the edge domain, For the index of the edge node, The total number of edge nodes. The total number of edge domains, For the elements of the target distribution matrix, The elements are the soft assignment probability matrix; by minimizing this KL divergence, the soft assignment distribution of each edge node is made to approximate the target distribution, thereby enabling nodes within the same edge domain to cluster towards the cluster center in the embedding space, enhancing the feature similarity of nodes within the domain.
[0069] Comparative loss Then, a constraint is applied to distinguish between positive and negative samples in the feature space:
[0070] in, The cosine similarity between two vectors. To contrast the temperature coefficient in learning, which controls the model's discrimination and penalty for negative samples, it can be set to 0.1. For the node embedding matrix, the first Embedding vectors of edge nodes, For the node embedding matrix, the first Positive sample feature vectors of edge nodes, For the node embedding matrix, the first The negative sample feature vectors of each edge node are used; the comparative loss is calculated by maximizing the similarity between positive sample pairs and minimizing the similarity between negative sample pairs. The guided graph convolutional network captures the physical topology in real industrial scenarios, making the feature differences between nodes in the edge domain more significant. When the change in the loss value of the joint assignment loss function is less than the preset change threshold or the maximum number of iterations is reached, the convergence condition is met, and a converged graph convolutional network is obtained.
[0071] S107: Based on the converged graph convolutional network, repeat S104 and S105 to output the optimal soft assignment probability matrix, and assign each edge node to the edge region with the highest probability based on the optimal soft assignment probability matrix to obtain several edge regions.
[0072] This invention divides edge domains based on graph convolutional networks and clustering. The nodes within each edge domain are highly similar in terms of physical distance, bandwidth capacity, and resource characteristics, and the edge nodes between different domains have obvious feature distinctions, providing a low-dimensional edge node search space for the deployment of subsequent service deployment schemes.
[0073] In specific embodiments of the present invention, such as Figure 3 The diagram shows a schematic of the self-learning service deployment algorithm. This invention obtains the dependencies between subtasks in the task to be deployed, transforms them into a directed acyclic graph, identifies critical paths, and performs double-layer chromosome encoding on each subtask based on the critical paths and edge domains to obtain the initial population of the service deployment scheme, specifically including: S201: Obtain the dependency relationships between the subtasks in the task to be deployed, and convert the task to be deployed into a directed acyclic graph based on the dependency relationships; when an industrial service request for a task to be deployed arrives, parse the job corresponding to the request, decompose it into several subtasks with logical dependencies, and obtain the dependency relationships between the subtasks. S202: Traverse all directed acyclic graphs to obtain all feasible execution paths, and calculate the response time of each feasible execution path; the calculation of the response time of each feasible execution path specifically includes: When on a feasible execution path When all subtasks are deployed on edge nodes, the response time expression is as follows:
[0074]
[0075]
[0076] in, For the first Feasible execution path time Response time For a moment Upload time between the terminal and edge nodes, For a moment The return time between the terminal and the edge node. For a moment Subtask Processing time, For subtasks The amount of data, For the current node at time Available computing power For a moment Subtask Kazuko's Mission Communication time between them For subtasks Transfer to subtask The amount of data, For a moment edge nodes and edge nodes Transmission bandwidth between; When the available computing power of edge nodes is insufficient and all subtasks are offloaded to the cloud for processing, the response time expression is as follows:
[0077] in, For a moment Upload time between the terminal and the cloud, For a moment The return time between the terminal and the cloud. For a moment Cloud task processing time; When a feasible execution path is found Each subtask is deployed on an edge node. When a subtask is offloaded to the cloud for processing due to insufficient available computing power, the response time is expressed as follows:
[0078] in, This is the index of the edge node in a feasible execution path. This represents the total number of edge nodes in a feasible execution path.
[0079] S203: Select the feasible execution path with the longest response time as the critical path, where the response time of the critical path is the service response time; S204: Based on the critical path, determine the execution order constraints of each subtask, and establish a task dependency table based on the dependencies between the subtasks. The task dependency table includes a list of predecessor subtasks and a list of successor subtasks; as shown in Table 1, this is the subtask dependency table for a task to be deployed: Table 1
[0080] The dependencies between these subtasks include sequential dependencies, parallel dependencies, and convergence dependencies; sequential dependencies mean that one subtask can only begin after another subtask has completed, such as service instances. subtasks Subtasks are required Subtasks can only proceed after completion. Parallel dependencies allow multiple subtasks to execute concurrently, such as service instances. subtasks Kazuko's Mission Simultaneous execution is possible; however, convergence dependencies require that all preceding subtasks be completed before a subsequent subtask can be started, such as service instances. subtasks Subtasks are required Kazuko's Mission It can only begin after all other steps are completed.
[0081] S205: Determine the range of edge nodes that can be deployed for each subtask based on the edge domain, and obtain the legal mapping set of the server allocation layer; S206: Based on the execution order constraints and task dependency table of each subtask, map each subtask to the task dependency layer, and based on the legal mapping set, map each subtask to the server allocation layer. Perform double-layer chromosome encoding on each subtask of the task to be deployed to obtain multiple chromosome individuals of the service deployment scheme. In one embodiment of the present invention, taking an industrial inspection operation with 12 sub-tasks across three service instances as an example, its DAG structure is shown in Table 2; assuming that S1 divides the data into three edge domains... ,in Represents the edge domain Includes edge servers , Represents the edge domain Includes edge servers , Represents the edge domain Includes edge servers Based on the edge domain partitioning results, the chromosome is encoded in two layers, dividing it into a task-dependent layer and a server allocation layer, as shown in Table 2: Table 2
[0082] The two-layer chromosome encoding comprises a task dependency layer and a server allocation layer. The task dependency layer characterizes the execution order constraints between subtasks, while the server allocation layer characterizes the mapping relationship between each subtask and a specific edge node within the edge domain. In the task dependency layer, the first "1" represents a service instance. The first subtask This corresponds to "1-3" in the server allocation layer, meaning the task is assigned to region. Edge servers in The second "1" indicates The second subtask The corresponding "1-1" indicates that the task has been assigned to the region. Edge servers in According to the above rules, the final service allocation result for the node is: Server The set of subtasks assigned above is ;server The set of subtasks assigned above is ;server The set of subtasks assigned above is ;server The set of subtasks assigned above is ;server The set of subtasks assigned above is .
[0083] In one embodiment of the present invention, the double-layer chromosome encoding specifically includes: Based on the total number of subtasks of the task to be deployed, set the encoding length of each chromosome individual, where the encoding length is equal to the total number of subtasks, so that each subtask corresponds to a unique gene locus in the chromosome; Based on the task dependency table, determine the topological order of each subtask in the directed acyclic graph, so that any subtask is located before all its successor subtasks in the topological order. Arrange the identifiers of each subtask in sequence according to the topological order to obtain the task dependency layer encoding sequence. Based on the edge domain to which each subtask is assigned, a set of legal values for the server allocation layer encoding is determined for each subtask; each element in the set of legal values is a tuple, which contains a domain number and a node number. The domain number is used to identify the index of the edge domain, and the node number is used to identify the index of the edge node within the edge domain. For each gene locus on the chromosome, a pair is selected from the set of valid values and assigned to the position corresponding to that gene locus in the server allocation layer, thus obtaining the server allocation layer encoding sequence; Align the task dependency layer encoding sequence and the server allocation layer encoding sequence by gene position to obtain a chromosome individual. Each gene position in the chromosome individual contains task dependency layer information and server allocation layer information. The task dependency layer information is used to identify a subtask, and the server allocation layer information is used to identify the edge domain and edge node to which the subtask is deployed.
[0084] S207: Based on multiple chromosome individuals of the service deployment scheme, construct the initial population of the service deployment scheme.
[0085] In a specific embodiment of the present invention, the output of the crossover probability and mutation probability matching the current population specifically includes: S301: Based on the initial population, in the current iteration of the genetic algorithm, extract the evolutionary state of the current population. The evolutionary state features include population diversity, average population fitness, and optimal individual fitness. Population diversity indicators This is used to measure the dispersion of individuals in the current population, preventing the population from converging to a local optimum too early.
[0086] in, For the first The first generation of the population The joint optimization objective function value corresponding to each chromosome individual. Population size refers to the total number of deployment schemes included in each generation; the population diversity index reflects the degree of preservation of population diversity by calculating the ratio of the mean absolute deviation of the fitness of the current generation to the mean absolute deviation of the fitness of the initial generation. The larger the value, the higher the diversity of the current population; genetic algorithms are still in the exploratory stage. The smaller the value, the more homogenized the population becomes, requiring enhanced mutation operations to introduce new genes.
[0087] average fitness of the population Used to measure the overall performance level of the current population:
[0088] The average fitness of a population is calculated as the ratio of the sum of the fitness of the current generation to the sum of the fitness of the initial generation, reflecting the degree of evolution of the overall performance of the population. The smaller the value, the better the overall performance of the population, and the closer the genetic algorithm has gotten to the optimal solution region.
[0089] Optimal individual fitness It is used to measure the performance level of the best individual in the current population:
[0090] The optimal individual fitness is calculated by comparing the current generation's optimal individual fitness with the initial generation's optimal individual fitness, reflecting the degree of improvement in the algorithm's optimization accuracy. The smaller the value, the better the solution the algorithm has found.
[0091] S302: Based on the population diversity index, the average fitness index, and the optimal individual fitness index, a weighted fusion is performed according to preset weights to obtain the comprehensive state value of the current population.
[0092] in, , and All are weighting coefficients, satisfying The overall state value of the current population is a continuous value, which describes the evolutionary status of the current population from multiple dimensions: The degree of tax collection is indicated. Characterizing the degree of diversity preservation The search accuracy representing the optimal solution, after weighted fusion, can provide reinforcement learning agents with a comprehensive understanding of the population state; The smaller the value, the better the overall performance of the population, the better the diversity is maintained, and the higher the quality of the optimal solution.
[0093] S303: Map the integrated state values according to a preset discrete state interval to obtain the state space set of the reinforcement learning agent; In one embodiment of the present invention, considering the storage efficiency and search accuracy of the Q-table in reinforcement learning, directly using continuous integrated state values will lead to the curse of dimensionality. Therefore, the integrated state values of the current population are mapped... The range of values is divided into 20 discrete intervals, resulting in the state space set of the reinforcement learning agent. ; S304: Map the preset crossover probabilities and mutation probabilities according to preset action discrete intervals to obtain preset action sets with crossover probabilities and preset action sets with mutation probabilities, and construct the action space of the reinforcement learning agent; for example, the action space is composed of crossover probabilities... and mutation probability It consists of discrete value intervals; S305: Based on the current state of the reinforcement learning agent, select a crossover probability action from the preset set of crossover probability actions and select a mutation probability action from the preset set of mutation probability actions. S306: Based on the crossover probability value corresponding to the crossover probability action and the mutation probability value corresponding to the mutation probability action, output the crossover probability and mutation probability that match the current population.
[0094] After obtaining the crossover and mutation probabilities of the current population, S4 performs selection, crossover, and mutation operations on the current population based on the crossover and mutation probabilities to obtain a new generation of population. The core purpose of crossover operations is to recombine high-quality components and overcome current performance bottlenecks; therefore, the relative decrease rate of globally optimal deployment overhead is used as the crossover reward. :
[0095] The mutation operation aims to explore potential low-load paths and prevent getting trapped in local optima; therefore, the relative decrease rate of the overall population deployment cost is used as the mutation reward. :
[0096] If the reward is positive, the reinforcement learning agent receives positive incentives to increase the probability of subsequent triggering of the strategy; conversely, negative feedback is implemented by reducing the Q-score of the corresponding action. To balance the "exploration" and "exploitation" of actions, the reinforcement learning agent of this invention adopts... - Greedy strategy (setting) The agent makes action selections. During each generation of parameter decisions, the agent uses... The probability of developing current experience, in order to The probability of randomly exploring an unknown parameter range.
[0097] This invention relates to a reinforcement learning agent that updates its Q-value. During the Q-value update phase, to protect the unstable evolutionary direction of the initial population, the algorithm initially uses a single-step SARSA algorithm with the same strategy to update the Q-value, suppressing drastic parameter fluctuations. When the cumulative number of iterations exceeds half the product of the total number of states and actions, it indicates that the system has accumulated sufficient experience. At this point, a different strategy Q-learning algorithm is switched to update the Q-value, greedily seeking the maximum expected return to mask exploration noise and accelerate convergence. Finally, based on the converged Q-table, the system outputs the optimal probability configuration strategy that maximizes the expected return, driving efficient optimization of the service deployment scheme.
[0098] In a specific embodiment of the present invention, S5: According to the preset joint optimization objective function, calculate the population fitness of each service deployment scheme in the new generation population and select the optimal service deployment scheme, and generate a reward signal based on the population fitness and feed it back to the reinforcement learning agent. The expression for the pre-defined joint optimization objective function is as follows:
[0099] in, The pre-defined joint optimization objective function is... , and All are weighting coefficients, and , For all services at all times Average response time For all services at all times The average deployment cost, For edge computing clusters at time The load variance; All services are available at all times. Average response time The expression is as follows:
[0100]
[0101] in, For a moment The collection of all service requests. For a moment The total number of all service requests. For a moment No. Response time for each service request For the first The set of all feasible execution paths corresponding to a service request. An index for feasible execution paths. For a moment No. The response time of a feasible execution path; All services are available at all times. average deployment cost The expression is as follows:
[0102]
[0103]
[0104] in, For a moment Deployment costs at the edge For a moment Deployment costs in the cloud For the first The set of subtasks allocated to the edge in a service request. For the first A set of subtasks assigned to the cloud in a service request. For the first subtask in the set Sub-tasks The unit price of CPUs at the edge. The unit price of memory at the edge. The unit price for network transmission at the edge. For subtasks CPU requirements For subtasks Memory requirements, For subtasks The amount of data, The unit price of CPU in the cloud. The unit price of memory in the cloud. The unit price for network transmission in the cloud; Edge computing clusters at time Load variance The expression is as follows:
[0105]
[0106]
[0107]
[0108] in, The total number of edge nodes. For a moment No. The overall resource utilization rate of each edge node For a moment Average overall resource utilization rate of all edge nodes The parameter used to balance the weights between CPU utilization and memory utilization. , For a moment No. The predicted future CPU load of each edge node For a moment No. Actual memory utilization of each edge node For a moment No. Actual CPU utilization of each edge node As the weight of the current CPU utilization, To predict the total number of time steps, For the index of the predicted time step, For the first Prediction weights for each future time step The time of output for the load prediction model No. Predicted CPU utilization of each edge node. For the first Each prediction time step.
[0109] To ensure the feasibility of the deployment scheme, the following constraints must be met in this invention:
[0110]
[0111]
[0112]
[0113] in, For a moment The tasks to be processed For a moment edge nodes, For a moment The set of indexes for physical links, For nodes and direct links between them For task execution Required CPU unit For task execution Required memory amount For edge nodes Available CPUs For edge nodes Total memory, For a moment Link to link The indicator variable, when the path Physical links traversed during routing , Otherwise, it is 0. For a moment Data Stream Instantaneous transmission rate; , and They are time points physical link The available upper limit of bandwidth, node CPU and memory capacity. Ensure that the resource requirements of the tasks carried by the node do not exceed its CPU. Ensure that the resource requirements of the tasks carried by the node do not exceed its memory capacity. Ensure that the total traffic on each link is within the bandwidth limit. Service response time must be lower than the maximum tolerable latency. .
[0114] In a specific embodiment of the present invention, after obtaining the optimal service deployment scheme, S6 determines whether the current iteration round has reached the preset termination condition. If so, the optimal service deployment scheme is output; otherwise, the process returns to step S3 to enter the next iteration round.
[0115] The beneficial effects of this invention are as follows: This invention deeply integrates the resource attributes and physical topology features of edge nodes through graph convolutional networks, and performs deep graph clustering by combining clustering loss and contrastive loss for joint optimization. This divides the large-scale edge network into highly cohesive logical domains, compressing the search space while preserving intra-domain communication efficiency. By transforming the tasks to be deployed into directed acyclic graphs and identifying critical paths, and combining two-layer chromosome encoding, the task dependency layer strictly follows the topological order, and the server allocation layer is limited to the range of legal nodes in the edge domain, ensuring the logical and physical feasibility of all individuals and prioritizing the resource supply of critical paths. Through reinforcement learning agents, the invention perceives multi-dimensional evolutionary states such as population diversity, average fitness, and optimal individual fitness, and dynamically outputs matching crossover and mutation probabilities. This allows the search behavior of the genetic algorithm to adaptively adjust with the population evolution stage, achieving a dynamic balance between global exploration and local development, significantly improving the ability to escape local optima and global convergence speed. At the same time, the load prediction results are integrated into the joint optimization objective function, enabling deployment decisions to proactively avoid future resource competition risks. Through the synergistic effect of the above-mentioned technical features, this invention can quickly generate robust deployment solutions that balance service response time, deployment cost, and load balancing in complex high-dimensional decision-making and sudden load fluctuations, thus meeting the needs of real-time performance, reliability, and efficient resource utilization in industrial edge scenarios.
Claims
1. A method for deploying self-learning services for industrial critical path resources, characterized in that, Includes the following steps: S1: Based on the physical topology information and node resource information in the actual industrial scenario, construct the node attribute matrix and bandwidth proximity matrix, and extract the embedding vector of each edge node through the graph convolutional network. Then, perform clustering processing on the extracted embedding vectors to divide the edge nodes into several edge domains. S2: Obtain the dependencies between subtasks in the task to be deployed, convert them into a directed acyclic graph and identify the critical path. Based on the critical path and edge domain, perform double-layer chromosome encoding on each subtask to obtain the initial population of the service deployment scheme. S3: Based on the initial population, in the current iteration of the genetic algorithm, the reinforcement learning agent perceives the evolutionary state of the current population and outputs the crossover probability and mutation probability that match the current population. S4: Based on the crossover probability and mutation probability, perform selection, crossover, and mutation operations on the current population to obtain a new generation of population; S5: Based on the preset joint optimization objective function, calculate the population fitness of each service deployment scheme in the new generation population and select the optimal service deployment scheme. Generate a reward signal based on the population fitness and feed it back to the reinforcement learning agent. S6: Determine whether the current iteration round has reached the preset termination condition. If so, output the optimal service deployment scheme; otherwise, return to step S3 to enter the next iteration round.
2. The self-learning service deployment method for industrial critical path resources according to claim 1, characterized in that, The process of dividing the edge nodes into several edge domains specifically includes: S101: Obtain physical topology information and node resource information in actual industrial scenarios; physical topology information includes the physical distance between each edge node, and node resource information includes the available CPU capacity and available memory capacity of each edge node; S102: Based on the available CPU capacity and available memory capacity of each edge node, after normalization processing, the nodes are stacked row by row to obtain the node attribute matrix; S103: Construct a physical bandwidth matrix based on the physical distance between each edge node, and construct a sparse adjacency matrix through the K-nearest neighbor pruning strategy. Then, introduce an identity matrix to supplement the self-connected edges to obtain the bandwidth proximity matrix. S104: Based on the node attribute matrix and bandwidth proximity matrix, the embedding vectors of each edge node are extracted using a deep graph clustering algorithm through a graph convolutional network to obtain the node embedding matrix; S105: Based on the preset soft assignment matrix, calculate the probability that each edge node in the node embedding matrix is assigned to a certain type of edge domain, and obtain the soft assignment probability matrix of each edge node being assigned to each edge domain. S106: Construct the target assignment matrix based on the soft assignment probability matrix, and measure the difference between the soft assignment probability matrix and the target assignment matrix based on the pre-designed joint assignment loss function. Iteratively optimize the graph convolutional network until the convergence condition is met, and obtain the converged graph convolutional network. S107: Based on the converged graph convolutional network, repeat S104 and S105 to output the optimal soft assignment probability matrix, and assign each edge node to the edge region with the highest probability based on the optimal soft assignment probability matrix to obtain several edge regions.
3. The self-learning service deployment method for industrial critical path resources according to claim 2, characterized in that, The expression for the bandwidth proximity matrix is as follows: in, It is a bandwidth proximity matrix. It is a sparse adjacency matrix. It is the identity matrix. For edge nodes The set of neighboring nodes, The K-nearest neighbor pruning strategy operation represents the operation on the bandwidth matrix. In the middle, select the one with the largest bandwidth. The node constructs the first Line 1 List the neighbor set of each edge node. These are matrix elements in the physical bandwidth matrix. This represents the maximum communication bandwidth capacity of the link. For edge nodes and edge nodes The physical distance between them The maximum communication radius of the edge node; the expression for the node attribute matrix is as follows: in, Representative node attribute matrix The dimension is , The dimension representing the bandwidth proximity matrix is , This represents the total number of edge nodes.
4. The self-learning service deployment method for industrial critical path resources according to claim 2, characterized in that, The expression for the preset soft allocation matrix is as follows: The expression for the soft-assignment probability matrix is as follows: in, The dimension representing the soft allocation matrix is , The total number of edge nodes. The total number of edge domains, For soft-assignment probability matrices, For each element in the soft assignment probability matrix, represents the node in the node embedding matrix. The embedding vector of the edge node is assigned to the first edge node. The probability of each edge region, For the node embedding matrix, the first Embedding vectors of edge nodes, The squared Euclidean distance between the embedding vector and the cluster center is given by . For the first The central location of each edge domain For the first The central location of each edge domain Embed the matrix for the node. For graph convolutional networks, This is a matrix of node attributes. It is a bandwidth proximity matrix. The dimension of the embedded vector. For the index of the edge domain, For the index of the edge node; The expression for the target distribution matrix is as follows: in, The target distribution matrix, For the elements of the target distribution matrix, For the first The expected number of edge nodes for each edge domain For the first The expected number of edge nodes for each edge domain.
5. The self-learning service deployment method for industrial critical path resources according to claim 2, characterized in that, The expression for the joint allocation loss function is as follows: in, For the joint allocation loss function, For clustering loss, To compare the losses, To balance the hyperparameters, a value of 0-1 can be used. As a measure of KL divergence, The target distribution matrix, For soft-assignment probability matrices, For the index of the edge domain, For the index of the edge node, The total number of edge nodes. The total number of edge domains, For the elements of the target distribution matrix, For the elements of the soft-assignment probability matrix, The cosine similarity between two vectors. The temperature coefficient, used to control the model's discrimination and penalty for negative samples during comparative learning, can be set to 0.
1. For the node embedding matrix, the first Embedding vectors of edge nodes, For the node embedding matrix, the first Positive sample feature vectors of edge nodes, For the node embedding matrix, the first The negative sample feature vector of each edge node.
6. The self-learning service deployment method for industrial critical path resources according to claim 1, characterized in that, The initial population for obtaining the service deployment plan specifically includes: S201: Obtain the dependencies between subtasks in the task to be deployed, and convert the task to be deployed into a directed acyclic graph based on the dependencies; S202: Traverse all directed acyclic graphs to obtain all feasible execution paths, and calculate the response time of each feasible execution path; S203: Select the feasible execution path with the longest response time as the critical path, where the response time of the critical path is the service response time; S204: Based on the critical path, determine the execution order constraints of each subtask, and establish a task dependency table in combination with the dependencies between each subtask. The task dependency table includes a list of predecessor subtasks and a list of successor subtasks. S205: Determine the range of edge nodes that can be deployed for each subtask based on the edge domain, and obtain the legal mapping set of the server allocation layer; S206: Based on the execution order constraints and task dependency table of each subtask, map each subtask to the task dependency layer, and based on the legal mapping set, map each subtask to the server allocation layer. Perform double-layer chromosome encoding on each subtask of the task to be deployed to obtain multiple chromosome individuals of the service deployment scheme. S207: Based on multiple chromosome individuals of the service deployment scheme, construct the initial population of the service deployment scheme; The dual-layer chromosome encoding includes a task dependency layer and a server allocation layer. The task dependency layer is used to characterize the execution order between subtasks, and the server allocation layer is used to characterize the mapping relationship between each subtask and a specific edge node in the edge domain.
7. The self-learning service deployment method for industrial critical path resources according to claim 6, characterized in that, The calculation of the response time for each feasible execution path specifically includes: When on a feasible execution path When all subtasks are deployed on edge nodes, the response time expression is as follows: in, For the first Feasible execution path time Response time For a moment Upload time between the terminal and edge nodes, For a moment The return time between the terminal and the edge node. For a moment Subtask Processing time, For subtasks The amount of data, For the current node at time Available computing power For a moment Subtask Kazuko's Mission Communication time between them For subtasks Transfer to subtask The amount of data, For a moment edge nodes and edge nodes Transmission bandwidth between; When the available computing power of edge nodes is insufficient and all subtasks are offloaded to the cloud for processing, the response time expression is as follows: in, For a moment Upload time between the terminal and the cloud, For a moment The return time between the terminal and the cloud. For a moment Cloud task processing time; When a feasible execution path is found Each subtask is deployed on an edge node. When a subtask is offloaded to the cloud for processing due to insufficient available computing power, the response time is expressed as follows: in, This is the index of the edge node in a feasible execution path. This represents the total number of edge nodes in a feasible execution path.
8. The self-learning service deployment method for industrial critical path resources according to claim 6, characterized in that, The double-layer chromosome encoding specifically includes: Based on the total number of subtasks of the task to be deployed, set the encoding length of each chromosome individual, where the encoding length is equal to the total number of subtasks, so that each subtask corresponds to a unique gene locus in the chromosome; Based on the task dependency table, determine the topological order of each subtask in the directed acyclic graph, so that any subtask is located before all its successor subtasks in the topological order. Arrange the identifiers of each subtask in sequence according to the topological order to obtain the task dependency layer encoding sequence. Based on the edge domain to which each subtask is assigned, a set of legal values for the server allocation layer encoding is determined for each subtask; each element in the set of legal values is a tuple, which contains a domain number and a node number. The domain number is used to identify the index of the edge domain, and the node number is used to identify the index of the edge node within the edge domain. For each gene locus on the chromosome, a pair is selected from the set of valid values and assigned to the position corresponding to that gene locus in the server allocation layer, thus obtaining the server allocation layer encoding sequence; Align the task dependency layer encoding sequence and the server allocation layer encoding sequence by gene position to obtain a chromosome individual. Each gene position in the chromosome individual contains task dependency layer information and server allocation layer information. The task dependency layer information is used to identify a subtask, and the server allocation layer information is used to identify the edge domain and edge node to which the subtask is deployed.
9. The self-learning service deployment method for industrial critical path resources according to claim 1, characterized in that, The crossover and mutation probabilities that the output matches the current population specifically include: S301: Based on the initial population, in the current iteration of the genetic algorithm, extract the evolutionary state of the current population. The evolutionary state features include population diversity, average population fitness, and optimal individual fitness. S302: Based on the population diversity index, the average fitness index of the population, and the fitness index of the best individual, the population is weighted and fused according to the preset weights to obtain the comprehensive status value of the current population. S303: Map the integrated state values according to the preset state discrete interval to obtain the state space set of the reinforcement learning agent; S304: Map the preset crossover probability and mutation probability according to the preset action discrete interval to obtain the preset crossover probability action set and the preset mutation probability action set, and construct the action space of the reinforcement learning agent. S305: Based on the current state of the reinforcement learning agent, select a crossover probability action from the preset set of crossover probability actions and select a mutation probability action from the preset set of mutation probability actions. S306: Based on the crossover probability value corresponding to the crossover probability action and the mutation probability value corresponding to the mutation probability action, output the crossover probability and mutation probability that match the current population.
10. The self-learning service deployment method for industrial critical path resources according to claim 1, characterized in that, The expression for the preset joint optimization objective function is as follows: in, The pre-defined joint optimization objective function is... , and All are weighting coefficients, and , For all services at all times Average response time For all services at all times The average deployment cost, For edge computing clusters at time The load variance; All services at time Average response time The expression is as follows: in, For a moment The collection of all service requests. For a moment The total number of all service requests. For a moment No. Response time for each service request For the first The set of all feasible execution paths corresponding to a service request. An index for feasible execution paths. For a moment No. The response time of a feasible execution path; All services at time average deployment cost The expression is as follows: in, For a moment Deployment costs at the edge For a moment Deployment costs in the cloud For the first The set of subtasks allocated to the edge in a service request. For the first A set of subtasks assigned to the cloud in a service request. For the first subtask in the set Sub-tasks The unit price of CPUs at the edge. The unit price of memory at the edge. The unit price for network transmission at the edge. For subtasks CPU requirements For subtasks Memory requirements, For subtasks The amount of data, The unit price of CPU in the cloud. The unit price of memory in the cloud. The unit price for network transmission in the cloud; The edge computing cluster at time Load variance The expression is as follows: in, The total number of edge nodes. For a moment No. The overall resource utilization rate of each edge node For a moment Average overall resource utilization rate of all edge nodes The parameter used to balance the weights between CPU utilization and memory utilization. , For a moment No. The predicted future CPU load of each edge node For a moment No. Actual memory utilization of each edge node For a moment No. Actual CPU utilization of each edge node As the weight of the current CPU utilization, To predict the total number of time steps, For the index of the predicted time step, For the first Prediction weights for each future time step The time of output for the load prediction model No. Predicted CPU utilization of each edge node. For the first Each prediction time step.
