CN109459960B - NB-IoT-based Internet of things acquisition control system and control method - Google Patents

NB-IoT-based Internet of things acquisition control system and control method Download PDF

Info

Publication number
CN109459960B
CN109459960B CN201811511616.XA CN201811511616A CN109459960B CN 109459960 B CN109459960 B CN 109459960B CN 201811511616 A CN201811511616 A CN 201811511616A CN 109459960 B CN109459960 B CN 109459960B
Authority
CN
China
Prior art keywords
data
iot
acquisition
unit
management unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811511616.XA
Other languages
Chinese (zh)
Other versions
CN109459960A (en
Inventor
陈云龙
王小兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN201811511616.XA priority Critical patent/CN109459960B/en
Publication of CN109459960A publication Critical patent/CN109459960A/en
Application granted granted Critical
Publication of CN109459960B publication Critical patent/CN109459960B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25314Modular structure, modules

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer And Data Communications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an NB-IoT (network B-IoT) -based Internet of things acquisition control system and method, and the NB-IoT-based Internet of things acquisition control system comprises an MCU (microprogrammed control Unit), and a power supply module, an acquisition module and an NB module which are connected with the MCU, wherein the MCU comprises a main control unit, and a data management unit, a time management unit, a command processing unit, a data acquisition unit, a system parameter management unit and an NB-IoT communication management unit which are respectively connected with the main control unit. And the control method of the NB-IoT-based Internet of things acquisition control system comprises the following steps: system initialization and system parameter configuration; establishing a connection with an NB-IoT platform; and entering a working cycle, wherein the working cycle comprises data acquisition, data uploading and command processing. The invention has accurate acquisition time and no accumulated error, realizes the data safety and reduces the data loss rate by matching the FRAM data storage medium with a data operation management mechanism, and has high data safety.

Description

NB-IoT-based Internet of things acquisition control system and control method
Technical Field
The invention relates to the technical field of Internet of things communication, in particular to an NB-IoT-based Internet of things acquisition control system and method.
Background
The existing internet of things collection equipment is divided into a wired collection mode and a wireless collection mode according to a connection mode, the installation and maintenance cost of the wired collection mode is high, and the coverage range is limited. Technologies for wireless long-distance transmission include GPRS, CDMA, LTE, NB-IoT, and the like, wherein compared with other wireless acquisition modes, NB-IoT has the outstanding characteristics of wide coverage, low power consumption, low cost, large connection, and the like, and is more suitable for data acquisition of the internet of things with small communication data volume. The existing acquisition equipment based on the NB-IoT technology mainly uses simple acquisition-uploading to replace the traditional manual operation, on one hand, the acquisition frequency is low, usually twice a month, the accuracy of the acquisition time is not greatly required, and the accuracy of the acquisition time is lower; on the other hand, in the simple acquisition-uploading application scenario, the sensitivity to data loss is low, and a reliable data security management mechanism is not available. In recent years, with the development of the internet of things and big data, the combination of the internet of things and big data will put more strict requirements on acquisition time accuracy and data loss rate, and the existing NB-IoT acquisition equipment is difficult to meet the requirements.
Disclosure of Invention
The invention aims to provide an NB-IoT-based Internet of things acquisition control system and a control method, which are used for solving the problems of low acquisition time accuracy and high data loss rate in the prior art.
The invention solves the problems through the following technical scheme:
the utility model provides a thing networking collection control system based on NB-IoT, includes MCU and the power module who is connected with MCU, gathers module and NB module, MCU includes the main control unit, respectively with data management unit, time management unit, command processing unit, data acquisition unit, system parameter management unit, NB-IoT communication management unit and the watchdog unit that the main control unit is connected, wherein:
the data management unit is used for setting a data management mechanism for ensuring that the data cannot be lost before uploading, and storing the acquired data in a storage medium;
the time management unit is used for managing the local RTC and controlling the time of each data acquisition;
the command processing unit is used for analyzing and sending commands issued by the NB-IoT platform;
the data acquisition unit is used for controlling the acquisition module to communicate with the acquired equipment and acquiring data;
the system parameter management unit is used for managing the operation parameters of the system, including initializing working parameters when the system is started, checking the validity of the parameters and executing system parameter management after receiving a configuration command;
the NB-IoT communication management unit is used for controlling the NB module to receive commands issued by the NB-IoT platform and report data to the NB-IoT platform;
the main control unit: for coordinating the above units.
Furthermore, the MCU is also connected with a debugging/configuring module, and the debugging/configuring module is used for the communication between the MCU and the upper computer.
Further, the data management mechanism specifically includes:
A. after the acquisition unit finishes the data acquisition in sequence, immediately storing the data in a flash;
B. setting an NB-IoT communication management unit as the only unit with the permission to delete data, storing the acquired data in a storage medium according to segment, and allowing the segment to execute data clearing operation after the data of the segment is successfully uploaded;
C. and in the process of each data operation, if an exception occurs, reading data from the flash again.
The control method of the NB-IoT-based Internet of things acquisition control system comprises the following steps:
step S100: system initialization and system parameter configuration;
step S200: establishing a connection with an NB-IoT platform;
step S300: and entering a working cycle, wherein the working cycle comprises data acquisition and data uploading.
Further, the step S300 specifically includes:
step S310: checking the acquisition mark and the uploading mark, and immediately clearing the mark when the acquisition mark is set;
step S320: acquiring data, sending a command to equipment through an RS485 bus to acquire equipment data, storing the acquired data into a cache, recombining the data according to a protocol and storing the data into a flash, and clearing the cache;
step S330: waiting for the setting of an uploading flag, and immediately clearing the flag when the uploading flag is set;
step S340: uploading data: reading data of a segment unit from the flash, and uploading the data to an NB-IoT platform through an NB module;
step S350: waiting for receiving response messages of the NB-IoT platform, and deleting corresponding data in the flash when the correct response messages are received, indicating that the data are uploaded successfully; the process returns to step S310.
Further, before checking the acquisition flag and the upload flag, the step S310 further includes reconfiguring a watchdog unit in the MCU.
Further, in step S350, the NB module is set to a storage receiving mode, and when the server issues a command through the NB-IoT platform, the NB module stores the received command message and waits for the MCU to be taken away.
Compared with the prior art, the invention has the following advantages and beneficial effects:
the invention has accurate acquisition time and no accumulated error, realizes the data safety and reduces the data loss rate by matching the FRAM data storage medium with a data operation management mechanism, and has high data safety.
Drawings
FIG. 1 is a schematic block diagram of the system of the present invention;
FIG. 2 is a flow chart of the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, but the embodiments of the present invention are not limited thereto.
Example 1:
with reference to fig. 1, an NB-IoT-based internet of things acquisition control system includes: the device comprises two parts: one is a peripheral function part, including: power module, debugging/configuration module, collection module and NB module, NB module communication connection has NB-IoT platform, and second is the management control part who constitutes by MCU, realizes gathering controlling means's each item function, specifically includes: the system comprises a main control unit, a data management unit, a time management unit, a command processing unit, a data acquisition unit, a system parameter management unit, an NB-IoT communication management unit, a watchdog unit and a watchdog unit, wherein:
(1) data management unit
The data management unit is responsible for managing the data of gathering, adopts FRAM as data storage medium, even unexpected outage can not lose the data that have been stored to and adopt data processing mechanism, guarantee under the circumstances that the memory is not full, gather the data and can not lose before successfully uploading, improve data security, reduce the probability of losing data. The data management mechanism consists of three items:
a. a first time storage mechanism: after the acquisition unit finishes one-time data acquisition, immediately storing the data in a flash;
b. authority control + conditional control mechanism: the NB-IoT communication management unit is the only unit with the authority of deleting data; the collected data is stored in the storage medium according to the segments, and the only condition for allowing the data clearing operation to be executed on each segment is that the data on the segment is successfully uploaded;
c. an abnormal rereading mechanism: in each data operation process, if an exception occurs, data is read from the flash again for processing, and unexpected change of the data caused by the exception is prevented.
(2) Time management unit
The time management unit is responsible for managing the local RTC and has two main functions: the accuracy of a local real-time clock is ensured; the time of each acquisition is controlled.
(3) Command processing unit
The command processing unit is responsible for analyzing commands issued by the service end through the NB-IoT platform and calling the corresponding functional units to complete operations required by the commands.
(4) Data acquisition unit
The data acquisition unit is responsible for communicating with the acquired equipment and acquiring data from the specified equipment.
(5) System parameter management unit
The system parameter management unit is responsible for managing all the operating parameters of the acquisition control device and comprises: initializing working parameters when a system is started, and checking the validity of the parameters; and executing corresponding system parameter management after receiving a configuration command from a remote or serial port.
(6) NB-IoT communication management unit
The NB-IoT communication management unit mainly accomplishes two tasks: reporting data to an NB-IoT platform; and secondly, receiving a command issued by the server through the NB-IoT platform.
(7) Master control unit
The MCU main control unit is responsible for coordinating and managing the functional units and maintaining the normal operation of the system.
(8) Watchdog unit
And is responsible for providing the watchdog reset function.
Example 2:
with reference to fig. 1 and fig. 2, a control method of an NB-IoT-based internet of things acquisition control system includes:
(1) initializing the system: configuring related registers mainly related to a watchdog closing unit, a system clock RTC configuration, interruption starting, serial port initialization, flash storage area initialization and the like according to data and a hardware schematic diagram provided by a hardware manufacturer;
(2) and (3) system parameter configuration: and outputting the current software version information, acquiring and checking system parameters from a storage medium, and supporting the setting of the system parameters from the debugging serial port at this stage. The configured system parameters comprise protocol types, acquisition frequency, uploading frequency, the number of acquired devices, platform IP addresses, port numbers, addresses of devices to be acquired and the like;
(3) establishing NB network connection: the main control unit sends a series of instructions to the NB module, establishes connection with the NB-IoT platform, and comprises the following steps: resetting the NB module, checking the working state of the NB module, setting an automatic registration network, inquiring current NCDP information, reading an SIM (subscriber identity module), opening a radio frequency, acquiring the type of an operator, acquiring an IMEI (international mobile equipment identity) serial code of the NB module, attaching and registering to the NB network, and acquiring network time;
(4) collecting and uploading for the first time: determining the first acquisition time according to the system parameters and a local real-time clock, acquiring Greenwich mean time through an NB (NB) network when the first acquisition time is reached, calculating compensation time, calculating the next acquisition time by combining the system parameters, reconfiguring an RTC (real time clock) and an Alarm thereof, and then executing one acquisition and uploading; fixed time uploading is adopted instead of a method of calculating time intervals, so that the accumulation of error time is avoided, the following operation is not influenced by the failure of the previous operation, and the accurate control on acquisition management is realized;
(5) entering a working cycle: the acquisition control device enters a working cycle, and each cycle sequentially performs the following operations: reconfiguring watchdog unit parameters, checking acquisition upload flag and executing related operations, and querying and executing commands. When the acquisition mark or the uploading mark is set, immediately clearing the mark and executing acquisition operation or uploading operation; when a valid command is checked, executing the command, the command comprising: configuration parameters, reading system parameters, and device control commands. After the relevant operation is finished, entering the next circulation;
(6) collecting data: sending a command to equipment through an RS485 bus to acquire equipment data according to information provided by an equipment manufacturer to be acquired, storing the acquired data into a cache, recombining the data according to a protocol and storing the data into a flash, and finally emptying the cache;
(7) uploading data: reading data of a segment unit from a flash, uploading the data to an NB-IoT platform through an NB module in an instruction mode, waiting for receiving a response message of the NB-IoT platform, and deleting corresponding data in the flash when the correct response message is received, indicating that the data is uploaded successfully;
during the working cycle, the method further comprises the following steps:
(8) command management: and setting the NB module into a receiving and storing mode, and when the server side issues a command through the NB-IoT platform, storing the received command message by the NB module and waiting for the MCU to be taken away. When the query command operation is executed, the MCU acquires the command message through the instruction of the NB module, and then analyzes and executes the relevant operation.
(9) Local real-time clock management:
a. before entering a working cycle: sending an AT instruction through an NB module, acquiring Greenwich mean time from an NB network, determining compensation time according to an execution flow and equipment characteristics, further calculating the setting time of the RTC, and then configuring a relevant register according to data provided by an MCU manufacturer to set the RTC time;
b. after entering the working cycle: after the uploading mark is set every time, acquiring Greenwich mean time from the NB network, and calculating the setting time by combining the compensation time; and calculating next Alarm time according to the last Alarm time, then setting RTC and Alarm, executing the operation of the mark, and continuing waiting for the next interrupt of the Alarm after the operation is finished. Each time the local RTC clock is set, a time compensation value is determined according to a corresponding process, and finally, the set time is determined according to the time acquired from the NB network and the compensation time.
(10) Data management: the FRAM (ferroelectric RAM) is used as a data storage medium, stored data cannot be lost even if power is cut off accidentally, and the data storage medium is matched with a data management mechanism, so that the data security is greatly enhanced, and the capacity of the storage medium is selected according to the specific application requirements.
Although the present invention has been described herein with reference to the illustrated embodiments thereof, which are intended to be preferred embodiments of the present invention, it is to be understood that the invention is not limited thereto, and that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure.

Claims (6)

1. The utility model provides a thing networking collection control system based on NB-IoT, its characterized in that includes MCU and the power module, collection module and the NB module of being connected with MCU, MCU includes the main control unit, respectively with data management unit, time management unit, order processing unit, data acquisition unit, system parameter management unit, NB-IoT communication management unit and watchdog unit that the main control unit is connected, wherein:
the data management unit is used for setting a data management mechanism for ensuring that the data cannot be lost before uploading, and storing the acquired data in a storage medium; the data management mechanism specifically includes:
A. after the data acquisition unit finishes sequential data acquisition, immediately storing the data in a flash;
B. setting an NB-IoT communication management unit as the only unit with the permission to delete data, storing the acquired data in a storage medium according to segment, and allowing the segment to execute data clearing operation after the data of the segment is successfully uploaded;
C. in each data operation process, if the abnormality occurs, reading data from the flash again;
the time management unit is used for managing the local RTC and controlling the time of each data acquisition;
the command processing unit is used for analyzing and sending commands issued by the NB-IoT platform;
the data acquisition unit is used for controlling the acquisition module to communicate with the acquired equipment and acquiring data;
the system parameter management unit is used for managing the operation parameters of the system, including initializing working parameters when the system is started, checking the validity of the parameters and executing system parameter management after receiving a configuration command;
the NB-IoT communication management unit is used for controlling the NB module to receive commands issued by the NB-IoT platform and report data to the NB-IoT platform;
the main control unit: the system comprises a data management unit, a time management unit, a command processing unit, a data acquisition unit, a system parameter management unit, an NB-IoT communication management unit and a watchdog unit.
2. The NB-IoT-based Internet of things acquisition control system according to claim 1, wherein the MCU is further connected with a debugging/configuration module, and the debugging/configuration module is used for the MCU to communicate with the upper computer.
3. The control method of utilizing the NB-IoT based internet of things acquisition control system in claim 1, comprising:
step S100: system initialization and system parameter configuration;
step S200: establishing a connection with an NB-IoT platform;
step S300: and entering a working cycle, wherein the working cycle comprises data acquisition and data uploading.
4. The method for controlling an NB-IoT-based internet of things acquisition control system according to claim 3, wherein the step S300 specifically includes:
step S310: checking the acquisition mark and the uploading mark, and immediately clearing the mark when the acquisition mark is set;
step S320: acquiring data, sending a command to equipment through an RS485 bus to acquire equipment data, storing the acquired data into a cache, recombining the data according to a protocol and storing the data into a flash, and clearing the cache;
step S330: waiting for the setting of an uploading flag, and immediately clearing the flag when the uploading flag is set;
step S340: uploading data: reading data of a segment unit from the flash, and uploading the data to an NB-IoT platform through an NB module;
step S350: waiting for receiving response messages of the NB-IoT platform, and deleting corresponding data in the flash when the correct response messages are received, indicating that the data are uploaded successfully; the process returns to step S310.
5. The NB-IoT based IOT acquisition control system control method according to claim 4, wherein the step S310 further comprises reconfiguring a watchdog in the MCU before checking the acquisition flag and the upload flag.
6. The method as claimed in claim 4, wherein the NB-IoT-based internet of things acquisition control system is configured to set the NB module to a storage mode in step S350, and when the server issues a command through the NB-IoT platform, the NB module stores the received command message and waits for the MCU to be removed.
CN201811511616.XA 2018-12-11 2018-12-11 NB-IoT-based Internet of things acquisition control system and control method Active CN109459960B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811511616.XA CN109459960B (en) 2018-12-11 2018-12-11 NB-IoT-based Internet of things acquisition control system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811511616.XA CN109459960B (en) 2018-12-11 2018-12-11 NB-IoT-based Internet of things acquisition control system and control method

Publications (2)

Publication Number Publication Date
CN109459960A CN109459960A (en) 2019-03-12
CN109459960B true CN109459960B (en) 2021-06-22

Family

ID=65613026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811511616.XA Active CN109459960B (en) 2018-12-11 2018-12-11 NB-IoT-based Internet of things acquisition control system and control method

Country Status (1)

Country Link
CN (1) CN109459960B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110363980B (en) * 2019-07-25 2021-08-27 四川长虹电器股份有限公司 LoRa acquisition device based on TDMA and Contiki and acquisition method thereof
CN110856146A (en) * 2019-11-14 2020-02-28 广州市兆基仪表仪器制造有限公司 Thing networking instrument clock timing device
CN110943865A (en) * 2019-12-02 2020-03-31 国网智能科技股份有限公司 Method and device for diagnosing equipment fault time and related equipment
CN111817897A (en) * 2020-07-17 2020-10-23 四川长虹电器股份有限公司 Acquisition transmission monitoring system and acquisition transmission monitoring method capable of configuring gateway

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184195A (en) * 2007-12-25 2008-05-21 腾讯科技(深圳)有限公司 Audio/video living broadcast system and method
CN106657293A (en) * 2016-12-06 2017-05-10 上海斐讯数据通信技术有限公司 Data collection terminal, system and method
CN107240247A (en) * 2017-07-14 2017-10-10 杭州钛比科技有限公司 A kind of ammeter data acquisition system based on NB IoT
CN207335882U (en) * 2017-08-24 2018-05-08 广州莲雾科技有限公司 A kind of bus duct temperature collecting device based on LoRa and Contiki systems
EP3349380A1 (en) * 2017-01-13 2018-07-18 Commsolid GmbH Improvement of broadcast channel reception in nb-iot devices
CN108826440A (en) * 2018-07-27 2018-11-16 河北隆基泰和云能源科技有限公司 A kind of distributed heating system intelligence control system and method based on Internet of Things

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101184195A (en) * 2007-12-25 2008-05-21 腾讯科技(深圳)有限公司 Audio/video living broadcast system and method
CN106657293A (en) * 2016-12-06 2017-05-10 上海斐讯数据通信技术有限公司 Data collection terminal, system and method
EP3349380A1 (en) * 2017-01-13 2018-07-18 Commsolid GmbH Improvement of broadcast channel reception in nb-iot devices
CN107240247A (en) * 2017-07-14 2017-10-10 杭州钛比科技有限公司 A kind of ammeter data acquisition system based on NB IoT
CN207335882U (en) * 2017-08-24 2018-05-08 广州莲雾科技有限公司 A kind of bus duct temperature collecting device based on LoRa and Contiki systems
CN108826440A (en) * 2018-07-27 2018-11-16 河北隆基泰和云能源科技有限公司 A kind of distributed heating system intelligence control system and method based on Internet of Things

Also Published As

Publication number Publication date
CN109459960A (en) 2019-03-12

Similar Documents

Publication Publication Date Title
CN109459960B (en) NB-IoT-based Internet of things acquisition control system and control method
US12114188B2 (en) Network connectivity performance determination on computing devices
CN109600406B (en) Environmental radiation monitoring station system
US20050240540A1 (en) System and method for efficient configuration in a fixed network automated meter reading system
CN104935489B (en) A kind of information collection networking method and power information acquire network
CN110943750B (en) Train remote wireless communication device and method
CN101184309A (en) Embedded system remote upgrade method for repeater equipment
CN103123484A (en) Transformer substation state monitoring data standardized access system and transformer substation state monitoring data standardized access method
CN109743191B (en) Accurate positioning centralized processing system, method and device for equipment alarm
US20110230182A1 (en) Management system for monitoring and controlling remote sites and equipment
CN103401881A (en) Data collection system and method based on intelligent instrument
CN102929224A (en) Condition acquisition controller (CAC) for power transformer equipment and system control method
CN106959688A (en) A kind of vehicle trouble messages acquisition method and device
CN111683003B (en) Internet of things gateway equipment with GPS positioning and multi-communication networking modes
CN108222083B (en) Intelligent foundation pit monitoring system
CN117977815B (en) Electric energy metering and collecting system with electricity consumption prediction function
CN112367395A (en) Alarm threshold modifying method, equipment and computer readable storage medium
CN204010288U (en) A kind of power information remote wireless terminal collector
CN115604113B (en) FAN network equipment rapid upgrading method, system, equipment and medium
CN110780630A (en) Protocol library docking execution system suitable for Internet of things and working method
CN104580507A (en) Field station data transmission and integration method
CN104579848A (en) Data analyzing and network monitoring integration method for OBS instrument
CN100495980C (en) A method for collecting performance statistics data
CN105488608A (en) Configuration-free rack server information acquisition method and system
CN114493926A (en) Line loss lean management and electricity larceny prevention method and system based on terminal edge calculation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant