Disclosure of Invention
The present application aims to provide an improved method and apparatus for internet service alarm based on confidence interval to solve the technical problems mentioned in the background above.
In a first aspect, the present application provides an internet service alarm method based on a confidence interval, including: the method comprises the steps of obtaining internet service data information of a current time period, wherein the internet service data information comprises internet service volume information, internet service type information and time characteristic information; determining an alarm model matched with the internet service data information at the current time period based on the internet service type information and the time characteristic information; judging whether the internet traffic indicated by the internet traffic information meets at least one preset condition; if not, generating alarm information; wherein the preset conditions include: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
In some embodiments, the internet service alarm method based on the confidence interval further comprises the step of establishing an alarm model; the step of establishing the alarm model comprises the following steps: collecting historical internet service data information with the same time characteristics and internet service types within a preset date range from a historical internet service data information database; determining statistical parameters of historical internet service data indicated by the historical internet service data information; and establishing an alarm model corresponding to the time interval range based on the statistical parameters.
In some embodiments, determining the statistical parameter of the historical internet traffic data indicated by the historical internet traffic data information comprises: determining a mean value and a standard deviation of historical internet service data indicated by the historical internet service data information; based on the statistical parameters, establishing an alarm model corresponding to the time interval range, wherein the alarm model comprises the following steps: determining a gaussian distribution of historical internet service data indicated by the historical internet service data information based on the mean and the standard deviation; determining confidence intervals of Gaussian distribution; and taking the Gaussian distribution of the determined confidence interval as an alarm model of the internet service type indicated by the historical internet service data information.
In some embodiments, the internet service alerting method based on the confidence interval further comprises adding the internet service data information of the current time period to a historical internet service data information database.
In some embodiments, adding the internet traffic data information of the current time period to the historical internet traffic data information database further comprises: and in response to determining that the alarm information does not belong to a false alarm, adding the internet service data information of the current time period to a historical internet service data information database.
In some embodiments, the temporal characteristics include at least one of: a feature for indicating whether the occurrence day of the internet service is a weekday, a feature for indicating whether the occurrence day of the internet service is a holiday, and a feature for indicating whether the occurrence day of the internet service is in abnormal weather.
In some embodiments, the preset conditions further include: the internet traffic indicated by the internet traffic information matches a preset internet traffic threshold.
In a second aspect, the present application further provides an internet service alarm device based on a confidence interval, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring Internet service data information of the current time period, and the Internet service data information comprises Internet service volume information, Internet service type information and time characteristic information; the determining unit is used for determining an alarm model matched with the Internet service data information of the current time period based on the Internet service type information and the time characteristic information; a judging unit, configured to judge whether internet traffic indicated by the internet traffic information satisfies at least one preset condition; the alarm information generating unit is used for generating alarm information when the preset condition is not met; wherein the preset conditions include: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
In some embodiments, the internet service alarm device based on the confidence interval further comprises an alarm model establishing unit; the alarm model establishing unit comprises: the acquisition module is used for acquiring historical internet service data information with the same time characteristics and internet service types within a preset date range from a historical internet service data information database; the statistical parameter determining module is used for determining statistical parameters of historical internet service data indicated by the historical internet service data information; and the establishing module is used for establishing an alarm model corresponding to the time interval range based on the statistical parameters.
In some embodiments, the statistical parameter determination module is further configured to determine a mean and a standard deviation of historical internet traffic data indicated by the historical internet traffic data information; the setup module is further to: determining a gaussian distribution of historical internet service data indicated by the historical internet service data information based on the mean and the standard deviation; determining confidence intervals of Gaussian distribution; and taking the Gaussian distribution of the determined confidence interval as an alarm model of the internet service type indicated by the historical internet service data information.
In some embodiments, the internet service alarm device based on the confidence interval further comprises: and the adding unit is used for adding the Internet service data information of the current time period into the historical Internet service data information database.
In some embodiments, the adding unit is further configured to: and in response to determining that the alarm information does not belong to a false alarm, adding the internet service data information of the current time period to a historical internet service data information database.
In some embodiments, the temporal characteristics include at least one of: a feature for indicating whether the occurrence day of the internet service is a weekday, a feature for indicating whether the occurrence day of the internet service is a holiday, and a feature for indicating whether the occurrence day of the internet service is in abnormal weather.
In some embodiments, the preset conditions further include: the internet traffic indicated by the internet traffic information matches a preset internet traffic threshold.
In a third aspect, the present application further provides an electronic device comprising one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the above method for internet traffic alerting based on confidence intervals.
In a fourth aspect, the present application also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above method for internet traffic alerting based on a confidence interval.
According to the internet service alarm method and device based on the confidence interval, the alarm model corresponding to the internet service data is determined according to the service type and the time characteristic of the internet service data, and whether the current internet service volume meets at least one preset condition is judged, wherein the preset condition comprises the following steps: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information. Therefore, the method and the device realize that a targeted alarm model and an alarm triggering condition are set for the internet services with different time periods and different time characteristics, so that the alarm is more accurate.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of a confidence interval based internet traffic alerting method or a confidence interval based internet traffic alerting apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include first servers 101, 102, 103, a network 104, and a second server 105. The network 104 serves as a medium for providing communication links between the first servers 101, 102, 103 and the second server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may interact with the first server 101, 102, 103 using a terminal device (not shown in the figure) to obtain the internet service provided by the first server 101, 102, 103. Furthermore, the first servers 101, 102, 103 may also interact with the second server 105 via the network 104 to receive or send messages or the like.
The first servers 101, 102, 103 may provide various servers of internet services to users using terminal devices, including but not limited to a server for providing a network purchase service, a server for providing a takeout service, a server for providing a search service, and the like.
The second server 105 may be a server that monitors the first servers 101, 102, 103 in real time. For example a monitoring server that monitors in real time the internet traffic provided by the first server 101, 102, 103. The second server 105 may analyze data such as the collected internet service data information, and feed back a processing result (e.g., alarm information) to the first servers 101, 102, and 103.
It should be noted that the internet service alarm method based on the confidence interval provided in the embodiment of the present application may be executed by the first servers 101, 102, and 103, or may also be executed by the second server 105, or may also be executed by a part of the first servers 101, 102, and 103 and executed by the second server 105. Accordingly, the internet service alerting device based on the confidence interval may be disposed in the first server 101, 102, 103, or may be disposed in the second server 105, or a part of the internet service alerting device may be disposed in the first server 101, 102, 103 and another part of the internet service alerting device may be disposed in the second server 105.
It should be understood that the number of first servers, networks, and second servers in fig. 1 is merely illustrative. There may be any number of first servers, networks, and second servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of one embodiment of a confidence interval based internet traffic alerting method according to the present application is shown. The internet service alarm method based on the confidence interval comprises the following steps:
step 210, obtaining internet service data information of the current time period. Here, the internet service data information may include internet traffic information, internet service type information, and time characteristic information.
In this embodiment, if the electronic device performing this step is the first server shown in fig. 1, it may extract the locally stored internet service data information in the current time period. If the electronic device performing this step is the second server shown in fig. 1, it may obtain the internet service data information of the current time period from the first server communicatively connected thereto through a wired connection manner or a wireless connection manner. The wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
Here, the internet traffic information included in the internet traffic data information may be, for example, any information capable of characterizing the amount of internet traffic. This information may be quantitative, i.e. characterized by a specific numerical value. Alternatively, the information may be non-quantitative, e.g., it may be characterized by words representing a number of levels (e.g., present, absent, more, less, etc.).
Further, the internet traffic type information may be any information that can distinguish one type of internet traffic from other types of internet traffic. For example, the internet traffic types may include search-type traffic, multimedia traffic, purchase-type traffic, take-away-type traffic, and so forth. Alternatively, the type of internet traffic may be a further subdivision of a certain type of internet traffic. For example, for internet services belonging to the search class, the search service for the database a, the search service for the database B, and the like can be further subdivided.
In addition, the time characteristic information may be any time-related characteristic capable of representing the current time period. Some types of internet services have a large fluctuation in traffic volume depending on the date or season. For example, financial services, which have a large increase in traffic volume at the end of the month, at the end of the quarter, etc.; and at the beginning of the month or the quarter, the falling back is larger. Also for example, take-away type services have more traffic in winter and summer, and less traffic in spring and autumn.
And step 220, determining an alarm model matched with the internet service data information in the current time period based on the internet service type information and the time characteristic information.
Here, the alarm model for a certain type of internet traffic may be extracted and summarized by analyzing internet traffic occurring in a certain period of time before. When the alarm model is used, the internet service data information of the type in the current time period can be input into the alarm model, so that the alarm model can analyze and judge the input information.
As described above, certain types of internet traffic are associated with temporal characteristics of the traffic occurrence period, and thus, by determining the temporal characteristics of the current period and selecting an alarm model for that type of internet traffic based on the temporal characteristics, the alarm model can be made to better fit the objective laws of that type of internet traffic at the current period.
In some application scenarios, for a certain type of internet service, a plurality of alarm models may be stored on the electronic device, and each alarm model may correspond to one or more of the same time characteristics. If the internet service data of the current time period has a certain time characteristic, an alarm model matched with the time characteristic can be searched in the electronic equipment based on the time characteristic.
Step 230, determining whether the internet traffic indicated by the internet traffic information satisfies at least one preset condition.
Here, the preset condition may include, for example: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
Here, the confidence interval of the alarm model can be understood as a normal interval of internet traffic. That is, if the internet traffic is within the confidence interval of the alarm model, the type of internet traffic at the current time period can be considered to be normal; on the contrary, if the internet traffic is not in the confidence interval of the alarm model, it can be considered that the type of internet traffic is abnormal in the current time period.
And step 240, if not, generating alarm information.
In the internet service alarm method based on the confidence interval according to the embodiment, the alarm model corresponding to the internet service data is determined according to the service type and the time characteristic of the internet service data, and whether the current internet service volume meets at least one preset condition is judged, wherein the internet service volume indicated by the internet service volume information is in the confidence interval of the alarm model corresponding to the internet service volume information. Therefore, the method and the device realize that a targeted alarm model and an alarm triggering condition are set for the internet services with different time periods and different time characteristics, so that the alarm is more accurate.
In some application scenarios, if the electronic device executing the internet service alarm method based on the confidence interval of the present embodiment is the second server shown in fig. 1, after the alarm information is generated, the alarm information may also be sent to the corresponding first server, so as to prompt that the first server may be abnormal.
Referring to fig. 3, a schematic flow chart diagram of another embodiment of the internet service alerting method based on confidence interval according to the present application is shown.
The internet service alarm method based on the confidence interval comprises the following steps:
step 310, an alarm model is established.
Referring to FIG. 4, an exploded flow chart of step 310 is shown.
Here, the step of establishing an alarm model may further include:
step 311, collecting historical internet service data information with the same time characteristics and internet service types within a preset date range from the historical internet service data information database.
For example, data information of the average daily order amount of takeout services in summer and winter is collected in a date range of 2016 month 1 to 2017 month 1. Here, "take-out type service" may be understood as an internet service type, and a date range of 2016 (1 month) to 2017 (1 month) may be understood as a predetermined date range, and since the number of take-out orders in summer and winter is significantly different from those in spring and autumn, summer and winter may be understood as a time characteristic.
In step 312, statistical parameters of the historical internet service data indicated by the historical internet service data information are determined.
Here, the statistical parameter of the historical internet traffic data may be any parameter having statistical significance that can represent the historical internet traffic data.
Step 313, based on the statistical parameters, an alarm model corresponding to the time interval range is established.
Since the alarm model is determined based on the statistical parameters of the historical internet service data, the alarm model can more accurately reflect the data volume of the type of internet service data within a predetermined date range.
Referring back to fig. 3, the method of the present embodiment further includes:
and step 320, acquiring the internet service data information of the current time period. Here, the internet service data information may include internet traffic information, internet service type information, and time characteristic information.
Step 330, determining an alarm model matched with the internet service data information of the current time period based on the internet service type information and the time characteristic information.
And 340, judging whether the internet traffic indicated by the internet traffic information meets at least one preset condition. Here, the preset condition may include, for example: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
And 350, if not, generating alarm information.
The execution process of steps 320 to 350 in this embodiment may have a similar execution process as steps 210 to 240 in the embodiment shown in fig. 2, and is not described herein again.
Compared with the embodiment shown in fig. 2, the internet service alarm method based on the confidence interval of the embodiment highlights the process of establishing the alarm model, and determines the alarm model through the statistical parameters based on the historical internet service data, so that the alarm model can more accurately reflect the data volume of the type of internet service data within the predetermined date range.
In some optional implementations of this embodiment, the determining the statistical parameter of the historical internet traffic data indicated by the historical internet traffic data information in step 312 may further include: a mean and a standard deviation of the historical internet traffic data indicated by the historical internet traffic data information are determined.
In these alternative implementations, the step 313 of establishing an alarm model corresponding to the time period range based on the statistical parameters may further include:
and step 313a, determining a gaussian distribution of the historical internet service data indicated by the historical internet service data information based on the mean and the standard deviation. Here, the gaussian distribution of the historical internet traffic data may be established by calculating a mean and a standard deviation of the historical internet traffic data within a predetermined date range.
Step 313b, a confidence interval of the gaussian distribution is determined. Here, the range of the confidence interval may be determined according to the needs of the actual application scenario. For example, based on a Gaussian distribution, the probability that Internet traffic falls in the interval (μ -1.96 σ, μ +1.96 σ) is about 95%, where (μ -1.96 σ, μ +1.96 σ) can be taken as the confidence interval for the Gaussian distribution. Here, μ is a mean value of the gaussian distribution, and σ is a standard deviation of the gaussian distribution.
And step 313c, taking the Gaussian distribution of the determined confidence interval as an alarm model of the Internet service type indicated by the historical Internet service data information.
In some optional implementation manners, the internet service alarm method based on the confidence interval according to embodiments of the present application may further include: and adding the Internet service data information of the current time period into a historical Internet service data information database.
In some application scenarios of these alternative implementations, for example, it may be determined whether the internet service data information collected in the current time period is accurate. Specifically, when the alarm information is determined not to belong to the false alarm, the internet service data information of the current time period is added to the historical internet service data information database. Therefore, data collected by mistake can be prevented from being added into the Lishi Internet business data information database, and further the influence of the wrong data on the statistical parameters of the alarm model can be avoided.
In some alternative implementations, the temporal characteristics include at least one of: a feature for indicating whether the occurrence day of the internet service is a weekday, a feature for indicating whether the occurrence day of the internet service is a holiday, and a feature for indicating whether the occurrence day of the internet service is in abnormal weather.
In some optional implementations, the preset condition may further include: the internet traffic indicated by the internet traffic information matches a preset internet traffic threshold.
In some application scenarios of these optional implementations, it is determined only by the confidence interval of the alarm model whether the alarm information is generated or not, which may still result in false alarm, missed alarm, and the like. At this time, for example, a corresponding threshold range may be set for each internet service, and when two conditions of the confidence interval and the threshold range are simultaneously satisfied, it may be considered that the internet service volume is normal, otherwise, generation of alarm information is triggered.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of an internet service alarm apparatus based on a confidence interval, where the apparatus embodiment corresponds to the method embodiment shown in fig. 2 or fig. 3, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the internet service alarm apparatus 500 based on the confidence interval according to this embodiment includes:
the obtaining unit 510 may be configured to obtain internet service data information in a current time period, where the internet service data information includes internet traffic information, internet service type information, and time characteristic information.
The determining unit 520 may be configured to determine an alarm model matched with the internet service data information of the current time period based on the internet service type information and the time characteristic information.
The determining unit 530 may be configured to determine whether the internet traffic indicated by the internet traffic information satisfies at least one preset condition.
The alarm information generating unit 540 may be configured to generate alarm information when a preset condition is not satisfied; wherein the preset conditions include: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
In some alternative implementations, the internet service alarm apparatus based on the confidence interval may further include an alarm model establishing unit (not shown in the figure).
In these alternative implementations, the alarm model building unit may include: the acquisition module is used for acquiring historical internet service data information with the same time characteristics and internet service types within a preset date range from a historical internet service data information database; the statistical parameter determining module is used for determining statistical parameters of historical internet service data indicated by the historical internet service data information; and the establishing module is used for establishing an alarm model corresponding to the time interval range based on the statistical parameters.
In some optional implementations, the statistical parameter determination module may be further configured to determine a mean and a standard deviation of the historical internet traffic data indicated by the historical internet traffic data information.
In these alternative implementations, the establishing module may be further configured to: determining a gaussian distribution of historical internet service data indicated by the historical internet service data information based on the mean and the standard deviation; determining confidence intervals of Gaussian distribution; and taking the Gaussian distribution of the determined confidence interval as an alarm model of the internet service type indicated by the historical internet service data information.
In some optional implementations, the internet service alarm device based on the confidence interval may further include: and an adding unit (not shown in the figure) operable to add the internet service data information of the current time period to the historical internet service data information database.
In some optional implementations, the adding unit may further be configured to: and in response to determining that the alarm information does not belong to a false alarm, adding the internet service data information of the current time period to a historical internet service data information database.
In some alternative implementations, the temporal characteristics may include at least one of: a feature for indicating whether the occurrence day of the internet service is a weekday, a feature for indicating whether the occurrence day of the internet service is a holiday, and a feature for indicating whether the occurrence day of the internet service is in abnormal weather.
In some optional implementations, the preset condition may further include: the internet traffic indicated by the internet traffic information matches a preset internet traffic threshold.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a terminal device or server of an embodiment of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a determination unit, a judgment unit, and an alarm information generation unit. The names of these units do not in some cases constitute a limitation to the unit itself, and for example, the acquiring unit may also be described as a "unit that acquires internet service data information of the current time period".
As another aspect, the present application also provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the apparatus in the above-described embodiments; or it may be a non-volatile computer storage medium that exists separately and is not incorporated into the terminal. The non-transitory computer storage medium stores one or more programs that, when executed by a device, cause the device to: the method comprises the steps of obtaining internet service data information of a current time period, wherein the internet service data information comprises internet service volume information, internet service type information and time characteristic information; determining an alarm model matched with the internet service data information at the current time period based on the internet service type information and the time characteristic information; judging whether the internet traffic indicated by the internet traffic information meets at least one preset condition; if not, generating alarm information; wherein the preset conditions include: the internet traffic indicated by the internet traffic information is within a confidence interval of the alarm model corresponding to the internet traffic information.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.