Calling method for sensing dynamic decision in micro-service scene

By adopting the calling method that perceives dynamic decision-making in the microservice architecture, monitoring and analyzing data in real time, dynamically adjusting service scheduling strategies, and real-time policy issuance through the configuration center, the problem that traditional methods cannot adapt to dynamic changes is solved, and the system is improved performance and reliability.

CN119449868APending Publication Date: 2025-02-14BEIYIN FINANCIAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411475283.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the dynamically changing microservice architecture environment, traditional service calling methods cannot adapt to changes in a timely manner, resulting in unbalanced resource utilization, degraded service quality, and even causing service avalanches, affecting the reliability and user experience of the system.

Method used

A method of calling that perceives dynamic decisions in microservice scenarios is adopted, including server monitoring and software monitoring, service scheduling policy decisions and decision issuance configuration centers. Through the combination of open source monitoring policies and multiple monitoring components, monitoring data is collected and analyzed in real time, dynamic adjustments of load policies and circuit breaker current limiting and other policies, and real-time policy issuance and response through the configuration center.

Benefits of technology

It realizes efficient and stable operation of microservices under high concurrency or network instability, improves system performance and reliability, enhances system adaptability and resilience, and reduces the risk of service avalanches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449868A_ABST
    Figure CN119449868A_ABST
Patent Text Reader

Abstract

The invention discloses a calling method for sensing a dynamic decision in a micro-service scene. The calling method comprises server monitoring, software monitoring, service scheduling strategy decision making and decision issuing configuration center; the server monitoring and the software monitoring adopt an open source monitoring strategy, a plurality of monitoring components are adopted for monitoring, and meanwhile, collected monitoring data are integrated for persistent storage and cache storage for calculation of a service scheduling decision center; the service scheduling strategy decision is calculated based on the data collected by the monitoring component; the strategy issued by the decision issuing configuration center and the decision center is finally in butt joint with the micro-service configuration center in a parameter configuration mode, and the parameters are modified in real time in an interface mode in the mode of butt joint with the configuration center. The real-time adjustment capability ensures the efficient and stable operation of the micro-service under the condition of high concurrency or unstable network, and the system performance and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microservice architecture, and in particular to a method for invoking a dynamic decision-making perception in a microservice scenario. Background Art

[0002] Microservice architecture has become the mainstream paradigm for modern software development, which decomposes complex applications into a set of small, loosely coupled services to promote agile development and rapid iteration. However, as the number of services increases, the complexity of the system also increases, and how to effectively manage and coordinate calls between services becomes a key challenge.

[0003] Service call problems in dynamic environments: In a dynamically changing environment, such as fluctuations in user demand, changes in workload, or dynamic expansion and contraction of service instances, traditional service call methods often cannot adapt to these changes in a timely manner. This may lead to uneven resource utilization, reduced service quality, and even service avalanches, seriously affecting system reliability and user experience.

[0004] Current status of traffic control and service governance: To solve the above problems, various traffic control and service governance mechanisms are adopted in the existing microservice architecture, such as current limiting, circuit breaking, load balancing, etc. However, these mechanisms are usually statically configured or rely on preset rules and thresholds, lacking the ability to perceive real-time environmental changes and flexible dynamic adjustment capabilities. This limits the system's adaptability and resilience in the face of complex and changing scenarios.

[0005] The disadvantages of fixed current limiting and fuse load balancing strategies include:

[0006] Static configuration limitations of microservice architecture: In microservice architecture, traffic control and service governance mechanisms often use static configuration, which shows obvious shortcomings when facing dynamically changing system loads and complex operating environments. Static configuration lacks real-time performance and cannot quickly respond to sudden traffic or service failures, thus affecting the availability and stability of services. In addition, the rules and thresholds preset based on historical data or experience may not match the actual operating status, resulting in the configuration being unable to accurately meet the needs of the current system, further reducing the effectiveness of traffic control and service governance.

