CN109992470B - Threshold value adjusting method and device - Google Patents

Threshold value adjusting method and device Download PDF

Info

Publication number
CN109992470B
CN109992470B CN201711499251.9A CN201711499251A CN109992470B CN 109992470 B CN109992470 B CN 109992470B CN 201711499251 A CN201711499251 A CN 201711499251A CN 109992470 B CN109992470 B CN 109992470B
Authority
CN
China
Prior art keywords
target monitoring
proportion
adjusting
threshold
log data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711499251.9A
Other languages
Chinese (zh)
Other versions
CN109992470A (en
Inventor
刘凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201711499251.9A priority Critical patent/CN109992470B/en
Publication of CN109992470A publication Critical patent/CN109992470A/en
Application granted granted Critical
Publication of CN109992470B publication Critical patent/CN109992470B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Abstract

The application discloses a threshold adjusting method and device. The method comprises the following steps: acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage; calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of a plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the occupation ratio of the target monitoring items. By the method and the device, the problem that the initially set static monitoring threshold value in the related technology is difficult to adapt to the variation trend of the monitored data is solved.

Description

Threshold value adjusting method and device
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for adjusting a threshold.
Background
In the monitoring activity, a threshold value is usually required to be set, and an alarm is given when a detection condition meets the requirement of the threshold value; for example, the web service itself has some service attributes, such as status code ratio, access speed, etc., and a corresponding threshold needs to be set for monitoring. The threshold value is generally set initially according to the requirements of service conditions, that is, a static alarm threshold value is manually set for each monitoring item to monitor, an alarm is sent out when the threshold value is met, the alarm is repeatedly used as a reference line in the monitoring process, and when a new service is on line, a new threshold value is manually designated.
The service lines are various in changes, are related to service characteristics and basic service characteristics, but the monitoring threshold value can only be statically specified, so that the diversified setting requirements cannot be met, for example, the error log ratio of the domain name A is kept at about 5% daily, the error log ratio of the domain name B is kept at 1%, and the two domain names cannot share the threshold value; in addition, the domain name a may also change with time, and the error number ratio also changes with corresponding rules, but the change is within an acceptable range, and no alarm is needed, but the initial static threshold is fixed, so that phenomena of multiple false alarms and false negative alarms often occur, and the requirements cannot be met at all times.
Aiming at the problem that the static monitoring threshold value initially set in the related art is difficult to adapt to the variation trend of the monitored data, an effective solution is not provided at present.
Disclosure of Invention
The application mainly aims to provide a threshold adjusting method and a threshold adjusting device to solve the problem that a static monitoring threshold initially set in the related art is difficult to adapt to the variation trend of monitored data.
In order to achieve the above object, according to one aspect of the present application, there is provided a threshold value adjusting method. The method comprises the following steps: acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage; calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of a plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items.
Further, adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items includes: classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set.
Further, the classifying processing is performed according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item, and the obtaining of the multiple proportion sets comprises the following steps: processing the proportion of each target monitoring item according to a preset condition; and classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
Further, adjusting the monitoring threshold corresponding to the target monitoring item based on the number of occurrences of the fraction in each fraction set includes: acquiring a proportion set with the occurrence frequency of the proportion higher than a preset frequency to obtain at least one proportion set; and determining a monitoring threshold corresponding to the target monitoring item based on the ratio in the at least one ratio set.
Further, after adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items, the method further includes: presetting threshold adjusting time; starting timing; and when the timing time reaches the preset threshold adjusting time, acquiring access log data of the webpage in the historical time period by taking the preset threshold adjusting time as a period to obtain a plurality of access log data.
In order to achieve the above object, according to another aspect of the present application, there is provided a threshold adjusting apparatus. The device includes: the first acquisition unit is used for acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; the second acquisition unit is used for respectively acquiring numerical values corresponding to target monitoring items from each access log data, wherein the target monitoring items are used for monitoring the service of the webpage; the calculation unit is used for calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of the target monitoring items; and the adjusting unit is used for adjusting the monitoring threshold corresponding to the target monitoring item according to the ratio of the target monitoring items.
Further, the adjusting unit includes: the classification processing module is used for performing classification processing according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and the threshold adjusting module is used for adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence frequency of the proportion in each proportion set.
Further, the classification processing module comprises: the preprocessing submodule is used for processing the proportion of each target monitoring item according to preset conditions; and the classification submodule is used for classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program performs any one of the threshold value adjustment methods described above.
In order to achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program executes to perform any one of the threshold adjustment methods described above.
Through the application, the following steps are adopted: acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage; calculating the proportion of the data quantity of the numerical value corresponding to the target monitoring item in each access log data to obtain the proportion of the plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items. The problem that the initially set static monitoring threshold value in the related art is difficult to adapt to the variation trend of the monitored data is solved. The proportion of the target monitoring item in the access log data is calculated, and the monitoring threshold corresponding to the target monitoring item is adjusted according to the calculated proportion, so that the effect of dynamically adjusting the monitoring threshold to adapt to the change trend of the monitored data is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a threshold adjustment method provided according to an embodiment of the present application; and
fig. 2 is a schematic diagram of a threshold adjustment apparatus according to an embodiment of the present application.
Detailed Description
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.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The present invention is described below with reference to preferred implementation steps, and fig. 1 is a flowchart of a threshold adjustment method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, obtaining access log data of webpages in a historical time period according to a preset time period to obtain a plurality of access log data;
for example, the preset time period is 5 minutes and the historical time period is 12 hours. And taking 5 minutes as a preset time period, acquiring the access log data of the webpage in the past 12 hours to obtain a plurality of access log data.
Step S102, respectively obtaining a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage;
the value corresponding to the target monitoring item may be the number of the target monitoring item in each access log data, for example, the target monitoring item is a time status code, that is, the number of the time status codes is obtained from each access log data.
Step S103, calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportions of a plurality of target monitoring items;
if the plurality of access log data includes first access log data, second access log data, and so on. For example, calculating the ratio of the number of the time status codes in the first access log data to obtain that the first ratio is 0.0066; calculating the ratio of the number of the time state codes in the second access log data to obtain a second ratio of 0.0067, and calculating the ratio of the number of the time state codes in the third access log data to obtain a first ratio of 0.003; and calculating the ratio of the number of the time status codes in the fourth access log data to obtain a second ratio of 0.0573, and the like.
And step S104, adjusting the monitoring threshold corresponding to the target monitoring item according to the occupation ratio of the target monitoring items.
For example, the plurality of ratios of the time status code are respectively 0.0066,0.0067,0.003,0.0573, etc., and the monitoring threshold corresponding to the time status code is determined according to the above-mentioned 0.0066,0.0067,0.003,0.0573, etc. Namely, the monitoring threshold corresponding to the time status codes is adjusted according to the occupation ratios of the time status codes, so that the monitoring threshold is dynamically adjusted to adapt to the change trend of the time status codes.
Optionally, in the threshold adjustment method provided in the embodiment of the present application, adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items includes: classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set.
For example, the obtained ratios of the time status codes are 0.0066,0.0067,0.003,0.0573, etc., the ratios of the time status codes are classified to obtain a plurality of ratio sets [0.0066,1], [0.0067,1], [0.003,1], [0.0573,1], etc., each ratio set includes the ratio of the time status codes and the occurrence frequency of the ratio of the time status codes, and the monitoring threshold corresponding to the time status codes is adjusted according to the occurrence frequency of the ratio in each ratio set.
Optionally, in the threshold adjustment method provided in this embodiment of the present application, the classifying is performed according to the ratios of the multiple target monitoring items and the occurrence number of ratios of each target monitoring item, and obtaining multiple ratio sets includes: processing the proportion of each target monitoring item according to a preset condition; and classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
For example, the predetermined condition may be a sort rounding process, and if the target monitoring item is a time status code, the occupation ratios of the time status codes are processed according to the sort rounding.
For example, the percentage of the time status code is 0.0066,0.0067,0.003,0.0573, etc., the percentage of the time status code is firstly classified, the percentage of the time status code is increased to 1% when the percentage is less than 1%, the data which is more than 1% is rounded up, then the percentage of the time status code is increased to 0.01 when the percentage is 0.0066,0.0067 and 0.003, and then the percentage of the time status code is increased to 0.06 when the percentage is 0.0573; the time status code ratios after the sorting and rounding process are sorted, and the same time status code ratios are formed into a set, for example, the time status code ratio in the first set is 0.01, the occurrence frequency of 0.01 is 3, that is, the obtained first ratio set is [0.01,3], the time status code ratio in the second set is 0.06, the occurrence frequency of 0.01 is 1, that is, the obtained second ratio set is [0.06,1]. Through the classification processing of the ratio of each time state code, the ratios of the similar time state codes are classified into the same time state code, the calculation amount is greatly reduced, and therefore the calculation efficiency is improved.
In order to improve the accuracy of determining the monitoring threshold corresponding to the target monitoring item, optionally, in the threshold adjusting method provided in the embodiment of the present application, adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set includes: acquiring a proportion set with the occurrence frequency of the proportion higher than a preset frequency to obtain at least one proportion set; and determining a monitoring threshold corresponding to the target monitoring item based on the occupation ratio in the at least one occupation ratio set.
For example, if the target monitoring item is the access speed, through steps S101 to S103, ratios of 100 access speeds are obtained to form 8 ratio sets, where a first ratio set is composed of 90 access speed ratios with a value of 0.001, a second ratio set is composed of 3 access speed ratios with a value of 0.005, the preset number of times is 80, the first ratio set is a ratio set in which the total number of times of occurrence of the ratios is higher than 80, and in this embodiment, 0.001 is used as a monitoring threshold value of the access speed ratios to monitor the access speeds.
It should be noted that, in the embodiment of the present application, the proportion set in which the number of occurrences of the obtained proportion is higher than the preset number may be one or a sum of multiple occurrences. The examples of the present application are not intended to be limiting.
For another example, if the target monitoring item is a time status code, in steps S101 to S103, ratios of 100 time status codes are obtained, and 5 ratio sets are formed, where the first ratio set is composed of 70 time status codes having a value of 0.001, the second ratio set is composed of 20 time status codes having a value of 0.005, the preset number of times is 80, a ratio set in which the total number of times of occurrence of the ratios is higher than 80 is obtained, and the ratio set in which the time status code ratio is 0.001 and the ratio set in which the time status code ratio is 0.005 are obtained, the ratio set is selected between 0.001 and 0.005, and the highest time status code ratio is used as a new monitoring threshold, that is, the maximum time status code ratio represents that 80% or more of time status codes are both 0.001 and 0.005 in the past 12 hours, and 0.005 is used as a monitoring threshold of the time status code ratio for monitoring the time status codes.
Through the scheme, the accuracy of determining the monitoring threshold corresponding to the target monitoring item is further improved.
In order to dynamically adjust the monitoring threshold, optionally, in the threshold adjustment method provided in the embodiment of the present application, after adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items, the method further includes: presetting threshold adjusting time; starting timing; and when the timing time reaches the preset threshold adjusting time, acquiring access log data of the webpage in the historical time period by taking the preset threshold adjusting time as a period to obtain a plurality of access log data.
For example, the preset time is 1 hour, timing is started, and after the timing time reaches 1 hour, access log data of a webpage in the past 12 hours are acquired by taking 5 minutes as a preset time period, so that a plurality of access log data are obtained, and threshold adjustment is started.
It should be noted that, in order to consider the calculation performance, the result of each calculation may be stored on the hard disk, so as to be used continuously when the threshold adjustment is started next time, and the history access log data that is not calculated is calculated, thereby reducing the calculation performance overhead and increasing the processing speed.
According to the threshold value adjusting method provided by the embodiment of the application, a plurality of access log data are obtained by acquiring the access log data of the webpage in the historical time period according to the preset time period; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data; calculating the proportion of the data quantity of the numerical value corresponding to the target monitoring item in each access log data to obtain the proportion of the plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items. The problem that the initially set static monitoring threshold value in the related art is difficult to adapt to the variation trend of the monitored data is solved. The monitoring threshold corresponding to the target monitoring item is adjusted according to the calculated ratio by calculating the ratio of the target monitoring item in the access log data, so that the effect of periodically adjusting the monitoring threshold to adapt to the change trend of the monitored data is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a threshold adjusting device, and it should be noted that the threshold adjusting device in the embodiment of the present application may be used to execute the method for adjusting the threshold provided in the embodiment of the present application. The following describes a threshold adjustment apparatus provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of a threshold adjustment apparatus according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a first acquisition unit 10, a second acquisition unit 20, a calculation unit 30 and an adjustment unit 40.
Specifically, the first obtaining unit 10 is configured to obtain access log data of a webpage in a historical time period according to a preset time period, so as to obtain multiple access log data;
a second obtaining unit 20, configured to obtain a numerical value corresponding to a target monitoring item from each access log data, where the target monitoring item is used to monitor a service of a web page;
the calculating unit 30 is configured to calculate a ratio of the data amount of the numerical value corresponding to each target monitoring item in each access log data to obtain ratios of the plurality of target monitoring items;
and the adjusting unit 40 is configured to adjust the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items.
According to the threshold adjusting device provided by the embodiment of the application, the first obtaining unit 10 obtains access log data of webpages in a historical time period according to a preset time period to obtain a plurality of access log data; the second obtaining unit 20 obtains a numerical value corresponding to a target monitoring item from each access log data, where the target monitoring item is used for monitoring a service of a web page; the calculating unit 30 is configured to calculate a ratio of a data amount of a numerical value corresponding to the target monitoring item in each access log data to obtain ratios of the plurality of target monitoring items; the adjusting unit 40 adjusts the monitoring threshold corresponding to the target monitoring item according to the ratio of the target monitoring items. The problem that the initially set static monitoring threshold value in the related art is difficult to adapt to the variation trend of the monitored data is solved. The monitoring threshold corresponding to the target monitoring item is adjusted according to the calculated ratio by calculating the ratio of the target monitoring item in the access log data, so that the effect of periodically adjusting the monitoring threshold to adapt to the change trend of the monitored data is achieved.
Optionally, in the threshold adjustment apparatus provided in the embodiment of the present application, the adjusting unit 40 includes: the classification processing module is used for performing classification processing according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and the threshold adjusting module is used for adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence frequency of the proportion in each proportion set.
Optionally, in the threshold adjustment apparatus provided in the embodiment of the present application, the classification processing module includes: the preprocessing submodule is used for processing the proportion of each target monitoring item according to preset conditions; and the classification submodule is used for classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
Optionally, in the threshold adjustment apparatus provided in the embodiment of the present application, the threshold adjustment module includes: the acquisition submodule is used for acquiring a proportion set of which the occurrence times of the proportion are higher than the preset times to obtain at least one proportion set; and the determining submodule is used for determining a monitoring threshold corresponding to the target monitoring item based on the proportion in the at least one proportion set.
Optionally, in the threshold adjustment apparatus provided in this embodiment of the present application, the apparatus further includes: the preset unit is used for presetting threshold adjusting time; a timing unit for starting timing; and the execution unit is used for executing the first acquisition unit when the timing time reaches the preset time.
The threshold adjusting device comprises a processor and a memory, wherein the first acquiring unit 10, the second acquiring unit 20, the calculating unit 30, the adjusting unit 40 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more, and the monitoring threshold value is periodically adjusted by adjusting the kernel parameter to adapt to the change trend of the monitored data.
The memory may include volatile memory in a computer readable medium, random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the threshold adjustment method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the threshold adjusting method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage; calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of a plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the occupation ratio of the target monitoring items.
Adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items comprises: classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set.
Classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets, wherein the proportion sets comprise: processing the proportion of each target monitoring item according to a preset condition; and classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
Adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the duty ratio in each duty ratio set comprises: acquiring a proportion set with the occurrence frequency of the proportion higher than a preset frequency to obtain at least one proportion set; and determining a monitoring threshold corresponding to the target monitoring item based on the occupation ratio in the at least one occupation ratio set.
After the monitoring threshold corresponding to the target monitoring item is adjusted according to the occupation ratio of the target monitoring items, the method further comprises the following steps: presetting threshold adjusting time; starting timing; and when the timing time reaches the preset threshold adjusting time, acquiring access log data of the webpage in the historical time period by taking the preset threshold adjusting time as a period to obtain a plurality of access log data. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data; respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage; calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of a plurality of target monitoring items; and adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items.
Adjusting the monitoring threshold corresponding to the target monitoring item according to the percentage of the plurality of target monitoring items comprises: classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets; and adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set.
Classifying according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets, wherein the proportion sets comprise: processing the proportion of each target monitoring item according to a preset condition; and classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
Adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set comprises: acquiring a proportion set with the occurrence frequency of the proportion higher than a preset frequency to obtain at least one proportion set; and determining a monitoring threshold corresponding to the target monitoring item based on the occupation ratio in the at least one occupation ratio set.
After the monitoring threshold corresponding to the target monitoring item is adjusted according to the percentage of the plurality of target monitoring items, the method further comprises the following steps: presetting threshold adjusting time; starting timing; and when the timing time reaches the preset threshold adjustment time, acquiring access log data of the webpage in the historical time period by taking the preset threshold adjustment time as a period to obtain a plurality of access log data.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (5)

1. A method for adjusting a threshold, comprising:
acquiring access log data of the webpage in a historical time period according to a preset time period to obtain a plurality of access log data;
respectively acquiring a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the business of the webpage;
calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of a plurality of target monitoring items;
adjusting a monitoring threshold corresponding to the target monitoring item according to the ratio of the target monitoring items;
after adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items, the method further includes:
presetting threshold adjusting time;
starting timing;
when the timing time reaches the preset threshold adjusting time, executing the step of acquiring access log data of the webpage in the historical time period according to a preset time period to obtain a plurality of access log data;
wherein, adjusting the monitoring threshold corresponding to the target monitoring item according to the proportion of the plurality of target monitoring items comprises:
classifying according to the occupation ratios of the target monitoring items and the occurrence times of the occupation ratio of each target monitoring item to obtain a plurality of occupation ratio sets;
adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence number of the proportion in each proportion set;
the classifying processing is carried out according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item, and the obtaining of a plurality of proportion sets comprises the following steps:
processing the proportion of each target monitoring item according to a preset condition;
classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets, wherein the preset conditions at least comprise: and (4) sorting and rounding.
2. The method of claim 1, wherein adjusting the monitoring threshold corresponding to the target monitoring item based on the number of occurrences of the fraction in each fraction set comprises:
acquiring a proportion set with the occurrence frequency of the proportion higher than a preset frequency to obtain at least one proportion set;
and determining a monitoring threshold corresponding to the target monitoring item based on the ratio in at least one ratio set.
3. A threshold adjustment apparatus, comprising:
the first acquisition unit is used for acquiring access log data of the webpage in the historical time period according to a preset time period to obtain a plurality of access log data;
the second obtaining unit is used for obtaining a numerical value corresponding to a target monitoring item from each access log data, wherein the target monitoring item is used for monitoring the service of the webpage;
the calculation unit is used for calculating the proportion of the data quantity of the numerical value corresponding to each target monitoring item in each access log data to obtain the proportion of the target monitoring items;
the adjusting unit is used for adjusting the monitoring threshold corresponding to the target monitoring item according to the ratio of the target monitoring items;
wherein the apparatus is further configured to:
presetting threshold adjusting time after adjusting the monitoring threshold corresponding to the target monitoring item according to the ratio of the target monitoring items;
starting timing;
when the timing time reaches the preset threshold adjusting time, executing the step of acquiring access log data of the webpage in the historical time period according to a preset time period to obtain a plurality of access log data;
wherein the adjusting unit includes:
the classification processing module is used for performing classification processing according to the proportion of the target monitoring items and the occurrence frequency of the proportion of each target monitoring item to obtain a plurality of proportion sets;
the threshold adjusting module is used for adjusting the monitoring threshold corresponding to the target monitoring item based on the occurrence frequency of the occupation ratio in each occupation ratio set;
wherein the classification processing module comprises:
the preprocessing submodule is used for processing the proportion of each target monitoring item according to a preset condition;
and the classification submodule is used for classifying the ratios of the processed target monitoring items to obtain a plurality of ratio sets.
4. A storage medium characterized by comprising a stored program, wherein the program executes the threshold value adjustment method according to any one of claims 1 to 2.
5. A processor configured to run a program, wherein the program is configured to execute the threshold adjustment method according to any one of claims 1 to 2 when the program is run.
CN201711499251.9A 2017-12-29 2017-12-29 Threshold value adjusting method and device Active CN109992470B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711499251.9A CN109992470B (en) 2017-12-29 2017-12-29 Threshold value adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711499251.9A CN109992470B (en) 2017-12-29 2017-12-29 Threshold value adjusting method and device

Publications (2)

Publication Number Publication Date
CN109992470A CN109992470A (en) 2019-07-09
CN109992470B true CN109992470B (en) 2022-11-22

Family

ID=67110947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711499251.9A Active CN109992470B (en) 2017-12-29 2017-12-29 Threshold value adjusting method and device

Country Status (1)

Country Link
CN (1) CN109992470B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112417011A (en) * 2019-08-22 2021-02-26 北京国双科技有限公司 Data processing method and device
CN111339074B (en) * 2020-02-24 2023-05-05 深圳市名通科技股份有限公司 Threshold generation method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411947A (en) * 2016-11-24 2017-02-15 广州华多网络科技有限公司 Real-time threshold adaptive flow early warning method and device thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2473196B (en) * 2009-09-02 2012-01-04 1E Ltd Monitoring the performance of and controlling a computer
CN105406991A (en) * 2015-10-26 2016-03-16 上海华讯网络系统有限公司 Method and system for generating service threshold by historical data based on network monitoring indexes
CN107153593B (en) * 2016-03-02 2021-01-05 创新先进技术有限公司 Method and device for determining Internet service monitoring threshold
CN106357480B (en) * 2016-11-23 2020-02-14 北京蓝海讯通科技股份有限公司 Method and device for monitoring network performance of application and mobile terminal
CN107094096A (en) * 2017-04-19 2017-08-25 北京云端智度科技有限公司 A kind of adaptive CDN business diagnosis monitoring systems

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106411947A (en) * 2016-11-24 2017-02-15 广州华多网络科技有限公司 Real-time threshold adaptive flow early warning method and device thereof

Also Published As

Publication number Publication date
CN109992470A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN107968810B (en) Resource scheduling method, device and system for server cluster
CN109669776B (en) Detection task processing method, device and system
CN108984376B (en) System anomaly detection method, device and equipment
CN111918319B (en) Busy hour busy area prediction method and device
CN107578338B (en) Service publishing method, device and equipment
CN108243032B (en) Method, device and equipment for acquiring service level information
CN114465870B (en) Alarm information processing method and device, storage medium and electronic equipment
CN109992470B (en) Threshold value adjusting method and device
CN110716813A (en) Data stream processing method and device, readable storage medium and processor
CN105205125A (en) Recommendation method and device for application programs
CN111784468A (en) Account association method and device and electronic equipment
CN114741187A (en) Resource scheduling method, system, electronic device and medium
CN113434320A (en) Information system fault positioning method, device, equipment and storage medium
CN113742036B (en) Index processing method and device and electronic equipment
CN110928636A (en) Virtual machine live migration method, device and equipment
CN113760658A (en) Monitoring method, device and equipment
CN107562703B (en) Dictionary tree reconstruction method and system
CN109947713B (en) Log monitoring method and device
CN111770150A (en) Access flow control method and device and electronic equipment
CN108470242B (en) Risk management and control method, device and server
CN113123955A (en) Plunger pump abnormality detection method and device, storage medium and electronic device
CN114968028A (en) Method, apparatus, and medium for dynamically changing menu layout based on user behavior analysis
CN110460663B (en) Data distribution method and device among distributed nodes, server and storage medium
CN115914358A (en) Message pushing method and device, electronic equipment and computer storage medium
CN112416534A (en) Agent-based task management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing

Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A

Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant