Alarm system, alarm method, gateway device and sensor device

By polling the sensors through the gateway, the problem of co-frequency interference caused by multiple sensors alarming simultaneously was solved, improving the alarm success rate and real-time performance, and achieving stable data transmission.

CN122002234APending Publication Date: 2026-05-08HANGZHOU MICROIMAGE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU MICROIMAGE SOFTWARE CO LTD
Filing Date
2024-11-01
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In wireless radio frequency communication monitoring systems, simultaneous alarms from multiple sensors can cause co-channel interference, leading to a decrease in the receiver's signal-to-noise ratio, affecting signal transmission quality, and resulting in a low alarm success rate.

Method used

The gateway polls the sensors, determines the sensors to be polled by a preset polling order, sends the first message requesting alarm information, and waits for a period of time after disconnection before determining the new sensors to be polled. At the same time, the sensors are allowed to actively upload alarm information if preset conditions are met.

Benefits of technology

It effectively avoids co-channel interference, improves the alarm success rate, and balances the real-time nature of alarms with the stability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122002234A_ABST
    Figure CN122002234A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an alarm system, an alarm method, gateway equipment and sensor equipment, which are applied to the field of security and protection monitoring systems, and the situation of alarm failure caused by same-frequency interference generated by simultaneous active alarm of a plurality of sensors is reduced through a mode of acquiring alarm information by actively polling the sensors by a gateway, so that the alarm success rate is improved. In addition, when the alarm information generated by the sensor is the first alarm, the sensor uploads the alarm information in an active reporting mode, and the real-time performance of the first alarm can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of security monitoring systems, and in particular to alarm systems, alarm methods, gateway devices, and sensor devices. Background Technology

[0002] In wireless radio frequency communication monitoring systems, simultaneous alarms from multiple sensors can cause co-channel interference. This means that when alarm signals emitted by two or more sensors have the same carrier frequency, they can interfere with receivers receiving the same-frequency signals, reducing the receiver's signal-to-noise ratio and affecting signal transmission quality. Simultaneous alarms from multiple sensors can easily lead to alarm signal transmission failures, resulting in a low alarm success rate. Summary of the Invention

[0003] The purpose of this application is to provide an alarm system, alarm method, gateway device, and sensor device to improve the alarm success rate. The specific technical solution is as follows:

[0004] In a first aspect, an alarm system is provided, the system comprising: a gateway and multiple sensors;

[0005] The gateway is used to determine the sensor to be polled according to a preset polling order; and to send a first message to the sensor to be polled to request alarm information.

[0006] The sensor is configured to, upon receiving the first message, upload the alarm information to the gateway in response to the existence of alarm information that needs to be reported.

[0007] The gateway is also configured to disconnect from the currently polled sensor after completing the current polling; wait for a first preset time after disconnecting from the previous sensor; and determine a new sensor to be polled according to a preset polling order after completing the first preset time of waiting, and poll the sensor accordingly.

[0008] The sensor is also used to send a third message to the gateway for uploading alarm information when a preset active alarm condition is met.

[0009] The gateway is also configured to, if it receives the third message during the waiting period of a first preset time, establish a connection with the sensor that sent the third message and receive the alarm information uploaded by the sensor.

[0010] In one possible implementation, the sensor is specifically used to: when a preset active alarm condition is met, randomly generate a second duration within a preset duration range, and after waiting for the second duration, send a third message to the gateway for uploading alarm information.

[0011] In one possible implementation, the preset duration range is an exponential multiple of the maximum reporting duration or the single reporting duration, and does not exceed twenty times the maximum reporting duration or the single reporting duration, wherein the maximum reporting duration is the maximum duration for which the sensor uploads alarm information in a single instance.

[0012] In one possible implementation, the sensor is further configured to: in response to generating alarm information, determine whether the currently generated alarm information is the first alarm, and if so, determine that the preset active alarm conditions are met.

[0013] In one possible implementation, the sensor is further configured to: in response to generating alarm information, determine the alarm level of the currently generated alarm information, and if the alarm level is not lower than a preset level threshold, determine that the preset active alarm condition is met.

[0014] In one possible implementation, the sensor is further configured to: when the gateway does not respond to the third message, resend the third message to the gateway after waiting for the maximum reporting time or the single reporting time, until a preset number of retransmissions is reached or the gateway responds to the third message.

[0015] Secondly, an alarm method is provided for use in a gateway, the method comprising:

[0016] The sensor to be polled is determined according to the preset polling order;

[0017] Send a first message requesting alarm information to the currently polled sensor;

[0018] After completing the current polling, disconnect from the sensor currently being polled;

[0019] After disconnecting from the previous sensor, wait for the first preset time.

[0020] After the first preset waiting time is completed, a new sensor to be polled is determined according to the preset polling order, and polling is performed on it.

[0021] Optionally, the method further includes:

[0022] If a third message for uploading alarm information is received from a sensor during the first preset waiting period, a connection is established with the sensor that sent the third message, and the alarm information uploaded by the sensor is received.

[0023] Thirdly, an alarm device is provided, the device comprising:

[0024] Sequence confirmation module, information inquiry module, connection disconnection module, and first preset time waiting module;

[0025] The sequence confirmation module is used to perform the following: determine the sensor to be polled according to the preset polling order;

[0026] The information query module is used to perform the following: send a first message to the sensor currently being polled to request alarm information;

[0027] The connection disconnection module is used to perform the following: after completing the current polling, disconnect the connection with the sensor currently being polled;

[0028] The first preset time waiting module is specifically used to perform the following: after disconnecting from the previous sensor, wait for the first preset time.

[0029] After waiting for the first preset duration, the sequence confirmation module performs the following: according to the preset polling order, it determines the new sensors to be polled and polls them.

[0030] Optionally, the device further includes: a third message receiving module;

[0031] The third message receiving module is specifically used to perform the following: if a third message for uploading alarm information is received from a sensor during the waiting period of a first preset time, a connection is established with the sensor that sent the third message, and the alarm information uploaded by the sensor is received.

[0032] Fourthly, a gateway device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus.

[0033] Memory, used to store computer programs;

[0034] When a processor executes a program stored in memory, it implements any of the steps described in the second aspect.

[0035] Fifthly, an alarm method is provided, applied to a sensor, the method comprising:

[0036] The system receives a first message from the gateway requesting alarm information, wherein the first message is a message from the gateway to the sensor currently being polled, sent according to a preset polling order, to request alarm information.

[0037] In response to the existence of alarm information that needs to be reported, the alarm information is uploaded to the gateway;

[0038] When the preset active alarm conditions are met, a third message for uploading alarm information is sent to the gateway.

[0039] Optionally, the step of sending a third message for uploading alarm information to the gateway when the preset active alarm conditions are met includes:

[0040] When the preset active alarm conditions are met, a second duration is randomly generated within a preset duration range. After waiting for the second duration, a third message for uploading alarm information is sent to the gateway.

[0041] Optionally, the method further includes:

[0042] When the gateway does not respond to the third message, the third message is resent to the gateway after waiting for the maximum reporting time or the single reporting time, until the preset number of retransmissions is reached or the gateway responds to the third message.

[0043] Optionally, the method further includes:

[0044] In response to the generation of alarm information, it is determined whether the currently generated alarm information is the first alarm. If so, it is determined that the preset active alarm conditions are met.

[0045] Optionally, the method further includes:

[0046] In response to the generation of alarm information, the alarm level of the currently generated alarm information is determined. If the alarm level is not lower than a preset level threshold, it is determined that the preset active alarm condition is met.

[0047] Sixthly, an alarm device is provided, the device comprising:

[0048] Alarm module, third message sending module;

[0049] The alarm module is used to perform the following: after receiving a first message from the gateway requesting alarm information, in response to the existence of alarm information that needs to be reported, upload the alarm information to the gateway;

[0050] The third message sending module is used to perform the following: when the preset active alarm conditions are met, send a third message to the gateway for uploading alarm information;

[0051] The third message sending module is specifically used to perform the following: when the preset active alarm conditions are met, randomly generate a second duration within a preset duration range, and after waiting for the second duration, send a third message to the gateway for uploading alarm information.

[0052] Optionally, the device further includes an active alarm determination module for performing the following: in response to generating alarm information, determining whether the currently generated alarm information is the first alarm, and if so, determining that the preset active alarm conditions are met.

[0053] Optionally, the device further includes an active alarm determination module for performing the following: in response to generating alarm information, determining the alarm level of the currently generated alarm information; if the alarm level is not lower than a preset level threshold, determining that the preset active alarm condition is met.

[0054] Optionally, the device further includes a retransmission module for performing the following: when the gateway does not respond to the third message, retransmitting the third message to the gateway after waiting for a maximum reporting time or a single reporting time, until a preset number of retransmissions is reached or the gateway responds to the third message.

[0055] In a seventh aspect, a sensor device is provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0056] Memory, used to store computer programs;

[0057] When a processor executes a program stored in memory, it implements any of the steps described in the fifth aspect.

[0058] Eighthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of the method described in either the second or fifth aspect.

[0059] Beneficial effects of the embodiments in this application:

[0060] This application provides an alarm system comprising: a gateway and multiple sensors; the gateway is configured to determine the sensors to be polled according to a preset polling order; and send a first message requesting alarm information to the sensors to be polled; the sensors, upon receiving the first message, are configured to, in response to having alarm information to report, upload the alarm information to the gateway; and in response to not having alarm information to report, send a second message to the gateway indicating no alarm information; the gateway is further configured to disconnect from the sensors to be polled after receiving the alarm information or the second message. By polling the sensors through the gateway to obtain alarm information, the system avoids alarm failures caused by interference from multiple sensors simultaneously triggering alarms, thus improving the alarm success rate.

[0061] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0062] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.

[0063] Figure 1 This is a schematic diagram of an alarm system in an embodiment of this application;

[0064] Figure 2 This is a flowchart of a first type of alarm method applied to a gateway in this application embodiment;

[0065] Figure 3 This is a second flowchart of an alarm method applied to a gateway in this application embodiment;

[0066] Figure 4 This is a first schematic diagram of the first type of alarm device in the embodiments of this application;

[0067] Figure 5 This is a second schematic diagram of the first type of alarm device in the embodiments of this application;

[0068] Figure 6 This is a schematic diagram of a gateway device in an embodiment of this application;

[0069] Figure 7 This is a flowchart of a first type of alarm method applied to a sensor in this application embodiment;

[0070] Figure 8 This is a second flowchart of an alarm method applied to a sensor in an embodiment of this application;

[0071] Figure 9 This is a schematic diagram of a second type of alarm device in the embodiments of this application;

[0072] Figure 10 This is a schematic diagram of a sensor device in an embodiment of this application. Detailed Implementation

