Fuse configuration modification method, device, equipment and readable storage medium

Through the modification method of automated fuse configuration, the prediction of the target service call information is predicted to use the preset fuse parameter predictive model to solve the problem of high fusion configuration modification time cost in the existing technology, and to achieve efficient automation modification.

CN113326061BActive Publication Date: 2025-01-28WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110707307.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2025-01-28
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

The existing circuit breaker configuration modification methods have high time cost problems, and it requires manual analysis and learning how to reasonably modify the circuit breaker configuration.

Method used

By obtaining the target service calling information, the predicted model of the pre -fusion parameter predicts the characteristics of multiple service features, determine the target prediction fuse parameter, and sends it to the configuration management module for modification.

Benefits of technology

The modification of automated fusion configuration is realized, the time cost of manual analysis and learning is reduced, and the efficiency of modification is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113326061B_ABST
    Figure CN113326061B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and readable storage medium for modifying a fuse configuration, the method comprising the steps of: obtaining target service call information, wherein the target service call information is composed of multiple service features; inputting the multiple service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter; determining a target predicted fuse parameter based on the model-predicted fuse parameter; sending the target predicted fuse parameter to a configuration management module, so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration, thereby completing the modification of the original fuse configuration. The present application avoids manual analysis and learning of how to modify the original fuse configuration, saves the time required for the manual analysis and learning, and thereby reduces the time cost of modifying the original fuse configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology in financial technology (Fintech), and in particular to a method, device, equipment and readable storage medium for modifying a circuit breaker configuration. Background Art

[0002] With the continuous development of financial technology, especially Internet technology finance, more and more technologies (such as distributed, artificial intelligence, etc.) are applied in the financial field, but the financial industry also puts forward higher requirements on technology, such as higher requirements on the service availability of the financial industry.

[0003] With the continuous development of computer technology, microservice architecture is being used by more and more companies. When using it, high availability of services must be guaranteed. Among them, service circuit breaking is one of the strategies to ensure high availability of microservices.

[0004] For example, Spring Cloud's Hystrix implements a circuit breaker model, and its main solution is as follows: when the service is called, the failure rate of the service (such as failure due to network failure / timeout) is counted. When the failure rate exceeds the preset threshold, the circuit breaker state is entered, and the purpose of rapid response or rapid failure is achieved by downgrading the service or throwing an exception.

[0005] For example, Sentinel also implements the circuit breaker degradation function, and compared with Hystrix, Sentinel implements more circuit breaker strategies, including slow call ratio circuit breaker, abnormal ratio circuit breaker, and abnormal number circuit breaker. The main logic of Sentinel's circuit breaker degradation function is as follows: based on the state machine of the circuit breaker to determine whether the resource is accessible; there will be a detection mechanism for inaccessible resources, which ensures the elastic recovery of resource access; the circuit breaker will update the statistics when the resource access is completed, and then update the circuit breaker state machine based on the circuit breaker rules.

[0006] However, whether it is Hystrix or Sentinel, the circuit breaker configuration currently needs to be modified manually, and before the modification, it is necessary to analyze how to make reasonable modifications. This analysis process takes a lot of time and generates relevant analysis time costs. In addition, the relevant personnel who make the modification are required to have a certain understanding of how to reasonably modify the circuit breaker configuration, which generates relevant learning time costs.

[0007] That is, the existing method for modifying the fuse configuration has the problem of high time cost. Summary of the invention

[0008] The main purpose of the present application is to provide a method, device, equipment and readable storage medium for modifying a fuse configuration, aiming to solve the technical problem that the existing method for modifying a fuse configuration has a high time cost.

[0009] To achieve the above object, the present application provides a method for modifying a fuse configuration, the method comprising the steps of:

[0010] Acquire target service call information, wherein the target service call information is composed of multiple service features;

[0011] Inputting the plurality of service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter;

[0012] Determining a target predicted fuse parameter based on the model predicted fuse parameter;

[0013] The target predicted fuse parameters are sent to the configuration management module so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration.

[0014] Optionally, before inputting the multiple service features into a preset fuse parameter prediction model to obtain the model-predicted fuse parameters, the step includes:

[0015] Randomly selecting a preset number of sample sets from a preset training set, wherein the sample set consists of a plurality of training features;

[0016] Generate a decision tree based on a least squares regression tree generation algorithm and the plurality of training features;

[0017] The preset fuse parameter prediction model is determined based on the decision tree.

[0018] Optionally, determining the preset fuse parameter prediction model based on the decision tree includes:

[0019] Obtaining a feature correlation coefficient between the training feature and a standard prediction fuse parameter corresponding to the training feature;

[0020] Calculating a weight coefficient of the decision tree based on the feature correlation coefficient;

[0021] The preset fuse parameter prediction model is determined based on the decision tree and the weight coefficient.

[0022] Optionally, the characteristic correlation coefficient is calculated by:

[0023] For multiple training features, calculate the product of each training feature and its corresponding standard prediction fuse parameter, and sum each product to obtain a first value; and

[0024] Sum each training feature, sum the standard prediction fuse parameter corresponding to each training feature, and multiply the two sums to obtain a second value;

[0025] Calculate a first difference value according to each training feature, calculate a second difference value according to each standard prediction fuse parameter, and multiply the two differences to obtain a third value;

[0026] A characteristic correlation coefficient is calculated according to the first value, the second value and the third value.

[0027] Optionally, before determining a target predicted fuse parameter based on the model predicted fuse parameter, the method further comprises:

[0028] Performing a normal distribution transformation on the plurality of service characteristics to obtain a predicted fuse parameter after the transformation;

[0029] The determining a target predicted fusing parameter based on the model predicted fusing parameter includes:

[0030] If the model predicted fuse parameter is greater than the transformed predicted fuse parameter, the model predicted fuse parameter is determined to be the target predicted fuse parameter.

[0031] Optionally, obtaining target service call information includes:

[0032] The service grid obtains the initial service call information and reports the initial service call information to the monitoring module;

[0033] The monitoring module performs statistical processing on the initial service call information to obtain the target service call information.

[0034] Optionally, the service grid includes a request receiving unit, a router, and a circuit breaker, and the service grid obtains initial service call information, including:

[0035] The request receiving unit receives a request, and the router selects a service instance corresponding to the request;

[0036] The circuit breaker obtains the original fuse configuration, and determines whether the service instance needs to be fused based on the original fuse configuration;

[0037] If not, the circuit breaker sends the request to the service instance;

[0038] The router obtains initial service call information, wherein the initial service call information corresponds to a processing procedure of the service instance processing the request.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a fuse configuration modification device, the fuse configuration modification device comprising:

[0040] An acquisition module, used to acquire target service call information, wherein the target service call information is composed of multiple service features;

[0041] An input module, used for inputting the plurality of service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter;

[0042] A determination module, configured to determine a target predicted fuse parameter based on the model predicted fuse parameter;

[0043] The sending module is used to send the target predicted fuse parameters to the configuration management module so that the configuration management module can modify the original fuse configuration to obtain the modified fuse configuration.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a fuse configuration modification device, which includes a memory, a processor, and a fuse configuration modification program stored in the memory and executable on the processor, and the fuse configuration modification program, when executed by the processor, implements the steps of the fuse configuration modification method as described above.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a fuse configuration modification program is stored. When the fuse configuration modification program is executed by a processor, the steps of the fuse configuration modification method as described above are implemented.

[0046] Compared with the prior art, in which the fuse configuration is modified manually, resulting in a high time cost for modifying the fuse configuration, the present application obtains target service call information, wherein the target service call information is composed of multiple service features; inputs the multiple service features into a preset fuse parameter prediction model to obtain model predicted fuse parameters; determines target predicted fuse parameters based on the model predicted fuse parameters; and sends the target predicted fuse parameters to a configuration management module so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration. The present application realizes automatic acquisition of target service call information composed of multiple service features, and predicts the multiple service features through a preset fuse parameter prediction model with high prediction accuracy to obtain model predicted fuse parameters, and determines the target predicted fuse parameters by the model predicted fuse parameters, so as to modify the original fuse configuration by the predicted target predicted fuse parameters, without the need for manual learning and analysis on how to modify the original fuse configuration, and finally modifying the original fuse configuration according to the results of the analysis. Therefore, manual analysis and learning on how to modify the original fuse configuration are avoided, saving the time required for the manual analysis and learning, thereby reducing the time cost of modifying the original fuse configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flowchart of the first embodiment of the method for modifying the fuse configuration of the present application;

[0048] Figure 2 It is a schematic diagram illustrating an example of a decision tree for the method for modifying the fuse configuration of the present application;

[0049] Figure 3 This is a functional module diagram of a preferred embodiment of the fuse configuration modification device of the present application;

[0050] Figure 4 It is a structural diagram of the hardware operating environment involved in the embodiment of the present application.

[0051] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0052] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0053] This application provides a method for modifying fuse configuration, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the fuse configuration modification method of the present application.

[0054] The embodiment of the present application provides an embodiment of the method for modifying the fuse configuration. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described can be performed in a different order than here. The method for modifying the fuse configuration can be applied to the microservice architecture. For the sake of ease of description, the following omits the execution subject to describe the various steps of the method for modifying the fuse configuration. The method for modifying the fuse configuration includes:

[0055] Step S10, obtaining target service calling information, wherein the target service calling information is composed of a plurality of service features.

[0056] In this embodiment, the target service call information is obtained, and the target service call information is information related to calling a service instance. The service instance is used to process requests. Within a certain period of time, the service instance can process a large number of requests, and in the process of the service instance processing requests, it is necessary to consume CPU (Central Processing Unit) resources, memory resources and other hardware resources. In addition, it can be understood that it takes a certain amount of time for the service instance to process the request. The above-mentioned service characteristics are information related to the service instance processing the request, and the service characteristics include at least one of the call time, QPS (Queries Per Second), TPS (Transactions Per Second), CPU consumption, and memory consumption of the service instance being called to process the request. Among them, the target service call information is composed of multiple service characteristics, for example, the target service call information includes TPS and CPU consumption.

[0057] Specifically, the obtaining of target service call information includes:

[0058] Step a, the service grid obtains initial service call information and reports the initial service call information to the monitoring module;

[0059] Step b: the monitoring module performs statistical processing on the initial service call information to obtain the target service call information.

[0060] In this embodiment, the microservice architecture includes a service grid and a monitoring module. The target service call information is obtained by the monitoring module through statistical processing of the initial service call information. The statistics are based on the data collected and aggregated from the initial service call information. The initial service call information is obtained according to the dimension of the service instance to facilitate the statistics of the service call information corresponding to each service instance.

[0061] It should be noted that after the initial service call information is obtained by the service grid, it is reported to the monitoring module. Optionally, the reporting process is a periodic reporting process. Specifically, the initial service call information uploaded by the service grid is the service call information corresponding to the time point of periodic reporting. The above collection and aggregation process is to collect the service call information corresponding to multiple time points, and aggregate the service call information corresponding to the multiple time points, so as to obtain the target service call information within the time period composed of the multiple time points. It should be noted that at each report, the service call information corresponding to each service instance reported by the service grid may have repeated parts. When the monitoring module receives repeated service call information, it will remove the repeated parts to reduce the amount of statistical data and save statistical time.

[0062] The process of the service grid acquiring the initial service call information is as follows: after the calling of the service instance ends, the initial service call information corresponding to the service instance is acquired. Specifically, the service grid includes a request receiving unit, a router, and a circuit breaker. The service grid acquires the initial service call information, including:

[0063] Step a1: the request receiving unit receives a request, and the router selects a service instance corresponding to the request.

[0064] In this embodiment, the request receiving unit receives the request, and after the request receiving unit receives the request, when the router determines that it can process the service instance corresponding to the request, the service instance is selected. Specifically, after the request receiving unit receives the request from the client, the router determines the service to which the request needs to be sent. Generally, a service has multiple service instances (for example, service A has three service instances), that is, after determining the service, it is necessary to select a service instance from the multiple service instances of the service as the service instance to process the request.

[0065] Step a2: The circuit breaker obtains the original circuit breaker configuration, and determines whether the service instance needs to be circuit-broken based on the original circuit breaker configuration.

[0066] In this embodiment, the circuit breaker obtains the original fuse configuration, which is the fuse configuration before modification by the configuration management module. The circuit breaker determines whether the service instance needs to be blown based on the original fuse configuration, so as to perform service blow on the service instance when blow is needed.

[0067] Step a3: If not, the circuit breaker sends the request to the service instance.

[0068] In this embodiment, if the circuit breaker determines that the service instance does not need to be blown based on the original circuit breaker configuration, the request is sent to the service instance so that the service instance responds to the request; if the circuit breaker determines that the service instance needs to be blown based on the original circuit breaker configuration, the request is not sent to the service instance to ensure the availability of the microservice architecture.

[0069] Step a4: the router obtains initial service call information, wherein the initial service call information corresponds to a process of the service instance processing the request.

[0070] In this embodiment, after the service instance call ends, the router obtains the initial service call information corresponding to the service instance, wherein the initial service call information corresponds to the processing process of the service instance processing request. It should be noted that the circuit breaker will update the status information of the service instance according to the initial service call information.

[0071] Step S20, inputting the plurality of service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter.

