CN116886730A - Internet of things data acquisition method - Google Patents
Internet of things data acquisition method Download PDFInfo
- Publication number
- CN116886730A CN116886730A CN202310980373.9A CN202310980373A CN116886730A CN 116886730 A CN116886730 A CN 116886730A CN 202310980373 A CN202310980373 A CN 202310980373A CN 116886730 A CN116886730 A CN 116886730A
- Authority
- CN
- China
- Prior art keywords
- data
- frame
- platform
- byte
- internet
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 40
- 239000003999 initiator Substances 0.000 claims abstract description 19
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 26
- 238000004891 communication Methods 0.000 claims description 10
- 230000008520 organization Effects 0.000 claims description 7
- 238000009825 accumulation Methods 0.000 claims description 3
- 238000012546 transfer Methods 0.000 claims description 3
- 230000005540 biological transmission Effects 0.000 abstract description 47
- 230000000977 initiatory effect Effects 0.000 description 13
- 238000007405 data analysis Methods 0.000 description 9
- 238000005538 encapsulation Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010223 real-time analysis Methods 0.000 description 6
- 238000003860 storage Methods 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 3
- 238000012790 confirmation Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0435—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/03—Protocol definition or specification
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a data acquisition method of the Internet of things, which comprises the following steps of fixing a frame format, wherein a frame initiator is 68H, and a terminator is 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum; the invention unifies the data transmission formats of the data acquisition platform and the equipment, and is convenient for the business department to manage the remote equipment and the data; the hardware deployment can adopt centralized deployment or distributed deployment according to the actual server resource condition, a multithreading model and an asynchronous data transmission mode are used, more equipment connection numbers are supported, better network throughput performance is provided, delay is reduced, and resources are saved.
Description
Technical Field
The invention relates to the technical field of data acquisition, in particular to a data acquisition method of the Internet of things.
Background
At present, the phenomenon that the water department commonly exists in the aspect of data acquisition of the Internet of things equipment is that the types of remote transmission equipment are more, a data acquisition protocol, a communication protocol, an acquisition platform and the like are provided by all remote transmission equipment suppliers, and the acquired data are stored in the platforms operated by all equipment suppliers, so that the remote transmission equipment and the data are inconvenient to manage and use.
Therefore, an Internet of things data acquisition method is provided to solve the problem.
Disclosure of Invention
The invention aims to provide a data acquisition method of the Internet of things, which solves the problems that the existing water department has inconvenient management and use of remote transmission equipment and data in the aspect of data acquisition of the equipment of the Internet of things.
In order to achieve the above purpose, the present invention provides the following technical solutions: the data acquisition method of the Internet of things comprises the following steps of:
step 1: frame format: the frame initiator is fixed to 68H and the terminator is fixed to 16H;
dividing into a frame header domain, a data domain and a frame tail domain;
the frame formats of a terminal-platform and a terminal-platform are shared;
step 2: byte format: each byte contains 8 binary codes, and all multi-byte data fields firstly transmit low-order bytes and then transmit high-order bytes;
step 3: byte transfer direction: the lower position is transmitted firstly, and then the higher position is transmitted;
step 4: check code: the frame check is longitudinal information checksum, all bytes from the beginning of the frame initiator to the front of the check code are subjected to binary arithmetic accumulation, and overflow values exceeding FFH are not counted;
step 5: clock timing: the intelligent water meter or the communication equipment has a time synchronization function, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time;
step 6: encryption mode: two algorithms of SM4 encryption and AES128 encryption are supported, and whether encryption and encryption algorithms are used in a data frame or not is identified;
step 7: supported network protocols: TCP and UDP are supported between the Internet of things equipment and the Internet of things equipment.
Preferably, in step 1, the frame header field includes a frame initiator and frame information.
Preferably, in step 1, the data field includes contents of instructions and data, and a basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv the data format is divided into two types, differing in whether or not it carries a data value.
Preferably, in step 1, the end-of-frame field includes an instruction sequence number, a check code, and an end-of-frame symbol.
Preferably, in step 4, the receiving party discards the information frame no matter whether an even check error or a longitudinal information checksum error is detected, and identifies that the check is not passed in the reply frame.
Preferably, in step 6, the decryption key is provided by the water service company, the platform distributes the key of the terminal in advance, the key is stored in the terminal, the platform can be dynamically set, and each manufacturer has a fixed default key in the water meter factory.
Preferably, the encryption mode of the default key is ECB, and the filling principle is PKCS7Padding.
Preferably, in step 7, after the long connection terminal device is on line, the login frame should be actively sent, and the heartbeat frame is sent at regular time (1 minute) to detect whether the link is normal, if the platform response frame is not received after timeout (5 minutes), the login frame needs to be logged again.
Preferably, in step 7, the non-long connection terminal device can directly report data on line, wait for 30 seconds after finishing transmitting the data, if the instruction issued by the platform is not received, the login exit frame can be sent, and the platform is confirmed (or waits for 30 seconds) and then goes offline without sending a heartbeat frame.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention unifies the data transmission formats of the data acquisition platform and the equipment, and is convenient for the business department to manage the remote equipment and the data;
the hardware deployment can adopt centralized deployment or distributed deployment according to the actual server resource condition, a multithreading model and an asynchronous data transmission mode are used, more equipment connection numbers are supported, better network throughput performance is provided, delay is reduced, and resources are saved.
Drawings
Fig. 1 is a schematic diagram of the same protocol flow for data acquisition of a remote water meter according to the present invention.
Detailed Description
The invention will now be described in more detail by way of examples which are illustrative only and are not intended to limit the scope of the invention in any way.
The invention provides a technical scheme that: the data acquisition method of the Internet of things comprises the following steps of:
step 1: frame format: the frame initiator is fixed to 68H and the terminator is fixed to 16H;
dividing into a frame header domain, a data domain and a frame tail domain;
the frame formats of a terminal-platform and a terminal-platform are shared;
step 2: byte format: each byte contains 8 binary codes, and all multi-byte data fields firstly transmit low-order bytes and then transmit high-order bytes;
step 3: byte transfer direction: the lower position is transmitted firstly, and then the higher position is transmitted;
step 4: check code: the frame check is longitudinal information checksum, all bytes from the beginning of the frame initiator to the front of the check code are subjected to binary arithmetic accumulation, and overflow values exceeding FFH are not counted;
step 5: clock timing: the intelligent water meter or the communication equipment has a time synchronization function, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time;
step 6: encryption mode: two algorithms of SM4 encryption and AES128 encryption are supported, and whether encryption and encryption algorithms are used in a data frame or not is identified;
step 7: supported network protocols: TCP and UDP are supported between the Internet of things equipment and the Internet of things equipment.
The invention also provides a technical scheme that: the data acquisition method of the Internet of things comprises the following steps: formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data;
the invention defines the communication protocol between the remote data acquisition platform and the remote equipment, realizes the unification of data acquisition, realizes the centralized management of the whole remote equipment on the software level, and has the application range: concentrator, NB-IoT water meter, large user remote meter, on-line pipe network monitoring equipment, etc., supporting http/https/MQTT of TCP, UDP, china telecom ctwing (aep) platform; the data field adopts tlv format as a basic unit: tag (tag) +length) +value, tag can be expanded, value can be lengthened, and content of data transmission is not limited to certain equipment or industry data; the reported data tag (label) is selected according to the actual reported content, such as heartbeat, real-time data, historical data and the like, so that the network load of data transmission is reduced.
Embodiment one:
in frame format, the frame initiator is fixed to 68H, and the terminator is fixed to 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum, all bytes before the check code from the beginning of the frame start symbol are binary arithmetic accumulated, and overflow values exceeding FFH are not counted; the intelligent water meter or the communication equipment has a time synchronization function when the clock is calibrated, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time; an encryption mode supports two algorithms, namely SM4 encryption and AES128 encryption, and identifies whether the encryption and encryption algorithm are carried out in a data frame; the supported network protocol and the Internet of things equipment support TCP and UDP; the method also comprises the step of formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send the acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data.
Embodiment two:
in the first embodiment, the following steps are added:
in step 1, the frame header field includes a frame initiator and frame information, the data field includes contents of instructions and data, and a basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv the data format is divided into two types, and the difference is whether the data is provided with a data value, and the end-of-frame field comprises an instruction sequence number, a check code and an end-of-frame symbol.
In frame format, the frame initiator is fixed to 68H, and the terminator is fixed to 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; the frame header field comprises a frame initiator and frame information, the data field comprises contents of instructions and data, and the basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv data formats are divided into two types, wherein the difference is whether the data formats are provided with data values, and the frame tail domain comprises an instruction sequence number, a check code and a frame ending symbol;
tlv Format one (without data values, used in data frames for inquiry information)
tlv Format two (with data values, used in setting data frames of the relevant parameters or devices)
Frame format of "terminal- > platform":
data format of "platform- > terminal":
byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum, all bytes before the check code from the beginning of the frame start symbol are binary arithmetic accumulated, and overflow values exceeding FFH are not counted; the intelligent water meter or the communication equipment has a time synchronization function when the clock is calibrated, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time; an encryption mode supports two algorithms, namely SM4 encryption and AES128 encryption, and identifies whether the encryption and encryption algorithm are carried out in a data frame; the supported network protocol and the Internet of things equipment support TCP and UDP; the method also comprises the step of formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send the acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data.
Embodiment III:
in the second embodiment, the following steps are added:
in step 4, the receiving party gives up the information frame no matter whether even check errors or longitudinal information check sum errors are detected, and marks that the check is not passed in the response frame.
In frame format, the frame initiator is fixed to 68H, and the terminator is fixed to 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; the frame header field comprises a frame initiator and frame information, the data field comprises contents of instructions and data, and the basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv data formats are divided into two types, wherein the difference is whether the data formats are provided with data values, and the frame tail domain comprises an instruction sequence number, a check code and a frame ending symbol;
tlv Format one (without data values, used in data frames for inquiry information)
tlv Format two (with data values, used in setting data frames of the relevant parameters or devices)
Frame format of "terminal- > platform":
data format of "platform- > terminal":
byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum, all bytes before the check code from the beginning of the frame start symbol are binary arithmetic accumulated, and overflow values exceeding FFH are not counted; whether the receiver detects even check errors or longitudinal information check sum errors, the receiver gives up the information frame and marks that the check is not passed in the response frame; the intelligent water meter or the communication equipment has a time synchronization function when the clock is calibrated, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time; an encryption mode supports two algorithms, namely SM4 encryption and AES128 encryption, and identifies whether the encryption and encryption algorithm are carried out in a data frame; the supported network protocol and the Internet of things equipment support TCP and UDP; the method also comprises the step of formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send the acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data.
Embodiment four:
in example three, the following procedure was added:
in step 6, the decryption key is provided by the water service company, the platform distributes the key of the terminal in advance, the key is stored in the terminal, the platform can be dynamically set, each manufacturer water meter leaves the factory and has a fixed default key, the encryption mode of the default key is ECB, and the filling principle is PKCS7 packing.
In frame format, the frame initiator is fixed to 68H, and the terminator is fixed to 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; the frame header field comprises a frame initiator and frame information, the data field comprises contents of instructions and data, and the basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv data formats are divided into two types, wherein the difference is whether the data formats are provided with data values, and the frame tail domain comprises an instruction sequence number, a check code and a frame ending symbol;
tlv Format one (without data values, used in data frames for inquiry information)
tlv Format two (with data values, used in setting data frames of the relevant parameters or devices)
Frame format of "terminal- > platform":
data format of "platform- > terminal":
byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum, all bytes before the check code from the beginning of the frame start symbol are binary arithmetic accumulated, and overflow values exceeding FFH are not counted; whether the receiver detects even check errors or longitudinal information check sum errors, the receiver gives up the information frame and marks that the check is not passed in the response frame; the intelligent water meter or the communication equipment has a time synchronization function when the clock is calibrated, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time; an encryption mode supports two algorithms, namely SM4 encryption and AES128 encryption, and identifies whether the encryption and encryption algorithm are carried out in a data frame; the decryption key is provided by a water service company, a platform distributes a key of a terminal in advance, the key is stored in the terminal, the platform can be dynamically set, each manufacturer water meter leaves a factory and has a fixed default key, the encryption mode of the default key is ECB, and the filling principle is PKCS7Padding; the supported network protocol and the Internet of things equipment support TCP and UDP; the method also comprises the step of formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send the acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data.
Fifth embodiment:
in example four, the following steps were added:
in step 7, the long connection terminal device shall actively send a login frame after being on line, and send a heartbeat frame at regular time (1 minute) to detect whether the link is normal, if the platform response frame is not received after overtime (5 minutes), the login frame is needed to be logged in again, the non-long connection terminal device can directly report data after the data transmission is completed, wait for 30 seconds, if the instruction issued by the platform is not received, send a logout frame, and drop off after the platform confirms (or waits for 30 seconds), and the heartbeat frame is not needed to be sent.
In frame format, the frame initiator is fixed to 68H, and the terminator is fixed to 16H; dividing into a frame header domain, a data domain and a frame tail domain; the frame formats of a terminal-platform and a terminal-platform are shared; the frame header field comprises a frame initiator and frame information, the data field comprises contents of instructions and data, and the basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv data formats are divided into two types, wherein the difference is whether the data formats are provided with data values, and the frame tail domain comprises an instruction sequence number, a check code and a frame ending symbol;
tlv Format one (without data values, used in data frames for inquiry information)
tlv Format two (with data values, used in setting data frames of the relevant parameters or devices)
Frame format of "terminal- > platform":
data format of "platform- > terminal":
byte format, each byte containing 8 bits binary code, all multi-byte data fields transmitting low byte first and then high byte; byte transmission direction, transmitting low order bit first and transmitting high order bit later; the check code, the frame check is the longitudinal information check sum, all bytes before the check code from the beginning of the frame start symbol are binary arithmetic accumulated, and overflow values exceeding FFH are not counted; whether the receiver detects even check errors or longitudinal information check sum errors, the receiver gives up the information frame and marks that the check is not passed in the response frame; the intelligent water meter or the communication equipment has a time synchronization function when the clock is calibrated, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time; an encryption mode supports two algorithms, namely SM4 encryption and AES128 encryption, and identifies whether the encryption and encryption algorithm are carried out in a data frame; the decryption key is provided by a water service company, a platform distributes a key of a terminal in advance, the key is stored in the terminal, the platform can be dynamically set, each manufacturer water meter leaves a factory and has a fixed default key, the encryption mode of the default key is ECB, and the filling principle is PKCS7Padding; the supported network protocol and the Internet of things equipment support TCP and UDP; after the long connection terminal equipment is online, a login frame is actively sent, a heartbeat frame is sent at regular time (1 minute) to detect whether a link is normal or not, if the platform response frame is not received after overtime (5 minutes), the login frame is needed to be logged in again, the non-long connection terminal equipment can directly report data after the data transmission is completed, the login frame can be sent out after the data transmission is completed for 30 seconds, and if the instruction issued by the platform is not received, the login frame can be sent out, and after the platform is confirmed (or the platform is waited for 30 seconds), the heartbeat frame is not needed to be sent out;
the supported function codes are as follows:
inquiring parameters; initiating: 0x01 response: 0x81; the system comprises basic information, network parameters, acquisition parameters and alarm parameters; the server issues a parameter query instruction, and data tag and data id to be queried are added in a data field of a transmission frame; after the equipment is on line, the parameter information is reported after receiving the instruction;
setting parameters; initiating: 0x02 response: 0x82; the method comprises network parameters, acquisition parameters, alarm parameters and alarm settings; the server issues a parameter setting instruction, and adds data tag, data id and data value to be set in a data field of a transmission frame; after the equipment is online, setting network parameters according to the content of the instruction after receiving the instruction and returning a confirmation frame;
reading real-time data of a terminal; initiating: 0x03 response: 0x83; real-time data including current accumulated flow, accumulated positive flow, accumulated reverse flow, acquisition time, battery voltage, instantaneous flow and the like; the server issues a command for reading real-time data, and adds a data id to be read into a transmission frame; after the equipment is on line, receiving an instruction to return real-time data;
the terminal reports real-time data; initiating: 0x04 response: 0x84; actively reporting real-time data after equipment is online, wherein the real-time data comprise current accumulated flow, accumulated positive flow, accumulated reverse flow, acquisition time, battery voltage, instantaneous flow and the like; after receiving the data analysis, the server replies an analysis result;
reading historical data of a terminal; initiating: 0x05 response: 0x85; the server issues a historical data reading instruction, and the supported read data type is consistent with the real-time data; after the equipment is on line, receiving an instruction to return historical data of the query item;
the terminal reports the periodic acquisition data; initiating: 0x06 response: 0x86; the terminal actively reports the acquired data according to the reporting period, and the format is consistent with the historical data format; after receiving the data analysis, the server replies an analysis result;
reporting alarm data by the terminal; initiating: 0x07 response: 0x87; including low voltage alarms, magnetic disturbance alarms, over-current alarms, reverse flow alarms, water use alarms, etc.; all other alarm items except the water alarm are not started by default and are reported along with the periodically reported data; when one or more items are started to immediately alarm, the alarm items wake up the water meter to actively report once only when the first occurrence is carried out every day, and report the alarm items along with periodically reported data; after receiving the data analysis, the server replies an analysis result;
reading a meter file; initiating: 0x08 response: 0x88; the server side issues a command to read a meter file hung on a centralized meter reading system concentrator; after equipment is online, receiving an instruction to upload data according to the instruction requirement;
downloading a meter file; initiating: 0x09 response: 0x89; the server side issues a command to download a meter file hung on a centralized meter reading system concentrator; after equipment is online, receiving an instruction according to the instruction requirement and returning a confirmation frame;
real-time centralized meter reading; initiating: 0x0A response: 0x8A; the system is used for reporting real-time meter reading data and frozen data in a centralized meter reading mode and setting valve control; the server side issues a real-time centralized meter reading instruction; after equipment is online, receiving an instruction to upload data according to the instruction requirement;
a single meter reading water meter; initiating: 0x0B response: 0x8B; the data format is consistent with the real-time centralized meter reading; the server issues a single meter reading instruction and designates a meter address; uploading data according to instruction requirements after equipment is online;
reading the frozen data; initiating: 0x0C response: 0x8C; the data format is consistent with the real-time centralized meter reading; the server side issues a reading frozen data instruction; after equipment is online, receiving an instruction to upload data according to the instruction requirement;
detecting a link; initiating: 0x0D response: 0x8D; the method comprises the steps of logging in, logging out, sending a logging frame after the heartbeat frame length is connected with equipment to be online, and starting to send data after the equipment returns normally; and sending heartbeat frames regularly to detect whether the connection link is normal; if the platform response frame is not received after the timeout (5 minutes), the login is needed again; after the data transmission is finished, waiting for 30 seconds, if an instruction issued by the platform is not received, sending a log-out frame, and after the platform confirms (or waiting for 30 seconds), downloading the data without sending a heartbeat frame;
the method also comprises the step of formulating a unified data transmission protocol standard; the data acquisition end develops a data analysis method aiming at the unified data transmission protocol standard and deploys the service of the data acquisition end; the device end develops a data acquisition and encapsulation method for the unified data transmission protocol standard, and adopts a proper network transmission mode to send acquired data to the data acquisition end so as to realize real-time analysis, processing and storage of the data;
although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (9)
1. The data acquisition method of the Internet of things is characterized by comprising the following steps of: the method comprises the following steps:
step 1: frame format: the frame initiator is fixed to 68H and the terminator is fixed to 16H;
dividing into a frame header domain, a data domain and a frame tail domain;
the frame formats of a terminal-platform and a terminal-platform are shared;
step 2: byte format: each byte contains 8 binary codes, and all multi-byte data fields firstly transmit low-order bytes and then transmit high-order bytes;
step 3: byte transfer direction: the lower position is transmitted firstly, and then the higher position is transmitted;
step 4: check code: the frame check is longitudinal information checksum, all bytes from the beginning of the frame initiator to the front of the check code are subjected to binary arithmetic accumulation, and overflow values exceeding FFH are not counted;
step 5: clock timing: the intelligent water meter or the communication equipment has a time synchronization function, and the time synchronization mode can be adopted to synchronize with the platform time and the base station time;
step 6: encryption mode: two algorithms of SM4 encryption and AES128 encryption are supported, and whether encryption and encryption algorithms are used in a data frame or not is identified;
step 7: supported network protocols: TCP and UDP are supported between the Internet of things equipment and the Internet of things equipment.
2. The internet of things data acquisition method according to claim 1, wherein: in step 1, the frame header field includes a frame initiator and frame information.
3. The internet of things data acquisition method according to claim 1, wherein: in step 1, the data field includes contents of instructions and data, and the basic unit of the data field is tlv data: namely tag (label) +length) +value (value) data organization format, tag is expressed by 1 byte, length is expressed by 2 bytes, value is variable in length and is used for storing data; tlv the data format is divided into two types, differing in whether or not it carries a data value.
4. The internet of things data acquisition method according to claim 1, wherein: in step 1, the end-of-frame field includes an instruction sequence number, a check code, and an end-of-frame symbol.
5. The internet of things data acquisition method according to claim 1, wherein: in step 4, the receiving party gives up the information frame no matter whether even check errors or longitudinal information check sum errors are detected, and marks that the check is not passed in the response frame.
6. The internet of things data acquisition method according to claim 1, wherein: in step 6, the decryption key is provided by the water service company, the platform distributes the key of the terminal in advance, the key is stored in the terminal, the platform can be dynamically set, and each manufacturer water meter leaves the factory and has a fixed default key.
7. The method for acquiring data of the internet of things according to claim 6, wherein the method comprises the following steps: the encryption mode of the default key is ECB, and the filling principle is PKCS7Padding.
8. The internet of things data acquisition method according to claim 1, wherein: in step 7, the long connection terminal device should actively send a login frame after being on line, and send a heartbeat frame at regular time (1 minute) to detect whether the link is normal, if the platform response frame is not received after time-out (5 minutes), the login is needed again.
9. The internet of things data acquisition method according to claim 1, wherein: in step 7, the non-long connection terminal device can directly report data on line, wait for 30 seconds after finishing transmitting the data, and if the instruction issued by the platform is not received, the login exit frame can be sent, and the platform is confirmed (or waits for 30 seconds) and then goes off line without sending a heartbeat frame.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310980373.9A CN116886730A (en) | 2023-08-07 | 2023-08-07 | Internet of things data acquisition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310980373.9A CN116886730A (en) | 2023-08-07 | 2023-08-07 | Internet of things data acquisition method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116886730A true CN116886730A (en) | 2023-10-13 |
Family
ID=88254980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310980373.9A Pending CN116886730A (en) | 2023-08-07 | 2023-08-07 | Internet of things data acquisition method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116886730A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106100703A (en) * | 2016-06-16 | 2016-11-09 | 国网江苏省电力公司常州供电公司 | The electric-power metering Site Detection bluetooth data means of communication |
US20160338101A1 (en) * | 2013-12-11 | 2016-11-17 | Sca Hygiene Products Ab | Expanded protocol frames for data transmission |
CN108449426A (en) * | 2018-04-13 | 2018-08-24 | 郑州云海信息技术有限公司 | A kind of internet of things net controller and data center's communication means and system |
CN109257367A (en) * | 2018-10-18 | 2019-01-22 | 浙江大学台州研究院 | A kind of data communication protocol and implementation method for industrial internet-of-things terminal |
CN110662226A (en) * | 2019-08-28 | 2020-01-07 | 重庆大学 | Novel networking protocol method based on ubiquitous power Internet of things |
CN114362885A (en) * | 2022-01-10 | 2022-04-15 | 中电望辰科技有限公司 | Internet of things data transmission method, device, equipment and medium |
WO2022123534A1 (en) * | 2020-12-10 | 2022-06-16 | Intex Industries Xiamen Co. Ltd. | Method and system for remote reservation control of device based on data command frame |
WO2022160779A1 (en) * | 2021-01-29 | 2022-08-04 | 苏州易德龙科技股份有限公司 | Rs232-based communication protocol |
CN115190378A (en) * | 2022-07-12 | 2022-10-14 | 安徽南瑞中天电力电子有限公司 | Data acquisition terminal based on WI-SUN communication mode |
-
2023
- 2023-08-07 CN CN202310980373.9A patent/CN116886730A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160338101A1 (en) * | 2013-12-11 | 2016-11-17 | Sca Hygiene Products Ab | Expanded protocol frames for data transmission |
CN106100703A (en) * | 2016-06-16 | 2016-11-09 | 国网江苏省电力公司常州供电公司 | The electric-power metering Site Detection bluetooth data means of communication |
CN108449426A (en) * | 2018-04-13 | 2018-08-24 | 郑州云海信息技术有限公司 | A kind of internet of things net controller and data center's communication means and system |
CN109257367A (en) * | 2018-10-18 | 2019-01-22 | 浙江大学台州研究院 | A kind of data communication protocol and implementation method for industrial internet-of-things terminal |
CN110662226A (en) * | 2019-08-28 | 2020-01-07 | 重庆大学 | Novel networking protocol method based on ubiquitous power Internet of things |
WO2022123534A1 (en) * | 2020-12-10 | 2022-06-16 | Intex Industries Xiamen Co. Ltd. | Method and system for remote reservation control of device based on data command frame |
WO2022160779A1 (en) * | 2021-01-29 | 2022-08-04 | 苏州易德龙科技股份有限公司 | Rs232-based communication protocol |
CN114362885A (en) * | 2022-01-10 | 2022-04-15 | 中电望辰科技有限公司 | Internet of things data transmission method, device, equipment and medium |
CN115190378A (en) * | 2022-07-12 | 2022-10-14 | 安徽南瑞中天电力电子有限公司 | Data acquisition terminal based on WI-SUN communication mode |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9363200B2 (en) | Transmission of data over a low-bandwidth communication channel | |
US20200336925A1 (en) | System, Method and Apparatus for Managing Disruption in a Sensor Network Application | |
CN113162931B (en) | Method for transmitting Modbus RTU protocol message in wide area network | |
GB2359225A (en) | Deferred acknowledgment communications | |
CN104796464A (en) | Multi-protocol conversion warning condition information remote transmission system and method based on MODBUS | |
CN107534985A (en) | Communicator, communication means and communication system | |
CN111369774B (en) | Data acquisition method for communication among platform, remote transmission centralized meter reading equipment and remote transmission water meter | |
CN109088692A (en) | A kind of electricity substation temporal quality detection system | |
CN106027686B (en) | Enhanced MODBUS communication method based on MPEG-2 | |
CN110708239B (en) | Industrial Internet of things gateway based on OPC and MQTT | |
CN107171916B (en) | Special 4G wireless intelligent network bridge for remote monitoring of industrial metering pump | |
CN116886730A (en) | Internet of things data acquisition method | |
CN108512907A (en) | The equipment communication means of half transparent transmission | |
CN118158299A (en) | Data conversion method, device, equipment and medium | |
CN107819881B (en) | Communication system and communication method for mine lamp charging cluster management | |
CN210222118U (en) | Ammeter monitoring system based on infrared modulation conversion and wireless communication | |
US11516561B2 (en) | Method for reading fluid meters | |
CN115134380A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN101771617B (en) | Method and system for following point-to-point bandwidth, remote terminal equipment and home terminal equipment | |
CN110493809B (en) | Mobile terminal, communication data anomaly detection method thereof and computer readable medium | |
CN111034138B (en) | Small and seamless carrier detector | |
Zhiyuan et al. | Remote monitoring system of automatic production line based on Internet of Things | |
CN111107161A (en) | Data acquisition method and device | |
US11632417B2 (en) | IoT gateway with configurable data transmission mode | |
CN109917099A (en) | A kind of distributed monitoring water quality equipment based on wide-area, wireless network |
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 |