Intelligent alarm method, device, equipment, medium and program product

By normal distribution modeling of the historical call data of the API interface, the alarm thresholds of each service interface are determined, and the problem of difficult to balance the alarm accuracy and recall rates in the prior art is solved, and more efficient interface availability monitoring is achieved.

CN119847879APending Publication Date: 2025-04-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311340019.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-16
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

In the management of the existing technology, it is difficult to effectively balance the accuracy and recall of alarms in API interfaces, resulting in the problems of false alarms and missed alarms.

Method used

By obtaining the success and failure calls of each service interface during the historical time period, modeling their distributions respectively, the first normal distribution and the second normal distribution are obtained. Based on the preset alarm probability and these distributions, the threshold number of calls for each service interface is determined, and the interface whose threshold is triggered is detected within the current time period to send alarm information.

Benefits of technology

Improves the accuracy and recall rate of alarms, reduces the situation of false alarms and missed alarms, and ensures the effectiveness of interface availability monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847879A_ABST
    Figure CN119847879A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent alarm method, device and equipment, a medium and a program product. The method comprises the following steps: modeling historical successful call times and historical failed call times of different service interfaces to obtain first normal distribution and second normal distribution; determining a first call frequency threshold according to the first preset alarm probability and the first normal distribution, and determining a second call frequency threshold according to the second preset alarm probability and the second normal distribution; and obtaining a target service interface of which the successful calling frequency is less than a first calling frequency threshold and the failed calling frequency is greater than a second calling frequency threshold in the current time period, and sending alarm information that the target service interface is abnormal to the first equipment. According to the scheme, the personalized alarm threshold can be configured for each service interface based on the historical call data and the preset alarm probability for fault detection, the alarm recall rate is improved while the alarm accuracy is ensured, and the conditions of false alarm and alarm leakage are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and specifically to an intelligent alarm method, device, electronic device, computer storage medium and computer program product. Background Art

[0002] With the rapid development of mobile Internet, more and more enterprises are beginning to use API interfaces to quickly expand and develop their businesses. However, the large number of API interfaces, high complexity, and high maintenance costs are a challenge for enterprises. For this reason, cloud API platforms have become the first choice for enterprises to implement API interface management.

[0003] When a user device manages cloud resources through an interface call, it will pass through the API gateway (i.e., the unified gateway platform) and then be routed to the corresponding backend service business for processing according to the called interface. In this scenario, both the platform and the backend business may have problems, resulting in poor interface call quality. In order to ensure the interface quality of the platform and backend service business, an indicator is defined - interface availability, which is the ratio of the number of successful interface calls by the user device through the unified gateway platform to the total number of interface calls by the user device through the unified gateway platform. In actual applications, high backend business processor (Central Processing Unit, CPU) load, high database (database, DB) load, logical vulnerabilities, etc. may all cause backend business anomalies. The platform deploys all businesses in a mixed manner and is also easily affected by abnormal businesses, resulting in reduced interface availability. Therefore, it is also necessary to formulate an alarm strategy for interface availability to detect and handle problems in a timely manner.

[0004] In the related art, different alarm thresholds can be set according to different business interfaces, or a unified alarm threshold can be set for all business interfaces. However, since there are a large number of business interface accesses on the platform, if alarm thresholds are set for all business interfaces one by one, the operation efficiency is low. If a unified alarm threshold is set for all business interfaces, it is easy to cause the problem of poor alarm accuracy or poor recall rate. Summary of the invention

[0005] The embodiments of the present application provide an intelligent alarm method, device, electronic device, computer-readable storage medium and computer program product, which can balance the accuracy and recall rate of alarms and improve the situations of false alarms and missed alarms.

[0006] An intelligent alarm method, comprising:

[0007] Obtain the historical number of successful calls and failed calls of each service interface through the unified gateway platform during multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different service interfaces;

[0008] Modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of each business interface respectively, to obtain a first normal distribution and a second normal distribution corresponding to each business interface;

[0009] Determine a first call count threshold according to a first preset alarm probability and the first normal distribution, and determine a second call count threshold according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability;

[0010] Get the number of successful calls and failed calls corresponding to each business interface in the current time period;

[0011] Determine a target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send alarm information of the abnormality of the target service interface to the first device.

[0012] Accordingly, the embodiment of the present application further provides an intelligent alarm device, including:

[0013] A data acquisition unit, used to acquire the number of historical successful calls and the number of historical failed calls of each business interface called by the unified gateway platform in multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different business interfaces;

[0014] A modeling unit, used to model the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of each business interface respectively, to obtain a first normal distribution and a second normal distribution corresponding to each business interface;

[0015] a threshold determination unit, configured to determine a first call count threshold according to a first preset alarm probability and the first normal distribution, and to determine a second call count threshold according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability;

[0016] The number acquisition unit is used to obtain the number of successful calls and failed calls corresponding to each business interface in the current time period;

[0017] The processing unit is used to determine the target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send an alarm message of the abnormality of the target service interface to the first device.

[0018] Optionally, in some implementation modes, the determining unit is specifically configured to:

[0019] Performing a standard transformation on the first normal distribution to obtain a first standard normal distribution;

[0020] Obtaining the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtaining a first deviation value;

[0021] Determine a first call count threshold value according to the first deviation value, a first average value, and a first standard deviation, wherein the first average value is an average value of the historical successful call counts within multiple time periods, and the first standard deviation is a standard deviation of the historical successful call counts within multiple time periods; and

[0022] Performing a standard transformation on the second normal distribution to obtain a second standard normal distribution;

[0023] Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain a second deviation value;

[0024] The second call count threshold is determined based on the second deviation value, the second average value and the second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

[0025] Optionally, in some implementations, when determining the first call count threshold according to the first deviation value, the first mean value and the first standard deviation obeyed by the first normal distribution, the threshold determination unit is specifically configured to:

[0026] Obtaining the product of the first deviation value and the first standard deviation to obtain a first product;

[0027] Obtaining a sum of the first average value and the first product, and determining the sum as the first call count threshold;

[0028] When determining the second call count threshold according to the second deviation value, the second mathematical expectation and the second standard deviation obeyed by the second normal distribution, the threshold determination unit is specifically used to:

[0029] Obtaining the product of the second deviation value and the second standard deviation to obtain a second product;

[0030] The second average value and the second product are summed to obtain the second call number threshold.

[0031] Optionally, in some embodiments, the modeling unit is specifically used to:

[0032] Determine, from a plurality of different service interfaces, a sample service interface whose number of calls by the unified gateway platform in the plurality of time periods is greater than a preset number of calls;

[0033] Models are respectively constructed for the distribution of the historical successful call times and the distribution of the historical failed call times of the sample service interface to obtain a first normal distribution and a second normal distribution.

[0034] Optionally, in some implementations, when the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample service interface are modeled respectively to obtain a first normal distribution and a second normal distribution, the modeling unit is used to:

[0035] Counting the number of historical successful calls of the sample service interface to obtain the number of first cycles corresponding to the same number of calls;

[0036] Converting the historical number of successful calls of the sample service interface and the first number of cycles into first discrete points, and performing curve fitting on the first discrete points to obtain a first probability density function;

[0037] constructing the first normal distribution based on the first probability density function; and

[0038] Counting the number of historical failed calls of the sample service interface to obtain the number of second cycles corresponding to the same number of calls;

[0039] Converting the historical number of failed calls and the second number of cycles into second discrete points, and performing curve fitting on the second discrete points to obtain a second probability density function;

[0040] The second normal distribution is constructed based on the second probability density function of the sample service interface.

[0041] Optionally, in some implementations, the intelligent alarm device further includes:

[0042] A first interface quantity acquisition unit, configured to acquire the quantity of the target service interfaces deployed in the same server to obtain the first interface quantity before sending the alarm information of the abnormality of the target service interface to the first device;

[0043] A first abnormality determination unit, configured to determine that the target service interface deployed at the first number of interfaces is abnormal if the first number of interfaces is greater than a first preset number of interfaces;

[0044] When sending the alarm information of the abnormality of the target service interface to the first device, the processing unit is specifically used to: send the alarm information of the abnormality of the target service interface of the first interface quantity to the first device.

[0045] Optionally, in some implementations, the intelligent alarm device further includes:

[0046] A second interface quantity acquisition unit is used to acquire the quantity of the target service interface after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold, so as to obtain the second interface quantity;

[0047] A second abnormality determination unit, configured to determine that the unified gateway platform is abnormal if the second interface quantity is greater than a second preset interface quantity and the target service interfaces of the second interface quantity are not all deployed in the same server;

[0048] The platform alarm unit sends an alarm message of abnormality of the unified gateway platform to the second device.

[0049] Optionally, in some embodiments, the modeling unit is specifically used to:

[0050] Determine, from a plurality of different service interfaces, a sample service interface whose number of calls by the unified gateway platform in the plurality of time periods is greater than a preset number of calls;

[0051] Models are respectively constructed for the distribution of the historical successful call times and the distribution of the historical failed call times of the sample service interface.

[0052] Optionally, in some implementations, the intelligent alarm device further includes:

[0053] A rate acquisition unit, configured to acquire a current network transmission rate after determining a target service interface for which the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold, and before sending an alarm message of an abnormality of the target service interface to the first device;

[0054] If the network transmission rate exceeds the preset network rate, the processing unit executes sending an alarm message of the abnormality of the target service interface to the first device;

[0055] If the network transmission rate does not exceed the preset network rate, the processing unit does not need to execute sending the alarm information of the abnormality of the target service interface to the first device.

[0056] Optionally, in some implementations, the intelligent alarm device further includes:

[0057] A first cycle number acquisition unit is used to detect the number of first cycles in which no alarm is issued for the target service interface in a future time period after sending the alarm information of the abnormality of the target service interface to the first device;

[0058] An updating unit is used to update the number of successful calls and the number of failed calls of the target business interface within a target time period if the first cycle number is greater than a first preset cycle number, wherein the target time period is: the current time period, and the time period between the current time period and the future specified number of consecutive time periods.

[0059] Optionally, in some implementations, the intelligent alarm device further includes:

[0060] A second cycle number acquisition unit, used to acquire the second cycle number of the continuous time period for alarming the target service interface;

[0061] A releasing unit is used to release the association between the target service interface and the unified gateway platform if the second cycle number is greater than a second preset cycle number.

[0062] In addition, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the steps in the intelligent alarm method provided in the embodiment of the present application.

[0063] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in the intelligent alarm method provided in the embodiment of the present application.

[0064] In addition, an embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the intelligent alarm method provided in the embodiment of the present application.

[0065] In the embodiment of the present application, the historical successful call times and the historical failed call times of calling different business interfaces through the unified gateway platform in multiple time periods of the historical time period are obtained, and the distribution of the historical successful call times and the distribution of the historical failed call times are modeled respectively, to obtain the first normal distribution and the second normal distribution; the first call times threshold is determined according to the first preset alarm probability and the first normal distribution, and the second call times threshold is determined according to the second preset alarm probability and the second normal distribution; the target business interface whose successful call times in the current time period are less than the first call times threshold and whose failed call times are greater than the second call times threshold is obtained, and an alarm message of abnormal target business interface is sent to the first device. In this scheme, based on a unified alarm strategy, the alarm threshold is determined for each business interface according to the historical call data of different business interfaces, thereby improving the accuracy of the alarm; in addition, by setting the first preset alarm probability to be greater than the second preset alarm probability, the alarm recall rate is improved while ensuring the alarm accuracy, thereby improving the situation of false alarms and missed alarms. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0067] Figure 1 It is a scenario diagram of the intelligent alarm method provided in an embodiment of the present application;

[0068] Figure 2 It is a flow chart of the intelligent alarm method provided by an embodiment of the present application;

[0069] Figure 3 is another flow chart of the intelligent alarm method provided in an embodiment of the present application;

[0070] Figure 4 This is another flow chart of the intelligent alarm method provided in the embodiment of the present application;

[0071] Figure 5 It is a schematic diagram of the architecture of the intelligent alarm system provided in the embodiment of the present application;

[0072] Figure 6 It is a schematic diagram of the architecture of the cloud API platform provided in the embodiment of the present application;

[0073] Figure 7a This is a schematic diagram of a scenario of historical call data provided by an embodiment of the present application;

[0074] Figure 7bThis is another schematic diagram of a scenario of historical call data provided by an embodiment of the present application;

[0075] Figure 8 is a schematic diagram of a scenario of a standard normal distribution provided in an embodiment of the present application;

[0076] Fig. 9 This is another schematic diagram of a scenario of historical call data provided by an embodiment of the present application;

[0077] Fig.10a is another scenario schematic diagram of the standard normal distribution provided in the embodiment of the present application;

[0078] Fig.10b is another schematic diagram of a standard normal distribution scenario provided in an embodiment of the present application;

[0079] Fig.11 It is a structural diagram of the intelligent alarm device provided in an embodiment of the present application;

[0080] Fig.12 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0082] In the related technology, some business interface alarm thresholds need to be set to 99.9%, some business interface alarm thresholds need to be set to 99%, and some particularly critical business interface alarm thresholds need to be set to 99.99%. After analyzing all business API gateways in the background, it was found that the value of the alarm threshold of the backend business interface will vary depending on the interface, and there is no unified alarm threshold that can be used for all interfaces.

[0083] In order to formulate more personalized alarms for each business interface, the embodiments of the present application provide an intelligent alarm method, device, electronic device, computer-readable storage medium and computer program product, which can improve the recall rate while ensuring the accuracy of the alarm. Among them, the intelligent alarm device can be integrated in an electronic device, which can be a server, a terminal or other equipment.

[0084] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0085] For example, see Figure 1 Taking the intelligent alarm device integrated in the electronic device as an example, the electronic device obtains the historical successful call times and the historical failed call times of calling a single business interface through the unified gateway platform in multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the historical successful call times and the historical failed call times both obey the normal distribution; the distribution of the historical successful call times and the distribution of the historical failed call times are modeled respectively to obtain the first normal distribution and the second normal distribution; the first call time threshold is determined according to the first preset alarm probability and the first normal distribution, and the second call time threshold is determined according to the second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability; the successful call times and the failed call times corresponding to each business interface in the current time period are obtained; the target business interface whose successful call times are less than the first call time threshold and whose failed call times are greater than the second call time threshold is determined, and an alarm information of the abnormality of the target business interface is sent to the first device. This solution is based on a unified alarm strategy and specifically determines the alarm threshold for each business interface according to the historical call data of different business interfaces, thereby improving the accuracy of the alarm. In addition, by setting the first preset alarm probability to be greater than the second preset alarm probability, the alarm recall rate is improved while ensuring the alarm accuracy, thereby improving the situation of false alarms and missed alarms.

[0086] It can be understood that in the specific implementation of this application, related data such as attribute data, attribute sets and attribute subsets are involved. When the following embodiments of this application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0087] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.

[0088] This embodiment will be described from the perspective of the intelligent alarm device, which can be specifically integrated into an electronic device, which can be a server or a terminal. The terminal can include a tablet computer, a laptop computer, a personal computer (PC) or other intelligent devices that can perform data processing.

[0089] An embodiment of the present application provides an intelligent alarm method, including: obtaining the historical number of successful calls and the historical number of failed calls for calling a single business interface through a unified gateway platform within multiple time periods of a historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the historical number of successful calls and the historical number of failed calls both obey a normal distribution; modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls, respectively, to obtain a first normal distribution and a second normal distribution; determining a first call number threshold according to a first preset alarm probability and the first normal distribution, and determining a second call number threshold according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability; obtaining the number of successful calls and the number of failed calls corresponding to each business interface within the current time period; determining a target business interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and sending an alarm message of abnormality of the target business interface to a first device.

[0090] like Figure 2 As shown, the specific process of the intelligent alarm method is as follows:

[0091] 101. Obtain the historical number of successful calls and failed calls of a single business interface through the unified gateway platform during multiple time periods in the historical time period, where the unified gateway platform is associated with multiple different business interfaces, and the historical number of successful calls and the historical number of failed calls both obey a normal distribution.

[0092] In this embodiment, the unified gateway platform is a cloud API platform that can receive API requests from user devices and route them to backend service businesses (i.e., API services). The unified gateway platform is associated with multiple different business interfaces (i.e., API interfaces), and corresponding business services can be implemented through the business interfaces. Among them, business refers to cloud products such as cloud servers, cloud hard drives, and databases.

[0093] In this embodiment, the historical time period refers to the time period before the current moment. For example, the historical time period can be the past day, the past week, the past month, and so on. The historical time period can be divided into multiple time periods according to actual needs, and the historical number of successful calls and the historical number of failed calls in each time period are obtained for each business interface. Among them, the historical number of successful calls refers to the number of times the business interface is called through the unified gateway platform and successfully routed to the backend service business; the historical number of failed calls refers to the number of times the business interface is called through the unified gateway platform but cannot be routed to the backend service business. The sum of the historical number of successful calls and the historical number of failed calls is the total number of calls to the corresponding business interface.

[0094] During specific implementation, the call data of each business interface can be recorded in advance for subsequent data statistics. Specifically, for each business interface, a key can be formed based on its business name, version number, and interface name for storage, and a unique statistical unit can be configured for the key. During implementation, the cloud API platform will record the call data of each business interface within a unit time period based on the statistical time (i.e., the statistical time period), key, number of successful calls, number of failed calls, etc. Among them, the statistical time can be set according to actual needs, such as the statistical time can be set to 5 minutes, 10 minutes, etc. Take the statistical time of 5 minutes as an example, that is, data statistics are performed every 5 minutes, and the number of successful calls and failed calls within 5 minutes is obtained. For each business interface, 144 call data reports will be obtained in one day. During specific implementation, because there are too many API gateway machines and there is no local log, the API gateway machine can upload the call records to the log service through the log service (log service), and aggregate the call records to form 144 call data for reporting.

