Fuse parameter adjusting method and device, electronic equipment and medium

By acquiring real-time data and historical benchmark values ​​of performance indicators, calculating the anomaly degree, and dynamically adjusting fuse parameters, the problem of fuse parameters not being able to adapt to dynamic changes in the system is solved, thereby improving the stability and reliability of the system.

CN121807602APending Publication Date: 2026-04-07BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the parameters of fuses cannot adapt to dynamic changes in the system, resulting in false alarms during low traffic periods or missed alarms during high traffic periods, making it impossible to isolate faults in a timely manner and leading to high operation and maintenance costs.

Method used

By acquiring real-time data and historical benchmark values ​​of various performance indicators, the anomaly rate is calculated, and the circuit breaker parameters, such as error rate threshold, circuit breaker sleep time, and minimum request quantity, are dynamically adjusted in combination with preset adjustment rules to ensure that the parameters and the anomaly rate are in a preset correlation.

Benefits of technology

It enables adaptive adjustment of fuse parameters, improves system stability and reliability, prevents fault propagation, and reduces false triggering and hysteresis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807602A_ABST
    Figure CN121807602A_ABST
Patent Text Reader

Abstract

The invention provides a fuse parameter adjusting method and device, electronic equipment and a medium, and the method comprises the steps: obtaining real-time data and historical reference values of all performance indexes at a current moment, the historical reference values comprise historical mean values and historical standard deviations of all performance indexes in a preset time window before the current moment, and the historical mean values and the historical standard deviations are obtained; calculating the abnormality of each performance index at the current moment according to the real-time data of each performance index at the current moment and the historical mean value and the historical standard deviation of each performance index within the preset window time before the current moment, and calculating the abnormality of each performance index at the current moment according to the abnormality of each performance index at the current moment. The fuse parameters are adjusted in combination with a preset adjustment rule, target fuse parameters are obtained, and the fuse parameters comprise at least one of an error rate threshold value, fusing sleep time and the minimum request quantity. The method can overcome the defect that fuse parameters depend on manual static configuration, and is adaptive to dynamic change of a system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device and medium for adjusting fuse parameters. Background Technology

[0002] In large-scale distributed software systems with a microservices architecture, the system consists of numerous independent services that call each other. A failure in a single service can propagate rapidly through the call chain, causing the entire system to crash. Circuit breakers prevent such cascading failures by cutting off the faulty call chain, thereby reducing invalid calls to faulty services and saving system resources (such as threads and network bandwidth).

[0003] In related technologies, the core circuit breaker logic mainly relies on a set of statically configured thresholds. Developers or operations personnel need to manually set circuit breaker parameters for each service based on experience, such as "break circuit when the error rate exceeds 50%", "suspend for 5 seconds after breaking circuit before attempting to resume", and "calculate only when there are at least 20 requests in the statistics window". However, this static threshold strategy has the following drawbacks: Since the load of the current application is usually dynamic, with obvious peaks and troughs (such as day-night differences, promotional activities), the static threshold may be too sensitive during low traffic periods, triggering circuit breaking due to a small number of failed requests (false alarms); during high traffic periods, it may be too sluggish, failing to isolate faults in time (missed alarms).

[0004] Therefore, overcoming the limitation that fuse parameters rely on manual static configuration and cannot adapt to dynamic changes in the system is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] To solve the above-mentioned technical problems, or at least partially solve them, this disclosure provides a method, apparatus, electronic device, and medium for adjusting fuse parameters, which solves the problem that fuse parameters cannot adapt to dynamic changes in the system in the prior art.

[0006] To achieve the above objectives, the present disclosure provides the following technical solutions: In a first aspect, embodiments of this disclosure provide a method for adjusting fuse parameters, the method comprising: Obtain real-time data and historical benchmark values ​​for each performance indicator at the current moment; the historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment; Based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window period before the current moment, the anomaly degree of each performance indicator at the current moment is calculated; the anomaly degree is used to represent the degree of deviation of the real-time data of each performance indicator from the historical mean. Based on the anomaly degree of each performance indicator at the current moment, the fuse parameters are adjusted in conjunction with preset adjustment rules to obtain target fuse parameters. The fuse parameters include at least one of error rate threshold, fuse sleep time, and minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient so that the fuse parameters and the anomaly degree have a preset correlation relationship.

[0007] As an optional implementation of this disclosure, when the fuse parameters are an error rate threshold, the step of adjusting the fuse parameters according to the anomaly degree of each performance index at the current moment, combined with a preset adjustment rule, to obtain the target fuse parameters includes: Obtain the initial error rate threshold; Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold; If the anomaly of the first performance indicator is greater than the first anomaly threshold, then the target error rate threshold is determined based on the initial error rate threshold, the first adjustment coefficient, the anomaly of the first performance indicator, and the lower limit of the error rate threshold.

[0008] As an optional implementation of this disclosure, determining the target error rate threshold based on the initial error rate threshold, the first adjustment coefficient, the anomaly degree of the first performance indicator, and the lower limit of the error rate threshold includes: The target error rate threshold is determined using the following formula:

[0009] in, Indicates the target error rate threshold. This represents the lower limit of the error rate threshold. This represents the initial error rate threshold. This represents the first adjustment coefficient, used to control the degree of influence of the anomaly rate of the first performance indicator on the target error rate threshold. This indicates the degree of abnormality of the first performance indicator.

[0010] As an optional implementation of this disclosure, when the fuse parameter is the fuse sleep time, the step of adjusting the fuse parameter according to the abnormality of each performance index at the current moment and in combination with a preset adjustment rule to obtain the target fuse parameter includes: Obtain the initial circuit breaker sleep time; Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold, and whether the abnormality of the second performance indicator is greater than the second abnormality threshold. If the abnormality of the first performance indicator is greater than the first abnormality threshold, and the abnormality of the second performance indicator is greater than the second abnormality threshold, then the target circuit breaker sleep time is determined based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance indicator, the abnormality of the second performance indicator, and the upper limit of the circuit breaker sleep time.

