CN112671891A - Node.js-based Internet of things data information transmission system and method thereof - Google Patents

Node.js-based Internet of things data information transmission system and method thereof Download PDF

Info

Publication number
CN112671891A
CN112671891A CN202011524885.7A CN202011524885A CN112671891A CN 112671891 A CN112671891 A CN 112671891A CN 202011524885 A CN202011524885 A CN 202011524885A CN 112671891 A CN112671891 A CN 112671891A
Authority
CN
China
Prior art keywords
data information
node
server
cloud server
physical
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
CN202011524885.7A
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.)
Shanghai Shangshi Longchuang Intelligent Technology Co Ltd
Original Assignee
Shanghai Shangshi Longchuang Intelligent Technology 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 Shanghai Shangshi Longchuang Intelligent Technology Co Ltd filed Critical Shanghai Shangshi Longchuang Intelligent Technology Co Ltd
Priority to CN202011524885.7A priority Critical patent/CN112671891A/en
Publication of CN112671891A publication Critical patent/CN112671891A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to a node.js-based Internet of things data information transmission system and a method thereof, wherein the system comprises a node.js server which is respectively in bidirectional communication connection with a physical collector and a cloud server, the node.js server is also connected with an equipment model and a gateway model, the equipment model is connected with a backup database, and the physical collector is used for collecting data information; the js server is used for carrying out Modbus protocol conversion on the data information acquired by the physical acquisition unit, transmitting the converted data information into the equipment model and transmitting the data information in the equipment model into the gateway model; the backup database is used for storing data information of the transmitted equipment model; the gateway model is used for integrating data information from all the equipment models; the cloud server is used for passively receiving data information from the gateway model. Compared with the prior art, the method has the advantages that the node.js server is used for carrying out Modbus protocol conversion on the data information acquired by the physical acquisition unit and then transmitting the data information to the cloud server, so that intensive and reliable transmission of the data information of the Internet of things can be realized.

Description

Node.js-based Internet of things data information transmission system and method thereof
Technical Field
The invention relates to the technical field of Internet of things, in particular to a node.js-based Internet of things data information transmission system and a node.js-based Internet of things data information transmission method.
Background
The internet of things is a network which is based on information carriers such as the internet, a traditional telecommunication network and the like and enables all common physical objects which can be independently addressed to realize interconnection. In order to effectively manage equipment in the internet of things, the equipment in the internet of things needs to be controlled, most of the current equipment control methods of the internet of things are developed based on C language, and meanwhile, data information transmission is completed by combining Modbus protocol.
The Modbus protocol is a serial communication protocol, and adopts a master-slave mode, wherein a master machine sends a request to a slave machine, and the slave machine replies. However, as a local protocol suitable for short-distance device connection communication, when the internet of things device is controlled, because each device is often distributed, if dense and reliable transmission of data information is to be achieved, C language compiling operation and hardware device firmware frequent updating are often required, which undoubtedly increases the difficulty of later maintenance and greatly reduces the working efficiency.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a node.js-based data information transmission system and method of the internet of things, so as to efficiently realize the intensive and reliable transmission of data information of the internet of things.
The purpose of the invention can be realized by the following technical scheme: the node.js server is respectively in bidirectional communication connection with the physical collector and the cloud server, the node.js server is also connected with an equipment model and a gateway model, the equipment model is connected with a backup database, and the physical collector is used for collecting data information;
the node.js server is used for carrying out Modbus protocol conversion on the data information acquired by the physical acquisition unit, transmitting the converted data information into the equipment model and transmitting the data information in the equipment model into the gateway model;
the backup database is used for storing data information of the incoming equipment model;
the gateway model is used for integrating data information from all equipment models;
the cloud server is used for passively receiving data information from the gateway model.
Further, the node.js server is specifically an application server deployed with a node.js platform, and the node.js platform is integrated with a Modbus protocol conversion module.
Further, the cloud server is provided with a port for externally disclosing services.
And further, the node.js server is in bidirectional communication connection with the cloud server through an http Protocol (HyperText Transfer Protocol).
The JS server and the cloud server perform http communication specifically through Json (JavaScript Object Notation, JS Object Notation format) messages.
And further, the node.js server is in bidirectional communication connection with the physical collector through a Modbus protocol.
And further, the node.js server is in bidirectional communication connection with a plurality of physical collectors at the same time.
And further, the cloud server is in bidirectional communication connection with a plurality of node.
A node.js-based internet of things data information transmission method, comprising the following steps:
s1, deploying a node.js server and a cloud server, respectively, and establishing communication connections between the node.js server and the physical collector and the cloud server, respectively;
s2, the physical collector collects data information and transmits the collected data information to the node.js server;
s3, the node.js server carries out Modbus protocol conversion on the data information collected by the physical collector, then whether valid data information is acquired or not is judged, if so, the step S4 is executed, and if not, the step S5 is executed;
s4, transmitting the effective data information into the equipment model, integrating the data of all physical collectors, storing the data in a backup database, and then executing the step S6;
s5, acquiring the previously backed-up data information from the backup database, transmitting the acquired data information into the equipment model, and then executing the step S6;
s6, transmitting the data information in the equipment model into the gateway model to integrate the data information of all the equipment models;
and S7, uploading the data information integrated by the gateway model to a cloud server.
Further, the step S1 specifically includes the following steps:
s11, deploying a cloud server, and setting a port of the cloud server for externally disclosing services;
s12, deploying the node.js platform integrated with Modbus protocol conversion on an application server, and configuring a port of physical acquisition equipment to enable the node.js server to be in communication connection with a physical acquisition device;
and S13, setting an access address and a port of the cloud server, so that the node.js server is in communication connection with the cloud server.
Compared with the prior art, the invention has the following advantages:
the method comprises the steps of constructing a node.js server based on a node.js platform, connecting the node.js server with a physical collector and a cloud server in a two-way communication mode, carrying out Modbus protocol conversion on data information collected by the physical collector by using the node.js server, and transmitting the data information obtained after conversion to the cloud server.
The node.js server can be in communication connection with the physical collectors at the same time, the cloud server can also be in communication connection with the node.js servers, and by combining the advantages of fast response and easy expansion of the node.js platform, remote data information transmission can be reliably realized, the method and the system can be well suitable for intensive real-time application of operation data of distributed equipment, and intensive and reliable transmission of data information of the internet of things can be guaranteed.
Drawings
FIG. 1 is a schematic diagram of the system of the present invention;
FIG. 2 is a schematic flow diagram of the process of the present invention;
FIG. 3 is a schematic structural diagram of a transmission system constructed in an embodiment;
FIG. 4 is a flow chart of data information transmission of the Internet of things in the embodiment;
the notation in the figure is: 1. js server, 3, cloud server, 4, equipment model, 5, gateway model, 6 and backup database.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments.
Examples
As shown in fig. 1, an internet of things data information transmission system based on node.js comprises a physical collector 1, a node.js server 2 and a cloud server 3, wherein the node.js server 2 is respectively in bidirectional communication connection with the physical collector 1 and the cloud server 3, the node.js server 3 is further connected with an equipment model 4 and a gateway model 5, the equipment model 4 is connected with a backup database 6, wherein the node.js server 2 is specifically an application server deployed with a node.js platform, and the node.js platform is integrated with a Modbus protocol conversion module;
the cloud server 3 is provided with a port for externally disclosing services;
the node.js server 2 is in bidirectional communication connection with the cloud server 3 through an http protocol, and the node.js server 2 and the cloud server 3 are in http communication through a Json message;
and the js server 2 is in bidirectional communication connection with the physical collector 1 through a Modbus protocol.
In practical application, the node.js server 2 can be in bidirectional communication connection with a plurality of physical collectors 1, and the cloud server 3 can also be in bidirectional communication connection with a plurality of node.js servers 2, so that dense data information transmission can be well dealt with.
In the node.js-based internet of things data information transmission system, the physical collector 1 is used for collecting data information; the js server 2 is used for carrying out Modbus protocol conversion on the data information acquired by the physical acquisition unit 1, transmitting the converted data information into the equipment model 4 and transmitting the data information in the equipment model 4 into the gateway model 5;
the backup database 6 is used for storing data information of the incoming device model 4;
the gateway model 5 is used for integrating data information from all the equipment models 4;
the cloud server 2 is used for passively receiving data information from the gateway model 5.
The invention considers that the existing Internet of things equipment control is mostly an Internet of things equipment control method developed based on C language, but the purposes of remote transmission and remote parameter modification can be realized by using node.
Js is a JavaScript runtime environment (runtime). In fact, the Google V8 engine is packaged, the V8 engine executes JavaScript very fast, performance is very good, node. js optimizes some special cases and provides a substitute API, so that V8 runs better in a non-browser environment. Js is a platform established based on Chrome JavaScript operation, is used for conveniently establishing network application with high response speed and easy expansion, is light and efficient by using an event-driven and non-blocking I/O model, and is very suitable for running data-intensive real-time application on distributed equipment.
The node.js-based internet of things data information transmission system is applied to practice, and the specific data information transmission process is shown in fig. 2, and the method comprises the following steps:
s1, deploy node.js server and cloud server respectively, and establish communication connection between node.js server and physical collector, cloud server respectively, specifically:
firstly, deploying a cloud server and setting a port of the cloud server for externally disclosing services;
then, deploying the node.js platform integrated with Modbus protocol conversion on an application server, and configuring a port of physical acquisition equipment to enable the node.js server to be in communication connection with a physical acquisition device;
finally, setting an access address and a port of the cloud server to enable the node.js server to be in communication connection with the cloud server;
s2, the physical collector collects data information and transmits the collected data information to the node.js server;
s3, the node.js server carries out Modbus protocol conversion on the data information collected by the physical collector, then whether valid data information is acquired or not is judged, if so, the step S4 is executed, and if not, the step S5 is executed;
s4, transmitting the effective data information into the equipment model, integrating the data of all physical collectors, storing the data in a backup database, and then executing the step S6;
s5, acquiring the previously backed-up data information from the backup database, transmitting the acquired data information into the equipment model, and then executing the step S6;
s6, transmitting the data information in the equipment model into the gateway model to integrate the data information of all the equipment models;
and S7, uploading the data information integrated by the gateway model to a cloud server.
In summary, the technical solution of the present invention mainly includes two parts, a node.js server and a cloud server, where the node.js server is a Modbus communication service implemented based on node.js, and all data conversion is encapsulated therein;
the http protocol is agreed by the cloud server and the node.js server, and the two parties realize information interaction through the http protocol;
and the js server and the cloud server carry out http communication through messages in a Json format.
Js server mainly encapsulates the following internal logic and provides the interface for obtaining data and interaction to the client:
a) converting Modbus protocol data;
b) collecting data and combining the data with an equipment model;
c) pushing the acquired gateway data to a cloud server;
the cloud server mainly realizes the following functions:
a) js server
b) Passively receiving gateway model data;
before the functions of the node.js server and the cloud server are actually used, the node.js is required to be deployed on an application server, a port of a physical acquisition device is configured, and then a server is started; a port for providing a service to the outside needs to be configured for the cloud server, and fig. 3 shows a data information transmission system framework built in the embodiment:
1. and deploying the cloud server and setting a port of the cloud server for externally disclosing the service.
2. And configuring the connection with the physical collector at the node.
3. And deploying the node.js server, and setting an access address and a port of the cloud server.
In this embodiment, based on the built data information transmission system, the process of completing data information transmission of the internet of things is shown in fig. 4:
step 1: the physical collector collects the signal.
Step 2: and the physical collector sends collected information to the server.
And step 3: js server receives the collected information.
And 4, step 4: js server performs data conversion.
And 5: and (6) judging whether the data is acquired, if so, executing the step 6, and if not, executing the step 7.
Step 6: and the data is transmitted into the equipment model, the data of all the physical collectors is integrated, stored in a backup database and transmitted into the gateway model.
And 7: the previous data is retrieved from the backup database and passed into the device model.
And 8: and (4) transmitting the data into a gateway model, and integrating the data of all the equipment models.
And step 9: and uploading the gateway data to a cloud server.