[0007] Insufficient dynamic adjustment capabilities: Traditional traffic control and service governance mechanisms are insufficient in terms of dynamic adjustment. These mechanisms usually adopt fixed adjustment strategies, such as linear adjustment or fixed step size, which may be effective in simple scenarios, but in complex and changing systems, they cannot be flexibly adjusted according to real-time data and system status, which may lead to over- or under-adjustment. In addition, due to the lack of real-time perception and dynamic adjustment capabilities, traditional mechanisms have a slow response speed when emergencies occur, which may cause the system to be under excessive traffic pressure in a short period of time, thereby affecting the availability and stability of the service.

[0008] Impact on system performance and stability: The limitations of existing traffic control and service governance mechanisms pose challenges in ensuring system performance and stability. Static configuration and lack of dynamic adjustment capabilities lead to uneven resource utilization. When the system load is light, some services may be idle, while when the load is heavy, some services may be overloaded, reducing the overall performance and efficiency of the system. At the same time, due to the inability to respond to changes in system status in real time, service quality may decline. When there is a burst of traffic or service failure, the system cannot adjust traffic distribution or trigger the fuse mechanism in time, affecting the response time and availability of the service. In addition, the lack of real-time perception and dynamic adjustment capabilities increases the risk of service avalanche. When a service fails, the failure may spread to the entire system, causing a service avalanche. Summary of the invention

[0009] In view of the above problems, the present invention is proposed to provide a calling method for perceiving dynamic decisions in a microservice scenario, which overcomes the above problems or at least partially solves the above problems.

[0010] According to one aspect of the present invention, a method for invoking dynamic decision-making in a microservice scenario is provided, the invoking method comprising: server monitoring and software monitoring, service scheduling strategy decision-making and decision-issuing configuration center;

[0011] The server monitoring and software monitoring adopt an open source monitoring strategy, use multiple monitoring components for monitoring, and integrate the collected monitoring data for persistent storage and cache storage for calculation in the service scheduling decision center;

[0012] The service scheduling strategy decision is calculated based on the data collected by the monitoring component;

[0013] The decision is issued to the configuration center, and the policy issued by the decision center is finally connected to the configuration center of the microservice in the form of configuration parameters. By connecting to the configuration center in the form of an interface, the parameters are modified in real time. Based on the mechanism of microservice event subscription, the microservice can respond in quasi-real time to make the side policy effective.

[0014] Optionally, the calculation based on the data collected by the monitoring component specifically includes:

[0015] Load strategy: classify in equal proportion based on the server's CPU usage ratio and the number of application's current access threads;

[0016] Strategies such as circuit breaker and current limiting are reasonably allocated based on the failure rate of service scheduling and the maximum warning value of CPU.

[0017] Optionally, the decision is issued to a configuration center, and the policy issued by the decision center specifically includes:

[0018] The policies issued by the decision center are ultimately connected to the configuration center of the microservice in the form of configuration parameters;

[0019] By connecting to the configuration center in the form of an interface, the parameters can be modified in real time, and the microservice event subscription mechanism can achieve quasi-real-time response of the microservice to make the side strategy effective.

[0020] Optionally, the server monitoring and software monitoring specifically include:

[0021] When choosing a monitoring strategy, open source monitoring strategies are usually used;

[0022] The advantage of monitoring strategies lies in their openness and flexibility, which can be customized and optimized according to actual needs;

[0023] Choose to use multiple monitoring components to monitor the system comprehensively from different angles and levels;

[0024] In the process of monitoring data collection, the data is stored persistently and cached;

[0025] The collected monitoring data is used for calculations in the service dispatch decision center;

[0026] The service scheduling decision center analyzes and calculates based on the monitoring data to make the best service scheduling decision.

[0027] Optionally, the service scheduling strategy decision specifically includes:

[0028] In the service scheduling strategy decision component, the load strategy is classified in proportion based on indicators such as the server's CPU usage ratio and the number of currently accessed application threads;

[0029] By monitoring the data collected by the component, we can understand the load situation of each server in real time and distribute the requests reasonably according to the load situation.

