Method, medium and system for optimizing communication path between industrial production micro-services

Through real-time monitoring and stable fluctuation decomposition technology, combined with similarity calculation and two-layer optimization model, the communication path between microservice nodes is optimized, solving the problem of insufficient optimization of communication paths between microservices in the existing technology, and significantly improving communication performance and resource utilization efficiency.

CN119906665AActive Publication Date: 2025-04-29BEIJING NANCAL RUIYUAN DIGITAL TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510379074.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-29
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The existing technology has limitations in optimizing communication paths between industrial production microservices, and it is difficult to fully utilize the advantages of microservice architecture, which restricts the further development of smart factories.

Method used

Using technical means such as real-time monitoring, stable fluctuation decomposition, similarity calculation and two-layer optimization model, a two-layer model for microservice node communication path optimization is built, and global path planning and internal model are carried out through the outer model to achieve overall performance optimization of the system.

Benefits of technology

It significantly improves the communication performance and resource utilization efficiency between microservice nodes, solves the problem of insufficient optimization of communication paths between microservices in the existing technology, and provides more accurate data support and stronger interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906665A_ABST
    Figure CN119906665A_ABST
Patent Text Reader

Abstract

The invention provides a communication path optimization method between industrial production micro-services, a medium and a system, and belongs to the technical field of electric digital data processing, and the method comprises the steps: collecting basic communication data between micro-service nodes in real time, and generating a micro-service node basic data set containing a multi-dimensional index; establishing a micro-service node similarity calculation function and a micro-service node similarity threshold, and calculating a node similarity value based on the micro-service node basic data set; constructing a micro-service node communication path optimization double-layer model comprising an outer-layer optimization model and an inner-layer optimization model; iterative optimization is carried out until the upper limit of the number of times of iterative optimization of the micro-service nodes is reached, and a final micro-service node communication topological graph containing output results of the main communication path optimization equation set and the local communication path optimization equation set is obtained and used for optimizing communication paths between industrial production micro-services. The technical problem that in the prior art, a communication path between micro-services is not optimized enough is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a method, medium and system for optimizing communication paths between industrial production microservices. Background Art

[0002] With the rapid development of intelligent and automated industrial production, industrial control systems based on microservice architecture are gaining more and more attention. This architecture divides the entire production process into multiple independent microservice modules, and loosely coupled communication and collaboration between microservice nodes through the network can improve the flexibility, scalability and maintainability of the system. However, in an industrial production environment, microservice nodes are numerous, widely distributed, and resource-constrained. How to effectively optimize the communication path between nodes has become a technical problem that needs to be solved urgently.

[0003] At present, the commonly used microservice communication path optimization methods in the industry mainly include: dynamic routing strategy based on load balancing, communication link selection based on quality of service, intelligent decision-making model based on machine learning, etc. These methods have improved the communication efficiency between microservice nodes to a certain extent, but there are still some problems: 1. Load balancing strategies usually only focus on the resource utilization of the node itself, but ignore the dynamic coupling communication characteristics between nodes, making it difficult to achieve global optimization; 2. The link selection oriented to the quality of service is often too simplistic and it is difficult to accurately describe the changing rules of performance indicators in complex communication environments; 3. Although intelligent decision-making models based on machine learning can adapt to dynamic changes, they require a large amount of historical data support and it is difficult to explain the optimization mechanism within the model.

[0004] It can be seen that the existing technology still has certain limitations in optimizing the communication path of industrial production microservices, which makes it difficult to give full play to the advantages of the microservice architecture and restricts the further development of smart factories.

[0005] It can be seen that the existing technology still has certain limitations in optimizing the communication path of industrial production microservices, making it difficult to give full play to the advantages of the microservice architecture, which restricts the further development of smart factories. Therefore, a new communication path optimization method is urgently needed to solve the technical problem that the communication path between microservices in the existing technology is not optimized enough. Summary of the invention

[0006] In view of this, the present invention provides a method, medium and system for optimizing the communication path between industrial production microservices, which solves the technical problem that the communication path between microservices in the prior art is not optimized enough. The present invention is implemented as follows: The first aspect of the present invention provides a method for optimizing the communication path between industrial production microservices, comprising the following steps: real-time collection of basic communication data between microservice nodes, generating a microservice node basic data set containing multi-dimensional indicators; performing stable fluctuation decomposition calculation on the communication delay data and bandwidth data of the microservice nodes to obtain corresponding stable components and fluctuation components; establishing a microservice node similarity calculation function and a microservice node similarity threshold, and calculating the node similarity value based on the microservice node basic data set; constructing a two-layer model for optimizing the communication path of microservice nodes including an outer optimization model and an inner optimization model; establishing a main communication path optimization equation group and a local communication path optimization equation group; performing iterative optimization of the two-layer model and synchronizing the optimization scheme when the optimization conditions are met; repeatedly performing the optimization until the upper limit of the number of iterative optimization times of the microservice nodes is reached, and obtaining the final microservice node communication topology diagram including the output results of the main communication path optimization equation group and the local communication path optimization equation group.

[0007] Among them, the microservice node basic data set includes microservice node communication delay data, microservice node bandwidth data, microservice node processing capacity data, microservice node load rate data, microservice node data transmission volume data, microservice node historical failure rate data, microservice node concurrent processing capacity data, microservice node network congestion data, microservice node hop weight data, microservice node geographical distance data, microservice node communication protocol compatibility data, microservice node service quality level data, microservice node fault tolerance data, microservice node load balancing factor data, microservice node resource utilization data, microservice node energy consumption coefficient data, and microservice node maintenance cost data.

[0008] Among them, the communication delay data of the microservice node is subjected to stable fluctuation decomposition calculation to obtain the stable component of the microservice node communication delay and the fluctuating component of the microservice node communication delay; the bandwidth data of the microservice node is subjected to stable fluctuation decomposition calculation to obtain the stable component of the microservice node bandwidth and the fluctuating component of the microservice node bandwidth.

[0009] The outer layer optimization model of the microservice node communication path is used for global communication path optimization, and the inner layer optimization model of the microservice node communication path is used for local communication path optimization.

[0010] Among them, the main communication path optimization equation group includes a microservice node type determination equation, a microservice node path distance equation, a microservice node efficiency constraint equation, and a microservice node total cost equation.

[0011] Among them, the microservice node type determination equation is used to determine whether the microservice node belongs to a first-level transmission microservice node or a second-level transmission microservice node; the microservice node path distance equation is used to calculate the shortest distance of the communication path between the microservice nodes; the microservice node efficiency constraint equation is used to limit the efficiency threshold of the communication path between the microservice nodes; the microservice node total cost equation is used to calculate the overall resource consumption of the communication path of the microservice node.

[0012] Among them, the local communication path optimization equation group includes a microservice node power balance equation, a microservice node bandwidth balance equation, and a microservice node load balancing equation.

[0013] Among them, the microservice node power balance equation is used to balance the computing and processing power allocation of the microservice node; the microservice node bandwidth balance equation is used to balance the bandwidth resource allocation of the microservice node; and the microservice node load balancing equation is used to balance the task load distribution of the microservice node.

[0014] A second aspect of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are run in a computer, they are used to execute the above-mentioned method for optimizing communication paths between industrial production microservices.