[0011] As an optional implementation of this disclosure, determining the target circuit breaker sleep time based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance index, the abnormality of the second performance index, and the upper limit of the circuit breaker sleep time includes: The target circuit breaker sleep time is determined using the following formula:

[0012] in, Indicates the target circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time. Indicates the initial circuit breaker sleep time. This represents the second adjustment coefficient, used to control the degree of abnormality of the first performance index and the degree of influence of the degree of abnormality of the second performance index on the target circuit breaker sleep time. Indicates the degree of abnormality of the first performance indicator. This indicates the degree of abnormality of the second performance indicator.

[0013] As an optional implementation of this disclosure, when the fuse parameters are the minimum request quantity, the step of adjusting the fuse parameters according to the abnormality of each performance index at the current moment and in combination with preset adjustment rules to obtain the target fuse parameters includes: Determine whether the anomaly of the third performance indicator is less than the third anomaly threshold; If the abnormality of the third performance metric is less than the third abnormality threshold, then the target minimum request quantity is determined based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit.

[0014] As an optional implementation of this disclosure, determining the target minimum request quantity based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit includes: The target minimum request quantity is determined using the following formula:

[0015] in, Indicates the minimum number of requests required. This indicates the maximum number of requests. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance metric on the target minimum request quantity. This indicates the degree of abnormality of the third performance indicator.

[0016] Secondly, embodiments of this disclosure provide a fuse parameter adjustment device, comprising: The acquisition module is used to obtain real-time data and historical benchmark values ​​of each performance indicator at the current moment; the historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment. The calculation module is used to calculate the anomaly of each performance indicator at the current moment based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window period before the current moment; the anomaly is used to represent the degree of deviation of the real-time data of each performance indicator from the historical mean. An adjustment module is used to adjust the fuse parameters based on the anomaly degree of each performance indicator at the current moment, combined with a preset adjustment rule, to obtain target fuse parameters. The fuse parameters include at least one of error rate threshold, fuse sleep time, and minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient, so that the fuse parameters and the anomaly degree have a preset correlation relationship.

[0017] As an optional implementation of this disclosure, when the fuse parameter is an error rate threshold, the adjustment module includes: The first acquisition unit is used to acquire the initial error rate threshold; The first judgment unit is used to determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold. The first determining unit is configured to determine a target error rate threshold based on the initial error rate threshold, the first adjustment coefficient, the anomaly of the first performance indicator, and the lower limit of the error rate threshold if the anomaly degree of the first performance indicator is greater than the first anomaly degree threshold.

[0018] As an optional implementation of this disclosure, the first determining unit is specifically used for: The target error rate threshold is determined using the following formula:

[0019] in, Indicates the target error rate threshold. This represents the lower limit of the error rate threshold. This represents the initial error rate threshold. This represents the first adjustment coefficient, used to control the degree of influence of the anomaly rate of the first performance indicator on the target error rate threshold. This indicates the degree of abnormality of the first performance indicator.

[0020] As an optional implementation of this disclosure, when the fuse parameter is the fuse sleep time, the adjustment module includes: The second acquisition unit is used to acquire the initial circuit breaker sleep time; The second judgment unit is used to determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold, and whether the abnormality of the second performance indicator is greater than the second abnormality threshold. The second determining unit is configured to determine a target circuit breaker sleep time based on the initial circuit breaker sleep time, the second adjustment coefficient, the anomaly of the first performance indicator, the anomaly of the second performance indicator, and the upper limit of the circuit breaker sleep time if the anomaly of the first performance indicator is greater than the first anomaly threshold and the anomaly of the second performance indicator is greater than the second anomaly threshold.

[0021] As an optional implementation of this disclosure, the second determining unit is specifically used for: The target circuit breaker sleep time is determined using the following formula:

[0022] in, Indicates the target circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time. Indicates the initial circuit breaker sleep time. This represents the second adjustment coefficient, used to control the degree of abnormality of the first performance index and the degree of influence of the degree of abnormality of the second performance index on the target circuit breaker sleep time. Indicates the degree of abnormality of the first performance indicator. This indicates the degree of abnormality of the second performance indicator.

[0023] As an optional implementation of this disclosure, when the fuse parameter is the minimum requested amount, the adjustment module includes: The third judgment unit is used to determine whether the abnormality of the third performance index is less than the third abnormality threshold. The third determining unit is used to determine the target minimum request quantity based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit if the abnormality of the third performance indicator is less than the third abnormality threshold.

[0024] As an optional implementation of this disclosure, the third determining unit is specifically used for: The target minimum request quantity is determined using the following formula:

[0025] in, Indicates the minimum number of requests required. This indicates the maximum number of requests. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance metric on the target minimum request quantity. This indicates the degree of abnormality of the third performance indicator.

[0026] Thirdly, embodiments of this disclosure provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the fuse parameter adjustment method described in the first aspect or any embodiment of the first aspect.

[0027] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the fuse parameter adjustment method described in the first aspect or any embodiment of the first aspect.

[0028] The fuse parameter adjustment method disclosed herein obtains real-time data and historical benchmark values ​​of various performance indicators at the current moment. The historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window prior to the current moment. Based on the real-time data of each performance indicator at the current moment and the historical mean and historical standard deviation of each performance indicator within the preset window period prior to the current moment, the anomaly degree of each performance indicator at the current moment is calculated. Based on the anomaly degree of each performance indicator at the current moment, and in conjunction with preset adjustment rules, the fuse parameters are adjusted to obtain target fuse parameters. The fuse parameters include at least one of an error rate threshold, a fuse sleep time, and a minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient, so that the fuse parameters and the anomaly degree have a preset correlation. By using historical benchmarks and real-time anomaly calculations, the circuit breaker parameters can be dynamically adjusted based on the current operating status of the service, thereby better adapting to constantly changing loads and operating conditions. Dynamically adjusting the circuit breaker parameters helps to respond quickly when the service experiences performance degradation or failure, and prevents the spread of faults through the circuit breaker mechanism, thereby improving the stability and reliability of the entire system. Attached Figure Description

[0029] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0030] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0031] Figure 1 This is a flowchart illustrating the fuse parameter adjustment method in an embodiment of this disclosure; Figure 2 This is a schematic diagram of the fuse parameter adjustment device in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of the electronic device described in an embodiment of this disclosure. Detailed Implementation

[0032] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0033] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0034] The terms "first" and "second" and other relational terms used in this disclosure and claims are merely used to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0035] In this disclosure, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of the embodiments in this disclosure, unless otherwise stated, "a plurality of" means two or more.

[0036] Terminology Explanation: Cloud-native computing refers to building and running elastically scalable and highly available applications in a cloud computing environment using technologies such as containerization, microservices, and immutable infrastructure.

[0037] Microservice architecture is an architectural style that breaks down complex applications into a set of small, independent services, each built around a specific business function and capable of being deployed and scaled independently.

[0038] When a software system detects that the number of failed calls to a service exceeds a certain threshold, the circuit breaker will automatically "break" the circuit, preventing subsequent calls to that service and thus avoiding further spread of the fault.

[0039] Circuit breakers typically have three states: closed, open, and half-open. The closed state is the initial state of the circuit breaker; in this state, the caller can normally invoke the target service. Each time the target service is invoked, the circuit breaker records the result (success or failure). If the number of failures reaches a preset threshold, the circuit breaker switches to the open state. In the open state, the circuit breaker blocks all calls to the target service and directly returns a failure result (usually a custom error message or a degradation response). In the open state, the circuit breaker prevents further escalation of the fault while giving the target service some time to recover. A timeout period (e.g., 30 seconds or 1 minute) is usually set, during which the circuit breaker remains open. After the timeout, the circuit breaker enters the half-open state. In the half-open state, the circuit breaker allows a certain number of calls to pass through to check if the target service has recovered. If these calls succeed, the circuit breaker switches back to the closed state; if the calls still fail, the circuit breaker re-enters the open state.

[0040] In large-scale distributed software systems with a microservices architecture, the system consists of numerous independent services that call each other. A failure in a single service can propagate rapidly through the call chain, causing the entire system to crash. Circuit breakers prevent such cascading failures by cutting off the faulty call chain, thereby reducing invalid calls to faulty services and saving system resources (such as threads and network bandwidth).

[0041] In related technologies, the core circuit breaker logic mainly relies on a set of statically configured thresholds. Developers or operations personnel need to manually set circuit breaker parameters for each service based on experience, such as "break circuit when the error rate exceeds 50%", "suspend for 5 seconds after breaking circuit before attempting to resume", and "calculate only when there are at least 20 requests in the statistics window". However, this static threshold strategy has the following drawbacks: Since the load of the current application is usually dynamic, with obvious peaks and troughs (such as day-night differences, promotional activities), the static threshold may be too sensitive during low traffic periods, triggering circuit breaking due to a small number of failed requests (false alarms); during high traffic periods, it may be too sluggish, failing to isolate faults in time (missed alarms).

[0042] Therefore, overcoming the limitations of relying on manual static configuration of fuse parameters, which prevents them from adapting to dynamic system changes, resulting in high maintenance costs, and the risk of false triggering or delayed fuse operation is a pressing technical problem that needs to be solved.

[0043] To address the aforementioned problems, this application provides a method for adjusting fuse parameters, such as... Figure 1 As shown, a method for adjusting fuse parameters is provided, including the following steps S11-S13.

[0044] S11. Obtain real-time data and historical baseline values ​​for each performance indicator at the current moment.

[0045] The performance metrics include: error rate, average response time, and maximum concurrency.

[0046] The historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment.

[0047] It should be noted that the preset time window can be selected according to the actual situation. A longer time window can provide a more stable baseline, but it is slower to adapt to long-term changes in system behavior; a shorter time window is more adaptable, but it may be more affected by short-term disturbances. For example, the preset time window can be 1 minute, 5 minutes, or other reasonable values, without specific restrictions here.

[0048] Error rate: This refers to the proportion of failed requests out of the total number of requests within a certain period. The error rate measures the percentage of service requests that fail; it is an objective metric based on the actual request outcome (success or failure). It is a real-time calculated indicator that reflects the service's performance over a specific time period. For example, if a service processes 100 requests in one minute, with 10 failing, the error rate is calculated as follows: Error rate = 10 / 100 × 100% = 10%. Typically, a fixed time window (such as 1 minute, 5 minutes, etc.) is chosen to calculate the error rate. This time window can be adjusted based on the system's real-time requirements and monitoring needs.

[0049] Average response time: This refers to the average response time of all requests within a certain period of time, reflecting the overall efficiency of the service in processing requests. Assuming that the service processes 5 requests in 1 minute, with response times of 100ms, 200ms, 300ms, 400ms, and 500ms respectively, the average response time is calculated as follows: Average response time = (100 + 200 + 300 + 400 + 500) / 5 = 300ms.

[0050] Maximum concurrency: This refers to the maximum number of requests a service can handle simultaneously within a given time period. It reflects the service's concurrent processing capacity. Maximum concurrency helps assess a service's processing capacity under high load. For example, if the number of concurrent requests for a service is 10, 15, 20, 18, and 12 at different points in one minute, then the maximum concurrency is 20.

[0051] In this embodiment, error rate, average response time, and maximum concurrency are the basic metrics. In practical applications, these metrics can be expanded according to specific business scenarios and concerns. For example, performance metrics may also include: slow call ratio, CPU utilization, queue backlog length, network I / O, and the ratio of custom business error codes.

[0052] Specifically, the method of this disclosure can be applied to large-scale distributed software systems employing a microservice architecture, such as backend services of large-scale internet applications, financial transaction systems, Internet of Things (IoT) platforms, and cloud computing PaaS / SaaS services. To comprehensively assess the health of the service, multiple performance metrics can be monitored in real time. That is, real-time data of each performance metric at the current moment can be obtained.

[0053] To determine whether any performance indicators are abnormal at the current moment, historical baseline values ​​for each performance indicator can be calculated. Specifically, the historical mean and standard deviation of each performance indicator within a preset time window prior to the current moment can be calculated. Historical data can be derived from monitoring data collected within a fixed time window (e.g., every minute) over a historical period (e.g., the past 7 days or the past 24 hours). A sliding window mechanism is used to calculate and update historical baseline values; for example, the mean and standard deviation over the past N hours can be calculated every minute.

[0054] By using a sliding window mechanism, historical baseline values ​​can be dynamically updated to reflect the "latest historical state" up to the current time. In anomaly calculation, these baseline values ​​corresponding to time t are used to evaluate the deviation of real-time values, thereby enabling real-time monitoring and anomaly detection of service performance.

[0055] S12. Calculate the anomaly of each performance indicator at the current moment based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within the preset window time before the current moment.

[0056] Optionally, step S12 above (calculating the anomaly of each performance indicator at the current moment based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window period before the current moment) can be implemented in the following way: The abnormality of each performance indicator is calculated using the following formula:

[0057] in, Indicates the first Each performance metric at the current moment abnormality Indicates the first The real-time value of each performance metric at the current moment. Indicates the first The historical average of each performance metric within a preset time window prior to the current moment. Indicates the first The historical standard deviation of each performance metric within a preset time window prior to the current moment. This means selecting the value that is greater than the other of the two values. It represents a positive number and is used to prevent division by zero.

[0058] Specifically, to obtain the first Each performance metric at the current moment The real-time value is denoted as Then, determine the first The historical average of a performance metric within a preset time window prior to the current moment is denoted as . And the historical standard deviation, denoted as Next, calculate the real-time value. Compared with historical average The difference between them, i.e. To avoid historical standard deviation A division-by-zero error occurs when the value is extremely small or zero, introducing a very small positive number. In the calculation, max( , To ensure the denominator is not zero, finally, calculate the difference. Divide by max( , ), to obtain the first Each performance metric at the current moment abnormality That is, anomaly degree. Reflects the first The degree to which the real-time value of a performance indicator deviates from its historical mean is an important indicator for assessing whether the performance indicator is abnormal.

[0059] For example, suppose there are three performance metrics: error rate, average response time, and maximum concurrency. This represents the anomaly degree of the first performance metric (error rate) at the current moment; that is, the anomaly degree of the first performance metric. This indicates the anomaly of the second performance metric (average response time) at the current moment; that is, the anomaly of the second performance metric. This indicates the degree of anomaly of the third performance metric (maximum concurrency) at the current moment; that is, the degree of anomaly of the third performance metric.

[0060] S13. Based on the degree of abnormality of each performance index at the current moment, and in conjunction with the preset adjustment rules, adjust the fuse parameters to obtain the target fuse parameters.

[0061] The circuit breaker parameters include at least one of the following: error rate threshold, circuit breaker sleep time, and minimum request quantity.

[0062] Error rate threshold: Used to trigger specific system behaviors or decisions, such as circuit breaking mechanisms. The error rate threshold is a subjectively set parameter. When the error rate exceeds this threshold, the system considers the service potentially problematic and requires corresponding measures. For example, if the error rate threshold for an online service is set to 5%, and within a certain period the calculated error rate is 6% (exceeding the 5% threshold), the system may automatically trigger the circuit breaker mechanism to block further requests to the service, preventing the failure from spreading. Setting the error rate threshold requires consideration of the service's importance, business impact, and acceptable risk level to ensure system stability and reliability.

[0063] The circuit breaker sleep time is a key parameter in the circuit breaker mode. It specifies the duration for which the circuit breaker will remain in the "open" state after detecting a service failure. During this time, the circuit breaker will block all calls to the service to prevent further failure propagation and give the service time to recover.

[0064] Minimum Request Volume is a key parameter in circuit breaker design. It ensures sufficient data samples for accurate judgment when evaluating service performance and deciding whether to trigger the circuit breaker mechanism. With low request volume, a small number of failed requests may lead to an abnormally high error rate calculation, resulting in false circuit breaker triggers. Setting a minimum request volume avoids this situation, ensuring that the circuit breaker only determines whether to trigger based on the error rate when the request volume reaches a certain level.

[0065] The preset adjustment rule is as follows: based on the comparison result of the anomaly degree of the target performance index and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient so that the fuse parameters and the anomaly degree have a preset correlation relationship.

[0066] Specifically, the current anomaly level of a certain performance indicator is compared with the corresponding preset anomaly threshold. Based on the comparison result, an output is given indicating whether to adjust the corresponding fuse parameter. Furthermore, the adjustment direction of the fuse parameter is determined according to the fuse's operational requirements, such as increasing or decreasing it. If it is determined that the fuse parameter should be adjusted, a preset adjustment coefficient is used to limit the magnitude of the parameter change, avoiding over- or under-adjustment, thus ensuring a preset correlation between the fuse parameter and the anomaly level.

[0067] It should be noted that different performance indicators correspond to independent preset anomaly thresholds, and the setting of preset anomaly thresholds needs to be determined in combination with the physical meaning of the specific performance indicator and the operating requirements of the fuse.

[0068] The adjustment direction is strongly correlated with the function of the circuit breaker parameters. The core adaptation principle is that the parameter adjustment direction must match the circuit breaker's operational needs under abnormal scenarios, that is, to suppress the escalation of anomalies and ensure system stability through circuit breaker parameter adjustments. For example, when the anomaly level indicates an increased system risk, if the parameter function is the threshold for triggering the circuit breaker, such as the error rate threshold, then the parameter needs to be lowered to reduce the trigger threshold and trigger the circuit breaker earlier to avoid risks. If the parameter function is the protection duration after the circuit breaker is triggered, such as the circuit breaker sleep time, then the parameter needs to be increased to extend the sleep time and provide more recovery time for the service. When the anomaly level indicates a stable system state, such as small load fluctuations and high service stability, if the parameter function is the minimum request quantity to trigger the circuit breaker, then the adjustment direction can be determined according to requirements, such as fine-tuning by increasing or decreasing the parameter to ensure the accuracy of the circuit breaker judgment.

[0069] In some embodiments, when the fuse parameters are error rate thresholds, step S13 (adjusting the fuse parameters based on the anomaly degree of each performance index at the current moment and in conjunction with preset adjustment rules to obtain the target fuse parameters) is implemented in the following manner: 1) Obtain the initial error rate threshold.