[0030] Optionally, the service scheduling strategy decision component also implements strategies such as circuit breaking and current limiting, and makes reasonable allocation based on indicators such as service scheduling failure rate and CPU maximum warning value;

[0031] When the failure rate of a service exceeds the preset threshold, the scheduling component triggers the circuit breaker mechanism and suspends calls to the service.

[0032] When the CPU usage is close to the maximum warning value, the scheduling component will restrict access to the service;

[0033] Through intelligent calculation and analysis of the service scheduling strategy decision-making component, automatic adjustment and optimization of load balancing and circuit breaker and current limiting strategies can be achieved.

[0034] Optionally, the decision-making and sending configuration center specifically includes:

[0035] The decision-making configuration center issues policies through the decision-making center. The policies are finally connected to the microservice configuration center in the form of configuration parameters.

[0036] The docking method is achieved through the interface;

[0037] Based on the microservice event subscription mechanism, the microservice can respond in near real time and make the side strategy effective;

[0038] Responsible for formulating and issuing various strategies to guide the behavior and operation of microservices;

[0039] The decision center formulates a new strategy and sends it to the configuration center in the form of configuration parameters;

[0040] The microservice architecture adopts the event subscription mechanism;

[0041] When the configuration center receives new configuration parameters, it triggers the corresponding event and notifies the microservices that have subscribed to the event.

[0042] The present invention provides a method for calling a dynamic decision-making perception in a microservice scenario, the calling method comprising: server monitoring and software monitoring, service scheduling strategy decision and decision-issuing configuration center; the server monitoring and software monitoring adopt an open source monitoring strategy, adopt multiple monitoring components for monitoring, and integrate the collected monitoring data for persistent storage and cache storage for calculation in the service scheduling decision center; the service scheduling strategy decision is calculated based on the data collected by the monitoring component; the decision-issuing configuration center, the strategy issued by the decision center, is finally connected to the configuration center of the microservice in the form of configuration parameters, and the parameters are modified in real time in the form of an interface by connecting to the configuration center, and the microservice is quasi-real-time response based on the microservice event subscription mechanism, so that the side strategy takes effect. The real-time adjustment capability ensures the efficient and stable operation of the microservice under high concurrency or network instability, and improves the system performance and reliability.

[0043] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0045] Figure 1 A flow chart of a server and software monitoring component provided by an embodiment of the present invention;

[0046] Figure 2 A flow chart of a service scheduling strategy decision component provided by an embodiment of the present invention;

[0047] Figure 3 A flowchart that takes effect under a decision provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0049] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0050] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0051] The method of the present invention comprises three components, the first component is a server monitoring and software monitoring component, the second component is a service scheduling strategy decision component, and the third component is a decision-issuing configuration center to make it effective.

[0052] Server monitoring and software monitoring: adopt open source monitoring strategies and multiple monitoring components for monitoring. At the same time, the collected monitoring data is integrated for persistent storage and cache storage for calculation in the service scheduling decision center.

[0053] The service scheduling strategy decision component is the core of the software. It performs calculations based on the data collected by the monitoring component. For example, load strategies are classified in proportion based on the server's CPU usage ratio, the number of current access threads of the application, etc. Circuit breaker and current limiting strategies are reasonably allocated based on the failure rate of service scheduling and the maximum warning value of the CPU.

[0054] The decision to issue the configuration center to make it effective is mainly the strategy issued by the decision center, and finally connected to the configuration center of the microservice in the form of configuration parameters. By connecting to the configuration center in the form of an interface, the parameters are modified in real time. Based on the microservice event subscription mechanism, the microservice can respond in quasi-real time to make the side strategy effective.

[0055] like Figure 1 As shown, server and software monitoring components:

[0056] In the selection of monitoring strategies, open source monitoring strategies are usually adopted. The advantages of this strategy are its openness and flexibility, which can be customized and optimized according to actual needs. At the same time, multiple monitoring components are also selected for monitoring, so as to comprehensively monitor the system from different angles and levels.