[0072] In this embodiment, the microservice architecture further includes a decision module, which calculates the target prediction fuse parameter through the above-mentioned multiple service features. The multiple service features are obtained by the decision module from the corresponding API (Application Programming Interface) interface exposed by the above-mentioned monitoring module.

[0073] It should be noted that, as can be seen from the above step S10, the target service call information is collected and counted according to the dimension of the service instance. Therefore, when calculating the target prediction fuse parameters corresponding to a service instance, it is sufficient to obtain multiple service features corresponding to the service instance. In addition, if it is necessary to calculate the target prediction fuse parameters corresponding to multiple service instances, it is sufficient to calculate the target prediction fuse parameters corresponding to different service instances respectively. Compared with manual analysis of how to modify the original fuse configuration, it produces a cumulative effect of reducing time costs, that is, the more service instances corresponding to the original fuse configuration that need to be modified, the more time and energy is spent manually. By automatically calculating the target prediction fuse parameters corresponding to each service instance, the effect of reducing time costs is more significant. In addition, in addition to reducing time costs, automatically calculating the target prediction fuse parameters corresponding to each service instance also solves the problem of lag in the processing process caused by manual analysis of how to modify the original fuse configuration.

[0074] Among them, the calculation process is the process in which the decision module determines the target predicted fuse parameter through a preset fuse parameter prediction model.

[0075] Specifically, multiple service features are input into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter, wherein the preset fuse parameter prediction module is a model implemented by a random forest algorithm.

[0076] It should be noted that the preset fuse parameter prediction model predicts the call status of the calling service instance through service characteristics. The result of the prediction is the call time threshold or call failure rate of the calling service instance and other parameters that affect the call status. For example, if the call time threshold is 5.6ms, then the service fuse is triggered when the time of calling the service instance exceeds 5.6ms. It should be noted that the specific implementation methods of each parameter that affects the call status are basically the same. This embodiment and the following embodiments are all described with the predicted result as the call time threshold. The implementation methods corresponding to other parameters that affect the call status are not repeated. It should be noted that the call time threshold is for slow calls. For slow calls, when the call time of a certain call to a service instance exceeds the call time threshold, the call is considered to be a slow call.

[0077] Wherein, before inputting the plurality of service features into a preset fuse parameter prediction model to obtain the model predicted fuse parameters, the method includes:

[0078] Step c: randomly selecting a preset number of sample sets from a preset training set, wherein the sample set consists of multiple training features.

[0079] In this embodiment, a preset number of sample sets are randomly selected from a preset training set, and the sample set is composed of multiple training features, wherein the random selection process is a selection process with replacement. The preset number is not specifically limited in this embodiment and can be set as needed.

[0080] Step d: generating a decision tree based on a least squares regression tree generation algorithm and the plurality of training features.

[0081] In this embodiment, a decision tree is generated by using a least square regression tree generation algorithm and the plurality of training features. It should be noted that the generation process includes traversing the sample set and processing the traversed training features using a square error minimization criterion.

[0082] Step e: determining the preset fuse parameter prediction model based on the decision tree.

[0083] In this embodiment, a preset fuse parameter prediction model is determined based on the above-mentioned decision tree. It should be noted that a decision tree can be generated corresponding to each sample set, and a preset number of decision trees constitute a random forest, which determines the preset fuse parameter prediction model.

[0084] It should be noted that the above-mentioned random forest establishment process is a traditional random forest establishment process, which treats all training features in the preset training set equally, that is, the status of each feature is the same when generating a decision tree, and the establishment process does not consider the influence of each training feature on the model output result. The present application improves the traditional random forest establishment process, that is, considers the influence of the training features on the model output result to improve the accuracy of the model output result. Specifically, the preset fuse parameter prediction model is determined based on the decision tree, including:

[0085] Step e1, obtaining the feature correlation coefficient between the training feature and the standard prediction fuse parameter corresponding to the training feature.

[0086] In this embodiment, the above-mentioned model output result is determined by the standard prediction fuse parameter. It can be understood that the model output result is the output result of the random forest, and the standard prediction fuse parameter is the output result of the decision tree corresponding to the training feature in the random forest. The feature correlation coefficient between the training feature and the standard prediction fuse parameter corresponding to the training feature is obtained; the influence of the above-mentioned training feature on the model output result corresponds to the influence of the training feature on the standard prediction fuse parameter, that is, the feature correlation coefficients corresponding to each decision tree jointly affect the model output result.

[0087] The calculation method of the characteristic correlation coefficient includes:

