A data monitoring method based on NB communication module
The NB communication module addresses the challenge of timely alarm reporting and power consumption in industrial instruments by implementing regular data reading and reporting with immediate alerts and low power modes, ensuring efficient and cost-effective communication.
Patent Information
- Application Number
- CN202311274418.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2043-09-28
AI Technical Summary
Existing industrial instruments using NB-IoT communication face challenges with timely alarm reporting and high power consumption, especially when requiring frequent data updates or instrument parameter modifications.
A data monitoring method utilizing an NB communication module that reads data at regular intervals, saves it in a file, and reports it to the cloud at set intervals, with immediate reporting for alarms and parameter changes, and enters low power consumption mode when idle.
Enables timely reporting of instrument alarms and parameter changes while maintaining low power consumption, suitable for low-power systems and reducing communication costs.
Smart Images

Figure CN117336689B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of NB communication technology, and in particular to a data monitoring method based on a NB communication module. Background Art
[0002] Most industrial field measurements use independent instruments. With the advancement of technology, people have an increasingly strong demand for cloud-based instruments. Most industrial instruments generally only support 485 communication and use the MODBUS standard protocol. Relatively few can directly support wireless communication. The traditional method uses wireless modules for data forwarding, and the cloud initiates data reading for each meter. According to the communication principle, wireless communication includes: 3G, 4G, 5G and NB-Iot (Narrowband Internet of Things, referred to as NB), etc. 3G, 4G and 5G generally use constant connection, and data reading is initiated by the cloud, while NB-Iot narrowband communication can only support slow data reading. At present, it generally adopts the reporting type, reporting data once every half an hour or longer. When it is needed every minute or faster, only 4G communication can be used. The 4G communication method requires constant connection, high power consumption, is not suitable for use in some low-power systems, and is expensive. NB-Iot can achieve low power consumption, but the communication is not timely, the communication interval is large, and when the instrument alarm or other accidents occur, the relevant information cannot be reported to the platform in time. Summary of the invention
[0003] Based on this, the present application provides a data monitoring method based on an NB communication module to solve the problem of how to achieve timely instrument alarm reporting and low instrument power consumption.
[0004] The present application provides a data monitoring method based on an NB communication module, comprising:
[0005] The NB communication module is used to read data from the meter at regular intervals, and the data is saved in a data recording file at regular intervals, and the data recording file is centrally reported to the cloud at regular intervals;
[0006] Set the time period T1 of the monitoring instrument data, the time period T2 of the recording data, the data register and the reporting time period T3; when an alarm message is generated, start reporting immediately, the cloud receives the alarm message, processes the alarm message and pushes the data to the user end, and the user end displays the alarm message to remind the user;
[0007] When the instrument is running and the instrument setting parameters are modified to generate event information, immediate reporting is initiated, the cloud receives the event information, processes the event information, and pushes the modified instrument setting parameters to the user end, and the user end updates the instrument display parameter information;
[0008] The NB communication module communicates with the instrument using the Modbus protocol. The NB communication module reads data from the instrument at a fixed time T1 and saves the read data to a data recording file at a time period T2, and reports the data recording file to the cloud at a fixed time interval T3.
[0009] Methods for setting the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 include PC software setting and cloud setting.
[0010] When the time period T1 of the monitoring instrument data, the time period T2 of the recording data, the data register and the reporting time period T3 are set by PC software, after the serial port of the PC software is successfully connected to the 485 serial port of the wireless communication module, the time of T1, T2 and T3 and the data register that needs to send data are set by the PC software. After the PC software setting is completed, the module starts working.
[0011] When the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 are set in the cloud, the cloud will send the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 when the module is powered on for the first time to register the device in the cloud;
[0012] When the wireless communication module sends a registration frame to the cloud, if the cloud has configured T1, T2 and T3 time and data register commands, it will send commands for related data.
[0013] When an instrument fails to operate or the instrument detection data is abnormal, an alarm message will be generated, and the immediate report will be initiated. The cloud receives the alarm message, and the specific operations for processing the alarm message include:
[0014] When the NB communication module reads the instrument data in each T1 time period and finds that the instrument has alarm information, the NB communication module starts to report immediately and sends it to the cloud; after receiving the alarm data, the cloud pushes the data to the user's mobile phone App software and displays the alarm information on the App software to remind the user.
[0015] After receiving the alarm information, the user can confirm the instrument alarm and modify the parameters as needed. When the instrument parameters are modified, a parameter modification event will be triggered and an event report will be generated. When the module reads the instrument data in each T1 time period and finds event report information, it will start reporting immediately and send it to the cloud. After receiving it, the cloud will push it to the user's App, and update the instrument display parameter information in the App.
[0016] When there is no alarm information or parameter modification event reported, the NB communication module enters a low power consumption state, and the CPU also enters a low power consumption processing mode. At this time, the NB communication module communicates with the instrument every T1 time;
[0017] When it is necessary to report alarm information and parameter modification events, the CPU wakes up the NB communication module from a low-power sleep state.
[0018] Beneficial effect: The NB communication module used in this application can not only solve the communication problem of continuously uploading the collected data of industrial instruments to the cloud, but also upload the relevant data to the cloud in time when an alarm or abnormal operation occurs, and can easily be networked and meet the low power consumption requirements of the instrument.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
[0021] Figure 1 It is a timing diagram of module monitoring, recording and reporting provided in this application;
[0022] Figure 2 It is a data cycle reporting flow chart provided in this application;
[0023] Figure 3 It is a device registration flow chart provided according to this application;
[0024] Figure 4 It is a flowchart for reporting alarm information provided in this application;
[0025] Figure 5 It is a schematic diagram of the NB communication module provided in this application;
[0026] Figure 6 It is a data collection flow chart provided according to this application;
[0027] Figure 7 It is the alarm information upload flow chart provided in this application;
[0028] Figure 8 It is a NB communication flow chart provided according to this application;
[0029] Fig. 9 This is a diagram of an alarm application scenario based on the NB communication module provided in this application. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0031] S1: Use the NB communication module to read data from the meter regularly, save the data to the data record file at a certain time interval, and report the data record file to the cloud at a certain time interval. It should be noted that:
[0032] The NB communication module communicates with the instrument using the Modbus protocol. The NB communication module reads data from the instrument at a fixed time T1 and saves the read data to a data recording file at a time period T2, and reports the data recording file to the cloud at a fixed time interval T3.
[0033] S2: When the time period T1 of the monitoring instrument data, the time period T2 of the recording data, the data register and the reporting time period T3 are set by PC software, after the serial port of the PC software is successfully connected to the 485 serial port of the wireless communication module, the time of T1, T2 and T3 and the data register to send data are set by the PC software. After the PC software setting is completed, the module starts working. The timing diagram of module monitoring, recording and reporting is as follows: Figure 1 It should be noted that:
[0034] Methods for setting the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 include PC software setting and cloud setting.
[0035] When the time period T1 for monitoring instrument data, the time period T2 for recording data, the data register and the reporting time period T3 are set by PC software, after the serial port of the PC software is successfully connected to the 485 serial port of the wireless communication module, the time of T1, T2 and T3 and the data register to send data are set by the PC software. After the PC software setting is completed, the module starts working, that is, data is sent once for the T3 time period. The NB communication module will read the data of the instrument every T1, save the data once every T2, and report it to the cloud at one time in the T3 time period.
[0036] like Figure 2 As shown, when the reporting cycle T3 is reached, the wireless communication module establishes a communication connection and reports the data stored in T3. After the transmission is successful, if there is no command sent from the cloud, the communication is terminated.
[0037] When the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 are set in the cloud, the cloud will send the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 when the module is powered on for the first time to register the device in the cloud;
[0038] When the wireless communication module sends a registration frame to the cloud, if the cloud has configured T1, T2 and T3 time and data register commands, it will send commands for related data.
[0039] like Figure 3 As shown, after the wireless communication module obtains the information of the instrument, it starts to start the communication, establishes the communication connection, sends a registration frame to register the device on the business cloud, and after the cloud receives the registration frame, it sends the data reporting register and the alarm register according to the instrument type.
[0040] S3: When the instrument is running and the instrument setting parameters are modified to generate event information, immediate reporting is initiated, the cloud receives the event information, processes the event information, and pushes the modified instrument setting parameters to the user end, and the user end updates the instrument display parameter information. It should be noted that:
[0041] When an instrument fails to operate or the instrument detection data is abnormal, an alarm message will be generated, and the immediate report will be initiated. The cloud receives the alarm message, and the specific operations for processing the alarm message include:
[0042] When the module reads the instrument data in each T1 time period and finds that the instrument has alarm information, the module starts to report immediately and sends it to the cloud; after receiving the alarm data, the cloud pushes the data to the user's mobile phone App software and displays the alarm information on the App software to remind the user. For example: the user connects to the instrument related to water level measurement. When the water level exceeds the alarm water level, the water level measurement instrument generates an alarm information. The NB wireless module reads the instrument data. When it finds that there is a water level alarm information, it immediately starts to report the alarm information. After receiving the alarm information, the cloud pushes it to the customer's mobile phone App and displays the alarm water level information in the App software.
[0043] like Figure 4 As shown, when the instrument fails to operate or the instrument detection data is abnormal, an alarm message is generated. After the wireless communication module queries and obtains the alarm message, a wireless communication connection is established and the alarm data is reported to the cloud. If the cloud does not send a command, the communication is terminated.
[0044] After receiving the alarm information, the user can confirm the instrument alarm and modify the parameters as needed. When the instrument parameters are modified, a parameter modification event will be triggered and an event report will be generated. When the module reads the instrument data in each T1 time period and finds event report information, it will start reporting immediately and send it to the cloud. After receiving it, the cloud will push it to the user's App, and update the instrument display parameter information in the App.
[0045] When there is no alarm information or parameter modification event reported, the module enters a low power consumption state, and the CPU also enters a low power consumption processing mode. At this time, the module and the instrument communicate once every T1 time;
[0046] Since the data register addresses where the instrument data is located are not continuous, multiple MODBUS addresses can be set for data periodic reporting.
[0047] The NB communication module includes a module, a CPU, a wireless transmission module and a power supply. Figure 5 As shown;
[0048] The module is used for data communication with the cloud and is responsible for sending and receiving data;
[0049] The CPU is used to wake up the module and communicate with the instrument, and save the data record file;
[0050] The wireless transmission module is used to send and receive data;
[0051] The power supply is used to supply power to the module, CPU and wireless transmission module.
[0052] The following flowchart is based on the example of setting the data recording time period to 1S, the storage time period to 30S, and the reporting time period to 30 minutes.
[0053] like Figure 6 As shown, the NB communication module collects data from the instrument every 1S, and stores it in the internal RAM in chronological order. After 30S of collection, it is stored in the FLASH. After 30 minutes, the data of 60 moments stored in the FLASH is read and sent.
[0054] like Figure 7 As shown, the NB communication module queries the alarm status register every 1S to obtain the alarm status identifier and whether an alarm is generated. If an alarm is generated, the alarm information is read, wireless communication is started, and the alarm information is uploaded.
[0055] like Figure 8As shown in the figure, the low power consumption mode of the module is PSM mode. If the PSM mode fails to be entered, the module will be powered off. At this time, the overall equipment can ensure the lowest power consumption. During the first communication, the NB module is powered off and then powered on. After attaching to the base station and logging into the platform, data is sent after success. At this time, if a command is received from the server, the command is parsed; if no command is received and the idle time is up, the NB module is set to enter PSM mode. When entering PSM mode fails, the power is turned off to maintain the minimum function; if PSM is successfully entered, the NB module is powered on and is in PSM mode. During the next communication, if the power needs to be turned on again in the case of power failure, the process of attaching to the base station and logging into the platform will be followed; if in PSM mode, the module is woken up to log in to the platform.
[0056] like Fig. 9 As shown, after the NB module is connected to the ultrasonic level meter, the ultrasonic level meter, the server cloud and the user's mobile phone form a complete water tank level monitoring system.
[0057] Set the ultrasonic level meter to 7.5m from the low alarm level of the water tank, 3.5m from the high alarm interface of the water tank, and 5.5m from the water surface for alarm recovery. Set the data on the water tank level to be collected once every 1s, saved every 30s, and reported every 30 minutes.
[0058] Under normal circumstances, when the water level of the water tank is between 0.5m-4.5m, the NB module sends the water level information of the water tank every 30 minutes.
[0059] When the water level in the tank drops to 0.5 meters, the ultrasonic level meter will immediately generate a low water level alarm after detecting it. After the NB module queries the alarm information, it will immediately start reporting the low water level alarm information to the cloud. After receiving the alarm information, the cloud will push the alarm information to the user's mobile phone, and the mobile phone interface will display the low tank level alarm. When the user learns that the tank level is low, he will reduce or close the outlet valve, open or increase the water inlet valve, and inject water into the tank. When the ultrasonic level meter detects that the distance from the tank level is 5.5, it will generate a message that the water surface has returned to normal, and an alarm recovery event will be generated at the same time. When the NB module queries the alarm recovery event, it will report the message to the cloud, and the cloud will push it to the user's mobile phone. At this time, the mobile phone will display that the tank level is normal.
[0060] When the water level in the tank is added to 4.5 meters, the ultrasonic level meter will immediately generate a high water level alarm message after detecting it. After the NB module queries the alarm message, it will immediately start reporting the high water level alarm message to the cloud. After receiving the message, the cloud will push the message to the user's mobile phone, and the mobile phone interface will display the high tank level alarm. When the user learns that the tank level is high, he closes or reduces the water inlet valve and increases the water outlet valve. When the water in the tank flows out to 5.5ms, the ultrasonic level meter detects that the distance to the tank level is 5.5, and generates a message that the water surface has returned to normal, and an alarm recovery event is generated at the same time. When the NB module queries the alarm recovery event, it reports the message to the cloud, and the cloud pushes it to the user's mobile phone. At this time, the mobile phone displays that the tank level is normal.
[0061] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A data monitoring method based on NB communication module, characterized in that: include: The NB communication module is used to read data from the meter at regular intervals, and the data is saved in a data recording file at regular intervals, and the data recording file is centrally reported to the cloud at regular intervals; Set the time period T1 of the monitoring instrument data, the time period T2 of the recording data, the data register and the reporting time period T3; when an alarm message is generated, start reporting immediately, the cloud receives the alarm message, processes the alarm message and pushes the data to the user end, and the user end displays the alarm message to remind the user; The NB communication module communicates with the instrument using the Modbus protocol. The NB communication module reads data from the instrument at a fixed time T1 and saves the read data to a data record file at a time period T2, and reports the data record file to the cloud at a fixed time interval T3; When the instrument is running and the instrument setting parameters are modified to generate event information, immediate reporting is initiated, the cloud receives the event information, processes the event information, and pushes the modified instrument setting parameters to the user end, and the user end updates the instrument display parameter information; When an instrument fails to operate or the instrument detection data is abnormal, an alarm message will be generated, and the immediate report will be initiated. The cloud receives the alarm message, and the specific operations for processing the alarm message include: When the NB communication module reads the instrument data in each T1 time period and finds that the instrument has an alarm message, the NB communication module starts to report immediately and sends it to the cloud; After receiving the alarm data, the cloud pushes the data to the user's mobile phone App software, and displays the alarm information on the App software to remind the user; The cloud can send data to the module within the specified time after reporting; At this time, the module receives data. If it is communication with the instrument, the module needs to forward it to the instrument and report it to the cloud after the instrument responds. When alarm information and parameter modification events need to be reported, the CPU wakes up the module from a low-power sleep state.
2. According to claim 1, a data monitoring method based on NB communication module is characterized in that: Methods for setting the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 include PC software setting and cloud setting.
3. A data monitoring method based on NB communication module according to claim 2, characterized in that: When the time period T1 of the monitoring instrument data, the time period T2 of the recording data, the data register and the reporting time period T3 are set by PC software, after the serial port of the PC software is successfully connected to the 485 serial port of the wireless communication module, the time of T1, T2 and T3 and the data register that needs to send data are set by the PC software. After the PC software setting is completed, the module starts working.
4. The data monitoring method based on the NB communication module according to claim 2 is characterized in that: When the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 are set in the cloud, the cloud will send the time period T1 of monitoring instrument data, the time period T2 of recording data, the data register and the reporting time period T3 when the module is powered on for the first time to register the device in the cloud; When the wireless communication module sends a registration frame to the cloud, if the cloud has configured T1, T2 and T3 time and data register commands, it will send commands for related data.
5. The data monitoring method based on the NB communication module according to claim 4 is characterized in that: After receiving the alarm information, the user can confirm the instrument alarm and modify the parameters according to the needs. When the instrument parameters are modified, the parameter modification event will be triggered and the event report will be generated; When the module reads the instrument data and finds event reporting information in each T1 time period, it starts reporting immediately and sends it to the cloud. After the cloud receives it, it pushes it to the user's App and updates the instrument display parameter information in the App.
6. A data monitoring method based on NB communication module according to claim 5, characterized in that: When there is no alarm information or parameter modification event reported, the NB communication module enters a low power consumption state, and the CPU also enters a low power consumption processing mode. At this time, the NB communication module communicates with the instrument every T1 time; When alarm information and parameter modification events need to be reported, the CPU wakes up the NB communication module from a low-power sleep state.
Citation Information
Patent Citations
Early warning information active reporting method and system based on Modbus protocol
CN110704265A
Low-power-consumption internet-of-things platform supporting long connection and equipment and management method of low-power-consumption internet-of-things platform
CN115037600A
Gas remote monitoring device, method and system and storage medium
CN115734101A
Abnormal event processing method and device
CN116801292A