[0095] In actual applications, after analyzing the call data of the above business interfaces, it is found that the historical successful call times and historical failed call times of the business interfaces all meet the normal distribution. In the normal distribution, the normal curve is bell-shaped, with low ends and high middle, and symmetry on both sides because the curve is bell-shaped.

[0096] 102. Model the distribution of the number of historical successful calls and the distribution of the number of historical failed calls respectively to obtain a first normal distribution and a second normal distribution.

[0097] Specifically, the distribution of historical successful call times and the distribution of historical failed call times are modeled respectively, that is, the call data of a single business interface in multiple time periods in a historical time period are modeled to obtain a first normal distribution of historical successful call times and a second normal distribution of historical failed calls.

[0098] If the random variable X follows a mathematical expectation of μ and variance of σ 2The normal distribution is denoted by N(μ, σ 2 ), whose probability density function is the expected value μ of the normal distribution, which determines its position, and its standard deviation σ determines the amplitude of the distribution. Specifically, the difference between the historical successful call counts and the historical failed call counts that obey the normal distribution is that the values ​​of the mathematical expectation μ and the standard deviation σ of the normal distribution that different business interfaces satisfy are different. For example, the average historical failed call count (equivalent to μ) for business interface A in 5 minutes is 100, and the standard deviation is 20; the average historical failed call count (equivalent to μ) for business interface B in 5 minutes is 250, and the standard deviation is 40.

[0099] In one embodiment, when the number of interface calls is small, the modeling error is large, so when modeling based on historical data, the business interfaces with small number of interface calls in a single time period can be filtered out. That is, in the step of "modeling the distribution of the number of historical successful calls and the distribution of the number of historical failed calls respectively to obtain the first normal distribution and the second normal distribution", the following process can be included:

[0100] (1) Determine, from a plurality of different business interfaces, a sample business interface whose number of calls by the unified gateway platform in a plurality of time periods is greater than a preset number of calls.

[0101] Specifically, business interfaces whose number of calls in each time period is greater than the preset number of calls are screened out as sample business interfaces, and business interfaces whose number of calls in a single time period does not reach the preset number of calls are filtered out, thereby reducing subsequent modeling errors caused by insufficient data.

[0102] The number of times called by the unified gateway platform is the total number of historical successful calls and historical failed calls within a single time period. The preset number of calls can be set according to the actual error situation, for example, the preset number of calls can be set to 5 times.

[0103] (2) Model the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface respectively, and obtain a first normal distribution and a second normal distribution.

[0104] Specifically, after screening out sample business interfaces with sufficient call data volume, modeling can be performed based on the distribution of their historical successful call times to construct a first normal distribution, and modeling can be performed based on the distribution of their historical failed call times to construct a second normal distribution.

[0105] In one embodiment, the call data of each sample business interface can be classified and counted to obtain the number of cycles with the same number of calls, and a unique discrete point can be determined based on the number of calls and the number of cycles, and then curve fitting can be performed on all discrete points to achieve normal distribution modeling. That is, the step of "modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface, respectively, to obtain the first normal distribution and the second normal distribution" can include the following process:

[0106] (21) The number of historical successful calls to the sample business interface is counted to obtain the number of first cycles corresponding to the same number of calls.

[0107] Specifically, the number of cycles of the historical successful call times with the same call times is counted to obtain the first cycle number. For example, assuming 10 time periods, the sequence of the historical successful call times obtained in the order of the time periods is [200 220 260 220 240 260 280 260 200 240], then it can be counted that the number of cycles corresponding to 200 times is 2, the number of cycles corresponding to 220 times is 2, the number of cycles corresponding to 240 times is 2, the number of cycles corresponding to 260 times is 3, and the number of cycles corresponding to 280 times is 1.

[0108] (22) The historical number of successful calls of the sample business interface and the number of the first cycle are converted into first discrete points, and curve fitting is performed on the first discrete points to obtain a first probability density function.

[0109] Specifically, the first discrete point can be constructed in the coordinate system based on the value of the number of historical successful calls and the value of the first cycle number. For example, the number of cycles corresponding to 200 times is 2, and the discrete coordinate point (200,2) can be constructed; the number of cycles corresponding to 260 times is 3, and the discrete coordinate point (260,3) can be constructed. Subsequently, curve fitting is performed based on all the discrete coordinate points obtained to obtain the first probability density function, which is expressed as follows:

[0110]

[0111] Among them, x represents the number of successful historical calls of the random variable, μ1 represents the mathematical expectation, and σ1 represents the standard deviation.

[0112] (23) Construct a first normal distribution based on the first probability density function.

[0113] Specifically, the mathematical expectation and standard deviation of the normal distribution can be determined based on the expression of the first probability density function. The normal random variable x (i.e., the number of historical successful calls) obeys the distribution (μ1, σ1 2 ), denoted as X~N1(μ1,σ1 2 ).

[0114] (24) Count the number of failed calls to the sample business interface and obtain the number of second cycles corresponding to the same number of calls.

[0115] Specifically, the number of cycles of the historical failed call times with the same number of calls is counted to obtain the first cycle number. For example, assuming 10 time periods, the sequence of the historical failed call times obtained in the order of the time periods is [10080 40 80 60 40 20 40 100 60], then it can be counted that the number of cycles corresponding to 20 times is 1, the number of cycles corresponding to 40 times is 3, the number of cycles corresponding to 60 times is 2, the number of cycles corresponding to 80 times is 2, and the number of cycles corresponding to 100 times is 2.

[0116] (25) The number of failed calls of the sample business interface and the number of second cycles are converted into second discrete points, and curve fitting is performed on the second discrete points to obtain a second probability density function.

[0117] Similarly, the second discrete point can be constructed in the coordinate system based on the value of the number of historical failed calls and the value of the second cycle number. For example, the number of cycles corresponding to 20 times is 1, and the discrete coordinate point (20,1) can be constructed; the number of cycles corresponding to 40 times is 3, and the discrete coordinate point (40,3) can be constructed. Subsequently, curve fitting is performed based on all the discrete coordinate points obtained to obtain the second probability density function, which is expressed as follows:

[0118]

[0119] Among them, x represents the number of historical failed calls of the random variable, μ2 represents the mathematical expectation, and σ2 represents the standard deviation.

[0120] (26) Construct a second normal distribution based on the second probability density function.

[0121] Specifically, the mathematical expectation and standard deviation of the normal distribution can be determined based on the expression of the second probability density function. The normal random variable x (i.e., the number of historical successful calls) obeys the distribution (μ2, σ2 2 ), recorded as X~N2(μ2,σ2 2 ).

[0122] 103. Determine a first call count threshold value according to a first preset alarm probability and a first normal distribution, and determine a second call count threshold value according to a second preset alarm probability and a second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability.

[0123] In the embodiment of the present application, the first preset alarm probability and the second preset alarm probability are the required alarm rates summarized based on experience and test results. If the alarm rate is too high, it will cause the alarm to continue and fail to achieve the purpose of the alarm; if the alarm rate is too low, the scene that requires the alarm will not be alarmed. Therefore, in this scheme, the first preset alarm probability is set to be greater than the second preset alarm probability, that is, the number of successful calls is required to be higher and the number of failed calls is required to be lower. By setting the judgment indicators of two different dimensions high and low, the alarm accuracy and alarm recall rate are balanced. For example, the first preset alarm probability can be set to 5%, and the second preset alarm probability can be set to 0.1%; for another example, the first preset alarm probability can be set to 10%, and the second preset alarm probability can be set to 0.05%.

[0124] It should be noted that, in the embodiment of the present application, the first preset alarm probability and the second preset alarm probability configured for all service interfaces associated with the unified gateway platform are the same, that is, the alarm policies configured for all service interfaces are the same.

[0125] Specifically, when determining the first call count threshold, it is determined by combining the first preset alarm probability and the first normal distribution. Since the normal distribution expresses the probability that the value of the random variable x is less than a certain value, it is equivalent to the probability that the value of the historical number of successful calls is less than the first call count threshold. In this embodiment, the first preset alarm probability can be equated with the probability that the value of the random variable x in the first normal distribution is less than a certain value. Since the first preset alarm probability and the first normal distribution are both known, the value of the first call count threshold can be obtained based on the first preset alarm probability and the first normal distribution. That is, in some embodiments, the step of "determining the first call count threshold based on the first preset alarm probability and the first normal distribution" may include the following process:

[0126] (1) The first normal distribution is standardized to obtain the first standard normal distribution.

[0127] Since the normal distribution is determined by two parameters (mathematical expectation μ and standard deviation σ), the position of the curve on the horizontal axis will change if the mathematical expectation μ is changed, and the standard deviation σ determines the "height, shortness, fatness and thinness" of the curve, reflecting the degree of discreteness of the data distribution. Different normal distributions have corresponding different parameters, and naturally their positions and shapes are also different. Standardizing the normal distribution can remove the influence of the dimension, making it easier to compare different variables. At the same time, the mean and standard deviation of the standardized normal distribution are fixed, and the corresponding probability value can be determined based on the area distribution table compiled by the standard normal distribution, thereby avoiding a more complicated calculation process. Specifically, in order to facilitate the application of multiple different business interfaces, the first normal distribution can be standardized, that is, converted into a normal distribution with a μ value of 0 and a σ value of 1. The conversion formula is:

[0128]

[0129] After variable substitution, we can get the normal distribution that z obeys, and its probability density function is:

[0130]

[0131] Then the probability that variable z is less than k is:

[0132]

[0133] (2) Obtain the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtain a first deviation value.

[0134] Specifically, the first preset alarm probability is used as the P value and z1 is used as the k value, and substituted into the above probability formula In the equation, we can find the value of z1 and use the value of z1 as the first deviation value, which indicates the degree of deviation from the mathematical expectation μ. The value of z1 may be positive or negative.

[0135] (3) Determine a first call count threshold value based on a first deviation value, a first average value, and a first standard deviation, wherein the first average value is an average value of historical successful call counts within multiple time periods, and the first standard deviation is a standard deviation of historical successful call counts within multiple time periods.

[0136] Specifically, substitute the value of the first deviation z1, the first mean value, and the first standard deviation into the above conversion formula of x and z: In the example, the value of x can be calculated, which is the first call count threshold.

[0137] That is, in some implementations, the step of “determining a first call count threshold according to a first deviation value, a first mean value and a first standard deviation obeyed by a first normal distribution” may include the following process:

[0138] Obtaining the product of the first deviation value and the first standard deviation to obtain a first product;

[0139] A sum of the first average value and the first product is obtained and determined as a first call count threshold.

[0140] Similarly, when determining the second call count threshold, it is determined by combining the second preset alarm probability and the second normal distribution. In this embodiment, the second preset alarm probability can be equated with the probability that the value of the random variable x in the second normal distribution is less than a certain value. Since the second preset alarm probability and the second normal distribution are both known, the value of the second call count threshold can be obtained based on the second preset alarm probability and the second normal distribution. That is, in some embodiments, the step of "determining the second call count threshold according to the second preset alarm probability and the second normal distribution" may include the following process:

[0141] (1) The second normal distribution is standardized to obtain the second standard normal distribution.

[0142] Similarly, in order to facilitate the application of multiple different business interfaces, the second normal distribution can be standardized, that is, converted into a normal distribution with a μ value of 0 and a σ value of 1. The conversion formula is:

[0143]

[0144] After variable substitution, we can get the normal distribution that z obeys, and its probability density function is:

[0145]

[0146] Then the probability that variable z is greater than k is:

[0147]

[0148] (2) Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain the second deviation value.

[0149] Specifically, the second preset alarm probability is used as the P value and z2 is used as the k value, and substituted into the above probability formula In the equation, we can obtain the value of z2 and use the value of z2 as the second deviation value, which indicates the degree of deviation from the mathematical expectation μ value.

[0150] (3) Determine a second call count threshold value based on a second deviation value, a second average value, and a second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

[0151] Specifically, the value of the second deviation z2, the second mean value, and the second standard deviation are substituted into the above conversion formula of x and z: In the example, the value of x can be calculated, which is the second call count threshold.

[0152] That is, in some implementations, the step of “determining the second call count threshold according to the second deviation value, the second mathematical expectation obeyed by the second normal distribution, and the second standard deviation” may include the following process:

[0153] Obtaining the product of the second deviation value and the second standard deviation to obtain a second product;

[0154] The second average value and the second product are summed to obtain a second call count threshold.

[0155] 104. Obtain the number of successful calls and failed calls corresponding to each business interface in the current time period.

[0156] Specifically, the platform will periodically collect statistics on the call data of each business interface (ie, the number of successful calls and the number of failed calls) to serve as the data basis for subsequent determination of interface abnormalities.

[0157] 105. Determine a target service interface whose number of successful calls is less than a first call number threshold and whose number of failed calls is greater than a second call number threshold, and send an alarm message of an abnormality of the target service interface to the first device.

[0158] Specifically, according to the call data counted in the above steps, from the multiple different business interfaces associated with the platform, determine the business interface with the number of successful calls less than the first call number threshold and the number of failed calls greater than the second call number threshold, that is, the business interface with a small number of successful calls and a large number of failed calls, as the target business interface with abnormalities. For the interface configuration, the number of successful calls of the business interface must be less than the first call number threshold before an alarm is issued; the number of failed calls of the business interface must be greater than the second call number threshold before an alarm is issued. Both conditions must be met at the same time to trigger the platform alarm, which improves the accuracy of the alarm.

[0159] Finally, an alarm message of the abnormality of the target service interface is sent to the first device to notify the relevant person in charge to handle the abnormality of the interface in a timely manner, thereby reducing the scope of impact.

[0160] In actual applications, the alarm information can be sent to the first target device through instant messaging, email reminders, text messages, phone calls, etc. The alarm information content can include information such as product name, version number, interface availability problems, and the time when the abnormality occurred, and remind the user to deal with the problem in time.

[0161] As can be seen from the above, the intelligent alarm method provided by the embodiment of the present application obtains the historical successful call times and the historical failed call times of different business interfaces in each time period in the historical time period, and performs normal distribution modeling to obtain the first normal distribution and the second normal distribution. Then, the first call times threshold of the alarm is determined according to the first preset alarm probability combined with the first normal distribution, and the second call times threshold of the alarm is determined according to the second preset alarm probability combined with the second normal distribution. When it is detected that the target business interface has a successful call times threshold less than the first call times threshold and a failed call times threshold greater than the second call times threshold in the current time period, an alarm message of abnormal target business interface is sent to the first device. In this solution, based on a unified alarm strategy, the alarm threshold is determined for each business interface according to the historical call data of different business interfaces, thereby improving the accuracy of the alarm; in addition, by setting the first preset alarm probability to be greater than the second preset alarm probability, the alarm recall rate is improved while ensuring the accuracy of the alarm, thereby improving the situation of false alarms and missed alarms.

[0162] In actual applications, since the backend addresses of business interfaces are generally deployed centrally, the probability of simultaneous failures is high. For example, a product may have 200 interfaces, 100 of which may be provided by the same service, and the other 100 interfaces may be provided by another service, with different logics based on the interface names. Since the addresses of interfaces are centrally deployed, once an abnormality occurs in the service of one address, it often causes an increase in internal errors of a batch of interfaces. Therefore, in order to further improve the accuracy of alarms, the number of interfaces can be introduced as an adjustment parameter to adjust the alarm sensitivity. Reference Figure 3 That is, in some implementations, after step 1051 "determining a target service interface whose number of successful calls is less than a first call number threshold and whose number of failed calls is greater than a second call number threshold", and before step 1052 "sending target service interface abnormality alarm information to the first device", the following steps are also included:

[0163] 106. Obtain the number of target service interfaces deployed in the same server to obtain the first interface number.

[0164] Among them, the value of the first preset number of interfaces can be set according to actual needs. According to statistical analysis, in this solution, the value of the first preset number of interfaces can be set to 3, which can achieve a better adjustment effect, further balance the alarm accuracy and alarm recall rate, and improve the situation of poor alarm accuracy or poor alarm recall rate.

[0165] 107. If the first interface quantity is greater than the first preset interface quantity, determine that the target service interface deployed at the first interface quantity is abnormal.

[0166] The first preset interface quantity supports customized configuration of products. In specific implementation, a setting page for the first preset interface quantity can be opened on the cloud API platform, and users can configure the values ​​of the first preset interface quantity for different products. For example, the first preset interface quantity of the cloud server can be configured to 10, and the first preset interface quantity of the cloud hard disk can be configured to 20.

[0167] Specifically, when both the number of the first interface and the number of the second interface meet the threshold condition, and the number of the first interface also meets the threshold condition, it is determined that the target service interface is abnormal, and an alarm message is sent to the first device. When sending the alarm message, step 1052 can specifically be: sending an alarm message of the abnormality of the target service interface of the first interface number to the first device.

[0168] In actual applications, if a large number of business interfaces are found to be abnormal, and the abnormal business interfaces are not all distributed in the same service, it can be considered that the platform is abnormal. At this time, an alarm can be issued for the platform abnormality. Figure 4 , that is, in some implementations, after determining that the target service interface has a number of successful calls less than a first call number threshold and a number of failed calls greater than a second call number threshold, the following process may also be included:

[0169] 108. Obtain the number of target service interfaces and obtain the number of second interfaces.

[0170] The value of the second preset number of interfaces can be set according to actual needs. According to statistical analysis, the value of the second preset number of interfaces can be set to 5 in this solution, which can effectively detect the abnormality of the platform.

[0171] 109. If the second interface quantity is greater than the second preset interface quantity, and the target service interfaces of the second interface quantity are not all deployed in the same server, it is determined that the unified gateway platform is abnormal.

[0172] Specifically, if the business interfaces deployed on different servers meet the alarm threshold conditions and the interface quantity conditions at the same time, it can be determined that the platform is abnormal.

[0173] 110. Send an alarm message indicating that the unified gateway platform is abnormal to the second device.