[0015] A third aspect of the present invention provides a method for optimizing communication paths between industrial production microservices, comprising the above-mentioned computer-readable storage medium.

[0016] The technical effect of the present invention is: the present invention adopts technical means such as real-time monitoring, stable fluctuation decomposition, similarity calculation, and two-layer optimization modeling to achieve a comprehensive description and dynamic optimization of the communication characteristics of microservice nodes.

[0017] First, the key communication data between microservice nodes, including communication delay, bandwidth, processing capacity, load rate, etc., are collected in real time to build a basic data set of microservice nodes. Then, the Hilbert-Huang transform algorithm is used to decompose the communication delay and bandwidth data into stable and fluctuating components, and their stable components and fluctuating components are obtained. This lays the foundation for subsequent similarity calculation and optimization modeling.

[0018] Secondly, a microservice node similarity calculation function was established to quantitatively describe the similarity between nodes. This provides a basis for subsequent local optimization. Subsequently, a two-layer microservice node communication path optimization model was constructed. The outer model is responsible for global communication path optimization, including node type determination, shortest path distance calculation, communication efficiency constraints, and overall resource consumption; the inner model is responsible for local communication path optimization, including power balance, bandwidth balance, and load balancing.

[0019] Finally, through multiple rounds of iterative optimization, the optimized microservice node communication topology diagram was finally obtained. This topology diagram can provide decision support for industrial production systems and significantly improve the overall communication performance and resource utilization efficiency.

[0020] Compared with the prior art, the solution of the present invention has the following advantages: 1. Real-time monitoring and stable fluctuation decomposition are used to comprehensively characterize the dynamic communication characteristics of microservice nodes, providing more accurate data support for subsequent optimization decisions; 2. The introduction of similarity calculation can identify the correlation between nodes, realize the propagation and sharing of local optimization results between similar nodes, and improve the global optimization effect; 3. A two-layer optimization model was constructed, which not only takes into account the overall communication efficiency but also takes into account the resource balance between nodes, reflecting the coordinated optimization of the global and local aspects; 4. The use of interpretable mathematical modeling methods, such as partial differential equations and calculus of variations, can not only obtain optimization results, but also provide insights into the internal optimization mechanism, and has strong interpretability.

[0021] In summary, the solution of the present invention makes full use of the communication characteristics of microservice nodes in the industrial production environment, and effectively improves the communication performance and resource utilization efficiency of the entire production system through real-time monitoring, dynamic analysis and coordinated optimization, providing technical support for the development of smart factories. It solves the technical problem of insufficient optimization of the communication path between microservices in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A flowchart of a specific embodiment of the present invention; Figure 2 It is a time series variation diagram of the basic monitoring data in Example 2, including two sub-diagrams: the upper sub-diagram is a diagram of the fluctuation of the communication delay over time, and the lower sub-diagram is a diagram of the variation of the bandwidth B over time; Figure 3 This is a result graph of HHT decomposition of the communication delay data in Example 2, including 4 sub-graphs, which are, from top to bottom, a high-frequency IMF component graph, a medium-frequency IMF component graph, a low-frequency IMF component graph, and an overall trend item graph; Figure 4 It is the node similarity heat map in Example 2; Figure 5 This is the optimized microservice communication topology diagram in Example 2. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0024] A first aspect of the present invention provides a method for optimizing communication paths between industrial production microservices, comprising the following steps: S10, collecting basic communication data between microservice nodes in real time, generating a microservice node basic data set, wherein the microservice node basic data set includes microservice node communication delay data, microservice node bandwidth data, microservice node processing capacity data, microservice node load rate data, microservice node data transmission volume data, microservice node historical failure rate data, microservice node concurrent processing capacity data, microservice node network congestion data, microservice node hop weight data, microservice node geographic distance data, microservice node communication protocol compatibility data, microservice node service quality level data, microservice node fault tolerance data, microservice node load balancing factor data, microservice node resource utilization data, microservice node energy consumption coefficient data, and microservice node maintenance cost data; S20, performing stable-fluctuation decomposition calculation on the microservice node communication delay data to obtain a stable component of the microservice node communication delay and a fluctuating component of the microservice node communication delay; S30, performing stable-fluctuation decomposition calculation on the microservice node bandwidth data to obtain a stable component of the microservice node bandwidth and a fluctuating component of the microservice node bandwidth; S40, establishing a microservice node similarity calculation function and a microservice node similarity threshold, and calculating the microservice node similarity values ​​between each pair of the microservice nodes based on the microservice node basic data set; S50, constructing a two-layer model for optimizing the communication path of a microservice node, wherein the two-layer model for optimizing the communication path of a microservice node includes an outer layer optimization model for the communication path of a microservice node and an inner layer optimization model for the communication path of a microservice node, wherein the outer layer optimization model for the communication path of a microservice node is used for optimizing the global communication path, and the inner layer optimization model for the communication path of a microservice node is used for optimizing the local communication path; S60, establishing a main communication path optimization equation group of the microservice node communication path outer optimization model, wherein the main communication path optimization equation group includes a microservice node type determination equation, a microservice node path distance equation, a microservice node efficiency constraint equation, and a microservice node total cost equation; S70, establishing a local communication path optimization equation group of the microservice node communication path inner layer optimization model, wherein the local communication path optimization equation group includes a microservice node power balance equation, a microservice node bandwidth balance equation, and a microservice node load balancing equation, and setting an upper limit on the number of iterative optimization times for the microservice node; S80, performing iterative optimization of the outer optimization model of the microservice node communication path to obtain an initial plan for the global communication path of the microservice node, taking the initial plan for the global communication path of the microservice node as input to perform iterative optimization of the inner optimization model of the microservice node communication path to generate an optimization plan for the local communication path of the microservice node, and when the microservice node load distribution value of a certain microservice node is better than the existing microservice node load distribution value, synchronizing the local communication path optimization plan of the microservice node to other microservice nodes whose microservice node similarity values ​​are greater than the microservice node similarity threshold; S90. Repeat step S80 until the upper limit of the iterative optimization times of the microservice node is reached, and obtain a final microservice node communication topology map, wherein the final microservice node communication topology map includes output results of the main communication path optimization equation group and the local communication path optimization equation group.