[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.

[0074] In wireless radio frequency communication monitoring systems, simultaneous alarms from multiple sensors can cause co-channel interference, meaning that alarm signals emitted by two or more sensors have the same carrier frequency, which interferes with receivers receiving co-channel signals. This reduces the signal-to-noise ratio of the receiver (e.g., a gateway), affecting signal transmission quality. When multiple sensors alarm simultaneously, alarm signal transmission is prone to failure, resulting in a low alarm success rate.

[0075] To reduce co-channel interference and improve alarm success rate, related technologies employ methods that limit the alarm signal transmission time. This method shortens the duration of the alarm signal transmission from the sensor, reducing the probability of multiple sensors simultaneously sending alarm signals, thus minimizing co-channel interference and improving the alarm success rate. However, due to the limited alarm signal transmission time, sensors cannot upload excessively large amounts of alarm information. This method is not suitable for scenarios with large data volumes and cannot universally solve the problem of low alarm success rate.

[0076] To improve the alarm success rate, embodiments of this application provide an alarm system, alarm method, device, gateway device, sensor device, and storage medium, which are described in detail below:

[0077] The sensor in this application embodiment refers to an alarm device with wireless communication function, which can send information to the gateway under abnormal conditions. Specifically, it may include cameras with alarm functions, hard disk recorders, temperature alarm devices, infrared alarm devices, smoke alarm devices, etc.

[0078] Firstly, this application provides an alarm system, see [link to relevant documentation]. Figure 1 The system includes a gateway 101 and multiple sensors 102; wherein the gateway 101 and the sensors 102 can communicate wirelessly, for example, via radio frequency.

[0079] The gateway 101 is used to determine the sensor 102 to be polled according to a preset polling order; and to send a first message to the sensor 102 to be polled to request alarm information.

[0080] The sensor 102 is used to upload the alarm information to the gateway 101 in response to the presence of alarm information that needs to be reported after receiving the first message;

[0081] The gateway 101 is also used to disconnect the connection with the sensor currently being polled after completing the current polling.

[0082] The polling order of each sensor in the preset polling sequence can be set according to the actual situation, and is not limited in this application. In the case of grid 101, the preset polling order polls each sensor in turn to detect whether the sensor has alarm information. The first message is a message sent by gateway 101 to the sensor 102 currently being polled to inquire about the alarm status. After receiving the first message, if the sensor 102 currently being polled has alarm information that needs to be uploaded, it will upload the alarm status to gateway 101.

[0083] In one possible implementation, if no alarm information needs to be reported in the currently polled sensor 102, the currently polled sensor 102 uploads a second message to the gateway 101, wherein the second message indicates that the currently polled sensor has no alarm information to upload. In one example, to reduce the time a sensor 102 occupies the gateway, in one possible implementation, the sensor 102 only uploads the most recent alarm information. That is, when the most recently timestamped alarm information in the sensor 102 has not been uploaded, the sensor 102 determines that it has alarm information that needs to be uploaded; when the most recently timestamped alarm information in the sensor 102 has been uploaded, or when the sensor 102 has no alarm information, the sensor 102 determines that it has no alarm information that needs to be uploaded.

[0084] After the gateway 101 finishes receiving the alarm information or second message uploaded by the sensor to be polled, it disconnects from the sensor and then determines the next sensor to be polled according to the preset polling order.

[0085] The method of using gateway 101 to poll alarm information from sensor 102 instead of sensor 102 actively alarming reduces the co-channel interference caused by multiple sensors 102 reporting alarm information at the same time, and greatly improves the alarm success rate.

[0086] In some scenarios, to improve the real-time performance of certain alarm information, the active alarm function of sensors is added. In one possible implementation, the gateway 101 is specifically used to: wait for a first preset time after disconnecting from the previous sensor; after completing the first preset time wait, determine new sensors to be polled according to a preset polling order, and poll them.

[0087] The sensor 102 is also used to send a third message to the gateway 101 for uploading alarm information when a preset active alarm condition is met.

[0088] The gateway 101 is also configured to: if the third message is received during the waiting period of the first preset time, establish a connection with the sensor 102 that sent the third message, and receive the alarm information uploaded by it.

[0089] The first preset duration is a fixed period that can be set according to actual conditions. After each disconnection from a sensor 102, the gateway 101 waits for the first preset duration. This first preset duration is used for the gateway 101 to wait for the sensor 102 to actively trigger an alarm. During polling, the gateway 101 cannot receive alarm information uploaded by sensors 102 other than the currently polled sensor. Within the first preset duration, the gateway 101 can receive alarm information uploaded by any sensor 102. Setting the first preset duration to wait for the sensor 102 to actively trigger an alarm balances both gateway 101 polling and sensor 102 active alarm methods, improving alarm success rate while ensuring real-time alarm performance.

[0090] The third message is a request to establish a connection sent by sensor 102 to gateway 101 before actively uploading alarm information. If gateway 101 receives the third message within a first preset time period, gateway 101 establishes a connection with the sensor that sent the third message, and the sensor can actively upload alarm information. If the third message is not received within the first preset time period, and gateway 101 does not receive the third message while polling other sensors, gateway 101 cannot establish a connection with the sensor that actively alarmed, and the sensor cannot actively upload alarm information.

[0091] Whether the gateway 101 establishes a connection through polling or through a third message, it connects to one of the multiple sensors 102. After the connection is established, the gateway 101 no longer receives information sent by other sensors 102 to ensure the stability of data transmission.

[0092] The active alarm conditions can be customized according to actual conditions. In one possible implementation, the sensor is further used to: in response to generating alarm information, determine the alarm level of the currently generated alarm information; if the alarm level is not lower than a preset level threshold, then the preset active alarm conditions are met. For example, alarm information can be divided into general and important categories. For important category alarm information, the sensor can actively report it; while for general category alarm information, the sensor can passively report it during polling. For instance, taking a camera as an example, when a stranger is detected, a general category alarm information can be generated; when a blacklisted person is detected, an important category alarm information can be generated. When the camera determines that the current alarm information's alarm level is important, it actively reports it; while when the camera determines that the current alarm information's alarm level is general, the camera can report it during gateway polling.

[0093] In one example, alarm levels can be categorized into Level 1, Level 2, and Level 3. When the alarm level is not lower than Level 2 (Level 2 or 3), the sensor actively reports the alarm. When the alarm level is lower than Level 2 (Level 1), the sensor passively reports the alarm during the polling process. For instance, taking a temperature alarm device as an example, it generates a Level 1 alarm when the detected temperature is between 60℃ and 80℃, a Level 2 alarm when the detected temperature is between 80℃ and 150℃, and a Level 3 alarm when the detected temperature is above 150℃. When the temperature alarm device determines that the current alarm level is Level 2 or 3, it actively reports the alarm. When the temperature alarm device determines that the current alarm level is Level 1, it reports the alarm during the gateway's polling process.

[0094] In addition to distinguishing between active and passive reporting based on alarm level, an active reporting method can also be adopted for the first alarm. In one possible implementation, the sensor 102 is further configured to: in response to generating alarm information, determine whether the currently generated alarm information is the first alarm, and if so, determine that the preset active alarm conditions are met.

[0095] The first alarm is the first alarm message generated when sensor 102 changes from a non-alarm state to an alarm state. In the alarm system, the alarm triggered by sensor 102 will continue for a period of time, during which multiple alarm messages are generally generated. To increase the real-time nature of the first alarm, the alarm information of sensor 102 is actively uploaded when the first alarm occurs.

[0096] Sensor 102 may fail to upload alarm information, for example, while gateway 101 is communicating with other sensors, sensor 102 may fail to upload alarm information. In this case, sensor 102 can wait for a third preset time before sending a third message to gateway 101 again. The third preset time can be set as the maximum reporting time for a single alarm information upload. In some scenarios, to reduce the time a single sensor 102 occupies the gateway, the duration for sensor 102 to upload alarm information can be set. For example, a maximum reporting time can be set so that the duration for a single alarm information upload by sensor 102 does not exceed this maximum reporting time. Setting the third preset time of sensor 102 to the maximum reporting time ensures that when sensor 102 re-uploads alarm information, gateway 101 has already disconnected from the previous sensor 102. In some scenarios, to reduce the time a single sensor 102 occupies the gateway, the duration for which the sensor 102 uploads alarm information can be set. For example, a single reporting duration can be set so that the duration for which the sensor 102 uploads alarm information at a time exceeds this single reporting duration. Setting the third preset duration of the sensor 102 to the single reporting duration ensures that when the sensor 102 re-uploads alarm information, the gateway 101 has already disconnected from the previous sensor 102.

[0097] In some scenarios, multiple sensors 102 may simultaneously trigger alarms. For example, if there are overlapping detection areas between multiple sensors 102, and an alarm event occurs in this overlapping area, multiple sensors 102 may simultaneously upload a third message. To reduce co-channel interference in this situation, in one possible implementation, the sensor 102 is specifically used to: when a preset active alarm condition is met, randomly generate a second duration within a preset duration range, and after waiting for the second duration, send a third message for uploading alarm information to the gateway 101. The preset duration range is an exponential multiple of the maximum reporting duration or the single reporting duration, and does not exceed twenty times the maximum reporting duration or the single reporting duration. The maximum reporting duration is the maximum duration for a single upload of alarm information by the sensor. The single reporting duration is the duration used by the sensor to upload alarm information once. In one example, to facilitate alarm information management, a preset length can be specified for the alarm information. If all alarm information uploaded by the sensor devices has the same length (data volume), then the time for each upload of alarm information is also the same, i.e., the single reporting duration.

[0098] The preset duration range is an exponential multiple of the maximum reporting duration or the duration of a single report, but does not exceed twenty times the maximum reporting duration or the duration of a single report. In one example, the duration of a single report between sensor 102 and gateway 101 is 30ms, and the preset duration range is 30 × 2.n ms, where n is a positive integer. The preset duration range can be changed according to actual needs, but it must be ensured that the generated second duration is at least ten times the time required for sensor 102 to establish a connection with gateway 101. In an alarm system, an abnormal situation often triggers multiple sensors 102 to alarm simultaneously. Randomly delaying the alarm before sensor 102 actively uploads it reduces the probability of multiple sensors 102 simultaneously sending a third message to gateway 101, reducing co-channel interference and thus improving the success rate of sensor 102 actively alarming. Setting a 20-fold upper limit is to prevent excessively long waiting times, which could affect the real-time performance of alarm information.

[0099] To improve the success rate of the sensor actively uploading alarm information, in one possible implementation, the sensor is further configured to: when the gateway does not respond to the third message, resend the third message to the gateway after waiting for the maximum reporting time or the single reporting time, until a preset number of retransmissions is reached or the gateway responds to the third message.

[0100] If the gateway cannot receive the third message from the current sensor while receiving alarm information from other sensors, it will not respond to the third message. Therefore, the current sensor needs to re-upload the third message. The current sensor re-transmits the third message after waiting for the maximum reporting time or the single reporting time because the gateway will have already received the alarm information from the previous sensor after this time, thus further improving the success rate of proactively uploading alarm information and reducing unnecessary signaling waste. The preset number of retransmissions can be customized according to actual needs, such as 3, 4, or 5 times.

[0101] Secondly, this application provides an alarm method applied to a gateway, see [link to relevant documentation]. Figure 2 The method includes:

[0102] S201, determine the sensor to be polled according to the preset polling order;

[0103] S202, Send a first message to the currently polled sensor to request alarm information;

[0104] S203: After completing the current polling, disconnect from the sensor currently being polled.

[0105] S204, After disconnecting from the previous sensor, wait for the first preset time.

[0106] S205 After completing the first preset waiting time, determine the new sensor to be polled according to the preset polling order and poll it.

[0107] In one example, the first preset time is 1 second, and the time required for the sensor to upload alarm information after establishing a connection is 1-2 seconds. Within the first preset time, if the gateway receives alarm information uploaded by one of the multiple sensors, it will determine the next sensor to be polled according to the preset polling order only after that alarm information has been uploaded.

[0108] By using gateway polling of sensor alarm information instead of active sensor alarms, co-channel interference is avoided, significantly improving the alarm success rate. A first preset timeout is set to wait for active sensor alarms, thus combining the advantages of both gateway polling and active sensor alarms, ensuring real-time alarm performance while improving the success rate.

[0109] In one possible implementation, see Figure 3 The method further includes:

[0110] S2041, if a third message for uploading alarm information is received from a sensor during the waiting period of the first preset time, a connection is established with the sensor that sent the third message, and the alarm information uploaded by it is received.

[0111] The gateway establishes a connection with a corresponding sensor via a third message. After the connection is established, the gateway no longer receives information from other sensors, ensuring the stability of data transmission.

[0112] Thirdly, this application provides an alarm device, see [link to relevant documentation]. Figure 4 The device includes:

[0113] Sequence confirmation module 301, information inquiry module 302, connection disconnection module 303, first preset duration waiting module 304;

[0114] The sequence confirmation module 301 is used to perform the following: determine the sensor to be polled according to the preset polling order;

[0115] The information query module 302 is used to perform the following: send a first message to the sensor currently being polled to request alarm information, so that after receiving the first message, the sensor uploads alarm information to the gateway or sends a second message indicating that there is no alarm information;

[0116] The connection disconnection module 303 is used to perform the following: after completing the current polling, disconnect the connection with the sensor currently being polled;

[0117] The first preset time waiting module 304 is specifically used to perform: after disconnecting from the previous sensor, wait for the first preset time;

[0118] After waiting for the first preset duration, the sequence confirmation module 301 performs the following: determining the sensor to be polled according to the preset polling order.

[0119] In one possible implementation, see Figure 5 The device further includes: a third message receiving module 305;

[0120] The third message receiving module 305 is specifically used to perform the following: if a third message for uploading alarm information is received from a sensor during the waiting period of a first preset time, a connection is established with the sensor that sent the third message, and the alarm information uploaded by the sensor is received.

[0121] Fourthly, see Figure 6 This application provides a gateway device, including a processor 401, a communication interface 402, a memory 403, and a communication bus 404, wherein the processor 401, the communication interface 402, and the memory 403 communicate with each other through the communication bus 404.

[0122] Memory 403 is used to store computer programs;

[0123] The processor 401, when executing a program stored in memory, implements any of the steps described in the second aspect.

[0124] The communication bus mentioned in the gateway device above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0125] The communication interface is used for communication between the aforementioned gateway device and other devices.

[0126] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0127] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0128] Fifthly, embodiments of this application provide an alarm method, see [link to relevant documentation]. Figure 7 Applied to a sensor, the method includes:

[0129] S501, Receive a first message from the gateway requesting alarm information, wherein the first message is a message from the gateway to the sensor currently being polled in a preset polling order to request alarm information;

[0130] S502, in response to the existence of alarm information that needs to be reported, the alarm information is uploaded to the gateway;

[0131] S503, when the preset active alarm conditions are met, a third message for uploading alarm information is sent to the gateway.

[0132] By using a gateway to poll sensor alarm information instead of allowing sensors to actively trigger alarms, co-channel interference is avoided, significantly improving the alarm success rate. While the gateway polls for alarm information, sensors conditionally trigger alarms, further enhancing the success rate and real-time performance.

[0133] In one possible implementation, see Figure 8 The step of sending a third message to the gateway for uploading alarm information when the preset active alarm conditions are met includes:

[0134] S5031, when the preset active alarm conditions are met, a second duration is randomly generated within a preset duration range, and after waiting for the second duration, a third message for uploading alarm information is sent to the gateway.

[0135] By randomly delaying the alarm transmission from the sensor before it actively uploads an alarm, the probability of multiple sensors simultaneously sending a third message to the gateway is reduced, thus reducing co-channel interference and improving the success rate of the sensor's active alarm.

[0136] When the gateway does not respond to the third message, the sensor resends the third message to the gateway after waiting for the maximum reporting time or the single reporting time, until a preset number of retransmissions is reached or the gateway responds to the third message, thereby improving the success rate of actively uploading alarm information. In one possible implementation, see [link to implementation details]. Figure 7 The method further includes:

[0137] S504, after failing to send the third message to the gateway, wait for a third preset time and then send the third message to the gateway again;

[0138] S505, after a preset number of failed attempts to send a third message to the gateway, the gateway stops sending the third message.

[0139] The third preset duration is a pre-set retransmission interval. The purpose of setting the third preset duration is to ensure that the time for sending the third message during retransmission is within the first preset duration, thereby improving the retransmission success rate. Therefore, the third preset duration is usually greater than or equal to the time required for the sensor to upload alarm information, but it can also be adjusted according to actual needs. In one example, the third preset duration is the maximum reporting duration or the duration of a single reporting session.

[0140] The preset number of uploads is a pre-defined number of times the sensor can actively upload alarm information. If the sensor fails to upload alarm information within this preset number of uploads, it can re-upload the alarm information multiple times to improve the success rate of active alarms and thus enhance the real-time performance of the alarm. However, since the alarm information loses its real-time nature after multiple failed re-uploads, the number of re-uploads is limited to reduce unnecessary data transmission.

