CN114338737A - Method and system for processing gateway data of Internet of things - Google Patents

Method and system for processing gateway data of Internet of things Download PDF

Info

Publication number
CN114338737A
CN114338737A CN202111484009.0A CN202111484009A CN114338737A CN 114338737 A CN114338737 A CN 114338737A CN 202111484009 A CN202111484009 A CN 202111484009A CN 114338737 A CN114338737 A CN 114338737A
Authority
CN
China
Prior art keywords
data
internet
gateway
things
frame
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
Application number
CN202111484009.0A
Other languages
Chinese (zh)
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.)
Jiangsu Netmarch Technologies Co ltd
Original Assignee
Jiangsu Netmarch Technologies 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 Jiangsu Netmarch Technologies Co ltd filed Critical Jiangsu Netmarch Technologies Co ltd
Priority to CN202111484009.0A priority Critical patent/CN114338737A/en
Publication of CN114338737A publication Critical patent/CN114338737A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and a system for processing gateway data of the Internet of things, wherein the method comprises the steps that the gateway of the Internet of things with a register is connected with a plurality of sensors in a polling way, and data acquired by the sensors are mapped to the register of the gateway of the Internet of things; the gateway of the Internet of things generates a data frame from the data in the register according to a Modbus _ TCP protocol and pushes the data frame to an upper computer server; the upper computer server receives and processes the Modbus _ TCP data frame, and simultaneously sends a response frame to a register of the Internet of things gateway; the polling gateway sends a query frame, receives and analyzes a response frame, and sends effective data to the upper computer server in real time; the server receives the data frames transmitted by the gateway of the Internet of things and sends the effective data to the server of the upper computer in real time. The method has the advantages that each physical sensing device does not need to be traversed and accessed, and the pressure of an upper computer is greatly reduced.

Description