[0025] The main communication path optimization equation group includes a microservice node type determination equation, a microservice node path distance equation, a microservice node efficiency constraint equation, and a microservice node total cost equation; The microservice node type determination equation is used to determine whether the microservice node belongs to a first-level transmission microservice node or a second-level transmission microservice node, and the input includes the microservice node load rate data, the microservice node processing capacity data, the microservice node historical failure rate data, the microservice node concurrent processing capacity data, and the microservice node network congestion data, and the output is the microservice node type identification value; The microservice node path distance equation is used to calculate the shortest distance of the communication path between the microservice nodes, and the input includes the microservice node communication delay stability component, the microservice node bandwidth stability component, the microservice node hop weight data, the microservice node geographical distance data, and the microservice node communication protocol compatibility data, and the output is the shortest communication path value between the microservice nodes; The microservice node efficiency constraint equation is used to define the efficiency threshold of the communication path between the microservice nodes, and the input includes the microservice node communication delay fluctuation component, the microservice node bandwidth fluctuation component, the microservice node service quality level data, the microservice node fault tolerance data, and the microservice node load balancing factor data, and the output is the microservice node communication efficiency constraint value; The microservice node total cost equation is used to calculate the overall resource consumption of the communication path of the microservice node, and the input includes the microservice node type identification value, the shortest communication path value between the microservice nodes, the microservice node communication efficiency constraint value, the microservice node resource utilization data, the microservice node energy consumption coefficient data, and the microservice node maintenance cost data, and the output is the total cost value of the microservice node communication path; The local communication path optimization equation group includes a microservice node power balance equation, a microservice node bandwidth balance equation, and a microservice node load balancing equation; The microservice node power balance equation is used to balance the computing processing power allocation of the microservice node, and the input includes the microservice node processing capacity data, the microservice node concurrent processing capacity data, the microservice node load rate data, the microservice node resource utilization data, and the microservice node energy consumption coefficient data, and the output is the microservice node power allocation matrix; The microservice node bandwidth balance equation is used to balance the bandwidth resource allocation of the microservice node. The input includes the microservice node bandwidth stability component, the microservice node bandwidth fluctuation component, the microservice node data transmission volume data, the microservice node network congestion data, and the microservice node communication protocol compatibility data. The output is the microservice node bandwidth allocation vector. The microservice node load balancing equation is used to balance the task load distribution of the microservice node. The input includes the microservice node power allocation matrix, the microservice node bandwidth allocation vector, the microservice node fault tolerance capability data, the microservice node service quality level data, and the microservice node load balancing factor data. The output is the microservice node load distribution value.

[0026] The specific implementation of the above steps is described in detail below: The specific implementation of step S10 is: using a distributed sensor network to collect basic communication data of microservice nodes in real time, including communication delay data collection at a collection frequency of 100 times per second, bandwidth data collection at 50 times per second, processing capacity data collection at 20 times per second, load rate data collection at 10 times per second, data transmission volume collection at 5 times per second, historical failure rate data collection at 1 time per minute, concurrent processing capacity data collection at 2 times per second, network congestion data collection at 1 time per second, hop weight data collection at 1 time per hour, geographic distance data collection at 1 time per day, Communication protocol compatibility data is collected once an hour, service quality level data is collected once an hour, fault tolerance data is collected once an hour, load balancing factor data is collected once a minute, resource utilization data is collected once a second, energy consumption coefficient data is collected once an hour, and maintenance cost data is collected once a day. The collected data is stored in a distributed database, and a time series database is used to store and manage the data. During the data collection process, data preprocessing technology is used to filter abnormal data. The filtering rules include data range check, data type check, data format check, etc., to ensure the accuracy and reliability of the collected data.

[0027] The specific implementation method of step S20 is: perform stable fluctuation decomposition calculation on the collected microservice node communication delay data, first use the Hilbert-Huang transform algorithm to decompose the communication delay time series, and decompose the original communication delay time series into a superposition form of a stable component and a fluctuating component, wherein the stable component represents the long-term trend of the communication delay, and the fluctuating component represents the short-term fluctuation of the communication delay. In the decomposition process, the empirical mode decomposition technology is used to decompose the time series, and each intrinsic mode function component obtained by the decomposition represents the fluctuation characteristics of different scales. By analyzing each intrinsic mode function component, the stable component and the fluctuating component of the communication delay can be obtained. The threshold of the stable component is set to 80% of the average communication delay, and the threshold of the fluctuating component is set to 20% of the average communication delay.

[0028] The specific implementation method of step S30 is: performing stable-fluctuation decomposition calculation on the collected microservice node bandwidth data, and also using the Hilbert-Huang transform algorithm to decompose the original bandwidth time series into stable components and fluctuating components, wherein the stable component represents the long-term trend of the bandwidth, and the fluctuating component represents the short-term fluctuation of the bandwidth. In the decomposition process, the empirical mode decomposition technology is used to decompose the time series, and each intrinsic mode function component obtained by the decomposition represents the fluctuation characteristics of different scales. By analyzing each intrinsic mode function component, the stable component and the fluctuating component of the bandwidth can be obtained. The threshold of the stable component is set to 85% of the average bandwidth, and the threshold of the fluctuating component is set to 15% of the average bandwidth.

[0029] The specific implementation method of step S40 is: establishing a microservice node similarity calculation function, adopting a similarity calculation method based on a kernel function, mapping the feature vectors of each microservice node into a high-dimensional feature space for similarity calculation, the feature vectors include parameters such as communication delay, bandwidth, processing power and load rate, and using a Gaussian kernel function as the kernel function. The bandwidth parameter of the kernel function is determined by a cross-validation method. In the similarity calculation process, a time-varying weight function is considered, and the parameters of the weight function are determined by a least squares method. The similarity threshold is set to 0.8. When the similarity of two microservice nodes is greater than the threshold, they are considered to be similar nodes.

[0030] The specific implementation method of step S50 is: constructing a two-layer model for optimizing the communication path of microservice nodes, the outer optimization model adopts a hierarchical optimization strategy, decomposing the global communication path optimization problem into multiple sub-problems, each sub-problem corresponds to an optimization goal, including node type determination, path distance calculation, efficiency constraint and total cost calculation, the inner optimization model adopts a local optimization strategy, decomposing the local communication path optimization problem into three sub-problems of power balance, bandwidth balance and load balancing, the two-layer optimization model is solved by an iterative optimization method, the outer optimization model is solved by a genetic algorithm, and the inner optimization model is solved by a particle swarm optimization algorithm.

[0031] The specific implementation method of step S60 is: establishing a main communication path optimization equation group in the outer optimization model, including a microservice node type determination equation, a microservice node path distance equation, a microservice node efficiency constraint equation and a microservice node total cost equation, wherein the microservice node type determination equation adopts a deep neural network model, and the input features include load rate, processing capacity, historical failure rate, concurrent processing capacity and network congestion, and the output is a node type identifier. The weight matrix of the neural network is obtained by back propagation algorithm training, and the microservice node path distance equation adopts the shortest path algorithm, and the input includes a communication delay stability component, a bandwidth stability component, a hop weight, a geographical distance and a communication protocol compatibility, and the output is the shortest communication path value between nodes. The microservice node efficiency constraint equation adopts a nonlinear constraint optimization method, and the input includes a communication delay fluctuation component, a bandwidth fluctuation component, a service quality level, a fault tolerance capability and a load balancing factor, and the output is a communication efficiency constraint value. The microservice node total cost equation adopts a multi-objective optimization method, and the input includes a node type, a shortest path distance, an efficiency constraint value, a resource utilization rate, an energy consumption coefficient and a maintenance cost, and the output is a communication path total cost value.

[0032] The specific implementation method of step S70 is: establishing a local communication path optimization equation group in the inner optimization model, including a microservice node power balance equation, a microservice node bandwidth balance equation and a microservice node load balancing equation, wherein the microservice node power balance equation adopts a matrix differential equation solving method, and the input includes processing capacity, concurrent processing capacity, load rate, resource utilization rate and energy consumption coefficient, and the output is a power allocation matrix; the microservice node bandwidth balance equation adopts a vector differential equation solving method, and the input includes a bandwidth stable component, a bandwidth fluctuation component, data transmission volume, network congestion and communication protocol compatibility, and the output is a bandwidth allocation vector; the microservice node load balancing equation adopts a nonlinear integral differential equation solving method, and the input includes a power allocation matrix, a bandwidth allocation vector, fault tolerance, service quality level and load balancing factor, and the output is a load distribution value, and the upper limit of the iterative optimization times is set to 1000 times.

