A method for realizing real-time alarm pop-up box and voice broadcast based on MQTT push protocol

By using alarm pop-ups and voice broadcasts based on the MQTT push protocol, the problem of redundant alarm information in the field of smart security is solved, enabling real-time, eye-catching and convenient alarm information delivery, and improving user response efficiency and experience.

CN119728662BActive Publication Date: 2026-02-06NANJING TETRAELC ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411861905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2026-02-06
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

In existing technologies, alarm information transmission methods in the field of smart security are redundant and lack sufficient visualization, which leads to reduced user vigilance and affects response efficiency. In particular, it is difficult to quickly distinguish the urgency of multiple alarms when there are high-frequency alarms.

Method used

It adopts an MQTT push protocol-based approach to configure the trigger conditions for alarm pop-ups and voice broadcasts. It manages the modes of alarm pop-ups and web voice broadcasts by defining arrays, and controls the display and broadcast of pop-ups and voice broadcasts based on device type and alarm level subscriptions. It supports pop-up positions in the center, upper right corner, and lower right corner, overlay or superimposed display, manual or automatic closing, and the number and interval of voice broadcasts.

Benefits of technology

It enables real-time and prominent alarm information delivery, reduces the user's operational burden, improves response efficiency, and allows users to quickly understand the nature and severity of the problem through detailed pop-up information and voice broadcast, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728662B_ABST
    Figure CN119728662B_ABST
Patent Text Reader

Abstract

The application provides a method for realizing real-time alarm pop-up box and voice broadcast based on MQTT push protocol, comprising the following steps: S1, creating MQTT connection, in the system dictionary, configuring the display position, display mode and closing mode of the pop-up box on the screen, configuring the enable / disable function, broadcast times and broadcast interval of the Web voice broadcast, and configuring the subscription type of the alarm subscription, wherein the subscription type of the alarm subscription comprises device type subscription and alarm level subscription; S2, when subscribing to the alarm topic, the triggering conditions of the alarm pop-up box and the Web voice broadcast are managed by defining two arrays; S3, when the MQTT message is acquired, whether the device type or the risk level in the message is in the two arrays is judged, if yes, the pop-up box is prompted and the voice is broadcast according to the pop-up box configuration. The application timely informs the staff to process through the real-time alarm pop-up box and voice broadcast, and improves the production efficiency and safety.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automation monitoring, and in particular to a method for realizing real-time alarm pop-up boxes and voice broadcasting based on an MQTT push protocol. BACKGROUND

[0002] In the field of intelligent security, flow, temperature and vibration monitoring are very common requirements. When an alarm threshold is set for a device, alarm data is generated, which needs to be conveyed in an intuitive way. Specifically: 1) the alarm pop-up box in the system displays relevant information of the alarm device, including alarm area, alarm device, identification result, alarm level, alarm threshold, and alarm data such as collection resources; 2) Web voice alarm broadcasting will broadcast the contents of [area] [alarm level] [alarm device] [identification result]. For the analysis of historical data, a very intuitive viewing page is needed. The current mainstream solution is as follows: 1) use Echarts to display historical real-time data; 2) set the corresponding alarm threshold interval directly in Echarts according to the requirements; 3) update the data in the Echarts container. In the above solution, Web voice alarm broadcasting and pop-up box prompts may convey the same alarm information at the same time. This redundant alarm conveying method, especially when there are high-frequency alarms, may reduce the user's alertness, thereby affecting the response efficiency, and the information display is single and lacks sufficient visualization, which may lead to the user's neglect or inability to quickly distinguish the urgency of multiple alarms. SUMMARY

[0003] The present application aims to overcome the deficiencies of the prior art and provide a method for realizing real-time alarm pop-up boxes and voice broadcasting based on an MQTT push protocol.

[0004] The present application provides a method for realizing real-time alarm pop-up boxes and voice broadcasting based on an MQTT push protocol, comprising the following steps:

[0005] S1, create an MQTT connection, configure the display position, display mode, and closing mode of the pop-up box on the screen in the system dictionary, configure the enable / disable function, number of broadcasts, and broadcast interval of Web voice broadcasting, and configure the subscription type of alarm subscription, including device type subscription and alarm level subscription;

[0006] S2, when subscribing to the alarm topic, define two arrays dialogTrueList and voiceTrueList to manage the triggering conditions of the alarm pop-up box and Web voice broadcasting:

