The invention discloses a M2M communication device and method based on NodeJS, which belongs to the technical field of M2M equipment, including a transmitter, receiver, NodeJS server and database; the transmitter and the receiver are respectively connected with the NodeJS server; database is stored in a database and output related information between the end and the receiving end and the NodeJS server the sending end is connected with the input terminal. The method includes related information S1, NodeJS server from the database to read between the sender and receiver; S2, NodeJS server according to the transmitter and the receiver of the UID information, are matched by matching set, and pairing information stored in the HashMap; S3, NodeJS server according to the matching information, send data the sender sends to the receiver. The invention uses the NodeJS technology to manufacture the server, and can not be influenced by the hardware medium, the transmission distance, the on chip operating system and other factors to carry out data interaction.
【技术实现步骤摘要】
一种基于NodeJS的M2M通信设备及方法
本专利技术涉及增强机器设备通信和网络(Machine-to-Machine/Man,M2M)
,特别涉及一种基于NodeJS的M2M通信设备及方法。
技术介绍
M2M业务是一种以机器终端设备智能交互为核心的、网络化的应用与服务。它通过在机器内部嵌入通信模块,通过各种承载方式将机器接入网络。目前在M2M业务中,硬件设备之间的通信是通过CAN总线、ZigBee或WiFi组网进行连接的。在采用CAN总线进行连接时,需要硬件直接使用电路连接。采用ZigBee或WiFi组网进行连接时,存在传输距离受限、节点数量受限等问题。而且,传统的硬件设备组网无法实时管控硬件节点之间的通信。
技术实现思路
本专利技术的目的在于提供一种基于NodeJS的M2M通信设备及方法,以实现任意介质的硬件设备之间的数据交互。为实现以上目的,第一方面,本专利技术提供一种基于NodeJS的M2M通信设备,包括:发送端、NodeJS服务端、接收端以及数据库;发送端、接收端分别与NodeJS服务端的连接;数据库中存储有发送端与接收端之间的关联信息且数据库的输出端 ...
【技术保护点】
一种基于NodeJS的M2M通信设备,其特征在于,包括:发送端(10)、NodeJS服务端(20)、接收端(30)以及数据库(40);发送端(10)、接收端(30)分别与NodeJS服务端(20)的连接;数据库(40)中存储有发送端(10)与接收端(20)之间的关联信息且数据库(40)的输出端与NodeJS服务端(20)的输入端连接。
【技术特征摘要】
1.一种基于NodeJS的M2M通信设备,其特征在于,包括:发送端(10)、NodeJS服务端(20)、接收端(30)以及数据库(40);发送端(10)、接收端(30)分别与NodeJS服务端(20)的连接;数据库(40)中存储有发送端(10)与接收端(20)之间的关联信息且数据库(40)的输出端与NodeJS服务端(20)的输入端连接。2.如权利要求1所述的设备,其特征在于,所述的发送端(10)、接收端(30)均包括至少一类硬件设备组。3.如权利要求1所述的设备,其特征在于,所述的NodeJS服务端(20)部署在云服务上或内网服务器上。4.如权利要求1所述的设备,其特征在于,所述的NodeJS服务端(20)与数据库(40)为长连接。5.如权利要求4所述的设备,其特征在于,所述的NodeJS服务端(20)与发送端(10)、接收端(30)均通过网络连接。6.一种基于NodeJS的M2M通信方法,其特征在于,包括:S1、NodeJS服务端(20)从数据库(40)中读取发送端(10)与接收端(30)之间的关联信息;S2、NodeJS服务端(20)根据发送端(10)、接收端(30)的UID信息,按照设定的匹配方式进行配对,并将配对信息保存在HashMap中;S3、NodeJS服务端(20)根据所述配对信息,将发送端(10)发送的数据发送至接收端(30)。7.如权利要求6所述的方法,其特征在于,所述的发送端(10)、接收端(3...
【专利技术属性】
技术研发人员:章海斌,熊泽群,焦坤,魏治成,刘巍,顾新行,蔡科伟,汪运,阳红剑,刘文涛,李世民,沈风,张宁,魏岩岩,王雄奇,许毅,丁波,叶妙兵,张晨皓,
申请(专利权)人:国网安徽省电力公司检修公司,国家电网公司,上海维坤通信科技有限公司,维坤智能科技上海有限公司,
类型:发明
国别省市:安徽,34
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。