[0033] The specific implementation method of step S80 is: perform iterative optimization of the outer optimization model, first use a genetic algorithm to solve the outer optimization model, set the population size to 100, the crossover probability to 0.8, the mutation probability to 0.1, and the number of iterations to 500 times, and obtain the initial plan of the global communication path of the microservice node, and then use the initial plan as input to perform iterative optimization of the inner optimization model, and use a particle swarm optimization algorithm to solve the inner optimization model, with the particle swarm size set to 50, the inertia weight set to 0.7, the learning factor set to 2.0, and the number of iterations set to 200 times to generate a local communication path optimization plan. When the load distribution value of a node is better than the existing load distribution value, the local optimization plan is synchronized to other nodes with a similarity greater than a threshold.

[0034] The specific implementation method of step S90 is: repeat step S80 until the upper limit of the iterative optimization times of the microservice node is reached, and finally the optimal microservice node communication topology diagram is obtained, which includes the output results of the outer optimization model and the inner optimization model. The communication topology diagram is generated using a graph layout algorithm. The connection relationship between nodes is determined according to the communication path optimization result, the location of the node is determined according to the geographical distance and communication delay, the size of the node is determined according to the processing capacity and load rate, the color of the node is determined according to the service quality level, the thickness of the connecting line is determined according to the bandwidth allocation, and the color of the connecting line is determined according to the communication efficiency.

[0035] The parameter acquisition and equation design principles of the entire optimization method are explained as follows: the system parameters can be obtained by fitting historical data through the least squares method, the weight matrix can be obtained through deep learning training, the error term range can be determined by Monte Carlo simulation, the kernel function parameters can be determined by cross-validation, and the control parameters can be obtained through optimal control theory calculations. The equation design uses partial differential equations to describe the dynamic characteristics of the system, uses integral terms to characterize the influence of historical information, uses nonlinear terms to express complex interactive relationships, introduces the Laplace operator to deal with spatial correlation, and combines the calculus of variations to solve the optimization problem.

[0036] The equations or calculation processes involved in the present invention are described in detail below.

[0037] 1. Stable fluctuation decomposition calculation equation: The communication delay data is decomposed using Hilbert-Huang Transform (HHT), which is specifically expressed as follows: ; ; ; In the formula, is the communication delay time series; For stable weight; is the i-th intrinsic mode function (IMF) component; is the instantaneous amplitude; is the instantaneous frequency; is the external force function; is the decomposed error term.

[0038] The bandwidth data is broken down in the same way: ; In the formula, is the bandwidth time series; For stable weight; is the bandwidth IMF component; is the decomposed error term.

[0039] 2. Microservice node similarity calculation function: ; ; ; In the formula, is the feature vector of node i; is the time-varying weight function; is the adaptive bandwidth function; To adjust the parameters; is the variance operator; is the similarity error term.

[0040] 3. Microservice node type determination equation: ; ; In the formula, Identify the function for the node type; is the weight matrix; is the input feature vector; is the Laplace operator; is the type determination error term.

[0041] 4. Microservice node path distance equation: ; ; In the formula, is the path curve; is the metric tensor; To optimize the domain; for the border; is the path distance error term.

[0042] 5. Microservice node efficiency constraint equation: ; ; ; In the formula, is the efficiency field function; is the flow field velocity; is the diffusion coefficient; is the source function; is the viscosity coefficient; is the efficiency constraint error term.

[0043] 6. Microservice node total cost equation: ; ; ; In the formula, is the control vector; is the Lagrangian operator; is the regularization parameter; is the Frobenius norm; is the total cost error term.

[0044] 7. Microservice node power balance equation: ; In the formula, is the power allocation matrix; is the system matrix; is the input matrix; is the control matrix; is the constraint matrix; is the power error matrix.

[0045] 8. Microservice node bandwidth balance equation: ; In the formula, is the bandwidth vector field; is the potential function; is the dynamic viscosity coefficient; is the external force term; is the bandwidth error vector.

[0046] 9. Microservice node load balancing equation: ; In the formula, is the load distribution function; is the conductivity coefficient; is the memory kernel function; is the nonlinear coupling function; is the load balancing error term.

[0047] Parameter acquisition method: system parameters It is obtained by fitting historical data using the least squares method; the weight matrix is ​​obtained by training using the deep learning method; the range of the error term is determined by Monte Carlo simulation; the kernel function parameters are determined by cross-validation; and the control parameters are obtained by calculating the optimal control theory.

[0048] The following is a detailed explanation of the derivation process and parameter meaning of each equation: 1. Derivation of the stable fluctuation decomposition calculation equation: First consider the empirical mode decomposition (EMD) of the time series signal, which is obtained by the following steps: Step 1: Identify all local extreme points of the time series; Step 2: Get the upper envelope by cubic spline interpolation and lower envelope ; Step 3: Calculate the average envelope: ; Step 4: Extract detail components: .

[0049] Then introduce the Hilbert transform to get the analytical signal: ;

[0050] In the formula, is the Hilbert transform operator.

[0051] Finally, the expression of the IMF component is obtained: ; in and They are obtained by analyzing the magnitude and phase derivatives of the signal, respectively.

[0052] 2. Derivation of microservice node similarity calculation function: Based on the kernel method theory, the Gaussian kernel function is first constructed: ; Considering the time-varying characteristics, the time weight function is introduced: ; in is the time decay coefficient.

[0053] Incorporate gradient information to enhance local features: ; Finally, we get the complete similarity calculation function: .

[0054] 3. Derivation of the microservice node type determination equation: Based on deep learning theory, we first construct a basic activation function: ; Introducing time dynamics: ; Considering the spatial diffusion effect: ; Combining them gives the final equation: .

[0055] 4. Derivation of the microservice node path distance equation: Based on the shortest path theory, we first define the metric tensor: ; In the formula, For various influencing factors.

[0056] Introducing the variational problem: ; Consider the boundary conditions: ; Finally, we get the complete equation: .

[0057] 5. Derivation of microservice node efficiency constraint equation: Based on the fluid dynamics equation, we first consider the convection term: ; Introducing the diffusion term: ; Construct the source term function: ; Combining them gives the final equation: .

[0058] 6. Derivation of the total cost equation for microservice nodes: Based on the optimal control theory, the Lagrangian is first constructed: ; Consider the space-time evolution: ; Introduce the integral constraint: ; The final equation is: .

[0059] 7. Derivation of the power balance equation of microservice nodes: Based on Lyapunov stability theory, the state space equation is constructed: ; Introduce the quadratic Lyapunov function: ; Consider the algebraic Lyapunov equation: ; Finally, the power balance equation is obtained: .

[0060] 8. Derivation of the microservice node bandwidth balance equation: Based on the Navier-Stokes equations, we first consider the inertia term: ; Introduce sticky terms: ; Consider the pressure gradient: ; Adding external forces and error terms yields the final equation: .

