Alarm method and device based on interface call amount, equipment, medium and product
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHAOLIAN CONSUMER FINANCE CO LTD
- Filing Date
- 2022-12-13
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, the method of judging alarms by changes in interface call volume is relatively simple, which leads to a high probability of false alarms and low alarm accuracy.
By determining target time windows for multiple historical periods within a preset statistical duration prior to the current period, calculating the target baseline value based on the interface call volume, and combining the reference baseline values of multiple historical time windows, the difference in interface call volume in the current time window is determined, and an alarm is triggered.
It improves the accuracy of alarms, reduces false alarms, and ensures that alarms are more in line with actual business scenarios.
Smart Images

Figure CN116225828B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data monitoring technology, and in particular to an alarm method, device, equipment, medium and product based on interface call volume. Background Technology
[0002] With the development of computer technology, data monitoring technology has emerged. This technology allows for the monitoring of the volume of business services provided by internet companies, issuing alerts when anomalies occur. This facilitates the discovery and handling of business anomalies by development or operations personnel, ultimately providing a better user experience. Typically, this involves monitoring changes in the volume of API calls; when the change in API call volume exceeds a pre-set alarm threshold, an alert is issued.
[0003] However, real-world business scenarios are often quite complex. The method of triggering an alarm when the amount of change in the business interface calls exceeds a pre-set alarm threshold is too simplistic, has a high probability of false alarms, and low alarm accuracy. Summary of the Invention
[0004] Therefore, it is necessary to provide an alarm method, device, equipment, medium, and product based on the number of interface calls that can improve alarm accuracy in response to the above-mentioned technical problems.
[0005] Firstly, this application provides an alarm method based on API call volume. The method includes:
[0006] Within a preset statistical duration prior to the current period, target time windows corresponding to the current time window in the current period are determined in multiple historical periods, and target baseline values are determined based on the number of interface calls in each target time window.
[0007] When the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, at least one reference baseline value corresponding to the at least one historical time window is determined based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0008] An alarm is triggered when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
[0009] Secondly, this application also provides an alarm device based on interface call volume. The device includes:
[0010] The target baseline value determination module is used to determine the target time window corresponding to the current time window in the current period in each of the multiple historical periods within a preset statistical duration before the current period, and to determine the target baseline value based on the number of interface calls for each target time window.
[0011] The pre-alarm module is used to determine at least one reference baseline value corresponding to the at least one historical time window when the interface call volume of the current time window meets the pre-alarm condition based on the target baseline value.
[0012] The alarm module is used to trigger an alarm when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
[0013] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0014] Within a preset statistical duration prior to the current period, target time windows corresponding to the current time window in the current period are determined in multiple historical periods, and target baseline values are determined based on the number of interface calls in each target time window.
[0015] When the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, at least one reference baseline value corresponding to the at least one historical time window is determined based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0016] An alarm is triggered when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
[0017] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0018] Within a preset statistical duration prior to the current period, target time windows corresponding to the current time window in the current period are determined in multiple historical periods, and target baseline values are determined based on the number of interface calls in each target time window.
[0019] When the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, at least one reference baseline value corresponding to the at least one historical time window is determined based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0020] An alarm is triggered when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
[0021] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0022] Within a preset statistical duration prior to the current period, target time windows corresponding to the current time window in the current period are determined in multiple historical periods, and target baseline values are determined based on the number of interface calls in each target time window.
[0023] When the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, at least one reference baseline value corresponding to the at least one historical time window is determined based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0024] An alarm is triggered when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
[0025] The aforementioned alarm methods, devices, equipment, media, and products based on interface call volume determine the target baseline value based on the interface call volume of each target time window corresponding to the current time window. The target baseline value can reflect the baseline level of interface call volume before the current time window. Determining whether the interface call volume of the current time window meets the preliminary alarm conditions based on the target baseline value can improve the accuracy of alarms. Furthermore, when the difference between the interface call volume of the current time window and the interface call volume of each historical time window meets the alarm conditions, an alarm prompt is triggered. By judging whether to trigger an alarm prompt based on multiple conditions of the interface call volume of the current time window, false alarms are avoided, and alarm accuracy is improved. Attached Figure Description
[0026] Figure 1 This is a flowchart illustrating an alarm method based on API call volume in one embodiment;
[0027] Figure 2This is a flowchart illustrating the steps of determining the target time window corresponding to the current time window in the current period from multiple historical periods within a preset statistical duration before the current period, and determining the target baseline value based on the interface call volume of each target time window in one embodiment.
[0028] Figure 3 This is a schematic diagram illustrating a preset dynamic threshold in one embodiment;
[0029] Figure 4 This is a flowchart illustrating the steps for determining a group of valid values in one embodiment;
[0030] Figure 5 This is a flowchart illustrating the steps for determining a group of valid values in one embodiment;
[0031] Figure 6 This is a structural block diagram of an alarm device based on interface call volume in one embodiment;
[0032] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] In one embodiment, such as Figure 1 As shown, an alarm method based on interface call volume is provided. This embodiment illustrates the application of this method to a server. It is understood that this method can also be applied to terminals, and to systems including both terminals and servers, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0035] Step 102: Within the preset statistical duration prior to the current period, determine the target time window corresponding to the current time window in the current period in each of the multiple historical periods, and determine the target baseline value based on the interface call volume of each target time window.
[0036] The preset statistical duration is the pre-set statistical period. The current period is the statistical time period in which the current time falls. The historical period is the statistical time period within the preset statistical duration preceding the current period. For example, the preset statistical duration can be 14 days. If the current time is 00:05 on December 1, 2022, the current period can be December 1, 2022, and the historical period can be the 14 days preceding December 1, 2022, i.e., each day from November 17, 2022 to November 30, 2022.
[0037] A time window is the period between a start time and an end time. The current time window is the period corresponding to the current time within the current period. The current time window can be a period ending at the current time, or it can be a period ending at a time prior to the current time but within the current period. The target time window is the period within a historical period that corresponds to the current time window of the current period. For example, if the current time is 00:05 on December 1, 2022, the current time window could be from 00:00 to 00:05 on December 1, 2022, and the target time window could be from 00:00 to 00:05 every day from November 17, 2022 to November 30, 2022.
[0038] Interface call volume represents the number of times an interface is invoked. This interface can be a program interface of a computer program module. This computer program module can be a computer program module that implements business logic. The interface can be a program interface of a specific computer program module. Interface call volume can represent business volume. The interface call volume for a target time window is the number of times the interface of a computer program module is invoked within the target time window. The target baseline value is a benchmark value determined based on the interface call volume of each target time window. The target baseline value can be used to compare with the interface call volume of the current time window to measure the change in the interface call volume of the current time window relative to the interface call volume of each target time window.
[0039] In one embodiment, the server can take the same target time window as the time period indicated by the current time window in each of multiple historical periods within a preset statistical duration before the current period, obtain the interface call volume of each target time window in multiple historical periods, calculate the average value of the interface call volume of each target time window, and use the average value as the target baseline value.
[0040] In one embodiment, the server can remove the maximum and minimum values from the interface call volume of each target time window in multiple historical periods, calculate the average value of the interface call volume of the remaining target time window after removal, and use this average value as the target baseline value.
[0041] In one embodiment, the server can determine a preset number of interface calls from the interface call volume of each target time window in multiple historical periods, such that the coefficient of variation calculated based on the preset number of interface calls is less than a preset coefficient.
[0042] Step 104: When the interface call volume of the current time window meets the pre-alarm conditions based on the target baseline value, determine at least one reference baseline value corresponding to at least one historical time window based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0043] Among them, the preparatory alarm condition is the preparatory condition for triggering the alarm notification. A historical time window is a time window within a historical period that follows the time period indicated by the target time window. At least one historical time window includes one or more historical time windows. The time periods indicated by different historical time windows are not the same. For example, when the target time window is 00:00 to 00:05 every day from November 17, 2022 to November 30, 2022, and at least one historical time window is two types of historical time windows, one historical time window can be 00:06 to 00:10 every day from November 17, 2022 to November 30, 2022, and the other historical time window can be 00:11 to 00:15 every day from November 17, 2022 to November 30, 2022.
[0044] The interface call count for the current time window is the number of times the computer program module's interface is called within the current time window. The interface call count for a historical time window is the number of times the computer program module's interface is called within a historical time window. The reference baseline value is a benchmark value determined based on the interface call count of a corresponding historical time window within at least one historical time window. Each historical time window within at least one historical time window corresponds to a reference baseline value.
[0045] In one embodiment, the server may determine that the interface call volume of the current time window meets the pre-alarm condition based on the target baseline value when the difference between the target baseline value and the interface call volume of the current time window is greater than a preset difference threshold. Based on the interface call volume of at least one historical time window after the target time window in multiple historical periods, the server may determine at least one reference baseline value corresponding to at least one historical time window.
[0046] In one embodiment, the server may determine that the number of interface calls in the current time window meets the pre-alarm conditions based on the target baseline value when the ratio of the target baseline value to the number of interface calls in the current time window is greater than a preset ratio threshold. Based on the number of interface calls in at least one historical time window after the target time window in multiple historical periods, the server may determine at least one reference baseline value corresponding to at least one historical time window.
[0047] In one embodiment, when the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, the server can determine the interface call volume of at least one historical time window after the target time window in multiple historical periods. For each historical time window in at least one historical time window in multiple historical periods, the server calculates the average value of the interface call volume of the targeted historical time window and uses the average value as the reference baseline value corresponding to the targeted historical time window to obtain at least one reference baseline value corresponding to at least one historical time window.
[0048] Step 106: When the difference between the interface call volume of the current time window and the interface call volume of each historical time window is determined to meet the alarm conditions based on at least one reference baseline value, an alarm is triggered.
[0049] The alarm condition refers to the conditions that trigger the alarm notification. The alarm notification is a message indicating a possible fault.
[0050] In one embodiment, the server may determine that the difference between the interface call volume of the current time window and the interface call volume of each historical time window meets the alarm conditions when the difference between at least one reference baseline value and the interface call volume of the current time window is greater than a preset difference threshold, and trigger an alarm prompt.
[0051] In one embodiment, the server may determine that the difference between the interface call volume of the current time window and the interface call volume of each historical time window, based on at least one reference baseline value, meets the alarm conditions and trigger an alarm prompt when the ratio of at least one reference baseline value to the interface call volume of the current time window is greater than a preset ratio threshold.
[0052] In one embodiment, when the difference between the interface call volume of the current time window and the interface call volume of each historical time window, determined based on at least one reference baseline value, meets the alarm conditions, the server can trigger an alarm notification and send an alarm notification message to the management terminal. The alarm notification message can be a pop-up message or a task in a to-do list.
[0053] The aforementioned alarm method based on API call volume determines the target baseline value based on the API call volume of each target time window corresponding to the current time window. The target baseline value reflects the baseline level of API call volume before the current time window. Determining whether the API call volume of the current time window meets the preliminary alarm conditions based on the target baseline value can improve the accuracy of alarms. Furthermore, when the difference between the API call volume of the current time window and the API call volume of each historical time window meets the alarm conditions, an alarm is triggered. By judging whether to trigger an alarm based on multiple conditions of the API call volume of the current time window, false alarms are avoided, and the accuracy of alarms is improved.
[0054] In one embodiment, such as Figure 2 As shown, step 102 includes the following steps 202 to 208:
[0055] Step 202: Within each of the multiple historical periods within the preset statistical duration prior to the current period, select a target time window that is the same as the time period indicated by the current time window in the current period.
[0056] In one embodiment, the server can determine the start time of the current time window and the window length of the current time window, and within each of multiple historical periods within a preset statistical duration prior to the current period, determine a target time window of one window length starting from the start time point as the target time window.
[0057] Step 204: Obtain the API call volume for each target time window of multiple historical periods, and remove the maximum and minimum values from the API call volume for each target time window of multiple historical periods.
[0058] In one embodiment, the server can obtain API call data for multiple historical periods, and for each target time window within the multiple historical periods, statistically analyze the API call volume based on the API call data to obtain the API call volume for each target time window within the multiple historical periods. The API call data refers to the API call volume at each time point within each of the multiple historical periods.
[0059] In one embodiment, the server can remove the top-ranked interface call volume in descending order and the top-ranked interface call volume in ascending order from the interface call volumes of each target time window in multiple historical periods.
[0060] Step 206: Determine at least a preset number of interface calls from the remaining interface call volume of the target time window after the removal.
[0061] The preset quantity is a pre-set quantity. The preset quantity can be related to the preset statistical duration. For example, the preset quantity can be half of the preset statistical duration, that is, when the preset statistical duration is 14, the preset quantity is 7.
[0062] In one embodiment, the server may determine at least a preset number of interface calls from the remaining interface call volume of the target time window after removal, such that the coefficient of variation calculated based on the at least preset number of interface calls is less than a preset coefficient.
[0063] In one embodiment, the server can extract a preset number of interface call volumes for any target time window from the remaining interface call volumes for the target time window after removal, and obtain a first numerical set composed of the preset number of extracted interface call volumes, and a second numerical set composed of the remaining interface call volumes after removing the interface call volumes. The server calculates the coefficient of variation for the first numerical set. When the calculated coefficient of variation is less than a preset coefficient, the server cyclically extracts any interface call volume from the current second numerical set and adds it to the first numerical set, until the coefficient of variation recalculated for the current first numerical set is greater than or equal to the preset coefficient, and obtains at least a preset number of interface call volumes included in the current first numerical set.
[0064] Step 208: Calculate the average value of at least a preset number of interface calls to determine the target baseline value.
[0065] The average value can be the mean, weighted average, moving average, or other average values.
[0066] In one embodiment, the server may calculate the average of at least a preset number of interface call volumes, using the average as the target baseline value.
[0067] In one embodiment, the server can calculate the average of at least a preset number of interface call volumes, process the average according to a preset data precision, and use the processed average as the target baseline value. The preset data precision is a pre-set precision for data values, such as rounding a number with multiple decimal places to two decimal places.
[0068] In this embodiment, the target time window of each of the multiple historical periods is the same as the time period of the current time window. Moreover, the maximum and minimum values are removed from the interface call volume of each target time window to avoid the influence of outliers. Furthermore, the average value is calculated for at least a preset number of interface call volumes. The resulting target baseline value can more accurately represent the historical benchmark value of the interface call volume of the current time window. This makes it possible for subsequent determinations based on the target baseline value that the interface call volume of the current time window meets the pre-alarm conditions to be consistent with the actual alarm scenario, thereby further improving the alarm accuracy.
[0069] In one embodiment, step 206 includes: arranging the interface call volumes of the remaining target time window after removal in ascending order of numerical value to obtain an interface call volume sequence; extracting the first preset number of interface call volumes from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface call volumes, and a remaining interface call volume sequence after extracting the interface call volumes; calculating the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface call volumes; when the coefficient of variation calculated for the effective value sequence is less than a preset coefficient, cyclically extracting the first-ranked interface call volume from the current remaining interface call volume sequence and adding it to the effective value sequence, until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining interface call volume sequence, to obtain at least a preset number of interface call volumes included in the current effective value sequence.
[0070] The API call sequence consists of API call counts arranged in ascending order. The valid value sequence consists of valid API call counts. API call counts in the valid value sequence can be used to calculate the target baseline value. The remaining API call sequence consists of API call counts remaining after removing API call counts from the API call sequence. API call counts in the remaining API call sequence are ordered in ascending order, with the smallest API call count listed first.
[0071] The coefficient of variation (COP) is a relative statistic that measures the degree of variation in data. It is the ratio of the standard deviation to the mean of a set of data. The preset coefficient is a pre-set value. The preset coefficient can be 0.5. The preset coefficient can serve as a critical value for measuring the dispersion of a set of data. When the COP is less than the preset coefficient, it indicates that the data dispersion is low, and the average indicator is highly representative of the data. When the COP is greater than or equal to the preset coefficient, it indicates that the data dispersion is low, and the average indicator is not highly representative of the data. An average indicator is such as the mean.
[0072] In this embodiment, when the calculated coefficient of variation is less than the preset coefficient, it indicates that the dispersion of the current valid value sequence is small. The interface call volume ranked first in the remaining interface call volume sequence is added to the valid value sequence in a cyclical manner to filter out valid value sequences with a coefficient of variation less than the preset coefficient and as many interface calls as possible in the valid value sequence. This can obtain a valid value sequence with a small dispersion and as much data volume as possible. Subsequently, the target baseline value can be obtained through at least a preset number of interface calls included in the valid value sequence, which can further improve the alarm accuracy.
[0073] In one embodiment, the server can start from the first interface call in the interface call sequence, and take a preset number of interface calls in ascending order of value to obtain a valid value sequence composed of the preset number of interface calls taken out, as well as a remaining interface call sequence after taking out the interface calls.
[0074] In one embodiment, step 206 further includes: arranging the interface call volumes of the remaining target time window after removal in ascending order of numerical value to obtain an interface call volume sequence; extracting the first preset number of interface call volumes from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface call volumes, and a remaining interface call volume sequence after removing the interface call volumes; calculating the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface call volumes; when the coefficient of variation calculated for the effective value sequence is greater than or equal to a preset coefficient, cyclically removing the minimum value from the current effective value sequence, and adding the first-ranked interface call volume from the current remaining interface call volume sequence to the effective value sequence after removing the minimum value, until the coefficient of variation recalculated for the current effective value sequence is less than the preset coefficient, and then cyclically adding the first-ranked interface call volume from the current remaining interface call volume sequence to the effective value sequence, until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining interface call volume sequence, to obtain at least a preset number of interface call volumes included in the current effective value sequence.
[0075] In this embodiment, when the calculated coefficient of variation is greater than or equal to a preset coefficient, it indicates that the current effective value sequence has a high degree of dispersion. The minimum value in the effective value sequence is cyclically removed, and the interface call volume ranked first in the remaining interface call volume sequence is added to the effective value sequence to obtain an effective value sequence with a coefficient of variation less than the preset coefficient. When the recalculated coefficient of variation is less than the preset coefficient, the interface call volume is cyclically added to the effective value sequence to obtain an effective value sequence with a small degree of dispersion and as much data as possible. Subsequently, the target baseline value can be obtained through the at least preset number of interface calls included in the effective value sequence, which can further improve the alarm accuracy.
[0076] In one embodiment, step 104 includes: determining a target fluctuation ratio based on the interface call volume of the current time window and the target baseline value; determining that the interface call volume of the current time window meets the pre-alarm condition when the target fluctuation ratio meets a preset condition and the target fluctuation ratio and the target threshold determined from the preset dynamic threshold table based on the target baseline value meet a first preset threshold condition; determining at least one historical time window after the target time window in multiple historical periods according to the window length of the target time window; and determining at least one reference baseline value corresponding to the at least one historical time window based on the interface call volume of the at least one historical time window after the target time window in multiple historical periods.
[0077] The target fluctuation ratio is the percentage change in API call volume within the current time window compared to the API call volume within target time windows across multiple historical periods. The preset conditions are conditions pre-set for the target fluctuation ratio. The first preset threshold condition is a pre-set condition for both the target fluctuation ratio and the target threshold. The preset dynamic threshold table is a pre-set table of dynamically obtainable thresholds. The target threshold is the threshold corresponding to the target time window determined from the preset dynamic threshold table. The window length of the target time window is the duration from the start time point to the end time point.
[0078] In this embodiment, the target threshold is determined from a preset dynamic threshold table based on the target baseline value. This target threshold is adapted to the target baseline value rather than a fixed threshold, which can further improve the accuracy of the alarm. Moreover, by determining that the target fluctuation ratio meets the preset conditions, and determining that the target fluctuation ratio and the target threshold meet the first preset threshold conditions, it is determined that the interface call volume in the current time window meets the pre-alarm conditions, indicating that the interface call volume in the current time window may be abnormal, thus creating conditions for further triggering of alarm prompts.
[0079] In one embodiment, the server can calculate the ratio of the difference between the current time window's API call volume and the target baseline value to the target baseline value, and multiply this ratio by 100% as the target fluctuation ratio. When the target fluctuation ratio is less than zero, and the absolute value of the target fluctuation ratio is greater than or equal to a target threshold, it is determined that the current time window's API call volume meets the pre-alarm condition. In this embodiment, the preset condition can be that the target fluctuation ratio is less than zero, and the first preset threshold condition can be that the absolute value of the target fluctuation ratio is greater than or equal to the target threshold. When the target fluctuation ratio is less than zero, it indicates that the current time window's API call volume has decreased compared to the target baseline value. When the absolute value of the target fluctuation ratio is greater than or equal to the target threshold, it indicates that the current time window's API call volume has decreased significantly compared to the target baseline value, which may indicate an anomaly and may therefore require triggering an alarm.
[0080] In one embodiment, the server can calculate the ratio of the interface call volume in the current time window to the target baseline value, and use this ratio as the target fluctuation ratio. When the target fluctuation ratio is less than one and less than a target threshold, it is determined that the interface call volume in the current time window meets the pre-alarm condition. In this embodiment, the preset condition can be that the target fluctuation ratio is less than one, and the first preset threshold condition can be that the target fluctuation ratio is less than a target threshold.
[0081] In one embodiment, the server may start from the end of the target time window and determine at least one historical time window after the target time window within multiple historical periods, such that the window length of each historical time window is the same as the window length of the target time window.
[0082] In one embodiment, the server can, for each historical time window within at least one historical time window in multiple historical periods, remove the maximum and minimum values from the interface call volume of each historical time window, arrange the remaining interface call volumes of the historical time windows in ascending order of value to obtain a historical interface call volume sequence, extract the first preset number of interface call volumes from the historical interface call volume sequence to obtain a historical valid value sequence composed of the extracted preset number of interface call volumes, and the remaining historical interface call volume sequence after extracting the interface call volumes, and calculate the coefficient of variation for the historical valid value sequence;
[0083] When the coefficient of variation calculated for the historical valid value sequence is less than the preset coefficient, the server can cyclically add the top-ranked interface call from the current remaining historical interface call sequence to the historical valid value sequence until the coefficient of variation recalculated for the current historical valid value sequence is greater than or equal to the preset coefficient, or until there are no interface calls in the current remaining historical interface call sequence, thus obtaining the current historical valid value sequence; calculate the average value of the historical valid value sequence, and use this average value as the reference baseline value for the corresponding historical time window to obtain at least one reference baseline value corresponding to at least one historical time window.
[0084] In one embodiment, when the coefficient of variation calculated for the historical valid value sequence is greater than or equal to a preset coefficient, the server may cyclically remove the minimum value from the current historical valid value sequence and add the first-ranked interface call from the current remaining historical interface call sequence to the historical valid value sequence after removing the minimum value, until the coefficient of variation recalculated for the current historical valid value sequence is less than the preset coefficient. Then, the server may cyclically add the first-ranked interface call from the current remaining historical interface call sequence to the historical valid value sequence, until the coefficient of variation recalculated for the current historical valid value sequence is greater than or equal to the preset coefficient, or until there are no interface calls in the current remaining historical interface call sequence, thereby obtaining the current historical valid value sequence. The server may then calculate the average value of the historical valid value sequence and use this average value as the reference baseline value for the corresponding historical time window to obtain at least one reference baseline value corresponding to at least one historical time window.
[0085] In one embodiment, the alarm method based on interface call volume further includes a step of determining a target threshold from a preset dynamic threshold table. This step includes: determining the target dynamic baseline lower limit value to which the target baseline value belongs in the preset dynamic threshold table, wherein the target dynamic baseline lower limit value is less than the target baseline value and is closest to the target baseline value in the preset dynamic threshold table; and obtaining the target threshold corresponding to the target dynamic baseline lower limit value in the preset dynamic threshold table.
[0086] The target dynamic baseline lower limit is a dynamic baseline lower limit value used in a preset dynamic threshold table to define the lower limit of the target baseline value. The preset dynamic threshold table may contain a mapping relationship between dynamic baseline lower limits and dynamic thresholds. For example... Figure 3 The example diagram of the preset dynamic threshold is shown in the table. The table records the mapping relationship between the lower limit of the dynamic baseline and the dynamic threshold. When the target baseline value is 100, the target dynamic baseline lower limit is 60, and the target threshold is the threshold corresponding to the target dynamic baseline lower limit of 60, which is 70%.
[0087] In this embodiment, the target dynamic baseline lower limit is determined from the preset dynamic threshold based on the target baseline value, and then the target threshold is determined. This method can determine the target threshold more conveniently, and the target threshold can flexibly change with the target baseline value, further improving the alarm accuracy.
[0088] In one embodiment, step 106 includes: determining at least one reference fluctuation ratio corresponding to at least one historical time window based on the interface call volume of the current time window and at least one reference baseline value; each reference fluctuation ratio characterizes the difference between the interface call volume of the current time window and the interface call volume of the corresponding historical time window; determining at least one reference threshold corresponding to at least one historical time window from a preset dynamic threshold table based on at least one reference baseline value; and triggering an alarm when at least one reference fluctuation ratio meets a second preset threshold condition with the reference threshold corresponding to at least one reference threshold.
[0089] The reference threshold is the threshold corresponding to a historical time window determined from a preset dynamic threshold table. The second preset threshold condition is a condition pre-set for the reference baseline value and the reference threshold.
[0090] In this embodiment, after the number of interface calls in the current time window meets the pre-alarm conditions, the system further judges at least one reference fluctuation ratio corresponding to at least one historical time window and the corresponding reference threshold. When the second preset threshold condition is met, an alarm is triggered. Through multiple conditions, false judgments are reduced, and the accuracy of the alarm is further improved.
[0091] In one embodiment, the server may determine, based on at least one reference baseline value, the reference dynamic baseline lower limit value to which at least one reference baseline value belongs in the preset dynamic threshold table, wherein the reference dynamic baseline lower limit value is less than the corresponding reference baseline value and is closest to the corresponding reference baseline value in the preset dynamic threshold table; obtain the reference threshold corresponding to at least one reference dynamic baseline lower limit value in the preset dynamic threshold table, and determine the reference threshold corresponding to at least one historical time window.
[0092] In one embodiment, the server can calculate the ratio of the difference between the interface call volume of the current time window and the corresponding reference baseline value to the reference baseline value for each historical time window, and multiply this ratio by 100% to obtain the corresponding reference fluctuation ratio, thus obtaining at least one reference fluctuation ratio corresponding to at least one historical time window. When the absolute value of at least one reference fluctuation ratio is greater than or equal to the corresponding reference threshold, it is determined that at least one reference fluctuation ratio meets a second preset threshold condition with respect to the corresponding reference threshold among the at least one reference thresholds, triggering an alarm. The second preset threshold condition can be that the absolute value of at least one reference fluctuation ratio is greater than or equal to the corresponding reference threshold.
[0093] In this embodiment, when the absolute value of at least one reference fluctuation ratio is greater than or equal to the corresponding reference threshold, it indicates that the interface call volume in the current time window has decreased significantly compared to the interface call volume in the period following the current period in the historical cycle. Therefore, an alarm is triggered, excluding the situation where the current time window is in a low period of interface calls, which greatly improves the accuracy of the alarm.
[0094] In one embodiment, the server can calculate the ratio of the number of API calls in the current time window to the reference baseline value corresponding to each historical time window for at least one historical time window, and use this ratio as the corresponding reference fluctuation ratio; when at least one reference fluctuation ratio is less than the corresponding reference threshold, it is determined that at least one reference fluctuation ratio meets the second preset threshold condition with the reference threshold corresponding to at least one reference threshold, and an alarm is triggered.
[0095] In one specific embodiment, the above-mentioned alarm method based on interface call volume specifically includes:
[0096] The server can select a target time window that is the same as the time period indicated by the current time window in each of the multiple historical periods within the preset statistical duration before the current period; obtain the interface call volume of the target time window of each of the multiple historical periods; remove the maximum and minimum values from the interface call volume of the target time window of each of the multiple historical periods; and determine a valid value group including at least a preset number of interface call volumes from the interface call volume of the remaining target time window after removal.
[0097] like Figure 4 The flowchart for determining the effective value group is shown. The server can sort the interface call volume of the remaining target time window after removal in ascending order of value to obtain a control group (interface call volume sequence). From the control group, the interface call volume of the first DayNum / 2 (DayNum, the preset statistical duration; DayNum / 2 is half of the preset statistical duration; the preset quantity can be DayNum / 2) is taken to obtain the effective value group (effective value sequence) composed of the preset quantity of interface call volume taken, and the remaining data control group after removing the interface call volume (remaining interface call volume sequence); the coefficient of variation is calculated for the effective value group. The coefficient of variation represents the dispersion of the selected DayNum / 2 interface call volume.
[0098] When the coefficient of variation calculated for the valid value group is less than the preset coefficient, the server can repeatedly add the top-ranked interface call volume from the current remaining data control group to the valid value group until the coefficient of variation recalculated for the current valid value group is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining data control group, to obtain the current valid value group and the minimum preset number of interface call volumes included in the current valid value group.
[0099] When the coefficient of variation calculated for the valid value group is greater than or equal to the preset coefficient, the server can cyclically remove the minimum value from the current valid value group and add the top-ranked interface call volume from the current remaining data control group to the valid value group after removing the minimum value, until the coefficient of variation recalculated for the current valid value group is less than the preset coefficient. Then, the server can cyclically add the top-ranked interface call volume from the current remaining data control group to the valid value group, until the coefficient of variation recalculated for the current valid value group is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining data control group, thus obtaining the current valid value group and the minimum preset number of interface call volumes included in the current valid value group.
[0100] In a specific scenario, when the preset coefficient is 0.5, the preset statistical duration is 14 (i.e., the preset number is 7), the control group specifically [2,2,3,4,5,6,7,10,15,16,20,22,1660,3660] is processed as follows: Figure 4 The processing shown yields the following valid value set: [2,3,4,5,6,7,10,15,16,20,22].
[0101] Through such Figure 4 After obtaining at least a preset number of interface calls through the steps shown, the server can calculate a sliding average of at least a preset number of interface calls, using this sliding average as the target baseline value.
[0102] like Figure 5 The flowchart illustrating the anomaly detection and alarm triggering process illustrates that the server calculates the ratio of the difference between the current time window's API call volume and the target baseline value to the target baseline value. This ratio, multiplied by 100%, is taken as the target fluctuation ratio. When the target fluctuation ratio is less than zero (negative), the server determines that the target baseline value is below zero. Figure 3 The target threshold corresponding to the target dynamic baseline lower limit value in the preset dynamic threshold table is obtained if the target dynamic baseline lower limit value is less than the target baseline value and is closest to the target baseline value in the preset dynamic threshold table.
[0103] When the absolute value of the target fluctuation ratio is greater than or equal to the target threshold, the server can determine at least one historical time window after the target time window in each of the multiple historical periods, according to the window length of the target time window; and determine at least one reference baseline value corresponding to the at least one historical time window based on the interface call volume of the at least one historical time window after the target time window in each of the multiple historical periods.
[0104] The server can calculate the ratio of the difference between the interface call volume of the current time window and the corresponding reference baseline value to the corresponding reference baseline value for each historical time window, and multiply the ratio by 100% as the corresponding reference fluctuation ratio to determine at least one reference fluctuation ratio corresponding to at least one historical time window; and determine at least one reference threshold corresponding to at least one historical time window from a preset dynamic threshold table based on at least one reference baseline value; when the absolute value of at least one reference fluctuation ratio is greater than or equal to the corresponding reference threshold, an anomaly is determined and an alarm is triggered.
[0105] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0106] Based on the same inventive concept, this application also provides an interface call volume-based alarm device for implementing the above-mentioned alarm method based on interface call volume. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more interface call volume-based alarm device embodiments provided below can be found in the limitations of the interface call volume-based alarm method above, and will not be repeated here.
[0107] In one embodiment, such as Figure 6 As shown, an alarm device 600 based on interface call volume is provided, including: a target baseline value determination module 610, a pre-alarm module 620, and an alarm module 630, wherein:
[0108] The target baseline value determination module 610 is used to determine the target time window corresponding to the current time window in the current period in each of the multiple historical periods within a preset statistical duration before the current period, and to determine the target baseline value based on the number of interface calls in each target time window.
[0109] The pre-alarm module 620 is used to determine at least one reference baseline value corresponding to at least one historical time window when the interface call volume of the current time window meets the pre-alarm conditions based on the target baseline value, based on the interface call volume of at least one historical time window after the target time window in multiple historical periods.
[0110] The alarm module 630 is used to trigger an alarm when the difference between the interface call volume of the current time window and the interface call volume of each historical time window is determined to meet the alarm conditions based on at least one reference baseline value.
[0111] In one embodiment, the target baseline value determination module 610 is further configured to: within each of multiple historical periods within a preset statistical duration prior to the current period, select a target time window that is the same as the time period indicated by the current time window in the current period; obtain the interface call volume of the target time window for each of the multiple historical periods; remove the maximum and minimum values from the interface call volume of the target time window for each of the multiple historical periods; determine at least a preset number of interface call volumes from the remaining interface call volumes of the target time window after removal; calculate the average value of the at least preset number of interface call volumes to determine the target baseline value.
[0112] In one embodiment, the target baseline value determination module 610 is further configured to arrange the interface call volume of the remaining target time window after removal in ascending order of numerical value to obtain an interface call volume sequence; extract the first preset number of interface call volumes from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface call volumes, and a remaining interface call volume sequence after extracting the interface call volumes; calculate the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface call volumes; when the coefficient of variation calculated for the effective value sequence is less than a preset coefficient, cyclically extract the first-ranked interface call volume from the current remaining interface call volume sequence and add it to the effective value sequence, until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining interface call volume sequence, to obtain at least a preset number of interface call volumes included in the current effective value sequence.
[0113] In one embodiment, the target baseline value determination module 610 is further configured to: arrange the interface call volume of the remaining target time window after removal in ascending order of numerical value to obtain an interface call volume sequence; extract the first preset number of interface call volumes from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface call volumes, and a remaining interface call volume sequence after removing the interface call volumes; calculate the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface call volumes; when the coefficient of variation calculated for the effective value sequence is greater than or equal to a preset coefficient, cyclically remove the minimum value from the current effective value sequence, and add the first-ranked interface call volume from the current remaining interface call volume sequence to the effective value sequence after removing the minimum value, until the coefficient of variation recalculated for the current effective value sequence is less than the preset coefficient, and then cyclically add the first-ranked interface call volume from the current remaining interface call volume sequence to the effective value sequence, until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface call volumes in the current remaining interface call volume sequence, thereby obtaining at least a preset number of interface call volumes included in the current effective value sequence.
[0114] In one embodiment, the pre-alarm module 620 is further configured to determine a target fluctuation ratio based on the interface call volume of the current time window and the target baseline value; when the target fluctuation ratio meets a preset condition, and the target fluctuation ratio and the target threshold determined from the preset dynamic threshold table based on the target baseline value meet a first preset threshold condition, it is determined that the interface call volume of the current time window meets the pre-alarm condition; according to the window length of the target time window, at least one historical time window after the target time window in multiple historical periods is determined; based on the interface call volume of the at least one historical time window after the target time window in multiple historical periods, at least one reference baseline value corresponding to the at least one historical time window is determined.
[0115] In one embodiment, the pre-alarm module 620 is further configured to determine the target dynamic baseline lower limit value to which the target baseline value belongs in the preset dynamic threshold table, wherein the target dynamic baseline lower limit value is less than the target baseline value and is closest to the target baseline value in the preset dynamic threshold table; and obtain the target threshold value corresponding to the target dynamic baseline lower limit value in the preset dynamic threshold table.
[0116] In one embodiment, the alarm module 630 is further configured to determine at least one reference fluctuation ratio corresponding to at least one historical time window based on the interface call volume of the current time window and at least one reference baseline value; each reference fluctuation ratio characterizes the difference between the interface call volume of the current time window and the interface call volume of the corresponding historical time window; determine at least one reference threshold corresponding to at least one historical time window from a preset dynamic threshold table based on at least one reference baseline value; and trigger an alarm prompt when at least one reference fluctuation ratio meets the second preset threshold condition with the reference threshold corresponding to at least one reference threshold.
[0117] Each module in the aforementioned alarm device based on interface call volume can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0118] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores the data required for executing the alarm method based on interface call counts. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an alarm method based on interface call counts.
[0119] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0120] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0121] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0122] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0123] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0124] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0125] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for alarming based on API call volume, characterized in that, The method includes: Within each of the multiple historical periods within a preset statistical duration prior to the current period, a target time window is selected that is the same as the time period indicated by the current time window in the current period. Obtain the interface call volume of each target time window in the multiple historical periods, and remove the maximum and minimum values from the interface call volume of each target time window in the multiple historical periods; From the interface call volume remaining in the target time window after removal, determine at least a preset number of interface calls such that the coefficient of variation calculated based on the at least preset number of interface calls is less than a preset coefficient. This includes: arranging the interface call volume remaining in the target time window after removal in ascending order of value to obtain an interface call volume sequence; extracting the first preset number of interface calls from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface calls, and a remaining interface call volume sequence after extracting the interface calls; calculating the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface calls; when the coefficient of variation calculated for the effective value sequence is less than the preset coefficient, cyclically adding the first-ranked interface call from the current remaining interface call volume sequence to the effective value sequence, until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface calls in the current remaining interface call volume sequence, to obtain at least a preset number of interface calls included in the current effective value sequence such that the coefficient of variation calculated based on the at least preset number of interface calls is less than the preset coefficient. Calculate the average value of the at least preset number of interface call volumes to determine a target baseline value; the target baseline value is used to measure the change in the interface call volume of the current time window relative to the interface call volume of each target time window; When the interface call volume of the current time window is determined to meet the pre-alarm conditions based on the target baseline value, at least one reference baseline value corresponding to the at least one historical time window is determined based on the interface call volume of at least one historical time window after the target time window in multiple historical periods. An alarm is triggered when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
2. The method according to claim 1, characterized in that, The method further includes: When the difference between the target baseline value and the number of interface calls in the current time window is greater than a preset difference threshold, or when the ratio of the target baseline value to the number of interface calls in the current time window is greater than a preset ratio threshold, it is determined that the number of interface calls in the current time window meets the pre-alarm condition based on the target baseline value.
3. The method according to claim 1, characterized in that, Determining at least a preset number of interface calls from the remaining interface call volume within the target time window after removal includes: The API call volume of the remaining target time window after removal is sorted in ascending order to obtain the API call volume sequence; Extract the first preset number of interface call counts from the interface call count sequence to obtain a valid value sequence composed of the extracted preset number of interface call counts, and a remaining interface call count sequence after extracting the interface call counts; Calculate the coefficient of variation for the valid value sequence; the coefficient of variation characterizes the dispersion of the preset number of interface calls taken out; When the coefficient of variation calculated for the valid value sequence is greater than or equal to a preset coefficient, the minimum value is cyclically removed from the current valid value sequence, and the first-ranked interface call from the current remaining interface call sequence is added to the valid value sequence after removing the minimum value. This process continues until the coefficient of variation recalculated for the current valid value sequence is less than the preset coefficient. Then, the first-ranked interface call from the current remaining interface call sequence is added to the valid value sequence again. This process continues until the coefficient of variation recalculated for the current valid value sequence is greater than or equal to the preset coefficient, or until there are no interface calls in the current remaining interface call sequence, thus obtaining at least a preset number of interface calls included in the current valid value sequence.
4. The method according to claim 1, characterized in that, The step of determining at least one reference baseline value corresponding to the at least one historical time window based on the interface call volume of the current time window after the target baseline value, based on the interface call volume of at least one historical time window after the target time window in multiple historical periods, includes: The target fluctuation ratio is determined based on the interface call volume in the current time window and the target baseline value. When the target fluctuation ratio meets the preset conditions, and the target fluctuation ratio meets the first preset threshold condition with the target threshold determined from the preset dynamic threshold table based on the target baseline value, it is determined that the interface call volume of the current time window meets the pre-alarm condition. Based on the window length of the target time window, at least one historical time window is determined after the target time window in each of the multiple historical periods. Based on the number of interface calls in at least one historical time window following the target time window in multiple historical periods, at least one reference baseline value corresponding to the at least one historical time window is determined.
5. The method according to claim 4, characterized in that, The method further includes: Determine the target dynamic baseline lower limit value to which the target baseline value belongs in the preset dynamic threshold table, wherein the target dynamic baseline lower limit value is less than the target baseline value and is closest to the target baseline value in the preset dynamic threshold table; Obtain the target threshold corresponding to the target dynamic baseline lower limit value in the preset dynamic threshold table.
6. The method according to claim 4, characterized in that, The step of triggering an alarm notification when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows, based on the at least one reference baseline value, meets the alarm conditions includes: Based on the interface call volume of the current time window and the at least one reference baseline value, at least one reference fluctuation ratio corresponding to the at least one historical time window is determined; each reference fluctuation ratio represents the difference between the interface call volume of the current time window and the interface call volume of the corresponding historical time window. Based on the at least one reference threshold value, at least one reference threshold corresponding to the at least one historical time window is determined from the preset dynamic threshold table; An alarm is triggered when the at least one reference fluctuation ratio meets the second preset threshold condition with the reference threshold corresponding to the at least one reference threshold.
7. An alarm device based on interface call volume, characterized in that, The device includes: The target baseline value determination module is used to select a target time window that is the same as the time period indicated by the current time window in each of multiple historical periods within a preset statistical duration prior to the current period; obtain the interface call volume of the target time window for each of the multiple historical periods; remove the maximum and minimum values from the interface call volume of the target time window for each of the multiple historical periods; and determine at least a preset number of interface call volumes from the remaining interface call volumes of the target time windows after removal, such that the coefficient of variation calculated based on the at least preset number of interface call volumes is less than a preset coefficient. This includes: arranging the interface call volumes of the remaining target time windows after removal in ascending order of value to obtain an interface call volume sequence; and extracting the first preset number of interface call volumes from the interface call volume sequence to obtain an effective value sequence composed of the extracted preset number of interface call volumes. The system retrieves the remaining interface call volume sequence after extracting the interface call volume; calculates the coefficient of variation for the effective value sequence; the coefficient of variation characterizes the dispersion of the extracted preset number of interface calls; when the coefficient of variation calculated for the effective value sequence is less than the preset coefficient, the system iteratively extracts the first-ranked interface call volume from the current remaining interface call volume sequence and adds it to the effective value sequence until the coefficient of variation recalculated for the current effective value sequence is greater than or equal to the preset coefficient, or until there are no interface calls in the current remaining interface call volume sequence, thereby obtaining at least a preset number of interface calls included in the current effective value sequence; calculates the average value of the at least preset number of interface calls, and determines a target baseline value; the target baseline value is used to measure the change in the interface call volume of the current time window relative to the interface call volume of each target time window; The pre-alarm module is used to determine at least one reference baseline value corresponding to the at least one historical time window when the interface call volume of the current time window meets the pre-alarm condition based on the target baseline value. The alarm module is used to trigger an alarm when the difference between the interface call volume of the current time window and the interface call volume of each of the historical time windows is determined to meet the alarm conditions based on the at least one reference baseline value.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.