CN111711563B - Medical internet of things gateway - Google Patents

Medical internet of things gateway Download PDF

Info

Publication number
CN111711563B
CN111711563B CN202010407831.6A CN202010407831A CN111711563B CN 111711563 B CN111711563 B CN 111711563B CN 202010407831 A CN202010407831 A CN 202010407831A CN 111711563 B CN111711563 B CN 111711563B
Authority
CN
China
Prior art keywords
data
protocol
mqtt
zigbee
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010407831.6A
Other languages
Chinese (zh)
Other versions
CN111711563A (en
Inventor
王运柱
张朝福
葛秋菊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Derpin Medical Science And Technology Co ltd
Original Assignee
Suzhou Derpin Medical Science And 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 Suzhou Derpin Medical Science And Technology Co ltd filed Critical Suzhou Derpin Medical Science And Technology Co ltd
Priority to CN202010407831.6A priority Critical patent/CN111711563B/en
Publication of CN111711563A publication Critical patent/CN111711563A/en
Application granted granted Critical
Publication of CN111711563B publication Critical patent/CN111711563B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The invention discloses a medical internet of things gateway. The invention relates to a communication method of a medical Internet of things gateway, which comprises the following steps: receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converting the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploading the RPC data to a data acquisition server; receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server. The invention has the beneficial effects that: the overall arrangement adopts MQTT and protocol conversion technology, the MQTT technology is adopted for sensors or equipment with small data volume and high real-time requirement, the protocol conversion technology is adopted for the transmission of pictures and video screens for the existing medical equipment which does not support the MQTT, and the characteristics of low time delay and high data volume are realized.

Description

Medical internet of things gateway
Technical Field
The invention relates to the field of Internet of things, in particular to a medical Internet of things gateway.
Background
The application of the internet of things in the medical field is mainly protocol conversion, namely interface data such as socket, USB, Bluetooth, com, LoRa and ZigBee are converted into http data (including RPC and REST), and then the http data are transmitted to a data center or a His system (hospital information system). The implementation principle is shown in fig. 1.
However, the application of the medical internet of things gateway technology in the fields of industrial internet of things and smart home mostly adopts the MQTT lightweight instant messaging technology, and the technical principle of the MQTT lightweight instant messaging technology is shown in fig. 2.
The traditional technology has the following technical problems:
the application scene of the medical internet of things is more complex than that of the industrial internet of things and the intelligent household internet of things, and the medical internet of things has the requirements of large data volume of electrocardio, films, videos and the like and also has the requirements of small data volume of infusion alarm, toilet alarm and the like and high instantaneity requirement. The current medical internet of things technology invention has large data transmission overhead, high bandwidth occupation and poor real-time performance for small data transmission quantity; the invention completely adopts the MQTT internet of things technology, is not suitable for data transmission with large data quantity such as electrocardio, films, videos and the like, and is also not suitable for medical equipment which does not support the MQTT.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a medical internet of things gateway, which adopts MQTT and protocol conversion technology on the whole, adopts the MQTT technology for sensors or equipment with small data volume and high real-time requirement, adopts the protocol conversion technology for the transmission of pictures and videos for the existing medical equipment which does not support the MQTT, and realizes the characteristics of low time delay and high data volume.
In order to solve the technical problem, the invention provides a communication method of a medical internet of things gateway, which comprises the following steps:
receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converting the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploading the RPC data to a data acquisition server;
receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
In one embodiment, the device adopting the MQTT protocol includes one or more of an infusion monitoring device, a toilet alarm, a temperature and humidity alarm and a smart home device.
Based on the same inventive concept, the invention also provides a communication method of the data acquisition server, which comprises the following steps:
receiving and storing MQTT data of the medical Internet of things gateway, wherein the MQTT data is obtained after the medical Internet of things gateway receives the MQTT data in equipment adopting an MQTT protocol;
receiving and storing RPC data of the medical Internet of things gateway, wherein the RPC data is obtained by the medical Internet of things gateway after receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol and converting the socket data, the usb protocol, the bluetooth protocol, the com data, the lora data or the zigbee data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
In one embodiment, the method further comprises the following steps: and receiving REST data adopting REST protocol equipment and storing the REST data.
In one embodiment, the equipment using the REST protocol includes one or more of a mobile nursing PDA and a general nurse follow-up kit.
Based on the same inventive concept, the invention also provides a medical internet of things data acquisition method, which comprises the following steps:
the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server;
the medical Internet of things gateway receives MQTT data in equipment adopting an MQTT protocol and forwards the MQTT data to the data acquisition server;
the data acquisition server receives and stores MQTT data of the medical Internet of things gateway; receiving and storing RPC data of the medical Internet of things gateway;
the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
In one embodiment, the device adopting the MQTT protocol includes one or more of an infusion monitoring device, a toilet alarm, a temperature and humidity alarm and a smart home device.
In one embodiment, the method further comprises the following steps: and the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data.
In one embodiment, the equipment using the REST protocol includes one or more of a mobile nursing PDA and a general nurse follow-up kit.
Based on the same inventive concept, the invention also provides a medical internet of things data acquisition system, which comprises: the system comprises a medical Internet of things gateway and a data acquisition server;
the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the com data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server; receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server;
the data acquisition server receives and stores the MQTT data of the medical Internet of things gateway; receiving and storing RPC data of the medical Internet of things gateway; receiving REST data adopting REST protocol equipment and storing the REST data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
The invention has the beneficial effects that:
the overall arrangement adopts MQTT and protocol conversion technology, the MQTT technology is adopted for sensors or equipment with small data volume and high real-time requirement, the protocol conversion technology is adopted for the transmission of pictures and video screens for the existing medical equipment which does not support the MQTT, and the characteristics of low time delay and high data volume are realized.
Drawings
Fig. 1 is a schematic diagram of a protocol conversion of the current internet of things in the background of the invention.
FIG. 2 is a technical diagram of the background MQTT of the present invention.
Fig. 3 is a technical schematic of the present invention.
Fig. 4 is a schematic structural diagram of the medical internet of things data acquisition system of the invention.
Fig. 5 is a schematic architecture diagram of the medical internet of things gateway of the invention.
FIG. 6 is a schematic diagram of the architecture of the data collection server of the present invention.
Fig. 7 is a schematic architecture diagram of the medical internet of things data acquisition method of the invention.
Fig. 8 is a schematic flow chart of a communication method of the medical internet of things gateway according to the invention.
Fig. 9 is a schematic flow chart of a communication method of the data acquisition server according to the present invention.
Fig. 10 is a flow chart illustrating a communication method of the data collection server according to the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
The invention adopts multiple technologies of MQTT, RPC and REST, and two-stage acquisition of the medical internet of things gateway and the data acquisition service is applied to the acquisition of the internet of things data, and the implementation principle is shown in figure 3.
In fig. 3, the noun explains:
MQTT Subscribe: MQTT subscription, namely MQTT message receivers, are a PC and a mobile terminal in the invention;
MQTT Broker: the MQTT agent, namely the MQTT server, is a data acquisition server in the invention;
MQTT publishing: MQTT is issued, namely an MQTT message issuer, and the MQTT message issuer is infusion monitoring, toilet alarm, temperature and humidity alarm and intelligent household equipment in the invention;
medical internet of things gateway: the medical Internet of things gateway widely applied to the medical Internet of things performs protocol conversion and MQTT message forwarding;
a data acquisition server: in the invention, the data acquisition server provides REST service for calling PDA and the follow-up packet, provides RPC service for calling the medical Internet of things gateway, and is also used as an MQTT server for calling MQTT describe and MQTT publish.
The architecture of the invention is shown in fig. 4, and the system architecture comprises a data access layer, a data acquisition layer, a service layer and a data application layer. The data access layer comprises access equipment such as a sensor, intelligent household equipment, medical detection equipment, a PDA (personal digital assistant), a follow-up packet and the like; the data acquisition layer is a medical Internet of things gateway; the service layer is a data acquisition service; the data application layer is hospital HIS, LIS (laboratory information system), PACS (picture archiving and communication system), and MQTT-equipped PC and mobile terminal applications.
Referring to fig. 3, 5 and 8, a communication method of a medical internet of things gateway includes:
s110, receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converting the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploading the RPC data to a data acquisition server.
And S120, receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server.
The data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol (serial port protocol), the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
The data analysis method adopting the Socket protocol comprises the following steps:
the socket sends and receives data in the form of character strings. Unpacking is to parse the string into int, short, char.
Suppose now that there is a string, char src [ ], which contains a short int data, an int data, a char 6 string.
How the steps of parsing.
1. First solve out short int
short int shortNum=*(short int*)src;
2. Next to explain int, note the subscript of src, why would be 2? Since short int occupies the first two bytes, if int is to be solved from behind short int
int intNum=*(int*)(src+2);
3. Next, parse the char [ ] string, note that src +6, since short int and int already occupy the first 6 bytes, the parsing of the string is solved from behind the other two
char destChar[100];
memcpy(destChar,src+6,len);
The desired data format can be solved from the character string through the above steps.
The data analysis method adopting the USB protocol comprises the following steps:
the data passes through a client software layer, a USB system software layer and 3 logic layers of a host controller at a host end, and passes through a USB bus interface layer, a USB device layer and a function layer at an equipment end. During programming, the client software operates the corresponding equipment through a programming interface provided by the USB system software, and is not realized by directly operating a memory or an I/O port.
Take the case of a signal flowing from the host to the device: the data that the client software transmits to the system software via usbd (USB driver) is data that does not have a USB communication format. The system software frames the data to realize bandwidth allocation, and then hands over to the USB host controller. The host controller packs the data according to the USB format to realize transmission affairs, and finally converts the data into differential codes conforming to the USB electrical characteristics after passing through a Serial Interface Engine (SIE) and sends the differential codes to equipment from a USB cable. The operation after the data arrives at the device is an inverse process: decoding the data in the device layer, separating and correctly arranging data packets sent to different endpoints, removing the frame structure, and converting the data into a non-USB format; the data is then sent to the endpoints to effect communication.
On the host side, there are two interface layers, HCD and USBD. The HCD is called Host Control Driver (Host Control Driver) and is an abstraction of Host controller hardware, providing a software interface with USB system software. From the client software point of view, the USBD controls all USB devices, and the client's control of the devices and the data to be sent need only be given to the USBD. The USBD provides a command mechanism and a conduit mechanism for client software. The client software can access endpoint 0 of all devices and communicate with the default pipe through a command mechanism, thereby realizing configuration and other basic control work of the devices. The pipe mechanism allows clients and devices to implement specific communication functions.
The data analysis method adopting the Bluetooth protocol comprises the following steps:
1. transmission protocol
The Bluetooth devices are responsible for mutually confirming the positions of the other sides and establishing and managing physical links among the Bluetooth devices;
the bottom layer transmission protocol: a Bluetooth Radio frequency (Radio) part, a Baseband Link management Controller (Baseband & Link Controller), and a Link management protocol (Link manager protocol LMP). The system is responsible for the physical realization of language and data wireless transmission and networking among Bluetooth devices.
A high-level transmission protocol: a logical link Control and adapter (logical link Control and Adaptation Protocol) L2CAP, and a Host Control Interface (HCI). The method shields the bottom layer transmission operation such as frequency hopping sequence selection and the like for the high layer application, provides the high layer program with effectiveness, and is favorable for realizing the data grouping format.
2. Intermediary protocol
Necessary support is provided for higher layer application protocols or programs to work on the bluetooth logical link, providing different standard interfaces for applications.
A serial port simulation protocol: RFCOMM, service discovery protocol: SDP, interoperability protocol IrDA, network access protocol: PPP, IP, TCP, UDP, telephony control protocol: TCS, AT instruction set.
3. Application protocol
The application software above the bluetooth protocol stack and the involved protocols, such as: dial-up networking and language function.
The data analysis method adopting the COM protocol comprises the following steps:
firstly, the lower computer has two modes for receiving data, namely, waiting for receiving, and the processor queries the serial port state all the time to judge whether the data is received. And secondly, interrupting the receiving.
The parsing process of the data packet can be set to different locations. If the protocol is simple, the whole system only processes some simple commands, then the analysis process of the data packet can be directly put into the interrupt processing function, when the correct data packet is received, the corresponding mark is set, and the command is processed in the main program.
If the protocol is slightly complex, the better way is to store the received data in a buffer area, and the main program reads the data and then analyzes the data. In a system with one-to-many system, the connection command is firstly analyzed in the process of receiving interruption, the main program enters a setting state after the connection command is received, and the rest protocols are analyzed in the mode of inquiry.
Wherein 0x55,0xAA,0x7E is the frame head of the data frame, 0x0D is the frame tail, 0x12 is the destination address of the equipment, 0xF0 is the source address, 0x02 is the data length, then two data 0x23,0x45 are followed, the settlement accumulation and the XOR check sum are started from the destination address until the last bit of the data is finished.
The data analysis method adopting the LoRa protocol comprises the following steps:
there are two packet formats for LoRa: explicit and implicit.
The LoRa packet contains: preamble, Header (optional type of Header), Payload (data Payload)
The preamble is used to keep the receiver synchronized with the incoming data stream. By default, the data packet contains a preamble of 12 symbols in length. The preamble length is a variable that can be set by programming, so the length of the preamble can be extended. For example, in receive intensive applications, the length of the preamble may be shortened in order to shorten the receiver duty cycle. However, the minimum allowed length of the preamble can satisfy all communication requirements. For the case where a fixed overhead is desired for the preamble, the length of the preamble register may be set between 6 and 65536 to change the length of the transmission preamble, which may actually range from 6+4 to 65535+4 symbols. This allows almost any length of preamble sequence to be transmitted.
The receiver performs preamble detection periodically. Therefore, the preamble length of the receiver should coincide with the transmitter. If the preamble length is unknown or may vary, the preamble length of the receiver should be set to a maximum value.
The data analysis method adopting the ZigBee protocol comprises the following steps:
in ZigBee, only PAN coordination points can establish a new ZigBee network. When the zigbee pan coordinator wants to establish a new network, it first scans channels and finds a free channel in the network to establish the new network. If a suitable channel is found, the ZigBee coordination point will select a PAN identifier for the new network (PAN identifier is used to identify the whole network, so the selected PAN identifier must be unique in the channel). Once the PAN identifier is selected, it indicates that a network has been established, after which the coordinator of this network responds and declares its presence if another ZigBee coordinator scans the channel. In addition, the ZigBee coordination point can also select a 16-bit network address for the ZigBee coordination point. All nodes in the ZigBee network have a 64-bit IEEE extended address and a 16-bit network address, wherein the 16-bit network address is unique in the whole network, namely the MAC short address in 802.15.4.
When a network is established, the coordinator actively scans channels by sending beacon frames, and if other networks exist, replies are given after receiving the beacon frames to indicate the existence of the networks.
The data analysis method adopting the MQTT protocol comprises the following steps:
the protocol is a convention for both parties to communicate, i.e., what represents the 1 st bit transmission and what … … of the 2 nd bit transmission. In the MQTT protocol, an MQTT packet consists of: fixed header (Fixed header), Variable header (Variable header), and message body (payload).
Fixed header (Fixed header) existing in all MQTT data packets and representing packet type and packet class identifier of the data packet
Variable headers (Variable headers) present in partial MQTT packets, the type of packet determining the presence and particular content of the Variable header
The message body (Payload) exists in a partial MQTT data packet and represents that the RPC data of the specific content received by the client is analyzed as follows:
RPC (remote Procedure Call protocol) -a remote Procedure Call protocol, which is a protocol that requests services from remote computer programs over a network without knowledge of the underlying network technology. The RPC protocol assumes the existence of some transport protocol, such as TCP/IP or UDP, for carrying information data between communication programs. RPC converts the original local call into a method on a remote server, and brings about the possibility of approximately unlimited promotion to the processing capacity and throughput of the system. In the OSI network communication model, RPCs span the transport and application layers. RPC makes it easier to develop applications including network distributed multiprogrammers.
RPC architecture
A complete RPC architecture comprises four core components, namely a Client, a Client Stub, a Server and a Server Stub, wherein the Stub can be understood as a Stub.
Client (Client), caller of service.
The Client Stub (Client Stub) stores the address message of the server, packs the request parameters of the Client into network messages and then remotely sends the network messages to the server through the network.
Server, true service provider.
And the Server Stub (Server Stub) receives the message sent by the client, unpacks the message and calls a local method.
RPC calling procedure
(1) A client (client) calls a service in a local calling mode (namely in an interface mode);
(2) after receiving the call, the client stub (client stub) is responsible for assembling the method, the parameters and the like into a message body capable of network transmission (serializing the message body object into a binary system);
(3) the client sends the message to the server through the sockets;
(4) after receiving the message, the server stub (server stub) decodes the message (deserializes the message object);
(5) a server stub calls a local service according to a decoding result;
(6) the local service executes and returns the result to the server stub (server stub);
(7) packing the returned result into a message by a server stub (serializing a result message object);
(8) a server (server) sends a message to a client through sockets;
(9) the client stub (client stub) receives the result message and decodes (serializes) the result message;
(10) the client (client) gets the final result.
The goal of RPC is to encapsulate all of the steps 2, 3, 4, 7, 8, and 9.
Note that: whatever the type of data, it is eventually converted into a binary stream for transmission over the network, the sender of the data needs to convert the object into a binary stream, and the receiver of the data needs to restore the binary stream back to the object.
The equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol mainly comprises the existing medical equipment which does not support MQTT, such as medical monitoring equipment including a blood glucose meter, a blood pressure meter, an electrocardiograph, a life monitoring station and the like, has large data volume and low real-time requirement, and the equipment adopting the MQTT protocol comprises infusion monitoring equipment, a bathroom alarm, a temperature and humidity alarm and intelligent household equipment, namely sensors or equipment with high requirements on small data volume and real-time.
It can be understood that the medical internet of things gateway undertakes two tasks, namely, protocol conversion is performed, and protocol conversion is performed on data of the medical detection equipment (namely, socket, USB, Bluetooth, com, LoRa and ZigBee interface data are converted into RPC data and are uploaded to the data acquisition server); and secondly, transmitting MQTT data, and transmitting and uploading the MQTT data of the sensor and the intelligent household equipment to a data acquisition server.
Specifically, as shown in fig. 5, the gateway architecture is provided with multiple threads, receives data from socket, usb, bluetooth, com, lora, and zigbee, converts the data into RPC data, calls a data collection service RPC interface, and uploads the data to a data collection server; and (3) opening the single thread MQTT, monitoring the MQTT data and forwarding the data to a data acquisition service MQTT Broker.
Specifically, the gateway service flow is as follows:
firstly, starting a program, reading configuration information of a configuration file config.ini, whether a socket, a usb, a bluetooth, a com, a lora and a zigbee are started, information of a port and the like are configured by the config.ini, and starting a thread and an MQTT thread of the corresponding socket, usb, bluetooth, com, lora and zigbee by a gateway according to the configuration information;
monitoring data of socket, usb, bluetooth, com, lora and zigbee and MQTT data;
thirdly, converting socket, usb, bluetooth, com, lora and zigbee data into RPC data;
and fourthly, calling an RPC service interface of the data acquisition server, uploading the converted RPC data to the data acquisition server, calling an MQTT Broker interface of the data acquisition server, and uploading the MQTT data.
Referring to fig. 3, 6 and 9, based on the same inventive concept, the present invention further provides a communication method of a data acquisition server, including:
s210, receiving and storing MQTT data of the medical Internet of things gateway, wherein the MQTT data are obtained after the medical Internet of things gateway receives the MQTT data in the equipment adopting the MQTT protocol.
S220, RPC data of the medical Internet of things gateway are received and stored, wherein the RPC data are obtained after the RPC data are received by the medical Internet of things gateway and adopt socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment of a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, and are converted.
The data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
The equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol mainly comprises the existing medical equipment which does not support MQTT, such as medical monitoring equipment including a blood glucose meter, a blood pressure meter, an electrocardiograph, a life monitoring station and the like, has large data volume and low real-time requirement, and the equipment adopting the MQTT protocol comprises infusion monitoring equipment, a bathroom alarm, a temperature and humidity alarm and intelligent household equipment, namely sensors or equipment with high requirements on small data volume and real-time.
The data acquisition server is constructed as shown in fig. 6, MQTT Broker service, RPC service and REST service are developed, data acquired from a gateway, a PDA, a follow-up packet and MQTT Publish are stored in a database, RPC and REST interfaces are arranged for being called by HIS, LIS and PACS systems, and MQTT Subscribe acquires MQTT data from the MQTT Broker service.
The data acquisition service business process of the data acquisition server is as follows:
firstly, starting MQTT Broker service, RPC service and REST service, and external RPC and REST interfaces;
secondly, the RPC service monitors gateway data and stores the data in a database;
thirdly, the REST service monitors the PDA and the data of the follow-up examination package, and the data are stored in a database;
fourthly, MQTT data forwarded by the MQTT Broker service monitoring gateway are stored in a database and are sent to MQTT subscribes;
and fifthly, monitoring the call requests of HIS, LIS and PACS by external RPC and REST interfaces, and extracting data from the database, wherein the data correspond to the RPC and REST requests.
In one embodiment, the method further comprises the following steps: and receiving REST data adopting REST protocol equipment and storing the REST data. The equipment adopting the REST protocol comprises one or more of a mobile nursing PDA and a general nurse follow-up kit. For mobile nursing PDA and general nurse follow-up kits: in the invention, the collected data is uploaded to a data collection server directly through an REST protocol; it can be understood that since the mobile nursing PDA and the general nurse follow-up kit are separated from the devices in the local area network environment of the hospital, it is not necessary to pass through the gateway of the medical internet of things, and thus transmission is performed through a public network such as 4G, and the REST protocol is adopted.
Referring to fig. 3, fig. 7 and fig. 10, based on the same inventive concept, the invention further provides a medical internet of things data acquisition method, which includes:
s310, the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the com data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server.
And S320, the medical Internet of things gateway receives MQTT data in equipment adopting an MQTT protocol and forwards the MQTT data to the data acquisition server.
S330, the data acquisition server receives and stores the MQTT data of the medical Internet of things gateway; and receiving and storing the RPC data of the medical Internet of things gateway.
And S340, the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data.
The data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
The equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol mainly comprises the existing medical equipment which does not support MQTT, such as medical monitoring equipment including a blood glucose meter, a blood pressure meter, an electrocardiograph, a life monitoring station and the like, has large data volume and low real-time requirement, and the equipment adopting the MQTT protocol comprises infusion monitoring equipment, a bathroom alarm, a temperature and humidity alarm and intelligent household equipment, namely sensors or equipment with high requirements on small data volume and real-time.
It can be understood that the medical internet of things gateway undertakes two tasks, namely, protocol conversion is performed, and protocol conversion is performed on data of the medical detection equipment (namely, socket, USB, Bluetooth, com, LoRa and ZigBee interface data are converted into RPC data and are uploaded to the data acquisition server); and secondly, transmitting MQTT data, and transmitting and uploading the MQTT data of the sensor and the intelligent household equipment to a data acquisition server.
Specifically, as shown in fig. 5, the gateway architecture is provided with multiple threads, receives data from socket, usb, bluetooth, com, lora, and zigbee, converts the data into RPC data, calls a data collection service RPC interface, and uploads the data to a data collection server; and (3) opening the single thread MQTT, monitoring the MQTT data and forwarding the data to a data acquisition service MQTT Broker.
Specifically, the gateway service flow is as follows:
firstly, starting a program, reading configuration information of a configuration file config.ini, whether a socket, a usb, a bluetooth, a com, a lora and a zigbee are started, information of a port and the like are configured by the config.ini, and starting a thread and an MQTT thread of the corresponding socket, usb, bluetooth, com, lora and zigbee by a gateway according to the configuration information;
monitoring data of socket, usb, bluetooth, com, lora and zigbee and MQTT data;
thirdly, converting socket, usb, bluetooth, com, lora and zigbee data into RPC data;
and fourthly, calling an RPC service interface of the data acquisition server, uploading the converted RPC data to the data acquisition server, calling an MQTT Broker interface of the data acquisition server, and uploading the MQTT data.
The data acquisition server is constructed as shown in fig. 6, MQTT Broker service, RPC service and REST service are developed, data acquired from a gateway, a PDA, a follow-up packet and MQTT Publish are stored in a database, RPC and REST interfaces are arranged for being called by HIS, LIS and PACS systems, and MQTT Subscribe acquires MQTT data from the MQTT Broker service.
The data acquisition service business process of the data acquisition server is as follows:
firstly, starting MQTT Broker service, RPC service and REST service, and external RPC and REST interfaces;
secondly, the RPC service monitors gateway data and stores the data in a database;
thirdly, the REST service monitors the PDA and the data of the follow-up examination package, and the data are stored in a database;
fourthly, MQTT data forwarded by the MQTT Broker service monitoring gateway are stored in a database and are sent to MQTT subscribes;
and fifthly, monitoring the call requests of HIS, LIS and PACS by external RPC and REST interfaces, and extracting data from the database, wherein the data correspond to the RPC and REST requests.
Further comprising: and the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data. The equipment adopting the REST protocol comprises one or more of a mobile nursing PDA and a general nurse follow-up kit. For mobile nursing PDA and general nurse follow-up kits: in the invention, the collected data is uploaded to a data collection server directly through an REST protocol; it can be understood that since the mobile nursing PDA and the general nurse follow-up kit are separated from the devices in the local area network environment of the hospital, it is not necessary to pass through the gateway of the medical internet of things, and thus transmission is performed through a public network such as 4G, and the REST protocol is adopted.
Referring to fig. 3 and 4, based on the same inventive concept, the invention further provides a medical data acquisition system of the internet of things, comprising: the system comprises a medical Internet of things gateway and a data acquisition server;
the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the com data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server; receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server;
the data acquisition server receives and stores the MQTT data of the medical Internet of things gateway; receiving and storing RPC data of the medical Internet of things gateway; receiving REST data adopting REST protocol equipment and storing the REST data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
The equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol mainly comprises the existing medical equipment which does not support MQTT, such as medical monitoring equipment including a blood glucose meter, a blood pressure meter, an electrocardiograph, a life monitoring station and the like, has large data volume and low real-time requirement, and the equipment adopting the MQTT protocol comprises infusion monitoring equipment, a bathroom alarm, a temperature and humidity alarm and intelligent household equipment, namely sensors or equipment with high requirements on small data volume and real-time.
It can be understood that the medical internet of things gateway undertakes two tasks, namely, protocol conversion is performed, and protocol conversion is performed on data of the medical detection equipment (namely, socket, USB, Bluetooth, com, LoRa and ZigBee interface data are converted into RPC data and are uploaded to the data acquisition server); and secondly, transmitting MQTT data, and transmitting and uploading the MQTT data of the sensor and the intelligent household equipment to a data acquisition server.
Specifically, as shown in fig. 5, the gateway architecture is provided with multiple threads, receives data from socket, usb, bluetooth, com, lora, and zigbee, converts the data into RPC data, calls a data collection service RPC interface, and uploads the data to a data collection server; and (3) opening the single thread MQTT, monitoring the MQTT data and forwarding the data to a data acquisition service MQTT Broker.
Specifically, the gateway service flow is as follows:
firstly, starting a program, reading configuration information of a configuration file config.ini, whether a socket, a usb, a bluetooth, a com, a lora and a zigbee are started, information of a port and the like are configured by the config.ini, and starting a thread and an MQTT thread of the corresponding socket, usb, bluetooth, com, lora and zigbee by a gateway according to the configuration information;
monitoring data of socket, usb, bluetooth, com, lora and zigbee and MQTT data;
thirdly, converting socket, usb, bluetooth, com, lora and zigbee data into RPC data;
and fourthly, calling an RPC service interface of the data acquisition server, uploading the converted RPC data to the data acquisition server, calling an MQTT Broker interface of the data acquisition server, and uploading the MQTT data.
The data acquisition server is constructed as shown in fig. 6, MQTT Broker service, RPC service and REST service are developed, data acquired from a gateway, a PDA, a follow-up packet and MQTT Publish are stored in a database, RPC and REST interfaces are arranged for being called by HIS, LIS and PACS systems, and MQTT Subscribe acquires MQTT data from the MQTT Broker service.
The data acquisition service business process of the data acquisition server is as follows:
firstly, starting MQTT Broker service, RPC service and REST service, and external RPC and REST interfaces;
secondly, the RPC service monitors gateway data and stores the data in a database;
thirdly, the REST service monitors the PDA and the data of the follow-up examination package, and the data are stored in a database;
fourthly, MQTT data forwarded by the MQTT Broker service monitoring gateway are stored in a database and are sent to MQTT subscribes;
and fifthly, monitoring the call requests of HIS, LIS and PACS by external RPC and REST interfaces, and extracting data from the database, wherein the data correspond to the RPC and REST requests.
In one embodiment, the method further comprises the following steps: and receiving REST data adopting REST protocol equipment and storing the REST data. The equipment adopting the REST protocol comprises one or more of a mobile nursing PDA and a general nurse follow-up kit. For mobile nursing PDA and general nurse follow-up kits: in the invention, the collected data is uploaded to a data collection server directly through an REST protocol; it can be understood that since the mobile nursing PDA and the general nurse follow-up kit are separated from the devices in the local area network environment of the hospital, it is not necessary to pass through the gateway of the medical internet of things, and thus transmission is performed through a public network such as 4G, and the REST protocol is adopted.
The invention has the beneficial effects that:
the overall arrangement adopts MQTT and protocol conversion technology, the MQTT technology is adopted for sensors or equipment with small data volume and high real-time requirement, the protocol conversion technology is adopted for the transmission of pictures and video screens for the existing medical equipment which does not support the MQTT, and the characteristics of low time delay and high data volume are realized.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (10)

1. A communication method of a medical Internet of things gateway is characterized by comprising the following steps:
receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converting the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploading the RPC data to a data acquisition server;
receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
2. The communication method of the medical internet of things gateway as claimed in claim 1, wherein the equipment adopting the MQTT protocol includes one or more of an infusion monitoring device, a toilet alarm, a temperature and humidity alarm and an intelligent home equipment.
3. A communication method of a data acquisition server is characterized by comprising the following steps:
receiving and storing MQTT data of the medical Internet of things gateway, wherein the MQTT data is obtained after the medical Internet of things gateway receives the MQTT data in equipment adopting an MQTT protocol;
receiving and storing RPC data of the medical Internet of things gateway, wherein the RPC data is obtained by the medical Internet of things gateway after receiving socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol and converting the socket data, the usb protocol, the bluetooth protocol, the com data, the lora data or the zigbee data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
4. The communication method of the data collection server according to claim 3, further comprising: and receiving REST data adopting REST protocol equipment and storing the REST data.
5. The method of communicating with a data collection server of claim 4, wherein the equipment using the REST protocol includes one or more of a mobile nursing PDA and a general nurse follow-up kit.
6. A medical Internet of things data acquisition method is characterized by comprising the following steps:
the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server;
the medical Internet of things gateway receives MQTT data in equipment adopting an MQTT protocol and forwards the MQTT data to the data acquisition server;
the data acquisition server receives and stores MQTT data of the medical Internet of things gateway; receiving and storing RPC data of the medical Internet of things gateway;
the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
7. The medical internet of things data acquisition method of claim 6, wherein the equipment adopting the MQTT protocol comprises one or more of infusion monitoring equipment, a toilet alarm, a temperature and humidity alarm and intelligent household equipment.
8. The medical internet of things data acquisition method of claim 6, further comprising: and the data acquisition server receives REST data adopting REST protocol equipment and stores the REST data.
9. The medical internet of things data acquisition method of claim 8, wherein the equipment adopting the REST protocol comprises one or more of a mobile nursing PDA and a general nurse follow-up kit.
10. The utility model provides a medical thing networking data acquisition system which characterized in that includes: the system comprises a medical Internet of things gateway and a data acquisition server;
the medical Internet of things gateway receives socket data, usb data, bluetooth data, com data, lora data or zigbee data in equipment adopting a socket protocol, a usb protocol, a bluetooth protocol, a com protocol, a lora protocol or a zigbee protocol, converts the socket data, the usb data, the bluetooth data, the com data, the lora data or the zigbee data into RPC data, and uploads the RPC data to a data acquisition server; receiving MQTT data in equipment adopting an MQTT protocol, and forwarding the MQTT data to the data acquisition server;
the data acquisition server receives and stores the MQTT data of the medical Internet of things gateway; receiving and storing RPC data of the medical Internet of things gateway; receiving REST data adopting REST protocol equipment and storing the REST data;
the data volume of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is larger than that of the equipment adopting the MQTT protocol; the data real-time requirement of the equipment adopting the socket protocol, the usb protocol, the bluetooth protocol, the com protocol, the lora protocol or the zigbee protocol is smaller than that of the equipment adopting the MQTT protocol.
CN202010407831.6A 2020-05-14 2020-05-14 Medical internet of things gateway Active CN111711563B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010407831.6A CN111711563B (en) 2020-05-14 2020-05-14 Medical internet of things gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010407831.6A CN111711563B (en) 2020-05-14 2020-05-14 Medical internet of things gateway

Publications (2)

Publication Number Publication Date
CN111711563A CN111711563A (en) 2020-09-25
CN111711563B true CN111711563B (en) 2021-11-12

Family

ID=72537803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010407831.6A Active CN111711563B (en) 2020-05-14 2020-05-14 Medical internet of things gateway

Country Status (1)

Country Link
CN (1) CN111711563B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797400A (en) * 2014-09-17 2017-05-31 康维达无线有限责任公司 System and method for making it possible to access third party's service via service layer
CN109327493A (en) * 2017-08-01 2019-02-12 徐州天荣医疗通讯设备有限公司 A kind of remote medical monitoring system based on cloud and monitoring method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3561680B8 (en) * 2016-12-22 2022-10-26 Nippon Telegraph and Telephone Corporation Rpc conversion processing system and rpc conversion method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106797400A (en) * 2014-09-17 2017-05-31 康维达无线有限责任公司 System and method for making it possible to access third party's service via service layer
CN109327493A (en) * 2017-08-01 2019-02-12 徐州天荣医疗通讯设备有限公司 A kind of remote medical monitoring system based on cloud and monitoring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于雾计算的医联体内慢病远程健康监护研究;邢丹;《医学信息学杂志》;20191231;第40卷(第6期);全文 *

Also Published As

Publication number Publication date
CN111711563A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
US11882195B2 (en) Systems and methods for enabling access to third party services via a service layer
CN107018147B (en) Internet of things communication method and system and gateway module
CN1742473B (en) Common protocol layer architecture and methods for transmitting data between different network protocols and a common protocol packet
CN109756559B (en) Construction and use method for distributed data distribution service of embedded airborne system
KR100978336B1 (en) Remote access
US20080235358A1 (en) Proxy Device, Network System, and Communication Method
US7636353B2 (en) Method and system for transmitting data over a network
WO2010055209A1 (en) Method and apparatus for virtualizing resources
WO2022262465A1 (en) Opc ua-based centralized user configuration method and system for time sensitive network
KR20110002881A (en) Method and apparatus for processing messages
EP1419626B1 (en) System for remote data acquisition based on e-mail message communication through public and private networks and corresponding method and computer program
EP1968275A1 (en) A method for compacting SIP messages to reduce energy spent in communication in resource-constrained nodes
CN114827202A (en) Entity transmission method, system and storage medium based on Internet of things interaction
CN102484895A (en) Apparatus and method for remote control in a short-range network, and system supporting the same
CN113810271A (en) Southbound equipment interface agent device of Internet of things gateway and implementation method
CN111479336A (en) Software framework and development platform of WI-FI chipset
CN110888329A (en) Intelligent home platform with open access of equipment manufacturer and data processing method thereof
CN111711563B (en) Medical internet of things gateway
CN116156012B (en) Universal heterogeneous Internet of things equipment standardized access and data analysis system and method
CN113765719B (en) Instant implementation method for unified management, monitoring and maintenance of Internet of things access
Moeller et al. Wireless networking services for implementation of ambient intelligence at home
KR101673755B1 (en) System for interoperation network of IoT and network of Zigbee based DDS and Method thereof
CN114157714A (en) Method, system and storage device for realizing financial system protocol communication based on Netty
Mikhaylov et al. Intelligent sensor interfaces and data format
Klauck Seamless integration of smart objects into the internet using XMPP and mDNS/DNS-SD

Legal Events

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