[0057] In the process of monitoring data collection, the data is stored persistently and cached. Persistent storage is to ensure the long-term preservation of data and prevent data loss due to system failure or other reasons. Cache storage is to increase the data reading speed and reduce the system response time.

[0058] The collected monitoring data will be used for calculations in the service scheduling decision center. The service scheduling decision center will analyze and calculate based on the data to make the best service scheduling decision. This will not only improve the operating efficiency of the system, but also quickly locate and solve problems when they occur, thereby improving the stability and reliability of the system.

[0059] like Figure 2 As shown, the service scheduling strategy decision component:

[0060] In the service scheduling strategy decision component, the load strategy is classified in proportion based on indicators such as the server's CPU usage ratio and the number of currently accessed threads of the application. By monitoring the data collected by the component, the component can understand the load of each server in real time and reasonably allocate requests based on the load. For example, when the CPU usage of a server is high, the scheduling component will reduce the request allocation to the server to avoid performance degradation or crash caused by overload.

[0061] In addition to load strategies, the service scheduling strategy decision component also implements strategies such as circuit breakers and current limiting. These strategies are reasonably allocated based on indicators such as the failure rate of service scheduling and the highest CPU warning value. When the failure rate of a service exceeds the preset threshold, the scheduling component will trigger the circuit breaker mechanism and suspend the call to the service to prevent further failure spread. At the same time, when the CPU usage is close to the highest warning value, the scheduling component will limit access to the service to avoid system overload.

[0062] Through intelligent calculation and analysis of service scheduling strategy decision components, the software system can automatically adjust and optimize strategies such as load balancing and circuit breaker current limiting. This helps improve the availability and stability of the system and ensure that users can get a high-quality service experience.

[0063] like Figure 3 As shown, the decision takes effect as follows:

[0064] The decision to send the configuration center to make it effective is mainly through the policies sent by the decision center. These policies are finally connected to the configuration center of the microservice in the form of configuration parameters. This connection method is implemented through interfaces, so that parameters can be modified in real time. Based on the microservice event subscription mechanism, the microservice can achieve quasi-real-time response, so that the side policy can take effect.

[0065] The decision center plays an important role in the process of decision-making and issuing configuration center. It is responsible for formulating and issuing various policies, which are designed to guide the behavior and operation of microservices. Once the decision center formulates new policies, it sends them to the configuration center in the form of configuration parameters.

[0066] The microservice architecture uses an event subscription mechanism. This means that microservices can subscribe to specific events and respond immediately when the event occurs. When the configuration center receives new configuration parameters, it triggers the corresponding event to notify the microservices that have subscribed to the event. In this way, the microservice can immediately obtain the latest configuration parameters and make corresponding adjustments and processing based on these parameters.

[0067] Through the above process, the decision-making center sends the configuration center to make the side policy effective. The policy sent by the decision center is connected to the configuration center of the microservice in the form of configuration parameters, and is modified in real time through the interface. Based on the microservice event subscription mechanism, the microservice can achieve quasi-real-time response, so as to operate and execute according to the latest policy. This mechanism improves the flexibility and scalability of microservices, allowing the entire system to better adapt to changing needs and environments.

[0068] Beneficial effects:

[0069] 1. Real-time dynamic decision adjustment

[0070] The present invention realizes real-time dynamic adjustment of microservice scheduling strategies by establishing an independent decision center. The decision center can collect and analyze key monitoring data such as server load, service response time, and network delay, so as to fully grasp the current state of the system. Based on these data, the decision center can automatically adjust scheduling strategies such as load balancing and current limiting fuses. This real-time adjustment capability ensures the efficient and stable operation of microservices under high concurrency or network instability, and improves system performance and reliability.

[0071] 2. Centralized management and control

[0072] The present invention realizes the centralized management and control of microservices, significantly improving management efficiency. Compared with the traditional decentralized management method, the centralized processing of monitoring data by the decision center simplifies the management process and reduces human errors. As an independent entity, the decision center is responsible for the formulation and execution of scheduling strategies, reducing the need for human intervention. This centralized management not only improves operation and maintenance efficiency, but also enhances the system's ability to adapt to complex operating conditions and optimizes user experience and service quality.