[0088] For multiple training features, calculate the product of each training feature and its corresponding standard prediction fuse parameter, and sum each product to obtain a first value; and

[0089] Sum each training feature, sum the standard prediction fuse parameter corresponding to each training feature, and multiply the two sums to obtain a second value;

[0090] Calculate a first difference value according to each training feature, calculate a second difference value according to each standard prediction fuse parameter, and multiply the two differences to obtain a third value;

[0091] A characteristic correlation coefficient is calculated according to the first value, the second value and the third value.

[0092] Specifically, the characteristic correlation coefficient r is calculated by a linear regression formula, which is:

[0093]

[0094] Among them, x i is the value of the training feature, y i Predict the value of the fuse parameter for the standard.

[0095] Step e2, calculating the weight coefficient of the decision tree based on the feature correlation coefficient.

[0096] In this embodiment, since the decision tree is generated based on the sample set, when determining the influence of the feature correlation coefficients corresponding to each decision tree on the model output result, it is necessary to calculate the feature correlation coefficients between each training feature in each decision tree and the standard prediction fuse parameters corresponding to each decision tree, so as to obtain the weight coefficient of each decision tree. It should be noted that the weight coefficient of each decision tree is the influence of the standard prediction fuse parameters of each decision tree on the model output result, that is, the higher the weight coefficient, the greater the influence.

[0097] Among them, the calculation formula of the weight coefficient w of the decision tree is:

[0098] w=∑r ti

[0099] Among them, ti is the label of the decision tree feature, r ti is the feature correlation coefficient corresponding to the ti feature.

[0100] For example, decision tree A is generated based on sample set a, which consists of training feature 1, training feature 2, and training feature 3. Correspondingly, each training feature corresponds to feature correlation coefficients r1, r2, and r3, respectively. When calculating the weight coefficient of decision tree A, it is necessary to combine r1, r2, and r3 to calculate the weight coefficient. Specifically, the weight coefficient w of decision tree A is the sum of r1, r2, and r3.

[0101] Step e3, determining the preset fuse parameter prediction model based on the decision tree and the weight coefficient.

[0102] In this embodiment, a corresponding weight coefficient is added to each decision tree in the random forest, and a preset fuse parameter prediction model is determined by the decision tree after adding the weight coefficient, so as to improve the random forest establishment process.

[0103] It should be noted that, for the above step of inputting the plurality of service features into the preset fuse parameter prediction model to obtain the model predicted fuse parameters, refer to Figure 2 , taking multiple service characteristics of TPS=8 and CPU=7.5% as an example, the decision tree can be selected from the preset fuse parameter prediction model, and the model predicted fuse parameter is obtained, and its value is 5.6ms.

[0104] Step S30, determining a target predicted fuse parameter based on the model predicted fuse parameter.

[0105] In this embodiment, after obtaining the model predicted fuse parameters, the target predicted fuse parameters are determined by the model predicted fuse parameters. It should be noted that the model predicted fuse parameters can be directly used as the target predicted fuse parameters. However, since the output results of the preset fuse parameter prediction model are not completely accurate, there is a question of whether the output result model predicted fuse parameters are reasonable. When the model predicted fuse parameters are obviously unreasonable, if the model predicted fuse parameters continue to be used as the target predicted fuse parameters, the service instance corresponding to the target predicted fuse parameters will be unavailable, thereby affecting the call chain of the entire microservice framework.

[0106] Therefore, before determining the model predicted fuse parameter as the target predicted fuse parameter, it is necessary to judge the rationality of the model predicted fuse parameter. Since the microservice framework system itself cannot judge the rationality, it is necessary to establish a rationality judgment mechanism. Specifically, before determining the target predicted fuse parameter based on the model predicted fuse parameter, it includes:

[0107] Step f, performing normal distribution transformation on the multiple service characteristics to obtain predicted fuse parameters after transformation.

[0108] In this embodiment, since the call time consumption for the same service instance within a period of time conforms to the normal distribution, a call time consumption set within the period of time is obtained, and the call time consumption set includes multiple call time consumptions. The normal distribution of the call time consumption within the period of time is obtained through the call time consumption set, that is, the normal distribution of the call time consumption. Then, the corresponding relationship between the standard normal distribution and the normal distribution of the call time consumption can be obtained by looking up the standard normal distribution table. Based on this, through the corresponding relationship, the multiple service features are transformed into normal distributions to obtain the transformed predicted fuse parameters corresponding to the multiple service features. Among them, the normal distribution transformation formula N is:

[0109]

[0110] Wherein, μ is the mean corresponding to the multiple service characteristics, σ is the standard deviation corresponding to the multiple service characteristics, and X is a random variable.

[0111] For example, within 1 hour, 75% of the calls to service instance 1 take no more than 1.2ms, and 95% of the calls take no more than 3.2ms. From the standard normal distribution table, we can see that under the standard normal distribution, the X value that does not exceed 75% is 0.675, the X value that does not exceed 95% is 1.645, and the X value that does not exceed 99.99% is 3.617. Therefore, according to the above normal distribution transformation formula and the above corresponding relationship, it can be concluded that 99.99% of the calls to service instance 1 take no more than 7.3ms.

[0112] The determining a target predicted fusing parameter based on the model predicted fusing parameter includes:

[0113] Step g: if the model predicted fuse parameter is greater than the transformed predicted fuse parameter, the model predicted fuse parameter is determined to be the target predicted fuse parameter.

[0114] In this embodiment, if the model predicted fuse parameter is greater than the transformed predicted fuse parameter, the model predicted fuse parameter is determined as the target predicted fuse parameter; if the model predicted fuse parameter is less than the transformed predicted fuse parameter, the transformed predicted fuse parameter is determined as the target predicted fuse parameter; if the model predicted fuse parameter is equal to the transformed predicted fuse parameter, the model predicted fuse parameter and the transformed predicted fuse parameter are determined as the target predicted fuse parameter. For example, if the value of the model predicted fuse parameter is 5.6ms and the value of the transformed predicted fuse parameter is 7.3ms, 7.3ms is used as the value of the target predicted fuse parameter.

[0115] It can be understood that using the larger value as the target predicted fuse parameter value can effectively increase the service instance's processing capacity for requests, that is, it can better exert the performance of the microservice framework. For example, request 1 has taken 6ms. If the target predicted fuse parameter value is 6ms, the slow call condition is met and the service instance will be in the service fuse state; if the target predicted fuse parameter value is 7ms, the slow call condition is not met and the service instance will continue to wait for the request to be processed.

[0116] Step S40, sending the target predicted fuse parameters to the configuration management module, so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration.

[0117] In this embodiment, after the decision module calculates and obtains the target predicted fuse parameter, the target predicted fuse parameter is sent to the configuration management module so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration.

[0118] Compared with the prior art, in which the fuse configuration is modified manually, resulting in a high time cost for modifying the fuse configuration, the present application obtains target service call information, wherein the target service call information is composed of multiple service features; inputs the multiple service features into a preset fuse parameter prediction model to obtain model predicted fuse parameters; determines target predicted fuse parameters based on the model predicted fuse parameters; and sends the target predicted fuse parameters to a configuration management module so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration. The present application realizes automatic acquisition of target service call information composed of multiple service features, and predicts the multiple service features through a preset fuse parameter prediction model with high prediction accuracy to obtain model predicted fuse parameters, and determines the target predicted fuse parameters by the model predicted fuse parameters, so as to modify the original fuse configuration by the predicted target predicted fuse parameters, without the need for manual learning and analysis on how to modify the original fuse configuration, and finally modifying the original fuse configuration according to the results of the analysis. Therefore, manual analysis and learning on how to modify the original fuse configuration are avoided, saving the time required for the manual analysis and learning, thereby reducing the time cost of modifying the original fuse configuration.

[0119] In addition, the present application also provides a fuse configuration modification device, referring to Figure 3 , the fuse configuration modification device comprises:

[0120] The acquisition module 10 is used to acquire target service call information, wherein the target service call information is composed of multiple service features;

[0121] An input module 20, configured to input the plurality of service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter;

[0122] A determination module 30, configured to determine a target predicted fusing parameter based on the model predicted fusing parameter;

[0123] The sending module 40 is used to send the target predicted fuse parameters to the configuration management module, so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration.

[0124] Optionally, the input module 20 is further used for:

[0125] Randomly selecting a preset number of sample sets from a preset training set, wherein the sample set consists of a plurality of training features;

[0126] Generate a decision tree based on a least squares regression tree generation algorithm and the plurality of training features;

[0127] The preset fuse parameter prediction model is determined based on the decision tree.

[0128] Optionally, the input module 20 is further used for:

[0129] Obtaining a feature correlation coefficient between the training feature and a standard prediction fuse parameter corresponding to the training feature;

[0130] Calculating a weight coefficient of the decision tree based on the feature correlation coefficient;

[0131] The preset fuse parameter prediction model is determined based on the decision tree and the weight coefficient.

