CN116016005A - Internet of things equipment access method and device, electronic equipment and storage medium - Google Patents

Internet of things equipment access method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116016005A
CN116016005A CN202211600986.7A CN202211600986A CN116016005A CN 116016005 A CN116016005 A CN 116016005A CN 202211600986 A CN202211600986 A CN 202211600986A CN 116016005 A CN116016005 A CN 116016005A
Authority
CN
China
Prior art keywords
internet
protocol
things
access
server
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
CN202211600986.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.)
Alibaba Cloud Computing Ltd
Original Assignee
Alibaba Cloud Computing 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 Alibaba Cloud Computing Ltd filed Critical Alibaba Cloud Computing Ltd
Priority to CN202211600986.7A priority Critical patent/CN116016005A/en
Publication of CN116016005A publication Critical patent/CN116016005A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application provides an Internet of things equipment access method, an Internet of things equipment access device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a protocol plug-in corresponding to an access protocol; loading a protocol plug-in and configuring a protocol port to deploy an access protocol; based on the deployed access protocol, processing the message transmitted when the Internet of things equipment is accessed to the Internet of things server. According to the embodiment of the application, the Internet of things equipment using any access protocol can be supported to access the Internet of things server, the access cost is reduced, and the efficiency of data interaction during access is improved.

Description

Internet of things equipment access method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of internet of things, in particular to an internet of things device access method and device, electronic equipment and a storage medium.
Background
With the continuous development of the internet of things technology, the number of internet of things devices is rapidly increased, and access protocols used by the internet of things devices to access to the internet of things server are also becoming various. Different industries have respective industry access protocols, different enterprises also have respective private access protocols, and different access protocols have different data transmission standards. The internet of things server is a platform for unified access of internet of things equipment, and the problems of multiple protocol types and high adaptation difficulty are faced. In the related art, an additional protocol conversion gateway is required to be deployed at the service end of the internet of things, and access protocols used by different internet of things devices are uniformly converted into an MQTT (Message Queuing Telemetry Transport, message queue telemetry transmission) protocol, and then the access of the internet of things devices to the service end of the internet of things can be realized, so that the data transmission under various service scenes is satisfied. The protocol conversion gateway needs to carry out protocol conversion on each data interaction when the internet of things equipment is accessed to the internet of things server, the protocol conversion speed is low, and the efficiency of the internet of things equipment accessing to the internet of things server is affected.
Disclosure of Invention
The embodiment of the application provides an access method and device for Internet of things equipment, electronic equipment and a storage medium, so as to solve the problems in the related art.
In a first aspect, an embodiment of the present application provides an access method for an internet of things device, which is applied to an internet of things server, and includes: acquiring a protocol plug-in corresponding to an access protocol; loading the protocol plug-in and configuring a protocol port to deploy the access protocol; and processing a message transmitted when the Internet of things equipment is accessed to the Internet of things server based on the deployed access protocol.
In a second aspect, an embodiment of the present application provides an access method for an internet of things device, which is applied to an internet of things server, and includes: acquiring a message transmitted by the Internet of things equipment through a protocol port; determining an access protocol corresponding to the protocol port; and decoding the message transmitted by the Internet of things equipment based on the deployed access protocol.
In a third aspect, an embodiment of the present application provides an access device for an internet of things device, deployed at a server end of the internet of things, including: the acquisition unit is configured to acquire a protocol plug-in corresponding to the access protocol; the deployment unit is configured to load the protocol plug-in and configure a protocol port to deploy the access protocol; the processing unit is configured to process a message transmitted when the Internet of things equipment is accessed to the Internet of things server based on the deployed access protocol.
In a fourth aspect, an embodiment of the present application provides an access device for an internet of things device, deployed at a server of the internet of things, including: the message acquisition unit is configured to acquire the message transmitted by the Internet of things device through a protocol port; a protocol determining unit configured to determine an access protocol corresponding to the deployment of the protocol port; and the message decoding unit is configured to decode the message transmitted by the Internet of things equipment based on the deployed access protocol.
In a fifth aspect, embodiments of the present application provide an electronic device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the method of any one of the preceding claims when the computer program is executed.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements a method as in any of the above.
Compared with the prior art, the application has the following advantages:
according to the embodiment of the application, the server side of the Internet of things can acquire the protocol plug-in corresponding to any access protocol, and the message sent when the Internet of things equipment is accessed is processed by deploying the access protocol. The Internet of things equipment using any access protocol is accessed to the Internet of things server in a direct connection mode, the step of protocol conversion by the protocol conversion gateway is omitted, the interactive link is shorter, the efficiency during access is high, and the speed is high.
According to the embodiment of the application, a plurality of protocols are deployed on the Internet of things server, the Internet of things server obtains information transmitted by the Internet of things equipment through the protocol port, and the access protocol corresponding to the protocol port is adopted to process the obtained data. The Internet of things server can rapidly distinguish an access protocol used by Internet of things equipment for uploading data, and the access protocol is adopted to process the acquired data, so that the efficiency of uploading or acquiring information when the Internet of things equipment is accessed to the Internet of things server is improved.
The foregoing description is merely an overview of the technical solutions of the present application, and in order to make the technical means of the present application more clearly understood, it is possible to implement the present application according to the content of the present specification, and in order to make the above and other objects, features and advantages of the present application more clearly understood, the following detailed description of the present application will be given.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the application and are not to be considered limiting of its scope.
Fig. 1 is a schematic diagram showing a scheme of implementing internet of things device access according to the related art;
fig. 2 is a schematic diagram illustrating an access scheme of an internet of things device according to an embodiment of the present application;
fig. 3 is a flowchart illustrating an access method of an internet of things device according to an embodiment of the present application;
fig. 4 is a flowchart illustrating an access method of an internet of things device according to another embodiment of the present application;
fig. 5 is a flowchart illustrating an internet of things device access method according to yet another embodiment of the present application;
fig. 6 is a block diagram illustrating a structure of an access apparatus of an internet of things device according to an embodiment of the present application;
fig. 7 is a block diagram illustrating a structure of an access apparatus of an internet of things device according to another embodiment of the present application; and
fig. 8 is a block diagram illustrating an electronic device of an embodiment of the present application.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those of skill in the pertinent art, the described embodiments may be modified in various different ways without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
In order to facilitate understanding of the technical solutions of the embodiments of the present application, the following describes related technologies of the embodiments of the present application. The following related technologies may be optionally combined with the technical solutions of the embodiments of the present application, which all belong to the protection scope of the embodiments of the present application.
In one related technology before the application, in order to access the internet of things equipment using different access protocols to the internet of things server, data interaction between the internet of things equipment and the internet of things server is achieved, the internet of things server uses a protocol conversion gateway to convert industry or private protocols used by different internet of things equipment into a unified MQTT protocol, and then data interaction is carried out. The MQTT protocol is a lightweight communication protocol based on a Publish/Subscribe (publich/subscnibe) mode, and has wide application in the field of Internet of things. Fig. 1 is a schematic diagram showing a scheme of implementing internet of things device access according to the related art. For example, vendor 1's internet of things device uses private access protocol 1 and vendor 2's internet of things device uses private access protocol 2. When the Internet of things equipment of a manufacturer 1 is accessed to an Internet of things server and data is transmitted to the Internet of things server, a protocol conversion gateway needs to convert a private access protocol 1 used by the Internet of things equipment into an MQTT protocol used by the Internet of things server; similarly, when the internet of things equipment of manufacturer 2 is accessed to the internet of things server, the protocol conversion gateway also needs to convert the private access protocol 2 into the MQTT protocol. In the process that the internet of things server transmits data to the internet of things device, the protocol conversion gateway needs to convert the MQTT protocol into an industry or a private access protocol (for example, private access protocol 1 and private access protocol 2) used by the internet of things device. The protocol conversion gateway needs to adapt to various protocols, and also needs to debug the conversion among the protocols, so that the cost of accessing the Internet of things equipment is increased, the protocol conversion speed is low, the efficiency is low, and the efficiency of accessing the Internet of things equipment into the Internet of things server is affected.
In view of this, the embodiments of the present application provide a new access scheme for devices of the internet of things, so as to solve all or part of the problems in the related art. In order to more clearly show the access scheme of the internet of things device provided in the embodiment of the present application, a specific application example of the scheme of the embodiment of the present application is given as follows. Fig. 2 is a schematic diagram illustrating an access scheme of an internet of things device according to an embodiment of the present application. As shown in fig. 2, a protocol developer of an internet of things equipment manufacturer (for example, manufacturer 1, manufacturer 2 and manufacturer N) uploads a protocol plug-in after development to an internet of things server, and the internet of things server dynamically loads the received protocol plug-in an equipment access layer, so that the internet of things server deploys the protocol without stopping the machine, and the protocol is used for realizing that each internet of things equipment accesses the internet of things server based on the protocol developed by each manufacturer to perform data interaction. After the internet of things server finishes the protocol deployment, the internet of things devices of the manufacturer 1, the manufacturer 2 and the manufacturer N can use the corresponding protocols (for example, the private access protocol 1, the private access protocol 2 and the private access protocol N) to perform data interaction with the internet of things server. Compared with the related art, the technical scheme of the embodiment of the application can realize that each piece of equipment of the Internet of things is directly connected to the service end of the Internet of things, so that the time and cost of protocol conversion are saved, the equipment of the Internet of things can be connected to the service end of the Internet of things in higher efficiency, the data interaction with the service end of the Internet of things can be completed in higher speed, the service end of the Internet of things can dynamically load more protocol plug-ins under the condition of no shutdown, and the horizontal expansion capacity is improved.
An embodiment of the application provides an access method 300 of an internet of things device, which is applied to an internet of things server, wherein the internet of things server can be deployed in public cloud, private cloud, hybrid cloud and other environments. The internet of things device access method 300 of the present application will be described below with reference to fig. 3. Fig. 3 is a flowchart illustrating an internet of things device access method 300 according to an embodiment of the present application. As shown in fig. 3, the method 300 for accessing the internet of things device may include the following steps S301 to S303. The steps S301 to S303 will be described in detail with reference to specific embodiments.
First, the process advances to step S301. In step S301, a protocol plug-in corresponding to an access protocol is acquired.
In an embodiment, an internet of things device manufacturer may store a protocol plug-in corresponding to an access protocol in a server, and allow an internet of things server to obtain the protocol plug-in. In another embodiment, the internet of things equipment manufacturer may upload the protocol plug-in to the target server of the internet of things server through FTP (File Transfer Protocol ). The internet of things equipment manufacturer can also upload the protocol plug-in to the target server of the internet of things server through HTTP (Hyper Text Transfer Protocol ). The above description of the protocol plugin mode corresponding to the access protocol obtained by the server of the internet of things is only exemplary, and a person skilled in the art can select the mode of obtaining the protocol plugin according to the actual situation.
In some embodiments, the internet of things server issues a protocol service programming interface (Service Programming Interface, SPI) specification defined by the internet of things server, based on which the protocol plug-in is developed. The internet of things server can issue the protocol service programming interface specification on a file server or a webpage, and allows each internet of things equipment manufacturer to acquire the protocol service programming interface specification by accessing the file server or the webpage. The internet of things server may also issue protocol service programming interface specifications to various internet of things device vendors by way of network transmission (e.g., mail, TCP communication).
In some embodiments, the protocol service programming interface specification includes at least one of a codec specification, a security authentication specification, a sticky unpacking specification. The protocol service programming interface specification may include a series of interface functions, further including the name of the function, the function description of the function, the function requiring the incoming parameters and the return value of the function.
In some embodiments, some of the internet of things devices use a battery to supply power, and have high power saving requirements, so that the internet of things devices use binary format data to reduce electricity consumption. Some of the internet of things servers use JSON (JavaScript Object Notation, JS object numbered musical notation) format data, and other of the internet of things servers use XML (Extensible Markup Language ) format data. In an embodiment, the data in JSON format is used by the internet of things server, and the internet of things server needs to define a coding and decoding specification to realize conversion between a data format used by the internet of things device and a data format used by the internet of things server. For example, the codec specification includes a series of interface functions for the interconversion of binary format data and JSON format data. For example, the name of the decoding function in the codec specification may be Decode, the function of the decoding function is to convert binary data into JSON data, the incoming parameter is a binary data value, and the return value is JSON data.
In some embodiments, during transmission of TCP (Transmission Control Protocol ), TCP splits or assembles packets according to the actual situation of the transmission buffer. For example, the sending end sends two data packets P1 and P2 to the receiving end, and since TCP is a connection-oriented protocol, no packet loss occurs, and if the receiving end receives only one data packet, the data packet contains information of two data packets P1 and P2, which is sticky; if the receiving end receives two data packets, the first data packet contains the complete P1 packet and part of the P2 packet, and the second data packet contains the remaining content of the P2 packet, which is unpacking. Therefore, the service end of the internet of things also needs to define a sticking and unpacking specification for analyzing complete data sent by the internet of things equipment.
The internet of things device vendor may develop and debug protocol plugins based on the protocol service programming interface specification. For example, an internet of things equipment manufacturer belongs to the hydrology industry, the hydrological monitoring internet of things equipment produced by the manufacturer needs to follow the data transmission standard of SL651-2014 hydrological monitoring data communication protocol, and the manufacturer can develop a protocol plug-in based on various interface functions in the protocol service programming interface specification, so that the functions of the protocol plug-in meet the data transmission standard of hydrological monitoring. The internet of things equipment manufacturer also needs to debug the developed protocol plug-in, so that the protocol plug-in can be guaranteed to operate normally, and the internet of things equipment manufacturer can optimize the performance of the protocol plug-in, so that the protocol plug-in can operate with higher efficiency.
In some embodiments, the internet of things server may define a protocol service programming interface specification based on a Java language, and corresponding to the protocol service programming interface specification, an internet of things device manufacturer needs to develop a protocol plug-in using the Java language, and the protocol plug-in may be in a form of a Jar (Java Archive) file. In another embodiment, the service end of the internet of things may define a protocol service programming interface specification based on a C language, and the corresponding protocol plug-in needs to be developed by an equipment manufacturer of the internet of things by using the C language, and the protocol plug-in may be a DLL (Dynamic-Link Library) file. The protocol plug-in developed by the internet of things equipment manufacturer can also comprise a package sticking and unpacking module, a coding and decoding module and a security authentication module corresponding to the package sticking and unpacking specification, the coding and decoding specification and the security authentication specification in the protocol service programming interface specification. The above description of the internet of things service end defining the protocol service programming interface specification based on a programming language is merely exemplary, and a person skilled in the art may select the programming language of the protocol service programming interface specification according to the actual situation.
Next, step S302 is entered. In step S302, the protocol plug-in is loaded, and a protocol port is configured to deploy the access protocol.
In some embodiments, the internet of things server dynamically loads the received protocol plug-ins using a hot-loading technique. For example, the internet of things server obtains a protocol plug-in Jar developed by an internet of things equipment manufacturer based on Java language, and the internet of things server dynamically loads the protocol plug-in Jar in a JVM (Java Virtual Machine ) of the internet of things server by using Java ClassLoader, so that the protocol plug-in Jar is loaded under the condition that the internet of things server is not stopped, the access protocol is deployed, and the horizontal extension of the protocol is realized.
In some embodiments, the internet of things server and the internet of things device manufacturer need to agree on a port for the protocol developed by the internet of things device manufacturer. The port can be defined by the service end of the Internet of things or defined by the manufacturer of the equipment of the Internet of things, and only the two parties negotiate agreements. Ports are used to distinguish to which process a received packet in a computer should be forwarded. Each access protocol corresponds to one port, and the same port cannot correspond to multiple protocols. The port numbers are integers ranging from 0 to 65535. For example, the internet of things server may agree with an internet of things equipment manufacturer in a hydrologic industry to select 10001 a port corresponding to a protocol developed by the internet of things equipment manufacturer, where the internet of things equipment of the manufacturer may access the internet of things server through an IP address of the internet of things server and the port number, and perform information interaction. For example, the IP address of the service end of the internet of things is 110.242.101.101, the internet of things device in a hydrology industry needs to report the water level height of the current river, and the internet of things device can be connected to the service end of the internet of things through 110.242.101.101:10001 and transmits the current river water level height information.
In some embodiments, the internet of things server configures a protocol port on its access gateway. The access gateway is a bridge for information interaction between the Internet of things equipment and the Internet of things server, and can provide routing service and forward the received request message of the Internet of things equipment to a service node corresponding to the Internet of things server. When the request messages sent by the internet of things equipment are too many, the access gateway can also prevent the request messages of the internet of things equipment in a current limiting or fusing mode so as to ensure the availability of the whole internet of things server. And configuring a protocol port on the access gateway, so that the access gateway can expose the port, and the access gateway can wait for receiving the message transmitted by the Internet of things equipment from the port.
In some embodiments, the internet of things server starts the access gateway and listens to the protocol port. After the access gateway is started by the Internet of things server, monitoring whether the Internet of things equipment transmits a message through the port or not through the port exposed outwards by the access gateway. If a message transmitted by the internet of things equipment is received, the internet of things server can process the received message based on a deployed protocol.
Next, step S303 is entered. In step S303, based on the deployed access protocol, a message transmitted when the internet of things device accesses the internet of things server is processed.
In some embodiments, the internet of things server decodes, responds, encodes, and sends the message sent by the internet of things device through the deployed access protocol, so as to complete the service request of accessing the internet of things device to the internet of things server.
Another embodiment of the present application provides an access method 400 of an internet of things device, which is applied to an internet of things server. The internet of things device access method 400 of the present application will be described below with reference to fig. 4. Fig. 4 is a flowchart illustrating an internet of things device access method 400 according to another embodiment of the present application. As shown in fig. 4, the method 400 for accessing the internet of things device may include the following steps S401 to S403. The steps S401 to S403 will be described in detail with reference to specific embodiments.
First, the process advances to step S401. In step S401, a message transmitted by the internet of things device is acquired through a protocol port.
In some embodiments, the internet of things server receives a message transmitted by the internet of things device by monitoring a configured protocol port. For example, the port configured by the internet of things server for an internet of things equipment manufacturer in the hydrologic industry is 10001, and the internet of things server can monitor 10001 ports continuously to receive messages transmitted by the internet of things equipment of the manufacturer.
Next, step S402 is entered. In step S402, an access protocol corresponding to the deployment of the protocol port is determined.
In some embodiments, multiple access protocols (e.g., hydrologic industry access protocol, smart furniture industry access protocol, internet of vehicles industry access protocol) are deployed at the internet of things server, which access protocol is needed to be used by the internet of things server to process the message according to the port from which the message was received. For example, the port number of the message received by the internet of things server is 10001, and the internet of things server determines that the access protocol is the access protocol of the hydrological industry according to the corresponding relationship between the protocol port and the access protocol, and the internet of things server needs to process the message transmitted by the received internet of things device by using the access protocol.
Next, the process advances to step S403. In step S403, the message transmitted by the internet of things device is decoded based on the deployed access protocol.
Decoding is the process of converting information from one form or format to another. Encoding is the inverse of decoding. For example, some of the internet of things devices use a battery to supply power, so that the power saving requirement is high, and the internet of things devices use binary format data; the internet of things server has no limitation on resources, and is JSON format data, so after the internet of things server receives binary data of the internet of things equipment, a codec module in a deployed access protocol is required to convert the binary data into JSON data which can be processed by the internet of things server. For example, an internet of things device manufactured by an internet of things device manufacturer in the hydrology industry transmits binary data such as 0x00110111 to an internet of things server, the internet of things server decodes the first four bits 0011 of the binary data into a water level by using a codec module in an access protocol in the hydrology industry, decodes the last four bits of the binary data into 7, and integrally decodes the binary data into JSON data such as { water level:7}, so that the internet of things server can further process the JSON data.
In some embodiments, the internet of things device is connected with the internet of things server through a TCP transmission channel, and the internet of things server also needs to perform a package pasting or package unpacking process on a message transmitted by the internet of things device based on a deployed access protocol. When the internet of things equipment and the internet of things server are connected through the TCP transmission channel, the sticking or unpacking refers to that when the internet of things equipment transmits a message, the TCP divides the data packets according to the actual condition of the buffer area, and in the condition, one complete data packet can be split into a plurality of data packets to be sent, and a plurality of small data packets can be packaged into one large data packet to be sent. Therefore, the service end of the internet of things can process the received data packet by using the sticky packet unpacking module in the deployed access protocol so as to acquire a complete message transmitted by the internet of things equipment.
Still another embodiment of the present application provides an access method 500 for an internet of things device, where the method is applied to an internet of things server. In an embodiment, the access method 500 is performed after the access method 400. The internet of things device access method 500 of the present application will be described below with reference to fig. 5. Fig. 5 is a flowchart illustrating an internet of things device access method 500 according to yet another embodiment of the present application. As shown in fig. 5, the method 500 for accessing an internet of things device may include the following steps S501 to S502. The steps S501 to S502 will be described in detail with reference to specific embodiments.
First, the process advances to step S501. In step S501, a message type of the decoding result is determined, and a response message is generated based on the message type.
In some embodiments, the internet of things server generates the corresponding response message based on the type of the message of the decoding result according to its processing logic. For example, a hydrologic internet of things device sends a PUBLISH message to an internet of things server, where the PUBLISH message includes the current water level of a river. After the internet of things server decodes the message, it is identified that the message is of a PUBLISH type, the internet of things server can store the river water level height information in the PUBLISH message, and return a PUBLISH message to the internet of things device to tell the internet of things device that the publication is successful. For another example, an intelligent speaker internet of things device sends a SUBSCRIBE message to an internet of things server, where the SUBSCRIBE message includes a subscription theme for a river water level height. After the internet of things server decodes the message, it is identified that the message is of a SUBSCRIBE type, the internet of things server can return SUBACK (subscription confirmation) message to the internet of things equipment, tell the internet of things equipment that subscription is successful, and push river water level height information to the internet of things equipment at preset time.
In some embodiments, authentication information corresponding to the internet of things device is stored in the internet of things server, and before the internet of things server generates the response message based on the message type of the decoding result, if the message type is a security authentication type, the internet of things server needs to verify the decoding result according to the authentication message of the internet of things device. The internet of things server can register the internet of things equipment needing to be accessed to the internet of things server in advance, and after the registration is completed, the internet of things server can also store authentication information (for example, a secret key, a product serial number, an MAC address (Media Access Control Address, a media access control address)) of the internet of things equipment. In an embodiment, the internet of things device may use its own key to digitally sign the product serial number, and send the digital signature as a message body of the security authentication message to the internet of things server, where the internet of things server verifies the digital signature in the security authentication message according to the stored authentication information of the internet of things device. If the verification is passed, the internet of things server can issue an Access Token to the internet of things device, and the internet of things device can carry the Access Token in a message interacted with the internet of things server later, so that the internet of things device can indicate that the internet of things device has obtained the Access authorization of the internet of things server; if the verification is not passed, the server side of the Internet of things disconnects the connection with the equipment of the Internet of things, and the access of the equipment of the Internet of things is refused.
Next, step S502 is entered. In step S502, the response message is encoded based on the deployed access protocol, and the encoded response message is sent to the internet of things device.
In some embodiments, the message generated by the server of the internet of things is in JSON format, the device of the internet of things can only identify binary data, the server of the internet of things needs to use a codec module in a deployed access protocol to encode the JSON data into the binary data, and the binary data is returned to the device of the internet of things.
Corresponding to the application scenario of the access method 300 and the access method 300 provided in the embodiments of the present application, the embodiments of the present application further provide an access device 600 for an internet of things device, which is deployed at a server side of the internet of things, and the access device 600 for the internet of things device of the present application will be described with reference to fig. 6. Fig. 6 is a block diagram illustrating a structure of an internet of things access device according to an embodiment of the present application. As shown in fig. 6, the internet of things device access apparatus 600 may include: an acquisition unit 601, a deployment unit 602, and a processing unit 603.
The acquiring unit 601 is configured to acquire a protocol plug-in corresponding to the access protocol.
The obtaining unit 601 may be a component in the service end of the internet of things, and the service end of the internet of things obtains a protocol plug-in corresponding to the access protocol through the component. The internet of things server can be deployed in private cloud, public cloud, hybrid cloud and other environments.
In some embodiments, the internet of things server issues a protocol service programming interface (Service Programming Interface, SPI) specification defined by the internet of things server, based on which the protocol plug-in is developed. The internet of things server can issue the protocol service programming interface specification on a file server or a webpage, and allows each internet of things equipment manufacturer to acquire the protocol service programming interface specification by accessing the file server or the webpage. The internet of things server may also issue protocol service programming interface specifications to various internet of things device vendors by way of network transmission (e.g., mail, TCP communication).
Description of features such as protocol plug-ins, protocol service programming interface specifications may be found above with respect to the internet of things device access method 300, and a detailed description of such features will be omitted herein for simplicity of the description.
A deployment unit 602 configured to load the protocol plug-in and configure a protocol port to deploy the access protocol.
The deployment unit 602 may be a component in the internet of things server, through which the internet of things server deploys the access protocol.
In some embodiments, the internet of things server dynamically loads the received protocol plug-ins using a hot-loading technique. For example, the internet of things server obtains a protocol plug-in Jar developed by an internet of things equipment manufacturer based on Java language, and the internet of things server dynamically loads the protocol plug-in Jar in a JVM (Java Virtual Machine ) of the internet of things server by using Java ClassLoader, so that the protocol plug-in Jar is loaded under the condition that the internet of things server is not stopped, the access protocol is deployed, and the horizontal extension of the protocol is realized.
In some embodiments, the internet of things server configures a protocol port on its access gateway. The access gateway is a bridge for information interaction between the Internet of things equipment and the Internet of things server, and can provide routing service and forward the received request message of the Internet of things equipment to a service node corresponding to the Internet of things server. When the request messages sent by the internet of things equipment are too many, the access gateway can also prevent the request messages of the internet of things equipment in a current limiting or fusing mode so as to ensure the availability of the whole internet of things server. And configuring a protocol port on the access gateway, so that the access gateway can expose the port, and the access gateway can wait for receiving the message transmitted by the Internet of things equipment from the port.
And the processing unit 603 is configured to process a message transmitted when the internet of things device accesses the internet of things server based on the deployed access protocol.
The processing unit 603 may be a component in the service end of the internet of things, through which the service end of the internet of things processes a message transmitted by the device of the internet of things.
In an embodiment, the apparatus 600 may further include:
and the issuing unit is configured to issue the protocol service programming interface specification defined by the Internet of things server, and the protocol plug-in is developed based on the protocol service programming interface specification.
The functions of each module in the apparatus of the embodiment of the present application may be referred to the corresponding descriptions in the above access method 300, and have corresponding beneficial effects, which are not described herein again.
Corresponding to the application scenario of the access method 400 and the access method 400 provided in the embodiments of the present application, the embodiments of the present application further provide an access device 700 for an internet of things device, which is deployed at a server side of the internet of things, and the access device 700 for the internet of things device of the present application will be described with reference to fig. 7. Fig. 7 is a block diagram illustrating a structure of an internet of things access device according to an embodiment of the present application. As shown in fig. 7, the internet of things device access apparatus 700 may include: a message acquisition unit 701, a protocol determination unit 702, and a message decoding unit 703.
The message obtaining unit 701 is configured to obtain a message transmitted by the internet of things device through a protocol port.
The message obtaining unit 701 may be a component in the service end of the internet of things, through which the service end of the internet of things obtains a message transmitted by the device of the internet of things.
A protocol determining unit 702, configured to determine an access protocol corresponding to the deployment of the protocol port.
The protocol determining unit 702 may be a component in the service end of the internet of things, through which the service end of the internet of things determines an access protocol corresponding to the deployment of the protocol port.
A message decoding unit 703, configured to decode a message transmitted by the internet of things device based on the deployed access protocol.
The message decoding unit 703 may be a component in the internet of things server, through which the internet of things server decodes a message transmitted by the internet of things device based on the deployed access protocol.
The functions of each module in the apparatus of the embodiment of the present application may be referred to the corresponding description in the above access method 400, and have corresponding beneficial effects, which are not described herein again.
According to the embodiment of the application, the server side of the Internet of things can acquire the protocol plug-in corresponding to any access protocol, and the message sent when the Internet of things equipment is accessed is processed by deploying the access protocol. The Internet of things equipment using any access protocol is accessed to the Internet of things server in a direct connection mode, the step of protocol conversion by the protocol conversion gateway is omitted, the interactive link is shorter, the efficiency during access is high, and the speed is high.
According to the embodiment of the application, a plurality of protocols are deployed on the Internet of things server, the Internet of things server obtains information transmitted by the Internet of things equipment through the protocol port, and the access protocol corresponding to the protocol port is adopted to process the obtained data. The Internet of things server can rapidly distinguish an access protocol used by Internet of things equipment for uploading data, and the access protocol is adopted to process the acquired data, so that the efficiency of uploading or acquiring information when the Internet of things equipment is accessed to the Internet of things server is improved.
Fig. 8 is a block diagram of an electronic device used to implement an embodiment of the present application. As shown in fig. 8, the electronic device includes: a memory 801 and a processor 802, the memory 801 storing a computer program executable on the processor 802. The processor 802 implements the methods of the above-described embodiments when executing the computer program. The number of memories 801 and processors 802 may be one or more.
The electronic device further includes:
and the communication interface 803 is used for communicating with external equipment and carrying out data interaction transmission.
If the memory 801, the processor 802, and the communication interface 803 are implemented independently, the memory 801, the processor 802, and the communication interface 803 can be connected to each other through a bus and perform communication with each other. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 801, the processor 802, and the communication interface 803 are integrated on a chip, the memory 801, the processor 802, and the communication interface 803 may complete communication with each other through internal interfaces.
The present embodiments provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods provided in the embodiments of the present application.
The embodiment of the application also provides a chip, which comprises a processor and is used for calling the instructions stored in the memory from the memory and running the instructions stored in the memory, so that the communication device provided with the chip executes the method provided by the embodiment of the application.
The embodiment of the application also provides a chip, which comprises: the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the application embodiment.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (Advanced RISC Machines, ARM) architecture.
Further alternatively, the memory may include a read-only memory and a random access memory. The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), programmable ROM (PROM), erasable Programmable ROM (EPROM), electrically Erasable EPROM (EEPROM), or flash Memory, among others. Volatile memory can include random access memory (Random Access Memory, RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic RAM (Dynamic Random Access Memory, DRAM), synchronous DRAM (SDRAM), double Data Rate Synchronous DRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct RAM (DR RAM).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. Computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Any process or method described in flow charts or otherwise herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes additional implementations in which functions may be performed in a substantially simultaneous manner or in an opposite order from that shown or discussed, including in accordance with the functions that are involved.
Logic and/or steps described in the flowcharts or otherwise described herein, e.g., may be considered a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the methods of the embodiments described above may be performed by a program that, when executed, comprises one or a combination of the steps of the method embodiments, instructs the associated hardware to perform the method.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules described above, if implemented in the form of software functional modules and sold or used as a stand-alone product, may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The foregoing is merely exemplary embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of various changes or substitutions within the technical scope of the present application, which should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (14)

1. An internet of things device access method applied to an internet of things server side comprises the following steps:
acquiring a protocol plug-in corresponding to an access protocol;
loading the protocol plug-in and configuring a protocol port to deploy the access protocol;
and processing a message transmitted when the Internet of things equipment is accessed to the Internet of things server based on the deployed access protocol.
2. The access method of claim 1, further comprising:
and issuing a protocol service programming interface specification defined by the Internet of things server, wherein the protocol plug-in is developed based on the protocol service programming interface specification.
3. The access method according to claim 1 or 2, wherein the configuring a protocol port comprises:
the protocol port is configured on an access gateway of the server side of the Internet of things;
And starting the access gateway and monitoring the protocol port.
4. The access method of claim 2, wherein the protocol service programming interface specification comprises at least one of a codec specification, a security authentication specification, a sticky unpacking specification.
5. The access method according to claim 1 or 2, wherein the protocol plug-in is dynamically loaded with a hot loading technique.
6. An internet of things device access method applied to an internet of things server side comprises the following steps:
acquiring a message transmitted by the Internet of things equipment through a protocol port;
determining an access protocol corresponding to the protocol port;
and decoding the message transmitted by the Internet of things equipment based on the deployed access protocol.
7. The access method of claim 6, further comprising:
determining the message type of the decoding result, and generating a response message based on the message type;
and encoding the response message based on the deployed access protocol, and sending the encoded response message to the Internet of things equipment.
8. The access method according to claim 7, wherein authentication information corresponding to the internet of things device is stored in the internet of things server, and before the generating the response message based on the message type, the access method further comprises:
And if the message type is a security authentication type, verifying the decoding result according to the authentication information.
9. The access method according to claim 7 or 8, wherein the internet of things device and the internet of things server are connected through a TCP transmission channel, the access method further comprising:
and carrying out package pasting or unpacking processing on the information transmitted by the Internet of things equipment based on the deployed access protocol.
10. An internet of things device access apparatus deployed at an internet of things server, comprising:
the acquisition unit is configured to acquire a protocol plug-in corresponding to the access protocol;
the deployment unit is configured to load the protocol plug-in and configure a protocol port to deploy the access protocol;
the processing unit is configured to process a message transmitted when the Internet of things equipment is accessed to the Internet of things server based on the deployed access protocol.
11. The access device of claim 10, further comprising:
and the issuing unit is configured to issue the protocol service programming interface specification defined by the Internet of things server, and the protocol plug-in is developed based on the protocol service programming interface specification.
12. An internet of things device access apparatus deployed at an internet of things server, comprising:
The message acquisition unit is configured to acquire the message transmitted by the Internet of things device through a protocol port;
a protocol determining unit configured to determine an access protocol corresponding to the deployment of the protocol port;
and the message decoding unit is configured to decode the message transmitted by the Internet of things equipment based on the deployed access protocol.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory, the processor implementing the method of any one of claims 1-9 when the computer program is executed.
14. A computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-9.
CN202211600986.7A 2022-12-12 2022-12-12 Internet of things equipment access method and device, electronic equipment and storage medium Pending CN116016005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211600986.7A CN116016005A (en) 2022-12-12 2022-12-12 Internet of things equipment access method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211600986.7A CN116016005A (en) 2022-12-12 2022-12-12 Internet of things equipment access method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116016005A true CN116016005A (en) 2023-04-25

Family

ID=86032865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211600986.7A Pending CN116016005A (en) 2022-12-12 2022-12-12 Internet of things equipment access method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116016005A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130080570A1 (en) * 2011-09-23 2013-03-28 Roche Diagnostics Operations Inc. Communication test framework
CN104410662A (en) * 2014-10-23 2015-03-11 山东大学 Parallel mass data transmitting middleware of Internet of things and working method thereof
US20170048079A1 (en) * 2015-08-12 2017-02-16 Cisco Technology, Inc. Distributed application hosting environment to mask heterogeneity
US20170251393A1 (en) * 2016-02-26 2017-08-31 At&T Intellectual Property I, L.P. Enhanced Software-Defined Network Controller to Support Ad-Hoc Radio Access Networks
CN110417766A (en) * 2019-07-22 2019-11-05 深圳市酷达通讯有限公司 A kind of method and apparatus of protocol analysis
CN110971639A (en) * 2018-09-30 2020-04-07 广州虎牙信息科技有限公司 Message distribution method, message management system, server, and computer storage medium
CN110971614A (en) * 2019-12-17 2020-04-07 软通动力信息技术(集团)有限公司 Internet of things adaptation method and system, computer equipment and storage medium
CN111770553A (en) * 2020-06-22 2020-10-13 深圳中兴网信科技有限公司 Internet of things equipment access system and method, electronic equipment and storage medium
CN113726579A (en) * 2021-09-02 2021-11-30 国网信息通信产业集团有限公司 Method and device for realizing power Internet of things communication protocol plug-in
CN114039997A (en) * 2021-10-22 2022-02-11 阿里云计算有限公司 Data processing method and device
CN115314518A (en) * 2022-07-01 2022-11-08 深圳羽衡科技有限公司 Internet of things management method and system and computer readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130080570A1 (en) * 2011-09-23 2013-03-28 Roche Diagnostics Operations Inc. Communication test framework
CN104410662A (en) * 2014-10-23 2015-03-11 山东大学 Parallel mass data transmitting middleware of Internet of things and working method thereof
US20170048079A1 (en) * 2015-08-12 2017-02-16 Cisco Technology, Inc. Distributed application hosting environment to mask heterogeneity
US20170251393A1 (en) * 2016-02-26 2017-08-31 At&T Intellectual Property I, L.P. Enhanced Software-Defined Network Controller to Support Ad-Hoc Radio Access Networks
CN110971639A (en) * 2018-09-30 2020-04-07 广州虎牙信息科技有限公司 Message distribution method, message management system, server, and computer storage medium
CN110417766A (en) * 2019-07-22 2019-11-05 深圳市酷达通讯有限公司 A kind of method and apparatus of protocol analysis
CN110971614A (en) * 2019-12-17 2020-04-07 软通动力信息技术(集团)有限公司 Internet of things adaptation method and system, computer equipment and storage medium
CN111770553A (en) * 2020-06-22 2020-10-13 深圳中兴网信科技有限公司 Internet of things equipment access system and method, electronic equipment and storage medium
CN113726579A (en) * 2021-09-02 2021-11-30 国网信息通信产业集团有限公司 Method and device for realizing power Internet of things communication protocol plug-in
CN114039997A (en) * 2021-10-22 2022-02-11 阿里云计算有限公司 Data processing method and device
CN115314518A (en) * 2022-07-01 2022-11-08 深圳羽衡科技有限公司 Internet of things management method and system and computer readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
SHENGJIE WANG ET.AL: "Design of real-time monitoring platform for internet of things based on cloud platform", 2020 IEEE 5TH INFORMATION TECHNOLOGY AND MECHATRONICS ENGINEERING CONFERENCE (ITOEC), 16 July 2020 (2020-07-16) *
刘莹: "多手段设备统一接入平台的设计与实现", 中国优秀硕士学位论文全文数据库, 15 April 2018 (2018-04-15) *
港澳小肖2501438221: "物联网设备如何多样化接入", Retrieved from the Internet <URL:https://blog.itpub.net/70014415/viewspace-2911213/> *

Similar Documents

Publication Publication Date Title
CN111600909B (en) Data processing method, device, protocol conversion equipment and storage medium
CN113364727B (en) Container cluster system, container console and server
US11907700B2 (en) Upgrading method and system, server, and terminal device
CN109815025B (en) Service model calling method, device and storage medium
US10445158B2 (en) Computer readable storage media for dynamic service deployment and methods and systems for utilizing same
CN108769743B (en) Video playing control method, system, node and computer storage medium
CN111988418B (en) Data processing method, device, equipment and computer readable storage medium
CN109067746B (en) Communication method and device between client and server
CN113259479A (en) Data processing method and equipment
WO2016107120A1 (en) Application programming interface calling method and device
CN113746879B (en) Data processing method and device based on Virtual Private Cloud (VPC)
CN113542405B (en) Block chain-based network communication system, method, equipment and storage medium
US8990286B2 (en) Integration of web services with a clustered actor based model
CN113360386A (en) Switching chip drive test method, device, electronic equipment and storage medium
CN116016005A (en) Internet of things equipment access method and device, electronic equipment and storage medium
CN117194064A (en) Remote calling method and device
CN116389323A (en) Throughput test method, device and storage medium
CN115297098A (en) Edge service acquisition method and device, edge computing system, medium and equipment
US11729167B2 (en) Authorization proxy
CN111459819B (en) Software testing method and device, electronic equipment and computer readable medium
CN115550468A (en) Service request processing method, device, equipment and medium
CN114244758A (en) Network diagnosis method, storage medium, electronic device and system of android platform
CN115086393B (en) Interface calling method, device, equipment and storage medium
CN113949562B (en) Portal authentication method, device, system, electronic equipment and storage medium
CN113726723B (en) UDP-based data transmission method, device and 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