CN111835557A - Alarm method and equipment - Google Patents
Alarm method and equipment Download PDFInfo
- Publication number
- CN111835557A CN111835557A CN202010563133.5A CN202010563133A CN111835557A CN 111835557 A CN111835557 A CN 111835557A CN 202010563133 A CN202010563133 A CN 202010563133A CN 111835557 A CN111835557 A CN 111835557A
- Authority
- CN
- China
- Prior art keywords
- alarm
- parameter
- parameters
- equipment
- type
- 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
- 238000000034 method Methods 0.000 title claims description 49
- 230000002159 abnormal effect Effects 0.000 claims abstract description 46
- 238000012545 processing Methods 0.000 description 8
- 229910002092 carbon dioxide Inorganic materials 0.000 description 7
- 238000012544 monitoring process Methods 0.000 description 6
- 230000005856 abnormality Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000001052 transient effect Effects 0.000 description 3
- CURLTUGMZLYLDI-UHFFFAOYSA-N Carbon dioxide Chemical compound O=C=O CURLTUGMZLYLDI-UHFFFAOYSA-N 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- FFBHFFJDDLITSX-UHFFFAOYSA-N benzyl N-[2-hydroxy-4-(3-oxomorpholin-4-yl)phenyl]carbamate Chemical compound OC1=C(NC(=O)OCC2=CC=CC=C2)C=CC(=C1)N1CCOCC1=O FFBHFFJDDLITSX-UHFFFAOYSA-N 0.000 description 1
- 239000001569 carbon dioxide Substances 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
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
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Alarm Systems (AREA)
Abstract
When receiving an abnormal state message comprising state values of a plurality of parameters of equipment, the invention can acquire all information of the equipment from a cache at one time, namely acquire a historical alarm list corresponding to the equipment, and further can generate a corresponding alarm message and push the alarm message to a user when determining a first type of parameter meeting a corresponding preset alarm rule, thereby realizing the purpose of giving an alarm to the user and reminding the user of the current abnormal state of the equipment; and because all the information of the equipment is acquired from the cache at one time, the access frequency to the cache can be reduced, even if the first type of parameters comprise a plurality of parameters, the cache is still accessed only once, so that the problem of access overtime caused by excessive access frequency can be avoided, and the stability and the reliability of the alarm equipment are improved.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an alarm method and device.
Background
With the development of network and computer technologies, the technology of internet of things has been developed rapidly, and more devices can be connected to the network to realize intelligent monitoring and control of the devices. In the process of development of the internet of things, various internet of things devices can appear, and in the process of using the internet of things devices, users who belong to the internet of things devices need to be informed in time when the states of the internet of things devices are abnormal, namely, the users are warned.
How to alert the user is a technical problem to be solved urgently by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides an alarm method and equipment, which are used for alarming a user when the state of an internet of things device is abnormal.
In a first aspect, an embodiment of the present invention provides an apparatus alarm method, including:
when an abnormal state message comprising state values of a plurality of parameters of the equipment is received, acquiring a historical alarm list of the equipment from a cache; wherein the historical alert list comprises: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
and when judging that the plurality of parameters have the first type of parameters meeting the corresponding preset alarm rule according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to a user.
In a second aspect, an embodiment of the present invention provides an alarm device, including:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory, and executing according to the obtained program:
when an abnormal state message comprising state values of a plurality of parameters of the equipment is received, acquiring a historical alarm list of the equipment from a cache; wherein the historical alert list comprises: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
and when judging that the plurality of parameters have the first type of parameters meeting the corresponding preset alarm rule according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to a user.
In a third aspect, an embodiment of the present invention provides a readable storage medium, where an alarm device executable instruction is stored in the readable storage medium, and the alarm device executable instruction is used to enable an alarm device to execute the alarm method.
The invention has the following beneficial effects:
when receiving an abnormal state message including state values of a plurality of parameters of a device, the alarm method and the device provided by the embodiment of the invention can acquire all information of the device from a cache at one time, namely acquire a historical alarm list corresponding to the device, and further can generate a corresponding alarm message and push the alarm message to a user when determining a first type of parameter meeting a corresponding preset alarm rule, thereby realizing the alarm to the user and reminding the user of the current abnormal state of the device; and because all the information of the equipment is acquired from the cache at one time, the access frequency to the cache can be reduced, even if the first type of parameters comprise a plurality of parameters, the cache is still accessed only once, so that the problem of access overtime caused by excessive access frequency can be avoided, and the stability and the reliability of the alarm equipment are improved.
Drawings
Fig. 1 is a flowchart of an alarm method provided in an embodiment of the present invention;
FIG. 2 is a flow chart of an embodiment provided in an embodiment of the present invention;
FIG. 3 is a diagram illustrating the increase of access times of a cache when the alarm method according to the embodiment of the present invention is used;
fig. 4 is a schematic structural diagram of an alarm device provided in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a cloud server provided in an embodiment of the present invention.
Detailed Description
The following describes in detail a specific implementation of an alarm method and apparatus provided in an embodiment of the present invention with reference to the accompanying drawings. It should be noted that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides an apparatus alarm method, as shown in fig. 1, which may include:
s101, when receiving abnormal state information comprising state values of a plurality of parameters of equipment, acquiring a historical alarm list of the equipment from a cache; wherein, the historical alarm list includes: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
specifically, the historical alarm list may specifically include:
marker data (i.e., key data) and corresponding reference data (i.e., value data);
marking data as identification information of the equipment;
the reference data includes: parameters carried in the pushed alarm message and identification information of a preset alarm rule corresponding to the parameters.
S102, when judging that the first type of parameters meeting the corresponding preset alarm rule exist in the plurality of parameters according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to a user.
When the warning message is pushed to the user, the following modes can be adopted:
mode 1: and pushing the short messages.
Specifically, the warning message can be edited into a short message format and transmitted to the short message service module, then the short message corresponding to the warning message is sent to the short message gateway through the short message service module, and then the short message corresponding to the warning message is sent to the terminal equipment of the user through the short message gateway.
Mode 2: and pushing by means of messages.
Specifically, the warning message can be pushed to application software in the terminal equipment of the user, so as to realize real-time pushing;
if the pushing fails in the real-time pushing process, that is, the application software of the terminal device of the user does not receive the warning message, the warning message can be stored in the warning database, so that the application software of the terminal device of the user can pull the off-line warning message from the database through the message pulling module, and the pushing to the user is realized.
Of course, the manner of pushing the alert message to the user is not limited to the manner 1 and the manner 2, but may also be other manners known to those skilled in the art that can implement pushing, and is not limited herein.
Therefore, in the embodiment of the present invention, when an abnormal state message including state values of a plurality of parameters of a device is received, all information of the device may be acquired from a cache at one time, that is, a history alarm list corresponding to the device may be acquired, and when a first type of parameter meeting a corresponding preset alarm rule may be determined, a corresponding alarm message may be generated and pushed to a user, thereby implementing an alarm to the user and reminding the user of the current abnormal state of the device; and because all the information of the equipment is acquired from the cache at one time, the access frequency to the cache can be reduced, even if the first type of parameters comprise a plurality of parameters, the cache is still accessed only once, so that the problem of access overtime caused by excessive access frequency can be avoided, and the stability and the reliability of the alarm equipment are improved.
Optionally, in the embodiment of the present invention, the historical alarm list is determined in the following manner:
when the historical alarm list of the equipment is failed to be obtained from the cache, after the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters are obtained from the alarm database, the historical alarm list is constructed and stored in the cache.
In practical situations, the history alarm list of the device (assumed to be device a) may not exist in the cache, and at this time, the relevant data needs to be obtained from the alarm database, the history alarm list needs to be constructed, and the history alarm list needs to be stored in the cache, so that when the abnormal state message of the same device (i.e., device a) is received again in the following, the history alarm list of the device can be obtained from the cache.
Therefore, the historical alarm list can be effectively obtained, the access times to the cache and the database can be reduced, and the stability and reliability of the alarm device are improved.
Optionally, in the embodiment of the present invention, the preset alarm rule corresponding to any parameter includes:
the state value of the parameter is not less than the corresponding preset alarm threshold value;
the state of the parameter is a bursty state; or the state of the parameter is a non-burst state, and the identification information of the preset alarm rule corresponding to the parameter does not exist in the acquired historical alarm list.
Taking the parameter as the temperature as an example, the preset alarm rule corresponding to the temperature may include:
the temperature is not less than a preset alarm threshold (such as 40 ℃);
the state of the temperature is a bursty state, wherein a bursty state is a state that occurs suddenly, intermittently or discontinuously, and can also be understood as a transient state; or the temperature state is a non-bursty state (i.e., a steady state, in which the device continuously reports an abnormal state), and the identification information of the preset alarm rule corresponding to the temperature does not exist in the historical alarm list.
In addition, the identification information of the preset alarm rule may be composed of numbers, letters and special symbols, and similarly, the identification information of the device mentioned in the foregoing description may also be composed of numbers, letters and special symbols, and an identifier may be set according to actual needs, which is not limited herein.
Furthermore, for bursty states, it can be understood that:
if the abnormal state message of the device a is received, assuming that the device a includes three parameters, which are respectively expressed as a parameter a, a parameter b, and a parameter c, and when the parameter a exceeds the standard and the parameter b and the parameter c both meet the requirements, for the parameter a:
judging whether the parameter a in the abnormal state message of the equipment A received last time exceeds the standard or not;
if yes, the parameter a of the equipment A reports the abnormality continuously, and the state of the parameter a can be determined to be a non-burst state, namely a steady state;
if not, it is stated that the parameter a of the device a does not report the abnormality continuously, but reports the abnormality suddenly, and at this time, it may be determined that the state of the parameter a is a bursty state, i.e., a transient state.
Therefore, through setting the preset alarm rule corresponding to the parameter, which parameter or parameters meet the corresponding preset alarm rule and which parameter or parameters do not meet the corresponding preset alarm rule can be determined, so that the alarm message corresponding to the parameter meeting the corresponding preset alarm rule can be generated, the alarm message is pushed to a user, the user equipment is informed that an abnormality occurs in a certain parameter, the user can conveniently and effectively solve the abnormality in time, and the safety of the equipment is ensured.
Specifically, in the embodiment of the present invention, the preset alarm threshold may be set as: the method is realized by a conditional expression, wherein the conditional expression can comprise the following steps:
1. state name: a selection may be made from the status items of the device class.
For example, taking the device as an air conditioner, the state of the air conditioner can select CO2Status bits of values, status bits of PM 2.5 over-standard, etc.
2. The logical operator:
logical relationships equal to, not equal to, greater than, less than, greater than or equal to, and less than or equal to may be supported.
3. The state value is as follows:
the state value is selected from the state parameters of the selected state item, and the numerical value can also be directly configured.
For example, CO2The over-concentration push may be configured to have a carbon dioxide value of 1500.
That is to say, the conditional expression corresponding to the preset alarm threshold may be set as: CO of air conditioner2The state value of the concentration exceeds 1500.
For the setting of the preset reset threshold, the setting may be similar to the setting of the preset alarm threshold, and also may be set as a conditional expression, which may be referred to above specifically, and repeated details are not repeated.
Optionally, in this embodiment of the present invention, when it is determined that there is a first type parameter that satisfies the corresponding preset alarm rule in the plurality of parameters, and before generating the alarm message, the method further includes:
if the state of the first type of parameter is a non-burst state, forming an alarm record corresponding to the first type of parameter of the equipment, storing the alarm record into an alarm database, and clearing a historical alarm list corresponding to the equipment in the cache;
wherein, the alarm record includes: the device comprises identification information of the device, a first type of parameter, a state value of the first type of parameter and identification information of a preset alarm rule corresponding to the first type of parameter.
Specifically, the alarm database generally stores preset alarm rules and corresponding identification information corresponding to alarm records and different parameters of different devices.
For alarm records, for example but not limited to: if the alarm message corresponding to a certain parameter of the device has been pushed to the user and the type of the parameter is in a non-bursty state, an alarm record may be formed and stored in the database at the same time to indicate that the relevant alarm message has been pushed to the user.
Therefore, when the historical alarm list of the equipment is failed to be obtained from the cache, the relevant data can be obtained from the alarm database, the historical alarm list is constructed, and then the historical alarm list is stored in the cache so as to be used in the subsequent process.
Specifically, in the embodiment of the present invention, when a parameter that does not satisfy the corresponding preset alarm rule among the plurality of parameters is defined as a second-class parameter, the following process is further included:
process 1: when the second type of parameter is judged to be smaller than the corresponding preset alarm threshold value, judging whether a preset reset rule corresponding to the second type of parameter exists or not; if yes, executing the process 2; if not, executing the process 4;
and (2) a process: judging whether the second type of parameters meet corresponding preset reset rules or not; if yes, executing the process 3; if not, executing the process 4;
and 3, process: respectively removing the historical alarm list corresponding to the equipment in the cache and the alarm records corresponding to the second type parameters of the equipment in the alarm database;
and 4, process: the current state of the cache and alarm database is maintained.
Therefore, when the corresponding preset reset rule is met, the historical alarm records corresponding to the equipment in the cache are cleared, so that the latest data can be acquired subsequently; meanwhile, the alarm records (such as but not limited to the alarm records corresponding to the temperature) corresponding to the second type of parameters in the alarm database are cleared, and the second type of parameters of the equipment are reset, so that whether the second type of parameters of the equipment are abnormal or not can be judged again in the follow-up process, the validity of the data in the alarm database is ensured, and the accuracy of the alarm is improved.
Specifically, in the embodiment of the present invention, the preset reset rule corresponding to any parameter includes:
the state value of the parameter is not less than the corresponding preset reset threshold value;
the state of the parameter is a non-bursty state;
the identifier of the preset alarm rule corresponding to the parameter exists in the acquired historical alarm list.
Therefore, the setting of the preset reset rule can determine when to reset a certain parameter or certain parameters of the equipment, so that whether the equipment parameter is abnormal or not can be judged again, the validity of data in the alarm database can be ensured, and the accuracy of alarm is improved.
Optionally, in the embodiment of the present invention, when defining a parameter, which does not satisfy the corresponding preset alarm rule, in the plurality of parameters as a second type of parameter, the method further includes:
and when the identifier of the preset alarm rule corresponding to the second type of parameter is judged to exist in the acquired historical alarm list, maintaining the current states of the cache and the alarm database.
Therefore, the situation that the alarm is frequently pushed to the user can be avoided, and further alarm redundancy is avoided, so that the experience and the experience of the user are improved.
Optionally, in this embodiment of the present invention, when the first type of parameter includes multiple parameters, the method further includes:
and generating an alarm message carrying the identification information of the equipment and one of the first type of parameters in sequence.
For example, the first type of parameter has two parameters, and when the two parameters are temperature and humidity, the alarm message corresponding to the temperature can be generated first, and then the alarm message corresponding to the humidity can be generated; or firstly generating an alarm message corresponding to the humidity and then generating an alarm message corresponding to the temperature.
Therefore, one parameter can be ensured to correspond to one alarm message, and the plurality of alarm messages are sequentially pushed to the user, so that the user can learn which parameters are alarmed, the user can conveniently take effective measures, and the safety of the equipment is ensured.
The above-mentioned warning process provided by the embodiment of the present invention is described below with reference to specific embodiments.
As shown in connection with fig. 2.
S201, loading preset alarm rules corresponding to all equipment in an alarm database, and storing the preset alarm rules in a memory;
the memory may be regarded as a storage space of the alarm device itself, and is different from the alarm database and the cache.
And, the alarm database stores the alarm records corresponding to the parameters of each device, and the alarm device can obtain corresponding data from the alarm database (if the alarm device receives the abnormal state message of the device a currently, the alarm device can obtain the alarm record related to the device a from the alarm database, and construct a history alarm list to be stored in the cache and its memory, so that when the abnormal state message of the device a is received again subsequently, the alarm device does not need to access the alarm database, and can obtain the history alarm list of the device a from the cache) and construct a history alarm list (as shown in table 1 below), and store the history alarm list in the cache and its memory.
S202, receiving an abnormal state message of the equipment A, wherein the abnormal state message comprises the state values of all the parameters;
the state value of a certain parameter may be out of standard, and the state values of other parameters may be normal.
For example, taking device a as an air conditioner as an example, the corresponding parameters of the air conditioner may include: temperature, humidity and CO2Concentration, wherein, among the three parameters:
possibly, the temperature is out of limits, such as 40 ℃ at present;
alternatively, it is possible that the humidity is excessive, such as 70% humidity currently;
or, possibly, CO2The concentration is exceeded, e.g. CO is present2The concentration was 50%.
S203, starting a thread of a temperature alarm processing task;
in order to ensure real-time performance, threads corresponding to different tasks can be executed in parallel without serial.
And each time the abnormal state information of one device is received, the thread corresponding to one device can be started.
For example, when an abnormal state message of the device a is currently received, a thread corresponding to the device a, such as thread 1, is started;
if the abnormal state information of the equipment A is received, a thread corresponding to the equipment A is started again, such as thread 2;
if the abnormal state message of the equipment B is received next, starting a thread corresponding to the equipment B, such as thread 3;
and thread 1, thread 2, and thread 3 may be executed in parallel.
S204, acquiring a history alarm list corresponding to the equipment A from the cache, and storing the history alarm list in a memory;
wherein, the historical alarm list may include: the identification information of the device a, the parameter corresponding to the alarm message that has been pushed to the user, and the identification of the preset alarm rule corresponding to the parameter.
For example, if the warning message corresponding to the temperature and the humidity has been previously pushed to the user, the obtained historical warning list includes:
the identification information of the equipment A, the temperature parameter and the corresponding identification of the preset alarm rule, and the humidity parameter and the corresponding identification of the preset alarm rule.
It should be noted that, in specific implementation, if a thread of the device a is executed for the first time, a history alarm list corresponding to the device a may not exist in the cache, so the alarm device needs to obtain relevant data from the alarm database to construct a history alarm list, and then store the history alarm list in the cache and a memory of the alarm device;
or, the thread of the device a is not executed for the first time at present, but before that, the alarm message is already pushed to the user, and the history alarm list corresponding to the device a in the cache is cleared, so that the history alarm list corresponding to the device a does not exist in the current cache, and therefore the alarm device still needs to acquire relevant data from the alarm database to construct the history alarm list, and then the history alarm list is stored in the cache and the memory of the alarm device;
or, the thread of the device a is not currently executed for the first time, but before that, a reset operation is executed on a certain parameter (for example, parameter a) of the device a, so that the history alarm list corresponding to the device a does not exist in the cache, and therefore, the alarm device still needs to obtain relevant data from the alarm database to construct the history alarm list, and then store the history alarm list in the cache and the memory of the alarm device.
Of course, if the thread of the processing device a is executed the nth time (N is an integer greater than 1) and the history alarm list corresponding to the device a exists in the cache, the history alarm list may be directly obtained from the cache; and one device only accesses the cache once, even if a plurality of parameters in the device exceed the standard, the device only accesses the cache once, thereby greatly reducing the times of accessing the cache and avoiding the problem of access overtime.
As shown in table 1, a history alarm list corresponding to a device is shown, and the device is taken as an air conditioner as an example.
TABLE 1
Of course, in table 1, the identification information of the device may be a character string, but is not limited to 22001, and here, only 22001 is taken as an example for description.
It is stated that, each time an abnormal state message of a device is received, the history alarm list corresponding to the device needs to be re-acquired until the thread corresponding to the device is finished, the acquired history alarm list can be released, the memory space of the alarm device is released, and the occupation of the memory space is reduced.
S205, judging whether all the loaded preset alarm rules include preset alarm rules corresponding to the equipment A; if yes, go to S206; if not, ending the flow;
in the process of performing the task thread, a preset alarm rule corresponding to a certain parameter (e.g., parameter a) of the device a in the alarm database may be deleted through manual operation by a user or pre-configuration by the user, so that it is necessary to determine whether the preset alarm rule corresponding to the parameter a of the device a still exists.
Moreover, only the preset alarm rule corresponding to the parameter a of the device a exists, that is, it indicates that alarm setting needs to be performed on the device a, so that a subsequent process needs to be performed.
S206, judging whether the state value of one parameter in the acquired abnormal state message is smaller than a preset alarm threshold value or not; if not, executing S207; if yes, go to step S212;
s207, judging whether the state of the parameter is transient or not; if yes, go to S208; if not, executing S210;
s208, forming an alarm message carrying the identification information of the equipment A, the parameter and the corresponding state value, and pushing the alarm message to a user;
in S207 to S208, the alarm message may be directly pushed to the user, and there is no need to form an alarm record and store the alarm record in the alarm database, because the current state of the parameter is a burst state, which is less in the case of this situation, an alarm storm is not caused, and further, no complex processing is required, and a direct alarm is performed when an alarm is required.
S209, judging whether unprocessed parameters exist or not; if yes, go back to step S205, and continue to perform corresponding processing on the next parameter; if not, ending the current thread;
wherein a thread may include processing of multiple parameters.
For example, taking the device as an air conditioner as an example, the abnormal state message received from the air conditioner includes a temperature parameter, a humidity parameter and a CO2Concentration parameter, wherein the state value of the temperature parameter exceeds the standard, the state value of the humidity parameter exceeds the standard, CO2The state value of the concentration parameter is normal; then:
after the temperature parameter is processed, the process returns to S205, and the humidity parameter is continuously processed until the two parameters exceeding the standard are processed, that is, the current task thread is completed.
S210, judging whether the acquired historical alarm list comprises an identifier of a preset alarm rule corresponding to the parameter; if yes, returning to S205, and continuing to perform corresponding processing on the next parameter; if not, executing S211;
when the identifier of the preset alarm rule corresponding to the parameter exists in the list, the alarm message corresponding to the parameter is pushed to the user, so that the user does not need to alarm again at the moment so as to eliminate alarm redundancy.
S211, forming an alarm record comprising time, identification information of the equipment A, a state value corresponding to the parameter and an identification of a corresponding preset alarm rule, storing the alarm record into an alarm database, and clearing a historical alarm list of the equipment A in a cache; returning to S208;
wherein, the step shows that an alarm record is formed and stored in the alarm database, and meanwhile, the corresponding historical alarm list in the cache is cleared, which indicates that the user has been alarmed.
It should be noted that when the data in the cache is cleared, the data is cleared according to a key, that is, the historical alarm list corresponding to the device a is cleared, instead of the identifier of the alarm rule corresponding to a certain parameter in the device a.
S212, judging whether a reset threshold corresponding to the parameter is set; if yes, go to S213; if not, executing S216;
s213, judging whether the state value of the parameter is smaller than a reset threshold value; if not, executing S214; if yes, go back to S205;
s214, judging whether the state of the parameter is a stable state; if not, returning to S205; if yes, go to S215;
s215, judging whether the acquired historical alarm list comprises an identifier of a preset alarm rule corresponding to the parameter; if yes, go to S216; if not, returning to S205;
s216, clearing a history alarm list of the equipment A in the cache, and clearing an alarm record corresponding to the parameter of the equipment A in the alarm database; returning to S205.
Wherein, the step indicates that the original setting is restored for the parameter of the device a, so the alarm record in the alarm database is deleted, and the abnormal state message reported by the device a is monitored again, and when S211 is executed, the alarm record is formed again and stored in the alarm database.
In summary, in an actual situation, since the abnormal state reported by the white power device is relatively frequent (about once reported in two seconds), most of the abnormal state is in a steady state, if the cache is accessed during processing of each parameter, the number of times of accessing the cache is greatly increased.
In the embodiment of the invention, when receiving the abnormal state message comprising the state values of a plurality of parameters of the equipment, all information of the equipment can be acquired from the cache at one time, namely a historical alarm list corresponding to the equipment is acquired, and when determining the first type of parameters meeting the corresponding preset alarm rule, the corresponding alarm message can be generated and pushed to the user, thereby realizing the alarm to the user and reminding the current abnormal state of the user equipment; and because all the information of the equipment is acquired from the cache at one time, the access frequency to the cache can be reduced, even if the first type of parameters comprise a plurality of parameters, the cache is still accessed only once, so that the problem of access overtime caused by excessive access frequency can be avoided, and the stability and the reliability of the alarm equipment are improved.
Specifically, referring to fig. 3, in the graph of the increase of the access times of the cache, through optimizing the access times of the cache, the number of times of the alarm device accessing the cache is greatly reduced, as shown by line 2, and the graph presents a stable situation.
Obviously, the alarm method provided by the embodiment of the invention can greatly reduce the access times of the cache, avoid the problem of access overtime caused by excessive access times, and improve the stability and reliability of the alarm device.
Based on the same inventive concept, an embodiment of the present invention provides an alarm device, as shown in fig. 4, which may include:
a memory 401 for storing program instructions;
a processor 402 for calling the program instructions stored in the memory 401, and executing:
when an abnormal state message comprising state values of a plurality of parameters of the equipment is received, acquiring a historical alarm list of the equipment from a cache; wherein, the historical alarm list includes: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
and when judging that the first type of parameters meeting the corresponding preset alarm rule exist in the plurality of parameters according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to the user.
Optionally, in the embodiment of the present invention, the device in which the abnormal state message occurs may be an intelligent household appliance, such as but not limited to an intelligent refrigerator, an intelligent air conditioner, and the like, and the intelligent household appliance may report the abnormal message to the cloud server through a communication module arranged in the intelligent household appliance, so that the cloud server may push the warning message to the user after processing the abnormal message reported by the intelligent household appliance.
As shown in fig. 5, a specific architecture of the cloud server 500 may include:
a receiving module 501, configured to: receiving an abnormal message reported by the intelligent household appliance;
a state parsing module 502 configured to: analyzing the received abnormal message to obtain an abnormal state message, and storing the abnormal state message into a message queue 1 and an alarm database;
an alarm setting module 503, configured to: setting a preset alarm rule corresponding to the parameter of the equipment, and storing the preset alarm rule in an alarm database;
a condition monitoring and alert module 504 for: extracting abnormal state messages from the message queue 1 in sequence, and pushing alarm messages to users according to the abnormal state messages;
the short message service module 505 is configured to: pushing a short message to a short message gateway;
a push message module 506 to: and pushing a real-time warning message to the client of the user.
The state monitoring and warning module 504 may send the warning message to the message queue 1, so that the message pushing module 506 pushes the warning message to the client of the user in a message manner; alternatively, the status monitoring and warning module 504 may send the warning message to the message queue 2, so that the short message service module 505 can push the warning message to the short message gateway in a short message manner, and then send the warning message to the client through the short message gateway to notify the user.
In addition, for the above-mentioned alarm process, the execution subject for executing the alarm process may be a status monitoring and alarm module, that is, the alarm device mentioned in the above-mentioned content may be understood as a status monitoring and alarm module in the cloud server.
For the message queue, the application is an application that needs to be independently deployed on the server like a database, and an interface can be provided for other modules to call, so as to sequentially process each abnormal state message in the message queue.
Based on the same inventive concept, the embodiment of the invention provides a readable storage medium, wherein the readable storage medium stores an alarm device executable instruction, and the alarm device executable instruction is used for enabling an alarm device to execute the alarm method.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (10)
1. An alarm method of a device, comprising:
when an abnormal state message comprising state values of a plurality of parameters of the equipment is received, acquiring a historical alarm list of the equipment from a cache; wherein the historical alert list comprises: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
and when judging that the plurality of parameters have the first type of parameters meeting the corresponding preset alarm rule according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to a user.
2. The method of claim 1, wherein the list of historical alarms is determined by:
and when the historical alarm list of the equipment is failed to be obtained from the cache, after the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters are obtained from an alarm database, the historical alarm list is constructed and stored in the cache.
3. The method of claim 1, wherein the preset alarm rule corresponding to any parameter comprises:
the state value of the parameter is not less than the corresponding preset alarm threshold value;
the state of the parameter is a bursty state; or, the state of the parameter is a non-bursty state, and the identification information of the preset alarm rule corresponding to the parameter does not exist in the acquired historical alarm list.
4. The method of claim 3, wherein when it is determined that there is a first type parameter satisfying the corresponding preset alarm rule in the plurality of parameters and before the alarm message is generated, the method further comprises:
if the state of the first type of parameter is a non-burst state, forming an alarm record corresponding to the first type of parameter of the equipment, storing the alarm record into an alarm database, and clearing a historical alarm list corresponding to the equipment in the cache;
wherein the alarm record comprises: the device comprises identification information of the device, the first type of parameters, state values of the first type of parameters and identification information of preset alarm rules corresponding to the first type of parameters.
5. The method of claim 3, wherein when defining a parameter of the plurality of parameters that does not satisfy the corresponding preset alarm rule as a second type of parameter, the method further comprises:
when the second type of parameter is judged to be smaller than the corresponding preset alarm threshold value, judging whether a preset reset rule corresponding to the second type of parameter exists or not;
if so, when the second type of parameter is judged to meet the corresponding preset reset rule, respectively clearing a historical alarm list corresponding to the equipment in the cache and an alarm record corresponding to the second type of parameter of the equipment in an alarm database; or, when the second type parameter is judged not to meet the corresponding preset reset rule, the current states of the cache and the alarm database are kept;
if not, the current states of the cache and the alarm database are kept.
6. The method of claim 5, wherein the preset reset rule corresponding to any parameter comprises:
the state value of the parameter is not less than the corresponding preset reset threshold value;
the state of the parameter is the non-bursty state;
the identifier of the preset alarm rule corresponding to the parameter exists in the acquired historical alarm list.
7. The method of claim 3, wherein when defining a parameter that does not satisfy the corresponding preset alarm rule among the plurality of parameters as a second type of parameter, the method further comprises:
and when judging that the identifier of the preset alarm rule corresponding to the second type of parameter exists in the acquired historical alarm list, keeping the current states of the cache and the alarm database.
8. The method of any one of claims 1-7, wherein when the first class of parameters includes a plurality of parameters, further comprising:
and generating an alarm message carrying the identification information of the equipment and one of the first type of parameters in sequence.
9. An alert device, comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory, and executing according to the obtained program:
when an abnormal state message comprising state values of a plurality of parameters of the equipment is received, acquiring a historical alarm list of the equipment from a cache; wherein the historical alert list comprises: the identification information of the equipment, the parameters carried in the pushed alarm message and the identification information of the preset alarm rule corresponding to the parameters;
and when judging that the plurality of parameters have the first type of parameters meeting the corresponding preset alarm rule according to the historical alarm list, generating an alarm message carrying the identification information of the equipment, the first type of parameters and the corresponding state values, and pushing the alarm message to a user.
10. A readable storage medium storing alerting device executable instructions for causing an alerting device to perform the method of any one of claims 1-8.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010563133.5A CN111835557A (en) | 2020-06-19 | 2020-06-19 | Alarm method and equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010563133.5A CN111835557A (en) | 2020-06-19 | 2020-06-19 | Alarm method and equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111835557A true CN111835557A (en) | 2020-10-27 |
Family
ID=72898873
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010563133.5A Withdrawn CN111835557A (en) | 2020-06-19 | 2020-06-19 | Alarm method and equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111835557A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115622868A (en) * | 2022-10-13 | 2023-01-17 | 深圳市中电电力技术股份有限公司 | A monitoring system alarm convergence device and convergence method based on topology relationship |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040225637A1 (en) * | 2003-03-31 | 2004-11-11 | Thomas Heinzel | Alert engine |
| CN1901467A (en) * | 2006-06-30 | 2007-01-24 | 华为技术有限公司 | Method and system for quick processing warning |
| CN101937467A (en) * | 2010-09-17 | 2011-01-05 | 北京开心人信息技术有限公司 | High-efficiency caching method and system of server |
| WO2017054555A1 (en) * | 2015-09-30 | 2017-04-06 | 中兴通讯股份有限公司 | Warning management method for use in network management system and network management system |
| CN111124817A (en) * | 2019-12-06 | 2020-05-08 | 江苏智臻能源科技有限公司 | Multi-type alarm judgment algorithm based on cache mechanism |
| CN111130867A (en) * | 2019-12-12 | 2020-05-08 | 青岛聚好联科技有限公司 | Intelligent household equipment alarm method and device based on Internet of things |
-
2020
- 2020-06-19 CN CN202010563133.5A patent/CN111835557A/en not_active Withdrawn
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20040225637A1 (en) * | 2003-03-31 | 2004-11-11 | Thomas Heinzel | Alert engine |
| CN1901467A (en) * | 2006-06-30 | 2007-01-24 | 华为技术有限公司 | Method and system for quick processing warning |
| CN101937467A (en) * | 2010-09-17 | 2011-01-05 | 北京开心人信息技术有限公司 | High-efficiency caching method and system of server |
| WO2017054555A1 (en) * | 2015-09-30 | 2017-04-06 | 中兴通讯股份有限公司 | Warning management method for use in network management system and network management system |
| CN111124817A (en) * | 2019-12-06 | 2020-05-08 | 江苏智臻能源科技有限公司 | Multi-type alarm judgment algorithm based on cache mechanism |
| CN111130867A (en) * | 2019-12-12 | 2020-05-08 | 青岛聚好联科技有限公司 | Intelligent household equipment alarm method and device based on Internet of things |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115622868A (en) * | 2022-10-13 | 2023-01-17 | 深圳市中电电力技术股份有限公司 | A monitoring system alarm convergence device and convergence method based on topology relationship |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110661659B (en) | Alarm method, device and system and electronic equipment | |
| CN111045901B (en) | Container monitoring method and device, storage medium and electronic equipment | |
| CN111459770A (en) | Server operation state warning method and device, server and storage medium | |
| CN111835760B (en) | Alarm information processing method and device, computer storage medium and electronic equipment | |
| CN108182134A (en) | A kind of general-purpose interface monitoring method, device and equipment, storage medium | |
| CN114036022A (en) | Monitoring alarm processing method, device, equipment and medium | |
| CN113468025A (en) | Data warning method, system, device and storage medium | |
| CN111949418B (en) | Subscription message processing method and device | |
| CN113242359A (en) | Method for automatically sending alarm message of power plant based on enterprise WeChat | |
| CN111130867B (en) | Intelligent household equipment alarm method and device based on Internet of things | |
| CN118779184A (en) | Alarm message processing method, device, electronic device and storage medium | |
| CN112988443B (en) | Method and device for processing business exception | |
| KR20110037969A (en) | Targeted user notification of messages in the monitoring system | |
| CN111835557A (en) | Alarm method and equipment | |
| CN113656239A (en) | Monitoring method and device for middleware and computer program product | |
| CN114844772B (en) | Zabbix monitoring platform-based management method and system | |
| CN112910733A (en) | Full link monitoring system and method based on big data | |
| CN110737565B (en) | Data monitoring method and device, electronic equipment and storage medium | |
| CN110837431A (en) | Service control method, service control device, computer equipment and computer-readable storage medium | |
| CN113347045A (en) | Alarm message processing method and device | |
| CN114398222A (en) | Method for declaratively visually configuring Prometheus monitoring alarm | |
| CN110879774B (en) | Network element performance data alarming method and device | |
| CN112035411A (en) | Log alarm method, device and system and electronic equipment | |
| CN115878427A (en) | Monitoring alarm method, device, electronic equipment and storage medium | |
| CN113835916A (en) | An alarm method, system and device based on Ambari big data platform |
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 |
Application publication date: 20201027 |
|
| WW01 | Invention patent application withdrawn after publication |