[0070] The initial error rate threshold can be understood as the default error rate threshold, or the error rate threshold before adjustment at the current time t. The initial error rate threshold can be set according to the actual application scenario. For example, the initial error rate threshold can be 30%, 50%, 70%, or other reasonable values; no specific restrictions are imposed here.

[0071] 2) Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold.

[0072] The first anomaly threshold is a threshold set for the anomaly of the first performance indicator, which is the error rate. This threshold can be set according to the actual application situation, and no specific restrictions are imposed here.

[0073] 3) If the abnormality of the first performance indicator is greater than the first abnormality threshold, then the target error rate threshold is determined based on the initial error rate threshold, the first adjustment coefficient, the abnormality of the first performance indicator, and the lower limit of the error rate threshold.

[0074] Specifically, if the anomaly degree of the first performance indicator is greater than the first anomaly degree threshold, the target error rate threshold is determined based on the initial error rate threshold, the first adjustment coefficient, the anomaly degree of the first performance indicator, and the lower limit of the error rate threshold. Conversely, if the anomaly degree of the first performance indicator is less than or equal to the first anomaly threshold, then there is no need to adjust the initial error rate threshold, indicating that the circuit breaker parameter settings meet the service requirements at this time.

[0075] Optionally, the above step (determining the target error rate threshold based on the initial error rate threshold, the first adjustment coefficient, the anomaly of the first performance indicator, and the lower limit of the error rate threshold) is implemented in the following way: The target error rate threshold is determined using the following formula:

[0076] in, Indicates the target error rate threshold. This represents the lower limit of the error rate threshold. This represents the initial error rate threshold. This represents the first adjustment coefficient, used to control the degree of influence of the anomaly rate of the first performance indicator on the target error rate threshold. This indicates the anomaly level of the primary performance metric. It should be noted that this is the lower limit of the error rate threshold. This is the minimum acceptable error rate threshold, for example, it can be set to 30%. Initial error rate threshold. The default value can be used, for example, it can be set to 30%. The first adjustment coefficient is used to control the degree of influence of the abnormality of the first performance indicator on the target error rate threshold, for example, it can be set to 5. The function ensures that the adjusted threshold will not fall below the set lower limit of the error rate threshold.

[0077] Specifically, the greater the abnormality of the error rate, that is, the more the current error rate exceeds the historical normal level, the lower the target error rate threshold will be, making it easier for the circuit breaker to be triggered, which helps to intervene quickly in the early stages of service deterioration.

[0078] In some embodiments, when the fuse parameter is the fuse sleep time, the above step S13 (adjusting the fuse parameter according to the abnormality of each performance index at the current moment and combining it with a preset adjustment rule to obtain the target fuse parameter) is implemented in the following way: (1) Obtain the initial circuit breaker sleep time.

[0079] The initial circuit breaker sleep time can be understood as the default circuit breaker sleep time, or the circuit breaker sleep time before adjustment at the current time t. The initial circuit breaker sleep time can be set according to the actual application scenario. For example, the initial circuit breaker sleep time can be 3 seconds, 5 seconds, 10 seconds, or other reasonable values. There are no specific restrictions here.

[0080] (2) Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold, and whether the abnormality of the second performance indicator is greater than the second abnormality threshold.

[0081] The first anomaly threshold is a threshold set for the anomaly level of the first performance metric, which is the error rate. This threshold can be set according to the actual application and is not specifically limited here. The second anomaly threshold is a threshold set for the anomaly level of the second performance metric, which is the average response time. This threshold can also be set according to the actual application and is not specifically limited here.

[0082] (3) If the abnormality of the first performance index is greater than the first abnormality threshold, and the abnormality of the second performance index is greater than the second abnormality threshold, then the target circuit breaker sleep time is determined based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance index, the abnormality of the second performance index, and the upper limit of the circuit breaker sleep time.

[0083] Specifically, if the anomaly of the first performance metric is greater than the first anomaly threshold, and the anomaly of the second performance metric is greater than the second anomaly threshold, then the target circuit breaker sleep time is determined based on the initial circuit breaker sleep time, the second adjustment coefficient, the anomaly of the first performance metric, the anomaly of the second performance metric, and the upper limit of the circuit breaker sleep time. That is, when the anomaly of the error rate is consistently higher than its corresponding first anomaly threshold (meaning it may have already broken or is about to break), and the average response time is also greater than its corresponding second anomaly threshold, the system considers the service to be in a relatively serious fault state, requiring a longer recovery time. If the anomaly of the first performance metric is less than or equal to the first anomaly threshold, or the anomaly of the second performance metric is less than or equal to the second anomaly threshold, then there is no need to adjust the initial circuit breaker sleep time, indicating that the circuit breaker parameter settings meet the service usage requirements at this time.

[0084] Optionally, the above steps (determining the target circuit breaker sleep time based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance index, the abnormality of the second performance index, and the upper limit of the circuit breaker sleep time) are implemented in the following manner: The target circuit breaker sleep time is determined using the following formula:

[0085] in, Indicates the target circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time. Indicates the initial circuit breaker sleep time. This represents the second adjustment coefficient, used to control the degree of abnormality of the first performance index and the degree of influence of the degree of abnormality of the second performance index on the target circuit breaker sleep time. Indicates the degree of abnormality of the first performance indicator. This indicates the degree of abnormality of the second performance indicator. The function ensures that the adjusted circuit breaker sleep time (i.e., the target circuit breaker sleep time) will not exceed the set circuit breaker sleep time limit.

[0086] It should be noted that, This indicates the target circuit breaker sleep time, i.e., the adjusted circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time, i.e., the maximum acceptable sleep time. For example, it can be set to 10 seconds, or other reasonable values. This indicates the initial circuit breaker sleep time, i.e., the default circuit breaker sleep time, which can be set to 5 seconds or other reasonable values. The degree of abnormality of the first performance indicator and the degree of influence of the abnormality of the second performance indicator on the target circuit breaker sleep time can be set to 1 or other reasonable values.

[0087] Specifically, if a service not only has many errors but also responds very slowly, it means that the system needs a longer recovery time. Appropriately extending the circuit breaker sleep time can prevent the service from entering a half-open state prematurely before it has fully recovered, thereby reducing the additional overhead and instability caused by frequent circuit breakers and failed recovery attempts.

[0088] In some embodiments, when the fuse parameters are the minimum request quantity, the above step S13 (adjusting the fuse parameters according to the abnormality of each performance index at the current moment and in combination with preset adjustment rules to obtain the target fuse parameters) is implemented in the following way: Determine whether the anomaly of the third performance indicator is less than the third anomaly threshold; If the abnormality of the third performance metric is less than the third abnormality threshold, then the target minimum request quantity is determined based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit.

[0089] The third anomaly threshold is a threshold set for the anomaly of the third performance metric, which is the maximum concurrency. This threshold can be set according to the actual application situation and is not specifically limited here.

[0090] Specifically, when the service call request volume is very low, even a small number of erroneous requests can lead to a very high calculated error rate. For example, 1 erroneous request / 2 total requests = 50% error rate, thus triggering unnecessary circuit breakers. The adjustment logic is to increase the threshold of V_min when traffic is low, requiring error rate judgment only when there is a sufficient sample size, thereby reducing false circuit breakers caused by statistical noise.

[0091] Optionally, the above steps (determining the target minimum request quantity based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit) are implemented as follows: The target minimum request quantity is determined using the following formula:

[0092] in, Indicates the minimum number of requests required. This indicates the maximum number of requests. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance metric on the target minimum request quantity. This indicates the degree of abnormality of the third performance indicator.

[0093] It should be noted that, This represents the target minimum request quantity, i.e., the adjusted minimum request quantity. This indicates the minimum request limit, i.e., the maximum acceptable minimum request amount. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance indicator on the target minimum request quantity. It can be adjusted according to the actual situation. The value of is, for example, its range is [2, 5]. Assume... If the value is 3, then the number of requests in the statistics window must be at least 3 times the current concurrency for the statistics to be considered reliable.

[0094] Furthermore, the dynamically calculated circuit breaker parameters (target error rate threshold, target circuit breaker sleep time, and target minimum request volume) need to be applied by the actual circuit breaker component. The system pushes these optimized circuit breaker parameters to a centralized configuration center through a standard interface. The circuit breaker component in the microservice instance will listen for changes in the corresponding configuration items in the configuration center. Once a parameter update is detected, the circuit breaker should be able to dynamically load and apply the new parameter values ​​at runtime without restarting the service. This is called "hot update" or "dynamic refresh," and it is crucial for ensuring service continuity.

[0095] The fuse parameter adjustment method disclosed herein obtains real-time data and historical benchmark values ​​of various performance indicators at the current moment. The historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window prior to the current moment. Based on the real-time data of each performance indicator at the current moment and the historical mean and historical standard deviation of each performance indicator within the preset window period prior to the current moment, the anomaly degree of each performance indicator at the current moment is calculated. Based on the anomaly degree of each performance indicator at the current moment, and in conjunction with preset adjustment rules, the fuse parameters are adjusted to obtain target fuse parameters. The fuse parameters include at least one of an error rate threshold, a fuse sleep time, and a minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient, so that the fuse parameters and the anomaly degree have a preset correlation. By using historical benchmarks and real-time anomaly calculations, the circuit breaker parameters can be dynamically adjusted based on the current operating status of the service, thereby better adapting to constantly changing loads and operating conditions. Dynamically adjusting the circuit breaker parameters helps to respond quickly when the service experiences performance degradation or failure, and prevents the spread of faults through the circuit breaker mechanism, thereby improving the stability and reliability of the entire system.

[0096] In one embodiment, such as Figure 2 As shown, a fuse parameter adjustment device 200 is provided, comprising: The acquisition module 210 is used to obtain real-time data and historical benchmark values ​​of each performance indicator at the current moment; the historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment. The calculation module 220 is used to calculate the anomaly degree of each performance indicator at the current moment based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window time before the current moment; the anomaly degree is used to represent the degree of deviation of the real-time data of each performance indicator from the historical mean. The adjustment module 230 is used to adjust the fuse parameters according to the abnormality of each performance indicator at the current moment, combined with a preset adjustment rule, to obtain the target fuse parameters. The fuse parameters include at least one of error rate threshold, fuse sleep time, and minimum request quantity. The preset adjustment rule is: based on the comparison result of the abnormality of the target performance indicator and the corresponding preset abnormality threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient so that the fuse parameters and the abnormality have a preset correlation relationship.

[0097] As an optional implementation of this disclosure, when the fuse parameter is an error rate threshold, the adjustment module includes: The first acquisition unit is used to acquire the initial error rate threshold; The first judgment unit is used to determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold. The first determining unit is configured to determine a target error rate threshold based on the initial error rate threshold, the first adjustment coefficient, the anomaly of the first performance indicator, and the lower limit of the error rate threshold if the anomaly degree of the first performance indicator is greater than the first anomaly degree threshold.

[0098] As an optional implementation of this disclosure, the first determining unit is specifically used for: The target error rate threshold is determined using the following formula:

[0099] in, Indicates the target error rate threshold. This represents the lower limit of the error rate threshold. This represents the initial error rate threshold. This represents the first adjustment coefficient, used to control the degree of influence of the anomaly rate of the first performance indicator on the target error rate threshold. This indicates the degree of abnormality of the first performance indicator.

[0100] As an optional implementation of this disclosure, when the fuse parameter is the fuse sleep time, the adjustment module includes: The second acquisition unit is used to acquire the initial circuit breaker sleep time; The second judgment unit is used to determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold, and whether the abnormality of the second performance indicator is greater than the second abnormality threshold. The second determining unit is configured to determine a target circuit breaker sleep time based on the initial circuit breaker sleep time, the second adjustment coefficient, the anomaly of the first performance indicator, the anomaly of the second performance indicator, and the upper limit of the circuit breaker sleep time if the anomaly of the first performance indicator is greater than the first anomaly threshold and the anomaly of the second performance indicator is greater than the second anomaly threshold.

[0101] As an optional implementation of this disclosure, the second determining unit is specifically used for: The target circuit breaker sleep time is determined using the following formula:

[0102] in, Indicates the target circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time. Indicates the initial circuit breaker sleep time. This represents the second adjustment coefficient, used to control the degree of abnormality of the first performance index and the degree of influence of the degree of abnormality of the second performance index on the target circuit breaker sleep time. Indicates the degree of abnormality of the first performance indicator. This indicates the degree of abnormality of the second performance indicator.

[0103] As an optional implementation of this disclosure, when the fuse parameter is the minimum requested amount, the adjustment module includes: The third judgment unit is used to determine whether the abnormality of the third performance index is less than the third abnormality threshold. The third determining unit is used to determine the target minimum request quantity based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit if the abnormality of the third performance indicator is less than the third abnormality threshold.

[0104] As an optional implementation of this disclosure, the third determining unit is specifically used for: The target minimum request quantity is determined using the following formula:

[0105] in, Indicates the minimum number of requests required. This indicates the maximum number of requests. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance metric on the target minimum request quantity. This indicates the degree of abnormality of the third performance indicator.

[0106] The fuse parameter adjustment device provided in this disclosure acquires real-time data and historical benchmark values ​​of various performance indicators at the current moment. The historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window prior to the current moment. Based on the real-time data of each performance indicator at the current moment and the historical mean and historical standard deviation of each performance indicator within the preset window period prior to the current moment, the anomaly degree of each performance indicator at the current moment is calculated. Based on the anomaly degree of each performance indicator at the current moment, and in conjunction with preset adjustment rules, the fuse parameters are adjusted to obtain target fuse parameters. The fuse parameters include at least one of an error rate threshold, a fuse sleep time, and a minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient, so that the fuse parameters and the anomaly degree have a preset correlation. By using historical benchmarks and real-time anomaly calculations, the circuit breaker parameters can be dynamically adjusted based on the current operating status of the service, thereby better adapting to constantly changing loads and operating conditions. Dynamically adjusting the circuit breaker parameters helps to respond quickly when the service experiences performance degradation or failure, and prevents the spread of faults through the circuit breaker mechanism, thereby improving the stability and reliability of the entire system.

[0107] Specific limitations regarding the fuse parameter adjustment device can be found in the limitations of the fuse parameter adjustment method described above, and will not be repeated here. Each module in the aforementioned fuse parameter adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of the electronic device's processor, or stored in the processor of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.

[0108] This disclosure also provides an electronic device. Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 3As shown, the electronic device provided in this embodiment includes a memory 31 and a processor 32. The memory 31 is used to store computer programs; the processor 32 is used to execute the steps performed in any embodiment of the fuse parameter adjustment method provided in the above method embodiments when the computer program is invoked. The electronic device includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the electronic device provides computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. When the computer program is executed by the processor, it implements a fuse parameter adjustment method. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a button, trackball, or touchpad provided on the casing of a computer device, or an external keyboard, touchpad, or mouse, etc.

[0109] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the computer device to which the present disclosure is applied. Specific electronic devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] In one embodiment, the fuse parameter adjustment device provided in this disclosure can be implemented in the form of a computer, and the computer program can be used in such a way as... Figure 3 The device operates on the electronic device shown. The memory of the electronic device can store various program modules that make up the fuse parameter adjustment device of the electronic device. The computer program composed of the various program modules causes the processor to execute the steps in the fuse parameter adjustment method of the electronic device according to the various embodiments of this disclosure described in this specification.

[0111] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the fuse parameter adjustment method provided in the above-described method embodiments.

[0112] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media containing computer-usable program code.

[0113] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0114] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0115] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transient computer-readable media, such as modulated data signals and carrier waves.

[0116] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0117] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for adjusting fuse parameters, characterized in that, include: Obtain real-time data and historical benchmark values ​​for each performance indicator at the current moment; the historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment; Based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window period before the current moment, the anomaly degree of each performance indicator at the current moment is calculated; the anomaly degree is used to represent the degree of deviation of the real-time data of each performance indicator from the historical mean. Based on the anomaly degree of each performance indicator at the current moment, the fuse parameters are adjusted in conjunction with preset adjustment rules to obtain target fuse parameters. The fuse parameters include at least one of error rate threshold, fuse sleep time, and minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient so that the fuse parameters and the anomaly degree have a preset correlation relationship.

2. The method according to claim 1, characterized in that, When the fuse parameters are at the error rate threshold, the step of adjusting the fuse parameters according to the abnormality of each performance indicator at the current moment and in conjunction with preset adjustment rules to obtain the target fuse parameters includes: Obtain the initial error rate threshold; Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold; If the anomaly of the first performance indicator is greater than the first anomaly threshold, then the target error rate threshold is determined based on the initial error rate threshold, the first adjustment coefficient, the anomaly of the first performance indicator, and the lower limit of the error rate threshold.

3. The method according to claim 2, characterized in that, The step of determining the target error rate threshold based on the initial error rate threshold, the first adjustment coefficient, the anomaly degree of the first performance indicator, and the lower limit of the error rate threshold includes: The target error rate threshold is determined using the following formula: in, Indicates the target error rate threshold. This represents the lower limit of the error rate threshold. This represents the initial error rate threshold. This represents the first adjustment coefficient, used to control the degree of influence of the anomaly rate of the first performance indicator on the target error rate threshold. This indicates the degree of abnormality of the first performance indicator.

4. The method according to claim 1, characterized in that, When the fuse parameter is the fuse sleep time, the step of adjusting the fuse parameter according to the abnormality of each performance index at the current moment and in combination with preset adjustment rules to obtain the target fuse parameter includes: Obtain the initial circuit breaker sleep time; Determine whether the abnormality of the first performance indicator is greater than the first abnormality threshold, and whether the abnormality of the second performance indicator is greater than the second abnormality threshold. If the abnormality of the first performance indicator is greater than the first abnormality threshold, and the abnormality of the second performance indicator is greater than the second abnormality threshold, then the target circuit breaker sleep time is determined based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance indicator, the abnormality of the second performance indicator, and the upper limit of the circuit breaker sleep time.

5. The method according to claim 4, characterized in that, The step of determining the target circuit breaker sleep time based on the initial circuit breaker sleep time, the second adjustment coefficient, the abnormality of the first performance index, the abnormality of the second performance index, and the upper limit of the circuit breaker sleep time includes: The target circuit breaker sleep time is determined using the following formula: in, Indicates the target circuit breaker sleep time. This indicates the upper limit of the circuit breaker sleep time. Indicates the initial circuit breaker sleep time. This represents the second adjustment coefficient, used to control the degree of abnormality of the first performance index and the degree of influence of the degree of abnormality of the second performance index on the target circuit breaker sleep time. Indicates the degree of abnormality of the first performance indicator. This indicates the degree of abnormality of the second performance indicator.

6. The method according to claim 1, characterized in that, When the fuse parameters are at the minimum request quantity, the step of adjusting the fuse parameters based on the abnormality of each performance indicator at the current moment and in conjunction with preset adjustment rules to obtain the target fuse parameters includes: Determine whether the anomaly of the third performance indicator is less than the third anomaly threshold; If the abnormality of the third performance metric is less than the third abnormality threshold, then the target minimum request quantity is determined based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit.

7. The method according to claim 6, characterized in that, The step of determining the target minimum request quantity based on the maximum concurrency and length, the third adjustment coefficient, and the minimum request quantity upper limit includes: The target minimum request quantity is determined using the following formula: in, Indicates the minimum number of requests required. This indicates the maximum number of requests. This represents the third adjustment coefficient, used to control the impact of the anomaly of the third performance metric on the target minimum request quantity. This indicates the degree of abnormality of the third performance indicator.

8. A fuse parameter adjustment device, characterized in that, include: The acquisition module is used to obtain real-time data and historical benchmark values ​​of each performance indicator at the current moment; the historical benchmark values ​​include the historical mean and historical standard deviation of each performance indicator within a preset time window before the current moment. The calculation module is used to calculate the anomaly of each performance indicator at the current moment based on the real-time data of each performance indicator at the current moment, the historical mean and historical standard deviation of each performance indicator within a preset window period before the current moment; the anomaly is used to represent the degree of deviation of the real-time data of each performance indicator from the historical mean. An adjustment module is used to adjust the fuse parameters based on the anomaly degree of each performance indicator at the current moment, combined with a preset adjustment rule, to obtain target fuse parameters. The fuse parameters include at least one of error rate threshold, fuse sleep time, and minimum request quantity. The preset adjustment rule is as follows: based on the comparison result between the anomaly degree of the target performance indicator and the corresponding preset anomaly degree threshold, it is determined whether to adjust the fuse parameters. If it is determined that the fuse parameters should be adjusted, the adjustment scale of the fuse parameters is controlled by a preset adjustment coefficient, so that the fuse parameters and the anomaly degree have a preset correlation relationship.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the fuse parameter adjustment method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the fuse parameter adjustment method according to any one of claims 1 to 7.