[0141] In one possible implementation, see Figure 8 The method further includes:

[0142] S5032, in response to generating alarm information, determine whether the currently generated alarm information is the first alarm; if so, determine that the preset active alarm conditions are met.

[0143] The sensor alarm information is proactively uploaded only on the first alarm, avoiding the repeated uploading of multiple alarm messages generated by the same abnormal situation, reducing unnecessary data transmission, and improving the accuracy of alarms.

[0144] In one possible implementation, see Figure 8 The method further includes:

[0145] S5033, in response to generating alarm information, determine the alarm level of the currently generated alarm information; if the alarm level is not lower than a preset level threshold, then determine that the preset active alarm condition is met.

[0146] Active alarms are only initiated when the alarm level is high, preventing general alarm information from interfering with important alarm information at the same frequency, and improving the success rate and real-time performance of important alarm information uploads.

[0147] Sixthly, embodiments of this application provide an alarm device, see [link to relevant documentation]. Figure 9 The device includes:

[0148] Alarm module 601, third message sending module 602;

[0149] The alarm module 601 is used to perform the following: after receiving a first message from the gateway requesting alarm information, in response to the existence of alarm information that needs to be reported, it uploads the alarm information to the gateway;

[0150] The third message sending module 602 is used to perform the following: when the preset active alarm conditions are met, send a third message to the gateway for uploading alarm information;

[0151] The third message sending module 602 is specifically used to perform the following: when the preset active alarm conditions are met, randomly generate a second duration within a preset duration range, and after waiting for the second duration, send a third message for uploading alarm information to the gateway.

[0152] In one possible implementation, see Figure 9 The device also includes: an active alarm determination module 603 and a retransmission module 604;

[0153] The active alarm determination module 603 is used to perform the following actions in response to generating alarm information: determining whether the currently generated alarm information is the first alarm; if so, determining that the preset active alarm conditions are met; or...

[0154] The active alarm determination module 603 is used to perform the following: in response to generating alarm information, determine the alarm level of the currently generated alarm information, and if the alarm level is not lower than a preset level threshold, determine that the preset active alarm condition is met.

[0155] The retransmission module 604 is used to perform the following: when the gateway does not respond to the third message, after waiting for the maximum reporting time or the single reporting time, resend the third message to the gateway until the preset number of retransmissions is reached or the gateway responds to the third message.

[0156] Seventhly, embodiments of this application provide a sensor device, see [link to relevant documentation]. Figure 10 It includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704, wherein the processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.

[0157] Memory 703 is used to store computer programs;

[0158] The processor 701, when executing a program stored in memory, implements any of the steps described in the fifth aspect.

[0159] The communication bus mentioned in the sensor devices above can be a standard bus for interconnecting peripheral components or an extended industrial standard structure bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0160] The communication interface is used for communication between the aforementioned sensor devices and other devices.