[0174] Specifically, when both the number of the first interface and the number of the second interface meet the threshold conditions, and the number of the second interface also meets the conditions, the platform is determined to be abnormal, and an alarm message of the abnormality of the unified gateway platform is sent to the second device to inform the relevant person in charge to handle the abnormality of the platform in a timely manner. In specific implementation, the alarm message can be sent to the second target device through instant messaging, email reminders, text messages, telephone calls and other communication methods.

[0175] In one embodiment, the second preset interface number can be set to be greater than the first preset interface number. Since the platform is associated with all service interfaces, if the platform is to be judged to be abnormal, the number of abnormal interfaces (i.e., the second interface number) should be relatively large, and the probability of exceeding the number of abnormal interfaces in a single server (i.e., the first interface number) is relatively high. Therefore, the second preset interface number can be set to be greater than the first preset interface number, so as to further improve the accuracy of the judgment result.

[0176] In actual applications, network jitter may cause the service interface to be judged as abnormal, which may lead to false alarms. In order to avoid false alarms caused by network jitter, the network platform can be opened to evaluate the network transmission rate. In one embodiment, after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold for the target service interface, before sending an alarm message of the abnormality of the target service interface to the first device, the following process may also be included:

[0177] Get the current network transmission rate;

[0178] If the network transmission rate exceeds the preset network rate, sending an alarm message of target service interface abnormality to the first device;

[0179] If the network transmission rate does not exceed the preset network rate, an alarm message indicating that the target service interface is abnormal is sent to the first device.

[0180] The preset network rate may be the minimum network transmission rate that can maintain normal communication between the platform and the backend service.

[0181] In addition, high CPU load, high database load, business upgrade, business release, etc. of backend business will affect the interface call and cause false alarms on the platform. Therefore, it is also possible to establish a linkage between the platform and the backend service business so that the platform can perceive messages such as high CPU load, high database load, business upgrade, business release, etc. of the backend business, thereby avoiding false alarms.

[0182] In some implementations, after sending the target service interface abnormality alarm information to the first device, the number of first cycles in which no alarm is issued for the target service interface in the future time period can also be detected. If the number of first cycles is greater than the number of first preset cycles, the number of successful calls and the number of failed calls of the target service interface in the target time period are updated. The target time period is: the current time period, and the time period between the current time period and the future continuous specified number of time periods.

[0183] Among them, the first cycle number is greater than the first preset cycle number, which to a certain extent indicates that the previous judgment of the target business interface as abnormal was actually a wrong judgment. Therefore, the number of successful calls and the number of failed calls of the target business interface within the target time period can be updated based on normal call data to adjust the call data within the target time period to a value that does not require an alarm, thereby providing more accurate historical call data for the alarm threshold for the business interface in the future time period.

[0184] In some implementations, after sending the target service interface abnormality alarm information to the first device, the second cycle number of the continuous time period for alarming the target service interface can also be obtained. If the second cycle number is greater than the second preset cycle number, the association between the target service interface and the unified gateway platform is released.

[0185] Among them, if the second cycle number is greater than the second preset cycle number, it means that the target service interface alarms too frequently, so the target service interface can be removed from the platform to ensure the overall interface service quality.

[0186] According to the method described in the above embodiment, the following examples are given to further illustrate the method. Figure 5 In another embodiment of the present application, an intelligent alarm system is also provided. The intelligent alarm system includes: an API gateway, a backend service business, a log service, a distribution agent service (Agent), a computing module, an alarm module, a database, etc.

[0187] Specifically, when a user device manages cloud resources through an interface call, it sends an API request to the API gateway. After the API gateway performs security verification on the user device, it routes the received API request to the corresponding backend service business for processing, and then sends the data returned by the backend service to the original requesting device. During this process, the log service will collect the interface call logs of the API gateway and report them to the Agent. The calculation module is a streaming computing service. After obtaining data from the Agent, it calculates the required indicators (such as the number of successful calls and failed calls per unit time) and stores them in the database. At the same time, the calculation module also determines whether an alarm is needed based on the calculated data, and sends an alarm command to the alarm module when it is determined that an alarm is needed, so that the alarm module sends an alarm notification message to the user.

[0188] refer to Figure 6 , Figure 6 This is an architecture diagram of the cloud API platform provided in the embodiment of this application. Figure 6As shown, the cloud API platform includes an API gateway and a configuration management platform. Among them, the configuration management platform can be composed of a cloud API management platform, a database, a configuration synchronization tool and a series of other tools. Among them, the cloud API management platform (APIObject Storage Service, APIOSS) allows API producers to easily manage the entire life cycle of the API. The database stores the configuration information of the API, such as the alarm configuration information of the API interface associated with the platform. The configuration synchronization tool is used to synchronize the definition data of the API from APIOSS to the API gateway. The API gateway is used to receive the user's API request and route it to the business backend (API service). The log service (Log service) is responsible for collecting the logs of the cloud API, that is, the logs of the user's device calling the API; the distribution agent service (Agent) is responsible for reporting to other modules for analysis, such as the calculation module, observation module, alarm module, etc.

[0189] Specifically, refer to Figure 6 The dotted line in the figure shows the flow of API interface definition data. During implementation, the business interface that needs to be connected to the platform can be entered from the cloud API platform. After the business interface is released, the interface definition data will first be stored in the database, and then distributed collaboratively through the configuration synchronization tool and transferred to different API gateways. The subsequent LOG service collects the call logs of the API gateway, distributes them to the corresponding computing module through the Agent for data analysis, and obtains the corresponding alarm strategy. The most important parameter in the alarm strategy is the alarm threshold, that is, the threshold for the number of successful calls and the threshold for the number of failed calls.

[0190] During the specific implementation process, the cloud API platform will report the call records of all business interfaces per unit time, which can be visualized as an observation dashboard, so that the availability of interfaces can be observed at a glance. Figure 7a and Figure 7b , Figure 7a It is a visualization of the total number of requests for interface calls in the platform. Figure 7b A visual representation of the number of failed interface calls within a business. Figure 7a The maximum, minimum, average, cumulative, and latest values ​​of the total number of requests can be observed in the . It also provides an interface for viewing data for different time periods. Figure 7b The maximum, minimum, average, cumulative, and latest values ​​of the number of failures can be observed, and an interface for viewing data for different time periods is also provided.

[0191] After analysis, it was found that the historical successful call data and historical failed call data of the business interface in the platform all satisfy the normal distribution. The normal distribution has two parameters μ and σ, where μ is the mean of the distribution and σ is the standard deviation, and it is distributed in a "bell-shaped" curve. Figure 8 The figure shows a standard normal distribution graph, where μ is 0, σ is 1, and the random variable z follows the standard normal distribution N(0, 1). The area formed by the curve and the value of z on the coordinate axis represents the probability that z falls within a certain interval.

[0192] Next, the successful call count threshold and failed call count threshold for each business interface will be calculated. The core of the alarm application is to balance the alarm accuracy and alarm recall rate. Among them, the alarm accuracy rate refers to how many alarms are correct and not false alarms; the alarm recall rate refers to how many situations that need to be alarmed are reported instead of missed alarms.

[0193] Assuming that a single service interface has a 5% probability of false alarm, when the threshold of the number of interfaces that generate alarms at the same time set by the cloud API platform is 1, the probability of false alarm is 5%, which is equivalent to a false alarm every 1.6 hours; when the threshold of the number of interfaces is 2, the probability of false alarm is 5%*5%=0.25%, which is equivalent to a false alarm every 1.39 days; when the threshold of the number of interfaces is 3, the probability of false alarm is 5%*5%*5%=0.0125%, which is equivalent to a false alarm every 28 days.

[0194] Assuming that a single business interface has a 0.1% probability of false alarm, the cloud API platform sets the threshold number of interfaces for simultaneous alarms to 1, and the probability of false alarm is 0.1%, which is equivalent to a false alarm every 3 days; when the interface number threshold is 2, the probability of false alarm is 0.1%*0.1%=0.0001%, which is equivalent to a false alarm every 19.03 years; when the interface number threshold is 3, the probability of false alarm is 0.1%*0.1%*0.1%=0.0000001%, which is equivalent to a false alarm every 19025.88 years.

[0195] It can be seen that setting the alarm probability of the business interface to a higher alarm rate (such as 5%) is prone to false alarms, but the alarm recall rate is higher; setting the alarm probability of the business interface to a lower alarm rate (such as 0.1%) is prone to missed alarms, but the alarm accuracy rate is higher. Considering that in most business scenarios, if an API call fails, the user is likely to keep retrying. Since there is a problem with the interface, the retries are likely to continue to fail. The more retries, the more failures there are. Therefore, it is necessary to improve the accuracy of the alarm for failed calls. That is, in this solution, a higher alarm probability can be set for successful calls, and a lower alarm probability can be set for failed calls.

[0196] In actual applications, the platform will periodically record the historical call data of each business interface, and report it to the observation module for observation. It can also be used to calculate the alarm threshold. When recording the call data, you can record it based on indicators such as statistical time, product name, version number, interface name, total number of successful calls, total number of failed calls, and the number of successful and failed calls of each interface every 5 minutes. For example, refer to Figure 1. Fig. 9 It is the historical call data of a certain period of time. Taking one day as an example, there will be 144 call data reported.

[0197] During specific implementation, a normal distribution may be constructed in advance for the historical successful call data and the historical failed call data of each business interface, and the constructed normal distribution may be converted into a standard normal distribution to be applied to the calculation of subsequent alarm thresholds.

[0198] refer to Fig.10a ,set up Fig.10a This is a standard normal distribution diagram obtained by converting the normal distribution of the number of historical successful calls. For example, for the number of successful calls, if you need to get an alarm less than 5% (the area shown in the blank part), the value of the random variable z can be (1.64+1.65) / 2=1.645. The calculation of the threshold of the number of successful calls is as follows:

[0199] Successful call count threshold = average + (-1.645*standard deviation)

[0200] The average may be an average of the number of historical successful calls in multiple time periods within a specified time period, and the standard deviation may be a standard deviation of the number of historical successful calls in multiple time periods within the specified time period.

[0201] For example, if data is reported every 5 minutes in the past day, 144 historical successful call data reports will be obtained. The calculation of the successful call number threshold is as follows:

[0202]

[0203] Among them, x represents the historical successful call data, represents the average value of historical successful call data, i∈[1,144].

[0204] refer to Fig.10b ,set up Fig.10b This is a standard normal distribution diagram obtained by converting the number of historical failed calls. Similarly, for the number of failed calls, if an alarm of less than 0.1% is required (the area shown in the blank part), the value of the random variable z can be 3.09. The calculation of the threshold of the number of successful calls is as follows:

[0205] Successful call count threshold = average + (3.09*standard deviation)

[0206] The average may be an average of the number of historical failed calls in multiple time periods within a specified time period, and the standard deviation may be a standard deviation of the number of historical failed calls in multiple time periods within the specified time period.

[0207] For example, if data is reported every 5 minutes in the past day, 144 historical failed call data will be reported. The calculation of the failed call count threshold is as follows:

[0208]

[0209] Among them, x represents the historical successful call data, represents the average value of historical successful call data, i∈[1,144].

[0210] Among them, x represents the historical failed call data, represents the average value of historical failed call data, i∈[1,144].

[0211] In specific applications, all business interfaces that require alarms are calculated based on the above-mentioned successful call count threshold and failed call count threshold, and then alarm information is constructed based on the query results (time, product name, version, etc.) to alert the back-end business responsible party.

[0212] Assume that the total number of alarm interfaces for a product is 3. If all three interfaces currently meet the alarm conditions, an alarm message will be sent to the product manager.

[0213] Furthermore, if more than 5 business interfaces on the platform have exceptions at the same time, it can be determined that the platform has an exception, and an alarm message will be sent to the person in charge of the platform.

[0214] For example, suppose there is a business, the number of successful calls in the current 5 minutes is 300, and the number of failed calls is 410. The operation to determine whether the alarm condition is met is as follows:

[0215] First, obtain the historical successful call data of the previous day, such as the sequence [400, 500, 450, 550, 350, 600, ..., 700, 450, 400, 500]. Assuming that the calculated average value avg_suc is 500 and the standard deviation stddev_succ is 115.108644, the calculation of the successful call number threshold is as follows:

[0216] avg_succ-stddev_succ*1.645=500-115.108644*1.645≈303.5

[0217] Get the historical failed call data of the previous day, such as the sequence [100, 200, 150, 250, 50, ..., 300, 350, 200, 100, 200]. Assuming that the average value avg_fail is 175 and the standard deviation stddev_fail is 75.660426, the calculation of the failed call count threshold is as follows:

[0218] avg_fail+stddev_fail*3.09≈175+75.660426*3.09≈400.5

[0219] Then, in the current 5 minutes, the number of successful calls of the business interface 300 is less than the successful call threshold 303, and the number of failed calls 410 is greater than the failed call threshold 400. It can be determined that the business interface meets the alarm condition and an interface abnormality alarm is required.

[0220] The intelligent alarm system provided in the embodiment of the present application can adaptively determine a personalized alarm threshold value based on the historical call data of the business interface and the pre-set alarm rate, and then determine the interface abnormality alarm and the platform abnormality alarm based on the current call data, thereby improving the accuracy of the alarm. In addition, different alarm thresholds are set for successful calls and failed calls of the business interface, respectively, to balance the alarm accuracy and alarm recall rate. In addition, by setting the adjustment parameter (i.e., the number of interfaces that alarm at the same time) to adjust the alarm sensitivity, the alarm accuracy or alarm recall rate is further improved, and the situation of false alarms and missed alarms is improved.

[0221] It should be noted that the intelligent alarm algorithm provided in the embodiment of the present application is also applicable to other application scenarios that require flexible adjustment of thresholds based on historical data.

[0222] In order to better implement the above method, an embodiment of the present application also provides an intelligent alarm device, which can be integrated into an electronic device, such as a server or a terminal. The terminal may include a tablet computer, a laptop computer and / or a personal computer.

[0223] For example, Fig.11 As shown, the intelligent alarm device may include: a data acquisition unit 301, a modeling unit 302, a threshold determination unit 303, a number acquisition unit 304, and a processing unit 305, as follows:

[0224] The data acquisition unit 301 is used to acquire the historical successful call count and the historical failed call count of calling a single business interface through the unified gateway platform in multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the historical successful call count and the historical failed call count both obey a normal distribution;

[0225] A modeling unit 302, used to model the distribution of the historical number of successful calls and the distribution of the historical number of failed calls, respectively, to obtain a first normal distribution and a second normal distribution;

[0226] A threshold determination unit 303, configured to determine a first call count threshold according to a first preset alarm probability and the first normal distribution, and to determine a second call count threshold according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability;

[0227] The number acquisition unit 304 is used to acquire the number of successful calls and failed calls corresponding to each business interface in the current time period;

[0228] The processing unit 305 is used to determine the target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send an alarm message of the abnormality of the target service interface to the first device.

[0229] In some implementations, the threshold determination unit 303 is specifically configured to:

[0230] Performing a standard transformation on the first normal distribution to obtain a first standard normal distribution;

[0231] Obtain the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtain a first deviation value;

[0232] Determine a first call count threshold value according to the first deviation value, the first average value, and the first standard deviation, wherein the first average value is the average value of the historical successful call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical successful call counts within multiple time periods; and

[0233] Performing a standard transformation on the second normal distribution to obtain a second standard normal distribution;

[0234] Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain a second deviation value;

[0235] The second call count threshold is determined based on the second deviation value, the second average value and the second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

[0236] Optionally, in some implementations, when determining the first call count threshold according to the first deviation value, the first mean value and the first standard deviation obeyed by the first normal distribution, the threshold determination unit 303 is specifically used to:

[0237] Obtaining the product of the first deviation value and the first standard deviation to obtain a first product;

[0238] Obtaining a sum of the first average value and the first product, and determining the sum as the first call count threshold;

[0239] When determining the second call count threshold according to the second deviation value, the second mathematical expectation and the second standard deviation obeyed by the second normal distribution, the threshold determination unit 303 is specifically used to:

[0240] Obtaining the product of the second deviation value and the second standard deviation to obtain a second product;

[0241] The second average value and the second product are summed to obtain the second call number threshold.

[0242] Optionally, in some implementations, the modeling unit 302 is specifically configured to:

[0243] Determine, from a plurality of different business interfaces, a sample business interface whose number of calls by the unified gateway platform during the plurality of time periods is greater than a preset number of calls;

[0244] The distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface are modeled respectively to obtain a first normal distribution and a second normal distribution.

[0245] Optionally, in some implementations, when the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface are modeled to obtain a first normal distribution and a second normal distribution, the modeling unit 302 is used to:

[0246] Count the number of successful calls to the sample service interface in history to obtain the number of first cycles corresponding to the same number of calls;

[0247] Convert the historical number of successful calls of the sample service interface and the first cycle quantity into first discrete points, and perform curve fitting on the first discrete points to obtain a first probability density function;

[0248] constructing the first normal distribution based on the first probability density function; and

[0249] Count the number of historical failed calls of the sample business interface to obtain the number of second cycles corresponding to the same number of calls;

[0250] Converting the historical number of failed calls and the second cycle number into second discrete points, and performing curve fitting on the second discrete points to obtain a second probability density function;

[0251] The second normal distribution is constructed based on the second probability density function of the sample service interface.

[0252] Optionally, in some implementations, the intelligent alarm device further includes:

[0253] A first interface quantity acquisition unit, configured to acquire the quantity of the target service interfaces deployed in the same server to obtain the first interface quantity before sending the alarm information of the abnormality of the target service interface to the first device;

[0254] A first abnormality determination unit, configured to determine that the target service interface deployed at the first interface number is abnormal if the first interface number is greater than the first preset interface number;

[0255] When sending the alarm information of the abnormality of the target service interface to the first device, the processing unit 305 is specifically used to: send the alarm information of the abnormality of the target service interface of the first interface quantity to the first device.

[0256] Optionally, in some implementations, the intelligent alarm device further includes:

[0257] A second interface quantity acquisition unit is used to acquire the quantity of the target service interface after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold to obtain the second interface quantity;

[0258] A second abnormality determination unit, configured to determine that the unified gateway platform is abnormal if the second interface quantity is greater than the second preset interface quantity and the target service interfaces of the second interface quantity are not all deployed in the same server;

[0259] The platform alarm unit sends an alarm message of abnormality of the unified gateway platform to the second device.

[0260] Optionally, in some implementations, the intelligent alarm device further includes:

[0261] A rate acquisition unit, configured to acquire a current network transmission rate after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold for the target service interface, and before sending an alarm message of an abnormality of the target service interface to the first device;

[0262] If the network transmission rate exceeds the preset network rate, the processing unit 305 executes to send an alarm message of the abnormality of the target service interface to the first device;

[0263] If the network transmission rate does not exceed the preset network rate, the processing unit 305 does not need to send the alarm information of the target service interface abnormality to the first device.

[0264] Optionally, in some implementations, the intelligent alarm device further includes:

[0265] A first cycle number acquisition unit is used to detect the number of first cycles in which no alarm is issued for the target service interface in a future time period after sending the alarm information of the abnormality of the target service interface to the first device;

[0266] An updating unit is used to update the number of successful calls and the number of failed calls of the target business interface within a target time period if the first cycle number is greater than the first preset cycle number, wherein the target time period is: the current time period, and the time period between the current time period and the future specified number of consecutive time periods.

[0267] Optionally, in some implementations, the intelligent alarm device further includes:

[0268] A second cycle number acquisition unit, used to acquire the second cycle number of the continuous time period for alarming the target service interface;

[0269] The releasing unit is configured to release the association between the target service interface and the unified gateway platform if the second cycle number is greater than the second preset cycle number.

[0270] As can be seen from the above, the intelligent alarm device provided by the embodiment of the present application obtains the historical successful call times and the historical failed call times of different business interfaces in each time period in the historical time period, and performs normal distribution modeling to obtain the first normal distribution and the second normal distribution. Then, the first call times threshold of the alarm is determined according to the first preset alarm probability combined with the first normal distribution, and the second call times threshold of the alarm is determined according to the second preset alarm probability combined with the second normal distribution. When it is detected that the target business interface has a successful call times threshold less than the first call times threshold and a failed call times threshold greater than the second call times threshold in the current time period, an alarm message of abnormal target business interface is sent to the first device. In this solution, based on a unified alarm strategy, the alarm threshold is determined for each business interface according to the historical call data of different business interfaces, thereby improving the accuracy of the alarm; in addition, by setting the first preset alarm probability to be greater than the second preset alarm probability, the alarm recall rate is improved while ensuring the accuracy of the alarm, thereby improving the situation of false alarms and missed alarms.

[0271] The present application also provides an electronic device, such as Fig.12As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:

[0272] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Fig.12 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0273] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the electronic device and processes data. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0274] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and intelligent alarms by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0275] The electronic device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0276] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0277] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:

[0278] Obtain the historical number of successful calls and failed calls of a single business interface through the unified gateway platform in multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the historical number of successful calls and the historical number of failed calls both obey a normal distribution;

[0279] Modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls respectively to obtain a first normal distribution and a second normal distribution;

[0280] Determine a first call count threshold value according to a first preset alarm probability and the first normal distribution, and determine a second call count threshold value according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability;

[0281] Get the number of successful calls and failed calls corresponding to each business interface in the current time period;

[0282] Determine a target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send alarm information of the abnormality of the target service interface to the first device.

[0283] In one implementation, when determining the first call count threshold according to the first preset alarm probability and the first normal distribution, the processor 401 is specifically configured to:

[0284] Performing a standard transformation on the first normal distribution to obtain a first standard normal distribution;

[0285] Obtain the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtain a first deviation value;

[0286] Determine a first call count threshold value according to the first deviation value, the first average value and the first standard deviation, wherein the first average value is the average value of the historical successful call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical successful call counts within multiple time periods;

[0287] When determining the second call number threshold according to the second preset alarm probability and the second normal distribution, the processor 401 is specifically configured to:

[0288] Performing a standard transformation on the second normal distribution to obtain a second standard normal distribution;

[0289] Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain a second deviation value;

[0290] The second call count threshold is determined based on the second deviation value, the second average value and the second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

[0291] In one implementation, when determining the first call count threshold according to the first deviation value, the first mean value and the first standard deviation obeyed by the first normal distribution, the processor 401 is specifically configured to:

[0292] Obtaining the product of the first deviation value and the first standard deviation to obtain a first product;

[0293] Obtaining a sum of the first average value and the first product, and determining the sum as the first call count threshold;

[0294] The second calling number threshold is determined according to the second deviation value, the second mathematical expectation and the second standard deviation obeyed by the second normal distribution, including:

[0295] Obtaining the product of the second deviation value and the second standard deviation to obtain a second product;

[0296] The second average value and the second product are summed to obtain the second call number threshold.

[0297] In one implementation, when the distribution of the historical number of successful calls and the distribution of the historical number of failed calls are modeled respectively to obtain a first normal distribution and a second normal distribution, the processor 401 is specifically configured to:

[0298] Determine, from a plurality of different business interfaces, a sample business interface whose number of calls by the unified gateway platform during the plurality of time periods is greater than a preset number of calls;

[0299] The distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface are modeled respectively to obtain a first normal distribution and a second normal distribution.

[0300] In one embodiment, when the distribution of the historical number of successful calls and the distribution of the historical number of failed calls are modeled to obtain a first normal distribution and a second normal distribution, the processor 401 is specifically configured to:

[0301] Count the number of successful calls in the history of the sample business interface to obtain the number of first cycles corresponding to the same number of calls;

[0302] Convert the historical number of successful calls of the sample service interface and the first cycle quantity into first discrete points, and perform curve fitting on the first discrete points to obtain a first probability density function;

[0303] constructing a first normal distribution based on the first probability density function; and

[0304] The number of historical failed calls of the sample business interface is counted to obtain the number of second cycles corresponding to the same number of calls;

[0305] Convert the historical number of failed calls of the sample service interface and the second cycle number into second discrete points, and perform curve fitting on the second discrete points to obtain a second probability density function;

[0306] A second normal distribution is constructed based on the second probability density function.

[0307] In one implementation, before sending the alarm information of the target service interface being abnormal to the first device, the processor 401 is further configured to:

[0308] Obtain the number of target service interfaces deployed in the same server to obtain the first interface number;

[0309] If the first interface quantity is greater than the first preset interface quantity, determining that the target service interface deployed at the first interface quantity is abnormal;

[0310] The sending of the target service interface abnormality alarm information to the first device includes:

[0311] Sending alarm information about abnormality of the target service interface of the first interface quantity to the first device.

[0312] In one implementation, after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold for the target service interface, the processor 401 is further configured to:

[0313] Obtain the number of the target service interface to obtain the number of the second interface;

[0314] If the second interface quantity is greater than the second preset interface quantity, and the target service interfaces of the second interface quantity are not all deployed in the same server, it is determined that the unified gateway platform is abnormal;

[0315] Send an alarm message indicating that the unified gateway platform is abnormal to the second device.

[0316] In one embodiment, after determining that the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold of the target service interface, before sending the alarm information of the abnormality of the target service interface to the first device, the processor 401 is further used to:

[0317] Get the current network transmission rate;

[0318] If the network transmission rate exceeds the preset network rate, sending an alarm message indicating that the target service interface is abnormal to the first device;

[0319] If the network transmission rate does not exceed the preset network rate, an alarm message indicating that the target service interface is abnormal is sent to the first device.

[0320] In one implementation, after sending the alarm information of the target service interface being abnormal to the first device, the processor 401 is further configured to:

[0321] Detect the number of first cycles in which no alarm is issued for the target service interface in the future time period;

[0322] If the first cycle number is greater than the first preset cycle number, the number of successful calls and the number of failed calls of the target business interface within the target time period are updated, wherein the target time period is: the current time period, and the time period between the current time period and the future specified number of consecutive time periods.

[0323] In one implementation, after sending the alarm information of the abnormality of the target service interface to the first device, the processor 401 is further configured to:

[0324] Obtain the second period number of the continuous time period for alarming the target service interface;

[0325] If the second cycle number is greater than the second preset cycle number, the association between the target service interface and the unified gateway platform is released.

[0326] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.

[0327] As can be seen from the above, in the embodiment of the present application, the electronic device obtains the historical successful call times and the historical failed call times of different business interfaces in each time period in the historical time period, and performs normal distribution modeling to obtain the first normal distribution and the second normal distribution, and then determines the first call times threshold of the alarm according to the first preset alarm probability combined with the first normal distribution, and determines the second call times threshold of the alarm according to the second preset alarm probability combined with the second normal distribution. When it is detected that the target business interface has a successful call times threshold less than the first call times threshold and a failed call times threshold greater than the second call times threshold in the current time period, an alarm message of abnormal target business interface is sent to the first device. In this solution, based on a unified alarm strategy, the alarm threshold is determined for each business interface according to the historical call data of different business interfaces, thereby improving the accuracy of the alarm; in addition, by setting the first preset alarm probability to be greater than the second preset alarm probability, the alarm recall rate is improved while ensuring the accuracy of the alarm, and the situation of false alarms and missed alarms is improved.

[0328] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0329] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the intelligent alarm methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0330] Obtain the historical successful call counts and failed call counts of calling a single business interface through the unified gateway platform during multiple time periods in a historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the historical successful call counts and failed call counts both obey a normal distribution; model the distribution of the historical successful call counts and the distribution of the historical failed call counts, respectively, to obtain a first normal distribution and a second normal distribution; determine a first call count threshold based on a first preset alarm probability and the first normal distribution, and determine a second call count threshold based on a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability; obtain the successful call count and failed call count corresponding to each business interface in the current time period; determine a target business interface whose successful call count is less than the first call count threshold and whose failed call count is greater than the second call count threshold, and send an alarm message of target business interface abnormality to the first device.

[0331] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0332] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0333] Since the instructions stored in the computer-readable storage medium can execute the steps in any one of the intelligent alarm methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the intelligent alarm methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0334] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations of the above-mentioned intelligent alarm aspect.

[0335] The above is a detailed introduction to an intelligent alarm method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. An intelligent alarm method, characterized in that: include: Obtain the historical number of successful calls and failed calls of a single service interface through the unified gateway platform in multiple time periods of the historical time period, wherein the unified gateway platform is associated with multiple different service interfaces, and the historical number of successful calls and the historical number of failed calls both obey a normal distribution; Modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls respectively to obtain a first normal distribution and a second normal distribution; Determine a first call count threshold value according to a first preset alarm probability and the first normal distribution, and determine a second call count threshold value according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability; Get the number of successful calls and failed calls corresponding to each business interface in the current time period; Determine a target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send alarm information of the abnormality of the target service interface to the first device.

2. The intelligent alarm method according to claim 1, characterized in that: Determining a first call count threshold according to a first preset alarm probability and the first normal distribution includes: Performing a standard transformation on the first normal distribution to obtain a first standard normal distribution; Obtaining the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtaining a first deviation value; Determine a first call count threshold value according to the first deviation value, the first average value, and the first standard deviation, wherein the first average value is the average value of the historical successful call counts within multiple time periods, and the first standard deviation is the standard deviation of the historical successful call counts within multiple time periods; Determining a second call number threshold according to a second preset alarm probability and the second normal distribution includes: Performing a standard transformation on the second normal distribution to obtain a second standard normal distribution; Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain a second deviation value; The second call count threshold is determined based on the second deviation value, the second average value and the second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

3. The intelligent alarm method according to claim 2, characterized in that: Determining a first call count threshold according to the first deviation value, a first mathematical expectation and a first standard deviation obeyed by the first normal distribution includes: Obtaining the product of the first deviation value and the first standard deviation to obtain a first product; Obtaining a sum of the first average value and the first product, and determining the sum as the first call count threshold; Determining a second call count threshold according to the second deviation value, a second mathematical expectation and a second standard deviation obeyed by the second normal distribution includes: Obtaining the product of the second deviation value and the second standard deviation to obtain a second product; The second average value and the second product are summed to obtain the second call number threshold.

4. The intelligent alarm method according to claim 1, characterized in that: Modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls respectively to obtain a first normal distribution and a second normal distribution, including: Determine, from a plurality of different service interfaces, a sample service interface whose number of calls by the unified gateway platform in the plurality of time periods is greater than a preset number of calls; Models are respectively constructed for the distribution of the historical successful call times and the distribution of the historical failed call times of the sample service interface to obtain a first normal distribution and a second normal distribution.

5. The intelligent alarm method according to claim 4, characterized in that: Modeling the distribution of the historical number of successful calls and the distribution of the historical number of failed calls of the sample business interface respectively to obtain a first normal distribution and a second normal distribution, including: Counting the number of historical successful calls of the sample service interface to obtain the number of first cycles corresponding to the same number of calls; Converting the number of historical successful calls of the sample service interface and the first number of cycles into first discrete points, and performing curve fitting on the first discrete points to obtain a first probability density function; constructing the first normal distribution based on the first probability density function; and Counting the number of historical failed calls of the sample service interface to obtain the number of second cycles corresponding to the same number of calls; Converting the historical number of failed calls of the sample service interface and the second cycle number into two discrete points, and performing curve fitting on the second discrete points to obtain a second probability density function; The second normal distribution is constructed based on the second probability density function.

6. The intelligent alarm method according to claim 1, characterized in that: Before sending the alarm information of the target service interface abnormality to the first device, the method further includes: Acquire the number of the target service interfaces deployed in the same server to obtain the first interface number; If the first interface quantity is greater than the first preset interface quantity, determining that the target service interface deployed at the first interface quantity is abnormal; The sending the alarm information of the abnormality of the target service interface to the first device includes: Sending alarm information about abnormality of the target service interfaces of the first interface quantity to the first device.

7. The intelligent alarm method according to claim 1, characterized in that: After determining the target service interface for which the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold, the method further includes: Obtain the number of the target service interfaces to obtain the number of second interfaces; If the second interface quantity is greater than the second preset interface quantity, and the target service interfaces of the second interface quantity are not all deployed in the same server, it is determined that the unified gateway platform is abnormal; Send an alarm message indicating that the unified gateway platform is abnormal to the second device.

8. The intelligent alarm method according to claim 1, characterized in that: After determining the target service interface for which the number of successful calls is less than the first call number threshold and the number of failed calls is greater than the second call number threshold, and before sending alarm information of the target service interface abnormality to the first device, the method further includes: Get the current network transmission rate; If the network transmission rate exceeds the preset network rate, sending an alarm message of abnormality of the target service interface to the first device; If the network transmission rate does not exceed the preset network rate, sending an alarm message indicating that the target service interface is abnormal to the first device is executed.

9. The intelligent alarm method according to any one of claims 1 to 8, characterized in that: After sending the alarm information of the abnormality of the target service interface to the first device, the method further includes: Detect the number of first periods in which no alarm is issued for the target service interface in a future time period; If the first cycle number is greater than the first preset cycle number, the number of successful calls and the number of failed calls of the target business interface within the target time period are updated, wherein the target time period is: the current time period, and the time period between the current time period and the future specified number of consecutive time periods.

10. The intelligent alarm method according to any one of claims 1 to 8, characterized in that: After sending the alarm information of the abnormality of the target service interface to the first device, the method further includes: Obtaining the second period number of the continuous time period for alarming the target service interface; If the second cycle number is greater than the second preset cycle number, the association between the target service interface and the unified gateway platform is released.

11. An intelligent alarm device, characterized in that: include: A data acquisition unit, used to acquire the number of historical successful calls and the number of historical failed calls of calling a single business interface through a unified gateway platform in multiple time periods of a historical time period, wherein the unified gateway platform is associated with multiple different business interfaces, and the number of historical successful calls and the number of historical failed calls both obey a normal distribution; A modeling unit, used to model the distribution of the historical number of successful calls and the distribution of the historical number of failed calls, respectively, to obtain a first normal distribution and a second normal distribution; a threshold determination unit, configured to determine a first call count threshold according to a first preset alarm probability and the first normal distribution, and to determine a second call count threshold according to a second preset alarm probability and the second normal distribution, wherein the first preset alarm probability is greater than the second preset alarm probability; The number acquisition unit is used to obtain the number of successful calls and failed calls corresponding to each business interface in the current time period; The processing unit is used to determine the target service interface whose number of successful calls is less than the first call number threshold and whose number of failed calls is greater than the second call number threshold, and send an alarm message of the abnormality of the target service interface to the first device.

12. The intelligent alarm device according to claim 11, characterized in that: The determining unit is used for: Performing a standard transformation on the first normal distribution to obtain a first standard normal distribution; Obtaining the value of z1 when the probability that the random variable in the first standard normal distribution falls within the interval [-∞, z1] is the first preset alarm probability, and obtaining a first deviation value; Determine a first call count threshold value according to the first deviation value, a first average value, and a first standard deviation, wherein the first average value is an average value of the historical successful call counts within multiple time periods, and the first standard deviation is a standard deviation of the historical successful call counts within multiple time periods; and Performing a standard transformation on the second normal distribution to obtain a second standard normal distribution; Obtain the value of z2 when the probability that the random variable in the second standard normal distribution falls within the interval [z2, +∞] is the second preset alarm probability, and obtain a second deviation value; The second call count threshold is determined based on the second deviation value, the second average value and the second standard deviation, wherein the second average value is the average value of the historical failed call counts within multiple time periods, and the second standard deviation is the standard deviation of the historical failed call counts within multiple time periods.

13. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the intelligent alarm method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, which are suitable for loading by a processor to execute the steps in the intelligent alarm method according to any one of claims 1-10.

15. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by the processor, the steps in the intelligent alarm method described in any one of claims 1-10 are implemented.

Citation Information

Cited By

  • Method and device for analyzing alarm based on keyword, medium and equipment

    CN121509192A