Claims (10)

1. The node.js-based Internet of things data information transmission system is characterized by comprising a physical collector (1), a node.js server (2) and a cloud server (3), wherein the node.js server (2) is in bidirectional communication connection with the physical collector (1) and the cloud server (3) respectively, the node.js server (2) is further connected with an equipment model (4) and a gateway model (5), the equipment model (4) is connected with a backup database (6), and the physical collector (1) is used for collecting data information;
the node.js server (2) is used for carrying out Modbus protocol conversion on data information acquired by the physical acquisition unit (1), transmitting the converted data information into the equipment model (4) and transmitting the data information in the equipment model (4) into the gateway model (5);
the backup database (6) is used for storing data information transmitted into the equipment model (4);
the gateway model (5) is used for integrating data information from all the equipment models (4);
the cloud server (3) is used for passively receiving data information from the gateway model (5).
2. The node.js-based internet of things data information transmission system as claimed in claim 1, wherein the node.js server (2) is specifically an application server deployed with a node.js platform, and the node.js platform is integrated with a Modbus protocol conversion module.
3. A node.js-based internet of things data information transmission system as claimed in claim 1, wherein the cloud server (3) is provided with a port for external public service.
4. A node.js based internet of things data information transmission system as claimed in claim 1, wherein the node.js server (2) is in bidirectional communication connection with the cloud server (3) through http protocol.
5. The node.js-based internet of things data information transmission system as claimed in claim 4, wherein the node.js server (2) and the cloud server (3) are in http communication by means of Json messages.
6. A node.js-based internet of things data information transmission system according to claim 1, wherein the node.js server (2) is in bidirectional communication connection with the physical collector (1) through a Modbus protocol.
7. A node.js-based internet of things data information transmission system as claimed in claim 1, wherein the node.js server (2) is in bidirectional communication connection with a plurality of physical collectors (1) simultaneously.
8. A node.js-based internet of things data information transmission system as claimed in claim 1, wherein the cloud server (3) is in bidirectional communication connection with a plurality of node.js servers (2) simultaneously.
9. An internet of things data information transmission method using the internet of things data information transmission system of claim 1, comprising the steps of:
s1, deploying a node.js server and a cloud server, respectively, and establishing communication connections between the node.js server and the physical collector and the cloud server, respectively;
s2, the physical collector collects data information and transmits the collected data information to the node.js server;
s3, the node.js server carries out Modbus protocol conversion on the data information collected by the physical collector, then whether valid data information is acquired or not is judged, if so, the step S4 is executed, and if not, the step S5 is executed;
s4, transmitting the effective data information into the equipment model, integrating the data of all physical collectors, storing the data in a backup database, and then executing the step S6;
s5, acquiring the previously backed-up data information from the backup database, transmitting the acquired data information into the equipment model, and then executing the step S6;
s6, transmitting the data information in the equipment model into the gateway model to integrate the data information of all the equipment models;
and S7, uploading the data information integrated by the gateway model to a cloud server.
10. The internet of things data information transmission method according to claim 9, wherein the step S1 specifically includes the following steps:
s11, deploying a cloud server, and setting a port of the cloud server for externally disclosing services;
s12, deploying the node.js platform integrated with Modbus protocol conversion on an application server, and configuring a port of physical acquisition equipment to enable the node.js server to be in communication connection with a physical acquisition device;
and S13, setting an access address and a port of the cloud server, so that the node.js server is in communication connection with the cloud server.
CN202011524885.7A 2020-12-22 2020-12-22 Node.js-based Internet of things data information transmission system and method thereof Pending CN112671891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011524885.7A CN112671891A (en) 2020-12-22 2020-12-22 Node.js-based Internet of things data information transmission system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011524885.7A CN112671891A (en) 2020-12-22 2020-12-22 Node.js-based Internet of things data information transmission system and method thereof

Publications (1)

Publication Number Publication Date
CN112671891A true CN112671891A (en) 2021-04-16

Family

ID=75407366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011524885.7A Pending CN112671891A (en) 2020-12-22 2020-12-22 Node.js-based Internet of things data information transmission system and method thereof

Country Status (1)

Country Link
CN (1) CN112671891A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130204450A1 (en) * 2011-10-04 2013-08-08 Electro Industries/Gauge Tech Systems and methods for collecting, analyzing, billing, and reporting data from intelligent electronic devices
CN109587230A (en) * 2018-11-23 2019-04-05 扬州艾默软件技术有限公司 A kind of Internet of Things remote control terminal and control method
CN110351283A (en) * 2019-07-16 2019-10-18 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
CN111131014A (en) * 2020-01-22 2020-05-08 北方工业大学 Internet of things gateway
CN111277672A (en) * 2020-03-31 2020-06-12 上海积成能源科技有限公司 Non-blocking input and output model-based energy Internet of things data acquisition method and software gateway

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130204450A1 (en) * 2011-10-04 2013-08-08 Electro Industries/Gauge Tech Systems and methods for collecting, analyzing, billing, and reporting data from intelligent electronic devices
CN109587230A (en) * 2018-11-23 2019-04-05 扬州艾默软件技术有限公司 A kind of Internet of Things remote control terminal and control method
CN110351283A (en) * 2019-07-16 2019-10-18 腾讯科技(深圳)有限公司 A kind of data transmission method, device, equipment and storage medium
CN111131014A (en) * 2020-01-22 2020-05-08 北方工业大学 Internet of things gateway
CN111277672A (en) * 2020-03-31 2020-06-12 上海积成能源科技有限公司 Non-blocking input and output model-based energy Internet of things data acquisition method and software gateway

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈文艺等: "基于Socket.IO的物联网网关实时双向通信系统", 《西安邮电大学学报》 *

Similar Documents

Publication Publication Date Title
CN109889551B (en) Method for accessing intelligent hardware to Internet of things cloud platform
CN104601665B (en) A kind of system and method that high in the clouds real-time simulation is carried out to Internet of Things awareness apparatus
CN107273228B (en) Message transmission method based on star topology architecture
CN102137007B (en) Method and system for generating network topology as well as coordinator
CN103248512B (en) The generation method and system of application layer topological structure in communication network
WO2020063995A1 (en) Pon, method and apparatus for pon, and robot system
CN112925646A (en) Electric power data edge calculation system and calculation method
CN106790222B (en) MODBUS/full-interconnection manufacturing network information service adapter and implementation method thereof
CN111294235B (en) Data processing method, device, gateway and readable storage medium
CN110460483B (en) Profinet and Modbus equipment heterogeneous networking method based on SDN
CN112995269B (en) Data processing method, computer device and readable storage medium
CN111314371A (en) Edge device access system and method based on intelligent gateway technology
CN105049888A (en) Method for remotely pushing program source to set top box through WeChat based on heartbeat module
CN113900810A (en) Distributed graph processing method, system and storage medium
CN101098256A (en) Simple network management protocol based cluster management method and system
CN112637283A (en) Chat robot-based Internet of things intelligent home management system and control method
WO2022056927A1 (en) Gateway, data collection method, electronic device, storage medium, and program
KR20160103110A (en) Network element data access method and apparatus, and network management system
CN112671891A (en) Node.js-based Internet of things data information transmission system and method thereof
CN104539576A (en) Communication method and system based on IPv6 network
CN107968798A (en) A kind of network management resources label acquisition method, cache synchronization method, apparatus and system
CN114124952B (en) Cloud platform access system and method of data acquisition equipment
CN107911157B (en) Universal satellite command automation technology data processing system and method
CN209088989U (en) A kind of data acquisition gateway
CN111447093A (en) System and method for unified configuration of Internet of things equipment

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20231017