CN112242927A - Data monitoring method, device, server and computer readable storage medium - Google Patents
Data monitoring method, device, server and computer readable storage medium Download PDFInfo
- Publication number
- CN112242927A CN112242927A CN202011069432.XA CN202011069432A CN112242927A CN 112242927 A CN112242927 A CN 112242927A CN 202011069432 A CN202011069432 A CN 202011069432A CN 112242927 A CN112242927 A CN 112242927A
- Authority
- CN
- China
- Prior art keywords
- time period
- time
- resource value
- value
- length
- 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.)
- Withdrawn
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0631—Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0681—Configuration of triggering conditions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application discloses a data monitoring method and device, electronic equipment and a storage medium, and belongs to the internet technology. The method comprises the following steps: determining the length of the elastic time slice based on the total resource value of the target data in the target time slice; acquiring a total resource value of the target data in a current time period, wherein the length of the current time period is determined based on the length of the elastic time slice; determining whether the target data triggers an alarm strategy in the current time period or not according to the total resource value of the current time period; and responding to the target data to trigger an alarm strategy in the current time period, and sending an alarm message to the data delivery platform. The method realizes that the length of the elastic time slice of the target data is dynamically adjusted according to the actual condition of the target data, data monitoring is carried out on the current time slice based on the length, not only is the flexibility of the data monitoring improved, but also the efficiency and the accuracy of the data monitoring can be improved, and the false alarm rate of the sent alarm message is reduced when whether the alarm message is sent or not is determined according to the monitoring result of the data.
Description
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a data monitoring method, a data monitoring device, a server and a computer readable storage medium.
Background
With the rapid development of internet technology, data popularization by using the internet technology has become a necessary means for commercial activities. In order to ensure the benefit of the data delivery platform, the data monitoring platform can monitor the delivered data.
In the related art, a data monitoring platform monitors target data according to a fixed monitoring frequency. For example, the target data is monitored every 20 minutes, and the data monitoring platform acquires the total resource value (data profit) of the target data within the 20 minutes. And comparing the total resource value with the total target resource value, determining that the target data triggers an alarm strategy in the 20 minutes in response to the total resource value being smaller than the total target resource value, and sending an alarm message to the data delivery platform.
However, the above method for monitoring the target data according to the fixed monitoring frequency causes a deviation between the monitoring result and the actual situation of the target data, which results in a lower accuracy of data monitoring and a higher false alarm rate of the sent alarm message.
Disclosure of Invention
The embodiment of the application provides a data monitoring method, a data monitoring device, a server and a computer readable storage medium, which can be used for solving the problems in the related art. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a data monitoring method, where the method includes:
determining the length of the elastic time slice based on the total resource value of the target data in the target time slice;
acquiring a total resource value of the target data in a current time period, wherein the length of the current time period is determined based on the length of the elastic time slice;
determining whether the target data triggers an alarm strategy in the current time period according to the total resource value of the current time period;
and responding to the target data to trigger an alarm strategy in the current time period, and sending an alarm message to a data delivery platform.
In a possible implementation manner, the determining the length of the flexible time slice based on the total resource value of the target data in the target time period includes:
equally dividing the target time period into a plurality of first time slices;
acquiring resource values of the plurality of first time slices;
determining the number of first time slices with continuous resource values of zero according to the resource values of the first time slices;
determining the number of the first time slices reaching the reference resource value according to the length of the first time slices;
and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource values being zero and the number of the first time slices reaching the reference resource values.
In a possible implementation manner, the determining the length of the flexible time slice according to the length of the first time slice, the number of first time slices with the continuous resource value being zero, and the number of first time slices reaching the reference resource value includes:
calculating a first time length according to the length of the first time slice and the number of the first time slices with the continuous resource value being zero;
calculating a second time length according to the length of the first time slice and the number of the first time slices reaching the reference resource value;
and determining the time length meeting the target requirement in the first time length and the second time length as the length of the elastic time slice.
In a possible implementation manner, the determining, according to the length of the first time slice, the number of first time slices reaching the reference resource value includes:
determining the number b of the first time slices reaching the reference resource value according to the following formula according to the length of the first time slices:
the lostdata is the reference resource value, the houravig is the average resource value of the reference time period, the continueCount is the number of alarms triggered in the continuous time period, and the time is the length of the first time slice.
In a possible implementation manner, after determining, according to the length of the first time slice, the number of first time slices reaching the reference resource value, the method further includes:
in response to the target time period being a low peak time period, calculating a peak coefficient based on the resource value of the target time period and the average resource value of the high peak time period; based on the peak value coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
or, in response to the target time period being a holiday time period, calculating a holiday coefficient based on the resource value of the target time period and the resource value of a non-holiday and same time period; based on the holiday coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero and the number of the first time slices reaching the reference resource value, including:
and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero and the number of the first time slices reaching the reference resource value after adjustment.
In a possible implementation manner, the determining whether the target data triggers an alarm policy in the current time period according to the total resource value in the current time period includes:
acquiring total resource values of the target data in a plurality of first time periods, wherein the first time periods are time periods which are consistent with the starting time and the ending time of the current time period in historical time periods;
acquiring a total resource value of the target data in a second time period, wherein the second time period is a time period which is on the same day as the current time period, is adjacent to the current time period and is before the current time period;
and determining whether the target data triggers an alarm strategy in the current time period according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods and the total resource value of the second time period.
In a possible implementation manner, the determining, according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods, and the total resource value of the second time period, whether the target data triggers an alarm policy in the current time period includes:
responding to the time slices with the resource numerical value of zero in the current time period, and determining the number of the time slices with the continuous resource numerical value of zero;
and determining that the target data triggers an alarm strategy in the current time period in response to the fact that the number of the time slices with the continuous resource numerical value of zero is larger than the reference time slice number.
In a possible implementation manner, the determining, according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods, and the total resource value of the second time period, whether the target data triggers an alarm policy in the current time period includes:
calculating a dynamic amplitude value of the current time period according to the total resource value of the current time period and the total resource value of the second time period;
and determining that the target data triggers an alarm strategy in the current time period in response to the dynamic amplitude value of the current time period being smaller than a target dynamic amplitude value.
In a possible implementation manner, the determining, according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods, and the total resource value of the second time period, whether the target data triggers an alarm policy in the current time period includes:
calculating a plurality of reference values according to the total resource values of the plurality of first time periods, wherein the reference values comprise dynamic amplitude values, minimum values and ring ratio thresholds of the total resource values of the plurality of first time periods;
calculating a plurality of target values according to the total resource value of the current time period and the total resource value of the second time period, wherein the target values comprise a dynamic amplitude value, a minimum value and an annular ratio threshold of the total resource value of the current time period;
and determining that the target data triggers an alarm strategy in the current time period in response to that a target number of the target values is smaller than a corresponding reference value.
In a possible implementation manner, before determining the number of time slices with a resource value of zero in response to the time slice with a resource value of zero existing in the current time period, the method further includes:
equally dividing the current time period into a plurality of second time slices;
acquiring resource numerical values of a plurality of second time slices of the current time period;
and determining whether a second time slice with the resource value being zero exists in the plurality of second time slices according to the resource values of the plurality of second time slices.
In a possible implementation manner, the sending an alert message to a data delivery platform in response to the target data triggering an alert policy in the current time period includes:
responding to the target data to trigger an alarm strategy in the current time period, and acquiring retry times according to the data type of the target data;
and responding to the target data still triggering an alarm strategy in the retry times, and sending an alarm message to the data delivery platform.
On the other hand, an embodiment of the present application provides a data monitoring apparatus, where the apparatus includes:
the first determining module is used for determining the length of the elastic time slice based on the total resource value of the target data in the target time slice;
the acquisition module is used for acquiring a total resource value of the target data in a current time period, wherein the length of the current time period is determined based on the length of the elastic time slice;
the second determining module is used for determining whether the target data triggers an alarm strategy in the current time period according to the total resource value of the current time period;
and the sending module is used for responding to the alarm strategy triggered by the target data in the current time period and sending an alarm message to the data delivery platform.
In a possible implementation manner, the first determining module is configured to averagely divide the target time period into a plurality of first time slices; acquiring resource values of the plurality of first time slices; determining the number of first time slices with continuous resource values of zero according to the resource values of the first time slices; determining the number of the first time slices reaching the reference resource value according to the length of the first time slices; and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource values being zero and the number of the first time slices reaching the reference resource values.
In a possible implementation manner, the first determining module is configured to calculate the first time duration according to the length of the first time slice and the number of the first time slices in which the continuous resource value is zero; calculating a second time length according to the length of the first time slice and the number of the first time slices reaching the reference resource value; and determining the time length meeting the target requirement in the first time length and the second time length as the length of the elastic time slice.
In a possible implementation manner, the first determining module is configured to determine, according to the length of the first time slice, the number b of the first time slices reaching the reference resource value according to the following formula:
the lostdata is the reference resource value, the houravig is the average resource value of the reference time period, the continueCount is the number of alarms triggered in the continuous time period, and the time is the length of the first time slice.
In one possible implementation, the apparatus further includes:
the adjusting module is used for responding to the target time period being a low peak time period, and calculating a peak coefficient based on the resource value of the target time period and the average resource value of the high peak time period; based on the peak value coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment; or, in response to the target time period being a holiday time period, calculating a holiday coefficient based on the resource value of the target time period and the resource value of a non-holiday and same time period; based on the holiday coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
the first determining module is configured to determine the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero, and the number of the first time slices reaching the reference resource value after the adjustment.
In a possible implementation manner, the second determining module is configured to obtain a total resource value of the target data in a plurality of first time periods, where the first time period is a time period in a historical time period that is consistent with a start-stop time of the current time period; acquiring a total resource value of the target data in a second time period, wherein the second time period is a time period which is on the same day as the current time period, is adjacent to the current time period and is before the current time period; and determining whether the target data triggers an alarm strategy in the current time period according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods and the total resource value of the second time period.
In a possible implementation manner, the second determining module is configured to determine, in response to a time slice in which the resource value is zero in the current time period, the number of time slices in which the continuous resource value is zero; and determining that the target data triggers an alarm strategy in the current time period in response to the fact that the number of the time slices with the continuous resource numerical value of zero is larger than the reference time slice number.
In a possible implementation manner, the second determining module is configured to calculate a dynamic amplitude value of the current time period according to the total resource value of the current time period and the total resource value of the second time period; and determining that the target data triggers an alarm strategy in the current time period in response to the dynamic amplitude value of the current time period being smaller than a target dynamic amplitude value.
In a possible implementation manner, the second determining module is configured to calculate a plurality of reference values according to the total resource values of the plurality of first time periods, where the reference values include a dynamic amplitude value, a minimum value, and an annular ratio threshold of the total resource values of the plurality of first time periods; calculating a plurality of target values according to the total resource value of the current time period and the total resource value of the second time period, wherein the target values comprise a dynamic amplitude value, a minimum value and an annular ratio threshold of the total resource value of the current time period; and determining that the target data triggers an alarm strategy in the current time period in response to that a target number of the target values is smaller than a corresponding reference value.
In a possible implementation manner, the second determining module is further configured to divide the current time period into a plurality of second time slices; acquiring resource numerical values of a plurality of second time slices of the current time period; and determining whether a second time slice with the resource value being zero exists in the plurality of second time slices according to the resource values of the plurality of second time slices.
In a possible implementation manner, the sending module is configured to respond to that the target data triggers an alarm policy in the current time period, and obtain retry times according to a data type of the target data; and responding to the target data still triggering an alarm strategy in the retry times, and sending an alarm message to the data delivery platform.
In another aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores at least one program code, and the at least one program code is loaded and executed by the processor, so as to implement any of the above data monitoring methods.
In another aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement any of the above-mentioned data monitoring methods.
In another aspect, a computer program or a computer program product is provided, in which at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement any of the above data monitoring methods.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
according to the technical scheme provided by the embodiment of the application, the length of the elastic time slice which accords with the actual condition of the target data is determined according to the total resource value of the target data in the target time slice, and the length of the current time slice is determined according to the length of the elastic time slice, so that the determination of the length of the current time slice is more flexible. The data in the current time period is monitored according to the total resource value in the current time period, the actual situation of the target data in the current time period can be reflected better, the matching degree of the monitoring result and the target data is higher, the efficiency and the accuracy of data monitoring are improved, and the false alarm rate of the sent alarm message is reduced when whether the alarm message is sent or not is determined according to the monitoring result.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a data monitoring method according to an embodiment of the present application;
fig. 2 is a flowchart of a data monitoring method according to an embodiment of the present application;
FIG. 3 is an architecture diagram of a data monitoring platform according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a data monitoring apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a data monitoring method according to an embodiment of the present application, and as shown in fig. 1, the implementation environment includes: an electronic device 101 and a server 102.
The data monitoring method provided in the embodiment of the present application may be executed by the electronic device 101 or the server 102, and an execution subject of the data monitoring method in the embodiment of the present application is not limited. When the electronic device 101 executes the data releasing platform and the data monitoring platform, the electronic device 101 installs and runs the data releasing platform and the data monitoring platform, determines the length of the elastic time slice based on the total resource value of the target data in the target time slice, acquires the total resource value of the target data in the current time slice, determines whether the target data triggers the alarm strategy in the current time slice, and sends the alarm message to the data releasing platform in response to the triggering of the alarm strategy. When executed by the server 102, a data monitoring platform is installed and operated in the server 102, and the server 102 can acquire a total resource value of the target data in the target time period from the electronic device 101, so as to determine the length of the elastic time slice, acquire the total resource value in the current time period, further determine whether the target data triggers an alarm policy in the current time period, and in response to triggering the alarm policy, the server 102 sends an alarm message to the electronic device 101.
The electronic device 101 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, and a laptop computer. The server 102 is a server, or a server cluster formed by a plurality of servers, or at least one of a cloud computing platform and a virtualization center, which is not limited in this embodiment of the present application. The electronic device 101 and the server 102 establish a communication connection through a wired network or a wireless network.
The electronic device 101 may be generally referred to as one of a plurality of electronic devices, and the embodiment is only illustrated by the electronic device 101. Those skilled in the art will appreciate that the number of electronic devices 101 described above may be greater or fewer. For example, the number of the electronic devices 101 may be only one, or the number of the electronic devices 101 may be tens or hundreds, or more, and the number of the electronic devices and the device types are not limited in the embodiment of the present application.
Based on the implementation environment shown in fig. 1, an embodiment of the present application provides a data monitoring method, which is applied to an electronic device 101 as an example. As shown in fig. 2, the method provided by the embodiment of the present application includes the following steps:
in step 201, the length of the elastic time slice is determined based on the total value of the resources of the target data in the target time period.
In the embodiment of the application, the target data is the release data, the data type of the target data is the high-consumption release data or the low-consumption release data, the data type of the target data is not limited in the embodiment of the application, and the total resource value is the data benefit of the target data. A data delivery platform and a data monitoring platform are installed and operated in the electronic equipment. The data delivery platform is used for delivering data, the data monitoring platform is used for monitoring the data delivered by the data delivery platform and sending a monitoring result to the data delivery platform, and therefore the data delivery platform can master the income condition of the delivered data in real time.
In a possible implementation manner, the electronic device stores a total resource value of the target data in each time slice (per minute), and the electronic device extracts the total resource value of the target time period from a storage space of the electronic device based on the target time period determined by the user. Or, the electronic device randomly extracts the total resource value of a time period in the storage space of the electronic device, and determines the total resource value of the time period as the total resource value of the target time period. Illustratively, the target time period is 21: 00/8/10/2020 to 22: 00/8/10/2020, and the total resource value of the target data in the target time period is 100.
In one possible implementation, determining the length of the flexible time slice based on the total value of the resources of the target data in the target time period includes the following steps one to five.
The method comprises the steps of firstly, averagely dividing a target time period into a plurality of first time slices.
In a possible implementation manner, a user sets the length of the first time slice in the data monitoring platform, and the electronic device averagely divides the target time slice into a plurality of first time slices based on the length of the first time slice and a time range corresponding to the target time slice.
Illustratively, the length of the first time slice set in the data monitoring platform by the user is 5 minutes, and the time range corresponding to the target time period is 21:00 at 8/10/2020 and 22:00 at 10/8/2020. The target time period is equally divided into 12 first time slices based on their corresponding time ranges and the length of the first time slices.
In one possible implementation, after dividing the target time period into a plurality of first time slices, the data format of the target time period is converted into a time slice format, for example [05,10,15,20,25,30,35,40,45,50,55,60], where 05 is used to indicate a time slice corresponding to 21:00-21:05, 10 is used to indicate a time slice corresponding to 21:05-21:10, and 60 is used to indicate a time slice corresponding to 21:55-22: 00. Converting the data format of the target time period into the time slice form can make the user clearly know how many first time slices the target time period is divided into.
And step two, acquiring resource values of a plurality of first time slices.
In a possible implementation manner, since the resource value per minute is stored in the storage space of the electronic device, after dividing the target time period into a plurality of first time slices, the electronic device further obtains the resource value of each first time slice. I.e., the data gain per time slice.
Illustratively, the target time period is averagely divided into 12 first time slices, and the resource value of the time slice corresponding to 21:00-21:05 is 30, namely the resource value of the 1 st first time slice is 30; the resource value of the time slice corresponding to 21:05-21:10 is 0, namely the resource value of the 2 nd first time slice is 0; the resource value of the time slice corresponding to 21:10-21:15 is 20, that is, the resource value of the 3 rd first time slice is 20 … … 21:55-22:00, and the resource value of the time slice corresponding to 20 … …:55-22:00 is 50, that is, the resource value of the 12 th first time slice is 50.
And step three, determining the number of the first time slices with the continuous resource value of zero according to the resource values of the first time slices.
In a possible implementation manner, the electronic device determines whether a first time slice with a resource value of zero exists according to the resource value of each first time slice acquired in the step two; in response to there being a first time slice with a resource value of zero, determining whether there is a first time slice with a consecutive resource value of zero; in response to there being a first time slice with a consecutive resource value of zero, determining a number of the first time slices with a consecutive resource value of zero. For example, there are 5 first time slices for which the resource value is zero, and the 5 first time slices are consecutive first time slices, and thus the number of first time slices for which consecutive resource values are zero is determined to be 5.
And step four, determining the number of the first time slices reaching the reference resource value according to the length of the first time slices.
In one possible implementation, the number b of first time slices reaching the reference resource value is determined according to the following formula (1) according to the length of the first time slice:
the lostdata is a reference resource value, the houravig is an average resource value of a reference time period, the continueCount is the number of alarms triggered in a continuous time period, and the time is the length of the first time period.
It should be noted that the reference resource value is an arbitrary value, the average resource value in the reference time period is an average resource value per hour, and the value of the number of times of triggering the alarm in the continuous time period is set by the user and is generally 1.
For example, the reference resource value is 80, the average resource value of the reference time period is 240, the number of triggered alarms in the continuous time period is 1, the length of the first time slice is 5, and the number of the first time slices is calculated according to the formula (1)That is, 4 first time slices are required to reach the reference resource value of 80 bins.
In a possible implementation manner, the number of time slices reaching the reference resource value is further adjusted according to the time type of the target time period, for example, the number of time slices reaching the reference resource value after the adjustment is 8. Since the adjustment process for the number of time slices reaching the reference resource value has a large content, the adjustment process for the number of time slices reaching the reference resource value will be described in the following first embodiment.
And step five, determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero and the number of the first time slices reaching the reference resource value.
In one possible implementation, the length of the elastic time slice is determined according to steps 1 to 3 described below.
Step 1, calculating the first time length according to the length of the first time slice and the number of the first time slices with the continuous resource value being zero.
And taking the product of the length of the first time slice and the number of the first time slices with the continuous resource value of zero as the first time length.
Illustratively, the length of the first time slice is 5 minutes, the number of the first time slices with the continuous resource value of zero is 5, and the first time length is 5 × 5 — 25 minutes.
And 2, calculating a second time length according to the length of the first time slice and the number of the first time slices reaching the reference resource value.
And taking the product of the length of the first time slice and the number of the first time slices reaching the reference resource value as a second time length.
Illustratively, the length of the first time slice is 5 minutes, the number of the first time slices reaching the reference resource value is 4, and the second time length is 5 × 4 — 20 minutes.
It should be noted that, in response to the target time period being a holiday time period or a low peak time period, the product of the length of the first time slice and the number of the first time slices reaching the reference resource value after adjustment is taken as the second time length.
Illustratively, the length of the first time slice is 5 minutes, the number of the first time slices reaching the reference resource value after the adjustment is 8, and the second time length is 5 × 8 — 40 minutes.
And 3, determining the time length meeting the target requirement in the first time length and the second time length as the length of the elastic time slice.
And determining the maximum time length of the first time length and the second time length as the length of the elastic time slice.
Illustratively, the length of the elastic time slice is determined to be 25 minutes according to the first time length and the second time length in response to the target time period being neither the low peak time period nor the holiday time period.
For another example, in response to the target time period being a low peak time period or a holiday time being short, the length of the elastic time piece is determined to be 40 minutes from the first time length and the second time length.
In step 202, a total resource value of the target data in a current time period is obtained, and the length of the current time period is determined based on the length of the elastic time slice.
In a possible implementation manner, the current time period is determined based on the length of the elastic time slice determined in step 201 and the time value corresponding to the current time. And extracting the total resource value of the current time period from the storage space of the electronic equipment.
Illustratively, the time value corresponding to the current time is 10:00 on 11/8/40 min, and the current time period is 09:20-10:00 according to the time value corresponding to the current time and the length of the elastic time slice. The current time period includes a length of time that coincides with the length of the flexible time slice. The total resource value of the current time period extracted from the storage space of the electronic device is 100.
In step 203, it is determined whether the target data triggers an alarm policy in the current time period according to the total resource value in the current time period.
In a possible implementation manner, determining whether the target data triggers the alarm policy in the current time period according to the total resource value in the current time period includes the following steps 2031 to 2033.
Step 2031, obtaining the total resource value of the target data in a plurality of first time periods, where the first time period is a time period in the historical time period that is consistent with the start-stop time of the current time period.
The first time period is the same as and before the start-stop time of the current time period, which is 09:20 and 10:00, respectively. The electronic device determines that the start-stop time of the first time period is also 09:20 and 10: 00. According to the starting and ending time, the electronic equipment determines a plurality of first time periods in the storage space of the electronic equipment, and acquires the total resource value of the target data in the first historical time period.
For example, the electronic device acquires the total resource value of the target data in 5 first time periods, wherein the first time period is 09:20-10:00 in 8 months and 10 days, and the total resource value is 50; the second first time period is 09:20-10:00 at 9 days of 8 months, the total resource value is 100, the third first time period is 09:20-10:00 at 8 days of 8 months, the total resource value is 150, the fourth first time period is 09:20-10:00 at 7 days of 8 months, the total resource value is 200, the fifth first time period is 09:20-10:00 at 6 days of 8 months, and the total resource value is 60.
The above description only takes the total resource value of the target data acquired by the electronic device in five first time periods as an example, and is not used to limit the number of the total resource values of the target data acquired by the electronic device in the first time periods. The more the number of the total resource values of the target data in the first time period acquired by the electronic device is, the more beneficial the subsequent determination of whether the alarm policy is triggered by the target data in the current time period is, that is, the more the number of the total resource values of the target data in the first time period acquired by the electronic device is, the more accurate the determination of whether the alarm policy is triggered by the subsequent target data in the current time period is.
Step 2032, a total resource value of the target data in a second time period is obtained, where the second time period is a time period that is on the same day as, adjacent to and before the current time period.
Illustratively, if the current time period is 09:20-10:00 on 8/11/2020, then the second time period is 08:40-09:20 on 8/11/2020, and the total resource value of the second time period is 80.
Step 2033, determining whether the target data triggers an alarm policy in the current time period according to at least one of the total resource value in the current time period, the total resource values in the plurality of first time periods, and the total resource value in the second time period.
In one possible implementation, there are three implementations described below for determining whether the target data triggers an alarm policy in the current time period.
In the first implementation mode, in response to the existence of a time period with a resource value of zero in the current time period and the number of time slices with continuous resource values of zero being greater than the number of reference time slices, the target data is determined to trigger an alarm strategy in the current time period.
In this first implementation, it is required to determine whether there is a time slice with a resource value of zero in the current time period, where the determination process is as follows:
the current time period is equally divided into a plurality of second time slices according to the length of the second time slices set by the user, and the length of the second time slices may be consistent with the length of the first time slices or may not be consistent with the length of the first time slices, which is not limited in the embodiment of the present application. And acquiring the resource values of a plurality of second time slices of the current time period. And determining whether a second time slice with the resource value of zero exists in the plurality of second time slices according to the resource values of the plurality of second time slices.
In one possible implementation manner, in response to that there is a second time slice in which the resource value is zero in the current time period and there is a second time slice in which the continuous resource value is zero, the number of the second time slices in which the continuous resource value is zero is determined. And determining the total resource value hair washing and caring alarm strategy in the current time period in response to the fact that the number of the second time slices with the continuous resource value of zero is larger than the number of the target time slices.
Exemplarily, if the number of second time slices with the continuous resource value of zero in the current time period is 5 and the number of target time slices is 4, it is determined that the target data triggers the alarm policy in the current time period.
And determining a dynamic amplitude value of the current time period according to the total resource value of the current time period and the total resource value of the second time period, and determining that the target data triggers an alarm strategy in the current time period in response to the fact that the dynamic amplitude value of the current time period is smaller than the target dynamic amplitude value.
In this second implementation, the dynamic amplitude value Z of the current time period is calculated based on the following formula (2):
in the above formula (2), Y is the total resource value of the current time period, and Y is0Is the second timeTotal value of resources for a segment.
Illustratively, the total resource value of the current time period is 100, the total resource value of the second time period is 90, and the dynamic amplitude value of the current time period is calculated asThe target dynamic amplitude value is 50%, and the dynamic amplitude value of the current time period is smaller than the target dynamic amplitude value, so that the target data is determined to trigger an alarm strategy in the current time period.
And determining whether the target data triggers an alarm strategy in the current time period according to the total resource value of the current time period, the total resource values of the plurality of first time periods and the total resource value of the second time period.
In the third implementation manner, a plurality of target values are calculated according to the total resource value of the current time and the total resource value of the second time period, where the plurality of target values are the total resource value, the dynamic amplitude value, and the ring ratio threshold of the current time period. Calculating a plurality of reference values according to the total resource values of the plurality of first time periods, wherein the plurality of reference values are the minimum value, the dynamic amplitude value and the ring ratio threshold value of the total resource values of the plurality of first time periods; and determining that the target data triggers the alarm strategy in the current time period in response to the target values having target number smaller than the corresponding reference value. Since the calculation processes of the plurality of reference values and the calculation processes of the plurality of target values are more detailed, for convenience of reading, the calculation processes of the plurality of reference values and the calculation processes of the plurality of target values will be described in the following second embodiment.
Exemplarily, the number of the targets is 2, the dynamic amplitude value of the total resource value of the current time period is smaller than the dynamic amplitude values of the total resource values of the plurality of first time periods, and the ring ratio threshold of the total resource value of the current time period is smaller than the ring ratio threshold of the total resource values of the plurality of first time periods, so that it is determined that the target data triggers the alarm policy in the current time period.
It should be noted that the value of the target number may be any value, and this is not limited in the embodiment of the present application.
In step 204, an alarm message is sent to the data delivery platform in response to the target data triggering the alarm policy in the current time period.
In a possible implementation manner, based on the determination result obtained in step 203, when it is determined that the target data triggers the alarm policy in the current time period, an alarm message is immediately sent to the data delivery platform, so that the data delivery platform immediately grasps the data delivery condition. Illustratively, the format of the warning message is "the total resource value of the target data in the current time period is abnormal".
In a possible implementation manner, in order to make the false alarm rate of the sent alarm message lower, retry times can be obtained according to the data type of the target data, and the alarm message is sent to the data delivery platform in response to the fact that the target data still triggers the alarm policy in the retry times. The data type of the target data is high-consumption data or low-consumption data, the target data, the data type of the target data and the retry times of the target data are stored in the electronic device, and the data type of the target data and the retry times of the target data can be determined by the electronic device only according to the target data number.
Illustratively, the target data is high-consumption data, the corresponding retry number is 1, a total resource value (a total resource value of 10:00-10: 40) of a time period after the current time period is obtained, whether the target data triggers an alarm policy within 10:00-10:40 is determined, and if the target data triggers the alarm policy, an alarm message is sent to the data delivery platform. Wherein, the determination process of whether the target data triggers the alarm policy within 10:00-10:40 is consistent with the process of whether the target data triggers the alarm policy within the current time period, and is not described herein again.
According to the method, the length of the elastic time slice which accords with the actual condition of the target data is determined according to the total resource value of the target data in the target time slice, and the length of the current time slice is determined according to the length of the elastic time slice, so that the determination of the length of the current time slice is more flexible. The data in the current time period is monitored according to the total resource value in the current time period, the actual situation of the target data in the current time period can be reflected better, the matching degree of the monitoring result and the target data is higher, the efficiency and the accuracy of data monitoring are improved, and the false alarm rate of the sent alarm message is reduced when whether the alarm message is sent or not is determined according to the monitoring result.
Further, in order to make the data monitoring more accurate, retry times can be set according to the data type of the target data, and in response to that the target data still triggers an alarm policy in the retry times, an alarm message is sent, so that the false alarm rate of sending the alarm message is lower.
In the first embodiment, the number of the first time slices reaching the reference resource value is adjusted according to the time type corresponding to the target time slice in step 201, which includes but is not limited to the following two ways.
In the first mode, the number of the first time slices reaching the reference resource value is adjusted in response to the target time slice being the low peak time slice.
In one possible implementation, the electronic device defaults to a peak period of 09:00-20:00 per day, with the remainder being a low peak period.
And responding to the target time period being the low peak time period, and adjusting the number of the first time slices reaching the reference resource value according to the following steps 1 to 2.
Step 1, responding to the target time period being the low peak time period, and calculating a peak coefficient based on the resource value of the target time period and the average resource value of the high peak time period.
Illustratively, the target time period is a low peak time period, the total resource value of the target time period is 100, the average resource value of the high peak time period is 200, and the peak coefficient is calculated as:
and 2, adjusting the number of the first time slices reaching the reference resource value based on the peak value coefficient to obtain the number of the first time slices reaching the reference resource value after adjustment.
Illustratively, the first time slice of reaching the reference resource valueThe number is 4, and the number of the first time slices reaching the reference resource value after the adjustment is calculated based on the peak value coefficientI.e. the number of first time slices to reach the reference resource value after the adjustment is 8.
And secondly, responding to the situation that the target time period is a holiday time period, and adjusting the number of the first time slices reaching the reference resource value.
In a possible implementation manner, the data monitoring platform may invoke a calendar module in the electronic device, so that it can be known which time periods belong to the holiday time periods and which time periods do not belong to the holiday time periods.
In one possible implementation, in response to the target time period being a holiday time period, the number of first time slices reaching the reference resource value is adjusted according to the following steps 1 to 2.
Step 1, responding to the fact that the target time period is a holiday time period, and calculating a holiday coefficient based on the resource value of the target time period and the resource value of a non-holiday and same time period.
Illustratively, the target time period is a holiday time period, the total resource value of the target time period is 100, the average resource value of the non-holiday and same time period is 200, and the holiday coefficient is calculated as:
and 2, adjusting the number of the first time slices reaching the reference resource value based on the holiday coefficient to obtain the number of the first time slices reaching the reference resource value after adjustment.
Illustratively, the number of first time slices to reach the reference resource value is 4, and the number of first time slices to reach the reference resource value after the adjustment is calculated based on the holiday coefficientI.e. the number of first time slices to reach the reference resource value after the adjustmentThe number is 8.
The second embodiment will be described with respect to the calculation processes of the plurality of reference values and the plurality of target values in step 203, in a first step and a second step, wherein the first step is a calculation process of the plurality of reference values, and the second step is a calculation process of the plurality of target values.
The method comprises a first step of calculating a plurality of reference values according to the resource total values of the plurality of first time periods, wherein the reference values comprise dynamic amplitude values, minimum values and an annular ratio threshold value of the resource total values of the plurality of first time periods.
The calculation process of the dynamic amplitude values of the total resource values of the plurality of first time periods is as follows:
in a possible implementation manner, when calculating the dynamic amplitude values of the plurality of first time periods, it is required to obtain a total resource value of a time period which is adjacent to and before the plurality of first time periods on the same day as the first time period, that is, a time period 08:40-09:20 in the historical time period, and calculate the dynamic amplitude values Z of the plurality of first time periods according to the following formula (3).
In the above formula (3), Z1Is the dynamic amplitude value of the first time segment, Z2Is the dynamic amplitude value of the second first time segment, Z3Is the dynamic amplitude value of the third first time period, ZNIs the dynamic amplitude value of the Nth first time period, and N is the number of the first time periods. Wherein Z1To ZNThe determination process of (a) is consistent with the determination process of the dynamic amplitude value of the current time period, and is not described herein again.
Illustratively, the dynamic amplitude value of the first time period is 25%, the dynamic amplitude value of the second first time period is 20%, the dynamic amplitude value of the third first time period is 10%, the dynamic amplitude value of the fourth first time period is 5%, and the dynamic amplitude value of the fifth first time period is 10%Calculating dynamic amplitude values of a plurality of first time periods according to the above formula (3) as
The minimum value of the total resource values for the first time periods is determined in two ways:
in the first mode, according to the total resource values of the plurality of first time periods, the total resource value with the minimum value in the plurality of total resource values is directly determined as the minimum value.
For example, the minimum value of the total resource values of the five first time periods illustrated in this step is 50, that is, the minimum value of the total resource values of the plurality of first time periods is 50.
And determining the weighted average value, the minimum value and the maximum value of the plurality of resource total values according to the resource total values of the plurality of first time periods, and determining the minimum value of the resource total values of the plurality of first time periods based on the weighted average value, the maximum value and the minimum value.
In one possible implementation, a weighted average S of the total value of the resource for a plurality of historical time periods is calculated based on the following equation (4):
in the formula (4), a is a weight parameter of the first time period, and a is a total resource value of the first time period; b is a weight parameter of a second first time period, and B is a total resource value of the second first time period; c is a weight parameter of the third first time period, and C is a total resource value of the third first time period; d is a weight parameter of a fourth first time period, and D is a total resource value of the fourth first time period; x is the weight parameter of the Xth first time period, and X is the total resource value of the fifth first time period.
Exemplarily, taking the total resource values of the five first time periods acquired in step 203 as an example, the weight parameter of the first time period is 5, the weight parameter of the second first time period is 4, and the third first time isThe weight parameter of the time segment is 3, the weight parameter of the fourth first time segment is 2, the weight parameter of the fifth first time segment is 1, for example, the weighted average of the total resource value of the plurality of first time segments is calculated as
It should be noted that, the above-mentioned calculation process of the weighted average is only provided for the embodiment of the present application, where the weight parameter of each first time period is set by a user or adjusted according to an actual data type, and the embodiment of the present application does not limit the weight parameter of the first time period.
Determining the maximum value and the minimum value in the total resource values of the first time periods, calculating a first ratio between the minimum value and the weighted average value, calculating a second ratio between the weighted average value and the maximum value, determining the ratio with a larger value in the first ratio and the second ratio as a target ratio, and multiplying the target ratio and the minimum value to obtain the minimum value of the total resource values of the first time periods.
Illustratively, the maximum value of the plurality of first time periods is 200, the minimum value is 50, the weighted average value is 107, and the first ratio is calculated asCalculating a second ratio ofThe target ratio is determined to be 0.535 in the first ratio and the second ratio, and the target ratio is multiplied by the minimum value to obtain 0.535 × 50 — 26.75, that is, the minimum value corresponding to the total resource value of the plurality of first time segments is 26.75.
It should be noted that any one of the above manners may be selected to determine the minimum value of the total resource values of the plurality of first time periods, which is not limited in the embodiment of the present application.
The calculation process of the ring ratio threshold of the total resource value of the plurality of first time periods is as follows:
the ring ratio threshold H of the total value of resources for a plurality of first time periods is calculated according to the following equations (5) and (6).
In the above formula (5), P1Is a threshold value, P, between the total value of the resources of the first time period and the total value of the resources of the second first time period2Is a threshold value between the total value of the resources of the second first time period and the total value of the resources of the third first time period, PMAnd M is a threshold value between the total resource value of the last-but-one first time period and the total resource value of the last-but-one first time period, and M is the number of the threshold values. The meaning of the letter in the formula (6) is identical to that of the letter in the above formula (4), and will not be described herein.
Illustratively, according to the total resource values of the plurality of first time periods acquired in step 203 and the above formula (6), the threshold between the total resource value of the first time period and the total resource value of the second first time period is calculated to be 100%, the threshold between the total resource value of the second first time period and the total resource value of the third first time period is calculated to be 67%, the threshold between the total resource value of the third first time period and the total resource value of the fourth first time period is calculated to be 25%, and the threshold between the total resource value of the fourth first time period and the total resource value of the fifth first time period is calculated to be 230%. From the above four thresholds and the above equation (5), the ring ratio threshold for the plurality of first time periods is calculated to be 59%.
According to the above calculation process, the dynamic amplitude value of the total resource values of the plurality of first time periods is 14%, the minimum value of the total resource values of the plurality of first time periods is 50, and the ring ratio threshold of the total resource values of the plurality of first time periods is 59%.
And a second step of calculating a plurality of target values according to the total resource value of the current time period and the total resource value of the second time period, wherein the target values comprise the dynamic amplitude value, the minimum value and the ring ratio threshold value of the total resource value of the current time period.
In a possible implementation manner, the calculation process of the dynamic amplitude value of the total resource value in the current time period is consistent with the calculation process of the dynamic amplitude value in the second implementation manner, and is not described herein again.
The total resource value of the current time period is determined as the minimum value of the total resource value of the current time period, that is, the minimum value of the total resource value of the current time period is 100. The calculation process of the ring ratio threshold value of the current time period is as follows:
and taking the ratio of the difference value of the total resource value of the current time period and the total resource value of yesterday time period to the total resource value of yesterday time period as the ring ratio threshold of the current time period.
Illustratively, the total resource value of the current time period is 100, the total resource value of yesterday and the same time period is 80, and the ring ratio threshold of the current time period is
Through the calculation process, the dynamic amplitude value of the total resource value in the current time period is 11.1%, the minimum value is 100, and the ring ratio threshold value is 25%.
Fig. 3 is an architecture diagram of a data monitoring platform according to an embodiment of the present application, where the data monitoring platform includes a service line module, a task scheduling module, an alarm policy module, and a basic capability module.
The service line module stores various services, namely, stores various delivery data including but not limited to marriage delivery data, entertainment delivery data, parent-child delivery data, beauty delivery data, education delivery data and home decoration delivery data. The user may randomly determine one of the plurality of delivery data as the target data.
The task scheduling module is used for calling the alarm strategy module, and the task scheduling module comprises but is not limited to a unified scheduling module and an algorithm executor. And starting the alarm strategy module in response to the task scheduling module being called.
The alarm strategy module includes but is not limited to a continuous zero strategy, a combination strategy, a high consumption strategy and a low consumption strategy. The alarm strategy determines whether the target data triggers the alarm strategy in the current time period based on the basic capability module.
The basic capability module includes, but is not limited to, an elastic time slice, an algorithm factor, an algorithm library, retry times, and an operator, where the elastic time slice module is configured to determine a length of the elastic time slice, and determine the length of the elastic time slice based on a reference resource value, the number of consecutive zero time slices, a time slice length, a peak coefficient, and a holiday coefficient, and the process is consistent with the process in step 201, and is not described herein again. The algorithm factors comprise a minimum value, a dynamic amplitude value and a ring ratio threshold value, the minimum value is determined according to a minimum value algorithm in an algorithm library, the dynamic amplitude value is determined by an amplitude value algorithm, and the ring ratio threshold value is determined by a ring ratio algorithm. This process is identical to the determination process in step 203, and will not be described herein. The retry number may be determined based on a data type of the target data, and when the target data is high consumption data, the retry number of the high consumption data is determined, and when the target data is low consumption data, the retry number of the low consumption data is determined. The operation terminal is used for playing online data (putting data), the user inputs configuration values such as a target dynamic amplitude value, the number of reference time slices of a time slice with a continuous value of zero and the like in the operation terminal, and the user can modify the configuration values in the operation terminal. Of course, the operation end may also display the monitoring result of the data monitoring, that is, whether the target data triggers the alarm policy.
Fig. 4 is a schematic structural diagram of a data monitoring apparatus according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes:
a first determining module 401, configured to determine a length of an elastic time slice based on a total resource value of the target data in the target time period;
an obtaining module 402, configured to obtain a total resource value of the target data in a current time period, where a length of the current time period is determined based on a length of the elastic time slice;
a second determining module 403, configured to determine, according to the total resource value of the current time period, whether the target data triggers an alarm policy in the current time period;
a sending module 404, configured to send an alarm message to the data delivery platform in response to the target data triggering the alarm policy in the current time period.
In a possible implementation manner, the first determining module 401 is configured to averagely divide the target time period into a plurality of first time slices; acquiring resource values of the plurality of first time slices; determining the number of first time slices with continuous resource values of zero according to the resource values of the first time slices; determining the number of the first time slices reaching the reference resource value according to the length of the first time slices; and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value being zero and the number of the first time slices reaching the reference resource value.
In a possible implementation manner, the first determining module 401 is configured to calculate a first time length according to the length of the first time slice and the number of the first time slices in which the continuous resource value is zero; calculating a second time length according to the length of the first time slice and the number of the first time slices reaching the reference resource value; and determining the time length meeting the target requirement in the first time length and the second time length as the length of the elastic time slice.
In a possible implementation manner, the first determining module 401 is configured to determine, according to the length of the first time slice, the number b of the first time slices reaching the reference resource value according to the following formula:
wherein the lostdata is the reference resource value, the houravig is the average resource value of the reference time period, the continueCount is the number of alarms triggered in the continuous time period, and the time is the length of the first time slice.
In one possible implementation, the apparatus further includes:
the adjusting module is used for responding to the target time period as a low peak time period, and calculating a peak coefficient based on the resource value of the target time period and the average resource value of the high peak time period; based on the peak value coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment; or, in response to the target time period being a holiday time period, calculating a holiday coefficient based on the resource value of the target time period and the resource value of a non-holiday and same time period; based on the holiday coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
the first determining module 401 is configured to determine the length of the flexible time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero, and the number of the first time slices reaching the reference resource value after the adjustment.
In a possible implementation manner, the second determining module 403 is configured to obtain a total resource value of the target data in a plurality of first time periods, where the first time period is a time period in a historical time period that is consistent with a start-stop time of the current time period; acquiring a total resource value of the target data in a second time period, wherein the second time period is a time period which is on the same day as the current time period, is adjacent to the current time period and is before the current time period; and determining whether the target data triggers an alarm strategy in the current time period according to at least one of the total resource value of the current time period, the total resource values of the first time periods and the total resource value of the second time period.
In a possible implementation manner, the second determining module 403 is configured to determine, in response to a time slice with a resource value of zero existing in the current time period, the number of time slices with consecutive resource values of zero; and determining that the target data triggers an alarm strategy in the current time period in response to the fact that the number of the time slices with the continuous resource value of zero is larger than the reference time slice number.
In a possible implementation manner, the second determining module 403 is configured to calculate a dynamic amplitude value of the current time period according to the total resource value of the current time period and the total resource value of the second time period; and determining that the target data triggers an alarm strategy in the current time period in response to the dynamic amplitude value of the current time period being smaller than the target dynamic amplitude value.
In a possible implementation manner, the second determining module 403 is configured to calculate a plurality of reference values according to the total resource values of the plurality of first time periods, where the reference values include a dynamic amplitude value, a minimum value, and an annular ratio threshold of the total resource values of the plurality of first time periods; calculating a plurality of target values according to the total resource value of the current time period and the total resource value of the second time period, wherein the target values comprise the dynamic amplitude value, the minimum value and the ring ratio threshold of the total resource value of the current time period; and determining that the target data triggers an alarm strategy in the current time period in response to the target number values being smaller than the corresponding reference number values.
In a possible implementation manner, the second determining module 403 is further configured to divide the current time period into a plurality of second time slices; acquiring resource values of a plurality of second time slices of the current time period; and determining whether a second time slice with the resource value of zero exists in the plurality of second time slices according to the resource values of the plurality of second time slices.
In a possible implementation manner, the sending module 404 is configured to trigger an alarm policy in response to the target data in the current time period, and obtain retry times according to a data type of the target data; and sending an alarm message to the data delivery platform in response to the target data still triggering an alarm strategy in the retry number.
The device determines the length of an elastic time slice which accords with the actual condition of the target data according to the total resource value of the target data in the target time slice, and determines the length of the current time slice according to the length of the elastic time slice, so that the determination of the length of the current time slice is more flexible. The data in the current time period is monitored according to the total resource value in the current time period, the actual situation of the target data in the current time period can be reflected better, the matching degree of the monitoring result and the target data is higher, the efficiency and the accuracy of data monitoring are improved, and the false alarm rate of the sent alarm message is reduced when whether the alarm message is sent or not is determined according to the monitoring result.
It should be noted that: in the data monitoring apparatus provided in the above embodiment, when performing data monitoring, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the data monitoring apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the data monitoring apparatus and the data monitoring method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 500 may be: a smart phone, a tablet computer, an MP3(Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4) player, a notebook computer or a desktop computer. The electronic device 500 may also be referred to by other names as user equipment, portable electronic device, laptop electronic device, desktop electronic device, and so on.
In general, the electronic device 500 includes: one or more processors 501 and one or more memories 502.
The processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 501 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
In some embodiments, the electronic device 500 may further optionally include: a peripheral interface 503 and at least one peripheral. The processor 501, memory 502 and peripheral interface 503 may be connected by a bus or signal lines. Each peripheral may be connected to the peripheral interface 503 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 504, display screen 505, camera 506, audio circuitry 507, positioning components 508, and power supply 509.
The peripheral interface 503 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 501 and the memory 502. In some embodiments, the processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 501, the memory 502, and the peripheral interface 503 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 504 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 504 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 504 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 504 may communicate with other electronic devices via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 504 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 505 is a touch display screen, the display screen 505 also has the ability to capture touch signals on or over the surface of the display screen 505. The touch signal may be input to the processor 501 as a control signal for processing. At this point, the display screen 505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 505 may be one, providing the front panel of the electronic device 500; in other embodiments, the display screens 505 may be at least two, respectively disposed on different surfaces of the electronic device 500 or in a folded design; in still other embodiments, the display 505 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 500. Even more, the display screen 505 can be arranged in a non-rectangular irregular figure, i.e. a shaped screen. The Display screen 505 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
The camera assembly 506 is used to capture images or video. Optionally, camera assembly 506 includes a front camera and a rear camera. Generally, a front camera is disposed on a front panel of an electronic apparatus, and a rear camera is disposed on a rear surface of the electronic apparatus. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 506 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The positioning component 508 is used to locate the current geographic Location of the electronic device 500 for navigation or LBS (Location Based Service). The Positioning component 508 may be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
The power supply 509 is used to power the various components in the electronic device 500. The power source 509 may be alternating current, direct current, disposable or rechargeable. When power supply 509 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 500 also includes one or more sensors 510. The one or more sensors 510 include, but are not limited to: acceleration sensor 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, optical sensor 515, and proximity sensor 516.
The acceleration sensor 511 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the electronic device 500. For example, the acceleration sensor 511 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 501 may control the display screen 505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 511. The acceleration sensor 511 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 512 may detect a body direction and a rotation angle of the electronic device 500, and the gyro sensor 512 may cooperate with the acceleration sensor 511 to acquire a 3D motion of the user on the electronic device 500. The processor 501 may implement the following functions according to the data collected by the gyro sensor 512: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 513 may be disposed on a side bezel of the electronic device 500 and/or underneath the display screen 505. When the pressure sensor 513 is disposed on the side frame of the electronic device 500, the holding signal of the user to the electronic device 500 can be detected, and the processor 501 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513. When the pressure sensor 513 is disposed at the lower layer of the display screen 505, the processor 501 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 505. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 514 is used for collecting a fingerprint of the user, and the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint.
Those skilled in the art will appreciate that the configuration shown in fig. 5 is not intended to be limiting of the electronic device 500 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
Fig. 6 is a schematic structural diagram of a server according to an embodiment of the present application. The server 600 may generate a large difference due to different configurations or performances, and may include one or more processors (CPUs) 601 and one or more memories 602, where at least one instruction is stored in the one or more memories 602, and is loaded and executed by the one or more processors 601 to implement the data monitoring method provided by the foregoing method embodiments. Of course, the server 600 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 600 may also include other components for implementing the functions of the device, which is not described herein again.
In an exemplary embodiment, there is also provided a computer readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor of a computer device to implement any of the above-mentioned data monitoring methods.
In an exemplary embodiment, a computer program or a computer program product is also provided, in which computer instructions are stored, which are loaded and executed by a processor to implement any of the above-mentioned data monitoring methods.
Alternatively, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (15)
1. A method for monitoring data, the method comprising:
determining the length of the elastic time slice based on the total resource value of the target data in the target time slice;
acquiring a total resource value of the target data in a current time period, wherein the length of the current time period is determined based on the length of the elastic time slice;
determining whether the target data triggers an alarm strategy in the current time period according to the total resource value of the current time period;
and responding to the target data to trigger an alarm strategy in the current time period, and sending an alarm message to a data delivery platform.
2. The method of claim 1, wherein determining the length of the flexible time slice based on the total value of the resources of the target data over the target time period comprises:
equally dividing the target time period into a plurality of first time slices;
acquiring resource values of the plurality of first time slices;
determining the number of first time slices with continuous resource values of zero according to the resource values of the first time slices;
determining the number of the first time slices reaching the reference resource value according to the length of the first time slices;
and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource values being zero and the number of the first time slices reaching the reference resource values.
3. The method of claim 2, wherein determining the length of the flexible time slice according to the length of the first time slice, the number of first time slices with the consecutive resource value of zero, and the number of first time slices with the reference resource value comprises:
calculating a first time length according to the length of the first time slice and the number of the first time slices with the continuous resource value being zero;
calculating a second time length according to the length of the first time slice and the number of the first time slices reaching the reference resource value;
and determining the time length meeting the target requirement in the first time length and the second time length as the length of the elastic time slice.
4. The method of claim 2, wherein determining the number of first time slices reaching the reference resource value according to the length of the first time slice comprises:
determining the number b of the first time slices reaching the reference resource value according to the following formula according to the length of the first time slices:
the lostdata is the reference resource value, the houravig is the average resource value of the reference time period, the continueCount is the number of alarms triggered in the continuous time period, and the time is the length of the first time slice.
5. The method of claim 2, wherein after determining the number of first time slices reaching the reference resource value according to the length of the first time slice, the method further comprises:
in response to the target time period being a low peak time period, calculating a peak coefficient based on the resource value of the target time period and the average resource value of the high peak time period; based on the peak value coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
or, in response to the target time period being a holiday time period, calculating a holiday coefficient based on the resource value of the target time period and the resource value of a non-holiday and same time period; based on the holiday coefficient, adjusting the number of the first time slices reaching the reference resource value to obtain the number of the first time slices reaching the reference resource value after adjustment;
determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero and the number of the first time slices reaching the reference resource value, including:
and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource value of zero and the number of the first time slices reaching the reference resource value after adjustment.
6. The method of claim 1, wherein the determining whether the target data triggers an alarm policy in the current time period according to the total resource value in the current time period comprises:
acquiring total resource values of the target data in a plurality of first time periods, wherein the first time periods are time periods which are consistent with the starting time and the ending time of the current time period in historical time periods;
acquiring a total resource value of the target data in a second time period, wherein the second time period is a time period which is on the same day as the current time period, is adjacent to the current time period and is before the current time period;
and determining whether the target data triggers an alarm strategy in the current time period according to at least one of the total resource value of the current time period, the total resource values of the plurality of first time periods and the total resource value of the second time period.
7. The method of claim 6, wherein determining whether the target data triggers an alarm policy in the current time period according to at least one of the total resource value in the current time period, the total resource values in the plurality of first time periods, and the total resource value in the second time period comprises:
responding to the time slices with the resource numerical value of zero in the current time period, and determining the number of the time slices with the continuous resource numerical value of zero;
and determining that the target data triggers an alarm strategy in the current time period in response to the fact that the number of the time slices with the continuous resource numerical value of zero is larger than the reference time slice number.
8. The method of claim 6, wherein determining whether the target data triggers an alarm policy in the current time period according to at least one of the total resource value in the current time period, the total resource values in the plurality of first time periods, and the total resource value in the second time period comprises:
calculating a dynamic amplitude value of the current time period according to the total resource value of the current time period and the total resource value of the second time period;
and determining that the target data triggers an alarm strategy in the current time period in response to the dynamic amplitude value of the current time period being smaller than a target dynamic amplitude value.
9. The method of claim 6, wherein determining whether the target data triggers an alarm policy in the current time period according to at least one of the total resource value in the current time period, the total resource values in the plurality of first time periods, and the total resource value in the second time period comprises:
calculating a plurality of reference values according to the total resource values of the plurality of first time periods, wherein the reference values comprise dynamic amplitude values, minimum values and ring ratio thresholds of the total resource values of the plurality of first time periods;
calculating a plurality of target values according to the total resource value of the current time period and the total resource value of the second time period, wherein the target values comprise a dynamic amplitude value, a minimum value and an annular ratio threshold of the total resource value of the current time period;
and determining that the target data triggers an alarm strategy in the current time period in response to that a target number of the target values is smaller than a corresponding reference value.
10. The method of claim 7, wherein before determining the number of time slices with zero resource value in response to the time slice with zero resource value in the current time period, the method further comprises:
equally dividing the current time period into a plurality of second time slices;
acquiring resource numerical values of a plurality of second time slices of the current time period;
and determining whether a second time slice with the resource value being zero exists in the plurality of second time slices according to the resource values of the plurality of second time slices.
11. The method according to any one of claims 1-10, wherein said sending an alert message to a data delivery platform in response to said target data triggering an alert policy for said current time period comprises:
responding to the target data to trigger an alarm strategy in the current time period, and acquiring retry times according to the data type of the target data;
and responding to the target data still triggering an alarm strategy in the retry times, and sending an alarm message to the data delivery platform.
12. A data monitoring apparatus, the apparatus comprising:
the first determining module is used for determining the length of the elastic time slice based on the total resource value of the target data in the target time slice;
the acquisition module is used for acquiring a total resource value of the target data in a current time period, wherein the length of the current time period is determined based on the length of the elastic time slice;
the second determining module is used for determining whether the target data triggers an alarm strategy in the current time period according to the total resource value of the current time period;
and the sending module is used for responding to the alarm strategy triggered by the target data in the current time period and sending an alarm message to the data delivery platform.
13. The apparatus of claim 12, wherein the first determining module is configured to divide the target time period into a plurality of first time slices on average; acquiring resource values of the plurality of first time slices; determining the number of first time slices with continuous resource values of zero according to the resource values of the first time slices; determining the number of the first time slices reaching the reference resource value according to the length of the first time slices; and determining the length of the elastic time slice according to the length of the first time slice, the number of the first time slices with the continuous resource values being zero and the number of the first time slices reaching the reference resource values.
14. An electronic device, comprising a processor and a memory, wherein at least one program code is stored in the memory, and wherein the at least one program code is loaded and executed by the processor to implement the data monitoring method according to any one of claims 1 to 11.
15. A computer-readable storage medium having stored therein at least one program code, the at least one program code being loaded and executed by a processor, for implementing a data monitoring method according to any one of claims 1 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011069432.XA CN112242927A (en) | 2020-09-30 | 2020-09-30 | Data monitoring method, device, server and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011069432.XA CN112242927A (en) | 2020-09-30 | 2020-09-30 | Data monitoring method, device, server and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112242927A true CN112242927A (en) | 2021-01-19 |
Family
ID=74168595
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011069432.XA Withdrawn CN112242927A (en) | 2020-09-30 | 2020-09-30 | Data monitoring method, device, server and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112242927A (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120229473A1 (en) * | 2007-07-17 | 2012-09-13 | Airgini Group, Inc. | Dynamic Animation in a Mobile Device |
WO2017043781A1 (en) * | 2015-09-07 | 2017-03-16 | 에스케이플래닛 주식회사 | Method for providing advertisement, and apparatus applicable thereto |
CN107527244A (en) * | 2017-08-30 | 2017-12-29 | 微梦创科网络科技(中国)有限公司 | The autocontrol method and system of advertisement putting flow |
CN109191183A (en) * | 2018-08-10 | 2019-01-11 | 宜人恒业科技发展(北京)有限公司 | A kind of advertisement dispensing dynamic debugging system based on big data |
CN109242521A (en) * | 2017-07-11 | 2019-01-18 | 阿里巴巴集团控股有限公司 | A kind of distribution method and device of predetermined consumption amount |
CN109658137A (en) * | 2018-12-07 | 2019-04-19 | 中国银行股份有限公司 | A kind of bank product advertisement placement method, apparatus and system |
-
2020
- 2020-09-30 CN CN202011069432.XA patent/CN112242927A/en not_active Withdrawn
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120229473A1 (en) * | 2007-07-17 | 2012-09-13 | Airgini Group, Inc. | Dynamic Animation in a Mobile Device |
WO2017043781A1 (en) * | 2015-09-07 | 2017-03-16 | 에스케이플래닛 주식회사 | Method for providing advertisement, and apparatus applicable thereto |
CN109242521A (en) * | 2017-07-11 | 2019-01-18 | 阿里巴巴集团控股有限公司 | A kind of distribution method and device of predetermined consumption amount |
CN107527244A (en) * | 2017-08-30 | 2017-12-29 | 微梦创科网络科技(中国)有限公司 | The autocontrol method and system of advertisement putting flow |
CN109191183A (en) * | 2018-08-10 | 2019-01-11 | 宜人恒业科技发展(北京)有限公司 | A kind of advertisement dispensing dynamic debugging system based on big data |
CN109658137A (en) * | 2018-12-07 | 2019-04-19 | 中国银行股份有限公司 | A kind of bank product advertisement placement method, apparatus and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110262947B (en) | Threshold warning method and device, computer equipment and storage medium | |
CN110674022B (en) | Behavior data acquisition method and device and storage medium | |
CN111324259B (en) | Group creation method, device and storage medium | |
CN110147503B (en) | Information issuing method and device, computer equipment and storage medium | |
CN111062824B (en) | Group member processing method, device, computer equipment and storage medium | |
CN110535890B (en) | File uploading method and device | |
CN112002391A (en) | Method and device for determining checking sequence, electronic equipment and storage medium | |
CN112269559A (en) | Volume adjustment method and device, electronic equipment and storage medium | |
CN112529871B (en) | Method and device for evaluating image and computer storage medium | |
CN111984755B (en) | Method and device for determining target parking spot, electronic equipment and storage medium | |
CN110336881B (en) | Method and device for executing service processing request | |
CN116842047A (en) | Cache updating method, device, equipment and computer readable storage medium | |
CN113935678A (en) | Method, device, equipment and storage medium for determining multiple distribution terminals held by distributor | |
CN112242927A (en) | Data monitoring method, device, server and computer readable storage medium | |
CN113949678A (en) | Flow control method and device, electronic equipment and computer readable storage medium | |
CN112132472A (en) | Resource management method and device, electronic equipment and computer readable storage medium | |
CN111444289A (en) | Incidence relation establishing method | |
CN113064537B (en) | Media resource playing method, device, equipment, medium and product | |
CN112817768B (en) | Animation processing method, device, equipment and computer readable storage medium | |
CN114071119B (en) | Resource testing method and device, electronic equipment and storage medium | |
CN111526221B (en) | Domain name quality determining method, device and storage medium | |
CN115037702B (en) | Message distribution and data transmission methods and equipment | |
CN114115660B (en) | Media resource processing method, device, terminal and storage medium | |
CN111898048B (en) | Data adjustment method and device for display information, electronic equipment and storage medium | |
CN112579661B (en) | Method and device for determining specific target pair, computer equipment and storage medium |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210119 |