[0061] 9. Derivation of the microservice node load balancing equation: Based on the heat conduction equation, we first consider the diffusion term: ; Introducing memory effect: ; Construct a nonlinear coupling function: ; The final equation is: .

[0062] The optimization effects of each equation are as follows: stable fluctuation decomposition can effectively separate the stable trend and fluctuation components of the signal; similarity calculation takes into account time evolution and spatial correlation; type determination has good classification performance; path distance optimization ensures global optimality; efficiency constraint achieves multi-objective balance; total cost calculation takes into account the overall performance of the system; power balance ensures system stability; bandwidth allocation realizes dynamic adjustment of resources; load balancing takes into account historical impact and spatial distribution.

[0063] A second aspect of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions are run in a computer, they are used to execute the above-mentioned method for optimizing communication paths between industrial production microservices.

[0064] A third aspect of the present invention provides a method for optimizing communication paths between industrial production microservices, comprising the above-mentioned computer-readable storage medium.

[0065] The existing methods for determining the communication path between industrial production microservices mainly adopt a single-layer optimization model, which is usually based on the shortest path algorithm such as Dijkstra and Floyd, combined with load balancing strategy to select the communication path. In practical applications, the existing technology first establishes a connection relationship graph between microservice nodes, takes parameters such as communication delay and bandwidth as the weight of the edge, and then uses the shortest path algorithm to calculate the optimal communication path between nodes. This method has many limitations: the optimization goal is too single, only focusing on a single goal such as minimizing communication delay or maximizing bandwidth utilization, which makes it difficult to achieve multi-objective collaborative optimization; the static path planning method cannot adapt to the dynamic changes of microservice node status and network environment in industrial production environments; the lack of hierarchical optimization mechanism, all optimization goals are considered at the same level, which makes the optimization process easy to fall into local optimality and has high computational complexity; the use of historical data and real-time monitoring data is not sufficient, and the regularity information contained in the data cannot be effectively extracted and utilized; the optimization granularity is often fixed in advance, and lacks the ability to adaptively adjust at different spatial scales.

[0066] The two-layer model for optimizing the communication path of microservice nodes proposed in the present invention realizes the organic combination of global optimization and local optimization through an innovative hierarchical optimization architecture. The outer model is responsible for macroscopic path planning to ensure the optimal overall performance of the system, while the inner model focuses on microscopic resource scheduling to ensure efficient operation of local areas. The two-layer models achieve collaborative optimization through information interaction, which significantly improves the overall optimization effect. At the same time, the present invention introduces stable fluctuation decomposition technology to decompose communication delay and bandwidth data into stable components and fluctuating components, where the stable components are used for long-term planning and the fluctuating components are used for short-term adjustments, greatly improving the accuracy of decision-making. Through similarity calculation and threshold judgment mechanism, the effective transmission and reuse of optimization experience are realized, greatly improving the overall efficiency of the system.

[0067] In terms of dynamic optimization capability, the model of the present invention can dynamically adjust the optimization strategy according to real-time monitoring data, fully consider the dynamic characteristics of the system on multiple time scales, and can quickly respond to changes in network environment and node status. The main communication path optimization equation group comprehensively considers multiple objectives such as node type, path distance, efficiency constraints and total cost, while the local communication path optimization equation group focuses on balancing multiple resource dimensions such as power, bandwidth and load. Through reasonable weight setting, multi-objective compromise optimization is achieved, so that the system can achieve a good balance in various performance indicators.

[0068] The present invention also has significant advantages in terms of robustness and reliability. By introducing error terms and constraints, the robustness of the model is enhanced; the node failure rate and fault tolerance are taken into account to improve the system reliability; the optimization result has good stability to parameter disturbances. In terms of computational efficiency, the hierarchical optimization structure effectively reduces the complexity of the problem, reduces repeated calculations through the similarity transfer mechanism, and adopts an iterative optimization strategy to ensure the convergence of the algorithm. In addition, the model design of the present invention fully considers the actual needs of industrial production, the parameters can be flexibly adjusted according to the specific application scenarios, the framework has good scalability, and it is easy to integrate new optimization objectives and constraints.

[0069] In summary, the present invention not only achieves significant improvements in key indicators such as communication delay, resource utilization, system response speed, load balancing and network congestion through the innovative two-layer optimization model design, but also provides a new technical solution for microservice communication optimization in industrial production environments. This solution overcomes many limitations of the existing technology, demonstrates strong optimization capabilities and adaptability in practical applications, and provides important technical support for the development of the industrial Internet.

[0070] The reason why the solution of the present invention can solve the problems existing in the prior art is mainly due to the following key technical principles: 1. Real-time monitoring and stable fluctuation decomposition. The communication data between microservice nodes, including latency, bandwidth, processing power, etc., are collected in real time to build a complete basic data set. Then the HHT algorithm is used to perform stable fluctuation decomposition on these time series data to obtain stable components and fluctuation components. This can not only reflect the dynamic changes in node communication characteristics, but also provide more accurate input features for subsequent similarity calculation and optimization modeling.

[0071] 2. Similarity calculation and local optimization propagation. A microservice node similarity calculation function is established, which comprehensively considers the characteristics of the node such as communication delay, bandwidth, processing power and load rate, and quantitatively describes the correlation between nodes. When the local optimization result of a node is better than the existing solution, it will be synchronized to other nodes with higher similarity. This optimization result propagation mechanism based on similarity can promote the penetration of local optimization into global optimization and improve the overall optimization effect.

[0072] 3. Two-layer optimization model coordination mechanism. A two-layer model for optimizing the communication path of microservice nodes is constructed. The outer model is responsible for global optimization, including key factors such as node type determination, shortest path distance calculation, communication efficiency constraints, and overall resource consumption; the inner model is responsible for local optimization, including resource allocation issues such as power balance, bandwidth balance, and load balancing. This hierarchical optimization framework can coordinate the communication paths of microservice nodes at both the global and local levels to ensure the optimization of overall communication performance and resource utilization efficiency.

[0073] 4. Explainable mathematical modeling methods. Using mathematical modeling methods such as partial differential equations and calculus of variations, the dynamic characteristics of the system, the influence of historical information, and complex interactive relationships are described. This modeling method can not only solve the optimization results, but also provide insights into the internal optimization mechanism, thereby improving the interpretability of the solution. Compared with black-box machine learning models, this explainable mathematical modeling method is more conducive to analysis and adjustment in engineering applications.

[0074] In order to better understand and implement the present invention, a specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows: The specific implementation of step S10 is: First, it is necessary to collect the basic communication data between microservice nodes in real time. This includes the communication delay data of the microservice nodes. , Microservice node bandwidth data , Microservice node processing capacity data , Microservice node load rate data , Microservice node data transmission volume data , Microservice node historical failure rate data , Microservice node concurrent processing capacity data , Microservice node network congestion data , Microservice node hop weight data , Microservice node geographic distance data , Microservice node communication protocol compatibility data , Microservice node service quality level data , Microservice node fault tolerance data , Microservice node load balancing factor data , Microservice node resource utilization data , Microservice node energy consumption coefficient data And microservice node maintenance cost data These communication data can be collected in real time by using sensor technology, system monitoring, log analysis and other means. By collecting and analyzing these basic data, a basic data set of microservice nodes can be established. This data set contains the key characteristic parameters of communication between microservice nodes, providing basic data support for subsequent stable fluctuation decomposition, similarity calculation and optimization modeling.

