Flow limiting threshold prediction method and device, equipment, program semantics and storage medium
By using the flow prediction model to predict the current limit threshold for the next period, the problem of inflexible and accurate determination of the current limit threshold in the prior art is solved, and higher accuracy and flexibility of the current limit threshold are achieved, and the error current limit or unlimited problems caused by flow fluctuations are avoided.
Patent Information
- Application Number
- CN202411717063.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-11-27
AI Technical Summary
The existing current limit threshold determination method is not flexible and accurate enough to effectively deal with traffic fluctuations, resulting in erroneous current limit or unlimited current limit, affecting the user experience.
By predicting the actual traffic usage of each transaction service interface in the historical period, using a pre-trained traffic prediction model, the current limit threshold for the next period is accurately predicted, and the current limit threshold is determined according to the interface type.
It improves the flexibility and accuracy of the current limit threshold, can cope with possible subsequent traffic fluctuations, avoid mis-limiting or unlimited events, and improves user experience.
Smart Images

Figure CN119603171A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of financial technology, and in particular to a current limiting threshold prediction method, apparatus, device, program semantics and storage medium. Background Art
[0002] Current limiting is a common performance capacity guarantee method in distributed systems. In the financial industry, when the flow of service requests (such as transaction service requests) reaches a predetermined threshold, current limiting can quickly close the loop (such as discarding) the flow that exceeds the threshold, and control the flow of service providers. Current limiting technology itself is not complicated, but there is a certain degree of difficulty in combining it with actual scenarios and maximizing its role. During use, users often encounter problems that affect user experience, such as continuous current limiting or current limiting never being triggered. Setting an appropriate current limiting threshold can improve the accuracy of current limiting and avoid problems such as continuous current limiting or current limiting never being triggered.
[0003] Most current methods for determining the current limiting threshold are to set a fixed current limiting threshold based on the CPU usage and system load. Although this method can ensure that the system always has a certain throughput, in actual applications, there will be a large number of service requests generated by some intensive tasks, but these intensive tasks are not closely related to the CPU and will not significantly increase the CPU usage. Therefore, determining the current limiting threshold based on the CPU usage is not flexible and accurate enough, and the accuracy of the current limiting threshold setting cannot be guaranteed, which can easily cause incorrect current limiting or no current limiting, thus affecting the user's service experience. Summary of the invention
[0004] The embodiments of the present invention provide a flow limiting threshold prediction method, device, equipment, program semantics and storage medium, which can accurately predict the flow limiting threshold of the next time period based on the actual traffic usage of different interfaces in the historical time period, thereby improving the flexibility and accuracy of the flow limiting threshold, being able to cope with possible subsequent traffic fluctuations, avoiding the occurrence of erroneous flow limiting or no flow limiting events, and improving user experience.
[0005] In a first aspect, an embodiment of the present invention provides a current limiting threshold prediction method, comprising:
[0006] Through each pre-set transaction service interface, the interface flow data of each transaction service interface is obtained according to a preset period;
[0007] For each cycle, if the current cycle is not the initial cycle, the flow data of each interface is processed according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface to obtain the flow input data of the current cycle; wherein the interface type is a core interface or a non-core interface;
[0008] Inputting the flow input data into a pre-trained flow prediction model to obtain flow prediction data for the next cycle output by the flow prediction model;
[0009] The flow limiting thresholds of the transaction service interfaces are determined based on the traffic prediction data of the next cycle and the types of the interfaces, and the flow limiting is performed on the transaction service interfaces in the next cycle according to the flow limiting thresholds.
[0010] In a second aspect, an embodiment of the present invention provides a current limiting threshold prediction device, the device comprising:
[0011] The data acquisition module is used to acquire the interface flow data of each transaction service interface according to a preset period through each pre-set transaction service interface;
[0012] A data processing module, for each cycle, if the current cycle is not the initial cycle, according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface, to process the flow data of each interface to obtain the flow input data of the current cycle; wherein the interface type is a core interface or a non-core interface;
[0013] A data prediction module, used to input the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next cycle output by the flow prediction model;
[0014] The threshold determination module is used to determine the flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle and each interface type, and to limit the flow of each transaction service interface in the next cycle according to each flow limiting threshold.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a current limiting threshold prediction method as described in any one of the embodiments of the present invention is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a current limiting threshold prediction method as described in any one of the embodiments of the present invention.
[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements a current limiting threshold prediction method as described in any one of the embodiments of the present invention.
[0018] In an embodiment of the present invention, the interface traffic data of each transaction service interface is obtained according to a preset period through each pre-set transaction service interface; for each period, if the current period is not the initial period, the traffic data of each interface is processed according to the pre-determined target traffic data of the previous period, the traffic data of each interface of the current period and the interface type of each transaction service interface to obtain the traffic input data of the current period; wherein the interface type is a core interface or a non-core interface; the traffic input data is input into a pre-trained traffic prediction model to obtain the traffic prediction data of the next period output by the traffic prediction model; the flow limiting threshold of each transaction service interface is determined based on the traffic prediction data of the next period and each interface type, and the flow limiting is performed on each transaction service interface in the next period according to each flow limiting threshold. The method of the embodiment of the present invention can accurately predict the flow trends of different types of transaction service interfaces in the next period through the traffic prediction model according to the actual traffic usage of each transaction service interface in the historical period, so that the server can accurately determine the flow limiting threshold of the next period according to the traffic trend. The method of the present invention improves the flexibility and accuracy of determining the current limiting threshold, helps to improve the performance and stability of the system, and can also cope with possible subsequent traffic fluctuations, avoid the occurrence of erroneous current limiting or no current limiting events, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A first flow chart of a current limiting threshold prediction method provided by an embodiment of the present invention;
[0021] Figure 2 A second flow chart of a current limiting threshold prediction method provided by an embodiment of the present invention;
[0022] Figure 3 A flow chart of a method for configuring current limiting parameters provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of a current limiting threshold prediction device provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0026] Figure 1 The first flow chart of a flow limiting threshold prediction method provided in an embodiment of the present invention. The method in the embodiment of the present invention can accurately predict the flow limiting threshold of the next time period based on the actual traffic usage of different interfaces in the historical time period, thereby improving the flexibility and accuracy of the flow limiting threshold, being able to cope with possible subsequent traffic fluctuations, avoiding the occurrence of erroneous flow limiting or no flow limiting events, and improving user experience. The information collected in the method in the embodiment of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse. The method can be executed by a flow limiting threshold prediction device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a server or a computer device, etc., with reference to Figure 1 , the method may specifically include the following steps:
[0027] Step 101: Obtain interface traffic data of each transaction service interface through each pre-set transaction service interface according to a preset period.
[0028] Among them, the transaction service interface defines how the client (caller) requests services and how the server (callee) responds to service requests. When a user uses a transaction service (such as a query service or a payment service, etc.) through a client, the client can send a corresponding transaction request to the server through each transaction service interface. Interface traffic data is a collection of information such as the amount of data transmitted through the transaction service interface within a certain period of time, the number of requests, and related performance indicators. In this solution, interface traffic data includes but is not limited to time information, traffic information, and call information. Traffic information includes but is not limited to the service interface name (identifying the name of the service interface being monitored), concurrency (how many requests are being processed at the same time), the number of requests processed per second (Transactions Per Second, TPS), and interface response time. Call information includes whether the interface call is abnormal, etc. The preset period is a predetermined period of time based on the domain big data and the actual operating environment of the system (such as a banking system). For example, the preset period can be 6 months.
[0029] Specifically, the server can collect the interface traffic data of the transaction service interface in each cycle, and predict the current limiting threshold of the next cycle based on the interface traffic data of the current cycle. For example, if the preset cycle is 6 months, then at the end of June, the current limiting threshold of each transaction service interface from June to December can be predicted based on the interface traffic data from January to June.
[0030] Step 102: For each cycle, if the current cycle is not the initial cycle, the flow data of each interface is processed according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface to obtain the flow input data of the current cycle.
[0031] Among them, the initial cycle is the first cycle to start predicting the flow limit threshold. The target flow data is data determined based on the flow input data of the previous cycle. The interface type is a core interface or a non-core interface. The core interface is an interface that is critical to business operations. The non-core interface is an interface that contributes to the complete function of the system but is relatively less important, or its failure has a small impact on the business. If the current cycle is the initial cycle, it means that there is no previous cycle in the current cycle, and the flow input data is directly determined based on the flow data and interface type of each interface in the current cycle. If the current cycle is not the initial cycle, it is necessary to determine the flow input data based on the target flow data of the previous cycle, the flow data and interface type of each interface in the current cycle. For example, if the current cycle is the initial cycle (January to June 2024), the flow input data is determined based on the flow data and interface type of each interface from January to June 2024. If the current cycle is July to December 2024, the flow input data is determined based on the flow input data from January to June 2024, and the flow data and interface type of each interface from July to December 2024.
[0032] Specifically, the importance of interface traffic data corresponding to different interface types is different. For the interface traffic data of non-core interfaces with lower importance, the server can perform data compression or data aggregation on the interface traffic data of the non-core interfaces, so as to calculate representative data from the interface traffic data of the non-core interfaces, and replace the original interface traffic data with the representative data. Since the interface traffic data of the non-core interfaces has a smaller impact on the system, replacing the original interface traffic data with representative data will not affect the accuracy of the current limiting threshold determination, and can also reduce the calculation complexity of the current limiting threshold prediction and improve the efficiency of the current limiting threshold prediction. For the interface traffic data of the core interface with higher importance, it is not necessary to screen or compress it. Furthermore, the flow input data of the current cycle is determined based on the target traffic data of the previous cycle, the interface traffic data of the non-core interface after processing, and the interface traffic data of the core interface.
[0033] In an optional implementation, after obtaining the interface traffic data of the current cycle, data cleaning is performed on each interface traffic data according to the time information of each interface traffic data to obtain traffic data of each candidate interface; traffic data of the interface type being a non-core interface is screened out from all candidate interface traffic data, and for the traffic data of each non-core interface, the non-core interface sub-data in each preset time period in the traffic data of the current non-core interface is obtained; the aggregation data of each non-core interface sub-data is determined according to the preset aggregation cycle; each non-core interface sub-data is updated according to the aggregation data to obtain the aggregated traffic data of each non-core interface. The traffic input data of the current cycle is obtained based on the target traffic data of the previous cycle, the aggregated traffic data of each non-core interface, and the candidate interface traffic data of each core interface.
[0034] Step 103: input the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next cycle output by the flow prediction model.
[0035] Among them, the traffic prediction model is pre-trained and is used to predict the traffic data of future time periods based on the traffic data of historical time periods. The traffic prediction model in this solution is a time series model, such as the prophet model. The Prophet model is a model used for time series prediction of data, which can capture trends and seasonal changes in the data. The Prophet model can automatically detect and process various seasonal patterns in time series data, including annual, monthly, weekly and daily seasonality. The Prophet model also allows users to specify holidays and their impact on time series data.
[0036] In an optional implementation, before obtaining the interface traffic data of each transaction service interface according to a preset period, the server can train the prophet model based on a large amount of historical interface traffic data collected in advance. After obtaining the historical interface traffic data, the historical interface traffic data is cleaned to remove abnormal values in the interface traffic data. According to the interface type corresponding to the interface traffic data, the interface traffic data of the non-core interface is aggregated. For example, in units of weeks, the interface traffic data with the largest number of concurrencies in the weekly interface traffic data is selected, and the interface traffic data of the week is replaced with the interface traffic data with the largest number of concurrencies. A training sample set and a training test set are established based on the processed interface traffic data of the non-core interface and the interface traffic data of the core interface. After obtaining the training sample set, the training sample set is input into the prophet model to train the prophet model. The prediction performance of the prophet model is evaluated using the training test set, and the model parameters of the prophet model are adjusted according to the evaluation results until the evaluation results meet the preset conditions, and a trained prophet model, that is, a trained traffic prediction model, is obtained.
[0037] The model parameters of the prophet model include seasonal parameters and trend parameters, among which seasonal parameters include seasonal pattern parameters and seasonal intensity parameters. The trend parameter controls the flexibility of the prophet model to detect and adapt to change points in the trend, and the trend parameter determines the sensitivity of the prophet model to potential trend changes in the data. The larger the trend parameter value, the more the prophet model will consider the data with severe sudden changes in the data. The seasonal intensity parameter controls the flexibility and intensity of the seasonal effect in the prophet model, and the seasonal intensity parameter determines the degree of "confidence" or "uncertainty" of the prophet model in the seasonal pattern. The larger the seasonal pattern parameter value, the more the prophet model tends to capture strong seasonal changes in the data. The seasonal pattern parameter defines whether the seasonal pattern is additive or multiplicative. Additive means that the seasonal effect is added to the basic trend with a fixed amplitude. No matter how the trend itself changes, the size of the seasonal effect is constant. In this solution, the prophet model is used to predict the interface traffic data of the transaction service interface. The setting of seasonal parameters and trend parameters not only affects the fitting quality of the prophet model to historical data, but also directly affects the accuracy and reliability of future predictions. By using a large amount of interface traffic data from historical periods to train the prophet model, accurate seasonal parameters and trend parameters for predicting interface traffic data can be obtained.
[0038] Furthermore, after obtaining the trained traffic prediction model and the traffic input data of the current cycle, the traffic input data of the current cycle is input into the traffic prediction model to obtain the traffic prediction data of the next cycle predicted by the traffic prediction model.
[0039] Step 104: determine the flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle and each interface type, and limit the flow of each transaction service interface in the next cycle according to each flow limiting threshold.
[0040] Among them, the prediction data includes the interface traffic data of each transaction service interface in the next cycle, and the interface traffic data includes but is not limited to the time information, traffic information and call information of each transaction service interface. Traffic information includes but is not limited to the service interface name, concurrency number, TPS and interface response time. The flow limiting threshold is used to indicate how the server limits the flow of the transaction interface. The flow limiting threshold of each transaction service interface includes the concurrency threshold, TPS threshold and response time threshold. Specifically, the importance of transaction service interfaces corresponding to different interface types is different. For core interfaces with higher importance, it may be necessary to set a smaller range of thresholds to ensure service quality. For non-core interfaces, a larger range of thresholds can be set to allow more flexibility and throughput. After obtaining the traffic prediction data, the traffic prediction data can be visualized and displayed in the form of a line chart or the like. It is convenient to observe its changing trend, so as to accurately set the flow limiting threshold of each transaction service interface.
[0041] In an optional implementation, after obtaining the traffic prediction data for the next cycle, the recommended flow limiting threshold of each transaction service interface is calculated based on the traffic prediction data for the next cycle; for each transaction service interface, if the interface type of the current transaction service interface is a core interface, it is determined that the flow limiting threshold of the current transaction service interface is the recommended flow limiting threshold; if the interface type of the current service interface is a non-core interface, the flow limiting threshold of the current transaction service interface is determined based on the traffic information of the current interface traffic data and the recommended flow limiting threshold; wherein the traffic information includes the concurrency number of the transaction service interface.
[0042] The technical solution of this embodiment obtains the interface traffic data of each transaction service interface according to the preset period through each pre-set transaction service interface; for each period, if the current period is not the initial period, the traffic data of each interface is processed according to the pre-determined target traffic data of the previous period, the traffic data of each interface of the current period and the interface type of each transaction service interface to obtain the traffic input data of the current period; wherein the interface type is a core interface or a non-core interface; the traffic input data is input into a pre-trained traffic prediction model to obtain the traffic prediction data of the next period output by the traffic prediction model; the flow limiting threshold of each transaction service interface is determined based on the traffic prediction data of the next period and each interface type, and each transaction service interface is flow limited in the next period according to each flow limiting threshold. The technical solution of this embodiment can accurately predict the traffic trends of different types of transaction service interfaces in the next period through the traffic prediction model according to the actual traffic usage of each transaction service interface in the historical period, so that the server can accurately determine the flow limiting threshold of the next period according to the traffic trend. The method of the present invention improves the flexibility and accuracy of determining the current limiting threshold, helps to improve the performance and stability of the system, and can also cope with possible subsequent traffic fluctuations, avoid the occurrence of erroneous current limiting or no current limiting events, and improve user experience.
[0043] Figure 2 The second flow chart of a current limiting threshold prediction method provided by an embodiment of the present invention is a refinement of the above embodiment. The specific method can be as follows Figure 2 As shown, the method may include the following steps:
[0044] Step 201: Obtain interface traffic data of each transaction service interface through each pre-set transaction service interface according to a preset period.
[0045] Step 202: For each cycle, if the current cycle is not the initial cycle, clean the flow data of each interface according to the time information of the flow data of each interface to obtain the flow data of each candidate interface.
[0046] Among them, the time information includes the timestamp when each interface traffic data is generated. Data cleaning includes checking data consistency, processing invalid values and missing values, etc. In this solution, after obtaining each interface traffic data, according to the timestamp of each interface traffic data of each transaction service interface, it is determined whether there is a data interruption in each interface traffic data. If there is a data interruption of more than a preset number of times in an interface traffic data, the interface traffic data is deleted. The candidate traffic data is the data obtained after data cleaning of each interface traffic data of the current cycle.
[0047] Exemplarily, the preset number of times is three times, and the interface traffic data 1 includes 8 data: 2024-01-01 (timestamp): 100 (data); 2024-01-02: 150; 2024-01-03: missing; 2024-01-04: 150; 2024-01-05: missing; 2024-01-06: 150; 2024-01-07: missing; 2024-01-08: 200. It can be determined that there are three cases of missing data in the interface traffic data 1, and each data missing causes data interruption, and it is further determined to delete the interface traffic data. For example, the interface flow data 2 includes 8 data: 2024-01-01: 100; 2024-01-02: 150; 2024-01-03: missing; 2024-01-04: missing; 2024-01-05: missing; 2024-01-06: 150; 2024-01-07: 200; 2024-01-08: 200. It can be determined that there are three data missing in the interface flow data 2, but these three missing are continuous missing, so only one data interruption is caused, and it is further determined to retain the interface flow data.
[0048] Step 203: Filter out the traffic data of non-core interfaces from all candidate interface traffic data, and aggregate the traffic data of each non-core interface to obtain aggregated traffic data of each non-core interface.
[0049] Specifically, the importance of interface traffic data corresponding to different interface types is different. For interface traffic data of non-core interfaces with lower importance, the server can aggregate the interface traffic data of the non-core interfaces, thereby calculating representative data from the interface traffic data of the non-core interfaces, and replacing the original interface traffic data with the representative data, thereby reducing the computational complexity of current limiting threshold prediction. In this scheme, the traffic data of each non-core interface can be optionally aggregated to obtain the aggregated traffic data of each non-core interface, including: for the traffic data of each non-core interface, obtaining the non-core interface sub-data in each preset time period in the traffic data of the current non-core interface; determining the aggregated data of each non-core interface sub-data. Update each non-core interface sub-data according to the aggregated data to obtain the aggregated traffic data of each non-core interface.
[0050] The preset time period is predetermined based on the domain big data, the total amount of interface traffic data, and the actual operating environment of the system, and is used to determine the time interval for data aggregation of interface traffic data. The preset time interval in this solution can be one week. Data aggregation is the process of aggregating large amounts of data into smaller and more meaningful data sets.
[0051] Specifically, after obtaining the traffic data of each non-core interface, the data is divided according to the preset time period to obtain the non-core interface sub-data in each time period. Aggregate calculation is performed on the non-core interface sub-data in each time period to obtain the aggregated data of each non-core interface sub-data. Aggregate calculation includes extremes such as summation, average value, counting, maximum value or minimum value. The aggregation calculation in this scheme is to take the maximum value, that is, select the maximum value from each non-core interface sub-data, and determine the maximum value as the aggregated data of the non-core interface sub-data. The aggregated data is used to replace all the data in the original preset time period to obtain the aggregated traffic data of the non-core interface. Exemplarily, the non-core interface data includes four weeks of data, and each week includes 100 data. The data with the largest value of each traffic information in each week is selected as the aggregated data of that week, and the aggregated data of that week is used to replace all the data of that week. After data aggregation, the system only needs to process 4 data. If data aggregation is not performed, the system needs to process 400 data.
[0052] Since the interface traffic data of non-core interfaces has little impact on the system, replacing the original interface traffic data with representative data will not affect the accuracy of the current limiting threshold determination, and can also reduce the computational complexity of the current limiting threshold prediction and improve the efficiency of the current limiting threshold prediction.
[0053] Step 204: Obtain flow input data according to the target flow data of the previous cycle, the aggregate flow data of each non-core interface, and the candidate interface flow data of each core interface.
[0054] Among them, the target traffic data is data determined based on the traffic input data of the previous cycle. The traffic input data is data input into the traffic prediction model. Specifically, in order to continuously improve the accuracy of threshold prediction, after obtaining the traffic prediction data and the current limiting threshold of the previous cycle, the accuracy of the current limiting threshold of the previous cycle can be evaluated based on the interface traffic data of each transaction service interface of the current cycle, and the input traffic data of the previous cycle is optimized based on the evaluation results and the traffic prediction model to obtain the target traffic data. The target traffic data of the previous cycle, the aggregated traffic data of each non-core interface of the current cycle, and the candidate traffic data of each core interface are determined as the traffic input data of the current cycle.
[0055] Step 205: input the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next cycle output by the flow prediction model.
[0056] Step 206: Calculate the recommended flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle.
[0057] Among them, the recommended traffic threshold is determined based on the traffic forecast data of the next cycle, and is used to indicate how the server should limit the flow of each transaction service interface in the next cycle. After obtaining the traffic forecast data of the next cycle, the recommended flow limit threshold of each transaction service interface is determined based on the traffic forecast data. In this solution, considering that most systems in financial business scenarios contain a lot of performance redundant capacity, after obtaining the traffic forecast data, the abnormally high or low data points in the traffic forecast data are screened out. The filtered traffic forecast data is flexibly adjusted to ensure that the flow limit threshold always maintains a certain redundant space. For example, if the number of concurrency in the traffic forecast data is 100, the corresponding recommended flow limit threshold can be set to 100. In order to ensure that the flow limit threshold always maintains a certain redundant space, the flow limit threshold can be adjusted by 30%, and the final recommended flow limit threshold is determined to be 130.
[0058] Step 207: For each transaction service interface, if the interface type of the current transaction service interface is a core interface, determine that the current limiting threshold of the current transaction service interface is the recommended current limiting threshold.
[0059] Specifically, the importance of interface traffic data corresponding to different interface types is different, and for interface traffic data of higher importance core interfaces, the recommended flow limiting threshold can be directly determined as the flow limiting threshold of the transaction service interface.
[0060] Step 208: If the interface type of the current service interface is a non-core interface, determine the flow limit threshold of the current transaction service interface according to the flow information of the current interface flow data.
[0061] Among them, the traffic information includes the concurrency of the transaction service interface. In this solution, for non-core interfaces, since they have little impact on system business services, the current limiting threshold of the current transaction service interface can be determined based on the concurrency of the interface traffic data and the recommended current limiting threshold. In actual applications, it often happens that 20% of the transaction service interfaces bear 80% of the business volume, and most transaction service interfaces usually carry a relatively small amount of transactions and do not require very sophisticated current limiting configuration. Therefore, for non-core interfaces, the current limiting threshold can be determined according to the step configuration mode, that is, the concurrency threshold in the current limiting threshold is determined according to the concurrency of the predicted interface traffic data. Exemplarily, the current limiting thresholds corresponding to the concurrency of each traffic prediction data are shown in Table 1 below:
[0062] Concurrency of traffic forecast data Current Limit Threshold 0-10 10 11-30 30 31-60 60 61-100 100
[0063] Table 1
[0064] Step 209: Limit the flow of each transaction service interface in the next cycle according to each flow limiting threshold.
[0065] In the technical solution of this embodiment, the interface flow data of each transaction service interface is obtained according to the preset period through each pre-set transaction service interface. For each period, if the current period is not the initial period, the flow data of each interface is cleaned according to the time information of the flow data of each interface to obtain the flow data of each candidate interface. The flow data of the interface type of non-core interface is screened out from all the flow data of candidate interfaces, and the flow data of each non-core interface is aggregated to obtain the aggregated flow data of each non-core interface. The flow input data is obtained according to the target flow data of the previous period, the aggregated flow data of each non-core interface and the candidate interface flow data of each core interface. The recommended flow limiting threshold of each transaction service interface is calculated based on the flow prediction data of the next period. For each transaction service interface, if the interface type of the current service transaction service interface is a core interface, it is determined that the flow limiting threshold of the current transaction service interface is the recommended flow limiting threshold. If the interface type of the current service interface is a non-core interface, the flow limiting threshold of the current transaction service interface is determined according to the flow information of the current interface flow data and the recommended flow limiting threshold; wherein, the flow information includes the number of concurrent transactions of the transaction service interface. According to each flow limiting threshold, each transaction service interface is limited in the next cycle. The technical solution of this embodiment, by aggregating the flow data of non-core interfaces, can reduce the amount of calculation of the system and improve the efficiency of flow limiting threshold prediction without affecting the accuracy of flow limiting threshold prediction. Different flow limiting thresholds are set for transaction service interfaces of different interface types, which improves the accuracy of flow limiting threshold determination, avoids the occurrence of erroneous flow limiting or no flow limiting events, and improves user experience.
[0066] Figure 3 Flow chart of the method for configuring current limiting parameters provided by an embodiment of the present invention. The specific method can be as follows Figure 3 As shown, the method may include the following steps:
[0067] Step 301: Based on the current limiting thresholds and interface traffic data of each transaction service interface in the current cycle, a current limiting evaluation is performed on the current limiting thresholds of each transaction service interface in the current cycle to obtain a current limiting evaluation result.
[0068] Among them, the flow limiting evaluation result is pass or fail. Specifically, the flow limiting threshold of the current cycle is the threshold predicted by the traffic prediction model based on the traffic input data of the previous cycle. In order to continuously improve the accuracy of the threshold prediction, after obtaining the traffic prediction data and flow limiting threshold of the previous cycle, the accuracy of the flow limiting threshold of the previous cycle can be evaluated based on the interface traffic data of each transaction service interface in the current cycle, and the input traffic data of the previous cycle can be optimized based on the evaluation results and the traffic prediction model to obtain the target traffic data.
[0069] After obtaining the interface flow data of the current cycle, the flow limiting threshold is evaluated according to the interface flow data of the current cycle and the flow limiting threshold. For example, if the number of concurrent calls of an interface in the current cycle reaches 120, and its preset flow limiting threshold is 100, it is determined that the flow of the interface exceeds the flow limiting threshold. Compare the actual flow data with the corresponding flow limiting threshold. If the actual flow is less than or equal to the flow limiting threshold, it is considered that the flow limiting measures of the interface are effective, and the evaluation result is determined to be "passed". If the actual flow is greater than the flow limiting threshold, it is considered that the flow limiting measures fail to effectively control the flow, and the evaluation result is determined to be "failed". For example, for an interface with a concurrent number of 120, since it exceeds the flow limiting threshold of 100, the flow limiting evaluation result of the interface is "failed". Further, an evaluation report is generated based on the evaluation results of all interface flow data and their corresponding flow limiting thresholds. The evaluation report includes information such as the flow limiting evaluation results, actual flow data and flow limiting thresholds of each interface, and a total evaluation result is obtained based on the evaluation results. For example, if more than 50% of the evaluation reports contain “failures”, the overall evaluation result will be determined as “failure”.
[0070] Step 302: When the flow limiting evaluation result is passed, the target flow data of the previous cycle is determined to be the flow input data of the previous cycle.
[0071] Specifically, the flow limiting evaluation result can reflect whether the flow input data of the previous cycle is accurate. If the flow limiting evaluation result is passed, it means that the flow limiting threshold set in the previous cycle can effectively control the flow, and it can be further determined that there is no need to adjust the flow input data of the previous cycle, that is, the target flow data of the previous cycle is determined to be the flow input data of the previous cycle.
[0072] Step 303: When the flow limiting evaluation result is not passed, the flow input data of the previous cycle is optimized according to the parameter values of the model parameters of the flow prediction model and the evaluation results to obtain the target flow data of the previous cycle.
[0073] Specifically, if the flow limiting evaluation result is not passed, it means that the flow input data of the previous cycle needs to be adjusted. In this solution, optionally, the flow input data of the previous cycle is optimized according to the parameter values of the model parameters of the flow prediction model and the evaluation results to obtain the target flow data of the previous cycle, including: determining the seasonal level of the flow input data of the previous cycle based on the trend parameter value, the seasonal parameter value, the preset trend parameter threshold and the preset seasonal parameter threshold; determining the aggregation period of the flow input data of the previous cycle according to the seasonal level; and aggregating the flow input data of the previous cycle based on the aggregation period to obtain the target flow data.
[0074] Among them, seasonal parameters include seasonal pattern parameters and seasonal intensity parameters. Trend parameters and seasonal parameters are more important parameters in the flow prediction model. Trend parameters and seasonal pattern parameters can reflect the characteristics of the flow input data of the previous cycle. The preset seasonal parameter thresholds include the first seasonal parameter threshold and the second seasonal parameter threshold, and the preset trend parameter thresholds include the first trend threshold and the second trend threshold. The preset trend parameter threshold and the preset seasonal parameter threshold are used to determine the seasonal correlation of the flow input data, that is, the seasonal level. The stronger the seasonal level, the higher the seasonal correlation of the flow input data.
[0075] In this solution, when the trend parameter value is less than the first preset trend threshold and the seasonal intensity parameter is less than the first seasonal threshold, the seasonal level of the flow input data is determined to be weak. When the trend parameter value is greater than the second preset trend threshold and the seasonal intensity parameter is greater than the second seasonal threshold, the seasonal level of the flow input data is determined to be very strong. In other cases, the seasonal level of the flow input data is determined to be strong. Exemplarily, the first trend parameter threshold may be 0.001, and the first seasonal parameter threshold may be 0.01. The second trend parameter threshold may be 0.01, and the first seasonal parameter threshold may be 1. That is, when the trend parameter value <0.001 and the seasonal intensity parameter <0.01, the seasonal level of the flow input data is determined to be weak. When the trend parameter value >0.01 and the seasonal intensity parameter >0.01, the seasonal level of the flow input data is determined to be very strong.
[0076] Among them, the aggregation period refers to the time span for merging the traffic data within a period of time into one data point. Different seasonal levels correspond to different aggregation periods. After obtaining the seasonal level, the aggregation period can be determined according to the seasonal level. The traffic input data of the previous period is aggregated according to the aggregation period to obtain the target traffic data. For example, for traffic input data with a strong seasonal level, its aggregation period can be determined to be one day. For traffic input data with a weak seasonal level, its aggregation period can be determined to be one week. For traffic input data with a strong seasonal level, data aggregation is not performed on it, that is, its aggregation period is determined to be 0. Furthermore, the traffic input data after data aggregation is determined as the target traffic data of the previous period.
[0077] Dynamically adjusting the aggregation period according to the seasonal level of the flow input data and aggregating the flow input data of the previous period according to the aggregation period can reduce the amount of system calculation without affecting the accuracy of the flow limiting threshold predicted by the flow prediction model.
[0078] The technical solution of this embodiment, based on the flow limiting threshold and interface traffic data of each transaction service interface in the current cycle, performs flow limiting evaluation on the flow limiting threshold of each transaction service interface in the current cycle to obtain a flow limiting evaluation result; wherein, the flow limiting evaluation result is pass or fail; when the flow limiting evaluation result is pass, the target flow data of the previous cycle is determined to be the flow input data of the previous cycle; when the flow limiting evaluation result is fail, the flow input data of the previous cycle is optimized according to the parameter values of the model parameters of the flow prediction model and the evaluation result to obtain the target flow data of the previous cycle. The technical solution of this embodiment, by regularly performing business evaluation on interface services that exceed the recommended threshold, can continuously improve the accuracy of the flow prediction data output by the flow limiting prediction model, further improve the accuracy of the flow limiting threshold prediction, avoid the occurrence of erroneous flow limiting or no flow limiting events, and improve user experience.
[0079] Figure 4 The present invention provides a schematic diagram of the structure of a current limiting threshold prediction device, which is suitable for executing the current limiting threshold prediction method provided by the present invention. Figure 4 As shown, the device may specifically include:
[0080] The data acquisition module 401 is used to acquire the interface flow data of each transaction service interface according to a preset period through each preset transaction service interface;
[0081] The data processing module 402 is used for, for each cycle, if the current cycle is not the initial cycle, processing the flow data of each interface according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface to obtain the flow input data of the current cycle; wherein the interface type is a core interface or a non-core interface;
[0082] The data prediction module 403 is used to input the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next cycle output by the flow prediction model;
[0083] The threshold determination module 404 is used to determine the flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle and each interface type, and to limit the flow of each transaction service interface in the next cycle according to each flow limiting threshold.
[0084] Optionally, the interface flow data includes time information, flow information and call information; the data processing module 402 is specifically used to: perform data cleaning on each interface flow data according to the time information of each interface flow data to obtain each candidate interface flow data;
[0085] Filter out the traffic data of non-core interfaces from all candidate interface traffic data, and aggregate the traffic data of each non-core interface to obtain aggregated traffic data of each non-core interface;
[0086] The flow input data is obtained according to the target flow data of the previous cycle, the aggregated flow data of each non-core interface and the candidate interface flow data of each core interface.
[0087] Optionally, the data processing module 402 is further used to: for the flow data of each non-core interface, obtain the non-core interface sub-data in each preset time period in the flow data of the current non-core interface;
[0088] Determine the aggregate data of each non-core interface sub-data;
[0089] The sub-data of each non-core interface is updated according to the aggregated data to obtain the aggregated flow data of each non-core interface.
[0090] Optionally, the threshold determination module 404 is specifically configured to: calculate the recommended flow limiting threshold of each transaction service interface based on the flow prediction data of the next cycle;
[0091] For each transaction service interface, if the interface type of the current transaction service interface is a core interface, determining that the current flow limiting threshold of the current transaction service interface is the recommended flow limiting threshold;
[0092] If the interface type of the current service interface is a non-core interface, the flow limiting threshold of the current transaction service interface is determined according to the flow information of the current interface flow data; wherein the flow information includes the concurrency number of the transaction service interface.
[0093] Optionally, the data processing module 402 is further used to: based on the current limiting threshold and interface traffic data of each transaction service interface in the current period, perform current limiting evaluation on the current limiting threshold of each transaction service interface in the current period to obtain a current limiting evaluation result; wherein the current limiting evaluation result is pass or fail;
[0094] When the flow limiting evaluation result is passed, determining the target flow data of the previous cycle as the flow input data of the previous cycle;
[0095] When the flow limiting evaluation result is failure, data optimization is performed on the flow input data of the previous cycle according to the parameter values of the model parameters of the flow prediction model and the evaluation result to obtain the target flow data of the previous cycle.
[0096] Optionally, the data processing module 402 is further used to: determine the seasonality level of the flow input data of the previous period based on the trend parameter value, the seasonality parameter value, the preset trend parameter threshold value and the preset seasonal parameter threshold value;
[0097] Determining an aggregation period of the flow input data of the previous period according to the seasonality level;
[0098] The flow input data of the previous period is aggregated based on the aggregation period to obtain the target flow data.
[0099] The current limiting threshold prediction device provided in the embodiment of the present invention can execute the current limiting threshold prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. The contents not described in detail in this embodiment can refer to the description in any method embodiment of the present invention.
[0100] An embodiment of the present invention also provides a computer program product.
[0101] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer program products, which may include one or more computer programs, which may be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general purpose programmable processor, which may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 5 , Figure 5 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0103] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0104] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0105] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0106] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.
[0107] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0108] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing a flow limiting threshold prediction method provided in an embodiment of the present invention: obtaining the interface flow data of each transaction service interface according to a preset period through each pre-set transaction service interface; for each period, if the current period is not the initial period, processing the flow data of each interface according to the predetermined target flow data of the previous period, the flow data of each interface of the current period and the interface type of each transaction service interface to obtain the flow input data of the current period; wherein the interface type is a core interface or a non-core interface; inputting the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next period output by the flow prediction model; determining the flow limiting threshold of each transaction service interface based on the flow prediction data of the next period and each interface type, and limiting the flow of each transaction service interface in the next period according to each flow limiting threshold.
[0109] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a flow limiting threshold prediction method as provided in all the embodiments of the present invention is implemented: through each pre-set transaction service interface, the interface flow data of each transaction service interface is obtained according to a preset period; for each period, if the current period is not the initial period, the interface flow data of each interface is processed according to the predetermined target flow data of the previous period, the flow data of each interface of the current period and the interface type of each transaction service interface, and the flow input data of the current period is obtained; wherein the interface type is a core interface or a non-core interface; the flow input data is input into a pre-trained flow prediction model to obtain the flow prediction data of the next period output by the flow prediction model; based on the flow prediction data of the next period and each interface type, the flow limiting threshold of each transaction service interface is determined, and the flow limiting threshold of each transaction service interface is performed in the next period according to each flow limiting threshold. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0110] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0111] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0112] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0113] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A current limiting threshold prediction method, characterized in that: The method comprises: Through each pre-set transaction service interface, the interface flow data of each transaction service interface is obtained according to a preset period; For each cycle, if the current cycle is not the initial cycle, the flow data of each interface is processed according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface to obtain the flow input data of the current cycle; wherein the interface type is a core interface or a non-core interface; Inputting the flow input data into a pre-trained flow prediction model to obtain flow prediction data for the next cycle output by the flow prediction model; The flow limiting thresholds of the transaction service interfaces are determined based on the traffic prediction data of the next cycle and the types of the interfaces, and the flow limiting is performed on the transaction service interfaces in the next cycle according to the flow limiting thresholds.
2. The method according to claim 1, characterized in that The interface traffic data includes time information, traffic information and call information; based on the previously acquired target traffic data of the previous cycle, the traffic data of each interface of the current cycle and the interface type of each transaction service interface, the traffic data of each interface is processed to obtain the traffic input data of the current cycle, including: Clean the flow data of each interface according to the time information of the flow data of each interface to obtain the flow data of each candidate interface; Filter out the traffic data of non-core interfaces from all candidate interface traffic data, and aggregate the traffic data of each non-core interface to obtain aggregated traffic data of each non-core interface; The flow input data is obtained according to the target flow data of the previous cycle, the aggregated flow data of each non-core interface and the candidate interface flow data of each core interface.
3. The method according to claim 2, characterized in that Aggregate the traffic data of each non-core interface to obtain aggregated traffic data of each non-core interface, including: For the flow data of each non-core interface, obtain the non-core interface sub-data in each preset time period in the flow data of the current non-core interface; Determine the aggregate data of each non-core interface sub-data; The sub-data of each non-core interface is updated according to the aggregated data to obtain the aggregated flow data of each non-core interface.
4. The method according to claim 1, characterized in that: Determining the flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle and each interface type includes: Calculate the recommended flow limiting threshold of each transaction service interface based on the flow prediction data of the next cycle; For each transaction service interface, if the interface type of the current transaction service interface is a core interface, determining that the current flow limiting threshold of the current transaction service interface is the recommended flow limiting threshold; If the interface type of the current service interface is a non-core interface, the flow limiting threshold of the current transaction service interface is determined according to the flow information of the current interface flow data; wherein the flow information includes the concurrency number of the transaction service interface.
5. The method according to claim 1, characterized in that Before processing the traffic data of each interface according to the pre-acquired target traffic data of the previous cycle, the traffic data of each interface of the current cycle and the interface type of each transaction service interface, the method further includes: Based on the current limiting thresholds and interface traffic data of each transaction service interface in the current cycle, a current limiting evaluation is performed on the current limiting thresholds of each transaction service interface in the current cycle to obtain a current limiting evaluation result; wherein the current limiting evaluation result is pass or fail; When the flow limiting evaluation result is passed, determining the target flow data of the previous cycle as the flow input data of the previous cycle; When the flow limiting evaluation result is failure, data optimization is performed on the flow input data of the previous cycle according to the parameter values of the model parameters of the flow prediction model and the evaluation result to obtain the target flow data of the previous cycle.
6. The method according to claim 5, characterized in that The model parameters include trend parameters and seasonal parameters. According to the parameter values of the model parameters of the flow prediction model and the evaluation results, the flow input data of the previous period is optimized to obtain the target flow data of the previous period, including: Determining the seasonality level of the flow input data of the previous period based on the trend parameter value, the seasonality parameter value, the preset trend parameter threshold value and the preset seasonal parameter threshold value; Determining an aggregation period of the flow input data of the previous period according to the seasonality level; The flow input data of the previous period is aggregated based on the aggregation period to obtain the target flow data.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a current limiting threshold prediction method according to any one of claims 1 to 6.
8. A current limiting threshold prediction device, characterized in that: include: The data acquisition module is used to acquire the interface flow data of each transaction service interface according to a preset period through each pre-set transaction service interface; A data processing module, for each cycle, if the current cycle is not the initial cycle, according to the predetermined target flow data of the previous cycle, the flow data of each interface of the current cycle and the interface type of each transaction service interface, to process the flow data of each interface to obtain the flow input data of the current cycle; wherein the interface type is a core interface or a non-core interface; A data prediction module, used to input the flow input data into a pre-trained flow prediction model to obtain the flow prediction data of the next cycle output by the flow prediction model; The threshold determination module is used to determine the flow limiting threshold of each transaction service interface based on the traffic prediction data of the next cycle and each interface type, and to limit the flow of each transaction service interface in the next cycle according to each flow limiting threshold.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a current limiting threshold prediction method as described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a current limiting threshold prediction method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Redis-based API flow limiting method and device, computer equipment and storage medium
CN113726676A
Interface dynamic flow control method and device, computer equipment and storage medium
CN114465959A
Network traffic anomaly detection method, device, equipment and medium
CN115643193A
Flow control method, device and equipment, readable storage medium and program product
CN116962304A
Intelligent Internet of Things traffic prediction and optimization system
CN117560300A