A knowledge graph-based microservice supermarket management method and system
By structuring microservice information into knowledge graph nodes, analyzing user behavior and optimizing service relationships, the problems of insufficient flexibility and stability in microservice architecture are solved, and efficient service management and dynamic adaptation are achieved.
Patent Information
- Application Number
- CN202411222241.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-09-02
AI Technical Summary
Existing technologies are insufficient to flexibly respond to dynamically changing service requirements in microservice architectures. Inadequate identification and automated management of inter-service dependencies lead to performance degradation and instability, and a lack of effective service quality monitoring and automatic repair mechanisms.
Knowledge graphs are used to structure the directory and information of microservices into nodes. Interaction graphs are drawn using node data, user behavior data is analyzed, recommendation lists are generated and quality scores are applied, service relationships are adjusted, service deployment is optimized, key nodes and potential risks are identified, and deployment guidelines are generated.
It improves the automation level of microservice management, optimizes service discovery and load balancing, enhances the personalization and accuracy of service recommendations, improves the stability and reliability of the system, and significantly enhances dynamic management capabilities.
Smart Images

Figure CN119201432B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of service orchestration technology, and in particular to a microservice supermarket management method and system based on knowledge graphs. Background Technology
[0002] Service orchestration focuses on managing and coordinating the interactions between multiple services to form a complete business process. In microservice architectures, service orchestration is particularly crucial because it allows developers to combine small, independent services into complex applications. Service orchestration primarily defines the interaction order between services through a central coordinator. By automating the invocation order and logic of services through an orchestration engine, it not only improves system flexibility and maintainability but also facilitates the implementation of transactions and complex business logic across multiple services and applications.
[0003] Among them, the knowledge graph-based microservice supermarket management method refers to using knowledge graphs to enhance the management efficiency and intelligence of microservices. By integrating knowledge graphs into the microservice architecture, the functions of various services can be automatically identified and coordinated, enabling efficient matching and invocation between services. Its main uses are optimizing service discovery, load balancing, and automatic service repair, thereby improving the overall performance and reliability of the system. Under the "supermarket" management model, microservices can be dynamically displayed and selected like goods on a supermarket shelf, improving the flexibility of service use and development efficiency.
[0004] In existing service orchestration technologies, although a central coordinator can define the interaction order between services, its reliance on fixed, predefined paths in service management and invocation logic makes it inflexible in the face of dynamically changing service requirements. This is especially true in microservice architectures, where the complexity of dependencies and interactions between services is high, making it difficult for a single orchestration engine to react promptly to changes in market and user behavior, thus limiting the rapid adaptability and innovation capabilities of services. Traditional methods also have many limitations in automated service discovery and load balancing, such as the inability to effectively identify and predict dependencies between services, leading to service bottlenecks and performance degradation in practice. The lack of effective service quality monitoring and automatic repair mechanisms compromises service continuity and stability, further impacting the overall system efficiency and user satisfaction. These shortcomings make existing technologies face significant challenges in handling highly dynamic and scalable microservice environments. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by proposing a microservice supermarket management method and system based on knowledge graphs.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a microservice supermarket management method based on knowledge graphs, comprising the following steps:
[0007] S1: Collect the directory and information of microservices, transform data entries into nodes in the knowledge graph, connect service status with interface information, assign values to node attributes, and generate knowledge graph node data;
[0008] S2: Using the knowledge graph node data, traverse each node, define the functions and interfaces of microservice supermarket management, perform node connection enhancement, draw the service interaction graph, and generate a microservice semantic connection graph;
[0009] S3: Organize the microservice semantic connection graph, analyze user behavior data, and generate a microservice recommendation list based on user needs and user preferences.
[0010] S4: Monitor the microservices in the microservice recommendation list, record the number of microservice calls and user feedback, perform a microservice supermarket management status assessment, and obtain a microservice quality score;
[0011] S5: Based on the microservice quality score, perform microservice relationship adjustment in the knowledge graph, strengthen connections with priority given to service scores, avoid connections with low-scoring services, and generate an adjusted knowledge graph.
[0012] S6: Based on the adjusted knowledge graph, identify key nodes and potential risk connections that microservice supermarket management depends on, perform service architecture optimization, adjust service deployment to match architecture changes, and generate microservice deployment guidelines.
[0013] As a further aspect of the present invention, the knowledge graph node data includes the functional description, interface type, performance indicators, and user access frequency of service components; the microservice semantic connection graph includes the dependency relationships, data flow, and collaborative behaviors of service node connections; the microservice recommendation list includes the functions, expected efficiency, and matching scenarios of recommended services; the microservice quality score includes the service response time, success rate, user satisfaction, and failure rate; the adjusted knowledge graph includes optimizing the connection weights of service nodes, prioritizing scoring services, and avoiding low-scoring services; and the microservice deployment guide includes best practices for service deployment, resource allocation schemes, potential risk assessment, and service architecture optimization.
[0014] As a further aspect of the present invention, the steps of collecting the directory and information of microservices, converting data entries into nodes in a knowledge graph, connecting service status with interface information, and assigning values to node attributes to generate knowledge graph node data are as follows:
[0015] S101: Collect microservice catalogs and information, record and organize the basic information of each service, including functional description, performance parameters and interface type, organize the information into structured entries, classify and integrate the entries, and generate a list of service data entries;
[0016] S102: Using the service data entry list, each service entry is converted into a node of the knowledge graph, an identifier is assigned to each node, service characteristic attributes are given, call frequency and dependency relationships are recorded, and the knowledge graph initialization node set is obtained;
[0017] S103: Initialize the node set through the knowledge graph, mark the connection between service status and interface information for each node, analyze the data flow and calling relationship between nodes, and generate knowledge graph node data.
[0018] As a further aspect of the present invention, the steps of traversing each node through the knowledge graph node data, defining the functions and interfaces of microservice supermarket management, performing node connection enhancement, drawing a service interaction graph, and generating a microservice semantic connection graph are as follows:
[0019] S201: Based on the knowledge graph node data, traverse each node, identify and record the functional description and interface type of microservice supermarket management, set functional parameters and interface call information for each node, and generate a list of functional definition nodes;
[0020] S202: Using the defined node list, strengthen the connections between nodes, evaluate the connection of each node, identify the connection density of key service nodes, verify the access speed and response efficiency of key services, and obtain a node connection strengthening graph.
[0021] S203: Through the node connection enhancement graph, draw the interaction relationship graph between services, identify the data flow and collaboration mode between services, use graphics to display the interaction dynamics of the entire service architecture, and generate a microservice semantic connection graph.
[0022] As a further aspect of the present invention, the steps of organizing the microservice semantic connection graph, analyzing user behavior data, and generating a microservice recommendation list based on user needs and matching user preferences are as follows:
[0023] S301: Based on the microservice semantic connection graph, collect and integrate microservice supermarket management data, including service type, frequency of use and dependency, verify data integrity and consistency, and generate an integrated service dataset;
[0024] S302: Using the integrated service dataset, analyze the user's interaction records and usage patterns, identify the frequency of user service use and user preference settings for the service, and obtain user behavior analysis results;
[0025] S303: Based on the user behavior analysis results, intelligently match microservices, sort microservices according to user habits and preferences, and generate a microservice recommendation list according to the needs of differentiated user groups.
[0026] As a further aspect of the present invention, the steps of monitoring the microservices in the microservice recommendation list, recording the number of microservice calls and user feedback, performing a microservice supermarket management status assessment, and obtaining a microservice quality score are as follows:
[0027] S401: Based on the microservice recommendation list, monitor the service quality of the microservices, periodically collect the call count and performance indicators of each service, verify the real-time update of the data, and generate service call data records;
[0028] S402: Using the service call data records, collect and analyze user feedback on each microservice, record satisfaction scores, usage frequency and fault issues, and analyze the user's real-time experience by integrating information to obtain user feedback analysis results;
[0029] S403: Based on the user feedback analysis results, perform a microservice quality assessment, combine the number of calls and user satisfaction to quantify service quality, conduct a service quality assessment, and generate a microservice quality score.
[0030] As a further aspect of the present invention, the specific steps of adjusting the microservice relationships in the knowledge graph based on the microservice quality score, strengthening connections with priority given to service scores, avoiding connections with low-scoring services, and generating an adjusted knowledge graph are as follows:
[0031] S501: Based on the microservice quality score, a decision tree algorithm is used to evaluate and classify the score of each microservice node, identify services with scores exceeding a set threshold, prioritize them, and generate a service quality classification list.
[0032] S502: Using the service quality classification list, adjust the connections in the knowledge graph, optimize the connections between service nodes, avoid connections of low-quality services, verify the priority and access efficiency of high-quality services in the knowledge graph, and obtain an optimized intermediate state graph.
[0033] S503: Using the optimized intermediate state graph, reconstruct and draw the interaction graph of the entire microservice, adjust the position and connection of service nodes, map the implemented service scoring priority strategy, and generate the adjusted knowledge graph.
[0034] As a further aspect of the present invention, the formula of the decision tree algorithm is as follows:
[0035]
[0036] Where G(T) represents the purity of the nodes after the partition, T represents the number of nodes in the decision tree, and p k Let W be the probability of class k in node T, W be the weight coefficient, N be the number of samples in node T, C be the regularization coefficient, n be the number of samples in class k, and e be the base of the natural logarithm.
[0037] As a further aspect of the present invention, based on the adjusted knowledge graph, the steps of identifying key nodes and potential risk connections dependent on microservice supermarket management, performing service architecture optimization, adjusting service deployment to match architecture changes, and generating microservice deployment guidelines are as follows:
[0038] S601: Extract key node information from the adjusted knowledge graph, analyze each component of the microservice architecture, identify key dependencies, and use dependency analysis to identify risk nodes, record risk connections, and generate a dependency risk map.
[0039] S602: Based on the aforementioned dependency risk map, adjust the service deployment to match the architecture changes, make adjustments using the optimized architecture parameters, configure the service deployment parameters according to service requirements and resource availability, and obtain the optimized service architecture;
[0040] S603: Based on the optimized service architecture, deploy each service component, utilize configuration requirements and resource allocation, identify deployment processes and configuration guidelines, and generate a microservice deployment guide.
[0041] A knowledge graph-based microservice supermarket management system, wherein the knowledge graph-based microservice supermarket management system is used to execute the aforementioned knowledge graph-based microservice supermarket management method, the system comprising:
[0042] The data collection module collects microservice catalogs and information, transforms data entries into nodes in a knowledge graph, connects service status with interface information, assigns values to node attributes, and generates knowledge graph node data.
[0043] The service definition module traverses each node based on the knowledge graph node data, defines the functions and interfaces for microservice supermarket management, performs node connection enhancement, and generates a microservice semantic connection graph.
[0044] The microservice organization module organizes the data based on the microservice semantic connection graph, analyzes user behavior data, matches user preferences with user needs, and generates a microservice recommendation list.
[0045] The service monitoring module uses the microservice recommendation list to identify the number of calls and user feedback, assess the status of microservice supermarket management, and obtain microservice quality scores.
[0046] The relationship adjustment module adjusts the microservice relationships in the knowledge graph based on the microservice quality score, identifies key nodes and risky connections, adjusts service deployment, and generates a microservice deployment guide.
[0047] Compared with the prior art, the advantages and positive effects of the present invention are as follows:
[0048] This invention structures the directory and information of microservices into a knowledge graph, enabling efficient definition and matching of inter-service interactions. Data entries are transformed into nodes in the knowledge graph, simplifying connections and coordination between microservices and enhancing the automation of microservice management through node traversal and definition. The invention automatically draws a microservice interaction graph using node data, optimizing microservice discovery and load balancing. By analyzing user behavior data and matching it with user needs, the personalization and accuracy of microservice recommendations are improved. Monitoring and quality scoring of microservices in the recommendation list provides continuous performance optimization metrics for the system. Adjusting connections for low-scoring microservices effectively avoids the impact of inefficient or faulty services, improving stability and reliability, significantly enhancing the dynamic management capabilities of microservices, and achieving effective cross-service integration and optimization. Attached Figure Description
[0049] Figure 1 This is a schematic diagram of the workflow of the present invention;
[0050] Figure 2 This is a detailed flowchart of S1 of the present invention;
[0051] Figure 3 This is a detailed flowchart of the S2 process of the present invention;
[0052] Figure 4 This is a detailed flowchart of the S3 process of the present invention;
[0053] Figure 5 This is a detailed flowchart of the S4 process of the present invention;
[0054] Figure 6 This is a detailed flowchart of S5 of the present invention;
[0055] Figure 7 This is a detailed flowchart of S6 of the present invention;
[0056] Figure 8 This is a system flowchart of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0058] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0059] Please see Figure 1 This invention provides a technical solution: a microservice supermarket management method based on knowledge graphs, comprising the following steps:
[0060] S1: Collect the directory and information of microservices, transform data entries into nodes in the knowledge graph, connect service status with interface information, assign values to node attributes, record call frequency and dependencies, and generate knowledge graph node data;
[0061] S2: By traversing each node through knowledge graph node data, define the functions and interfaces of microservice supermarket management, perform node connection enhancement, draw the service interaction graph, and generate a microservice semantic connection graph.
[0062] S3: Organize the semantic connection graph of microservices, analyze user behavior data, match user needs with user preferences, sort microservices, and generate a microservice recommendation list;
[0063] S4: Monitor the microservices in the microservice recommendation list, record the number of microservice calls and user feedback, perform a microservice supermarket management status assessment, and obtain a microservice quality score;
[0064] S5: Based on the microservice quality score, adjust the microservice relationships in the knowledge graph, strengthen the connections that prioritize service scores, avoid connections to low-scoring services, and generate an adjusted knowledge graph.
[0065] S6: Based on the adjusted knowledge graph, identify key nodes and potential risk connections that microservice supermarket management depends on, perform service architecture optimization, adjust service deployment to match architecture changes, and generate microservice deployment guidelines.
[0066] The knowledge graph node data includes service component functional descriptions, interface types, performance metrics, and user access frequency; the microservice semantic connection graph includes service node connection dependencies, data flow, and collaborative behavior; the microservice recommendation list includes recommendation service functions, expected efficiency, and matching scenarios; the microservice quality score includes service response time, success rate, user satisfaction, and failure rate; the adjusted knowledge graph includes optimizing service node connection weights, prioritizing scoring services, and avoiding low-scoring services; and the microservice deployment guide includes best practices for service deployment, resource allocation schemes, potential risk assessment, and service architecture optimization.
[0067] Please see Figure 2 The specific steps for collecting microservice directories and information, transforming data entries into nodes in a knowledge graph, connecting service information with interface information, and assigning values to node attributes to generate knowledge graph node data are as follows:
[0068] S101: The execution flow of collecting microservice catalogs and information, recording and organizing the basic information of each service, including functional descriptions, performance parameters and interface types, organizing the information into structured entries, classifying and integrating the entries, and generating a list of service data entries is as follows;
[0069] Collect microservice catalogs and information, including functional descriptions, performance parameters, and interface types for each service. By using automated tools to scan and record data, structured service entries can be effectively compiled. These entries are then categorized and integrated, such as by service function, performance level, or service type, for sorting and grouping. The key is to ensure data integrity and accuracy, generating a service data entry list using the following formula:
[0070]
[0071] Among them, D s c represents the degree of integration of service data. i Let Z represent the classification index of the i-th service, and Z represent the total number of services.
[0072] S102: Using a list of service data entries, each service entry is converted into a node in the knowledge graph. An identifier is assigned to each node, service characteristic attributes are given, and call frequency and dependencies are recorded. The execution flow of the knowledge graph initialization node set is as follows.
[0073] A service data entry list is used, transforming each service entry into a node in the knowledge graph. Each service is assigned a unique identifier, and each node is given corresponding service characteristic attributes, such as call frequency, dependencies, and performance metrics. These attributes not only describe the service's functionality and performance but also reflect the dependencies and collaboration patterns between services. Ensuring data consistency and queryability lays the foundation for building a service dependency network, resulting in the initial node set of the knowledge graph, expressed by the following formula:
[0074]
[0075] Among them, K n a represents the total characteristic value of a node in a knowledge graph. j f represents the attribute value of node j. j This represents the frequency weight of the attribute, and M represents the total number of attributes.
[0076] S103: The execution flow of generating knowledge graph node data is as follows: Initialize the node set through the knowledge graph, mark the connection between service status and interface information for each node, analyze the data flow and calling relationship between nodes, and generate knowledge graph node data.
[0077] The knowledge graph initializes a node set, identifies the connections between service status and interface information, and analyzes the data flow and call relationships between nodes. By mapping the interaction and data exchange paths between services, the role and relevance of each service can be clarified. This helps identify potential conflict points and optimization areas between services, providing decision support for further service improvement and maintenance. Knowledge graph node data is generated using the following formula:
[0078]
[0079] Among them, G c Let r represent the complexity of connections in the graph. k The strength of the relationship connecting k is represented by l. k L represents the connection length, and L represents the total number of connections.
[0080] Please see Figure 3 The specific steps for generating a microservice semantic connection graph are as follows: By traversing each node using knowledge graph node data, defining the functions and interfaces for microservice supermarket management, performing node connection enhancement, drawing a service interaction graph, and generating a microservice semantic connection graph.
[0081] S201: Based on knowledge graph node data, traverse each node, identify and record the functional description and interface type of microservice supermarket management, set functional parameters and interface call information for each node, and generate a list of functional definition nodes. The execution flow is as follows:
[0082] Based on knowledge graph node data, each microservice node is analyzed in depth. Each node is traversed, recording the functional description and interface type of each service. This information helps understand the role and operation of each service. Corresponding functional parameters and interface call information are set for each node, with parameters defining the service's functional scope and interface dependencies in detail. Through detailed settings, the specific functions and interface usage of each service are clearly defined, providing foundational data for subsequent service optimization and interface adjustments. A list of functional definition nodes is created using the following formula:
[0083]
[0084] Among them, F d f represents the total number of function definitions. i w represents the function parameter value of the i-th node. i The weighting factor represents the function, and P represents the total number of nodes.
[0085] S202: Using a functional definition node list, strengthen the connections between nodes, evaluate the connections of each node, identify the connection density of key service nodes, verify the access speed and response efficiency of key services, and obtain the execution flow of the node connection strengthening graph as follows;
[0086] A functionally defined node list is used to strengthen the connections between nodes. The connection density of each node is evaluated, and the connection density of each service node is identified. This involves not only the evaluation of physical connections but also the analysis of the frequency and efficiency of inter-service calls. The access speed and response efficiency of key service nodes are verified through actual call testing and data analysis, generating a node connection strengthening graph using the following formula:
[0087]
[0088] Among them, L s d represents the total score for connection reinforcement. j Let v represent the connection density of the j-th node. j This indicates the access speed of a node, and P represents the total number of nodes.
[0089] S203: By strengthening the node connection graph, draw the interaction relationship graph between services, identify the data flow and collaboration mode between services, and use graphics to display the interaction dynamics of the entire service architecture. The execution flow of generating the microservice semantic connection graph is as follows;
[0090] By strengthening the node connection graph, we can draw an interaction relationship map between services, identify data flow and collaboration patterns between services, and help understand how services interact and support each other. Visualizing the dynamic interaction of the service architecture graphically not only provides a clear view of the connections between services but also helps identify potential conflicts or optimization points, generating a microservice semantic connection graph using the following formula:
[0091]
[0092] Among them, I r s represents the sum of the strengths of the interaction relationships. k c represents the data flow intensity between the k-th services. k R represents the complexity of the collaboration pattern, and R represents the total number of service relationships.
[0093] Please see Figure 4 The specific steps for organizing the semantic connection graph of microservices, analyzing user behavior data, and generating a microservice recommendation list based on user needs and preferences are as follows:
[0094] S301: Based on the microservice semantic connection graph, collect and integrate microservice supermarket management data, including service type, frequency of use and dependencies, verify data integrity and consistency, and generate an integrated service dataset. The execution flow is as follows:
[0095] Based on the semantic connection graph of microservices, the team collects and integrates data from microservice supermarket management, focusing on key data such as service type, usage frequency, and dependencies. Each data point undergoes careful review to ensure information completeness and consistency. Data aggregation not only helps to better understand the actual application of services but also enables the detection of data variability, ensuring the accuracy of the dataset. Through refined data processing, an integrated service dataset is generated using the following formula:
[0096]
[0097] Among them, D I t represents the completeness index of integrated service data. m Indicates the type of the m-th service, u m Indicates usage frequency, d m Q represents the strength of the dependency relationship, and Q represents the total number of service entries.
[0098] S302: The execution flow for obtaining user behavior analysis results by using an integrated service dataset to analyze user interaction records and usage patterns, identify the frequency of user service use and user preference settings is as follows;
[0099] By integrating service datasets and analyzing user interaction records and usage patterns, the team can identify the frequency of user use and preferences for various services through in-depth analysis of user interaction data. The process includes not only statistical analysis but also behavioral pattern identification, providing detailed insights into how users interact with services and their particular service preferences. These insights generate user behavior analysis results using the following formula:
[0100]
[0101] Among them, B a f represents the user behavior analysis score. n p represents the frequency of the nth user using the service. n W represents the strength of a user's preference for a service, and W represents the total number of users.
[0102] S303: The execution flow of intelligently matching microservices based on user behavior analysis results, sorting microservices according to user habits and preferences, and generating a microservice recommendation list based on the needs of differentiated user groups is as follows;
[0103] Based on user behavior analysis results, microservices are intelligently matched and ranked according to user habits and preferences. Simultaneously, considering the specific needs of diverse user groups, advanced algorithms are used to optimize service recommendations, ensuring that each user receives a list of services that best suits their needs. The resulting microservice recommendation list is generated using the following formula:
[0104]
[0105] Among them, R l h represents the matching degree of the recommendation list. o Indicates the degree of user preference matching, v o This represents the service ranking value, where O indicates the total number of services considered.
[0106] Please see Figure 5 The specific steps for monitoring microservices in the microservice recommendation list, recording the number of microservice calls and user feedback, performing a microservice supermarket management status assessment, and obtaining a microservice quality score are as follows:
[0107] S401: Based on the microservice recommendation list, monitor the service quality of microservices, periodically collect the call count and performance indicators of each service, verify the real-time update of the data, and generate service call data records. The execution process is as follows:
[0108] Based on a microservice recommendation list, the service quality of each microservice is monitored. This process involves periodically collecting the call count and relevant performance metrics for each service, such as response time and processing efficiency. The collected data is updated and verified using real-time monitoring equipment to ensure all records reflect the latest service status. The data not only helps monitor service operation but also provides necessary information to assess service reliability and efficiency, generating service call data records using the following formula:
[0109]
[0110] Among them, D rc represents the reliability index of service call data. i p represents the number of times the i-th service is called. i This represents the performance metrics of the corresponding service, and I represents the total number of services.
[0111] S402: By using service call data recording, collecting and analyzing user feedback on each microservice, recording satisfaction scores, usage frequency and fault issues, and integrating information to analyze the user's real-time experience, the execution flow of obtaining user feedback analysis results is as follows;
[0112] By logging service call data, we conduct in-depth analysis of user feedback on each microservice, collecting user satisfaction ratings, usage frequency, and issues. This helps the team understand real-time user service experience and satisfaction, enabling necessary adjustments and optimizations. Integrating user feedback provides a comprehensive perspective for evaluating service user acceptance and market performance, yielding user feedback analysis results using the following formula:
[0113]
[0114] Among them, F a This represents the user satisfaction analysis score, s j Let f represent the satisfaction rating of the j-th user. j J represents the frequency of use, and J represents the total number of users who rated it.
[0115] S403: Based on the analysis results of user feedback, perform a quality assessment of the microservices, combine the number of calls and user satisfaction to quantify service quality, and generate a microservice quality score. The execution process is as follows:
[0116] The quality of microservices is assessed based on user feedback analysis. By combining service call counts and user satisfaction data, the quality of each service is quantified. The scoring process considers service reliability, efficiency, and user satisfaction, providing service providers with a basis for service improvement. A microservice quality score is generated using the following formula:
[0117]
[0118] Among them, Q s n represents the quality score of a microservice. k s represents the number of times the k-th service is called. k K represents the corresponding user satisfaction level, and K represents the total number of services.
[0119] Please see Figure 6 Based on the microservice quality score, the steps to adjust the microservice relationships in the knowledge graph, strengthen connections prioritizing service scores, avoid connections to low-scoring services, and generate an adjusted knowledge graph are as follows:
[0120] S501: Based on microservice quality scoring, the decision tree algorithm is used to evaluate and classify the score of each microservice node, identify services with scores exceeding a set threshold, prioritize them, and generate a service quality classification list. The execution process is as follows:
[0121] Based on microservice quality scoring, a decision tree algorithm is used to evaluate and classify each microservice node. Each service node is categorized according to its quality score, and services with scores exceeding a preset threshold are prioritized. Classification and ranking help identify the best-performing services, guide the optimized allocation of resources and further service development, provide a clear view showing the ranking of services by quality, and generate a service quality classification list as a basis for subsequent resource allocation and service improvement.
[0122] The formula for the decision tree algorithm is as follows:
[0123]
[0124] Where G(T) represents the purity of the nodes after the partition, T represents the number of nodes in the decision tree, and p k Let W be the probability of class k in node T, W be the weight coefficient, N be the number of samples in node T, C be the regularization coefficient, n be the number of samples in class k, and e be the base of the natural logarithm.
[0125] The execution process is as follows:
[0126] Calculate p k ·(1-p k The basic purity gain is obtained, multiplied by the weighting coefficient W, which can be determined by analyzing the feature importance scores of the node samples. This is then divided by the number of node samples N to ensure that the gain is not excessively affected by the number of samples. A regularization term C·log(n+e) is added, where C can be determined by cross-validation and e is a constant to avoid the problem of undefined logarithms when n is zero. All steps are combined to form the weighted purity gain G, which is used to more accurately evaluate and classify the quality of microservice nodes.
[0127] S502: Using a service quality classification list, the connections in the knowledge graph are adjusted to optimize the connections between service nodes, avoid connections of low-quality services, verify the priority and access efficiency of high-quality services in the knowledge graph, and the execution flow of the optimized intermediate state graph is as follows;
[0128] By employing a service quality classification list, the connections between service nodes in the knowledge graph are optimized and adjusted. This includes pruning connections with low-quality services and strengthening connections between high-quality services. This not only improves the overall quality of the knowledge graph but also optimizes service access efficiency and reliability. High-quality services in the knowledge graph can receive higher priority and better response efficiency, forming an optimized intermediate state graph. The formula used is:
[0129]
[0130] Among them, G opt y represents the optimized map score. j It is the quality score of the j-th connection, δ j It is an indicator function, and M is the total number of connections.
[0131] S503: The execution flow of generating the adjusted knowledge graph is as follows: by optimizing the intermediate state graph, reconstructing and drawing the interaction relationship graph of the entire microservice, adjusting the position and connection of service nodes, mapping the implemented service scoring priority strategy, and generating the adjusted knowledge graph.
[0132] By optimizing the intermediate state graph, the interaction graph of the entire microservice is reconstructed and drawn. This involves adjusting the position and connection of service nodes to better reflect the implemented service scoring priority strategy. It not only reflects the optimized interaction relationships between services but also provides a more efficient service network structure, supporting the continuous improvement and development of the microservice architecture. The resulting adjusted knowledge graph is generated using the following formula:
[0133]
[0134] Among them, G final This is the adjusted knowledge graph score, z k It is the position optimization score of the k-th node, μ k is the weight of a node in the adjusted graph, and L is the total number of nodes.
[0135] Please see Figure 7 Based on the adjusted knowledge graph, the specific steps for identifying key nodes and potential risk connections in the microservice supermarket management dependency, optimizing the service architecture, adjusting service deployment to match architectural changes, and generating microservice deployment guidelines are as follows:
[0136] S601: The execution flow of extracting key node information from the adjusted knowledge graph, analyzing each component of the microservice architecture, identifying key dependencies, and using dependency analysis to identify risk nodes, record risk connections, and generate a dependency risk map is as follows;
[0137] Key node information is extracted from the adjusted knowledge graph. Dependency analysis is performed on each component of the microservice architecture to identify and record critical dependencies. Risk nodes in each component are marked to facilitate the identification of risky connections that affect service quality and stability. The dependencies and potential risks between service components are displayed in detail, providing a foundation for further risk management and mitigation strategies. A dependency risk map is generated using the following formula:
[0138]
[0139] Among them, R dep r represents the total risk value dependent on the risk map. i λ is the risk score of the i-th dependent node. i is the probability of the risk occurring, and D is the total number of dependent nodes.
[0140] S602: Based on the dependency risk map, adjust the service deployment to match the architecture changes, make adjustments using the optimized architecture parameters, configure the service deployment parameters according to service requirements and resource availability, and obtain the following execution flow for optimizing the service architecture;
[0141] Based on the dependency risk map, service deployment is adjusted to match architectural changes. This includes utilizing optimized architectural parameters and configuring service deployment parameters according to service requirements and resource availability. This ensures efficient and adaptable service deployment, enabling services to better respond to system and user needs while maintaining optimal resource utilization. The optimized service architecture is obtained using the following formula:
[0142]
[0143] Among them, S opt It is the score for optimizing the service architecture, u| j It is the optimization coefficient of the j-th service deployment parameter, v j P is the adjustment value of the parameter, and P is the total number of parameters.
[0144] S603: Based on the optimized service architecture, deploy each service component, utilize configuration requirements and resource allocation, identify the deployment process and configuration guidance, and generate the microservice deployment guide. The execution flow is as follows:
[0145] Based on the optimized service architecture, specific deployments are carried out for each service component. Utilizing configuration requirements and resource allocation information, the deployment process and configuration guidelines are refined to ensure that each service component runs in the most suitable environment, maximizing performance and efficiency. This helps the technical team correctly deploy and maintain each microservice component, generating a microservice deployment guide using the following formula:
[0146]
[0147] Among them, C dep Indicates deployment efficiency, w k It is the resource weight of the k-th component, q k C represents the configuration difficulty of the components, and C represents the total number of components.
[0148] Please see Figure 8 A knowledge graph-based microservice supermarket management system is provided. This system executes the aforementioned knowledge graph-based microservice supermarket management method. The system includes:
[0149] The data collection module collects microservice catalogs and information, transforms data entries into nodes in a knowledge graph, connects service status with interface information, assigns values to node attributes, and generates knowledge graph node data.
[0150] The service definition module traverses each node based on the knowledge graph node data, defines the functions and interfaces for microservice supermarket management, performs node connection enhancement, and generates a microservice semantic connection graph.
[0151] The microservice organization module organizes data based on the microservice semantic connection graph, analyzes user behavior data, matches user preferences with user needs, and generates a microservice recommendation list.
[0152] The service monitoring module uses a microservice recommendation list to identify call counts and user feedback, assess the status of microservice supermarket management, and obtain microservice quality scores.
[0153] The relationship adjustment module adjusts the microservice relationships in the knowledge graph based on the microservice quality score, identifies key nodes and risky connections, adjusts service deployment, and generates a microservice deployment guide.
[0154] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments that can be applied to other fields. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.
Claims
1.A knowledge graph-based microservice supermarketization management method, characterized in that, The method comprises the following steps: Collecting the directory and information of microservices, collecting the directory and information of microservices, recording and sorting the basic information of each service, including function description, performance parameters and interface type, sorting the information into structured entries, and classifying and integrating the entries to generate a service data entry list, converting the data entries into nodes in the knowledge graph, connecting the service conditions and interface information, and assigning values to the node properties to generate knowledge graph node data; Through the knowledge graph node data, each node is traversed, the functions and interfaces of microservice supermarket management are defined, node connection strengthening is performed, a service interaction graph is drawn, and a microservice semantic connection graph is generated; Data sorting is performed on the microservice semantic connection graph, user behavior data is analyzed, user preferences are matched according to user needs, and a microservice recommendation list is generated; The microservices in the microservice recommendation list are monitored, the number of calls and user feedback of the microservices are recorded, the state of microservice supermarket management is evaluated, and a microservice quality score is obtained; According to the microservice quality score, the relationship between the microservices in the knowledge graph is adjusted, the connection of services with high scores is strengthened, and the connection of services with low scores is avoided, and an adjusted knowledge graph is generated; Based on the adjusted knowledge graph, key nodes and potential risk connections dependent on microservice supermarket management are identified, service architecture optimization is performed, service deployment is adjusted to match architecture changes, and a microservice deployment guide is generated; Through the knowledge graph node data, each node is traversed, the functions and interfaces of microservice supermarket management are defined, node connection strengthening is performed, a service interaction graph is drawn, and a microservice semantic connection graph is generated, and the steps are as follows: Based on the knowledge graph node data, each node is traversed, the function description and interface type of microservice supermarket management are identified and recorded, function parameters and interface call information are set for each node, and a function definition node list is generated; The function definition node list is used to strengthen the connection between nodes, the connection of each node is evaluated, the connection density of key service nodes is identified, the access speed and response efficiency of key services are verified, and a node connection strengthening graph is obtained; Through the node connection strengthening graph, the interaction relationship graph between services is drawn, the data flow and cooperation mode between services are identified, the interaction dynamics of the entire service architecture are displayed in a graphical manner, and a microservice semantic connection graph is generated. 2.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, The knowledge graph node data includes the function description, interface type, performance indicators and user access frequency of the service components, the microservice semantic connection graph includes the dependency relationship, data flow and collaborative behavior of service node connection, the microservice recommendation list includes the function, expected efficiency and matching scenario of the recommended services, the microservice quality score includes the response time, success rate, user satisfaction and failure rate of the services, the adjusted knowledge graph includes the connection weight of the optimized service nodes, the priority of the scored services and the avoidance of low-score services, and the microservice deployment guide includes the optimal practice of service deployment, resource configuration scheme, potential risk assessment and optimization of service architecture. 3.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, Collecting the catalog and information of microservices, converting data entries into nodes in the knowledge graph, connecting service conditions and interface information, and assigning values to node attributes to generate knowledge graph node data, the steps are as follows: Using the service data entry list, converting each service entry into a node in the knowledge graph, assigning an identifier to each node, assigning service characteristic attributes, recording call frequency and dependency relationships, and obtaining a knowledge graph initialization node set; Through the knowledge graph initialization node set, each node is labeled with service conditions and interface information, the data flow and call relationship between nodes are analyzed, and the knowledge graph node data is generated. 4.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, Data arrangement is performed on the microservice semantic connection graph, user behavior data is analyzed, user preferences are matched according to user needs, and a microservice recommendation list is generated, the steps are as follows: Based on the microservice semantic connection graph, collect and integrate microservice supermarket management data, including service type, frequency of use and dependency relationship, check data integrity and consistency, and generate an integrated service data set; Using the integrated service data set, analyze user interaction records and usage patterns, identify user service usage frequency and user service preference settings, and obtain user behavior analysis results; Through the user behavior analysis results, intelligently match the microservices, sort the microservices according to user usage habits and preferences, and generate a microservice recommendation list according to the needs of different user groups. 5.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, Monitoring the microservices in the microservice recommendation list, recording the number of calls and user feedback, performing microservice supermarket management state evaluation, and obtaining microservice quality scores, the steps are as follows: Based on the microservice recommendation list, monitor the service quality of microservices, regularly collect the number of calls and performance indicators of each service, check the real-time update of data, and generate service call data records; Using the service call data records, collect and analyze user feedback on each microservice, record satisfaction scores, usage frequency and fault problems, analyze user real-time experience by integrating information, and obtain user feedback analysis results; Through the user feedback analysis results, perform quality evaluation of the microservices, quantify the service quality by combining the number of calls and user satisfaction, and perform service quality evaluation to generate microservice quality scores. 6.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, According to the microservice quality scores, adjust the relationship of the microservices in the knowledge graph, strengthen the connection of services with high scores, and avoid the connection of services with low scores, the steps of generating the adjusted knowledge graph are as follows: Based on the microservice quality scores, use a decision tree algorithm to evaluate and classify the scores of each microservice node, identify services with scores exceeding a certain threshold, prioritize them, and generate a service quality classification list; Using the service quality classification list, adjust the connections in the knowledge graph, optimize the connections between service nodes, avoid the connections of low-quality services, verify the priority and access efficiency of high-quality services in the knowledge graph, and obtain an optimized intermediate state graph. By the optimized intermediate state map, the interaction relationship diagram of the entire microservice is reconstructed and drawn, the position and connection of the service node are adjusted, the implemented service score priority strategy is mapped, and an adjusted knowledge graph is generated. 7.The knowledge graph-based microservice supermarketization management method of claim 6, wherein, The formula of the decision tree algorithm is as follows: ; in, To evaluate the purity of the nodes after partitioning, For nodes in a decision tree, It is a node Medium category The probability, These are the weighting coefficients. For nodes The number of samples, The regularization coefficient is . For category The number of samples, It is the base of the natural logarithm. 8.The knowledge graph-based microservice supermarketization management method of claim 1, wherein, Based on the adjusted knowledge graph, the key nodes and potential risk connections relied on by the microservice supermarket management are identified, the service architecture optimization is performed, the service deployment is adjusted to match the architecture change, and the steps of generating the microservice deployment guide are as follows: From the adjusted knowledge graph, key node information is extracted, each component of the microservice architecture is analyzed, key dependencies are identified, and risk nodes are identified and recorded by using dependency analysis and risk connection, and a dependency risk map is generated; Based on the dependency risk map, the service deployment is adjusted to match the architecture change, the optimized architecture parameters are used for adjustment, the service deployment parameters are configured according to the service requirements and resource availability, and the optimized service architecture is obtained; According to the optimized service architecture, each service component is deployed, the deployment process and configuration guidance are identified by using the configuration requirements and resource allocation, and the microservice deployment guide is generated. 9.A knowledge graph-based microservice supermarketization management system for performing the knowledge graph-based microservice supermarketization management method of any one of claims 1-8. The system comprises: The data collection module collects the microservice directory and information, converts the data entries into nodes in the knowledge graph, connects the service conditions and interface information, assigns values to the node attributes, and generates knowledge graph node data; The service definition module traverses each node according to the knowledge graph node data, defines the functions and interfaces of the microservice supermarket management, performs node connection strengthening, and generates a microservice semantic connection diagram; The microservice arrangement module arranges data based on the microservice semantic connection diagram, analyzes user behavior data, matches user preferences according to user requirements, and generates a microservice recommendation list; The service monitoring module uses the microservice recommendation list to identify the number of calls and user feedback, evaluates the state of the microservice supermarket management, and obtains the microservice quality score; The relationship adjustment module adjusts the microservice relationship in the knowledge graph according to the microservice quality score, identifies key nodes and risk connections, adjusts service deployment, and generates a microservice deployment guide.
Citation Information
Patent Citations
Microservice architecture governance method and system based on knowledge graph
CN115630105A
Machine learning microservice architecture design tools and methods
US20190356555A1