[0075] The specific implementation method of step S20 is: collect the microservice node communication delay data Perform stable fluctuation decomposition calculation. The Hilbert-Huang Transform (HHT) algorithm can be used to decompose the communication delay time series. The HHT algorithm can decompose the original communication delay time series. Decomposition into stable components and the fluctuation component The superposition form is: ; in, , is the instantaneous amplitude, is the instantaneous frequency, is the external force function, is the decomposed error term. In this way, the stable component of communication delay can be obtained and the fluctuation component .

[0076] The specific implementation method of step S30 is: collect the microservice node bandwidth data The stable fluctuation decomposition calculation is also performed. The HHT algorithm is also used to convert the original bandwidth time series Decomposition into stable components and the fluctuation component In the form of: ; in, represents the IMF component of bandwidth, is the decomposed error term. This gives the stable component of the bandwidth and the fluctuation component .

[0077] Through the above two steps, the communication delay and bandwidth data of the microservice nodes are decomposed into stable and fluctuating components, and the stable and fluctuating components of these key characteristic parameters are obtained. This lays the foundation for subsequent similarity calculation and optimization modeling.

[0078] The specific implementation of step S40 is: first, it is necessary to establish a microservice node similarity calculation function and similarity threshold The microservice node similarity calculation function can be in the following form: ; in, Is a node At the moment The feature vector of includes parameters such as communication delay, bandwidth, processing power and load rate; is a time-varying weight function; is the adaptive bandwidth function, given by and Two adjustment parameters are determined; is the weight coefficient; is the similarity calculation error term.

[0079] Then, you can set a similarity threshold , when the similarity of two microservice nodes When the value is greater than the threshold, they are considered similar nodes. This threshold can be adjusted according to the actual application scenario, usually about.

[0080] By establishing a similarity calculation function and setting a similarity threshold, the similarity between microservice nodes can be quantitatively described, providing a basis for subsequent optimization decisions.

[0081] The specific implementation of step S50 is: constructing a two-layer microservice node communication path optimization model, wherein the outer optimization model is responsible for global communication path optimization, and the inner optimization model is responsible for local communication path optimization.

[0082] The outer optimization model consists of the following equations: 1) Microservice node type determination equation: ; in, is the node type identification function, is the input feature vector, and is the weight matrix, is the Laplace operator, is the type determination error term. Through this equation, it can be determined whether the node is a primary transmission node or a secondary transmission node.

[0083] 2) Microservice node path distance equation: ; ; in, is the path curve, is the optimization domain, It's the border. is the regularization parameter, is the path distance error term. Through this equation, the shortest communication path distance between nodes can be calculated.

[0084] 3) Microservice node efficiency constraint equation: ; ; ; in, is the efficiency field function, is the flow velocity, is the diffusion coefficient, is the source function, is the viscosity coefficient, is the efficiency constraint error term. Through this equation, the efficiency of the communication path can be constrained.

[0085] 4) Microservice node total cost equation: ; ; ; in, is the control vector, is the Lagrangian operator, is the regularization parameter, is the Frobenius norm, is the total cost error term. Through this equation, the overall resource consumption of the communication path can be calculated.

[0086] The inner optimization model consists of the following equations: 1) Microservice node power balance equation: ; in, is the power allocation matrix, is the system matrix, is the input matrix, is the control matrix, is the constraint matrix, is the power error matrix. Through this equation, the computing processing power allocation of the nodes can be balanced.

[0087] 2) Microservice node bandwidth balance equation: ; in, is the bandwidth vector field, is the potential function, is the dynamic viscosity coefficient, is the external force term, is the bandwidth error vector. Through this equation, the bandwidth resource allocation of nodes can be balanced.

[0088] 3) Microservice node load balancing equation: ; in, is the load distribution function, is the conductance coefficient, is the memory kernel function, is the nonlinear coupling function, is the load balancing error term. Through this equation, the task load distribution of the nodes can be balanced.

[0089] By building this two-layer optimization model, the communication paths of microservice nodes can be coordinated and optimized at both the global and local levels, taking into account both the overall communication efficiency and the resource balance between nodes. This approach can improve the communication performance and resource utilization efficiency of industrial production systems.

[0090] The specific implementation of step S60 is: in the outer optimization model, first establish a microservice node type determination equation. This equation can be in the following form: ; in, is the node type identification function, is the input feature vector, and is the weight matrix, is the Laplace operator, is the type determination error term. By training the deep learning model, we can determine and In this way, it can be determined whether the node is a primary transmission node or a secondary transmission node.

[0091] Secondly, establish the microservice node path distance equation. This equation can be in the following form: ; ; in, is the path curve, is the optimization domain, It's the border. is the regularization parameter, is the path distance error term. By solving the optimization problem by variational method, we can get the shortest communication path distance between nodes: .

[0092] Next, establish the microservice node efficiency constraint equation. This equation can be in the following form: ; ; ; in, is the efficiency field function, is the flow velocity, is the diffusion coefficient, is the source function, is the viscosity coefficient, is the efficiency constraint error term. By solving this set of partial differential equations, the efficiency constraint value of the communication path can be obtained: .

[0093] Finally, establish the total cost equation of the microservice node. This equation can be in the following form: ; ; ; in, is the control vector, is the Lagrangian operator, is the regularization parameter, is the Frobenius norm, is the total cost error term. By solving this partial differential equation, the overall resource consumption of the communication path can be obtained .

[0094] Through the outer optimization model composed of the above four equations, the optimal communication path in the global scope can be obtained. These equations involve key factors such as node type determination, path distance calculation, communication efficiency constraints and overall resource consumption, which can provide a basis for subsequent local optimization.

[0095] The specific implementation of step S70 is: in the inner optimization model, first establish a microservice node power balance equation. This equation can be in the following form: ; in, is the power allocation matrix, is the system matrix, is the input matrix, is the control matrix, is the constraint matrix, is the power error matrix. By solving the matrix differential equation, the power allocation scheme of the node can be obtained .

[0096] Secondly, establish the microservice node bandwidth balance equation. This equation can be in the following form: ; in, is the bandwidth vector field, is the potential function, is the dynamic viscosity coefficient, is the external force term, is the bandwidth error vector. By solving this vector differential equation, we can get the bandwidth allocation scheme of the node: .

[0097] Next, establish the microservice node load balancing equation. This equation can be in the following form: ; in, is the load distribution function, is the conductance coefficient, is the memory kernel function, is the nonlinear coupling function, is the load balancing error term. By solving this nonlinear integral differential equation, the load distribution scheme of the node can be obtained .

[0098] The above three equations constitute the inner optimization model. You can also set an upper limit on the number of iterative optimization times for a microservice node. , when the upper limit is reached, the inner layer optimization is terminated.

[0099] Through the inner optimization model, the power, bandwidth and load of nodes can be balanced in the local range to ensure full utilization of resources. These local optimization results will provide important input for subsequent global optimization.

[0100] The specific implementation of step S80 is as follows: first, perform iterative optimization of the outer optimization model to obtain the initial solution of the global communication path of the microservice node. Then, use the initial solution as input to perform iterative optimization of the inner optimization model to generate a local communication path optimization solution. When it is better than the existing load distribution value, the local optimization solution is synchronized to the similarity Greater than the similarity threshold other nodes.

[0101] The purpose of this is to allow local optimization results to be shared and propagated between similar nodes, further optimizing the global communication effect. Repeat this process until the upper limit of the number of iterative optimizations of the microservice node is reached. .

[0102] The specific implementation of step S90 is: after multiple rounds of iterative optimization of the outer layer and the inner layer, the optimal microservice node communication topology diagram is finally obtained. This topology diagram contains all the output results of the outer layer optimization model and the inner layer optimization model, including: node type determination result ;The shortest communication path between nodes ;Communication path efficiency constraint value Overall resource consumption of communication path ;Node power allocation matrix ;Node bandwidth allocation vector ;Node load distribution value ; These output results reflect the optimization of the entire system at both the global and local levels, and can provide a decision-making basis for communication management of industrial production systems.

[0103] The parameter acquisition and equation design principles of the entire optimization method are as follows: 1) System parameters , , , etc. can be obtained by fitting historical data using the least squares method; 2) Weight Matrix , Can be obtained through deep learning training; 3) Error term range , , , , etc. can be determined by Monte Carlo simulation; 4) Kernel function parameters can be determined by cross-validation; 5) The control parameters can be obtained through optimal control theory calculation.

[0104] The following is an example 2 of a specific application scenario of the present invention: an intelligent pharmaceutical company is building a production management system based on a microservice architecture. The system divides the entire pharmaceutical production process into multiple independent microservice nodes, including raw material procurement management, formula control, finished product packaging monitoring, etc. These microservice nodes dynamically communicate and collaborate through a high-speed network to achieve automation and optimization of the production process.

[0105] In order to improve the communication performance and resource utilization efficiency of the microservice system, it is decided to adopt the industrial production microservice communication path optimization method proposed in this invention. The following is the specific implementation of this method in the production system.

[0106] First, a real-time monitoring system is deployed to collect basic communication data between microservice nodes. According to the requirements of this invention, the monitoring content includes: 1. Communication delay data : By deploying delay detectors on the links between nodes, the communication delay time series between microservice nodes is collected in real time. After statistical analysis, the communication delay data of the pharmaceutical system is fluctuates within the range of

[0107] 2. Bandwidth data :Bandwidth monitoring probes were deployed on the backbone network equipment to collect real-time available bandwidth data between microservice nodes. The statistical results show that the bandwidth between nodes is varies within the range of.

[0108] 3. Processing capacity data : Through the node's own performance monitoring module, the CPU utilization, memory usage and other indicators of each microservice node are collected and converted into the node's processing capacity parameters. between.

[0109] 4. Load rate data : Similarly, through the node's own monitoring module, the CPU load, memory usage and other indicators of each microservice node are collected in real time, and the actual load rate of the node is calculated. Changes between.

[0110] 5. Other parameters: In addition, data such as data transmission volume, historical failure rate, concurrent processing capacity, network congestion, hop weight, geographical distance, communication protocol compatibility, service quality level, fault tolerance, load balancing factor, resource utilization, energy consumption coefficient and maintenance cost of microservice nodes are also collected.

[0111] Through the above methods, a complete basic data set of microservice nodes was established, laying the foundation for subsequent stable fluctuation decomposition, similarity calculation and optimization modeling.

[0112] Figure 2 The time series data of basic monitoring data are shown, including two sub-graphs: the upper graph shows the fluctuation of communication delay D(t) over time, with a delay range of 5-50ms; the lower graph shows the change of bandwidth B(t) over time, with a bandwidth range of 100-500Mbps. The time series data of these two key indicators intuitively show the dynamic characteristics of the system communication performance.

[0113] Secondly, the Hilbert-Huang Transform (HHT) algorithm is used to collect the communication delay data. and bandwidth data A stable fluctuation decomposition was performed.

[0114] For communication delay data The specific process of decomposition is as follows: ; ; ; in, is the stable component of communication delay, For the Intrinsic Mode Function (IMF) components, is the instantaneous amplitude of the IMF component, is the instantaneous frequency of the IMF component, is the external force function, is the decomposition error term. After HHT decomposition, the stable component of communication delay is obtained and the fluctuation component .

[0115] Similarly, for bandwidth data The decomposition of is also done using a similar HHT method, and the stable component of the bandwidth is obtained and the fluctuation component .

[0116] Figure 3 The results of HHT decomposition of communication delay data are shown, including three IMF components and a trend term. From top to bottom, they are: high-frequency IMF component, medium-frequency IMF component, low-frequency IMF component and overall trend term. This decomposition helps to understand the multi-scale dynamic characteristics of communication delay.

[0117] Through the above stable fluctuation decomposition process, the dynamic change law of the communication characteristics of microservice nodes is mastered, laying the foundation for subsequent similarity calculation and optimization modeling.

[0118] Next, we established a microservice node similarity calculation function , the specific form is as follows: ; ; ; in, Is a node At the moment The feature vector of includes parameters such as communication delay, bandwidth, processing power and load rate; is a time-varying weight function; is the adaptive bandwidth function, given by and Two adjustment parameters determine; is the weight coefficient; is the error term in similarity calculation.

[0119] According to the actual application requirements, the similarity threshold is set When the similarity between two microservice nodes When the value is greater than the threshold, they are considered to be similar nodes.

[0120] Figure 4 This is a 10×10 node similarity heat map showing the similarity index between different nodes. The darker the color, the higher the similarity. The self-similarity on the diagonal is 1, and it can be seen that the similarity between adjacent nodes is generally high.

[0121] With the basic data set and similarity calculation function of microservice nodes, we then built a two-layer model for microservice node communication path optimization.

[0122] The outer optimization model includes the following equations: 1. Microservice node type determination equation: ; ; This equation can determine the node Is it a primary transmission node or a secondary transmission node? Input includes load rate , Processing Capacity , Historical failure rate , concurrent processing capabilities and network congestion Parameters such as node type, output is node type identification Through deep learning methods, the weight matrix is ​​determined and The value of .

[0123] 2. Microservice node path distance equation: ; ; This equation can calculate the node and nodes The shortest communication path distance between , the input includes the communication delay stabilization component , bandwidth stable component , hop weight , Geographical distance and communication protocol compatibility The optimization problem is solved by the variational method, and the shortest path distance between nodes is obtained.

[0124] 3. Microservice node efficiency constraint equation: ; ; ; The equation can constrain the efficiency of the communication path. The input includes the communication delay fluctuation component, bandwidth fluctuation component, and service quality level. , Fault Tolerance and load balancing factor By solving the partial differential equation, the efficiency constraint value of the communication path between nodes is obtained. .

[0125] 4. Microservice node total cost equation: ; ; ;

[0126] This equation can calculate the overall resource consumption of the communication path , the input includes node type , shortest path distance , efficiency constraint value , Resource Utilization , Energy consumption coefficient and maintenance costs By solving the partial differential equation, the overall resource consumption of the communication path is obtained.

[0127] The inner optimization model includes the following equations: 1. Microservice node power balance equation: ; , , , , ; This equation can balance the computing processing power distribution of the nodes , input includes processing power , concurrent processing capabilities , Load rate , Resource Utilization and energy consumption coefficient By solving the matrix differential equation, the power allocation scheme of each node is obtained.