[0073] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for invoking dynamic decision-making in a microservice scenario, characterized in that: The calling method includes: server monitoring and software monitoring, service scheduling strategy decision and decision sending configuration center; The server monitoring and software monitoring adopt an open source monitoring strategy, use multiple monitoring components for monitoring, and integrate the collected monitoring data for persistent storage and cache storage for calculation in the service scheduling decision center; The service scheduling strategy decision is calculated based on the data collected by the monitoring component; The decision is issued to the configuration center, and the policy issued by the decision center is finally connected to the configuration center of the microservice in the form of configuration parameters. By connecting to the configuration center in the form of an interface, the parameters are modified in real time. Based on the mechanism of microservice event subscription, the microservice can respond in quasi-real time to make the side policy effective.

2. According to the invocation method of a microservice scenario for perceiving dynamic decision-making, the method is characterized in that: The calculation based on the data collected by the monitoring component specifically includes: Load strategy: classify in equal proportion based on the server's CPU usage ratio and the number of application's current access threads; Strategies such as circuit breaker and current limiting are reasonably allocated based on the failure rate of service scheduling and the maximum warning value of CPU.

3. According to the invocation method of a microservice scenario for perceiving dynamic decision-making, the method is characterized in that: The decision is sent to the configuration center, and the strategy sent by the decision center specifically includes: The policies issued by the decision center are ultimately connected to the configuration center of the microservice in the form of configuration parameters; By connecting to the configuration center in the form of an interface, the parameters can be modified in real time, and the microservice event subscription mechanism can achieve quasi-real-time response of the microservice to make the side strategy effective.

4. According to the invocation method of a microservice scenario for perceiving dynamic decision-making, the method is characterized in that: The server monitoring and software monitoring specifically include: When choosing a monitoring strategy, open source monitoring strategies are usually used; The advantage of monitoring strategies lies in their openness and flexibility, which can be customized and optimized according to actual needs; Choose to use multiple monitoring components to monitor the system comprehensively from different angles and levels; In the process of monitoring data collection, the data is stored persistently and cached; The collected monitoring data is used for calculations in the service dispatch decision center; The service scheduling decision center analyzes and calculates based on the monitoring data to make the best service scheduling decision.

5. According to the invocation method of a microservice scenario for perceiving dynamic decision-making, the method is characterized in that: The service scheduling strategy decision specifically includes: In the service scheduling strategy decision component, the load strategy is classified in proportion based on indicators such as the server's CPU usage ratio and the number of currently accessed application threads; By monitoring the data collected by the component, we can understand the load situation of each server in real time and distribute the requests reasonably according to the load situation.

6. According to the invocation method of a microservice scenario for perceiving dynamic decision making, the method is characterized in that: The service scheduling strategy decision component also implements strategies such as circuit breaking and current limiting, and makes reasonable allocation based on indicators such as service scheduling failure rate and CPU maximum warning value; When the failure rate of a service exceeds the preset threshold, the scheduling component triggers the circuit breaker mechanism and suspends calls to the service. When the CPU usage is close to the maximum warning value, the scheduling component will restrict access to the service; Through intelligent calculation and analysis of the service scheduling strategy decision-making component, automatic adjustment and optimization of load balancing and circuit breaker and current limiting strategies can be achieved.

7. According to claim 1, the calling method for perceiving dynamic decision in a microservice scenario is characterized in that: The decision-making and issuing configuration center specifically includes: The decision-making configuration center issues policies through the decision-making center. The policies are finally connected to the microservice configuration center in the form of configuration parameters. The docking method is achieved through the interface; Based on the microservice event subscription mechanism, the microservice can respond in near real time and make the side strategy effective; Responsible for formulating and issuing various strategies to guide the behavior and operation of microservices; The decision center formulates a new strategy and sends it to the configuration center in the form of configuration parameters; The microservice architecture uses an event subscription mechanism; When the configuration center receives new configuration parameters, it triggers the corresponding event and notifies the microservices that have subscribed to the event.