[0007] If the subscription by device type is activated, the device type and its corresponding alarm popup mode, including opening and not opening, are stored in the array dialogTrueList; the device type and its corresponding Web voice broadcast mode, including opening and not opening, are stored in the array voiceTrueList;

[0008] If the subscription by alarm level is activated, the alarm level and its corresponding alarm popup mode, including opening and not opening, are stored in the array dialogTrueList; the alarm level and its corresponding Web voice broadcast mode, including opening and not opening, are stored in the array voiceTrueList;

[0009] S3, if the subscription by device type is activated, after receiving the MQTT message of the alarm, whether the device type typeId in the received push message is in the dialogTrueList list is judged, if it exists, whether the popup mode in the list determines whether to call the popup configuration in the system dictionary is determined; at the same time, whether the typeId in the message is in the voiceTrueList list is judged, if it exists, whether the Web voice broadcast mode in the list determines whether to call the Web voice broadcast configuration in the system dictionary is determined;

[0010] If the subscription by alarm level is activated, after receiving the MQTT message of the alarm, whether the alarm level alarmLevel in the message is in the dialogTrueList list is judged, if it exists, whether the popup mode in the list determines whether to call the popup configuration in the system dictionary is determined; at the same time, whether the alarm level in the message is in the voiceTrueList list is judged, if it exists, whether the Web voice broadcast mode in the list determines whether to call the Web voice broadcast configuration in the system dictionary is determined.

[0011] The further limitation of the technical scheme of the application is that in the system dictionary, the popup display position is configured, including the center popup, the upper right corner popup and the lower right corner popup; the popup display mode is configured, including the covering popup and the superimposed popup; the popup closing mode includes manual closing and automatic closing, wherein the automatic closing function sets the display time length.