[0132] Optionally, the input module 20 is further used for:

[0133] For multiple training features, calculate the product of each training feature and its corresponding standard prediction fuse parameter, and sum each product to obtain a first value; and

[0134] Sum each training feature, sum the standard prediction fuse parameter corresponding to each training feature, and multiply the two sums to obtain a second value;

[0135] Calculate a first difference value according to each training feature, calculate a second difference value according to each standard prediction fuse parameter, and multiply the two differences to obtain a third value;

[0136] A characteristic correlation coefficient is calculated according to the first value, the second value and the third value.

[0137] Optionally, the determining module 30 is further configured to:

[0138] Performing a normal distribution transformation on the plurality of service characteristics to obtain a predicted fuse parameter after the transformation;

[0139] The determining a target predicted fusing parameter based on the model predicted fusing parameter includes:

[0140] If the model predicted fuse parameter is greater than the transformed predicted fuse parameter, the model predicted fuse parameter is determined to be the target predicted fuse parameter.

[0141] Optionally, the acquisition module 10 is further used for:

[0142] The service grid obtains the initial service call information and reports the initial service call information to the monitoring module;

[0143] The monitoring module performs statistical processing on the initial service call information to obtain the target service call information.

[0144] Optionally, the service grid includes a request receiving unit, a router and a circuit breaker, and the acquisition module 10 is further used for:

[0145] The request receiving unit receives a request, and the router selects a service instance corresponding to the request;

[0146] The circuit breaker obtains the original fuse configuration, and determines whether the service instance needs to be fused based on the original fuse configuration;

[0147] If not, the circuit breaker sends the request to the service instance;

[0148] The router obtains initial service call information, wherein the initial service call information corresponds to a processing procedure of the service instance processing the request.

[0149] The specific implementation of the fuse configuration modification device of the present application is basically the same as the various embodiments of the fuse configuration modification method described above, and will not be repeated here.

[0150] In addition, the present application also provides a fuse configuration modification device. Figure 4 As shown, Figure 4 It is a structural diagram of the hardware operating environment involved in the embodiment of the present application.

[0151] It should be noted that Figure 4 This is a schematic diagram of the structure of the hardware operating environment of the device that can be modified for the fuse configuration.

[0152] like Figure 4As shown, the fuse configuration modification device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0153] Optionally, the fuse configuration modification device may also include an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like.

[0154] Those skilled in the art will understand that Figure 4 The structure of the fuse configuration modification device shown in the figure does not constitute a limitation on the fuse configuration modification device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0155] like Figure 4 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module and a fuse configuration modification program. The operating system is a program that manages and controls the hardware and software resources of the fuse configuration modification device, and supports the operation of the fuse configuration modification program and other software or programs.

[0156] exist Figure 4 In the fuse configuration modification device shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal, such as receiving user signaling data sent by the terminal; the network interface 1004 is mainly used for the background server and communicates data with the background server; the processor 1001 can be used to call the fuse configuration modification program stored in the memory 1005, and execute the steps of the fuse configuration modification method as described above.

[0157] The specific implementation of the fuse configuration modification device of the present application is basically the same as the above-mentioned embodiments of the fuse configuration modification method, and will not be repeated here.

[0158] In addition, an embodiment of the present application further proposes a computer-readable storage medium, on which a fuse configuration modification program is stored. When the fuse configuration modification program is executed by a processor, the steps of the fuse configuration modification method described above are implemented.

[0159] The specific implementation of the computer-readable storage medium of the present application is basically the same as the above-mentioned embodiments of the fuse configuration modification method, and will not be repeated here.

[0160] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0161] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0162] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, device, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0163] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for modifying a fuse configuration, characterized in that: The method for modifying the fuse configuration comprises the following steps: Obtain target service call information, wherein the target service call information is composed of multiple service features, and the multiple service features include at least one of the call time taken for the service instance to be called to process the request, the number of queries per second, the number of transactions processed per second, CPU consumption, and memory consumption; Input the multiple service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter, wherein the model-predicted fuse parameter includes at least one of the following: a call time threshold and a call failure rate of a service instance, wherein the preset fuse parameter prediction model is obtained by training a sample set in a preset training set, wherein the sample set is composed of multiple training features, and there is a feature correlation coefficient between the training feature and the standard predicted fuse parameter corresponding to the training feature, and the calculation method of the feature correlation coefficient includes: for multiple training features, calculating the product of each training feature and its corresponding standard predicted fuse parameter, and summing each product to obtain a first value; and summing each training feature, and summing the standard predicted fuse parameter corresponding to each training feature, and multiplying the two sums to obtain a second value; calculating a first difference value according to each training feature, calculating a second difference value according to each standard predicted fuse parameter, and multiplying the two differences to obtain a third value; calculating the feature correlation coefficient according to the first value, the second value, and the third value; Determining a target predicted fuse parameter based on the model predicted fuse parameter; The target predicted fuse parameters are sent to the configuration management module so that the configuration management module can modify the original fuse configuration to obtain a modified fuse configuration.