[0161] The memory may include random access memory or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0162] The processors mentioned above can be general-purpose processors, including central processing units, network processors, etc.; they can also be digital signal processors, application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0163] Eighthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in either the second or fifth aspect.

[0164] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.

[0165] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0166] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0167] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.

Claims

1. An alarm system, characterized in that, The system includes: a gateway and multiple sensors; The gateway is used to determine the sensor to be polled according to a preset polling order; and to send a first message to the sensor to be polled to request alarm information. The sensor is configured to, upon receiving the first message, upload the alarm information to the gateway in response to the existence of alarm information that needs to be reported. The gateway is also configured to disconnect from the currently polled sensor after completing the current polling; wait for a first preset time after disconnecting from the previous sensor; and determine a new sensor to be polled according to a preset polling order after completing the first preset time of waiting, and poll the sensor accordingly. The sensor is also used to send a third message to the gateway for uploading alarm information when a preset active alarm condition is met. The gateway is also configured to, if it receives the third message during the waiting period of a first preset time, establish a connection with the sensor that sent the third message and receive the alarm information uploaded by the sensor.

2. The system according to claim 1, characterized in that, The sensor is specifically used to: when a preset active alarm condition is met, randomly generate a second duration within a preset duration range, and after waiting for the second duration, send a third message to the gateway for uploading alarm information.

3. The system according to claim 2, characterized in that, The preset duration range is an exponential multiple of the maximum reporting duration or the single reporting duration, and does not exceed twenty times the maximum reporting duration or the single reporting duration. The maximum reporting duration is the maximum duration for which the sensor uploads alarm information in a single instance.

4. The system according to claim 2, characterized in that, The sensor is also used to: in response to generating alarm information, determine whether the currently generated alarm information is the first alarm, and if so, determine that the preset active alarm conditions are met.

5. The system according to claim 2, characterized in that, The sensor is also used to: in response to generating alarm information, determine the alarm level of the currently generated alarm information, and if the alarm level is not lower than a preset level threshold, determine that the preset active alarm condition is met.

6. The system according to claim 2, characterized in that, The sensor is also used to: when the gateway does not respond to the third message, resend the third message to the gateway after waiting for the maximum reporting time or the single reporting time, until the preset number of retransmissions is reached or the gateway responds to the third message.

7. An alarm method, characterized in that, Applied to a gateway, the method includes: The sensor to be polled is determined according to the preset polling order; Send a first message requesting alarm information to the currently polled sensor; After completing the current polling, disconnect from the sensor currently being polled; After disconnecting from the previous sensor, wait for the first preset time. After the first preset waiting time is completed, a new sensor to be polled is determined according to the preset polling order, and polling is performed on it.

8. The alarm method according to claim 7, characterized in that, The method further includes: If a third message for uploading alarm information is received from a sensor during the first preset waiting period, a connection is established with the sensor that sent the third message, and the alarm information uploaded by the sensor is received.

9. A gateway device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method of claim 7 or 8.

10. An alarm method, characterized in that, Applied to a sensor, the method includes: The system receives a first message from the gateway requesting alarm information, wherein the first message is a message from the gateway to the sensor currently being polled, sent according to a preset polling order, to request alarm information. In response to the existence of alarm information that needs to be reported, the alarm information is uploaded to the gateway; When the preset active alarm conditions are met, a third message for uploading alarm information is sent to the gateway.

11. The alarm method according to claim 10, characterized in that, When the preset active alarm conditions are met, sending a third message to the gateway for uploading alarm information includes: When the preset active alarm conditions are met, a second duration is randomly generated within a preset duration range. After waiting for the second duration, a third message for uploading alarm information is sent to the gateway.

12. The alarm method according to claim 11, characterized in that, The method further includes: In response to the generation of alarm information, it is determined whether the currently generated alarm information is the first alarm. If so, it is determined that the preset active alarm conditions are met.

13. The alarm method according to claim 11, characterized in that, The method further includes: In response to the generation of alarm information, the alarm level of the currently generated alarm information is determined. If the alarm level is not lower than a preset level threshold, it is determined that the preset active alarm condition is met.

14. The alarm method according to claim 11, characterized in that, The method further includes: When the gateway does not respond to the third message, the third message is resent to the gateway after waiting for the maximum reporting time or the single reporting time, until the preset number of retransmissions is reached or the gateway responds to the third message.

15. A sensor device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 10-14.