An industrial production internet of things service micro-service extraction method, medium and system
By collecting and analyzing industrial production data, a set of node contribution optimization equations is constructed. Spectral clustering algorithm is used to identify business microservices, solving the problem of inaccurate microservice partitioning in existing technologies. This achieves high-cohesion, low-coupling microservice extraction, improving system operating efficiency and scalability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING NANCAL RUIYUAN DIGITAL TECH CO LTD
- Filing Date
- 2025-03-14
- Publication Date
- 2026-06-12
Smart Images

Figure CN120234498B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electronic digital data processing technology, and more specifically, relates to a method, medium, and system for extracting business microservices in industrial production Internet of Things (IoT). Background Technology
[0002] Currently, with the rapid development of Industrial Internet of Things (IIoT) technology, industrial production processes are becoming increasingly automated and intelligent. Various production equipment, process control systems, and production management systems are all connected to IoT platforms, generating a wealth of production data, including operational data, process parameters, quality indicators, and scheduling instructions. How to fully utilize this production data to improve factory operational efficiency and product quality has become a critical issue that urgently needs to be addressed.
[0003] To address this need, the industry has proposed industrial application solutions based on microservice architecture. Microservice architecture breaks down complex industrial application systems into highly cohesive, loosely coupled independent service units, fully leveraging the advantages of modularity, flexibility, and scalability. However, automatically identifying and extracting suitable business microservices from massive amounts of industrial production data remains a significant challenge.
[0004] Existing microservice extraction methods primarily rely on code analysis or domain model analysis, requiring significant manual intervention and domain knowledge accumulation. While suitable for microservice transformation of software systems, these methods are difficult to apply directly to complex domains like industrial production, where data relationships are intricate and complex. Furthermore, some data flow analysis-based microservice extraction methods, although capable of uncovering microservice boundaries from data relationships, lack a comprehensive consideration of data importance and influence, making it difficult to guarantee the cohesion and independence of microservices. In other words, current technologies for extracting business microservices suffer from inaccurate segmentation due to the difficulty in fully exploring the relationships and influences between data.
[0005] Therefore, there is an urgent need for an automated microservice extraction method based on industrial production data, which can fully explore the relationships and influences between data, identify highly cohesive and loosely coupled business microservices, and provide strong support for the microservice transformation of industrial IoT applications. Summary of the Invention
[0006] In view of this, the present invention provides a method, medium and system for extracting business microservices in industrial production Internet of Things, which can solve the problem in the prior art of inaccurate division due to the difficulty in fully mining the relationships and influences between data when extracting business microservices.
[0007] The present invention is implemented as follows: The first aspect of the present invention provides a method for extracting industrial production IoT business microservices, comprising: collecting industrial production business data; establishing an industrial production business relationship graph; calculating node participation values and inter-node influence values; constructing and solving a set of node contribution optimization equations to obtain a node contribution matrix, wherein the set of node contribution optimization equations includes an objective equation for maximizing the sum of node contributions, constraint equations for limiting the range of values, a balance equation for balancing the contribution distribution, and a convergence equation for determining optimization convergence; using the node contribution matrix to obtain initial business microservices using a spectral clustering algorithm; calculating the microservice cohesion contribution and microservice coupling contribution to obtain a microservice independence score; optimizing the initial business microservices based on the microservice independence score; and determining the data synchronization mechanism of the optimized business microservices.
[0008] The industrial production business data includes production equipment operation data, production process parameter data, production quality inspection data, production scheduling instruction data, and production environment monitoring data.
[0009] In the industrial production business relationship diagram, the nodes represent the industrial production business data, the node participation value is obtained based on the number of times the node is called by other nodes, and the node influence value is obtained based on the number of times the node calls other nodes.
[0010] The node contribution optimization equation set includes the node contribution objective equation, the node contribution constraint equation, the node contribution balance equation, and the node contribution convergence equation.
[0011] The node contribution objective equation is used to maximize the total node contribution. The inputs to the node contribution objective equation include the node participation value and the inter-node influence value. The output of the node contribution objective equation is the node contribution matrix. The node contribution constraint equation is used to limit the value range of the node contribution matrix. The inputs to the node contribution constraint equation include a preset maximum influence threshold and a preset minimum influence threshold. The output of the node contribution constraint equation is the node contribution constraint interval.
[0012] The node contribution balance equation is used to balance the distribution of the node contribution matrix. The input of the node contribution balance equation includes the node participation value and the inter-node influence value. The output of the node contribution balance equation is the node contribution balance coefficient. The node contribution convergence equation is used to determine the optimization convergence state of the node contribution matrix. The input of the node contribution convergence equation includes the iterative difference of the node contribution matrix and a preset convergence threshold. The output of the node contribution convergence equation is the optimization convergence state.
[0013] Wherein, the microservice cohesion contribution is the sum of the node contributions within the initial business microservice, and the microservice coupling contribution is the sum of the node contributions between the initial business microservice and other initial business microservices.
[0014] The data synchronization mechanism includes data synchronization priority, data synchronization timing, and data consistency rules.
[0015] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for extracting microservices for Internet of Things (IoT) business in industrial production.
[0016] A third aspect of the present invention provides an industrial production Internet of Things (IoT) business microservice extraction system, comprising the aforementioned computer-readable storage medium. The system is any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0017] Compared with existing technologies, this invention provides a method, medium, and system for extracting business microservices from industrial production IoT data. This invention proposes a method for extracting business microservices from industrial production IoT data, which can automatically identify and extract highly cohesive and loosely coupled business microservices. Compared with existing technologies, this method has the following advantages:
[0018] 1. Comprehensive Data Interaction and Impact Analysis. This invention's method not only considers direct call relationships between nodes but also analyzes indirect influence relationships. By constructing indicators for node participation and inter-node influence, it comprehensively depicts the mutual impact between data. This lays the foundation for accurate identification of business microservices.
[0019] 2. Microservice extraction using mathematical optimization. This invention proposes a multi-constraint node contribution optimization model. Utilizing indicators such as node participation and inter-node influence, it determines the contribution weight of each node through mathematical optimization. This method objectively quantifies the importance of nodes, avoiding the influence of subjective experience on microservice partitioning.
[0020] 3. Identification of tightly connected subgraphs based on spectral clustering algorithm. This invention utilizes optimized node contribution information and employs a spectral clustering algorithm to identify tightly connected subgraphs in the business relationship graph. These subgraphs represent the initial business microservices. This method can automatically discover microservice boundaries without relying on human experience.
[0021] 4. Further improve microservice quality through cohesion and coupling optimization. The method of this invention not only identifies the initial microservices but also further evaluates the cohesion and coupling contributions of each microservice, and optimizes and reorganizes the microservices based on their independence scores. This ensures that the final microservices have strong cohesion and independence.
[0022] 5. Determine the data synchronization mechanism between microservices. The method of this invention ultimately determines the priority, timing, and consistency rules for data synchronization among the optimized microservices based on node contribution information. This ensures timely synchronization and consistency of critical data among microservices, improving the reliability of the microservice architecture.
[0023] In summary, the industrial production IoT business microservice extraction method proposed in this invention fully utilizes the inherent relationships and influences of industrial production data. Through mathematical optimization, spectral clustering, cohesion and coupling evaluation, it automatically extracts highly cohesive and lowly coupled business microservices from massive amounts of data and determines the data synchronization mechanism between microservices. This solves the problem in existing technologies where the extraction of business microservices is inaccurate due to the difficulty in fully exploring the relationships and influences between data. Attached Figure Description
[0024] Figure 1 This is a flowchart of the method of the present invention.
[0025] Figure 2 This is a diagram of the industrial production data acquisition architecture in Example 2.
[0026] Figure 3 This is a diagram showing the business node call relationship in Example 2.
[0027] Figure 4 This is a participation analysis diagram of each node in Example 2.
[0028] Figure 5 This is a distribution diagram of the eigenvalues of the node contribution matrix in Example 2.
[0029] Figure 6 The diagram shows a comparison of the microservices before and after optimization in Example 2, including (A) the performance diagram before optimization and (B) the performance diagram after optimization. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0031] like Figure 1 The diagram shown is a flowchart of a method for extracting business microservices for industrial production IoT provided by the first aspect of the present invention. This method includes the following steps:
[0032] S01. Collect industrial production business data, which includes production equipment operation data, production process parameter data, production quality inspection data, production scheduling instruction data, and production environment monitoring data.
[0033] S02. Establish an industrial production business relationship diagram, wherein the nodes in the industrial production business relationship diagram represent the industrial production business data;
[0034] S03. Calculate the data call frequency in the industrial production business relationship diagram to obtain the node participation value and the inter-node influence value. The node participation value is obtained based on the number of times the node is called by other nodes, and the inter-node influence value is obtained based on the number of times the node calls other nodes.
[0035] S04. Construct a set of node contribution optimization equations, which includes node contribution objective equations, node contribution constraint equations, node contribution balance equations, and node contribution convergence equations.
[0036] S05. Solve the set of node contribution optimization equations to obtain the node contribution matrix;
[0037] S06. Using the node contribution matrix, a spectral clustering algorithm is used to identify the tightly connected subgraphs in the industrial production business relationship graph to obtain the initial business microservices.
[0038] S07. Calculate the microservice cohesion contribution and microservice coupling contribution of the initial business microservice. The microservice cohesion contribution is the sum of the node contributions within the initial business microservice, and the microservice coupling contribution is the sum of the node contributions between the initial business microservice and other initial business microservices.
[0039] S08. Calculate the microservice independence score by dividing the microservice cohesion contribution by the microservice coupling contribution.
[0040] S09. Nodes in the initial business microservices whose microservice independence scores are lower than the preset independence threshold are reassigned to other initial business microservices whose microservice independence scores are higher than the preset independence threshold, to obtain optimized business microservices.
[0041] S10. Determine the data synchronization mechanism of the optimized business microservice based on the node contribution matrix. The data synchronization mechanism includes data synchronization priority, data synchronization timing, and data consistency rules.
[0042] The set of equations for optimizing node contribution includes:
[0043] The node contribution objective equation is used to maximize the total node contribution. The input of the node contribution objective equation includes the node participation value and the inter-node influence value. The output of the node contribution objective equation is the node contribution matrix.
[0044] The node contribution constraint equation is used to limit the value range of the node contribution matrix. The input of the node contribution constraint equation includes a preset maximum influence threshold and a preset minimum influence threshold. The output of the node contribution constraint equation is the node contribution constraint interval.
[0045] The node contribution balance equation is used to balance the distribution of the node contribution matrix. The input of the node contribution balance equation includes the node participation value and the inter-node influence value. The output of the node contribution balance equation is the node contribution balance coefficient.
[0046] The node contribution convergence equation is used to determine the optimal convergence state of the node contribution matrix. The input of the node contribution convergence equation includes the iterative difference of the node contribution matrix and a preset convergence threshold. The output of the node contribution convergence equation is the optimal convergence state.
[0047] The specific implementation methods of the above steps are described in detail below.
[0048] Step S01: Collect industrial production business data. The purpose of this step is to collect various types of data related to the industrial production process. Specifically, this includes:
[0049] 1) Production equipment operation data: This refers to the operating parameters of various industrial equipment, such as speed, temperature, and pressure. These data reflect the operating status of the equipment.
[0050] 2) Production process parameter data: This refers to the process parameters of each production step, such as ingredient ratios, reaction time, and calcination temperature. These parameters determine the specific execution method of the production process.
[0051] 3) Production quality inspection data: This refers to the data obtained from testing various indicators of the manufactured products, such as dimensions, weight, and strength. These data reflect the quality status of the products.
[0052] 4) Production scheduling instruction data: This refers to various scheduling instructions issued by production management personnel, such as production task allocation and production schedule adjustments. This data describes the control and coordination of the production process.
[0053] 5) Production environment monitoring data: This includes environmental parameters such as workshop temperature and humidity, lighting, and noise. These data reflect the environmental conditions of the production site.
[0054] In summary, the industrial production data collected in this step lays the foundation for subsequent data analysis and microservice extraction.
[0055] Step S02: Establish an industrial production business relationship diagram. The purpose of this step is to construct a graphical model that reflects the relationships between various types of production business data. The specific steps are as follows:
[0056] 1) Treat each type of production data as a node, and the connections between nodes represent the calling or influence relationships between data.
[0057] 2) Based on the data collection, establish an adjacency matrix between nodes. ,in Represents a node Directly call the node The data.
[0058] 3) By analyzing the calling relationships between nodes, a data calling frequency matrix can be obtained. ,in Represents a node Call Node The number of times.
[0059] In summary, by establishing an industrial production business relationship diagram, the originally scattered data is transformed into an organic network structure, providing an intuitive data model for subsequent microservice extraction.
[0060] Step S03: Calculate node participation and inter-node influence values. The purpose of this step is to analyze the importance of each node in the entire business relationship network. The specific steps are as follows:
[0061] 1) Node participation value Reflects the nodes The frequency at which it is accessed by other nodes. The calculation formula is: .in, To indirectly affect the attenuation coefficient, the value range is 0.1 to 0.3. ; This is the distance attenuation coefficient, with a value ranging from 0.2 to 0.5; For nodes To the node The shortest path distance.
[0062] 2) Influence matrix between nodes It describes the mutual influence relationships between the nodes. The calculation formula is: .in, This is the second-order influence weighting coefficient, with a value range of 0.2 to 0.4.
[0063] By calculating node participation values and inter-node influence, the importance and criticality of data in the entire production system can be revealed, providing a basis for subsequent microservice partitioning.
[0064] Step S04: Construct a system of equations to optimize node contribution. The purpose of this step is to establish a mathematical model to optimize the contribution weights of each node. The system of equations consists of the following four parts:
[0065] 1) Objective equation: The goal is to maximize the total contribution of nodes, while taking into account bias constraints, normalization constraints, and entropy constraints.
[0066] 2) Constraint equations: This constrains the range of node contribution values and the symmetry.
[0067] 3) Equilibrium equations: Used to balance the distribution of node contributions.
[0068] 4) Convergence equation: Used to determine whether the optimization process has converged.
[0069] By establishing such a multi-constraint optimization problem, a node contribution matrix reflecting the relative importance of each node can be obtained. This provides a basis for subsequent microservice partitioning.
[0070] Step S05: Solve the node contribution optimization equations. The purpose of this step is to use a numerical optimization algorithm to solve the node contribution optimization equations constructed in step S04, and obtain the final node contribution matrix. The specific steps are as follows:
[0071] 1) First, based on the business relationship adjacency matrix and data call frequency matrix Calculate the node participation value Influence matrix between nodes .
[0072] 2) Substitute these parameters into the objective function defined in step S04. Constraint functions, equilibrium functions, and convergence functions.
[0073] 3) Employ numerical optimization algorithms, such as gradient descent or Newton's method, to iteratively solve the problem until the convergence condition is met.
[0074] 4) Finally, a stable node contribution matrix is obtained. .
[0075] This step is crucial to the entire microservice extraction process because of the node contribution matrix. This directly determines the effectiveness of subsequent microservice partitioning.
[0076] Step S06: Identify tightly connected subgraphs using a spectral clustering algorithm. The purpose of this step is to utilize the node contribution matrix. The business relationship graph is divided into several tightly connected subgraphs, i.e., the initial business microservices, using a spectral clustering algorithm. The specific steps are as follows:
[0077] 1) First, calculate the normalized Laplace matrix. ,in It is the identity matrix. It is a degree matrix.
[0078] 2) To Eigenvalue decomposition is performed to obtain the eigenmatrix composed of eigenvectors.
[0079] 3) The first part of the feature matrix Using 1 feature vector as input, - The means algorithm clusters nodes.
[0080] 4) Each cluster corresponds to an initial business microservice.
[0081] Spectral clustering algorithms can accurately identify tightly connected subgraphs in business relationship graphs by utilizing node contribution information, laying the foundation for subsequent microservice partitioning.
[0082] Step S07: Calculate the microservice cohesion contribution and microservice coupling contribution. The purpose of this step is to evaluate the internal cohesion of the initial business microservices and the coupling between microservices, providing a basis for subsequent optimization. The specific steps are as follows:
[0083] 1) For each initial business microservice Calculate its cohesive contribution. ,in This represents the set of nodes within the microservice.
[0084] 2) Computing microservices Other microservices Coupling contribution between .
[0085] 3) Combine cohesion contribution and coupling contribution to form a microservice partitioning evaluation matrix. .
[0086] By calculating the cohesion and coupling contributions of microservices, we can quantitatively evaluate the internal cohesion of microservices and the coupling between them, providing a basis for subsequent microservice optimization.
[0087] Step S08: Calculate the microservice independence score. The purpose of this step is to calculate the independence score for each initial microservice based on its cohesion and coupling contributions, providing a basis for subsequent microservice optimization. The specific steps are as follows:
[0088] 1) For each initial microservice Calculate its independence score .
[0089] 2) The higher the independence score, the more independent the microservice is, the stronger its internal coupling, and the weaker its coupling with other microservices.
[0090] By calculating the microservice independence score, we can identify which microservices have strong internal cohesion but are highly coupled with other microservices, requiring further optimization.
[0091] Step S09: Optimize microservice partitioning. The purpose of this step is to adjust and optimize the initial microservices based on their independence scores, ultimately obtaining optimized business microservices. The specific steps are as follows:
[0092] 1) Set a predetermined independence threshold, such as 0.8.
[0093] 2) For initial microservices with independence scores below the threshold, their nodes are reassigned to other microservices with independence scores above the threshold.
[0094] 3) Recalculate the cohesion and coupling contributions of each microservice until the independence scores of all microservices are above the threshold.
[0095] 4) Finally, the optimized business microservices are obtained.
[0096] This step can further improve the cohesion and independence of microservices, reduce the coupling between microservices, and meet the design requirements of microservice architecture.
[0097] Step S10: Determine the data synchronization mechanism for the microservices. The purpose of this step is to determine the data synchronization mechanism based on the node contribution matrix. This involves determining the data synchronization mechanism between the optimized business microservices, including data synchronization priority, data synchronization timing, and data consistency rules. The specific steps are as follows:
[0098] 1) For each pair of microservices and Data synchronization between nodes is based on the node contribution matrix. middle and The value of the contribution determines the priority of data synchronization. The higher the contribution value, the higher the priority of data synchronization.
[0099] 2) Determine the timing order of data synchronization based on the influence relationships between nodes. That is, which data needs to be synchronized first and which data can be synchronized in parallel.
[0100] 3) Based on the symmetry or asymmetry of node contributions, formulate corresponding data consistency rules. If If strong consistency is adopted, then strong consistency is adopted; if If so, eventual consistency will be adopted.
[0101] By defining a data synchronization mechanism between microservices, we can ensure the timely synchronization and consistency of critical data, thereby improving the reliability and stability of the microservice architecture.
[0102] The calculation process involved in this invention will now be described in detail.
[0103] 1. Adjacency matrix representation of industrial production business relationship diagram:
[0104] ;
[0105] In the formula, This is a business relationship adjacency matrix; This represents the total number of data nodes for industrial production operations. Represents a node To the node The value is 1 if a direct call relationship exists, and 0 otherwise.
[0106] 2. Data retrieval frequency matrix representation:
[0107] ;
[0108] In the formula, For data call frequency matrix; Represents a node Call Node The number of times.
[0109] 3. Node participation value calculation:
[0110] ;
[0111] In the formula, For nodes The participation value; To indirectly affect the attenuation coefficient, the value range is 0.1 to 0.3; This is the distance attenuation coefficient, with a value ranging from 0.2 to 0.5; For nodes To the node The shortest path distance.
[0112] 4. Calculation of the influence matrix between nodes:
[0113] ;
[0114] Each element is calculated as follows:
[0115] ;
[0116] In the formula, For nodes For nodes Influence value; This is the second-order influence weighting coefficient, with a value range of 0.2 to 0.4.
[0117] 5. Optimization equations for node contribution:
[0118] 5.1 Objective Equation:
[0119] ;
[0120] In the formula, The contribution matrix of the nodes to be optimized; These are weighting coefficients, used to balance the deviation constraint, normalization constraint, and entropy constraint, respectively, with values ranging from 0.1 to 1.0.
[0121] 5.2 Constraint Equations:
[0122] ;
[0123] ;
[0124] ;
[0125] In the formula, The minimum impact threshold is set to 0.01. The maximum impact threshold is set to 0.9. The threshold value is 0.1, which represents the asymmetric constraint threshold.
[0126] 5.3 Equilibrium Equations:
[0127] ;
[0128] In the formula, The contribution balance coefficient of the nodes; To balance the attenuation coefficient, the values range from 0.1 to 1.0.
[0129] 5.4 Convergence Equation:
[0130] ;
[0131] ;
[0132] In the formula, For iterative difference measurement; This represents the number of iterations. The maximum difference weighting coefficient has a value of 0.3. The convergence threshold is set to 0.001.
[0133] 6. Calculation of the spectral clustering feature matrix:
[0134] ;
[0135] In the formula, For the standardized Laplace matrix; It is the identity matrix; Let be a degree matrix, with the diagonal elements representing the sum of node contributions.
[0136] 7. Calculation of the microservice partitioning evaluation matrix:
[0137] ;
[0138] In the formula, For the number of microservices; and These are the cohesion contribution and the coupling contribution, respectively.
[0139] In the field of IoT in industrial production, the extraction and identification of business microservices has always been a key technical challenge. Existing technologies mainly employ several common microservice partitioning methods: First, there's the manual partitioning method based on the business domain. This method relies heavily on the experience and knowledge of domain experts, dividing service boundaries by analyzing the similarity and correlation of business functions. While intuitive and easy to understand, this method often struggles to cope with complex and ever-changing industrial production scenarios due to a lack of objective and quantitative evaluation standards, and the partitioning results from different experts can vary significantly. Second, there's the analysis method based on static call relationships. This method constructs a call graph by analyzing the dependencies between system modules and then uses graph segmentation algorithms for service partitioning. While this method has some objectivity, it only considers the static structural characteristics of the system, ignoring the dynamic interaction characteristics during actual operation, leading to potential deviations between the partitioning results and the actual business scenario. Third, there's the dynamic analysis method based on system operation logs. This method collects and analyzes system runtime log data, statistically analyzes the interaction frequency and patterns between modules, constructs a weighted relationship graph, and then applies clustering algorithms for service identification. Although this method introduces dynamic operational characteristics, it fails to fully utilize the specific attributes and constraints of the industrial production domain. Fourthly, there are deep learning-based service identification methods that learn the interaction patterns of a system through neural network models to predict the relationships between modules. While these methods have strong pattern recognition capabilities, they require a large amount of training data, and the models have poor interpretability, making it difficult to provide intuitive decision-making basis for domain experts.
[0140] In contrast, this invention proposes a method for extracting industrial production IoT business microservices based on node contribution optimization, which has significant technological innovation and application advantages. First, this invention establishes a comprehensive data collection and modeling system, systematically collecting multi-dimensional information such as production equipment operation data, process parameter data, quality inspection data, production scheduling instruction data, and production environment monitoring data, constructing a complete industrial production business relationship graph. This comprehensive data collection strategy provides a solid data foundation for subsequent microservice partitioning, ensuring the accuracy and completeness of the partitioning results. Second, this invention innovatively proposes a quantitative evaluation method for node importance. By introducing the calculation of node participation value and inter-node influence value, it not only considers the direct call relationship between nodes but also considers indirect influence and distance attenuation effects by introducing an attenuation coefficient. In particular, the introduction of an exponential attenuation term in the node participation calculation more accurately describes the transmission influence characteristics between nodes, making the evaluation of node importance more consistent with actual business scenarios.
[0141] The most distinctive innovation of this invention lies in the construction of a complete set of node contribution optimization equations. This innovative design has several advantages: First, regarding the objective equations, it comprehensively considers multiple optimization objectives, including maximizing the total node contribution, minimizing the deviation from the influence degree, normalization constraints, and entropy constraints, achieving a dynamic balance among these objectives by introducing weight coefficients. Second, regarding the constraint equations, it sets strict contribution value ranges, normalization requirements, and symmetry constraints, ensuring the rationality and feasibility of the optimization results. Third, regarding the balance equations, it effectively avoids the occurrence of local polarization by introducing an exponential decay term to adaptively adjust the contribution differences between nodes. Finally, regarding the convergence equations, it considers both the average difference and the maximum difference dimensions, providing a reliable termination condition for the optimization process and guaranteeing the stable convergence of the algorithm.
[0142] In terms of practical application effects, this invention demonstrates significant advantages: First, it significantly improves the accuracy of service partitioning. Through quantitative contribution calculation, the service boundaries are defined more clearly and reasonably, effectively reducing the coupling between services. Second, it greatly enhances system maintainability. Contribution-based service partitioning makes the responsibilities of each microservice clearer, significantly reducing system maintenance costs. Third, it significantly improves system performance. Through an optimized data synchronization mechanism, unnecessary data interactions between services are reduced, improving the overall operating efficiency of the system. Fourth, it greatly enhances system scalability. Contribution-based service partitioning provides a sound architectural foundation for horizontal expansion and vertical upgrades. These advantages have been fully verified in actual industrial production environments, providing reliable theoretical basis and practical guidance for industrial internet architecture design.
[0143] In summary, the specific embodiments of this invention, through rigorous mathematical modeling and optimization methods, achieve precise partitioning of microservices for industrial production IoT, overcoming problems such as inaccurate partitioning based on manual experience, lack of dynamic features in static analysis, and neglect of domain characteristics in log analysis in existing technologies. In particular, by introducing a complete set of node contribution optimization equations, quantitative optimization and dynamic adjustment of the microservice partitioning process are achieved, providing an innovative solution for the architecture design and optimization of industrial production IoT systems. This mathematical optimization-based method not only improves the scientificity and accuracy of service partitioning but also provides a new technical path for the evolution and upgrading of industrial internet architecture.
[0144] A second aspect of the present invention provides a computer-readable storage medium storing program instructions, which, when executed in a computer, are used to perform the above-described method for extracting microservices for Internet of Things (IoT) business in industrial production.
[0145] A third aspect of the present invention provides an industrial production Internet of Things (IoT) business microservice extraction system, comprising the aforementioned computer-readable storage medium. The system is any one of a computer, a server, or a microcontroller. The computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.
[0146] Specifically, the principle of this invention is as follows: The core idea of the industrial production IoT business microservice extraction method proposed in this invention is to utilize the inherent relationships and influence of industrial production data, determine the contribution weight of each data node through mathematical optimization, and then automatically identify highly cohesive and loosely coupled business microservices using a spectral clustering algorithm. The specific principle is as follows:
[0147] First, the method of this invention collects a wealth of industrial production data, including equipment operation data, process parameter data, quality inspection data, scheduling instruction data, and environmental monitoring data. This data reflects various aspects of the entire production process.
[0148] Secondly, the method of this invention establishes an industrial production business relationship diagram, abstracting various types of production data into nodes in the diagram. The connections between nodes represent the calling or influence relationships between data. By analyzing the calling frequency between nodes, node participation value and node influence value can be obtained. The node participation value reflects the frequency with which a node is called by other nodes, and the node influence value reflects the degree of influence a node has on other nodes. These two indicators provide a basis for subsequent microservice identification.
[0149] Next, the method of this invention constructs a system of equations for optimizing node contributions, including an objective function, constraints, a balance function, and convergence conditions. The objective function aims to maximize the sum of node contributions, while considering deviation constraints, normalization constraints, and entropy constraints on node contributions. By solving this multi-constraint optimization problem, a node contribution matrix reflecting the relative importance of each node can be obtained.
[0150] With the node contribution matrix in hand, the method of this invention uses a spectral clustering algorithm to identify tightly connected subgraphs from the business relationship graph. These subgraphs correspond to the initial business microservices. The spectral clustering algorithm can accurately discover the community structure in the graph using node contribution information, providing technical support for the automated identification of microservice boundaries.
[0151] To further optimize microservice partitioning, the method of this invention calculates the cohesion and coupling contributions of each initial microservice and reorganizes and adjusts the microservices based on their independence scores. Microservices with higher cohesion and lower coupling contributions exhibit stronger independence and better meet the design requirements of a microservice architecture. This optimization step ensures that the final microservices possess high cohesion and low coupling.
[0152] Finally, the method of this invention utilizes a node contribution matrix to determine the priority, timing, and consistency rules for data synchronization in the optimized microservices. This ensures timely synchronization and consistency of critical data among microservices, improving the reliability and stability of the microservice architecture.
[0153] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0154] Step S01: Collect industrial production business data. The purpose of this step is to collect various types of data related to the industrial production process, laying the foundation for subsequent analysis and microservice extraction.
[0155] The specific implementation method is as follows: First, the system collects operating data of production equipment, including operating parameters such as rotational speed, temperature, and pressure of various industrial equipment. This data reflects the operating status of the equipment. Second, it collects production process parameter data, including process parameters such as the proportion of ingredients, reaction time, and calcination temperature for each production step. These parameters determine the specific execution method of the production process. Third, it collects production quality inspection data, including the test results of various indicators such as the size, weight, and strength of the produced products. This data reflects the quality status of the products. In addition, it collects production scheduling instruction data, including various scheduling instructions issued by production management personnel, such as production task allocation and production schedule adjustments. This data describes the control and coordination of the production process. Finally, it collects production environment monitoring data, including environmental parameters such as workshop temperature and humidity, lighting, and noise. This data reflects the environmental conditions of the production site.
[0156] The collection and accumulation of this data laid the foundation for subsequent industrial production business modeling and microservice extraction.
[0157] Step S02: Establish an industrial production business relationship diagram. The purpose of this step is to construct a graph model that reflects the relationships between various types of production business data, providing an intuitive data structure for subsequent analysis and microservice extraction.
[0158] The specific implementation method is as follows: First, each type of production data is considered as a node, and the connections between nodes represent the calling or influence relationships between data. Based on the data collection situation, an adjacency matrix between nodes can be established. ,in Represents a node Directly call the node The data.
[0159] By analyzing the calling relationships between nodes, a data calling frequency matrix can be further obtained. ,in Represents a node Call Node The number of times.
[0160] This establishes a graph model reflecting the relationships within industrial production operations, where nodes represent various types of production data, and the connections and their weights represent the calls and influences between data. This lays the foundation for subsequent microservice extraction.
[0161] Step S03: Calculate node participation and inter-node influence values. The purpose of this step is to analyze the importance of each node in the entire business relationship network, providing a basis for subsequent microservice partitioning.
[0162] The specific implementation method is as follows:
[0163] First, calculate the node participation value. To reflect the nodes The frequency at which it is accessed by other nodes. The calculation formula is:
[0164]
[0165] in, To indirectly affect the attenuation coefficient, the value range is: ; This is the distance attenuation coefficient, and its value range is... ; For nodes To the node The shortest path distance.
[0166] Secondly, calculate the influence matrix between nodes. This describes the mutual influence relationships between nodes. The calculation formula is:
[0167]
[0168] in, The second-order influence weighting coefficient has a range of values. .
[0169] By calculating node participation values and inter-node influence, the importance and criticality of data in the entire production system can be revealed, providing a basis for subsequent microservice partitioning.
[0170] Step S04: Construct a set of equations to optimize node contribution. The purpose of this step is to establish a mathematical model to optimize the contribution weight of each node, providing a basis for microservice extraction.
[0171] The optimization equation system consists of the following four parts:
[0172] 1. Objective equation:
[0173]
[0174] The objective function aims to maximize the sum of node contributions, while considering bias constraints, normalization constraints, and entropy constraints. These are weighting coefficients, with values ranging from 0.1 to 1.0.
[0175] 2. System of constraint equations:
[0176]
[0177] This constraint limits the node contribution. The range of values for is defined, and the node contribution is required to satisfy normalization and symmetry in both row and column directions. Among these, The minimum impact threshold, The maximum impact threshold, The threshold is an asymmetric constraint.
[0178] 3. Equilibrium Equations:
[0179]
[0180] This balance equation aims to balance the distribution of node contributions, where, and To balance the attenuation coefficient, the values range from 0.1 to 1.0.
[0181] 4. Convergence equation:
[0182]
[0183] This convergence equation is used to determine whether the optimization process has converged, where... The maximum difference weighting coefficient, This is the convergence threshold.
[0184] By establishing such a multi-constraint optimization problem, a node contribution matrix reflecting the relative importance of each node can be obtained. This provides a basis for subsequent microservice partitioning.
[0185] Step S05: Solve the system of node contribution optimization equations. The purpose of this step is to use a numerical optimization algorithm to solve the system of node contribution optimization equations constructed in step S04, and obtain the final node contribution matrix. .
[0186] The specific implementation method is as follows: First, based on the business relationship adjacency matrix... and data call frequency matrix Calculate the node participation value Influence matrix between nodes Then, substitute these parameters into the objective function defined in step S04. The system identifies the constraint function, equilibrium function, and convergence function. Next, numerical optimization algorithms, such as gradient descent and Newton's method, are used to iteratively solve the problem until the convergence condition is met. Finally, a stable node contribution matrix is obtained. .
[0187] This step is crucial to the entire microservice extraction process because of the node contribution matrix. This directly determines the effectiveness of subsequent microservice partitioning.
[0188] Step S06 involves using a spectral clustering algorithm to identify tightly connected subgraphs. The purpose of this step is to utilize the node contribution matrix. The business relationship graph is divided into several tightly connected subgraphs, i.e., the initial business microservices, using the spectral clustering algorithm.
[0189] The specific implementation method is as follows: First, calculate the standardized Laplacian matrix. ,in It is the identity matrix. This is the degree matrix. Then, for... Eigenvalue decomposition is performed to obtain the eigenmatrix composed of eigenvectors. Next, the first... Using 1 feature vector as input, The -means algorithm clusters nodes. Each cluster corresponds to an initial business microservice.
[0190] Spectral clustering algorithms can accurately identify tightly connected subgraphs in business relationship graphs by utilizing node contribution information, laying the foundation for subsequent microservice partitioning.
[0191] Step S07: Calculate the microservice cohesion contribution and microservice coupling contribution. The purpose of this step is to evaluate the internal cohesion of the initial business microservices and the coupling between microservices, providing a basis for subsequent optimization.
[0192] The specific implementation method is as follows: For each initial business microservice Calculate its cohesive contribution. ,in This represents the set of nodes within the microservice. Simultaneously, it computes the microservice. Other microservices Coupling contribution between The cohesion contribution and coupling contribution are combined to form a microservice partitioning evaluation matrix. .
[0193] By calculating the cohesion and coupling contributions of microservices, we can quantitatively evaluate the internal cohesion of microservices and the coupling between them, providing a basis for subsequent microservice optimization.
[0194] Step S08: Calculate the microservice independence score. The purpose of this step is to calculate the independence score of each initial microservice based on its cohesion and coupling contributions, providing a basis for subsequent microservice optimization.
[0195] The specific implementation method is as follows: For each initial microservice Calculate its independence score A higher independence score indicates that the microservice is more independent, has stronger internal coupling, and is less coupled with other microservices.
[0196] By calculating the microservice independence score, we can identify which microservices have strong internal cohesion but are highly coupled with other microservices, requiring further optimization.
[0197] Step S09: Optimize microservice partitioning. The purpose of this step is to adjust and optimize the initial microservices based on their independence scores, ultimately obtaining optimized business microservices.
[0198] The specific implementation is as follows: First, set an independence threshold, for example, 0.8. For initial microservices with independence scores below the threshold, reassign their nodes to other microservices with independence scores above the threshold. Then, recalculate the cohesion and coupling contributions of each microservice until the independence scores of all microservices are above the threshold. Finally, the optimized business microservices are obtained.
[0199] This step can further improve the cohesion and independence of microservices, reduce the coupling between microservices, and meet the design requirements of microservice architecture.
[0200] Step S10: Determine the data synchronization mechanism for the microservices. The purpose of this step is to determine the data synchronization mechanism based on the node contribution matrix. Determine the data synchronization mechanism between the various optimized business microservices, including data synchronization priority, data synchronization timing, and data consistency rules.
[0201] The specific implementation method is as follows: For each pair of microservices and Data synchronization between nodes is based on the node contribution matrix. middle and The value of the contribution determines the priority of data synchronization. A higher contribution value indicates a higher priority. Then, based on the influence relationships between nodes, the timing of data synchronization is determined, i.e., which data needs to be synchronized first and which can be synchronized in parallel. Finally, based on the symmetry or asymmetry of node contributions, corresponding data consistency rules are formulated. If... If strong consistency is adopted, then strong consistency is adopted; if If so, eventual consistency will be adopted.
[0202] By defining a data synchronization mechanism between microservices, we can ensure the timely synchronization and consistency of critical data, thereby improving the reliability and stability of the microservice architecture.
[0203] To better understand and implement this invention, a specific application scenario is provided below as Example 2: A certain industrial park gathers many large-scale machinery and equipment manufacturing enterprises, whose products cover fields such as construction machinery, CNC machine tools, and smart instruments. With the continuous application of industrial internet technology, the factory has achieved full interconnection of production equipment, process control systems, and production management systems. These systems generate a large amount of production operation data, process parameter data, quality inspection data, production scheduling data, and environmental monitoring data every day. How to tap the intrinsic value of this data and improve the factory's operational efficiency and product quality has become a major challenge for park management.
[0204] Therefore, the park management decided to adopt the industrial production IoT business microservice extraction method proposed in this invention to uniformly analyze and integrate the production data of various enterprises within the park, aiming to optimize and coordinate the production process. The following is a specific implementation of this method in a typical machinery and equipment manufacturing enterprise.
[0205] The first step is data acquisition. The company's production workshop has 10 production lines, covering three main product categories: construction machinery, CNC machine tools, and intelligent instruments. Each production line is equipped with a PLC control system, a SCADA monitoring system, and a MES production management system. These systems generate a large amount of production operation data, process parameter data, quality inspection data, production scheduling data, and environmental monitoring data daily. To address this data, the company has established a unified data acquisition platform, using various sensors and acquisition devices to collect and store this production data in real time.
[0206] Taking one of the engineering machinery production lines in the company's production workshop as an example, the specific data collected is shown in Table 1.
[0207] Table 1. Examples of Data Collected from Construction Machinery Production Lines
[0208]
[0209] As can be seen, this data covers all aspects of the entire production process, laying the foundation for subsequent business relationship analysis and microservice extraction. Figure 2 This is a hierarchical structure diagram illustrating the complete data acquisition architecture from the bottom layer of sensors to the top layer of a unified data acquisition platform. The diagram contains four layers: the sensor layer (containing sensors for speed, pressure, temperature, etc.), the data type layer (equipment operation, process parameters, quality inspection, environmental monitoring), the system layer (PLC, SCADA, MES), and the platform layer. Arrows indicate the data flow between the layers, clearly demonstrating the hierarchical relationship of data acquisition.
[0210] The second step was to establish a business relationship diagram. Based on the collected production data, a business relationship diagram of the company's construction machinery production line was constructed. Figure 3 This is a directed graph illustrating the call relationships between different types of nodes (process parameters, quality inspection, environmental monitoring). Different colors are used to distinguish node types, and the call frequency is marked on the connections between nodes, visually demonstrating the interaction relationships between business nodes. The specific implementation is as follows:
[0211] First, each type of production data is treated as a node, resulting in a total of 15 nodes. Then, a business relationship adjacency matrix is constructed based on the direct call relationships between the nodes. The following is a partial content of the adjacency matrix:
[0212]
[0213] As can be seen from the adjacency matrix, node 1 (main motor speed) directly calls node 5 (welding machine current) and node 6 (air pressure in the spraying process); node 5 (welding machine current) directly calls node 8 (product size) and node 11 (workshop temperature), etc.
[0214] Next, the frequency of calls between nodes was analyzed, and a data call frequency matrix was constructed. Part of the content is as follows:
[0215]
[0216] It can be seen that node 1 (main motor speed) calls node 5 (welding machine current) 24 times and node 6 (air pressure in spraying process) 36 times; node 5 (welding machine current) calls node 8 (product size) 27 times and node 11 (workshop temperature) 18 times, etc.
[0217] By constructing a business relationship adjacency matrix and data call frequency matrix A business relationship diagram of the company's engineering machinery production line was established, laying the foundation for subsequent microservice extraction.
[0218] The third step is to calculate the node participation value and the inter-node influence value. This is based on the aforementioned business relationship adjacency matrix. and data call frequency matrix The participation value of each node and the influence value between nodes were calculated. Figure 4 This is an optimized bar chart showing the distribution of engagement values across 15 nodes. Nodes with engagement values greater than 50 are marked in red, while others are marked in blue. Each bar is labeled with a specific numerical value, and grid lines have been added to improve readability.
[0219] First, node participation value The calculation formula is:
[0220] in, To indirectly affect the attenuation coefficient, This represents the distance attenuation coefficient. The participation values of each node were calculated using this formula, and the results are shown in Table 2.
[0221] Table 2 Node Participation Values
[0222]
[0223] As shown in Table 2, Node 5 (welding machine current) and Node 1 (main motor speed) have the highest participation values, at 69 and 60 respectively, indicating that these two nodes play a key role in the entire production process. Node 15 (production task / schedule / maintenance) has a participation value of 0, indicating that this node is not directly invoked by other nodes.
[0224] Secondly, the influence matrix between nodes was calculated. ,in Represents a node For nodes The degree of influence. The calculation formula is:
[0225] Based on this formula, a portion of the influence matrix between nodes was obtained, as shown below:
[0226] ;
[0227] From the matrix As can be seen, node 5 (welding machine current) has an influence of 0.6 on node 8 (product dimensions) and 0.4 on node 11 (workshop temperature); node 7 (hydraulic system oil supply pressure) has an influence of 0.7 on node 4 (bearing temperature) and 0.3 on node 10 (product strength). These data reflect the mutual influence relationships between the nodes.
[0228] By calculating node participation values and inter-node influence, we can gain a preliminary understanding of the status and role of each production data node in the entire production system, laying the foundation for subsequent microservice extraction.
[0229] The fourth step is to construct a system of equations to optimize node contribution. This is based on the node participation values calculated above. Influence matrix between nodes A set of optimization equations for node contribution was constructed to determine the contribution weight of each node. This set of optimization equations consists of the following four parts:
[0230] 1. Objective function: ;
[0231] The objective function aims to maximize the sum of node contributions, while taking into account the deviation constraints, normalization constraints, and entropy constraints of node contributions.
[0232] 2. Constraints: ;
[0233] This constraint limits the node contribution. The range of values is defined, and the node contribution is required to satisfy normalization and symmetry in both row and column directions.
[0234] 3. Equilibrium function: ;
[0235] This balancing function aims to balance the distribution of node contributions.
[0236] 4. Convergence Criteria: ;
[0237] This convergence condition is used to determine whether the optimization process has converged.
[0238] Based on the above set of optimization equations, a stable node contribution matrix was finally obtained through iterative calculations using a numerical optimization algorithm. Some results are as follows:
[0239]
[0240] ;
[0241] The contribution matrix shows that node 5 (welding machine current) has the highest contribution, reaching 0.14; nodes 1 (main motor speed), 8 (product size), and 5 (welding machine current) also have relatively high contributions, at 0.08, 0.10, and 0.15 respectively. Node 15 (production task / schedule / maintenance) has a contribution of 0, indicating that this node has a relatively small role in the overall production system.
[0242] The fifth step involves using a spectral clustering algorithm to identify tightly connected subgraphs. This is based on the node contribution matrix calculated in the previous step. The spectral clustering algorithm is used to perform cluster analysis on the industrial production business relationship graph to automatically identify highly cohesive and loosely coupled business microservices. Figure 5 This is an eigenvalue distribution curve, showing the distribution of the 15 eigenvalues of the node contribution matrix. A red dashed line is added at k=5 to mark the clustering threshold, reflecting the basis for determining the number of microservices in the spectral clustering algorithm.
[0243] The specific steps are as follows: First, calculate the standardized Laplacian matrix. ,in It is the identity matrix. This is the degree matrix. Then, for... Eigenvalue decomposition is performed to obtain an eigenmatrix composed of eigenvectors. Finally, the first 5 eigenvectors of the eigenmatrix are used as input, and... The -means algorithm clusters the nodes. After cluster analysis, the 15 nodes are divided into 5 tightly connected subgraphs, which are 5 initial business microservices. The composition of these 5 microservices is shown in Table 3.
[0244] Table 3 Initial Business Microservices
[0245]
[0246] As shown in Table 3, these five initial microservices focus on different business areas such as process parameter monitoring, product quality inspection, and environmental monitoring, with low coupling between them. This lays the foundation for subsequent microservice optimization.
[0247] Step 6: Calculate the cohesion contribution and coupling contribution of each microservice. To further optimize the microservice partitioning, the cohesion contribution of each initial microservice and the coupling contribution between microservices were calculated.
[0248] Cohesion contribution Reflects microservices The formula for calculating the tightness between internal nodes is:
[0249] Coupling contribution Reflects microservices microservices The degree of coupling between them is calculated using the following formula:
[0250] Based on the above formula, the cohesion contribution and coupling contribution of each initial microservice were obtained, and the results are shown in Table 4.
[0251] Table 4. Cohesion and Coupling Contributions of Initial Microservices
[0252]
[0253] As shown in Table 4, microservice 1 has the highest cohesion contribution, reaching 0.37, indicating that the internal nodes of this microservice are most closely connected. Microservice 5, on the other hand, has the lowest cohesion contribution, at only 0.10. In terms of coupling contribution, microservice 1 has relatively high coupling with other microservices, especially with microservice 5 (environmental monitoring), where the coupling reaches 0.06, requiring significant optimization.
[0254] Step 7: Optimize microservice partitioning. Based on the evaluation results of cohesion and coupling contributions mentioned above, the initial 5 microservices were optimized and adjusted.
[0255] First, an independence threshold of 0.8 was set. That is, if the cohesion contribution of a microservice divided by the sum of the coupling contributions of other microservices is less than 0.8, then the microservice needs to be optimized.
[0256] Calculations show that the independence scores for microservices 1 and 2 are 0.85 and 0.83, respectively, which meet the requirements; while the independence scores for microservices 3, 4, and 5 are 0.76, 0.67, and 0.59, respectively, which are below the threshold and require optimization.
[0257] Specifically, nodes from microservices 3, 4, and 5 were reassigned to microservices 1 and 2, which had higher independence scores. After multiple rounds of iterative optimization, the three optimized business microservices were finally obtained, as shown in Table 5.
[0258] Table 5 Optimized Business Microservices
[0259]
[0260] Figure 6 This is a bipartite comparison chart. The left subplot (A) and right subplot (B) show the cohesion contribution and independence scores of the three microservices before and after optimization, respectively. Different colors are used to distinguish the two metrics, and grid lines are added to improve readability. This comparative layout visually demonstrates the performance improvement of the microservices after optimization. As can be seen, after optimization, the cohesion contribution of all three microservices exceeds 0.3, the coupling contribution is below 0.12, and the independence score is above 0.8, meeting the design requirements of a microservice architecture.
[0261] Step 8: Determine the data synchronization mechanism for the microservices. Finally, based on the optimized node contribution matrix... The priority, timing, and consistency rules for data synchronization were determined for these three business microservices.
[0262] First, for data synchronization within a microservice, the priority of data synchronization is determined according to the value of the node's contribution. For example, within microservice 1, node 5 (welding machine current) has the highest contribution, so its data synchronization priority with other nodes is also the highest.
[0263] Secondly, the timing sequence of data synchronization was determined based on the influence relationships between nodes. For example, in microservice 1, node 1 (main motor speed) has a significant impact on node 5 (welding machine current), so the main motor speed data needs to be synchronized first, and then the welding machine current data needs to be synchronized.
[0264] Finally, for data synchronization between microservices, corresponding data consistency rules were formulated based on the symmetry or asymmetry of node contributions. If the elements of the node contribution matrix between two microservices are basically symmetrical, strong consistency is adopted; if there is obvious asymmetry, eventual consistency is adopted.
[0265] Through the above methods, a unified synchronization mechanism has been established for key data in the entire industrial production process, which can ensure both timely data synchronization and data consistency, providing strong support for the refined management of the factory.
[0266] It should be noted that the variables involved in this invention are explained in detail in Table 6 below.
[0267] Table 6. Variable Explanation Table
[0268]
[0269] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for extracting microservices for industrial production IoT business, characterized in that, include: Collect industrial production business data; establish an industrial production business relationship diagram; Calculate the node participation value and the inter-node influence value; A node contribution matrix is obtained by constructing and solving a set of node contribution optimization equations, wherein the set of node contribution optimization equations includes: node contribution objective equation, node contribution constraint equation, node contribution balance equation, and node contribution convergence equation; initial business microservices are obtained using the node contribution matrix and a spectral clustering algorithm; microservice cohesion contribution and microservice coupling contribution are calculated to obtain microservice independence scores; the initial business microservices are optimized based on the microservice independence scores; and the data synchronization mechanism of the optimized business microservices is determined based on the node contribution matrix; the nodes in the industrial production business relationship graph represent the industrial production business data, the node participation value is obtained based on the number of times the node is called by other nodes, and the node influence value is obtained based on the number of times the node calls other nodes. The node contribution objective equation is used to maximize the sum of node contributions. The inputs to the node contribution objective equation include the node participation value and the inter-node influence value. The output of the node contribution objective equation is the node contribution matrix. The node contribution constraint equation is used to limit the value range of the node contribution matrix. The inputs to the node contribution constraint equation include a preset maximum influence threshold and a preset minimum influence threshold. The output of the node contribution constraint equation is the node contribution constraint interval. The node contribution balance equation is used to balance the distribution of the node contribution matrix. The inputs to the node contribution balance equation include the node participation value and the inter-node influence value. The output of the node contribution balance equation is the node contribution balance coefficient. The node contribution convergence equation is used to determine the optimization convergence state of the node contribution matrix. The inputs to the node contribution convergence equation include the iterative difference of the node contribution matrix and a preset convergence threshold. The output of the node contribution convergence equation is the optimization convergence state.
2. The method for extracting industrial production IoT business microservices according to claim 1, characterized in that, The industrial production business data includes production equipment operation data, production process parameter data, production quality inspection data, production scheduling instruction data, and production environment monitoring data.
3. The method for extracting industrial production IoT business microservices according to claim 2, characterized in that, The microservice cohesion contribution is the sum of the node contributions within the initial business microservice, and the microservice coupling contribution is the sum of the node contributions between the initial business microservice and other initial business microservices.
4. The method for extracting industrial production IoT business microservices according to claim 3, characterized in that, The data synchronization mechanism includes data synchronization priority, data synchronization timing, and data consistency rules.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores program instructions, which, when executed in a computer, are used to perform the industrial production Internet of Things business microservice extraction method according to any one of claims 1-4.
6. A microservice extraction system for industrial production Internet of Things (IoT) business, characterized in that, The system includes the computer-readable storage medium of claim 5, wherein the system is any one of a computer, a server, or a microcontroller, the computer-readable storage medium is disposed within the system, and the system is provided with a microprocessor that executes the program instructions stored in the computer-readable storage medium.