Intelligent fusing method and system for micro-service architecture

By integrating the dynamic circuit breaker threshold calculation model with the features of Hystrix and Sentinel, and combining the command center, information collection center and business modules, intelligent circuit breaking under the microservice architecture is realized. This solves the problems of insufficient dynamic adaptability and accuracy of existing circuit breaking mechanisms, and improves the responsiveness and resource utilization efficiency of the circuit breaking mechanism.

CN121333892APending Publication Date: 2026-01-13SHANGHAI QUZHI NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511401476.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-01-13

AI Technical Summary

Technical Problem

The existing circuit breaker mechanism in microservice architecture has shortcomings in terms of dynamic adaptability, accuracy and flexibility. In particular, in complex and ever-changing microservice environments, the responsiveness and accuracy of the circuit breaker mechanism are limited.

Method used

The dynamic circuit breaker threshold calculation model, which integrates the features of Hystrix and Sentinel, achieves intelligent circuit breaker logic through the collaborative work of the command center, information collection center, and business modules. This includes the combined judgment of latency and error rate, thread pool management and load balancing, rate limiting and retry mechanisms, providing more flexible and stable circuit breaker management.

Benefits of technology

It improves the dynamic adaptability and accuracy of the circuit breaker mechanism in microservice architecture, reduces resource consumption, and has a sound fault tolerance mechanism and precise access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121333892A_ABST
    Figure CN121333892A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent fusing method and system for a micro-service architecture. The method comprises the steps that a user sends a service request to a high-availability cluster through a client, a command center converts the request into a specific instruction and sends the specific instruction to an information collection center, and then the specific instruction is processed by a service module. A processing result is fed back to the command center, whether abnormity occurs or not is judged according to the result, and corresponding fusing logic is executed. According to the method, the application performance and the user experience under the micro-service architecture are effectively improved by monitoring the service calling stability in real time, optimizing the resource allocation and enhancing the expandability and the flexibility of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to an intelligent circuit breaker method and system for microservice architecture. Background Technology

[0002] In the field of modern internet technology, microservice architecture is widely used due to its high flexibility and scalability. In microservice architecture, the circuit breaker mechanism is a crucial means of ensuring system stability. It can prevent the spread of anomalies when some services experience failures, thereby ensuring the overall health of the system.

[0003] The patent CN119315470A proposes a method for implementing dynamic load balancing and circuit breaking in a monolithic application gateway. This method can dynamically update service load and flexibly configure load balancing and circuit breaking strategies. However, in microservice scenarios, the applicability and flexibility of this method still need to be improved.

[0004] On the other hand, reference patent CN114020559A discloses an application system management method based on microservice components, which manages circuit breaking, degradation and traffic control through a microservice gateway. Although this method can effectively handle abnormal microservice components, it is insufficient in terms of dynamic adjustment of the circuit breaking threshold, which may limit the responsiveness and accuracy of the circuit breaking mechanism in a complex and ever-changing microservice environment.

[0005] The circuit breaker mechanisms in the two reference patents mentioned above still have room for improvement in terms of dynamic adaptability, accuracy, and flexibility. In particular, in complex systems with microservice architectures, how to achieve more intelligent and dynamic circuit breaker management has become an urgent problem to be solved. Summary of the Invention

[0006] Based on this, the embodiments of this application provide an intelligent circuit breaker method and system for microservice architecture. In view of the limitations of existing circuit breaker mechanisms, this application integrates the dynamic circuit breaker threshold calculation model with the characteristics of Hystrix and Sentinel, aiming to provide a more stable and flexible implementation scheme for intelligent circuit breaker systems under microservice architecture.

[0007] Firstly, a smart circuit breaker method for microservice architectures is provided, which includes:

[0008] S1, users send service requests to the high-availability cluster through a client;

[0009] S2, the command center converts the service request into a specific instruction and sends it to the information collection center, which then sends the instruction to the corresponding business module in the data plane;

[0010] S3, the business module performs business processing on service requests;

[0011] S4, after the service processing is completed, the service module feeds back the processing result to the information collection center, and the information collection center feeds back the result to the command center;

[0012] S5, the command center judges whether an exception occurs according to the result, and if an exception occurs, enters the fuse logic;

[0013] S6, the command center informs the related service node of the abnormal condition, and performs service fusing;

[0014] S7, when the exception is removed, the command center sends the service recovery notification to the related service node, and resumes normal work.

[0015] Optionally, in step S5, when the command center judges that an exception occurs, a delay time, an error rate or a combination of the two is used, and one of the conditions is met to consider that an exception occurs.

[0016] Optionally, in step S5, the fuse logic specifically includes the following steps:

[0017] S5.1, the command center records the current time T and the error number N and sets the delay time T1;