Method and system for processing gateway data of Internet of things
Technical Field
The invention relates to data acquisition of Internet of things equipment, in particular to a method and a system for processing gateway data of the Internet of things.
Background
In the field of the internet of things, a plurality of modes can connect the physical sensing equipment to an upper computer and push the data frames to the upper computer, and the upper computer can analyze the data frames according to the protocol format of the Modbus. However, some methods (such as a direct serial port connection method) require that the device is directly connected to an upper computer, which greatly limits the detection range of the physical sensing device; some methods (such as a serial server connection method) can solve the problem of detection range, but traverse access is required to each physical sensing device, so that the pressure of an upper computer is greatly increased.
Therefore, a method and a system for sharing the pressure of a server without limiting the detection range of the physical sensing device are needed to solve the problem that the physical sensing device uploads the detection data in real time in the internet of things.
Therefore, it is necessary to provide a method and a system for processing gateway data of the internet of things to solve the above problems.
Disclosure of Invention
In view of the above-mentioned problems, an object of the present invention is to provide a method and a system for processing gateway data of an internet of things, so as to solve the pressure of an upper computer when the gateway data of the internet of things is processed.
In order to achieve the purpose, the invention adopts the following technical scheme: a method for processing gateway data of the Internet of things comprises the following steps: the method comprises the following steps that an Internet of things gateway with a register is connected with a plurality of sensors in a polling mode, and data acquired by the sensors are mapped to the register of the Internet of things gateway; the gateway of the Internet of things generates a data frame from the data in the register according to a Modbus _ TCP protocol and pushes the data frame to an upper computer server; the upper computer server receives and processes the Modbus _ TCP data frame, and simultaneously sends a response frame to a register of the Internet of things gateway; the polling gateway sends a query frame, receives and analyzes a response frame, and sends effective data to the upper computer server in real time; the server receives the data frames transmitted by the gateway of the Internet of things and sends the effective data to the server of the upper computer in real time.
And after receiving the query frame, the gateway of the Internet of things analyzes the query frame according to the Modbus _ TCP protocol, packages the data to be queried in the query frame into a response frame according to the Modbus _ TCP protocol, and sends the response frame to the upper computer server.
The upper computer server loads all data of the internet of things gateway information according to the internet of things gateway information complete file, receives a data frame sent by one gateway, analyzes an IP address in the data frame, determines which internet of things gateway sends the data frame, finds corresponding internet of things gateway information and analyzes data frame data.
After receiving the query frame, the gateway of the Internet of things analyzes the query frame according to a Modbus _ TCP protocol, packages data to be queried in the query frame into a response frame according to the Modbus _ TCP protocol, and sends the response frame to the upper computer server;
and the upper computer server analyzes the response frame according to the information document of the Internet of things gateway after obtaining the response frame sent back by the Internet of things gateway, and meanwhile, pushes the analyzed data into the upper computer server.
In order to achieve the purpose, the invention also adopts the following technical scheme: a system for processing internet of things gateway data, comprising: the Internet of things gateway is provided with a register, is used for polling all the sensors connected with the RS485 physical interface, and is used for mapping the acquired data to the register of the Internet of things gateway; and the upper computer server is used for polling and sending a query frame to the gateway, receiving and analyzing a response frame and storing the effective data in real time.
Compared with the prior art, the method and the system for processing the gateway data of the Internet of things have the advantages that the response frame is analyzed according to the Modbus communication protocol format, traversal access to each physical sensing device is not needed, and the pressure of an upper computer is greatly reduced.
Drawings
Fig. 1 is a schematic flow chart of a method for processing gateway data of the internet of things according to the invention;
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below through the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The gateway of the Internet of things is provided with 2 paths of RS485 buses and can be connected with a plurality of (for example, 10) physical sensing devices, the data of the physical sensing devices connected with and supporting RS485 communication interfaces are acquired to a register corresponding to the gateway of the Internet of things, the gateway of the Internet of things adopts a standard Modbus _ RTU communication protocol and has a master-slave protocol function, namely, the gateway of the Internet of things can only access a slave machine actively, and the gateway of the Internet of things initiates data exchange actively.
The gateway of the Internet of things has the function of the Ethernet, and the communication protocol is Modbus _ Tcp. Namely, the gateway can send the data collected by the gateway to the upper computer in real time. The gateway of the Internet of things has an I/O point and can define a logic function by self. The gateway of the Internet of things also has a power-off self-storage data function, and can automatically operate after the network is disconnected, namely automatically operate according to a preset function.
The invention relates to a system for processing gateway data of the Internet of things, which comprises:
the Internet of things gateway is provided with a register and is used for polling all sensors connected with the RS485 physical interface, and the sensors map the acquired data to the register of the Internet of things gateway;
and the upper computer server is used for polling and sending a query frame to the gateway, receiving and analyzing a response frame and storing the effective data in real time.
The upper computer server starts service, receives the data frame transmitted by the gateway and sends the effective data to a storage server (such as an MQTT server) in real time.
Referring to fig. 1, a schematic flow chart of the method for processing gateway data of the internet of things according to the present invention is shown.
The invention relates to a method for processing gateway data of an Internet of things, which comprises the following steps:
step 1: the internet of things gateway with the register is connected with the sensors in a polling mode, and data acquired by the sensors are mapped to the register of the internet of things gateway.
The upper computer server starts a timing task, the timing task polls and accesses all the Internet of things gateways according to set time, and after the timing task reads the information of the Internet of things gateways, the Internet of things gateways send query frames to all the sensors to obtain data.
And polling the Internet of things gateway (the polling acquisition time is 100ms) to acquire data of a sensor connected on the RS485 bus, putting the acquired data into a corresponding register of the Internet of things gateway, and then taking out the data by using a Modbus _ TCP protocol mode by using the server. The sensors may be analog or on-off or any of the other categories. The gateway maps all physical interfaces (RS485) and the data collected by the analog quantity sensor in real time to a register of the gateway.
Step 2: the gateway of the Internet of things generates a data frame from the data in the register according to a Modbus _ TCP protocol and pushes the data frame to an upper computer server; and the upper computer server receives and processes the Modbus _ TCP data frame and simultaneously sends a response frame to a register of the Internet of things gateway.
Specifically, the upper computer server loads all data of the internet of things gateway information according to the internet of things gateway information complete file, receives a data frame sent by one gateway, analyzes an IP address in the data frame, determines which internet of things gateway sends the data frame, finds corresponding internet of things gateway information, and analyzes data frame data.
The upper computer server sends a Modbus _ TCP query frame to the Internet of things gateway, the Internet of things gateway generates a data frame from the data in the register according to a Modbus _ TCP protocol and pushes the data frame to the upper computer server, and the upper computer server analyzes the data frame according to the Modbus _ TCP protocol.
The method comprises the following specific steps:
step 21: after receiving the query frame, the gateway of the Internet of things analyzes the query frame according to a Modbus _ TCP protocol, packages data to be queried in the query frame into a response frame according to the Modbus _ TCP protocol, and sends the response frame to the upper computer server;
because the information of the upper computer server and the sensors is built in all the internet of things gateways, all the data in the register are packaged into data frames at regular time by the internet of things gateways according to the Modbus _ TCP protocol and are pushed to the port service monitored by the upper computer server.
Step 22: and the upper computer server analyzes the response frame according to the information document of the Internet of things gateway after obtaining the response frame sent back by the Internet of things gateway, and simultaneously pushes the analyzed data to an upper computer server (MQTT server).
And step 3: the polling gateway sends a query frame, receives and analyzes a response frame, and sends effective data to the upper computer server in real time; the server receives the data frames transmitted by the gateway of the Internet of things and sends the effective data to the server of the upper computer in real time.
And after the upper computer server analyzes the data frame, assigning values to all sensor detection parameters in the gateway of the Internet of things, and simultaneously pushing the detected parameter values to the MQTT server by the upper computer server according to the sensor as a unit.
The two modes are used for completing the interaction of the data receiving service of the gateway of the Internet of things and the upper computer.
The gateway of the Internet of things can collect the measurement data of the lower computer in real time and upload the data to the upper computer server. Meanwhile, the inquiry frame sent by the upper computer is analyzed, the real-time data is sent to the upper computer in a Modbus communication protocol format, the response frame is analyzed according to the Modbus communication protocol format, traversing access to each physical sensing device is not needed, and the pressure of the upper computer is greatly reduced.

Claims (5)

1. A method for processing gateway data of the Internet of things is characterized by comprising the following steps:
step 1, an Internet of things gateway with a register is connected with a plurality of sensors in a polling mode, and data acquired by the sensors are mapped to the register of the Internet of things gateway;
step 2, the gateway of the Internet of things generates a data frame from the data in the register according to a Modbus _ TCP protocol, and pushes the data frame to an upper computer server; the upper computer server receives and processes the Modbus _ TCP data frame, and simultaneously sends a response frame to a register of the Internet of things gateway;
step 3, the polling gateway sends a query frame, receives and analyzes a response frame, and sends effective data to an upper computer server in real time; the server receives the data frames transmitted by the gateway of the Internet of things and sends the effective data to the server of the upper computer in real time.
2. The method for processing gateway data of internet of things according to claim 1, wherein in the step 1; and after receiving the query frame, the gateway of the Internet of things analyzes the query frame according to the Modbus _ TCP protocol, packages the data to be queried in the query frame into a response frame according to the Modbus _ TCP protocol, and sends the response frame to the upper computer server.
3. The method for processing gateway data of the internet of things according to claim 2, wherein the step 2 specifically comprises: the upper computer server loads all data of the internet of things gateway information according to the internet of things gateway information complete file, receives a data frame sent by one gateway, analyzes an IP address in the data frame, determines which internet of things gateway sends the data frame, finds corresponding internet of things gateway information and analyzes data frame data.
4. The method for processing gateway data of internet of things according to claim 2, wherein the step 2 comprises:
step 21, after receiving the query frame, the gateway of the internet of things analyzes the query frame according to the Modbus _ TCP protocol, packages data to be queried in the query frame into a response frame according to the Modbus _ TCP protocol, and sends the response frame to the upper computer server;
and step 22, the upper computer server analyzes the response frame according to the information document of the internet of things gateway after obtaining the response frame sent back by the internet of things gateway, and meanwhile, pushes the analyzed data to the upper computer server.
5. A system for processing gateway data of the Internet of things, comprising:
the gateway of the Internet of things is provided with a register and is used for polling all the sensors connected with the RS485 physical interface,
the analog quantity sensor is used for mapping the acquired data to a register of the gateway of the Internet of things;
and the upper computer server is used for polling and sending a query frame to the gateway, receiving and analyzing a response frame and storing the effective data in real time.
CN202111484009.0A 2021-12-07 2021-12-07 Method and system for processing gateway data of Internet of things Pending CN114338737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111484009.0A CN114338737A (en) 2021-12-07 2021-12-07 Method and system for processing gateway data of Internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111484009.0A CN114338737A (en) 2021-12-07 2021-12-07 Method and system for processing gateway data of Internet of things

Publications (1)

Publication Number Publication Date
CN114338737A true CN114338737A (en) 2022-04-12

Family

ID=81047962

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111484009.0A Pending CN114338737A (en) 2021-12-07 2021-12-07 Method and system for processing gateway data of Internet of things

Country Status (1)

Country Link
CN (1) CN114338737A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786074A (en) * 2022-06-20 2022-07-22 中国空气动力研究与发展中心低速空气动力研究所 Transmission method and transmission system for wind tunnel pressure measurement data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194365A1 (en) * 1998-03-16 2002-12-19 Francois Jammes Communication system for a control system over ethernet and IP networks
CN101977167A (en) * 2010-10-25 2011-02-16 深圳市兆讯达科技实业有限公司 Gateway communication protocol conversion method for wireless sensor network access Modbus bus
US20120327939A1 (en) * 2011-06-27 2012-12-27 Lsis Co., Ltd. Communication method of gateway device supporting mutual communication of can and modbus and gateway device using the same
CN104852960A (en) * 2015-04-08 2015-08-19 南京东邦科技有限公司 Intelligent Internet of things cloud terminal system
CN109040144A (en) * 2018-10-19 2018-12-18 京信通信系统(中国)有限公司 Things-internet gateway data processing method, device, storage medium and gateway
CN110278280A (en) * 2019-06-27 2019-09-24 江苏中海昇物联科技有限公司 Building site data integrated system and integration method based on Internet of Things
CN112261061A (en) * 2020-11-03 2021-01-22 合沃物联技术(南京)有限公司 Equipment multi-protocol analysis method based on industrial Internet of things gateway

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194365A1 (en) * 1998-03-16 2002-12-19 Francois Jammes Communication system for a control system over ethernet and IP networks
CN101977167A (en) * 2010-10-25 2011-02-16 深圳市兆讯达科技实业有限公司 Gateway communication protocol conversion method for wireless sensor network access Modbus bus
US20120327939A1 (en) * 2011-06-27 2012-12-27 Lsis Co., Ltd. Communication method of gateway device supporting mutual communication of can and modbus and gateway device using the same
CN104852960A (en) * 2015-04-08 2015-08-19 南京东邦科技有限公司 Intelligent Internet of things cloud terminal system
CN109040144A (en) * 2018-10-19 2018-12-18 京信通信系统(中国)有限公司 Things-internet gateway data processing method, device, storage medium and gateway
CN110278280A (en) * 2019-06-27 2019-09-24 江苏中海昇物联科技有限公司 Building site data integrated system and integration method based on Internet of Things
CN112261061A (en) * 2020-11-03 2021-01-22 合沃物联技术(南京)有限公司 Equipment multi-protocol analysis method based on industrial Internet of things gateway

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114786074A (en) * 2022-06-20 2022-07-22 中国空气动力研究与发展中心低速空气动力研究所 Transmission method and transmission system for wind tunnel pressure measurement data

Similar Documents

Publication Publication Date Title
CN109525429B (en) RTU applicable to MODBUS protocol and communication method thereof
CN106227132A (en) A kind of laboratory cloud monitor supervision platform and laboratory monitoring method
CN107770022B (en) Data acquisition method based on RTU protocol, electronic equipment and storage medium
CN100454854C (en) Distributed network plug-and-play measurement and control system
CN107018028B (en) Data acquisition monitoring system and data acquisition monitoring method based on CAN bus and OPC technology
CN107391520B (en) Intelligent power distribution network planning and design auxiliary decision platform based on big data
CN111741092A (en) Acquisition system, integrated terminal and detection system
US9686131B2 (en) System, gateway, and method for automatic setting configuration by learning commands
CN112436603B (en) Terminal equipment acquisition configuration method and device based on intelligent convergence terminal of transformer area
CN114338737A (en) Method and system for processing gateway data of Internet of things
CN106411991B (en) Real-time acquisition system of vehicle-mounted data
CN103914031B (en) A kind of RS-485 bus monitoring probe circuit of self adaptation various protocols
CN111122934A (en) Oscilloscope system based on internet of things technology
CN114710499A (en) Load balancing method, device and medium for edge computing gateway based on computational power routing
CN112541569A (en) Sensor online training system and method based on machine learning
CN112988876A (en) Industrial data acquisition management method and system
CN115766398B (en) Station area electricity consumption information acquisition fault analysis system based on edge calculation
CN104104554A (en) Life cycle method and apparatus for detecting data access request
CN216775044U (en) Electrical equipment environment real-time monitoring system comprising communication unit
CN106161339A (en) Obtain the method and device of IP access relation
CN114363347A (en) Self-adaptive industrial equipment data acquisition method and system
CN104348920B (en) DCS MANET monitoring systems based on OPC standards
CN114401500A (en) Electrical equipment environment real-time monitoring system comprising communication unit
CN206775536U (en) The real-time dynamic networking monitoring system of Multifunctional grain situation
CN111866114A (en) Packaging carton production automation equipment data monitoring system based on Internet of things

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