[0128] 2. Microservice node bandwidth balance equation: ; , ; This equation can balance the bandwidth resource allocation of nodes , the input includes a bandwidth-stable component , bandwidth fluctuation component , Data transfer volume , network congestion and communication protocol compatibility By solving the vector differential equation, the bandwidth allocation scheme of each node is obtained.

[0129] 3. Microservice node load balancing equation: ; This equation can balance the task load distribution of nodes , the input includes power distribution , Bandwidth Allocation , Fault Tolerance , Service Quality Level and load balancing factor By solving the nonlinear integral differential equation, the load distribution scheme of each node is obtained.

[0130] With the outer and inner optimization models in place, multiple rounds of iterative optimization were performed next.

[0131] First, the outer optimization model is iterated to obtain the initial solution of the global communication path of the microservice nodes. For example, according to the type determination equation, 20% of the nodes in the pharmaceutical system are identified as first-level transmission nodes, and 80% of the nodes are identified as second-level transmission nodes. According to the path distance equation, the shortest communication path distance between two first-level transmission nodes is , the shortest path distance from a certain level node to a second level node According to the efficiency constraint equation, the efficiency constraint value of the communication path between nodes is Between 0.8 and 0.9. According to the total cost equation, the total resource consumption of the entire communication path Approximately 1000 units.

[0132] Then, the initial global communication path scheme is used as input to perform iterations of the inner optimization model. For example, according to the power balance equation, the power allocation of a node ; According to the bandwidth balance equation, the bandwidth allocation of a node ; According to the load balancing equation, the load distribution of a node .

[0133] When the load distribution value of a node When it is better than the existing load distribution value, the local optimization solution is synchronized to the similarity Other nodes greater than 0.8.

[0134] Repeat the above process until the set upper limit of iterative optimization times is reached. Finally, the optimized microservice node communication topology diagram was obtained, which included all the output results of the outer and inner models.

[0135] For example, after optimization, the first-level transmission nodes in the pharmaceutical system account for 30% and the second-level transmission nodes account for 70%. The shortest communication path distance between two first-level transmission nodes is shortened to , the shortest path distance from a certain level node to a second level node is reduced to . The efficiency constraint value of the communication path between nodes Improved to between 0.9-0.95. Overall resource consumption of the entire communication path The power allocation of a node is adjusted to , bandwidth allocation is adjusted to , the load distribution is reduced to .

[0136] Through the above optimization process, the microservice system has achieved a significant improvement in communication performance and resource utilization efficiency. Compared with the previous solution, the end-to-end communication delay of the system has been reduced by 30%, the system throughput has been increased by 40%, and the node resource utilization has been increased by 25%. This has created a good network foundation for the intelligent and automated pharmaceutical production.

[0137] Figure 5 The optimized microservice communication topology is shown, where green nodes represent primary transmission nodes (accounting for 30%) and yellow nodes represent secondary transmission nodes (accounting for 70%). The lines between nodes represent the communication path, and the thickness of the lines represents the bandwidth.

[0138] It should be noted that the variables involved in the present invention are explained in detail as shown in Table 1 below.

[0139] Table 1 Variable explanation table

[0140] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for optimizing communication paths between industrial production microservices, characterized in that: The following steps are involved: Collect basic communication data between microservice nodes in real time and generate a basic data set of microservice nodes containing multi-dimensional indicators; Performing stable-fluctuation decomposition calculation on the communication delay data and bandwidth data of the microservice node to obtain corresponding stable components and fluctuating components; Establish a microservice node similarity calculation function and a microservice node similarity threshold, and calculate the node similarity value based on the microservice node basic data set; construct a microservice node communication path optimization two-layer model including an outer optimization model and an inner optimization model; establish a main communication path optimization equation group and a local communication path optimization equation group; perform iterative optimization of the two-layer model and synchronize the optimization scheme when the optimization conditions are met; repeat the optimization until the upper limit of the iterative optimization times of the microservice node is reached, and obtain the final microservice node communication topology diagram including the output results of the main communication path optimization equation group and the local communication path optimization equation group.

2. The method for optimizing communication paths between industrial production microservices according to claim 1, characterized in that: The microservice node basic data set includes microservice node communication delay data, microservice node bandwidth data, microservice node processing capacity data, microservice node load rate data, microservice node data transmission volume data, microservice node historical failure rate data, microservice node concurrent processing capacity data, microservice node network congestion data, microservice node hop weight data, microservice node geographical distance data, microservice node communication protocol compatibility data, microservice node service quality level data, microservice node fault tolerance data, microservice node load balancing factor data, microservice node resource utilization data, microservice node energy consumption coefficient data, and microservice node maintenance cost data.

3. The method for optimizing communication paths between industrial production microservices according to claim 1, characterized in that: Performing stable-fluctuation decomposition calculation on the microservice node communication delay data to obtain a stable component of the microservice node communication delay and a fluctuating component of the microservice node communication delay; The microservice node bandwidth data is subjected to stable and fluctuating decomposition calculation to obtain a microservice node bandwidth stable component and a microservice node bandwidth fluctuating component.

4. The method for optimizing communication paths between industrial production microservices according to claim 1, characterized in that: The outer layer optimization model of the microservice node communication path is used for global communication path optimization, and the inner layer optimization model of the microservice node communication path is used for local communication path optimization.

5. The method for optimizing communication paths between industrial production microservices according to claim 1, characterized in that: The main communication path optimization equation group includes a microservice node type determination equation, a microservice node path distance equation, a microservice node efficiency constraint equation, and a microservice node total cost equation.

6. The method for optimizing communication paths between industrial production microservices according to claim 5, characterized in that: The microservice node type determination equation is used to determine whether the microservice node belongs to a first-level transmission microservice node or a second-level transmission microservice node; The microservice node path distance equation is used to calculate the shortest distance of the communication path between the microservice nodes; The microservice node efficiency constraint equation is used to define the efficiency threshold of the communication path between the microservice nodes; The microservice node total cost equation is used to calculate the overall resource consumption of the communication path of the microservice node.

7. The method for optimizing communication paths between industrial production microservices according to claim 1, characterized in that: The local communication path optimization equation group includes a microservice node power balance equation, a microservice node bandwidth balance equation, and a microservice node load balancing equation.

8. The method for optimizing communication paths between industrial production microservices according to claim 7, characterized in that: The microservice node power balance equation is used to balance the computing and processing power distribution of the microservice node; the microservice node bandwidth balance equation is used to balance the bandwidth resource distribution of the microservice node; and the microservice node load balancing equation is used to balance the task load distribution of the microservice node.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed in a computer, the method for optimizing communication paths between industrial production microservices according to any one of claims 1 to 8 is used to execute.

10. It is characterized in that it comprises the computer-readable storage medium described in claim 9.

Citation Information

Patent Citations

  • Micro-service scheduling method and device

    CN117032919A

  • Edge computing power network micro-service caching method based on key node selection

    CN117651262A

  • Adaptive load balancing method and system based on multiple models

    CN118656211A

  • Enterprise production data micro-service granularity optimization method, medium and system

    CN119356687A

  • Private domain traffic peak identification and route scheduling method and system based on time sequence prediction

    CN119449630A