[0018] S5.2, after T1 time, check whether the error number N is reduced to the acceptable range X;

[0019] S5.3, if it is not reduced to the acceptable range X, continue to enter the fuse logic;

[0020] S5.4, if the error number N is reduced to the acceptable range X, clear the counter in T1 time.

[0021] Optionally, in step S5.2, the acceptable range X is set to less than three times.

[0022] Optionally, in step S7, when the exception is removed, the command center sends the service recovery notification to the related service node, and starts recording the error number in the delay time.

[0023] Optionally, after step S5, if the judgment result is that no exception occurs, it includes:

[0024] The instruction is sent to the load balancing module to select the appropriate service node;

[0025] The selected service node receives the request by calling the interceptor and performs data formatting processing;

[0026] The formatted data is transmitted to the callback interface of the service provider end to start the service operation process;

[0027] If the request is rejected, a retry mechanism is started to retry according to a preset number of retries;

[0028] If the number of retries exceeds a set value, flow limiting is activated to limit the number of concurrent accesses to the service provider within a specified time.

[0029] Optionally, in step S5, the fuse logic specifically includes:

[0030] A plurality of worker threads are managed by a thread pool to process service requests;

[0031] The number of currently active worker threads in the thread pool is tracked by a counter;

[0032] The load state of the thread pool is evaluated by a signal processor to determine whether there is a full load or overload condition;

[0033] When a full load or overload state is detected, the new request is temporarily stored in a waiting queue;

[0034] When the thread pool does not reach a full load or overload state, the request is directly assigned to a worker thread in the thread pool for processing.

[0035] Optionally, the method further includes:

[0036] Data is obtained and encapsulated from a specified component in the system through an SDK, and the collected data is transmitted reliably; calculations are performed on the received data, and the processed data is saved for query use.

[0037] Optionally, the high-availability cluster has horizontal scalability, and can horizontally expand by increasing the number of servers when server resources are sufficient, thereby increasing the maximum concurrency supported by the system, and dynamically reducing the number of virtual machines to reduce the concurrency supported by the system when needed, to achieve precise control of access to service nodes.

[0038] In a second aspect, an intelligent fuse system for a microservice architecture is provided, which is used to implement the intelligent fuse method of any one of the above first aspect, and the system includes:

[0039] A high-availability cluster including a plurality of servers providing services, configured to obtain service requests sent by users via a client;

[0040] A client configured to send service requests to the high-availability cluster;

[0041] A data plane including a business module and a service call chain;

[0042] A management and control plane including a command center, an information collection center, and a command issuing center;

[0043] The command center is configured to convert the service request command into a specific instruction and send it to the information collection center, judge whether an exception occurs according to a processing result of the business module, and enter a fuse logic when the exception occurs, notify the related service node of the exception, perform service fusing, and send a service recovery notification to the related service node after the exception is removed; the information collection center is configured to receive the instruction sent by the command center and send it to the corresponding business module in the data plane, and receive the processing result of the business module and feed it back to the command center; and the business module is configured to perform business processing on the service request.

[0044] The technical scheme provided by the embodiment of the application has at least the following beneficial effects:

[0045] 1. The application has a perfect fault-tolerant mechanism, and if an exception occurs in the service call chain, the service call chain is fused, and subsequent operations are performed according to the set strategy.

[0046] 2. The intelligent fuse system and the implementation method for the microservice architecture provided by the application increase a flow limiting layer, limit the maximum concurrency in each time period, and reduce resource consumption. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the application or the technical schemes in the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only exemplary, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.

[0048] Figure 1 The step flow chart of the intelligent fuse method for the microservice architecture provided by the embodiment of the application is shown in the figure.

[0049] Figure 2 The intelligent fuse flow chart provided by the optional embodiment of the application is shown in the figure.

[0050] Figure 3 The process flow chart of the customer side accessing the medical service interface is shown in the figure.

[0051] Figure 4 The flow chart of the medical service platform accessing the medical service interface is shown in the figure. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical scheme and advantages of the application more clear, the following will further describe the application in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.

[0053] In the description of this application, the terms "comprising," "having," and any variations thereof are intended to cover non-exclusive inclusion, such as a process, method, system, product, or apparatus that includes a series of steps or units, not necessarily limited to those steps or units that are expressly listed, but may also include other steps or units that are not expressly listed but are inherent to these processes, methods, products, or apparatuses, or steps or units added based on further optimizations conceived in this application.

[0054] Please refer to Figure 1 The document illustrates a flowchart of an intelligent circuit breaker method for microservice architectures provided in an embodiment of this application. This method may include the following steps:

[0055] S1, users send service requests to the high-availability cluster through a client.