[0012] Further, the data format of the configuration pop-up box is: {dictModel": "alarm-dialog-dict","dictLabel":"alarm pop-up box configuration","dictValue": [{"enable":"true","closeSeconds":5,"dialogPosition":0,"multipShow":"0","closeType":"0"}],"dictId":**, "remark":"alarm pop-up box configuration: enable: true display, false hidden, dialogPosition: display position, 0 center, 1 upper right corner, 2 lower right corner; multpShow: multiple display, 0: overlay, 1: superimposed; closeType: closing method; 0: manual, 1: automatic; closeSeconds: closing seconds"}.

[0013] Further, the data format of the Web voice broadcast configured in the step S1 is: {"dictModel": "alarm-speek-broadcast","dictLabel":"Web voice alarm broadcast configuration item","dictValue": [{"times":"1","enable": "true","interval": "3"}],"dictId": 120,"remark": "Web voice alarm broadcast: times: broadcast times, default 5 times; interval: broadcast interval, default 3 seconds"}.

[0014] Further, the data format of the alarm subscription configured in the step S1 is: {"dictModel": "alarm-subscrip-sys","dictLabel": "alarm subscription type & level","dictValue": [{"typeSub": "true","levelSub":"false"}],"dictId": 121,"remark": "alarm subscription: typeSub: by type; true or false, levelSub: by level subscription, true or false}.

[0015] The present application provides a method for realizing real-time alarm pop-up box and voice broadcast based on MQTT push protocol, and the beneficial effects of the technical scheme are as follows:

[0016] 1. Instant alarm, when the system detects abnormal conditions, it can trigger an alarm in a very short time and quickly push the alarm information to the subscribed client through the MQTT protocol.

[0017] 2. Pop-up alert: The real-time alert pop-up on the client screen is extremely eye-catching, which can immediately attract the user's attention. The detailed alert information in the pop-up (areaName, devName, alarmLevel, resourceUrl, updateTime, etc.) allows the user to quickly understand the nature, severity, and related location of the problem, so that the user can quickly make a judgment and take appropriate action.

[0018] 3. Voice assistance: The voice broadcast function further enhances the real-time nature of the alert. Even if the user cannot constantly watch the screen, the user can still be informed of the alert situation in a timely manner through voice prompts.

[0019] 4. Convenient operation experience: The user does not need to frequently check the system status, but only needs to handle the alert when it is received. This passive notification method reduces the user's operation burden and improves the user experience. At the same time, the clear and concise content of the alert pop-up and the voice broadcast allow the user to quickly locate the problem without spending a lot of time searching for the root cause of the problem. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 is a flowchart of a method for implementing real-time alert pop-up and voice broadcast based on MQTT push protocol provided by the present application. DETAILED DESCRIPTION

[0021] The technical solutions of the present application will be described in detail below with reference to the accompanying drawings, but the scope of protection of the present application is not limited to the embodiments described.

[0022] Example 1

[0023] The general idea of this embodiment is as follows: First, the real-time nature of MQTT push data is used. Then, the configuration of the related alert prompt is performed, such as the display position of the alert pop-up (the center pop-up, the upper right corner pop-up, or the lower right corner pop-up can be selected), the display mode (it can be configured as an overlay or a superposition, the overlay only displays the latest data, and the superposition displays the latest data at the top), and the closing mode (it can be set to manual closing or automatic closing, and if automatic closing is selected, the closing seconds can also be set). At the same time, the broadcast times and broadcast intervals of the alert Web voice broadcast are configured. Subsequently, the alert subscription data is processed and stored. Finally, the received MQTT message is parsed in the global entry file, and if the message is within the subscription data range, the pop-up and Web voice broadcast are processed accordingly.

[0024] A specific disclosed method for implementing real-time alert pop-up and voice broadcast based on MQTT push protocol includes the following steps:

[0025] S1. Create an MQTT connection. In the system dictionary, configure the display position, display mode, and closing mode of the pop-up on the screen. Configure the enable / disable function, number of broadcasts, and broadcast interval of Web voice broadcast. Configure the subscription type of alarm subscription. The alarm subscription subscription type includes subscription by device type and subscription by alarm level.

[0026] S1.1 Create an MQTT connection. On the system configuration page, set the IP address and port number used to create the MQTT connection, and configure the connection. Use pina to store the connection configuration in useUserStore to ensure that a global MQTT connection is automatically created when the system loads.

[0027] S1.2 Alarm Pop-up Configuration:

[0028] Pop-up position configuration: Configure the display position of the pop-up on the screen, supporting center pop-up, top right corner pop-up, and bottom right corner pop-up;

[0029] Pop-up display configuration: Provides two display modes: overlay and superimposed, allowing users to choose the pop-up display style;

[0030] Closing method configuration: Supports manual closing and automatic closing. The automatic closing function can be set to close after a specified number of seconds.

[0031] The data format of the configuration pop-up is: {dictModel": "alarm-dialog-dict","dictLabel":"Alarm pop-up configuration","dictValue": [{"enable":"true","closeSeconds":5,"dialogPosition":0,"multipShow":"0","closeType":"0"}],"dictId":**,"remark":"Alarm pop-up configuration: enable: true to show, false to hide; dialogPosition: display position, 0 center, 1 top right corner, 2 bottom right corner; multipShow: multiple displays, 0: cover, 1: overlay; closeType: closing method; 0: manual; 1: automatic; closeSeconds: number of seconds to close"}.

[0032] The alarm pop-up box is displayed according to the configuration. If it is not turned on, no pop-up box will be prompted after the whole system alarms. The display position (center pop-up box, upper right corner pop-up box, lower right corner pop-up box), display mode (overlay <only display the latest one>, superposition <new alarm on top>) and closing mode (manual closing, automatic closing) of the pop-up box can be selected. When the closing mode is automatic closing, the number of seconds after which it will be closed can be set, and it can be manually closed during this period.

[0033] S1.3, Web voice broadcast configuration:

[0034] Enable / disable voice broadcast function: Provide a setting in the configuration whether to enable voice broadcast. When disabled, no voice broadcast will be performed.

[0035] Broadcast times configuration: The number of voice broadcasts can be set. When an alarm occurs, voice broadcast will be performed according to the set number of times.

[0036] Broadcast interval configuration: Set the interval time of alarm voice broadcast, i.e. the time interval between two broadcasts.

[0037] The data format of Web voice broadcast configuration is: {"dictModel": "alarm-speek-broadcast", "dictLabel": "Web voice alarm broadcast configuration item", "dictValue": [{"times": "1", "enable": "true", "interval": "3"}], "dictId": 120, "remark": "Web voice alarm broadcast: times: broadcast times, default 5 times; interval: broadcast interval, default 3 seconds"}.

[0038] S1.4, alarm subscription configuration:

[0039] Subscription by device type: Configure the enablement or disablement of alarm pop-up box and voice broadcast by device type. When the device enables the related function, trigger the alarm pop-up box or voice broadcast. Device types can include real-time devices, system devices and servers.

[0040] Subscription by alarm level: Configure the enablement or disablement of alarm pop-up box and voice broadcast by alarm level. Support four levels of pre-warning, general alarm, serious alarm and critical alarm, and configure the corresponding processing mode according to the alarm level. Alarm levels can be divided into pre-warning, general alarm, serious alarm and critical alarm.

[0041] The data format for configuring alarm subscription is: {"dictModel": "alarm-subscrip-sys", "dictLabel": "alarm subscription type & level", "dictValue": [{"typeSub": "true", "levelSub": "false"}], "dictId": 121, "remark": "alarm subscription: typeSub: subscribe by type; true is false, levelSub: subscribe by level; true is false"}.

[0042] S2, when subscribing to the alarm topic, the triggering conditions of the alarm pop-up box and the Web voice broadcast are managed by defining two arrays, dialogTrueList and voiceTrueList:

[0043] If the subscription by device type is activated, the device type and its corresponding alarm pop-up box mode, including on and off, are stored in the array dialogTrueList; the device type and its corresponding Web voice broadcast mode, including on and off, are stored in the array voiceTrueList.

[0044] If the subscription by alarm level is activated, the alarm level and its corresponding alarm pop-up box mode, including on and off, are stored in the array dialogTrueList; the alarm level and its corresponding Web voice broadcast mode, including on and off, are stored in the array voiceTrueList.

[0045] S3, the alarm steps after receiving the MQTT message of the alarm are:

[0046] S3.1 If the subscription by device type is activated, after receiving the MQTT message of the alarm, whether the device type typeId in the received push message is in the dialogTrueList list is determined, if it exists, whether to call the pop-up box configuration in the system dictionary according to the pop-up box mode in the list is determined; at the same time, whether the typeId in the message is in the voiceTrueList list is determined, if it exists, whether to call the Web voice broadcast configuration in the system dictionary according to the Web voice broadcast mode in the list is determined.

[0047] In this embodiment, the data format of the received alarm MQTT message is: {"alarmId": 4198,"alarmLevel": 2,confirmState":"WAIT","devId": 58,"areaName":"Area 1" ,"devName": "Device 7","deviceId": 5,"deviceType": 5,"execId": 1183,"typeName":"Belt Tear","pointId": 6039,"time":1719388977000,"typeId":48,"updateTime":1731304349000,"resourceUrl":" / home / resource / belt / 2024-11-1 / BELT-1721304760406.jpg"}.

[0048] Based on the typeId in the message, determine whether it is in the dialogTrueList list. If it exists, display a pop-up message according to the pop-up configuration. At the same time, determine whether the typeId is in the voiceTrueList list. If it exists, play the corresponding voice message according to the configuration.

[0049] S3.2 If subscribing by alarm level, upon receiving an alarm MQTT message, determine whether the alarm level (alarmLevel) in the message is in the dialogTrueList. If it exists, determine whether to invoke the dialog configuration in the system dictionary based on the dialog mode in the list. Simultaneously, determine whether the alarm level in the message is in the voiceTrueList. If it exists, determine whether to invoke the Web voice broadcast configuration in the system dictionary based on the Web voice broadcast mode in the list.

[0050] In this embodiment, the data format of the received alarm MQTT message is: {"alarmId": 4198,"alarmLevel": 2,confirmState":"WAIT","devId": 58,"areaName":"Area 1" ,"devName": "Device 7","deviceId": 5,"deviceType": 5,"execId": 1183,"typeName":"Belt Tear","pointId": 6039,"time":1719388977000,"typeId":48,"updateTime":1731304349000,"resourceUrl":" / home / resource / belt / 2024-11-1 / BELT-1721304760406.jpg"}.

[0051] Based on the alarmLevel in the message, check if it is in the dialogTrueList. If it is, display a pop-up message according to the pop-up configuration. At the same time, check if alarmLevel is in the voiceTrueList. If it is, play the voice message according to the configuration.

[0052] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims

1. A method for implementing real-time alarm pop-ups and voice broadcasts based on the MQTT push protocol, characterized in that, Includes the following steps: S1. Create an MQTT connection. In the system dictionary, configure the display position, display mode, and closing mode of the pop-up on the screen. Configure the enable / disable function, number of broadcasts, and broadcast interval of Web voice broadcast. Configure the subscription type of alarm subscription. The subscription type of alarm subscription includes subscription by device type and subscription by alarm level. S2. When subscribing to alert topics, manage the triggering conditions for alert pop-ups and web voice broadcasts by defining two arrays, dialogTrueList and voiceTrueList: If a subscription by device type is activated, the array dialogTrueList stores the device type and its corresponding alarm pop-up mode, including enabled and disabled; the array voiceTrueList stores the device type and its corresponding Web voice broadcast mode, including enabled and disabled. If subscription by alarm level is activated, the array dialogTrueList stores the alarm level and its corresponding alarm pop-up mode, including enabled and disabled; the array voiceTrueList stores the alarm level and its corresponding Web voice broadcast mode, including enabled and disabled. S3. If subscribing by device type, upon receiving an alarm MQTT message, determine whether the device type (typeId) in the received push message is in the dialogTrueList list. If it exists, determine whether to call the dialog configuration in the system dictionary based on the dialog mode in the list; simultaneously, determine whether the device type (typeId) in the message is in the voiceTrueList list. If it exists, determine whether to call the Web voice broadcast configuration in the system dictionary based on the Web voice broadcast mode in the list. If subscribing by alarm level, upon receiving an alarm MQTT message, the system checks whether the alarm level (alarmLevel) in the message is in the dialogTrueList. If it is, the system determines whether to invoke the dialog configuration in the system dictionary based on the dialog mode in the list. Simultaneously, the system checks whether the alarm level in the message is in the voiceTrueList. If it is, the system determines whether to invoke the Web voice broadcast configuration in the system dictionary based on the Web voice broadcast mode in the list.

2. The method for implementing real-time alarm pop-ups and voice broadcasts based on the MQTT push protocol according to claim 1, characterized in that, In the system dictionary, configure the pop-up display position, including the center pop-up, the upper right corner pop-up, and the lower right corner pop-up; configure the pop-up display mode: including overlay pop-ups and superimposed pop-ups; configure the pop-up closing mode: including manual closing and automatic closing, where the automatic closing function sets the display duration.

3. The method for implementing real-time alarm pop-ups and voice broadcasts based on the MQTT push protocol according to claim 2, characterized in that, The data format of the configuration dialog is: {dictModel": "alarm-dialog-dict","dictLabel":"Alarm dialog configuration","dictValue": [{"enable":"true","closeSeconds":5,"dialogPosition":0,"multipShow":"0","closeType":"0"}],"dictId":**,"remark":"Alarm dialog configuration: enable: true to show, false to hide, dialogPosition: display position, 0 center, 1 top right corner, 2 bottom right corner; multipShow: multiple displays, 0: cover, 1: overlay; closeType: close method; 0: Human effort; 1: Automatic; closeSeconds: Number of seconds to close.

4. The method for implementing real-time alarm pop-ups and voice broadcasts based on the MQTT push protocol according to claim 1, characterized in that, The data format for configuring Web voice broadcast in step S1 is as follows: {"dictModel": "alarm-speek-broadcast","dictLabel":"Web voice alarm broadcast configuration item","dictValue": [{"times":"1","enable": "true","interval": "3"}],"dictId": 120,"remark": "Web voice alarm broadcast: times: number of broadcasts, default 5 times; interval: broadcast interval, default 3 seconds"}.

5. The method for implementing real-time alarm pop-ups and voice broadcasts based on the MQTT push protocol according to claim 1, characterized in that, In step S1, the data format for configuring alarm subscription is: {"dictModel": "alarm-subscrip-sys","dictLabel": "alarm subscription type & level","dictValue": [{"typeSub": "true","levelSub": "false"}],"dictId": 121,"remark": "alarm subscription: typeSub: by type; true is false, levelSub: by level; true is false, levelSub: by level, true is false, levelSub: by level, true is false, levelSub: levelSub: by level, levelSub: ... true is false, levelSub: true is false, levelSub: true is false, levelSub: true is false, levelSub: true is false,

Citation Information

Patent Citations

  • Voice alarm method and device and computer equipment

    CN118015764A

  • Alarm sounding system and method and terminal equipment

    CN118506504A