Enterprise software system construction method and device based on micro service
Through detailed business requirements analysis and determination of microservice boundary information, combined with the evaluation of microservice independent index and configuration impact index, the microservice architecture and communication architecture are optimized, and the problems of excessive microservice responsibilities, overlapping functions and overcoupling are solved, and efficient and stable microservice system construction is achieved.
Patent Information
- Application Number
- CN202411626800.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the microservice division and construction process, the existing microservice-based enterprise software system construction method has caused excessive responsibilities, overlapping functions, and overcoupling of configuration adjustments to affect other microservices and communication architecture.
By obtaining enterprise demand information, business field information and sub-field information, determining microservice boundary information and software system structure information, building an initial software system, and evaluating and optimizing the microservice architecture through the microservice independent index and configuration impact index, adjusting communication architecture information, and building a microservice supervision module for monitoring.
It realizes clear division of microservice architecture, reduces coupling between microservices, improves system independence and communication efficiency, and ensures the optimization of system design and performance stability.
Smart Images

Figure CN119597363A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of enterprise software system construction, and in particular to a method and device for constructing an enterprise software system based on microservices. Background Art
[0002] The microservices-based enterprise software system construction method is designed to address the shortcomings of traditional monolithic architecture in terms of scalability, flexibility, and high availability. The microservices architecture splits large applications into multiple independent service units, each of which is responsible for a specific function and has the ability to develop, deploy, and expand independently. This architecture can improve the maintainability and fault tolerance of the system, support rapid iteration and continuous delivery, and provide flexible solutions for different business needs. As the scale of enterprises expands and the business becomes more complex, the microservices-based architecture has become a key method to improve the responsiveness of enterprise IT systems and business agility, promoting enterprise digital transformation and business innovation.
[0003] In the existing microservice-based enterprise software system construction method and device, during the process of microservice division and construction, due to unclear business boundary division, some microservices bear too many responsibilities or the responsibilities and functions of multiple services overlap, resulting in over-coupling. At the same time, when the configuration of one of the microservices is adjusted, it is easy to cause a certain impact on other microservices, thereby affecting the communication architecture between microservices and affecting the communication between microservices. Therefore, it is necessary to provide a microservice-based enterprise software system construction method and device to solve the above-mentioned problems. Summary of the invention
[0004] In order to solve the above technical problems, a method and device for building an enterprise software system based on microservices are provided. The technical solution solves the problem that the existing method and device for building an enterprise software system based on microservices proposed in the above background technology, in the process of dividing and building microservices, due to unclear business boundary division, some microservices bear too many responsibilities or the responsibilities and functions of multiple services overlap, resulting in excessive coupling. At the same time, when the configuration of one of the microservices is adjusted, it is easy to cause a certain impact on other microservices, thereby affecting the communication architecture between microservices, so that the communication between microservices is affected.
[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is:
[0006] The enterprise software system construction method based on microservices includes:
[0007] Obtain enterprise demand information and determine business area information and business sub-area information;
[0008] Obtain microservice boundary information based on enterprise demand information, business domain information, and business subdomain information, and determine software system structure information;
[0009] Build the initial software system based on microservice boundary information and software system structure information;
[0010] Divide the initial software system into microservices according to enterprise demand information and microservice boundary information to obtain an independent microservice system;
[0011] Evaluate the independent microservice system based on the microservice boundary information, obtain the microservice independence index, and obtain the microservice configuration information;
[0012] Determine the communication architecture information between independent microservice systems based on the microservice configuration information;
[0013] Based on the microservice configuration information, the independent microservice system is evaluated to obtain the microservice configuration impact index;
[0014] According to the microservice independence index and the microservice configuration impact index, the communication architecture information is adjusted to obtain the standard communication architecture information;
[0015] Based on the microservice configuration information and standard communication architecture information, a microservice supervision module is built, and the microservice supervision module is used to monitor the independent microservice system.
[0016] Preferably, the step of obtaining microservice boundary information according to enterprise demand information, business domain information, and business subdomain information, and determining software system structure information, specifically includes:
[0017] Determine enterprise target information, business pain point information and business process information based on enterprise demand information;
[0018] Identify the main business areas with enterprise goal information and business process information;
[0019] Split the main business areas, obtain different types of sub-area information, and establish a sub-area tag library;
[0020] Based on the sub-domain tag library, business pain point information and business process information, analyze different types of sub-domain information to obtain core sub-domain information;
[0021] Use the core sub-field information to clarify the business constraint information and business boundary information of the core sub-field;
[0022] Determine the candidate microservice boundary information based on the business constraint information and business boundary information of the core sub-domain;
[0023] Extract sub-domain tags from the sub-domain tag library in sequence, and match the sub-domain tags with the microservice candidate boundary information to obtain the microservice boundary information;
[0024] Based on the microservice boundary information, determine the business domain division information, database storage type information, and cross-service communication type information of each microservice;
[0025] Based on the business domain division information, database storage type information, and cross-service communication type information of each microservice, the service autonomy index of each microservice is obtained;
[0026] The service autonomy index of each microservice is used as the digital label information of the microservice, and the business domain division information, database storage type information and cross-service communication type information are used as text labels to obtain the software system structure information.
[0027] Preferably, the construction of the initial software system based on the microservice boundary information and the software system structure information specifically includes:
[0028] Based on the microservice boundary information, clarify the business domain boundary information, data storage independence information, and communication port information of each microservice;
[0029] Determine the functional module corresponding to each microservice based on the business domain boundary information, data storage independence information, and communication port information of each microservice;
[0030] According to the functional modules corresponding to each microservice, obtain the functional importance of each microservice;
[0031] Microservices are sorted based on the service autonomy index and function importance of each microservice to obtain a microservice system construction sequence table;
[0032] Use the microservice system to build a sequence table and software system structure information, and determine the software system style information;
[0033] Gradually build the initial software system based on the microservice system construction sequence table, software system structure information and software system style information;
[0034] The calculation formula of the service autonomy index is:
[0035]
[0036] In the formula, Autonomy i is the service autonomy index of the i-th microservice, Auto i Score the autonomy of the i-th microservice, Scale_O i Score the horizontal expansion of the i-th microservice, Fung_N iScore the substitutability of the i-th microservice, Dep_N i is the number of dependencies of the i-th microservice, Max_N i is the maximum number of dependencies of the i-th microservice, External i Score the external intervention of the i-th microservice, Adaptive i Adaptive scoring for the i-th microservice;
[0037] The calculation formula for the function importance is:
[0038]
[0039] In the formula, Functional i is the functional importance of the i-th microservice, Y m is the score of the mth key indicator of the i-th microservice, α m is the weight coefficient of the score of the mth key indicator, and n is the total number of key indicators.
[0040] Preferably, the microservice division of the initial software system according to the enterprise demand information and the microservice boundary information to obtain an independent microservice system specifically includes:
[0041] Determine the functional modules corresponding to each microservice based on enterprise demand information and microservice boundary information;
[0042] Based on the functional modules and microservice boundary information corresponding to each microservice, the corresponding functional modules are separated from the initial software system, and the initial microservice system is built;
[0043] Based on the business domain division information and database storage type information of each microservice, the shared state of the initial microservice system is removed;
[0044] Based on the cross-service communication type information, define the communication protocol for the initial microservice system after the shared state is removed;
[0045] Through the initial software system and microservice boundary information, migrate the functional modules corresponding to each microservice to the initial microservice system;
[0046] Deploy and operate the initial microservice system to obtain an independent microservice system.
[0047] Preferably, the independent microservice system is evaluated based on the microservice boundary information to obtain a microservice independence index and acquire microservice configuration information, specifically including:
[0048] Get the server location information of independent microservice systems;
[0049] Based on the server location information, a virtual space coordinate system is constructed with the server location of one of the independent microservice systems as the origin;
[0050] Based on the virtual space coordinate system, simulate the communication between each independent microservice system to obtain communication delay information, network bandwidth information, network traffic information, and service topology path information;
[0051] Obtain the virtual distance between each independent microservice system based on communication delay information, network bandwidth information, network traffic information, and service topology path information;
[0052] Based on the virtual distance between each independent microservice system and the service autonomy index corresponding to each independent microservice system, the degree of dependency between each independent microservice system is obtained;
[0053] Based on the degree of dependency between each independent microservice system, a dependency graph is constructed in the virtual space coordinate system;
[0054] According to the dependency graph and the functional modules corresponding to each microservice, the functional overlap and call complexity between each independent microservice system are obtained;
[0055] Obtain the microservice independence index of each independent microservice system through the virtual distance, dependency, functional overlap, and call complexity between each independent microservice system;
[0056] The relevant calculation formula of the microservice independence index is:
[0057]
[0058] Where D virtual (i, j) is the virtual distance between the i-th independent microservice system and the j-th independent microservice system, D delav (i, j) is the communication delay between the i-th independent microservice system and the j-th independent microservice system, D traffic (i, j) is the available network bandwidth between the i-th independent microservice system and the j-th independent microservice system, D topology (i, j) is the network data traffic between the i-th independent microservice system and the j-th independent microservice system, D bandwidth (i, j) is the quantified value of the network path complexity and hop count between the i-th independent microservice system and the j-th independent microservice system. ɑ, γ, δ and β are all weight coefficients. Di j is the degree of dependency between the i-th independent microservice system and the j-th independent microservice system, Autonomy i Autonomy is the service autonomy index corresponding to the i-th independent microservice system. jis the service autonomy index corresponding to the jth independent microservice system, O ij is the functional overlap between the i-th independent microservice system and the j-th independent microservice system, F i is the function set of the i-th independent microservice system, F j is the function set of the jth independent microservice system, C ij is the call complexity between the i-th independent microservice system and the j-th independent microservice system, L(P ij ) is the length of the call chain between the i-th independent microservice system and the j-th independent microservice system, F ij The number of times the i-th independent microservice system calls the j-th independent microservice system, T ij is the quantitative value of the response time and data volume when the i-th independent microservice system calls the j-th independent microservice system each time, M i is the microservice independence index of the i-th independent microservice system, max[D virtual (i, j)] is the maximum virtual distance between the i-th independent microservice system and the j-th independent microservice system, max(C ij ) is the maximum call complexity between the i-th independent microservice system and the j-th independent microservice system, and W1, w2, w3 and w4 are all weight coefficients.
[0059] Preferably, the independent microservice system is evaluated based on the microservice configuration information to obtain the microservice configuration impact index, which specifically includes:
[0060] According to the microservice configuration information corresponding to the independent microservice system, obtain the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information and security configuration information;
[0061] Quantify the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information, and security configuration information, and build a configuration information table corresponding to an independent microservice system;
[0062] Based on the configuration information table corresponding to the independent microservice system, simulate and adjust the microservice configuration information of the i-th independent microservice system to obtain the basic impact index corresponding to the i-th independent microservice system and the associated impact index generated by the j-th independent microservice system;
[0063] According to the basic impact index corresponding to the ith independent microservice system and the associated impact index generated by the jth independent microservice system, the microservice configuration impact index of the ith independent microservice system is obtained;
[0064] The calculation formula of the microservice configuration impact index corresponding to the i-th independent microservice system is:
[0065]
[0066] In the formula, S i is the microservice configuration impact index corresponding to the i-th independent microservice system, S i is the basic impact index corresponding to the i-th independent microservice system, S j is the correlation impact index generated by the j-th independent microservice system, is the weight coefficient of the association impact index generated by the jth independent microservice system, and W is the sum of the weight coefficients.
[0067] Preferably, the communication architecture information is adjusted according to the microservice independence index and the microservice configuration impact index to obtain the standard communication architecture information, specifically including:
[0068] Based on the microservice independence index and microservice configuration impact index, set the microservice independence index threshold and microservice configuration impact index threshold;
[0069] According to the microservice independence index, the microservice configuration impact index, the microservice independence index threshold, and the microservice configuration impact index threshold, the communication architecture information of the independent microservice system is adjusted to obtain standard communication architecture information.
[0070] Furthermore, a microservice-based enterprise software system construction device is proposed, which is used to implement any of the above construction methods, including:
[0071] A microservice construction module, which is used to design, divide, build and configure an independent microservice system based on enterprise demand information and business field analysis;
[0072] A microservices supervision module, which is used to continuously monitor, manage and optimize the built and deployed independent microservices systems;
[0073] The display module is used to display the construction process and results of the microservice construction module and the supervision process and results of the microservice supervision module.
[0074] Preferably, the microservice building block includes:
[0075] The demand analysis unit, the microservice template generation unit is used to collect enterprise demand information, analyze business processes, and identify each independent functional module in the system;
[0076] A microservice partitioning unit, wherein the microservice partitioning unit is used to partition the initial software system into microservices according to enterprise demand information and microservice boundary information, so that each microservice should have independence, autonomy and maintainability;
[0077] A microservice modeling unit, which is used to model each microservice based on the microservice division result, define the interface, data model, storage solution of the microservice, and analyze the dependency relationship between microservices;
[0078] A microservice implementation unit, which is used for coding, unit testing and basic framework construction of microservices to obtain an independent microservice system;
[0079] The microservice configuration and deployment unit is used to deploy and configure microservices and define environment configuration and deployment methods.
[0080] Preferably, the microservice supervision module includes:
[0081] A detection unit, the detection unit is used to periodically detect the status of the independent microservice system;
[0082] A performance monitoring unit, which is used to collect performance indicators of independent microservice systems;
[0083] A log management unit, which is used to integrate log management tools to centrally collect and analyze log data of microservices;
[0084] A distributed tracing unit, which is used to track request flows between independent microservice systems and perform performance bottleneck analysis and fault diagnosis;
[0085] The abnormal alarm unit is used to detect abnormal behavior based on monitoring data and issue an alarm.
[0086] Compared with the prior art, the present invention has the following beneficial effects:
[0087] In the microservice-based enterprise software system construction method and device proposed in this scheme, an independent microservice system is evaluated based on microservice boundary information to obtain a microservice independence index, and microservice configuration information is obtained to evaluate the independent microservice system to obtain a microservice configuration impact index. The microservice architecture is evaluated and optimized through the microservice configuration impact index and the microservice independence index. Through quantitative evaluation and impact index, the microservice architecture can be judged and adjusted in time, the system design can be optimized, and potential performance bottlenecks and system over-dependence can be avoided;
[0088] In the microservice-based enterprise software system construction method and device proposed in this scheme, the virtual distance between each independent microservice system is obtained according to the communication delay information, network bandwidth information, network traffic information, and service topology path information. The degree of dependence between each independent microservice system and the service autonomy index corresponding to each independent microservice system are used to obtain the degree of dependence between each independent microservice system. The communication architecture is optimized through factors such as the degree of dependence between microservices, virtual distance, and network bandwidth, thereby ensuring the communication efficiency and stability of the system.
[0089] The microservice-based enterprise software system construction method and device proposed in this solution obtain microservice boundary information based on enterprise demand information, business field information and business sub-field information, and determine the software system structure information, and analyze and determine the business field, sub-field, business process and other information in detail to ensure that the microservice architecture can closely fit the actual needs and business scenarios of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] Figure 1 A flowchart of the microservice-based enterprise software system construction method proposed by the present invention;
[0091] Figure 2 A flowchart for obtaining the software system structure information in the present invention;
[0092] Figure 3 This is a flowchart for obtaining the microservice independence index in the present invention;
[0093] Figure 4 This is a system framework diagram of the microservice-based enterprise software system construction system proposed in the present invention. DETAILED DESCRIPTION
[0094] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may think of other obvious variations.
[0095] Reference Figure 1 - Figure 4 As shown in the figure, the microservice-based enterprise software system construction method includes:
[0096] Obtain enterprise demand information and determine business area information and business sub-area information;
[0097] Obtain microservice boundary information based on enterprise demand information, business domain information, and business subdomain information, and determine software system structure information;
[0098] Build the initial software system based on microservice boundary information and software system structure information;
[0099] Divide the initial software system into microservices according to enterprise demand information and microservice boundary information to obtain an independent microservice system;
[0100] Evaluate the independent microservice system based on the microservice boundary information, obtain the microservice independence index, and obtain the microservice configuration information;
[0101] Determine the communication architecture information between independent microservice systems based on the microservice configuration information;
[0102] Based on the microservice configuration information, the independent microservice system is evaluated to obtain the microservice configuration impact index;
[0103] According to the microservice independence index and the microservice configuration impact index, the communication architecture information is adjusted to obtain the standard communication architecture information;
[0104] Based on the microservice configuration information and standard communication architecture information, a microservice supervision module is built, and the microservice supervision module is used to monitor the independent microservice system.
[0105] Specifically, business domain information refers to the main areas involved in the company's business, such as sales, logistics, finance, etc. Business sub-domain information refers to the specific subdivisions under a certain business domain, such as order management and inventory management in sales. Microservice boundary information refers to the boundaries of the system broken down into microservices, defining the responsibilities and scope of each microservice. Software system structure information is a system architecture diagram designed based on the microservice boundary information, including the relationship between microservices, call chains, etc. An independent microservice system is an independent system that ensures that each microservice is relatively independent through division, and minimizes dependencies on other microservices.
[0106] It can be understood that the microservice independence index is an indicator to measure the degree of coupling between a microservice and other microservices. The higher the independence index, the stronger the independence of the microservice. Microservice configuration information refers to the configuration details of each microservice, including the service configuration items, dependencies, database information, etc.
[0107] Furthermore, the microservice boundary information is obtained based on the enterprise demand information, business domain information, and business subdomain information, and the software system structure information is determined, including:
[0108] Determine enterprise target information, business pain point information and business process information based on enterprise demand information;
[0109] Identify the main business areas with enterprise goal information and business process information;
[0110] Split the main business areas, obtain different types of sub-area information, and establish a sub-area tag library;
[0111] Based on the sub-domain tag library, business pain point information and business process information, analyze different types of sub-domain information to obtain core sub-domain information;
[0112] Use the core sub-field information to clarify the business constraint information and business boundary information of the core sub-field;
[0113] Determine the candidate microservice boundary information based on the business constraint information and business boundary information of the core sub-domain;
[0114] Extract sub-domain tags from the sub-domain tag library in sequence, and match the sub-domain tags with the microservice candidate boundary information to obtain the microservice boundary information;
[0115] Based on the microservice boundary information, determine the business domain division information, database storage type information, and cross-service communication type information of each microservice;
[0116] Based on the business domain division information, database storage type information, and cross-service communication type information of each microservice, the service autonomy index of each microservice is obtained;
[0117] The service autonomy index of each microservice is used as the digital label information of the microservice, and the business domain division information, database storage type information and cross-service communication type information are used as text labels to obtain the software system structure information.
[0118] Specifically, enterprise goal information is used to clarify the enterprise's long-term strategic goals and short-term business goals. Business pain point information refers to the difficulties, challenges or bottlenecks encountered by the enterprise in its existing business. Business process information is to analyze the various business processes within the enterprise to ensure that the complete process from start to finish is understood, including the systems, personnel, time, resources, etc. involved. Analyze different types of sub-domain information to obtain core sub-domain information, and divide it into smaller sub-domains according to the complexity and needs of the business domain. For example, in the financial field, it may be divided into accounting processing, tax compliance, payment settlement, etc. The sub-domain tag library is used to set tags for each sub-domain to help identify and distinguish different fields, analyze the pain points of each sub-domain, and evaluate their impact on business goals.
[0119] It is understandable that business constraint information is used to describe specific constraints for each core sub-domain, such as compliance requirements, resource limitations, technical difficulties and other business boundary information, and to clarify the boundaries of core sub-domains, for example, which functions belong to this domain and which functions are part of external systems or services. Microservice candidate boundaries refer to business units or modules that may be independent microservices. Candidate boundaries need to meet certain business constraints and boundary divisions to ensure that each microservice can evolve and interact independently. Business domain division information is the specific business scope of each microservice, determining the domain it is responsible for, and database storage type information is whether the microservice uses its own database independently or shares a database. Database storage type information can also enable microservices to use independent storage database types to ensure the autonomy of the service. Cross-service communication type information: Determine how microservices communicate with each other, whether synchronous or asynchronous (such as message queues). The service autonomy index is used to measure the degree of autonomy of microservices. Microservices with strong autonomy can run, scale and maintain independently. High autonomy means independent databases, clear service boundaries and fewer cross-service dependencies.
[0120] Furthermore, the initial software system is constructed based on the microservice boundary information and software system structure information, including:
[0121] Based on the microservice boundary information, clarify the business domain boundary information, data storage independence information, and communication port information of each microservice;
[0122] Determine the functional module corresponding to each microservice based on the business domain boundary information, data storage independence information, and communication port information of each microservice;
[0123] According to the functional modules corresponding to each microservice, obtain the functional importance of each microservice;
[0124] Microservices are sorted based on the service autonomy index and function importance of each microservice to obtain a microservice system construction sequence table;
[0125] Use the microservice system to build a sequence table and software system structure information, and determine the software system style information;
[0126] Gradually build the initial software system based on the microservice system construction sequence table, software system structure information and software system style information;
[0127] The calculation formula of the service autonomy index is:
[0128]
[0129] In the formula, Autonomy i is the service autonomy index of the i-th microservice, Auto iScore the autonomy of the i-th microservice, Scale_O i Score the horizontal expansion of the i-th microservice, Fung-N i Score the substitutability of the i-th microservice, Dep_N i is the number of dependencies of the i-th microservice, Max_N i is the maximum number of dependencies of the i-th microservice, External i Score the external intervention of the i-th microservice, Adaptive i Adaptive scoring for the i-th microservice;
[0130] The calculation formula for function importance is:
[0131]
[0132] In the formula, Functional i is the functional importance of the i-th microservice, Y m is the score of the mth key indicator of the i-th microservice, ɑ m is the weight coefficient of the score of the mth key indicator, and n is the total number of key indicators.
[0133] Specifically, software system style: Based on the microservice construction sequence and architecture design, choose the appropriate software system style. Common microservice architecture styles include RESTful style: Based on the HTTP protocol, communication is carried out through RESTful API, which is suitable for lightweight and standardized systems. Event-driven style: Communication between services is carried out in an event-driven manner, which is suitable for high-concurrency and highly decoupled systems.
[0134] Furthermore, the initial software system is divided into microservices according to the enterprise demand information and microservice boundary information to obtain an independent microservice system, which specifically includes:
[0135] Determine the functional modules corresponding to each microservice based on enterprise demand information and microservice boundary information;
[0136] Based on the functional modules and microservice boundary information corresponding to each microservice, the corresponding functional modules are separated from the initial software system, and the initial microservice system is built;
[0137] Based on the business domain division information and database storage type information of each microservice, the shared state of the initial microservice system is removed;
[0138] Based on the cross-service communication type information, define the communication protocol for the initial microservice system after the shared state is removed;
[0139] Through the initial software system and microservice boundary information, migrate the functional modules corresponding to each microservice to the initial microservice system;
[0140] Deploy and operate the initial microservice system to obtain an independent microservice system.
[0141] Specifically, based on the business domain division information and database storage type information of each microservice, the shared state of the initial microservice system is removed. Because the traditional monolithic architecture has a central database for storing global shared data, when migrating to the microservice architecture, each microservice should have its own independent database to avoid coupling problems caused by the shared database. Removing the shared state means that each microservice cannot directly access the database of other microservices.
[0142] It is understandable that, based on the functional modules and microservice boundary information corresponding to each microservice, the corresponding functional modules are stripped from the initial software system, and the initial microservice system is constructed, and the functional modules corresponding to each microservice are migrated into the initial microservice system through the initial software system and microservice boundary information. According to the requirements and boundary information, the core functions of the system are disassembled into multiple functional modules, and each functional module is assigned to an independent microservice. For example, in an e-commerce system, multiple microservices such as order management, user management, and payment services may be split out, and each microservice is responsible for an independent business area. According to the functional module division of each microservice, the business functions in the original system are gradually migrated to the new microservice. This process requires the gradual replacement of each functional module of the monolithic system to ensure that each microservice can work independently and seamlessly connect. A gradual replacement method is adopted to ensure a smooth transition of the system during the migration process.
[0143] Furthermore, the independent microservice system is evaluated based on the microservice boundary information to obtain the microservice independence index and obtain the microservice configuration information, including:
[0144] Get the server location information of independent microservice systems;
[0145] Based on the server location information, a virtual space coordinate system is constructed with the server location of one of the independent microservice systems as the origin;
[0146] Based on the virtual space coordinate system, simulate the communication between each independent microservice system to obtain communication delay information, network bandwidth information, network traffic information, and service topology path information;
[0147] Obtain the virtual distance between each independent microservice system based on communication delay information, network bandwidth information, network traffic information, and service topology path information;
[0148] Based on the virtual distance between each independent microservice system and the service autonomy index corresponding to each independent microservice system, the degree of dependency between each independent microservice system is obtained;
[0149] Based on the degree of dependency between each independent microservice system, a dependency graph is constructed in the virtual space coordinate system;
[0150] According to the dependency graph and the functional modules corresponding to each microservice, the functional overlap and call complexity between each independent microservice system are obtained;
[0151] Obtain the microservice independence index of each independent microservice system through the virtual distance, dependency, functional overlap, and call complexity between each independent microservice system;
[0152] Among them, the relevant calculation formula for the microservice independence index is:
[0153]
[0154] Where D virtual (i, j) is the virtual distance between the i-th independent microservice system and the j-th independent microservice system, D delay (i, j) is the communication delay between the i-th independent microservice system and the j-th independent microservice system, D traffic (i, j) is the available network bandwidth between the i-th independent microservice system and the j-th independent microservice system, D topology (i, j) is the network data traffic between the i-th independent microservice system and the j-th independent microservice system, D bandwidth (i, j) is the quantified value of the network path complexity and number of hops between the i-th independent microservice system and the j-th independent microservice system. ɑ, γ, δ and β are all weight coefficients. ij is the degree of dependency between the i-th independent microservice system and the j-th independent microservice system, Autonomy i Autonomy is the service autonomy index corresponding to the i-th independent microservice system. j is the service autonomy index corresponding to the jth independent microservice system, O ij is the functional overlap between the i-th independent microservice system and the j-th independent microservice system, F i is the function set of the i-th independent microservice system, F j is the function set of the jth independent microservice system, C ij is the call complexity between the i-th independent microservice system and the j-th independent microservice system, L(P ij ) is the length of the call chain between the i-th independent microservice system and the j-th independent microservice system, F ijThe number of times the i-th independent microservice system calls the j-th independent microservice system, T ij is the quantitative value of the response time and data volume when the i-th independent microservice system calls the j-th independent microservice system each time, M i is the microservice independence index of the i-th independent microservice system, max[D virtual (i, j)] is the maximum virtual distance between the i-th independent microservice system and the j-th independent microservice system, max(C ij ) is the maximum call complexity between the i-th independent microservice system and the j-th independent microservice system, and W1, w2, w3 and w4 are all weight coefficients.
[0155] Specifically, virtual distance and communication delay are used to measure the physical location and data transmission cost between microservices. The longer the distance and the greater the delay, the greater the possibility of affecting performance. Bandwidth refers to the maximum transmission rate of the network, and traffic refers to the amount of data actually transmitted between services. If the bandwidth is insufficient or the traffic is too large, it may lead to poor performance. A highly dependent service system means that the degree of coupling between them is large. The service autonomy index can measure the independence of services. Services with strong autonomy have lower dependencies and are therefore easier to expand and maintain. Functional overlap reflects whether the functions provided by different microservices are repeated. If the overlap is large, it may lead to redundancy and increase maintenance costs. Call complexity involves the complexity of interactions between services, which is measured by the length of the call chain and the complexity of the interaction. The maximum call complexity describes the extreme case of interaction between services. L(P ij ) is the length of the call chain between the i-th independent microservice system and the j-th independent microservice system. It refers to the number of service calls in the entire process from the initiation of a request by one microservice to the final processing and return by another microservice. This length represents how many intermediate services the request passes through, and each service may process or forward the request. The quantitative value of network path complexity and hop count refers to the routing nodes and network hop counts on the request path from one microservice system to another.
[0156] Furthermore, based on the microservice configuration information, the independent microservice system is evaluated to obtain the microservice configuration impact index, which specifically includes:
[0157] According to the microservice configuration information corresponding to the independent microservice system, obtain the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information and security configuration information;
[0158] Quantify the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information, and security configuration information, and build a configuration information table corresponding to an independent microservice system;
[0159] Based on the configuration information table corresponding to the independent microservice system, simulate and adjust the microservice configuration information of the i-th independent microservice system to obtain the basic impact index corresponding to the i-th independent microservice system and the associated impact index generated by the j-th independent microservice system;
[0160] According to the basic impact index corresponding to the ith independent microservice system and the associated impact index generated by the jth independent microservice system, the microservice configuration impact index of the ith independent microservice system is obtained;
[0161] Among them, the calculation formula of the microservice configuration impact index corresponding to the i-th independent microservice system is:
[0162]
[0163] In the formula, S i is the microservice configuration impact index corresponding to the i-th independent microservice system, S′ i is the basic impact index corresponding to the i-th independent microservice system, S″ j is the correlation impact index generated by the j-th independent microservice system, is the weight coefficient of the association impact index generated by the jth independent microservice system, and W is the sum of the weight coefficients.
[0164] Furthermore, according to the microservice independence index and the microservice configuration impact index, the communication architecture information is adjusted to obtain standard communication architecture information, which specifically includes:
[0165] Based on the microservice independence index and microservice configuration impact index, set the microservice independence index threshold and microservice configuration impact index threshold;
[0166] According to the microservice independence index, the microservice configuration impact index, the microservice independence index threshold, and the microservice configuration impact index threshold, the communication architecture information of the independent microservice system is adjusted to obtain standard communication architecture information.
[0167] Specifically, the microservice independence index threshold is used to determine whether a microservice is independent enough to reduce its dependence on other services and reduce complexity. Threshold setting: Set an appropriate microservice independence index threshold based on actual business needs, performance requirements, and the team's development capabilities. For example, if the microservice independence index is greater than 0.8, it means that the service independence is high and can be regarded as an independent microservice. If the microservice independence index is less than 0.5, it means that the service dependency is too high and may need to be redesigned and split. The microservice configuration impact index threshold is used to determine whether the configuration complexity of a microservice is too high, thereby affecting the flexibility and maintainability of the system and other microservices. Threshold setting: Set the microservice configuration impact index threshold based on the business importance of the service, change frequency, etc. For example, if the microservice configuration impact index is greater than 0.7, it means that the service configuration is too complex and may need to be reviewed or the configuration management simplified. If the microservice configuration impact index is less than 0.3, it means that the service configuration is relatively simple and suitable for large-scale rapid deployment.
[0168] It can be understood that based on the microservice independence index, microservice configuration impact index, microservice independence index threshold, and microservice configuration impact index threshold of the independent microservice system, the communication architecture of the microservice system can be adjusted in the following ways, and finally standardized communication architecture information can be obtained. Optimize service dependencies: Below the microservice independence index threshold: If a microservice has poor independence, it means that it depends on too many other services. You can reduce its dependencies by splitting the microservice or merging overly dependent services. Above the microservice independence index threshold: These services already have high independence, short communication paths, and low latency. You can consider reducing unnecessary interactions through microservice autonomous design. Simplify configuration and reduce impact: Above the microservice configuration impact index threshold: If the configuration impact of some microservices is large, it may make the system fragile or difficult to maintain. You can consider simplifying the service configuration and using a more consistent configuration management method (such as centralized configuration management). Below the microservice configuration impact index threshold: If the configuration impact is small, you can keep the existing configuration to ensure flexibility.
[0169] Furthermore, a microservice-based enterprise software system construction device is proposed, which is used to implement any of the above construction methods, including:
[0170] Microservice building module: The microservice building module is used to design, divide, build and configure independent microservice systems based on enterprise demand information and business field analysis;
[0171] Microservice supervision module: The microservice supervision module is used to continuously monitor, manage and optimize the built and deployed independent microservice systems;
[0172] Display module, the display module is used to display the construction process and results of the microservice construction module, and display the supervision process and results of the microservice supervision module.
[0173] Furthermore, microservice building blocks include:
[0174] The demand analysis unit and microservice template generation unit are used to collect enterprise demand information, analyze business processes, and identify independent functional modules in the system;
[0175] Microservice division unit: The microservice division unit is used to divide the initial software system into microservices according to enterprise demand information and microservice boundary information, so that each microservice should be independent, autonomous and maintainable;
[0176] Microservice modeling unit: The microservice modeling unit is used to model each microservice based on the microservice division results, define the microservice interface, data model, storage solution, and analyze the dependencies between microservices;
[0177] Microservice implementation unit: The microservice implementation unit is used to code, unit test and build the basic framework of microservices to obtain an independent microservice system.
[0178] Microservice configuration and deployment unit: The microservice configuration and deployment unit is used to deploy and configure microservices and define environment configuration and deployment methods.
[0179] Furthermore, the microservice supervision module includes:
[0180] Detection unit, which is used to regularly detect the status of independent microservice systems;
[0181] Performance monitoring unit, which is used to collect performance indicators of independent microservice systems;
[0182] Log management unit: The log management unit is used to integrate log management tools to centrally collect and analyze log data of microservices;
[0183] Distributed tracing unit: The distributed tracing unit is used to track the request flow between independent microservice systems and perform performance bottleneck analysis and fault diagnosis;
[0184] The abnormal alarm unit is used to detect abnormal behavior based on monitoring data and issue an alarm.
[0185] The advantages of the present invention are: based on the microservice boundary information, the independent microservice system is evaluated to obtain the microservice independence index, and the microservice configuration information is obtained to evaluate the independent microservice system to obtain the microservice configuration impact index. The microservice architecture is evaluated and optimized through the microservice configuration impact index and the microservice independence index. Through the quantitative evaluation and impact index, the microservice architecture can be judged and adjusted in time, the system design can be optimized, and potential performance bottlenecks and system over-dependence can be avoided;
[0186] According to the communication delay information, network bandwidth information, network traffic information, and service topology path information, the virtual distance between each independent microservice system is obtained. Based on the virtual distance between each independent microservice system and the service autonomy index corresponding to each independent microservice system, the degree of dependence between each independent microservice system is obtained. The communication architecture is optimized through factors such as the degree of dependence between microservices, virtual distance, and network bandwidth, thereby ensuring the communication efficiency and stability of the system;
[0187] Obtain microservice boundary information based on enterprise demand information, business domain information, and business sub-domain information, and determine the software system structure information. Analyze and determine business domains, sub-domains, business processes and other information in detail to ensure that the microservice architecture can closely match the actual needs and business scenarios of the enterprise.
[0188] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. The present invention may be subject to various changes and improvements without departing from the spirit and scope of the present invention. These changes and improvements fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for constructing an enterprise software system based on microservices, characterized in that: include: Obtain enterprise demand information and determine business area information and business sub-area information; Obtain microservice boundary information based on enterprise demand information, business domain information, and business subdomain information, and determine software system structure information; Build the initial software system based on microservice boundary information and software system structure information; Divide the initial software system into microservices according to enterprise demand information and microservice boundary information to obtain an independent microservice system; Evaluate the independent microservice system based on the microservice boundary information, obtain the microservice independence index, and obtain the microservice configuration information; Determine the communication architecture information between independent microservice systems based on the microservice configuration information; Based on the microservice configuration information, the independent microservice system is evaluated to obtain the microservice configuration impact index; According to the microservice independence index and the microservice configuration impact index, the communication architecture information is adjusted to obtain the standard communication architecture information; Based on the microservice configuration information and standard communication architecture information, a microservice supervision module is built, and the microservice supervision module is used to monitor the independent microservice system.
2. The microservice-based enterprise software system construction method according to claim 1, characterized in that: The step of obtaining microservice boundary information based on enterprise demand information, business domain information, and business subdomain information, and determining software system structure information, specifically includes: Determine enterprise target information, business pain point information and business process information based on enterprise demand information; Identify the main business areas with enterprise goal information and business process information; Split the main business areas, obtain different types of sub-area information, and establish a sub-area tag library; Based on the sub-domain tag library, business pain point information and business process information, analyze different types of sub-domain information to obtain core sub-domain information; Use the core sub-field information to clarify the business constraint information and business boundary information of the core sub-field; Determine the candidate microservice boundary information based on the business constraint information and business boundary information of the core sub-domain; Extract sub-domain tags from the sub-domain tag library in sequence, and match the sub-domain tags with the microservice candidate boundary information to obtain the microservice boundary information; Based on the microservice boundary information, determine the business domain division information, database storage type information, and cross-service communication type information of each microservice; Based on the business domain division information, database storage type information, and cross-service communication type information of each microservice, the service autonomy index of each microservice is obtained; The service autonomy index of each microservice is used as the digital label information of the microservice, and the business domain division information, database storage type information and cross-service communication type information are used as text labels to obtain the software system structure information.
3. The microservice-based enterprise software system construction method according to claim 2, characterized in that: The initial software system is constructed based on the microservice boundary information and software system structure information, specifically including: Based on the microservice boundary information, clarify the business domain boundary information, data storage independence information, and communication port information of each microservice; Determine the functional module corresponding to each microservice based on the business domain boundary information, data storage independence information, and communication port information of each microservice; According to the functional modules corresponding to each microservice, obtain the functional importance of each microservice; Microservices are sorted based on the service autonomy index and function importance of each microservice to obtain a microservice system construction sequence table; Use the microservice system to build a sequence table and software system structure information, and determine the software system style information; Gradually build the initial software system based on the microservice system construction sequence table, software system structure information and software system style information; The calculation formula of the service autonomy index is: In the formula, Autonomy i is the service autonomy index of the i-th microservice, Auto i Score the autonomy of the i-th microservice, Scale_O i Score the horizontal expansion of the i-th microservice, Fung_N i Score the substitutability of the i-th microservice, Dep_N i is the number of dependencies of the i-th microservice, Max_N i is the maximum number of dependencies of the i-th microservice, External i Score the external intervention of the i-th microservice, Adaptive i Adaptive scoring for the i-th microservice; The calculation formula for the function importance is: In the formula, Functional i is the functional importance of the i-th microservice, Y m is the score of the mth key indicator of the i-th microservice, α m is the weight coefficient of the score of the mth key indicator, and n is the total number of key indicators.
4. The microservice-based enterprise software system construction method according to claim 3, characterized in that: The initial software system is divided into microservices according to the enterprise demand information and microservice boundary information to obtain an independent microservice system, which specifically includes: Determine the functional modules corresponding to each microservice based on enterprise demand information and microservice boundary information; Based on the functional modules and microservice boundary information corresponding to each microservice, the corresponding functional modules are separated from the initial software system, and the initial microservice system is built; Based on the business domain division information and database storage type information of each microservice, the shared state of the initial microservice system is removed; Based on the cross-service communication type information, define the communication protocol for the initial microservice system after the shared state is removed; Through the initial software system and microservice boundary information, migrate the functional modules corresponding to each microservice to the initial microservice system; Deploy and operate the initial microservice system to obtain an independent microservice system.
5. The microservice-based enterprise software system construction method according to claim 4, characterized in that: The independent microservice system is evaluated based on the microservice boundary information to obtain the microservice independence index and obtain the microservice configuration information, specifically including: Get the server location information of independent microservice systems; Based on the server location information, a virtual space coordinate system is constructed with the server location of one of the independent microservice systems as the origin; Based on the virtual space coordinate system, simulate the communication between each independent microservice system to obtain communication delay information, network bandwidth information, network traffic information, and service topology path information; Obtain the virtual distance between each independent microservice system based on communication delay information, network bandwidth information, network traffic information, and service topology path information; Based on the virtual distance between each independent microservice system and the service autonomy index corresponding to each independent microservice system, the degree of dependency between each independent microservice system is obtained; Based on the degree of dependency between each independent microservice system, a dependency graph is constructed in the virtual space coordinate system; According to the dependency graph and the functional modules corresponding to each microservice, the functional overlap and call complexity between each independent microservice system are obtained; Obtain the microservice independence index of each independent microservice system through the virtual distance, dependency, functional overlap, and call complexity between each independent microservice system; The relevant calculation formula of the microservice independence index is: Where D virtual (i, j) is the virtual distance between the i-th independent microservice system and the j-th independent microservice system, D delay (i, j) is the communication delay between the i-th independent microservice system and the j-th independent microservice system, D traffic (i, j) is the available network bandwidth between the i-th independent microservice system and the j-th independent microservice system, D topology (i, j) is the network data traffic between the i-th independent microservice system and the j-th independent microservice system, D bandwidth (i, j) is the quantified value of the network path complexity and number of hops between the i-th independent microservice system and the j-th independent microservice system. ɑ, γ, δ and β are all weight coefficients. ij is the degree of dependency between the i-th independent microservice system and the j-th independent microservice system, Autonomy i Autonomy is the service autonomy index corresponding to the i-th independent microservice system. j is the service autonomy index corresponding to the jth independent microservice system, O ij is the functional overlap between the i-th independent microservice system and the j-th independent microservice system, F i is the function set of the i-th independent microservice system, F j is the function set of the jth independent microservice system, C ij is the call complexity between the i-th independent microservice system and the j-th independent microservice system, L(P ij ) is the length of the call chain between the i-th independent microservice system and the j-th independent microservice system, F ij The number of times the i-th independent microservice system calls the j-th independent microservice system, T ij is the quantitative value of the response time and data volume when the i-th independent microservice system calls the j-th independent microservice system each time, M i is the microservice independence index of the i-th independent microservice system, max[D virtual (i, j)] is the maximum virtual distance between the i-th independent microservice system and the j-th independent microservice system, max(C ij ) is the maximum call complexity between the ith independent microservice system and the jth independent microservice system, and W1, W2, w3 and W4 are all weight coefficients.
6. The microservice-based enterprise software system construction method according to claim 5, characterized in that: Based on the microservice configuration information, the independent microservice system is evaluated to obtain the microservice configuration impact index, which specifically includes: According to the microservice configuration information corresponding to the independent microservice system, obtain the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information and security configuration information; Quantify the microservice instance configuration information, environment configuration information, inter-service communication configuration information, configuration management information, and security configuration information, and build a configuration information table corresponding to an independent microservice system; Based on the configuration information table corresponding to the independent microservice system, simulate and adjust the microservice configuration information of the i-th independent microservice system to obtain the basic impact index corresponding to the i-th independent microservice system and the associated impact index generated by the j-th independent microservice system; According to the basic impact index corresponding to the ith independent microservice system and the associated impact index generated by the jth independent microservice system, the microservice configuration impact index of the ith independent microservice system is obtained; The calculation formula of the microservice configuration impact index corresponding to the i-th independent microservice system is: In the formula, S i is the microservice configuration impact index corresponding to the i-th independent microservice system, S i is the basic impact index corresponding to the i-th independent microservice system, S j is the correlation impact index generated by the j-th independent microservice system, is the weight coefficient of the association impact index generated by the jth independent microservice system, and W is the sum of the weight coefficients.
7. The microservice-based enterprise software system construction method according to claim 6, characterized in that: The communication architecture information is adjusted according to the microservice independence index and the microservice configuration impact index to obtain the standard communication architecture information, which specifically includes: Based on the microservice independence index and microservice configuration impact index, set the microservice independence index threshold and microservice configuration impact index threshold; According to the microservice independence index, the microservice configuration impact index, the microservice independence index threshold, and the microservice configuration impact index threshold, the communication architecture information of the independent microservice system is adjusted to obtain standard communication architecture information.
8. A microservice-based enterprise software system construction device, used to implement the construction method according to any one of claims 1 to 7, characterized in that: include: A microservice construction module, which is used to design, divide, build and configure an independent microservice system based on enterprise demand information and business field analysis; A microservices supervision module, which is used to continuously monitor, manage and optimize the built and deployed independent microservices systems; The display module is used to display the construction process and results of the microservice construction module and the supervision process and results of the microservice supervision module.
9. The microservice-based enterprise software system construction device according to claim 8, characterized in that: The microservice building blocks include: The demand analysis unit, the microservice template generation unit is used to collect enterprise demand information, analyze business processes, and identify each independent functional module in the system; A microservice partitioning unit, wherein the microservice partitioning unit is used to partition the initial software system into microservices according to enterprise demand information and microservice boundary information, so that each microservice should have independence, autonomy and maintainability; A microservice modeling unit, which is used to model each microservice based on the microservice division result, define the interface, data model, storage solution of the microservice, and analyze the dependency relationship between microservices; A microservice implementation unit, which is used for coding, unit testing and basic framework construction of microservices to obtain an independent microservice system; The microservice configuration and deployment unit is used to deploy and configure microservices and define environment configuration and deployment methods.
10. The microservice-based enterprise software system construction device according to claim 8, characterized in that: The microservice supervision module includes: A detection unit, the detection unit is used to periodically detect the status of the independent microservice system; A performance monitoring unit, which is used to collect performance indicators of independent microservice systems; A log management unit, which is used to integrate log management tools to centrally collect and analyze log data of microservices; A distributed tracing unit, which is used to track request flows between independent microservice systems and perform performance bottleneck analysis and fault diagnosis; The abnormal alarm unit is used to detect abnormal behavior based on monitoring data and issue an alarm.
Citation Information
Patent Citations
Maintainability-oriented micro-service granularity evaluation method and tool
CN115826979A
Customized application system building method based on micro-service architecture
CN118606294A
Distributed ERP system service domain deployment reconstruction method and system
CN118694812A
Microservice transient fault locating method based on multimodal abnormality detection
WO2024221833A1
Cited By
Industrial production Internet of Things business micro-service extraction method, medium and system
CN120234498A
Enterprise software system evaluation method and device based on full link
CN120950358A
An enterprise software system evaluation method and device based on a full link
CN120950358B