[0056] S2, the command center converts service requests into specific instructions and sends them to the information collection center, which then sends the instructions to the corresponding business modules in the data plane.

[0057] S3, the business module performs business processing on service requests.

[0058] S4: After the business process is completed, the business module will send the processing result back to the information collection center, and the information collection center will then send the result back to the command center.

[0059] S5, the command center determines whether an exception has occurred based on the result. If an exception has occurred, the circuit breaker logic is triggered.

[0060] S6, the command center notifies the relevant service nodes of the abnormal situation and performs service circuit breaking.

[0061] S7. Once the anomaly is resolved, the command center will send a notification of service recovery to the relevant service nodes, and normal operation will resume.

[0062] In an optional embodiment of this application, in step S5, when the command center determines that an anomaly has occurred, it uses a delay time, an error rate, or a combination of both. Meeting any one of these conditions is sufficient to determine that an anomaly has occurred.

[0063] In step S5, the circuit breaker logic includes the following steps: S5.1, the command center records the current time T and the number of errors N and sets a delay time T1; S5.2, after time T1, it checks whether the number of errors N has decreased to within the acceptable range X; S5.3, if it has not decreased to within the acceptable range X, the circuit breaker logic continues to be entered; S5.4, if the number of errors N has decreased to within the acceptable range X, the counter for time T1 is cleared.

[0064] In step S6.2, the acceptance range X is set to less than three times.

[0065] In step S7, once the anomaly is resolved, the command center sends a notification of service recovery to the relevant service nodes and begins recording the number of errors within time T1.

[0066] Regarding the implementation environment of the above method: The technical solution adopted by this invention is an intelligent circuit breaker system for microservice architecture, including a high-availability cluster, a client, a data plane, and a management and control plane. The high-availability cluster includes multiple servers providing services; the client accesses the high-availability cluster to provide services through service requests; the data plane includes business modules and service call chains; the management and control plane includes a command center, an information collection center, and a command issuance center.

[0067] The following is a preferred embodiment: Figure 2 As shown, the present invention provides an intelligent circuit breaker system for microservice architecture, including a service caller and a service provider. The service caller is equipped with a circuit breaker module, a load balancing module and a call interceptor; the service provider is equipped with a callback interface, a retry mechanism module and a rate limiting module.

[0068] The circuit breaker module is connected to both the service caller and the service provider. When the service caller requests a service from the service provider, it first enters the circuit breaker module for circuit breaker logic processing. If the current request is allowed to execute, it enters the load balancing module to select a service node. Then, it performs unified data formatting processing in the call interceptor and finally enters the callback interface of the service provider to start the business operation. Otherwise, if the current request is rejected, it will be retried according to the configured number of retries. If the number of retries is exceeded, it enters the rate limiting module to limit the number of concurrent accesses to the service provider within a certain period of time.

[0069] The circuit breaker module includes a thread pool, a counter, and a signal handler. The thread pool contains multiple worker threads; the counter records the number of valid worker threads in the current thread pool; the signal handler is used to determine whether the current thread is in a fully loaded or overloaded state. If it is in a fully loaded or overloaded state, the current request is placed in the waiting queue; if it is not in a fully loaded or overloaded state, the current request is directly dispatched to a worker thread in the thread pool.

[0070] The load balancing module uses a weighted random algorithm to select service nodes.

[0071] Microservice systems are deployed in standard cloud environments, including public, private, hybrid, and multi-cloud environments. Microservices are inherently horizontally scalable; when server resources are sufficient, the number of servers can be horizontally increased to raise the maximum concurrency supported by the system. Alternatively, virtual machines can be dynamically deleted to reduce the system's concurrency support, allowing for precise control over the service nodes accessed.

[0072] The system also includes a data monitoring module, which comprises a data acquisition module, a data transmission module, a data calculation module, and a data storage module. The data acquisition module obtains encapsulated data from specified components via an SDK; the data transmission module is responsible for reliably transmitting the collected data; the data calculation module is responsible for performing mathematical calculations on the data; and the data storage module is responsible for saving the processed data for users to query.

[0073] Figure 3 This demonstrates the process of a client accessing a healthcare service interface.

[0074] Step S1: The user submits a request to the microservice system; Step S2: The circuit breaker module performs circuit breaker logic processing; Step S3: The load balancing module selects a service node; Step S4: The interceptor is called to perform unified data formatting processing; Step S5: The callback interface of the service provider is entered; Step S6: Business operations begin.

[0075] Figure 4 The flowchart illustrates how the medical service platform accesses the medical service interface.

[0076] Step S11: Create an order; Step S12: Call the account opening interface; Step S13: The third-party payment platform confirms receipt of payment; Step S14: Call the order placement interface; Step S15: The third-party delivery platform assigns a courier; Step S16: The user completes the order placement.