2. The method for modifying fuse configuration according to claim 1, characterized in that: Before inputting the plurality of service features into a preset fuse parameter prediction model to obtain the model predicted fuse parameters, the method includes: Randomly select a preset number of sample sets from a preset training set; Generate a decision tree based on a least squares regression tree generation algorithm and the plurality of training features; The preset fuse parameter prediction model is determined based on the decision tree.

3. The method for modifying fuse configuration according to claim 2, characterized in that: The determining the preset fuse parameter prediction model based on the decision tree includes: Obtaining the feature correlation coefficient between the training feature and the standard prediction fuse parameter corresponding to the training feature; Calculating a weight coefficient of the decision tree based on the feature correlation coefficient; The preset fuse parameter prediction model is determined based on the decision tree and the weight coefficient.

4. The method for modifying fuse configuration according to claim 1, characterized in that: Before determining the target predicted fusing parameter based on the model predicted fusing parameter, the method includes: Performing a normal distribution transformation on the plurality of service characteristics to obtain a predicted fuse parameter after the transformation; The determining a target predicted fusing parameter based on the model predicted fusing parameter includes: If the model predicted fuse parameter is greater than the transformed predicted fuse parameter, the model predicted fuse parameter is determined to be the target predicted fuse parameter.

5. The method for modifying a fuse configuration according to any one of claims 1 to 4, characterized in that: The obtaining of target service call information includes: The service grid obtains the initial service call information and reports the initial service call information to the monitoring module; The monitoring module performs statistical processing on the initial service call information to obtain the target service call information.

6. The method for modifying fuse configuration according to claim 5, characterized in that: The service grid includes a request receiving unit, a router and a circuit breaker. The service grid obtains initial service call information, including: The request receiving unit receives a request, and the router selects a service instance corresponding to the request; The circuit breaker obtains the original fuse configuration, and determines whether the service instance needs to be fused based on the original fuse configuration; If not, the circuit breaker sends the request to the service instance; The router obtains initial service call information, wherein the initial service call information corresponds to a processing procedure of the service instance processing the request.

7. A device for modifying fuse configuration, characterized in that: The fuse configuration modification device comprises: An acquisition module, used to acquire target service call information, wherein the target service call information is composed of multiple service features; An input module, configured to input the plurality of service features into a preset fuse parameter prediction model to obtain a model-predicted fuse parameter, wherein the plurality of service features include at least one of a call time taken for a service instance to be called to process a request, a query volume per second, a number of transactions processed per second, CPU consumption, and memory consumption; A determination module is used to determine a target predicted fuse parameter based on the model predicted fuse parameter, wherein the model predicted fuse parameter includes at least one of the following: a call time threshold and a call failure rate of a service instance, wherein the preset fuse parameter prediction model is obtained by training a sample set in a preset training set, wherein the sample set is composed of a plurality of training features, and there is a feature correlation coefficient between the training feature and the standard predicted fuse parameter corresponding to the training feature, and the calculation method of the feature correlation coefficient includes: for a plurality of training features, calculating the product of each training feature and its corresponding standard predicted fuse parameter, and summing each product to obtain a first value; and summing each training feature, and summing the standard predicted fuse parameter corresponding to each training feature, and multiplying the two sums to obtain a second value; calculating a first difference value according to each training feature, calculating a second difference value according to each standard predicted fuse parameter, and multiplying the two differences to obtain a third value; calculating the feature correlation coefficient according to the first value, the second value, and the third value; The sending module is used to send the target predicted fuse parameters to the configuration management module so that the configuration management module can modify the original fuse configuration to obtain the modified fuse configuration.

8. A device for modifying fuse configuration, characterized in that: The fuse configuration modification device includes a memory, a processor, and a fuse configuration modification program stored in the memory and executable on the processor. When the fuse configuration modification program is executed by the processor, the steps of the fuse configuration modification method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a fuse configuration modification program, and when the fuse configuration modification program is executed by a processor, the steps of the fuse configuration modification method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Fusing parameter adjusting method, device and equipment

    CN110704220A