Disclosure of Invention
Therefore, it is necessary to provide an alarm method, an alarm device, computer equipment, and a storage medium for solving the problem of data congestion in network management or network element equipment caused by frequent reporting of alarm information in the conventional technology.
In one aspect, an embodiment of the present invention provides an alarm method, including:
acquiring current alarm detection data;
obtaining a current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
In one embodiment, the step of determining whether the current alarm state parameter meets the alarm reporting condition includes:
determining a state stability threshold corresponding to the current alarm level;
and judging whether the current alarm state parameter is equal to a state stability threshold corresponding to the current alarm level.
In one embodiment, the step of determining the current alarm state parameter comprises:
and if the current alarm level is the same as the previous alarm level, determining the current alarm state parameter according to the previous alarm state parameter.
In one embodiment, the step of determining the current alarm state parameter further comprises:
if the current alarm level is different from the previous alarm level, acquiring an initial alarm state parameter corresponding to the current alarm level, and setting the initial alarm state parameter corresponding to the current alarm level as the current alarm state parameter.
In one embodiment, if the current alarm state parameter satisfies the alarm reporting condition, the step of generating and reporting the alarm information includes:
when the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level, comparing the current alarm level with the alarm level contained in the alarm information reported last time;
and if the current alarm level is different from the alarm level contained in the alarm information reported last time, generating and reporting the alarm information.
In one embodiment, the method further comprises the following steps:
when the current alarm level is different from the alarm level contained in the alarm information reported last time, selecting the alarm information meeting the preset condition from the reported alarm information; the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level;
generating and reporting alarm clearing information; the alarm clearing information is used for clearing the alarm information meeting the preset condition.
On the other hand, an embodiment of the present invention further provides an alarm device, including:
the data acquisition module is used for acquiring current alarm detection data;
the alarm level determining module is used for obtaining the current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
a reporting condition judging module for determining the current alarm state parameter and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and the alarm information reporting module is used for generating and reporting alarm information when the current alarm state parameter meets the alarm reporting condition, wherein the alarm information comprises the current alarm level.
In one embodiment, the reporting condition determining module further includes:
the state stability threshold value determining unit is used for acquiring a state stability threshold value corresponding to the current alarm level;
and the judging unit is used for judging whether the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level.
In still another aspect, an embodiment of the present invention further provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the following steps when executing the computer program:
acquiring current alarm detection data;
obtaining a current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
In yet another aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the steps of:
acquiring current alarm detection data;
obtaining a current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
According to the alarming method, the alarming device, the computer equipment and the storage medium, the current alarming level is obtained through the current alarming detection data and the plurality of alarming level thresholds, when the current alarming level is obtained, the alarming information is not directly reported, whether the current alarming state parameter meets the preset alarming reporting condition or not is judged, the alarming information is generated and reported only when the current alarming state parameter meets the alarming reporting condition, the frequent reporting of the alarming information caused by the instantaneous jitter of the alarming detection parameter is avoided, the data congestion in the network management or the network element equipment is prevented from being caused, and the equipment performance is not influenced.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present invention are shown in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
An embodiment of the present invention provides an alarm method, as shown in fig. 1, including:
step S100, acquiring current alarm detection data;
step S200, obtaining the current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
step S400, determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
step S500, if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
The alarm detection data is data that needs to be alarmed in the communication system, and may be some data such as usage rate, overload rate, capacity, and the like. In one embodiment, the alarm detection data is real-time utilization of ground circuit timeslot resources under a single POOL of the GSM gateway.
Specifically, the alarm detection data is collected to obtain the current alarm detection data. And comparing the current alarm detection data with alarm level thresholds corresponding to a plurality of alarm levels, and calculating to obtain the current alarm level corresponding to the current alarm detection data. And determining the current alarm state parameter, wherein the current alarm state parameter can represent the times of continuously obtaining the current alarm level. And if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level. The alarm reporting condition may be a preset condition that different alarm levels are the same. For example, the number of times of continuously obtaining the current alarm level reaches a certain preset number of times. The alarm reporting condition may also be a preset condition preset for each alarm level. For example, for a level 1 alarm, the number of times of continuously obtaining the level 1 alarm reaches 5 times as an alarm reporting condition; for the 2-level alarm, the alarm reporting condition is that the number of times of continuously obtaining the 2-level alarm reaches 3 times. The reporting may be to the network management device, or to the management and control software on the same device.
In the alarm method provided by this embodiment, the current alarm level is obtained through the current alarm detection data and the multiple alarm level thresholds, when the current alarm level is obtained, the alarm information is not reported directly, but whether the current alarm state parameter meets the preset alarm reporting condition is judged, and the alarm information is generated and reported only when the current alarm state parameter meets the alarm reporting condition, so that frequent reporting of the alarm information caused by the transient jitter of the alarm detection parameter is avoided, and data congestion in a network manager or network element device is prevented from causing and the performance of the device is not affected.
In an embodiment, as shown in fig. 2, the step of determining whether the current alarm state parameter meets the alarm reporting condition includes:
step S430, determining a state stability threshold corresponding to the current alarm level;
step S440, determine whether the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level.
Specifically, a state stability threshold is preset for each alarm level. And determining a state stability threshold corresponding to the current alarm level according to the current alarm level. And judging whether the current alarm state parameter is equal to a state stability threshold corresponding to the current alarm level. If the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level, the current alarm state parameter is indicated to meet the alarm reporting condition, the alarm level is continuously stabilized on the current alarm level, and alarm information is generated and reported; if the current alarm state parameter is not equal to the state stability threshold corresponding to the current alarm level, the current alarm state parameter is indicated to not meet the alarm reporting condition, and the steps of generating and reporting alarm information are not performed. When the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level, that is, the alarm level is continuously maintained at the current alarm level, the alarm information is generated and reported, and the reported alarm level is more accurate.
In one embodiment, as shown in FIG. 2, the step of determining the current alarm state parameter includes:
step S410, if the current alarm level is the same as the previous alarm level, determining the current alarm state parameter according to the previous alarm state parameter.
Specifically, when the current alarm level is the same as the previous alarm level, the previous alarm state parameter is obtained, and the current alarm state parameter is determined according to the previous alarm state parameter. In one embodiment, the current alarm state parameter is obtained by adding 1 to the previous alarm state parameter. In another embodiment, the previous alarm state parameter is subtracted by 1 to obtain the current alarm state parameter.
In one embodiment, as shown in fig. 2, the step of determining the current alarm state parameter further comprises:
step S420, if the current alarm level is different from the previous alarm level, obtaining an initial alarm state parameter corresponding to the current alarm level, and setting the initial alarm state parameter corresponding to the current alarm level as the current alarm state parameter.
Specifically, an initial alarm state parameter and a state stability threshold are preset for each alarm level. When the current alarm level is different from the previous alarm level, acquiring an initial alarm state parameter corresponding to the current alarm level, and determining that the value of the current alarm state parameter is equal to the value of the initial alarm state parameter corresponding to the current alarm level.
And if the next alarm level is the same as the current alarm level, obtaining the next alarm state parameter according to the initial alarm state parameter. In one embodiment, the state stability threshold is smaller than the initial alarm state parameter, and the initial state parameter is subtracted by 1 to obtain the next alarm state parameter. In one embodiment, the state stability threshold is greater than the initial alarm state parameter, and 1 is added to the initial state parameter to obtain the next alarm state parameter.
In one embodiment, the difference between the initial alarm state parameter and the state stability threshold set for different alarm levels is different. For increasing alarm levels, the difference is gradually decreased. For example, 3 alarm levels are preset, the difference between the initial alarm state parameter of the level 0 alarm and the state stability threshold is set to be 8, the difference between the initial alarm state parameter of the level 1 alarm and the state stability threshold is set to be 5, and the difference between the initial alarm state parameter of the level 2 alarm and the state stability threshold is set to be 3. And reporting the larger alarm level for less times, so that the priority and timely reporting of the larger alarm level is realized, and the high-risk operation condition of the communication system can be known by operation and maintenance personnel preferentially.
In an embodiment, as shown in fig. 2, if the current alarm state parameter meets the alarm reporting condition, the step of generating and reporting the alarm information further includes:
step S510, when the current alarm state parameter is equal to the state stability threshold value corresponding to the current alarm level, comparing the current alarm level with the alarm level contained in the alarm information reported last time;
step S520, if the current alarm level is different from the alarm level contained in the alarm information reported last time, generating and reporting the alarm information.
Specifically, when the current alarm state parameter is judged to be equal to the state stability threshold corresponding to the current alarm level, the current alarm level is compared with the alarm level contained in the alarm information reported last time. If the current alarm level is different from the alarm level contained in the alarm information reported last time, generating and reporting the alarm information; and if the current alarm level is the same as the alarm level contained in the alarm information reported last time, the generation and the report of the alarm information are not carried out. When the alarm detection parameter is stable, the alarm level and the alarm state parameter can be kept unchanged continuously, so that the repeated reporting of the same alarm level can be prevented, and the burden of an alarm receiving end is reduced.
In one embodiment, as shown in fig. 3, further comprising the steps of:
step S600, when the current alarm level is different from the alarm level contained in the alarm information reported last time, selecting the alarm information meeting the preset condition from the reported alarm information; the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level;
step S700, generating and reporting alarm clearing information; the alarm clearing information is used for clearing the alarm information meeting the preset condition.
Specifically, each time the alarm information is reported, the alarm information is also synchronously stored. And when judging that the current alarm level is different from the alarm level contained in the alarm information reported last time, selecting the alarm information meeting the preset condition from the reported alarm information. The preset condition is that the included alarm level is larger than the current alarm level. And generating and reporting alarm clearing information according to the selected result, and clearing the alarm information which is reported to the network management equipment or the management and control software on the same equipment and meets the preset condition. The method and the device avoid the false alarm of the alarm information caused by the fact that when the management and control software on the network management equipment or the same equipment receives the alarm information containing the current alarm level, the alarm information which is received before and contains the alarm level higher than the current alarm level is also reserved.
In one embodiment, the alarm method operates in a GSM gateway device, and the alarm detection data is real-time utilization rate of ground circuit timeslot resources under a single POOL of the GSM gateway. When the GSM gateway equipment operates and processes GSM signaling service, dynamic allocation is carried out on a plurality of time slots in ground circuit time slot resources, the state of the time slots is refreshed along with the dynamic allocation, and the state is divided into idle state and use state. The GSM gateway device manages the state of all ground circuit resources. The real-time utilization rate of the ground circuit time slot under a single POOL of the GSM gateway is the quotient of the utilization number of the ground circuit time slot under the POOL and the total number of the ground circuit time slots, and reflects the service condition of the ground circuit time slot resources under the POOL.
And presetting a plurality of alarm level thresholds and alarm levels for the real-time utilization rate of the time slot resources of the ground circuit of the GSM gateway. 3 alarm level thresholds are set, 60%, 70% and 80%, respectively. 4 alarm levels are set, namely a 0-level alarm (alarm clear level), a 1-level alarm, a 2-level alarm and a 3-level alarm.
And corresponding to each alarm level, presetting initial alarm state parameters and state stability threshold values. The initial alarm state parameter for the level 0 alarm is set to 105 and the state stability threshold is set to 100. The initial alarm state parameter for the level 1 alarm is set to 205 and the state stability threshold is set to 200. The initial alarm state parameter for the level 2 alarm is set to 305 and the state stability threshold is set to 300. The initial alarm state parameter for the level 3 alarm is set to 405 and the state stability threshold is set to 400.
And periodically and continuously acquiring the real-time utilization rate of ground circuit time slot resources under a single POOL of the GSM gateway and executing an alarm method. And when the timing of the preset time period is finished, acquiring the real-time utilization rate of the ground circuit time slot resources under the single POOL of the current GSM gateway, and sequentially comparing the real-time utilization rate of the ground circuit time slot resources under the single POOL of the current GSM gateway with 3 preset alarm level thresholds to determine the current alarm level. If the real-time utilization rate of the ground circuit time slot resources under a single POOL of the GSM gateway is less than 60%, the current alarm level is alarm clearing; if the real-time utilization rate of the ground circuit time slot resources under a single POOL of the GSM gateway is more than 60% and less than 70%, the current alarm level is a level 1 alarm; if the real-time utilization rate of the ground circuit time slot resources under a single POOL of the GSM gateway is more than 70% and less than 80%, the current alarm level is 2-level alarm; and if the real-time utilization rate of the ground circuit time slot resources under a single POOL of the GSM gateway is more than 80%, the current alarm level is 3-level alarm.
After the current alarm level is obtained, if the current alarm level is different from the alarm level obtained at the end of the previous preset time period, the initial alarm state parameter corresponding to the current alarm level is used as the current alarm state parameter, and the continuity counting of the current alarm level is started. And if the alarm level obtained at the end of the next preset time period is the same as the current alarm level, subtracting 1 from the current alarm state parameter to serve as the next alarm state parameter. By analogy, when the same alarm level is obtained at the 6 th time, the current alarm state parameter is equal to the state stability threshold value of the current alarm level, and the alarm state parameter meets the alarm reporting condition.
When the alarm state parameter meets the alarm reporting condition, comparing whether the current alarm level is the same as the alarm level contained in the alarm information reported last time; if the alarm information is the same, the alarm information containing the same alarm level is not reported repeatedly. If not, on one hand, generating and reporting alarm information, wherein the alarm information comprises the current alarm level; meanwhile, on the other hand, in the reported alarm information, the alarm information meeting the preset condition is selected, and the alarm clearing information is generated and reported according to the selected result, wherein the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level.
The following specifically exemplifies the execution flow of the above-mentioned alarm method. Before the alarm method is executed, the initial alarm level is set to be 0 level alarm, and the alarm state parameter is 0.
And when the timing of the first preset time period is finished, acquiring the real-time utilization rate of ground circuit time slot resources under a single POOL of the GSM gateway, and judging that the current alarm level is 2-level alarm according to a preset alarm level threshold value. The current alarm level is different from the initial alarm level and the current alarm state parameter is set to the initial alarm state parameter 305 for the level 2 alarm. The current alarm state parameter 305 is not equal to the state stability threshold 300 of the level 2 alarm, does not satisfy the alarm reporting condition, does not generate and report the alarm information, and then performs timing of a second preset time period.
And when the timing of the second preset time period is finished, acquiring the real-time utilization rate of the ground circuit time slot resources under a single POOL of the GSM gateway, and judging that the current alarm level is 2-level alarm according to a preset alarm level threshold value. The current alarm level is the same as the alarm level of the first period and is 2-level alarm. Subtracting 1 from the previous alarm state parameter 305 to obtain a current alarm state parameter 304, wherein the current alarm state parameter 304 is not equal to the state stability threshold 300 of the 2-level alarm and does not meet the alarm reporting condition, and then timing a third preset time period.
And the same cycle processing is carried out by analogy, and the current alarm level obtained in each cycle is 2-level alarm. When the timing of the sixth preset time period is finished, the current alarm level is still obtained to be 2-level alarm. And subtracting 1 from the previous alarm state parameter 301 to obtain the current alarm state parameter 300, wherein the current alarm state parameter 300 is equal to the state stability threshold 300 of the 2-level alarm, and the alarm reporting condition is met. At this time, whether the 2-level alarm has been reported in the previous time is judged, and the judgment result is no because the current alarm state parameter is judged to meet the alarm reporting condition for the first time after the alarm method is started and no reported alarm information exists. Generating and reporting alarm information, wherein the alarm level contained in the alarm information is 2-level alarm; and meanwhile, selecting the alarm information meeting the preset condition from the reported alarm information, wherein the selection result is null and no reported alarm clearing information is generated because the reported alarm information does not exist.
And then, according to the method, the preset time period is cycled for timing and alarm judgment, and the level 1 alarm is obtained for 5 times continuously. And then, when the timing of the next period, namely the twelfth preset time period, is ended, the current alarm level is still obtained as the level 1 alarm, the previous alarm state parameter 201 is reduced by 1 to obtain the current alarm state parameter 200, and the current alarm state parameter 200 is equal to the state stability threshold 200 of the level 1 alarm, so that the alarm reporting condition of the alarm state parameter is met. The level of the level 1 alarm is not equal to the level of the level 2 alarm contained in the alarm information reported last time. Generating and reporting alarm information, wherein the alarm level contained in the alarm information is a level 1 alarm; and meanwhile, selecting alarm information with alarm level greater than 1 level alarm from the reported alarm information, obtaining a selection result as alarm information with 2 level alarm, generating and reporting alarm clearing information, wherein the alarm clearing information is used for deleting the selected alarm information with 2 level alarm.
In another embodiment, when a certain alarm level is obtained for the first time, an initial alarm state parameter corresponding to the alarm level is obtained, and the initial alarm state parameter is subtracted by 1 to be used as the current alarm state parameter. And then, continuously obtaining the alarm level for the second time, and subtracting 1 from the previous alarm state parameter to be used as the current alarm state parameter. And so on until the alarm level is obtained for the 5 th time continuously.
It should be noted that the data acquired in each period, the obtained alarm level, the alarm state parameter, the alarm information reported each time and the alarm level included in the alarm information are all stored in an association table. When the data is called later, the data is called from the association table.
It should be understood that although the various steps in the flow charts of fig. 1-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided an alerting device comprising:
the data obtaining module 610 is configured to obtain current alarm detection data.
And an alarm level determining module 620, configured to obtain a current alarm level according to the current alarm detection data and the multiple alarm level thresholds.
A reporting condition determining module 640, configured to determine a current alarm state parameter, and determine whether the current alarm state parameter meets an alarm reporting condition; the current alarm state parameter is used to indicate the number of times the current alarm level is continuously obtained.
And an alarm information reporting module 650, configured to generate and report alarm information when the current alarm state parameter meets an alarm reporting condition, where the alarm information includes a current alarm level.
In an embodiment, the reporting condition determining module 640 further includes:
and the state stability threshold value determining unit is used for determining a state stability threshold value corresponding to the current alarm level.
And the judging unit is used for judging whether the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level.
In one embodiment, the reporting condition determining module 640 includes:
and the first alarm state parameter determining unit is used for determining the current alarm state parameter according to the previous alarm state parameter when the current alarm level is the same as the previous alarm level.
In an embodiment, the reporting condition determining module 640 further includes:
and the second alarm state parameter determining unit is used for acquiring the initial alarm state parameter corresponding to the current alarm level when the current alarm level is different from the previous alarm level, and setting the initial alarm state parameter corresponding to the current alarm level as the current alarm state parameter.
In one embodiment, the alarm information reporting module 650 further includes:
and the first comparison unit is used for comparing the current alarm level with the alarm level contained in the alarm information reported last time when the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level.
And the alarm information reporting unit is used for generating and reporting the alarm information when the current alarm level is different from the alarm level contained in the alarm information reported last time.
In one embodiment, further comprising:
the alarm information selection module is used for selecting alarm information meeting preset conditions from the reported alarm information when the current alarm level is different from the alarm level contained in the alarm information reported last time; the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level.
The alarm clearing information reporting module is used for generating and reporting alarm clearing information; the alarm clearing information is used for clearing the alarm information meeting the preset condition.
For the specific definition of the warning device, reference may be made to the above definition of the warning method, which is not described herein again. The modules in the alarm device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device comprises a processor, a memory and a network interface which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The computer program is executed by a processor to implement an alert method.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring current alarm detection data;
obtaining a current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
determining a state stability threshold corresponding to the current alarm level;
and judging whether the current alarm state parameter is equal to a state stability threshold corresponding to the current alarm level.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and if the current alarm level is the same as the previous alarm level, determining the current alarm state parameter according to the previous alarm state parameter.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
if the current alarm level is different from the previous alarm level, acquiring an initial alarm state parameter corresponding to the current alarm level, and setting the initial alarm state parameter corresponding to the current alarm level as the current alarm state parameter.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level, comparing the current alarm level with the alarm level contained in the alarm information reported last time;
and if the current alarm level is different from the alarm level contained in the alarm information reported last time, generating and reporting the alarm information.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the current alarm level is different from the alarm level contained in the alarm information reported last time, selecting the alarm information meeting the preset condition from the reported alarm information; the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level;
generating and reporting alarm clearing information; the alarm clearing information is used for clearing the alarm information meeting the preset condition.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring current alarm detection data;
obtaining a current alarm level according to the current alarm detection data and a plurality of alarm level thresholds;
determining the current alarm state parameter, and judging whether the current alarm state parameter meets the alarm reporting condition; the current alarm state parameter is used for indicating the times of continuously obtaining the current alarm level;
and if the current alarm state parameter meets the alarm reporting condition, generating and reporting alarm information, wherein the alarm information comprises the current alarm level.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining a state stability threshold corresponding to the current alarm level;
and judging whether the current alarm state parameter is equal to a state stability threshold corresponding to the current alarm level.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the current alarm level is the same as the previous alarm level, determining the current alarm state parameter according to the previous alarm state parameter.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the current alarm level is different from the previous alarm level, acquiring an initial alarm state parameter corresponding to the current alarm level, and setting the initial alarm state parameter corresponding to the current alarm level as the current alarm state parameter.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the current alarm state parameter is equal to the state stability threshold corresponding to the current alarm level, comparing the current alarm level with the alarm level contained in the alarm information reported last time;
and if the current alarm level is different from the alarm level contained in the alarm information reported last time, generating and reporting the alarm information.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the current alarm level is different from the alarm level contained in the alarm information reported last time, selecting the alarm information meeting the preset condition from the reported alarm information; the preset condition is that the alarm level contained in the alarm information is greater than the current alarm level;
generating and reporting alarm clearing information; the alarm clearing information is used for clearing the alarm information meeting the preset condition.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.