A productivity platform microservice granularity determination method, medium and system
By constructing a multi-dimensional service dependency evaluation equation set and an L-shaped domino coverage algorithm, combined with a neural network model and a genetic algorithm, the problem of the difficulty in dynamically adjusting the granularity of microservices in the productivity platform was solved, and the optimal performance and resource utilization efficiency of the system in a dynamically changing environment were achieved.
Patent Information
- Application Number
- CN202510174079.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-02-18
AI Technical Summary
Existing technologies struggle to achieve dynamic adaptive adjustment of the microservice granularity of productivity platforms, resulting in the system failing to maintain its optimal state when business demands and system loads change, thus increasing operational costs and failure risks.
By constructing a multi-dimensional service dependency evaluation equation set, and using an L-shaped domino coverage algorithm and a neural network model combined with a genetic algorithm, we can achieve accurate calculation and dynamic adjustment of microservice granularity.
It enables dynamic adaptive adjustment of microservice granularity, reduces system complexity, improves resource utilization efficiency, and ensures that the system maintains optimal performance in dynamically changing environments.
Smart Images

Figure CN120218695B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of digital data processing, and particularly relates to a productivity middle platform micro-service granularity determination method, medium and system. BACKGROUND
[0002] The productivity middle platform is a technical platform for enterprise digital transformation, and its core is to abstract and encapsulate the common business capabilities and technical capabilities of enterprises in the form of micro-services to provide them for reuse in various business scenarios. In traditional micro-service division methods, domain-driven design, system dependency analysis and clustering analysis techniques are mainly used to determine the boundaries and granularity of micro-services. The domain-driven design method divides micro-services by identifying bounded contexts and aggregate roots, the system dependency analysis method splits services based on code-level call relationships, and the clustering analysis method clusters system components using historical monitoring data. These methods are widely used in practical applications and have formed relatively mature practical experience.
[0003] However, the existing micro-service division methods generally have some technical defects: first, most of these methods rely on static analysis or historical data, and cannot effectively cope with the dynamic changes of business requirements and system load; second, existing methods often only focus on single-dimensional dependency relationships such as code dependency or data dependency, and lack comprehensive evaluation of multi-dimensional dependency relationships; third, these methods often use simple heuristic rules when dealing with service merging and splitting, making it difficult to guarantee global optimality; finally, existing methods lack the ability to predict the evolution trend of micro-services, and cannot identify and respond to potential architecture problems in advance.
[0004] In the actual operation process of the productivity middle platform, due to the continuous changes in business requirements, fluctuations in user access patterns, and evolution of system architecture, the optimal granularity of micro-services will also change. Existing technologies are difficult to achieve dynamic self-adaptive adjustment of micro-service granularity, which leads to the system being in a suboptimal state for a long time, affecting service performance and resource utilization efficiency. In particular, in large-scale distributed systems, unreasonable service granularity can lead to rapid increase in system complexity, increasing operation and maintenance costs and fault risks. That is, there is a technical problem of difficulty in dynamically and self-adaptively adjusting the productivity middle platform micro-service granularity in the existing technology. SUMMARY
[0005] Therefore, the present application provides a productivity middle platform micro-service granularity determination method, medium and system, which can solve the technical problem of difficulty in dynamically and self-adaptively adjusting the productivity middle platform micro-service granularity in the existing technology.
[0006] The application is implemented in the following manner: a productivity middle platform microservice granularity determination method is provided in the first aspect of the application, which comprises the following steps: collecting productivity middle platform runtime parameters, performing multidimensional decomposition on the productivity middle platform runtime parameters to obtain stable load indicators and fluctuating load indicators, constructing a business domain interaction matrix and performing singular value decomposition to obtain a business correlation characteristic vector, calculating a dependency complexity coefficient matrix based on a service dependency evaluation equation set, converting the dependency complexity coefficient matrix into a service dependency relationship chessboard, performing partition coverage on the service dependency relationship chessboard by using an L-shaped domino covering algorithm, determining an optimal service merging scheme according to the covering result of the L-shaped domino covering algorithm, predicting the system complexity of the optimized service combination scheme by using a service evaluation neural network model, and obtaining a final microservice division scheme by iterative optimization using a genetic algorithm.
[0007] The productivity middle platform runtime parameters comprise a service call frequency parameter, a data access volume parameter, a business processing time length parameter, a system resource occupancy rate parameter, an interface response time parameter and a data consistency parameter.
[0008] The service dependency evaluation equation set comprises a data consistency evaluation equation, an interface call evaluation equation, a business cohesion evaluation equation and a service dependency comprehensive evaluation equation, and the input of each evaluation equation comes from the processing result of the productivity middle platform runtime parameters.
[0009] The input of the data consistency evaluation equation comprises a data update frequency value, a consistency time delay requirement value and a data correlation degree value, and the output is a data consistency coefficient; the input of the interface call evaluation equation comprises a call frequency matrix, a response time delay matrix and a call link depth value, and the output is an interface dependency coefficient.
[0010] The input of the business cohesion evaluation equation comprises a functional module correlation degree value, a process coupling degree value and a data entity correlation degree value, and the output is a business cohesion coefficient; the input of the service dependency comprehensive evaluation equation comprises the data consistency coefficient, the interface dependency coefficient and the business cohesion coefficient, and the output is a service dependency value.
[0011] The service dependency relationship chessboard comprises a data dependency dimension, an interface call dimension and a business process dimension, and the value of each cell in the service dependency relationship chessboard is determined by the coefficient at the corresponding position of the dependency complexity coefficient matrix.
[0012] The L-shaped domino covering algorithm satisfies the constraint condition that the sum of the data dependency dimensions in the L-shaped domino coverage area does not exceed a first threshold value, the sum of the interface call dimensions does not exceed a second threshold value, and the sum of the business process dimensions does not exceed a third threshold value.
[0013] The service evaluation neural network model is trained by using the stable load index and the fluctuation load index, is used for predicting a system complexity score, and determines an optimal granularity range of each micro service when the system complexity score reaches a set threshold, and outputs a final micro service granularity scheme.
[0014] The second aspect of the application provides a computer-readable storage medium, the computer-readable storage medium stores program instructions, the program instructions are run in the computer, and the program instructions are used for executing the productivity middle platform micro service granularity determination method.
[0015] The third aspect of the application provides a productivity middle platform micro service granularity determination system, comprising the computer-readable storage medium, the system is any one of a computer, a server and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing the program instructions stored in the computer-readable storage medium.
[0016] Compared with the prior art, the productivity middle platform micro service granularity determination method, medium and system provided by the application, the application proposes a micro service granularity determination method based on multi-dimensional evaluation and dynamic optimization, the method realizes accurate calculation and dynamic adjustment of micro service granularity by constructing a complete service dependence evaluation equation set and an innovative L-shaped domino covering algorithm. The method firstly constructs an evaluation system from three dimensions of data consistency, interface calling and business cohesion, quantifies the dependence relationship between services through a mathematical model; then optimizes service combination under the condition of meeting multi-dimensional constraints by using an L-shaped domino covering algorithm; finally, a neural network model is used to predict system complexity, and a genetic algorithm is used to realize dynamic optimization of service granularity.
[0017] The scheme of the application realizes accurate capture of system evolution characteristics by constructing a service dependence comprehensive evaluation equation containing static evaluation items and dynamic evaluation items; a three-dimensional service dependence relationship chessboard is used to represent multi-dimensional dependence relationship, and an L-shaped domino covering algorithm is used to realize globally optimal service combination; a neural network model is introduced to predict system complexity, and a genetic algorithm is used to realize adaptive adjustment of service granularity. The technical scheme of the application effectively reduces system complexity and improves resource utilization efficiency while ensuring service independence.
[0018] The application successfully solves the technical problem that the productivity middle platform micro service granularity is difficult to dynamically and adaptively adjust, and the core lies in establishing a scientific and complete evaluation and optimization system. The system accurately quantifies service dependence relationship through a mathematical model, predicts and optimizes system complexity by using an artificial intelligence algorithm, and realizes dynamic and adaptive adjustment of micro service granularity. This data-driven method enables the system to automatically adjust service boundaries according to actual running conditions, and maintain optimal service granularity configuration. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 is a flow chart of the method of the present application.
[0020] Figure 2 is a trend chart of the main parameters within 30 days of system operation in Example 2.
[0021] Figure 3 is a decomposition result chart of stable load and fluctuating load of each index in Example 2.
[0022] Figure 4 is a dependence strength chart between core microservices in Example 2.
[0023] Figure 5 is a chart of the change of each performance index before and after service optimization in Example 2. DETAILED DESCRIPTION
[0024] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0025] As shown in Figure 1 is a flow chart of a productivity middle platform microservice granularity determination method provided by the first aspect of the present application, and the method comprises the following steps:
[0026] S10, collecting productivity middle platform runtime parameters, wherein the productivity middle platform runtime parameters comprise service call frequency parameters, data access volume parameters, business processing time length parameters, system resource occupation rate parameters, interface response time parameters and data consistency parameters;
[0027] S20, performing multi-dimensional decomposition on the productivity middle platform runtime parameters to obtain stable load indexes and fluctuating load indexes, wherein the stable load indexes represent system normal operation characteristics, and the fluctuating load indexes represent system peak operation characteristics;
[0028] S30, constructing a business domain interaction matrix, performing singular value decomposition on the business domain interaction matrix to obtain a business correlation characteristic vector, and generating an initial microservice division scheme based on the business correlation characteristic vector;
[0029] S40, establishing a service dependence evaluation equation set, wherein the service dependence evaluation equation set comprises a data consistency evaluation equation, an interface call evaluation equation, a business cohesion degree evaluation equation and a service dependence degree comprehensive evaluation equation;
[0030] S50, calculating a dependency complexity coefficient matrix of the initial microservice division scheme by using the service dependency evaluation equation set, and constructing a service merging optimization model based on the dependency complexity coefficient matrix;
[0031] S60, converting the dependency complexity coefficient matrix into a service dependency relationship board, the service dependency relationship board including a data dependency dimension, an interface call dimension, and a business process dimension, each cell in the service dependency relationship board taking a value determined by a coefficient at a corresponding position of the dependency complexity coefficient matrix, performing partition coverage on the service dependency relationship board by using an L-shaped domino covering algorithm, the L-shaped domino covering algorithm satisfying a constraint condition that a sum of the data dependency dimensions in a covering area of the L-shaped domino covering algorithm does not exceed a first threshold value, a sum of the interface call dimensions does not exceed a second threshold value, and a sum of the business process dimensions does not exceed a third threshold value, determining an optimal service merging scheme according to a covering result of the L-shaped domino covering algorithm, and generating an optimized service combination scheme;
[0032] S70, constructing a service evaluation neural network model, the service evaluation neural network model being used for predicting a system complexity score, and training the service evaluation neural network model by using the stable load index and the fluctuating load index;
[0033] S80, inputting an output value of the service dependency comprehensive evaluation equation into the service evaluation neural network model, predicting a system complexity of the optimized service combination scheme, and obtaining a system complexity score;
[0034] S90, performing iterative optimization on the optimized service combination scheme by using a genetic algorithm until the system complexity score reaches a set threshold value, determining an optimal granularity range of each microservice, and outputting a final microservice granularity scheme.
[0035] The service dependency evaluation equation set includes a data consistency evaluation equation, an interface call evaluation equation, a business cohesion evaluation equation, and a service dependency comprehensive evaluation equation;
[0036] The data consistency evaluation equation is used for calculating a data synchronization requirement degree between microservices, and inputs a data update frequency value obtained by using the data access amount parameter, a consistency time delay requirement value obtained by using the data consistency parameter, and a data correlation degree value obtained by using the business correlation feature vector, and outputs a data consistency coefficient;
[0037] The interface call evaluation equation is used for calculating an interface dependency strength between microservices, and inputs an invocation frequency matrix obtained by using the service invocation frequency parameter, a response time delay matrix obtained by using the interface response time parameter, and a call link depth value obtained by using the business correlation feature vector, and outputs an interface dependency coefficient;
[0038] The service cohesion evaluation equation is used for calculating the internal function aggregation degree of the micro service, and the input includes the function module correlation degree value obtained by the business correlation feature vector, the process coupling degree value obtained by the business processing time parameter, and the data entity correlation degree value obtained by the data access amount parameter, and the output is a business cohesion coefficient;
[0039] The service dependence comprehensive evaluation equation is used for calculating the overall dependence relationship strength between services, and the input includes the data consistency coefficient, the interface dependence coefficient and the business cohesion coefficient, and the output is a service dependence value.
[0040] In the prior art, the productivity platform micro service granularity determination and division mainly adopts the following methods: the prior art generally adopts a method based on business domain driven design (DDD) to divide the micro service, which mainly determines the range of the micro service by analyzing the business domain boundary, the aggregate root and the entity relationship, but this method is too dependent on the experience and subjective judgment of domain experts, and it is difficult to accurately grasp the service boundary in a complex system, and it also lacks consideration of the runtime characteristics of the system; another method is a static analysis based on system dependence relationship, which constructs a call relationship graph between system components, and adopts a graph theory algorithm to divide the services, but this method only focuses on the static dependence at the code level, ignores the dynamic characteristics such as data flow and business process, and is easy to cause the division result to be inconsistent with the actual business demand; another method is a clustering analysis based on historical monitoring data, which collects the call frequency, response time and other indicators of the system runtime, and adopts a machine learning algorithm to cluster the services, but this method excessively relies on historical data, and is difficult to cope with new demands brought by business changes, and the interpretability of the clustering result is poor.
[0041] The present application has the following advantages and effects: first, the present application proposes a multi-dimensional service dependence evaluation system, which comprehensively considers the data interaction, interface call and business association between micro services by constructing a data consistency evaluation equation, an interface call evaluation equation, a business cohesion evaluation equation and a service dependence comprehensive evaluation equation, making the basis for service division more objective and comprehensive; second, the present application innovatively introduces time dynamic characteristics in the service dependence comprehensive evaluation equation, which captures the trend of system parameters through partial differentiation and integration terms, so that the evaluation result can reflect the dynamic evolution characteristics of the system, which is helpful to discover and deal with potential problems in the system evolution process; third, the present application uses singular value decomposition method to process the business domain interaction matrix, which can effectively extract the main business association characteristics and reduce the problem complexity; finally, the adjustable weight coefficients and power exponents are included in each evaluation equation of the present application, which has good adaptability and scalability, and can be optimized according to the needs of different scenes.
[0042] The application of the L-shaped domino covering algorithm in the service dependency chessboard has important innovation and practical value: by mapping the service dependency to a three-dimensional chessboard space and introducing threshold constraints of data dependency dimension, interface call dimension and business process dimension, the service merging process can not only guarantee local optimization but also meet global constraints; the special structure of the L-shaped domino can well match the common service combination modes in the microservice system, such as master-slave service, aggregation service, etc., so that the merging scheme is more in line with the actual business scenario; at the same time, the solving process of the domino covering problem has good parallelism, which helps to improve the execution efficiency of the algorithm.
[0043] The service dependency evaluation equation set constructed by the application has shown significant effects in practical application: first, there is a clear logical relationship between each equation in the equation set, forming a complete evaluation chain from bottom-layer data interaction to high-layer service dependency, so that the evaluation result has strong explainability; second, the error term and weight coefficient introduced in the equation set make the model have strong robustness and can cope with noise and abnormal data in the actual system; third, the dynamic evaluation term in the service dependency degree comprehensive evaluation equation can effectively capture the change trend in the system evolution process, providing an important basis for system reconstruction and optimization; finally, the design of the equation set fully considers the availability of parameters, and all input parameters can be obtained through existing monitoring tools and analysis tools, which has strong practicality.
[0044] In summary, by constructing a complete service dependency evaluation equation set and combining the innovative L-shaped domino covering algorithm, the application realizes accurate determination of the productivity middle platform microservice granularity, has advantages such as comprehensiveness, dynamics, explainability and practicality compared with the prior art, can effectively guide the design and optimization process of the microservice system, and has important theoretical value and practical significance.
[0045] The steps of the calculation involved in the application are described in detail below.
[0046] 1. Business domain interaction matrix and its singular value decomposition (S30 step):
[0047] The business domain interaction matrix is specifically represented as follows:
[0048] M ij =α ij F ij +β ij D ij +γ ij P ij ;
[0049] In the formula, M ij is the interaction intensity between business domains i and j; F ij is the function call frequency; Dij is the data interaction amount; P ij is the process correlation degree; a ij , b ij , g ij are weight coefficients, and satisfy a ij + b ij + g ij = 1.
[0050] Singular value decomposition is performed on the business domain interaction matrix M:
[0051] M = U∑V T ;
[0052] In the formula, U and V are orthogonal matrices, and ∑ is a diagonal matrix.
[0053] The business correlation feature vector is calculated as follows:
[0054]
[0055] In the formula, R k is the correlation eigenvalue of the kth business domain; s i is the ith singular value; u ik and v ik are the elements in the ith row and the kth column of the U and V matrices, respectively; and n is the number of singular values.
[0056] 2. Data consistency evaluation equation (S40 step):
[0057]
[0058] In the formula, C d is the data consistency coefficient; f u is the data update frequency value; f max is the maximum update frequency reference value; t d is the consistency time delay requirement value; t max is the maximum allowed time delay value; r d is the data correlation degree value; r max is the maximum correlation degree reference value; w1, v2, w3 are weight coefficients, and satisfy w1 + v2 + w3 = 1; a, b, g are adjustment indexes, and the value range is [0.5, 2]; and s d is an error term, and the value range is [-0.1, 0.1].
[0059] 3. Interface call evaluation equation (S40 step):
[0060]
[0061] In the formula, C i is the interface dependency coefficient; f ijThe frequency of service i calling service j; t ij The response time of service i calling service j; d p The call link depth value; f max , t max , d max respectively, θ1, θ2, θ3 are weight coefficients, satisfying θ1+θ2+θ3=1; λ, μ, ν are adjustment indexes, taking values in the range of [0.5, 2]; ε i is an error term, taking values in the range of [-0.1, 0.1]; m is the number of related services.
[0062] 4. Business cohesion evaluation equation (S40 step):
[0063]
[0064] In the formula, C b is the business cohesion coefficient; r m is the functional module correlation value; c p is the process coupling value; r e is the data entity correlation value; r max , c max are the corresponding maximum reference values; φ1, φ2, φ3 are weight coefficients, satisfying φ1+θ2+φ3=1; ξ, η, ζ are adjustment indexes, taking values in the range of [0.5, 2]; ε b is an error term, taking values in the range of [-0.1, 0.1].
[0065] 5. Comprehensive evaluation equation of service dependency (S40 step):
[0066]
[0067] In the formula, D is the service dependency value; C d , C i , C b are the data consistency coefficient, interface dependency coefficient and business cohesion coefficient respectively; ψ1, ψ2, ψ3, ψ4, ψ5, ψ6 are weight coefficients, satisfying ψ1+ψ2+ψ3+ψ4+ψ5+ψ6=1; ρ, σ, τ are adjustment indexes, taking values in the range of [0.5, 2]; ε s is an error term, taking values in the range of [-0.1, 0.1]; t0 is the evaluation start time; t1 is the evaluation end time; respectively, represent the partial derivatives of the data consistency coefficient, the interface dependency coefficient and the business cohesion coefficient with respect to time, used to represent the dynamic change rates of these parameters.
[0068] 6. Dependency complexity coefficient matrix (S50 step):
[0069]
[0070] In the formula, K ij is the dependency complexity coefficient between services i and j; D ij is the service dependency value; N ij is the number of direct calls between services; L ij is the length of the longest call link between services; δ1, δ2, δ3 are weight coefficients, satisfying δ1+δ2+δ3=1; κ, χ, ω are adjustment indexes, taking values in the range [0.5, 2].
[0071] The construction principle and significance of these equations are as follows:
[0072] 1. The weighted summation is used to comprehensively consider the three dimensions of function call, data interaction, and process association in the business domain interaction matrix, and the main business association features can be extracted through singular value decomposition;
[0073] 2. The power function relationship is used in the data consistency evaluation equation because the data consistency requirement often presents a nonlinear characteristic, and the increase in update frequency, time delay requirement, and association degree will lead to a rapid rise in the consistency requirement;
[0074] 3. The interface call evaluation equation considers the cumulative effect of call frequency, uses summation form, and reflects the influence of call link depth through a power function;
[0075] 4. The business cohesion evaluation equation also uses a power function relationship, which reflects the nonlinear influence of functional module, process, and data entity association on cohesion;
[0076] 5. The service dependency comprehensive evaluation equation:
[0077] (1) Introducing the time dimension: the partial derivative term reflects the change characteristics of system parameters over time, making the evaluation more dynamic;
[0078] (2) Integration of the change rate: by integrating the change rate over a period of time, the cumulative change effect of the parameter over the entire evaluation period can be measured;
[0079] (3) Complete consideration: both the original static evaluation term and the dynamic evaluation term are added, making the evaluation more comprehensive;
[0080] (4) Practical application value: the parameter values at different time points can be monitored, the change rate can be calculated and integrated, and the dynamic characteristics of the system can be evaluated;
[0081] 6. The dependency complexity coefficient matrix introduces the reciprocal term, which reflects the characteristic that the increase in call number will reduce the complexity, while the call link length term uses a positive correlation relationship.
[0082] The specific implementation of step S10 is: first, performance indicator data in the running process of the productivity middle platform is collected by using the application performance monitoring system, wherein the service call frequency parameter is counted by the service call counter in real time to count the number of calls and time distribution between services; the data access volume parameter is collected by the database monitoring component to collect database operation records of each service, including the number and frequency of add, delete, modify and query operations; the business processing time parameter is recorded by the link tracking system to record the execution time of the complete business process and the processing time of each node; the system resource occupancy rate parameter is collected by the resource monitoring probe to collect performance indicators at the system level, such as CPU usage, memory occupancy, disk IO, etc.; the interface response time parameter is collected by the interface performance monitoring component to count the response delay and timeout of each service interface; the data consistency parameter is verified by the data consistency checking tool to verify the execution result and data synchronization state of the distributed transaction, and each type of parameter collected needs to be aligned and standardized according to a unified time dimension to ensure the time sequence and comparability of the data.
[0083] The specific implementation of step S20 is: first, the collected productivity middle platform running time parameters are preprocessed, including outlier processing, missing value filling and data standardization, then principal component analysis method is used to reduce the dimension of the preprocessed parameters, extract the main load characteristic dimension, then Fourier transform is used to analyze the frequency domain of each dimension parameter, and the signal is decomposed into different frequency components, wherein the low frequency component corresponds to the stable load characteristics of the system, and the high frequency component corresponds to the fluctuating load characteristics of the system, signal separation is performed by setting a frequency threshold, the reference value of the frequency threshold is 0.1 Hz, and finally statistical feature extraction is performed on the separated load indicators, including mean, standard deviation, peak factor and other indicators, which are used for subsequent service evaluation and optimization, wherein the stable load indicator mainly reflects the performance characteristics of the system under normal business load, and the fluctuating load indicator reflects the performance characteristics of the system under peak load.
[0084] The specific implementation of step S30 is: firstly, a service domain interaction matrix reflecting the interaction relationship between different service domains is constructed, the matrix elements contain the weighted combination of three dimensions of function call frequency, data interaction amount and process correlation degree, the weight coefficients of each dimension are configured according to the actual business importance, and the sum of the weights is 1; then singular value decomposition algorithm is used to decompose the service domain interaction matrix to obtain a characteristic vector reflecting the business correlation degree, singular value decomposition can effectively extract the main feature mode in the matrix and reduce the noise influence of data; then the similarity between different service domains is calculated based on the business correlation characteristic vector, a hierarchical clustering algorithm is used to preliminarily group the service domains, a customized distance measurement function is used during clustering, and the business semantic similarity and interaction frequency are considered comprehensively; finally, an initial micro-service division scheme is generated according to the clustering result, and the initial boundary and responsibility range of each micro-service are determined.
[0085] The specific implementation of step S40 is: firstly, a data consistency evaluation equation is constructed, which considers three factors of data update frequency, consistency delay requirement and data correlation degree, adopts a power function form to reflect the nonlinear influence of each factor, and the weight coefficient and exponential parameter can be adjusted according to actual requirements; then an interface call evaluation equation is constructed, which comprehensively evaluates the call frequency and response time delay between services through accumulation, and combines the call link depth to reflect the call dependence strength between services; then a business cohesion evaluation equation is constructed, which comprehensively considers the function module correlation degree, process coupling degree and data entity correlation degree, and reflects the aggregation degree of internal functions of the service; finally, a service dependence comprehensive evaluation equation is constructed, which not only contains static evaluation items, but also introduces dynamic evaluation items in the time dimension, and captures the change trend of system parameters through partial derivative and integral form, and each parameter in the evaluation equation set can be obtained from system monitoring data, which has strong practicability.
[0086] The specific implementation of step S50 is: firstly, the service dependence evaluation equation set is used to evaluate the dependence relationship between each pair of services in the initial micro-service division scheme, and the data consistency coefficient, interface dependence coefficient and business cohesion coefficient between them are calculated; then a dependence complexity coefficient matrix is constructed based on these evaluation results, each element of the matrix represents the comprehensive dependence degree between two services, and three factors of service dependence value, reciprocal of direct call times and longest call link length are considered during calculation; then a service merging optimization model is constructed based on the dependence complexity coefficient matrix, the model takes minimizing the overall complexity of the system as the goal, and considers the constraints of service size, resource consumption and performance requirements; finally, a heuristic optimization algorithm is used to solve the model to obtain a preliminary service merging scheme.
[0087] The specific implementation of step S60 is: first, convert the dependency complexity coefficient matrix into a three-dimensional service dependency chessboard, and the three dimensions of the chessboard correspond to data dependency, interface call and business process respectively, the value range of each dimension is determined according to the actual system size, then implement the L-shaped tile covering algorithm on the three-dimensional chessboard, each L-shaped tile represents a possible service merging scheme, and the covering process needs to meet the threshold constraints of the three dimensions, wherein the first threshold reference value of the data dependency dimension is 0.8, the second threshold reference value of the interface call dimension is 0.7, and the third threshold reference value of the business process dimension is 0.6, then use the strategy combining divide and conquer method and backtracking method to cover the chessboard, backtrack when a covering scheme violates the constraint condition, try other feasible covering schemes, and finally determine the service merging scheme according to the optimal covering result, and combine the services in each L-shaped tile covering area into a new service unit.
[0088] The specific implementation of step S70 is: first, design a multi-layer perceptron neural network model, the input layer receives the stable load indicator and the fluctuating load indicator, the hidden layer uses a nonlinear activation function to process features, and the output layer predicts the system complexity score, then collect historical running data as training samples, each sample contains system load indicators and corresponding complexity scores, then use the back propagation algorithm to train the neural network, and use batch gradient descent to optimize the loss function during training, and the learning rate is set to 0.01, finally verify and test the trained model to ensure its good generalization ability.
[0089] The specific implementation of step S80 is: first, input the optimized service combination scheme to calculate the dependency value between each service, considering the influence of data consistency, interface dependency and business cohesion in three dimensions, then input the calculated service dependency value into the trained service evaluation neural network model, the model will predict the system complexity score according to the load characteristics of the current system, then compare the predicted complexity score with the preset threshold, the complexity score threshold reference value is 0.75, finally decide whether to further optimize the service combination scheme according to the comparison result.
[0090] The specific implementation of step S90 is: first, determining the coding scheme of the genetic algorithm, using integer coding to represent different service combination possibilities, setting the population size to 100, then defining the fitness function, taking the system complexity score as the main evaluation index, and considering performance indicators such as service response time and resource utilization, then performing selection, crossover and mutation operations of the genetic algorithm, using the roulette strategy for selection, setting the crossover probability to 0.8, and setting the mutation probability to 0.1, finally stopping iteration when the population evolution reaches the termination condition or the score reaches the threshold, and outputting the optimal microservice granularity scheme, which needs to specify the function boundary, interface definition and data model of each microservice.
[0091] The second aspect of the present application provides a computer readable storage medium, wherein the computer readable storage medium stores program instructions, and the program instructions are used to execute the productivity middle platform microservice granularity determination method when running in a computer.
[0092] The third aspect of the present application provides a productivity middle platform microservice granularity determination system, which comprises the computer readable storage medium described above, the system is any one of a computer, a server and a single chip microcomputer, the computer readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing the program instructions stored in the computer readable storage medium.
[0093] Specifically, the principle of the present application is: the technical principle of the present application is based on the basic theory of system science and artificial intelligence. From the perspective of system science, the microservice system can be regarded as a complex network system, in which there are multi-dimensional dependency relationships between services. The present application converts this complex dependency relationship into a quantifiable mathematical model by constructing a service dependency evaluation equation set. The data consistency evaluation equation, the interface call evaluation equation and the business cohesion evaluation equation in the evaluation equation set respectively depict the coupling relationship between services from different dimensions, and the service dependency comprehensive evaluation equation realizes the capture of the system evolution characteristics by introducing a dynamic evaluation item in the time dimension.
[0094] At the level of optimization algorithm, the present application uses an L-shaped domino covering algorithm to solve the service merging problem. The basis for selecting this algorithm is that the special structure of the L-shaped domino naturally conforms to the common combination modes of master-slave services, aggregation services and the like in the microservice system, and the solution process of the L-shaped domino covering problem has good parallelism. By mapping the service dependency relationship to a three-dimensional chessboard space and introducing multi-dimensional threshold constraints, the service merging process can both guarantee local optimization and meet global constraints.
[0095] In the field of artificial intelligence application, the present application utilizes a neural network model to predict system complexity and adopts a genetic algorithm for service granularity optimization. The neural network model can accurately predict system complexity under different service combination schemes by learning the complex nonlinear relationship in historical operation data. The genetic algorithm simulates the biological evolution process to find the optimal service granularity configuration under various constraint conditions. This data-driven optimization method enables the system to adapt to changing business demands and operating environments.
[0096] A specific embodiment 1 of the present application is provided below, and the specific implementation of each step in embodiment 1 is described in detail as follows.
[0097] The specific implementation of step S10 is to collect performance indicator data in the running process of the productivity platform using an application performance monitoring system. The service call frequency parameter is counted by a service call counter in real time, with a sliding time window of 10 minutes, sliding every 1 minute. The data access volume parameter is collected by a database monitoring component, including the number and frequency of add, delete, modify, and query operations, and the data table and record number involved in each operation type are counted and recorded separately. The business processing duration parameter is recorded by a link tracking system, including the execution time of the complete business process and the processing time of each node, with a distributed tracking identifier to associate different service calls of the same business process. The system resource occupancy parameter is collected by a resource monitoring probe, including CPU usage, memory occupancy, disk IO, and other system-level performance indicators, with a sampling frequency of every 5 seconds. The interface response time parameter is counted by an interface performance monitoring component, including the response delay and timeout of each service interface, and the minimum, maximum, average, and 95th percentile response times are recorded. The data consistency parameter is verified by a data consistency checking tool, including the execution result of distributed transactions and the data synchronization state, with an interval of 1 minute. The collected performance indicators need to be preprocessed, including outlier detection and processing, missing value filling, and data standardization.
[0098] The specific implementation of step S20 is: data preprocessing is performed on the collected productivity platform runtime parameters, wherein the abnormal value processing adopts a box plot method, data exceeding 1.5 times the interquartile range of the upper and lower quartile intervals is marked as an abnormal value, and the median is used for replacement; the missing value filling adopts a time series interpolation method, linear interpolation is used for short-term missing, and historical same period data is used for filling long-term missing; the data standardization adopts a minimum maximum normalization method, various parameters are converted into the [0, 1] interval, then principal component analysis is used for dimension reduction analysis on the preprocessed parameters, a principal component cumulative contribution rate threshold is set to 85%, principal components meeting the cumulative contribution rate requirement are extracted as main load feature dimensions, then fast Fourier transform is used for frequency domain analysis on the parameters in each dimension, time domain signals are converted into frequency domain signals, the signals are divided into low frequency signals and high frequency signals according to the frequency, a frequency threshold is set to 0.1 hertz, signals lower than the threshold are stable load indicators, and signals higher than the threshold are fluctuation load indicators, for the stable load indicators, statistical features such as mean and standard deviation are extracted, and for the fluctuation load indicators, dynamic features such as peak factor and waveform rate are extracted.
[0099] The specific implementation of step S30 is: a business domain interaction matrix is constructed, wherein the matrix element M ij represents the interaction intensity between the business domains i and j, the calculation formula is M ij = α ij P ij + β ij D ij + γ ij P ij , F ij is the function call frequency, which is obtained by accumulating the service call times in a unit time, D ij is the data interaction amount, which is calculated by counting the number and access frequency of shared data items, P ij is the process correlation degree, which is determined by analyzing the connection relationship between nodes in the business process diagram, and the weight coefficients α ij , β ij , and γ ij are configured according to the actual business importance, and satisfy α ij + β ij + γ ij = 1; then singular value decomposition algorithm is used to decompose the business domain interaction matrix, to obtain M = U∑V T , wherein U and V are orthogonal matrices, and ∑ is a diagonal matrix, and the elements on the diagonal are singular values; then the business correlation eigenvector is calculated, and for the kth business domain, the calculation formula of the correlation eigenvector R k is wherein σ i is the ith singular value, u ik and v ikrespectively, n is the number of singular values; finally, based on the service correlation feature vector, a hierarchical clustering algorithm is used to group the service domains, the similarity measure function used is sim(i, j) = cos(R i , R j ), the similarity between service domains is measured by calculating the cosine similarity of the feature vector, the clustering process uses the average linkage method, and service domains with a similarity higher than the threshold value (reference value is 0.8) are merged into the same microservice to form an initial microservice division scheme.
[0100] The specific implementation of step S40 is to construct a data consistency evaluation equation, and the expression of the equation is where C d is a data consistency coefficient, f u is a data update frequency value, which is obtained by monitoring the frequency of data change operations, f max is a maximum update frequency reference value, which is determined according to historical system operation data, t d is a consistency time delay requirement value, which represents the maximum allowed delay time for data synchronization, t max is a maximum allowed time delay value, r d is a data correlation degree value, which is calculated by analyzing the reference relationship between data entities, r max is a maximum correlation degree reference value, ω1, ω2, ω3 are weight coefficients, satisfying ω1+ω2+ω3=1, α, β, γ are adjustment exponents, taking values in the range of [0.5, 2], and ε d is an error term, taking values in the range of [-0.1, 0.1]; then an interface call evaluation equation is constructed, and the expression of the equation is where C i is an interface dependency coefficient, f ij is the frequency of service i calling service j, t ij is the response time of service i calling service j, d p is a call link depth value, representing the maximum level number in the service call chain, f max , t max , d max are the corresponding maximum reference values, θ1, θ2, θ3 are weight coefficients, satisfying θ1+θ2+θ3=1, λ, μ, v are adjustment exponents, taking values in the range of [0.5, 2], and ε i is an error term, taking values in the range of [-0.1, 0.1], and m is the number of related services; then a business cohesion evaluation equation is constructed, and the expression of the equation is where C b is a business cohesion coefficient, r mis the function module correlation value, calculated by analyzing the calling and data sharing relationship between function modules, c p is the process coupling value, reflecting the dependence degree of each step in the business process, r e is the data entity correlation value, indicating the correlation strength between data entities, r max , c max is the corresponding maximum reference value, φ1, φ2, φ3 are weight coefficients, satisfying φ1+φ2+φ3=1, ξ, η, ζ are adjustment indexes, taking values in the range of [0.5, 2], ε b is the error term, taking values in the range of [-0.1, 0.1]; finally, the service dependency comprehensive evaluation equation is constructed, and the expression of the equation is where D is the service dependency value, C d , C i , C b are the data consistency coefficient, interface dependency coefficient and business cohesion coefficient respectively, ψ1, ψ2, ψ3, ψ4, ψ5, ψ6 are weight coefficients, satisfying ψ1+ψ2+ψ3+ψ4+ψ5+ψ6=1, ρ, σ, τ are adjustment indexes, taking values in the range of [0.5, 2], ε s is the error term, taking values in the range of [-0.1, 0.1], t0 is the evaluation start time, t1 is the evaluation end time, respectively represent the partial derivative of data consistency coefficient, interface dependency coefficient and business cohesion coefficient with respect to time, used to represent the dynamic change rate of these parameters.
[0101] The specific implementation of step S50 is: using the service dependency evaluation equation set to evaluate the dependency relationship of each pair of services in the initial microservice division scheme, calculating the corresponding evaluation coefficients through the aforementioned data consistency evaluation equation, interface calling evaluation equation and business cohesion evaluation equation, and then constructing a dependency complexity coefficient matrix, the matrix element K ij is calculated by the formula where D ij is the service dependency value, calculated by the service dependency comprehensive evaluation equation, N ij is the number of direct calls between services, L ij is the length of the longest call link between services, δ1, δ2, δ3 are weight coefficients, satisfying δ1+δ2+δ3=1, κ, χ, ω are adjustment indexes, taking values in the range of [0.5, 2]; based on the dependency complexity coefficient matrix, a service merging optimization model is constructed, and the objective function of the model is to minimize the overall complexity of the system, and the mathematical expression is where x ij is the decision variable, representing whether services i and j are merged, the constraint conditions include service size constraint (Smax maximal size limit for individual services), resource constraints (r ij R max P ij x ij ≤P max (p ij P max performance requirement threshold); finally, an ant colony optimization algorithm is used to solve the optimization model, with a population size of 100, a maximum number of iterations of 1000, a pheromone evaporation coefficient of 0.1, and a local update probability of 0.1.
[0102] The specific implementation of step S60 is to convert the dependency complexity coefficient matrix into a three-dimensional service dependency relationship chessboard, with a size of n x n x 3, where n is the number of services, and 3 represents the data dependency dimension, interface call dimension, and business process dimension. The value of each position (i, j, k) is determined by the corresponding coefficient in the dependency complexity coefficient matrix. An L-shaped tile covering algorithm is implemented on the three-dimensional chessboard, with each L-shaped tile consisting of 3 cells located in three different dimensions. The covering of the L-shaped tile needs to satisfy the constraint conditions: the sum of the data dependency dimension does not exceed the first threshold value (the reference value is 0.8), the sum of the interface call dimension does not exceed the second threshold value (the reference value is 0.7), and the sum of the business process dimension does not exceed the third threshold value (the reference value is 0.6). The chessboard is divided into 2 k ×2 j ×3 sub-regions using the divide-and-conquer method, and k is a positive integer. The covering problem is solved independently for each sub-region. The backtracking method is used to handle constraint violations. When a covering scheme is found to violate the constraints, the covering is reversed and other feasible schemes are tried. Pruning strategies are used to improve search efficiency during the backtracking process. The pruning conditions include: dimension sum exceeding threshold value, insufficient number of covered cells, remaining uncovered areas unable to form an effective L-shaped tile, etc. The optimal covering result is used to determine the service merging scheme. The services in each L-shaped tile covering area are combined into a new service unit. Compatibility of service interfaces, consistency of data models, and integrity of business logic need to be handled during merging.
[0103] The specific implementation of step S70 is to design a multi-layer perceptron neural network model. The network structure includes an input layer, multiple hidden layers, and an output layer. The number of neurons in the input layer is equal to the total dimension number of the stable load indicator and the fluctuating load indicator. The hidden layers use a three-layer structure, with the number of neurons in each layer being 2 times, 1.5 times, and 1 times the input dimension, respectively. The output layer is a single neuron used to predict the system complexity score. The activation function is selected as follows: the hidden layer uses the ReLU function, with the expression f(x) = max(0, x); the output layer uses the Sigmoid function, with the expression The historical running data is collected as a training sample, the sample features include stable load indicators (such as average response time, average resource utilization, etc.) and fluctuating load indicators (such as response time standard deviation, resource utilization fluctuation rate, etc.), and the sample label is a system complexity score manually labeled, the score range is [0, 1]; the neural network is trained using a back propagation algorithm, the loss function uses mean square error, the expression is Where y i is the true score, is the predicted score, m is the number of samples, and the optimization algorithm uses a batch gradient descent method with a momentum term, and the parameter update formula is Where w t is the parameter value of the t-th iteration, η is the learning rate (initial value is 0.01), β is the momentum coefficient (set to 0.9), and a small batch training method with a batch size of 32 is used; the early stopping strategy is used in the training process to prevent overfitting, the validation set ratio is 20%, and the training is stopped if the validation set loss does not improve for 5 consecutive epochs, and the L2 regularization technique is used, and the regularization coefficient is set to 0.001; the performance of the trained model is evaluated, the test set (10% of the total data) is used to calculate the mean square error, the mean absolute error and the correlation coefficient, and the model performance acceptance criteria are set as: the mean square error is less than 0.1, the mean absolute error is less than 0.2, and the correlation coefficient is greater than 0.8.
[0104] The specific implementation of step S80 is: applying the service dependency comprehensive evaluation equation to the optimized service combination scheme, calculating the dependency value between each pair of services, and the calculation process needs to consider three dimensions of data consistency, interface dependency and business cohesion, and the mathematical expression is Where subscript ij represents the relationship between services i and j; the service dependency value matrix calculated is converted into the input format of the neural network model, for n services, the dimension of the input vector is n(n-1) / 2, representing the dependency relationship between all service pairs; the trained service evaluation neural network model is used for prediction to obtain the system complexity score, and the closer the score value is to 0, the lower the system complexity, and the closer the score value is to 1, the higher the system complexity; the predicted complexity score is compared with the preset threshold (the reference value is 0.75), if the score exceeds the threshold, it means that the complexity of the current service combination scheme is too high and needs to be further optimized.
[0105] The specific implementation of step S90 is: using a genetic algorithm with real number coding to optimize the service combination scheme, and the chromosome coding uses an n x n matrix form, where n is the number of services, and the matrix element x ijS is the system complexity score, P is the performance index score (including response time, throughput, etc.), R is the resource utilization score, w1, w2, w3 are weight coefficients, and w1+w2+w3=1; the population size is set to 100, and the elite preservation strategy is adopted, retaining the top 5 individuals in each generation; the selection operation adopts the roulette strategy, and the selection probability is proportional to the fitness value; the crossover operation adopts single-point crossover, the crossover probability is set to 0.8, the crossover position is randomly selected, the mutation operation adopts uniform mutation, and the mutation probability is set to 0.1; the iteration termination condition is that the maximum iteration number (set to 1000) is reached or the optimal fitness value improvement amplitude is less than 0.001 for 50 consecutive generations; and the final output microservice granularity scheme needs to include the following contents: the functional range definition of each microservice, the interface contract between services, the data model design, the deployment topology structure, and the resource configuration suggestion.
[0106] In order to better understand and implement the present application, the following provides an embodiment 2 of a specific application scenario of the present application: when a technical team is developing a new generation of e-commerce platform, the method of the present application is used to optimize the microservice granularity of the productivity platform. The e-commerce platform includes core business modules such as user management, commodity management, order management, payment management, logistics management, and marketing management, and in the initial stage, the traditional domain-driven design method is used for microservice splitting, and a total of 20 microservices are divided. After the system is put into operation for a period of time, the technical team finds that the system response time gradually increases, the calling relationship between services is complex, the data consistency maintenance cost is high, and the microservice granularity needs to be optimized.
[0107] Firstly, the technical team collects system running data for 30 days through an application performance monitoring system, and the running time parameters and their statistical characteristics are shown in Table 1:
[0108] Table 1: System running time parameter statistical characteristic table
[0109] Parameter Type Average Value Standard Deviation Minimum Value Maximum Value Unit Service Call Frequency 1250.6 386.4 125 3568 Times / minute Data Access Volume 856.3 245.8 98 2456 Pieces / minute Business Processing Duration 235.6 68.5 89 786 Milliseconds CPU Usage Rate 45.8 15.6 12 85 Percentage Memory Usage Rate 62.4 18.9 25 92 Percentage Interface Response Time 168.5 58.4 45 658 Milliseconds Data Synchronization Delay 256.8 86.3 85 895 Milliseconds
[0110] Figure 2 The change trend of the main parameters of the system running for 30 days is shown, including the time sequence change of service calling frequency, data access volume and business processing time, which directly reflects the fluctuation characteristics of the system load. The collected running time parameters are decomposed in multiple dimensions, and the signal is decomposed into stable load component and fluctuating load component through Fourier transform, and the decomposition results are shown in Table 2:
[0111] Table 2: Load index decomposition result table
[0112] Indicator Type Stable Load Value Fluctuating Load Value Fluctuation Rate Service Call 986.5 264.1 26.8% Data Access 725.8 130.5 18.0% Business Processing 198.4 37.2 18.7% System Resource 52.6 10.2 19.4% Interface Response 142.3 26.2 18.4% Data Synchronization 215.6 41.2 19.1%
[0113] Figure 3 The stability and fluctuation load decomposition results of each index are shown by bar chart, which reflects the proportion of different types of load. Then the business domain interaction matrix is constructed, and the weight configuration of the matrix elements is as follows: function call weight α ij = 0.4, data interaction weight β ij = 0.35, process correlation weight γ ij = 0.25. Singular value decomposition is performed on the matrix to extract the main eigenvectors, and the preliminary service correlation analysis results are shown in Table 3:
[0114] Table 3 Service Correlation Analysis Results
[0115] Service Pair Functional Correlation Degree Data Correlation Degree Process Correlation Degree Comprehensive Correlation Degree User-Order 0.856 0.768 0.685 0.782 Order-Payment 0.912 0.845 0.756 0.847 Commodity-Order 0.785 0.698 0.625 0.715 Order-Logistics 0.668 0.589 0.534 0.605 User-Commodity 0.456 0.389 0.342 0.402
[0116] Figure 4 The dependence relationship between core microservices is shown by heat map, and the color depth represents the strength of dependence. Based on the service correlation analysis results, the service dependence evaluation equation set is constructed for quantitative evaluation. The weight coefficient configuration in the data consistency evaluation equation is: ω1=0.35, ω2=0.35, ω3=0.3; The adjustment index configuration is: α=1.2, β=1.5, γ=1.3. The evaluation results are shown in Table 4:
[0117] Table 4 Service Dependence Evaluation Results
[0118] Evaluation Dimension Evaluation Coefficient Dynamic Change Rate Comprehensive Score Data Consistency 0.685 0.125 0.723 Interface Dependency 0.745 0.156 0.789 Business Cohesion 0.658 0.098 0.682
[0119] The evaluation results are converted into a dependence complexity coefficient matrix, and the L-type domino covering algorithm is used for service merging optimization. The constraint threshold of the algorithm is set as: data dependence dimension threshold 0.8, interface call dimension threshold 0.7, business process dimension threshold 0.6. The optimized service combination scheme is shown in Table 5:
[0120] Table 5 Service Combination Optimization Scheme
[0121] Combination Number Merged Service Complexity Coefficient Resource Consumption Expected Performance G1 User-Order-Payment 0.456 68.5% 185ms G2 Commodity-Inventory 0.385 45.6% 156ms G3 Logistics-Warehouse 0.312 38.9% 142ms G4 Marketing-Promotion 0.268 35.4% 128ms
[0122] The neural network model is used to evaluate the optimization scheme, and the network structure is: 15 neurons in the input layer, three hidden layers with 30, 20, and 10 neurons respectively, and one neuron in the output layer. The model training uses 80% of the historical data as the training set and 20% as the validation set, and the training results are shown in Table 6:
[0123] Table 6 Neural Network Model Evaluation Results
[0124] Evaluation Indicator Training Set Validation Set Test Set Mean Squared Error 0.058 0.065 0.072 Mean Absolute Error 0.156 0.168 0.175 Correlation Coefficient 0.925 0.912 0.908
[0125] Finally, the genetic algorithm is used for scheme optimization, the population size is set to 100, the maximum iteration number is 1000, the crossover probability is 0.8, and the mutation probability is 0.1. The optimization process converges after 685 iterations, and the final microservice granularity scheme optimizes and integrates the original 20 microservices into 12, and the overall system performance is significantly improved. Figure 5 The comparison shows the changes of various performance indicators before and after service optimization, and directly reflects the optimization effect.
[0126] When the traditional domain-driven design method is used for microservice division, it mainly relies on the experience of domain experts for static analysis, lacks consideration of system runtime characteristics, and is easy to lead to unreasonable service granularity division. The application introduces a multi-dimensional service dependency evaluation system, and realizes dynamic optimization of microservice granularity by combining artificial intelligence algorithms, which has the following advantages compared with traditional methods: first, the evaluation equation set considers multiple dimensions of dependency relationships such as data consistency, interface dependency and business cohesion, making the evaluation results more comprehensive and objective; second, the L-shaped domino covering algorithm considers multi-dimensional constraints when merging services, ensuring the rationality of the optimization results; finally, through the neural network model and genetic algorithm, the adaptive adjustment of service granularity is realized, so that the system can dynamically optimize the service boundary according to the actual running state.
[0127] It should be noted that the variables involved in the application are explained in detail as shown in Table 7 and Table 8.
[0128] Table 7 Variable Explanation Table (First Part)
[0129]
[0130] Table 8 Variable Explanation Table (Second Part)
[0131]
[0132]
[0133] The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto, and any skilled person in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application.
Claims
1. A method for determining productivity platform micro-service granularity, characterized in that, The method comprises the following steps: S10, collecting productivity platform runtime parameters, wherein the productivity platform runtime parameters comprise service call frequency parameters, data access volume parameters, business processing time length parameters, system resource occupancy rate parameters, interface response time parameters, and data consistency parameters; S20, performing multi-dimensional decomposition on the productivity platform runtime parameters to obtain stable load indicators and fluctuating load indicators, wherein the stable load indicators represent system normal operation characteristics, and the fluctuating load indicators represent system peak operation characteristics; S30, constructing a business domain interaction matrix, performing singular value decomposition on the business domain interaction matrix to obtain a business correlation feature vector, and generating an initial microservice division scheme based on the business correlation feature vector; S40, establishing a service dependency evaluation equation set, wherein the service dependency evaluation equation set comprises a data consistency evaluation equation, an interface call evaluation equation, a business cohesion evaluation equation, and a service dependency comprehensive evaluation equation; S50, calculating a dependency complexity coefficient matrix of the initial microservice division scheme by using the service dependency evaluation equation set, and constructing a service merging optimization model based on the dependency complexity coefficient matrix; S60, first converting the dependency complexity coefficient matrix into a three-dimensional service dependency relationship chessboard, wherein the three dimensions of the chessboard correspond to data dependency, interface call, and business process respectively, the value range of each dimension is determined according to the actual system scale, then an L-shaped tile covering algorithm is implemented on the three-dimensional chessboard, each L-shaped tile represents a possible service merging scheme, the covering process needs to meet the threshold constraints of the three dimensions, that is, the sum of the data dependency dimensions in the covering area of the L-shaped tile does not exceed a first threshold value, the sum of the interface call dimensions does not exceed a second threshold value, and the sum of the business process dimensions does not exceed a third threshold value, then a strategy combining divide-and-conquer method and backtracking method is adopted to perform chessboard covering, when a certain covering scheme violates the constraint condition, backtracking is performed to try other feasible covering schemes, and finally a service merging scheme is determined according to the optimal covering result, services in each L-shaped tile covering area are combined to generate an optimized service combination scheme; S70, constructing a service evaluation neural network model, wherein the service evaluation neural network model is used to predict system complexity scores, and the service evaluation neural network model is trained by using the stable load indicators and the fluctuating load indicators; S80, inputting the output value of the service dependency comprehensive evaluation equation into the service evaluation neural network model to predict the system complexity of the optimized service combination scheme and obtain system complexity scores; S90, iteratively optimizing the optimized service combination scheme by using a genetic algorithm until the system complexity score reaches a set threshold value, determining the optimal granularity range of each microservice, and outputting a final microservice granularity scheme. 2.The productivity platform micro-service granularity determination method of claim 1, wherein, The input of the data consistency evaluation equation comprises data update frequency values, consistency time delay requirement values, and data correlation degree values, and the output is a data consistency coefficient; the input of the interface call evaluation equation comprises a call frequency matrix, a response time delay matrix, and a call link depth value, and the output is an interface dependency coefficient. 3.The productivity platform microservice granularity determination method of claim 2, wherein, The input of the service cohesion evaluation equation includes the function module correlation value, the process coupling value and the data entity correlation value, and the output is a service cohesion coefficient; the input of the service dependency comprehensive evaluation equation includes the data consistency coefficient, the interface dependency coefficient and the service cohesion coefficient, and the output is a service dependency value. 4.The productivity platform micro-service granularity determination method of claim 3, wherein, The service dependency relationship board includes a data dependency dimension, an interface calling dimension and a business process dimension, and the value of each cell in the service dependency relationship board is determined by the coefficient of the corresponding position of the dependency complexity coefficient matrix.
5. A computer readable storage medium, characterized in that, The computer readable storage medium stores program instructions, and the program instructions are used to execute the productivity platform micro-service granularity determination method in any one of claims 1-4 when running in the computer. 6.A productivity platform microservice granularity determination system, characterized in that, The system is any one of a computer, a server and a single chip microcomputer, the computer readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing the program instructions stored in the computer readable storage medium.
Citation Information
Patent Citations
Dynamic carpooling scheduling method for unmanned electric taxis
CN119313060A
Enterprise production data micro-service granularity optimization method, medium and system
CN119356687A