[0077] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0078] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A smart circuit breaker method for microservice architecture, characterized in that, The method includes: S1, users send service requests to the high-availability cluster through a client; S2, the command center converts the service request into a specific instruction and sends it to the information collection center, which then sends the instruction to the corresponding business module in the data plane; S3, the business module performs business processing on service requests; S4. After the business process is completed, the business module will send the processing result back to the information collection center, and the information collection center will then send the result back to the command center. S5, the command center determines whether an anomaly has occurred based on the result. If an anomaly has occurred, the circuit breaker logic is triggered. S6, the command center notifies the relevant service nodes of the abnormal situation and performs service circuit breaking; S7. Once the anomaly is resolved, the command center will send a notification of service recovery to the relevant service nodes, and normal operation will resume.

2. The intelligent fuse-breaking method according to claim 1, characterized in that, In step S5, when the command center determines that an anomaly has occurred, it uses a method of delay time, error rate, or a combination of both. Meeting any one of these conditions is sufficient to determine that an anomaly has occurred.

3. The intelligent fuse-breaking method according to claim 1, characterized in that, In step S5, the circuit breaker logic specifically includes the following steps: S5.1, the command center records the current time T and the number of errors N and sets the delay time T1; S5.2 After time T1, check whether the number of errors N has decreased to within the acceptable range X; S5.3 If the temperature does not drop below the acceptable range X, the circuit breaker logic will continue to be triggered. S5.4 If the number of errors N decreases to within the acceptable range X, then clear the counter for time T1.

4. The intelligent fuse-breaking method according to claim 3, characterized in that, In step S5.2, the acceptance range X is set to less than three times.

5. The intelligent fuse-breaking method according to claim 1, characterized in that, In step S7, once the anomaly is resolved, the command center sends a notification of service recovery to the relevant service nodes and begins recording the number of errors during the delay period.

6. The intelligent fuse-breaking method according to claim 1, characterized in that, After step S5, if the judgment result is that no abnormality has occurred, including: The instruction is sent to the load balancing module to select an appropriate service node; The selected service node receives the request by calling the interceptor and performs data formatting processing; The formatted data is passed to the callback interface of the service provider to initiate the business operation process; If the request is rejected, a retry mechanism is initiated, and the request is retried according to the preset number of retries. If the number of retries exceeds the set value, rate limiting will be activated to limit the number of concurrent accesses to the service provider within a specified time.

7. The intelligent fuse-breaking method according to claim 1, characterized in that, In step S5, the circuit breaker logic specifically includes: Use a thread pool to manage multiple worker threads to handle service requests; The number of currently active worker threads in the thread pool is tracked using a counter. The load status of the thread pool is evaluated by the signal handler to determine whether there is a full load or overload situation; When a full load or overload state is detected, new requests are temporarily placed in the waiting queue. When the thread pool is not at full capacity or overloaded, requests are directly assigned to worker threads in the thread pool for processing.

8. The intelligent fuse-breaking method according to claim 1, characterized in that, The method further includes: Data is retrieved and encapsulated from specified components in the system using the SDK, and the collected data is reliably transmitted; calculations are performed on the received data, and the processed data is saved for querying.

9. The intelligent fuse-breaking method according to claim 1, characterized in that, High-availability clusters are horizontally scalable, enabling them to scale horizontally by increasing the number of servers when server resources are sufficient, thereby increasing the maximum concurrency supported by the system. They can also dynamically reduce the number of virtual machines when needed to reduce the concurrency supported by the system, achieving precise control over access to service nodes.

10. A smart circuit breaker system for microservice architectures, used to implement the smart circuit breaker method as described in any one of claims 1-9, characterized in that, The system includes: A high-availability cluster consists of multiple servers that provide services and are used to receive service requests sent by users through clients. The client is used to send service requests to the high-availability cluster; The data plane includes business modules and service call chains; The control plane includes a command center, an information collection center, and a command issuance center; The command center is used to convert service request commands into specific instructions and send them to the information collection center. It determines whether an anomaly has occurred based on the processing results of the business modules, and if an anomaly occurs, it initiates circuit breaker logic to notify relevant service nodes of the anomaly and to perform service circuit breaker. After the anomaly is resolved, it sends a service recovery notification to the relevant service nodes. The information collection center is used to receive instructions sent by the command center and send them to the corresponding business modules in the data plane, as well as to receive the processing results of the business modules and feed them back to the command center. The business modules are used to perform business processing on service requests.

Citation Information

Patent Citations

  • Outdoor power distribution network frame capable of being used in cooperation with power distribution system

    CN119315470A