CN116055524A - Interaction method, processor and device for Internet platform and Internet of things equipment - Google Patents

Interaction method, processor and device for Internet platform and Internet of things equipment Download PDF

Info

Publication number
CN116055524A
CN116055524A CN202211739493.1A CN202211739493A CN116055524A CN 116055524 A CN116055524 A CN 116055524A CN 202211739493 A CN202211739493 A CN 202211739493A CN 116055524 A CN116055524 A CN 116055524A
Authority
CN
China
Prior art keywords
internet
things
protocol
equipment
platform
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
CN202211739493.1A
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.)
Zhongke Yungu Technology Co Ltd
Original Assignee
Zhongke Yungu 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 Zhongke Yungu Technology Co Ltd filed Critical Zhongke Yungu Technology Co Ltd
Priority to CN202211739493.1A priority Critical patent/CN116055524A/en
Publication of CN116055524A publication Critical patent/CN116055524A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/75Information technology; Communication
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y30/00IoT infrastructure
    • 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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers

Abstract

The invention relates to the technical field of communication, and discloses an interaction method, a processor and a device for an Internet platform and Internet of things equipment. The method comprises the following steps: accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to an Internet platform; under the condition that a target data format of an Internet platform is analyzed through a custom script analysis protocol component, receiving device data of Internet of things devices under the target data format; and storing the device data under the condition that the verification device data are legal. The Internet of things protocol gateway component and the custom script parsing protocol component are arranged, the rule engine is modularized, the rule engine is used for packaging the components, the research and development period and the research and development cost of protocol data access are greatly saved, the development and deployment online flow is simplified, and the bidirectional communication and data intercommunication between the Internet platform and the Internet of things equipment and between the Internet platform and other Internet of things subsystems are rapidly and conveniently realized.

Description

Interaction method, processor and device for Internet platform and Internet of things equipment
Technical Field
The invention relates to the technical field of communication, in particular to an interaction method, a processor and a device for an internet platform and internet of things equipment.
Background
Along with the promotion of intelligent manufacturing and intelligent factory construction, more and more product equipment needs to be accessed into an internet platform through an internet technology and an internet of things technology, unified management is carried out, product equipment monitoring is carried out, data acquisition can be carried out on the product equipment, and meanwhile, other areas or internet of things subsystems of third party factories need to be accessed into the internet platform, so that information intercommunication and data sharing between an external system and an internal system are realized, service development is more effectively achieved, and data value is excavated through big data analysis.
The connection protocols, port numbers, data formats and the like used by different product devices or the internet of things subsystem may all have differences, the current implementation mode is to collect and arrange protocol details and data reporting formats to be accessed by research personnel, and then develop corresponding codes, and the existing development mode is to independently develop a set of code engineering adapting to the internet of things device according to different data formats of different protocols, namely a set of implementation codes of each protocol, and a set of analysis codes of data of each format, so that the research and development cost is high.
Disclosure of Invention
In order to overcome the defects in the prior art, the embodiment of the invention provides an interaction method, a processor and a device for an Internet platform and Internet of things equipment.
To achieve the above object, a first aspect of the present invention provides an interaction method for an internet platform and an internet of things device, including:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to an Internet platform;
under the condition that a target data format of an Internet platform is analyzed through a custom script analysis protocol component, receiving device data of Internet of things devices under the target data format;
and storing the device data under the condition that the verification device data are legal.
In the embodiment of the invention, the method further comprises the following steps:
selecting a communication protocol path through an Internet of things protocol gateway component;
the method comprises the steps that an initial equipment instruction of an Internet platform is converted into a target equipment instruction under a data format corresponding to a communication protocol path through a custom script analysis protocol assembly;
and sending the target equipment instruction to the Internet of things equipment.
In the embodiment of the invention, sending the target device instruction to the internet of things device comprises:
receiving a service interface and a calling mode of the Internet of things equipment;
and sending the target equipment instruction to the Internet of things equipment based on the service interface and the calling mode.
In an embodiment of the invention, the method comprises the following steps:
sending a heartbeat packet to a first service process corresponding to a target communication protocol of the access internet of things equipment;
under the condition that the response of the first service process is not received within the continuous preset times, determining that the first service process fails;
the failed first service process is restarted.
In the embodiment of the invention, the method further comprises the following steps:
determining the access limit number and the access limit time of the corresponding Internet of things equipment according to the target communication protocol;
and under the condition that the number and time of the internet of things devices accessed to the internet platform through the target communication protocol are both corresponding to the number and time exceeding the access limit, creating a second service process, wherein the second service process is used for accessing the internet of things devices which are determined to exceed the access limit to the internet platform.
In the embodiment of the invention, accessing the target communication protocol of the internet of things device through the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component;
receiving an access address of an Internet of things device;
and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the access address.
In the embodiment of the invention, accessing the target communication protocol of the internet of things device through the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component;
receiving a service port number of the Internet of things device;
and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the service port number.
The second aspect of the present invention provides a processor configured to perform the above-described interaction method for an internet platform and an internet of things device.
A third aspect of the present invention provides an interaction apparatus for an internet platform and an internet of things device, the apparatus comprising:
the access module is used for accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to the Internet platform;
the receiving module is used for receiving the equipment data of the Internet of things equipment under the data format under the condition that the target data format of the Internet platform is analyzed through the custom script analysis protocol assembly;
and the storage module is used for storing the equipment data under the condition that the equipment data are verified to be legal.
A fourth aspect of the present invention provides a machine-readable storage medium having stored thereon instructions for causing a machine to perform the above-described interaction method for an internet platform and an internet of things device.
In the embodiment of the invention, the interaction method for the internet platform and the internet of things equipment comprises the following steps: accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to an Internet platform; under the condition that a target data format of an Internet platform is analyzed through a custom script analysis protocol component, receiving device data of Internet of things devices under the target data format; and storing the device data under the condition that the verification device data are legal.
In this way, by setting the internet of things protocol gateway component and the custom script analysis protocol component, the rule engine is componentized, and a user only needs to select and configure the equipment access protocol (namely, the target communication protocol of the internet of things equipment), then select the script language and write the data analysis script according to the protocol data format (namely, the target data format of the internet platform), so that the internet of things equipment can be accessed into the internet platform, and the internet platform can receive and store the equipment data of the internet of things equipment; and the rule engine is used for packaging the components, so that the research and development period and the research and development cost of protocol data (namely, the target communication protocol of the Internet of things equipment) access are greatly saved, and the online process of development and deployment is simplified. The Internet platform can rapidly and flexibly support access of multiple protocols (namely target communication protocols of the Internet of things equipment), a user can self-define and rapidly complete data analysis of corresponding data formats through scripting, and corresponding storage and inquiry are carried out, so that bidirectional communication and data intercommunication between the Internet platform and the Internet of things equipment and between the Internet platform and other Internet of things subsystems are rapidly and conveniently realized.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain, without limitation, the embodiments of the invention. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method for interaction of an Internet platform with an Internet of things device according to an embodiment of the invention;
fig. 2 schematically illustrates a schematic diagram of an internet of things device access and device data storage according to an embodiment of the invention;
fig. 3 schematically shows a flowchart of sending a target device instruction to an internet of things device according to the present embodiment;
FIG. 4 schematically illustrates a schematic diagram of a rules engine according to an embodiment of the invention;
FIG. 5 schematically illustrates a load balancing schematic according to an embodiment of the invention;
FIG. 6 schematically illustrates a use diagram of an HTTP protocol gateway component according to an embodiment of the present invention;
FIG. 7 schematically illustrates a schematic diagram of the use of a TCP protocol gateway component according to an embodiment of the present invention;
fig. 8 schematically illustrates a use diagram of a UDP protocol gateway component according to an embodiment of the present invention;
fig. 9 schematically illustrates a use diagram of an MQTT protocol gateway component according to an embodiment of the invention.
Detailed Description
The following describes the detailed implementation of the embodiments of the present invention with reference to the drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the invention, are not intended to limit the invention.
In the present embodiment, if directional indications (such as up, down, left, right, front, and rear … …) are included, the directional indications are merely used to explain the relative positional relationship, movement, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is 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 addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the protection scope of the present application.
Fig. 1 schematically shows a flowchart of an interaction method for an internet platform and an internet of things device according to an embodiment of the invention. As shown in fig. 1, in an embodiment of the present invention, an interaction method for an internet platform and an internet of things device is provided, including the following steps:
step 101, accessing a target communication protocol of the Internet of things equipment through an Internet of things protocol gateway component so as to access the Internet of things equipment to an Internet platform;
step 102, receiving device data of the internet of things device in a target data format under the condition that the target data format of the internet platform is analyzed through a custom script analysis protocol component;
and step 103, storing the device data under the condition that the device data are verified to be legal.
Along with the promotion of intelligent manufacturing and intelligent factory construction, more and more equipment needs to be accessed to an internet platform through an internet technology and an internet of things technology, unified management is carried out, equipment monitoring is carried out, data acquisition can be carried out on the equipment, and meanwhile, other areas or internet of things subsystems of third party factories need to be accessed to the internet platform. Therefore, the embodiment of the invention relates to accessing the Internet platform with the Internet of things equipment and the Internet of things subsystem, and realizing information intercommunication and data sharing between the external system and the internal system so as to more effectively develop business and mine data value through big data analysis.
In the embodiment of the invention, the rule engine is componentized by setting the Internet of things protocol gateway component and the custom script analysis protocol component, and a user only needs to select and configure the equipment access protocol (namely, the target communication protocol of the Internet of things equipment), then select the script language and write the data analysis script according to the protocol data format (namely, the target data format of the Internet platform), so that the Internet of things equipment can be accessed to the Internet platform, and the Internet platform can receive and store the equipment data of the Internet of things equipment; and the rule engine is used for packaging the components, so that the research and development period and the research and development cost of protocol data (namely, the target communication protocol of the Internet of things equipment) access are greatly saved, and the online process of development and deployment is simplified. The Internet platform can rapidly and flexibly support access of multiple protocols (namely target communication protocols of the Internet of things equipment), a user can self-define and rapidly complete data analysis of corresponding data formats through scripting, and corresponding storage and inquiry are carried out, so that bidirectional communication and data intercommunication between the Internet platform and the Internet of things equipment and between the Internet platform and other Internet of things subsystems are rapidly and conveniently realized.
In an embodiment, the method further comprises: selecting a communication protocol path through an Internet of things protocol gateway component; the method comprises the steps that an initial equipment instruction of an Internet platform is converted into a target equipment instruction under a data format corresponding to a communication protocol path through a custom script analysis protocol assembly; and sending the target equipment instruction to the Internet of things equipment. The internet of things protocol gateway component comprises an HTTP (API) protocol gateway component, a WebSocket protocol gateway component, a TCP (Transmission Control Protocol) protocol gateway component, a UDP (User Datagram Protocol) protocol gateway component and a MQTT (Message Queuing Telemetry Transport) protocol gateway component.
In the embodiment of the invention, the data access of equipment (namely the Internet of things equipment) in the application of the Internet of things and the control requirement on the equipment/subsystem of the Internet of things can be rapidly met: (1) Fig. 2 schematically illustrates a schematic diagram of internet of things device access and device data storage according to an embodiment of the present invention, and referring to fig. 2, the internet platform is accessed with respect to internet of things device data: supporting dynamic access of data of different protocols, analyzing a data format identified by an Internet platform through a user-defined analysis script (a user-defined script analysis protocol component), and successfully storing equipment data of Internet-of-things equipment to a database of the Internet platform after data validity of the Internet platform is checked; thus, the data of different protocols are dynamically accessed and are analyzed and written into the database. (2) Fig. 3 schematically illustrates a flow chart of sending a target device instruction to an internet of things device according to the present embodiment, and referring to fig. 3, regarding control of an internet of things device/internet of things subsystem by an internet platform: after the user selects the communication protocol path, the user custom analysis script (custom script analysis protocol component) converts the instruction format of the Internet platform into the data format corresponding to the protocol, and finally, the data format is issued to the corresponding Internet of things equipment, so that the reverse control of the Internet of things equipment is realized, and the user instruction is issued to the Internet of things equipment corresponding to different protocols.
In one embodiment, a method includes: sending a heartbeat packet to a first service process corresponding to a target communication protocol of the access internet of things equipment; under the condition that the response of the first service process is not received within the continuous preset times, determining that the first service process fails; the failed first service process is restarted. Because protocol access is an important link, the base stone of all data on an internet platform needs to be ensured to work stably and reliably for a long time, and therefore, from the reliability, a heartbeat monitoring mechanism is added, namely, heartbeat packets are sent to a service process every certain period, the service process needs to respond after receiving the heartbeat packets, if the service process does not respond for 3 times (preset times) continuously, the service process is considered to be faulty, and then the faulty service process is actively restarted. As described above, a heartbeat mechanism is established, and the failed protocol access service process can be actively restarted, so that the high availability of the service process is ensured.
Fig. 4 schematically illustrates a schematic diagram of a rule engine according to an embodiment of the present invention, mainly related to a front-end visual editing page, a dis cache, a database, a rule engine protocol component (divided into a protocol gateway component such as HTTP, webSocket, TCP, UDP, MQTT), and a script parsing protocol component (divided into a script component such as JavaScript, python).
In an embodiment, the method further comprises: determining the corresponding access limit number and access limit time of the Internet of things equipment according to a target communication protocol; and under the condition that the number and time of the internet of things devices accessed to the internet platform through the target communication protocol are both corresponding to the number and time exceeding the access limit, creating a second service process, wherein the second service process is used for accessing the internet of things devices which are determined to exceed the access limit to the internet platform. Because the number of devices accessed by different protocols is different, namely the data volume of some protocols is large, and the data volume of some protocols is small, in the embodiment of the invention, the system resource scheduling is supported, and the rule chain service can be laterally expanded. When the flow threshold and the duration of the protocol are preset during creation, after the conditions of the flow threshold and the duration are reached, the same equipment access service process can be dynamically created on other server nodes, so that the effect of equipment data access load balancing is achieved, and a load balancing schematic diagram according to an embodiment of the invention is schematically shown in fig. 5. As described above, the protocol gateway service realized based on the rule engine supports the self-defined flow condition, and after the flow condition is reached, the service can be laterally expanded through the system resource scheduling, so as to realize the automatic load balancing of the flow and prevent the service failure caused by the overlarge flow in advance.
The following describes the design of a custom internet of things protocol gateway component, and aiming at the common scene of the internet of things, the internet of things protocol gateway component comprises an HTTP (API) protocol gateway component, a WebSocket protocol gateway component, a TCP protocol gateway component, a UDP protocol gateway component and an MQTT protocol gateway component. Because some of the internet of things equipment/subsystems support to actively establish protocol connection to a set target service address and report data, while some of the internet of things equipment/subsystems do not support, but provide a data access interface, the internet platform can remotely call to acquire corresponding information and issue configuration, so that the service type of the protocol gateway component needs to be defined as a client or a server. Component implementation is described below with respect to specific protocol types.
Description of the related art with respect to an HTTP (API) protocol gateway component, fig. 6 schematically illustrates a usage diagram of the HTTP protocol gateway component according to an embodiment of the present invention, and referring to fig. 6, a device is understood as an internet of things device, a subsystem is understood as an internet of things subsystem, and a platform is understood as an internet platform. REST API (Application Programming Interface) interface call is based on HTTP (Hyper Text Transfer Protocol) current popular system communication mode, when HTTP (API) protocol gateway component is used as a service end, the internet of things device/internet of things subsystem can report device data in real time by calling the API interface defined by the component. The designed component needs the user to define the access address URL (Uniform Resource Locator) and the calling mode Method, can receive the device data in any format, and then performs the unified processing of the data format by the analysis script component.
In an embodiment, sending the target device instruction to the internet of things device includes: receiving a service interface and a calling mode of the Internet of things equipment; and sending the target equipment instruction to the Internet of things equipment based on the service interface and the calling mode.
When an HTTP (API) protocol gateway component is used as a client, the Internet platform can actively communicate with the Internet of things equipment/the Internet of things subsystem, so that a user instruction is issued to the Internet of things equipment/the Internet of things subsystem; and the method also supports to actively acquire specific data of the Internet of things equipment/the Internet of things subsystem according to a certain frequency, so as to achieve the effect of periodically refreshing the data (only the period call is required to be started, and the time period is set). The component needs the user to define the service interface URL and the calling mode Method of the Internet of things equipment/the Internet of things subsystem, and the request parameters are uniformly packaged by an analysis script component (a user-defined script analysis protocol component).
In an embodiment, accessing, through the internet of things protocol gateway component, a target communication protocol of the internet of things device to access the internet of things device to the internet platform includes: accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component; receiving an access address of an Internet of things device; and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the access address.
Illustratively, the WebSocket protocol gateway component is introduced, where WebSocket is a full duplex communication protocol based on TCP, and allows a server to actively push data to a client, which is also a common communication protocol for the internet of things. The designed component only needs a user to define an access address URL, and the Internet of things equipment/an Internet of things subsystem actively establishes a WebSocket long connection according to the defined URL.
Referring to the TCP gateway component, fig. 7 schematically illustrates a use schematic diagram of the TCP gateway component according to an embodiment of the present invention, where communications between a lot of devices in the internet of things and the internet platform are directly based on the TCP protocol, and only data is encrypted or compressed in a protocol packet. The designed component only needs a user to define a service port number, the Internet of things equipment/an Internet of things subsystem actively establishes TCP connection with an Internet platform, the component only receives data, and data decryption and decompression are completed by a subsequent analysis script component (a user-defined script analysis protocol component).
In an embodiment, accessing, through the internet of things protocol gateway component, a target communication protocol of the internet of things device to access the internet of things device to the internet platform includes: accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component; receiving a service port number of the Internet of things device; and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the service port number.
Referring to the UDP protocol gateway component, fig. 8 schematically illustrates a schematic diagram of the use of the UDP protocol gateway component according to an embodiment of the present invention, where the UDP protocol is widely applied in the internet of things, for example, a simple network management SNMP (Simple Network Managemen tProtocol) protocol, a network traffic monitoring sFlow, a Netflow protocol, and the like, which are all application layer protocols based on UDP. The designed components are divided into a server and a client, the server can continuously receive UDP messages only by defining a service port number, and then the specific messages are analyzed by an analysis script. The client needs to specify the port number of the access internet of things equipment, and if the client needs to actively acquire the specific data of the internet of things equipment according to a certain frequency, the data refreshing effect is achieved (only the period call needs to be started and the time period is set).
Introduction regarding the MQTT protocol gateway component, fig. 9 schematically illustrates a usage diagram of the MQTT protocol gateway component according to an embodiment of the present invention, where MQTT is an internet of things communication protocol based on public/subscore mode, decoupling Client/Server mode. The designed component is equivalent to an MQTT Broker, and the Internet of things equipment online and communication based on the MQTT protocol can be completed by requiring users to specify port numbers, authentication information, qoS, topic and other information.
Introduction regarding the custom script parsing protocol component, the designed custom script parsing protocol component supports two languages, javaScript and Python. The JavaScript component is realized based on a Script Engine framework of JDK, can dynamically and efficiently execute JS codes, and the Python component is realized by relying on a Python Interpreter framework, so that Java classes and Python are seamlessly combined, and the Java classes can be imported and used.
The user-defined script analysis protocol component can analyze binary and character type format data, support a common compression/decompression algorithm and a common encryption/decryption algorithm, and can perform bidirectional conversion on the data format, namely up-conversion into a data format recognized by an Internet platform and down-conversion into a data format recognized by Internet of things equipment. The method can set the parallelism quantity of the custom script analysis protocol component according to the equipment access quantity and the flow condition of the preposed protocol gateway component, adjust the data analysis computing capacity and ensure that the data analysis performance meets the actual service scene requirement.
In the embodiment of the invention, a self-grinding based componentized responsive flow processing rule engine is adopted, dynamic expansion of an Internet of things protocol is supported, user-defined analysis script is supported, and dynamic arrangement of a business process is supported. The business system composed of the user-defined Internet of things protocol gateway component, the script analysis protocol component and other auxiliary components can flexibly and rapidly support dynamic access and data analysis of different protocols, and can continuously analyze and process data in different formats from various Internet of things devices or subsystems of the Internet of things.
In the embodiment of the invention, a set of extensible and componentized dynamic access capable of rapidly meeting different protocols is designed based on a self-grinding rule engine platform, the access requirement of data can be rapidly responded, meanwhile, the user can be supported to analyze different format data in real time through a self-defined analysis script, the user familiar with equipment protocols can be linked with the scene, the user can define access protocols and analysis modes by himself without paying attention to protocol requirements of an Internet platform, the development workload and development period of equipment protocol access and data analysis are greatly saved, the high reliability/high availability of service can be ensured, the subsequent maintenance cost is reduced, and the high-growth industrial interconnection business requirement is met.
In the embodiment of the invention, (1) the Internet of things protocol gateway is modularized and dynamic, the Internet of things protocol gateway is realized by adopting the development of Netty NIO based on a high-performance asynchronous event-driven NIO framework, and the mainstream Internet of things protocol (TCP, UDP, HTTP (API) and WebSocket, MQTT) is supported; (2) The user-defined Script analysis protocol component dynamically executes code blocks based on a Script Engine and a Python frame, can simultaneously support JavaScript and Python languages, and can select a Script language by a user to realize protocol data analysis logic; (3) Depending on a self-developed rule engine platform, a required service component and an execution sequence are selected, and the dynamic access of a specified protocol can be completed only in two steps, and the protocol expansion is supported; (4) The method comprises the steps of supporting setting flow threshold conditions, supporting a system to intelligently schedule resources according to the flow threshold conditions, realizing service lateral expansion and realizing flow automatic load balancing; (5) When the user-defined script analysis protocol component processes data, the parallel processing thread number can be set according to the device access concurrency and the flow condition, and the requirement of analyzing a large amount of internet of things device data by the gateway protocol is met.
The embodiment of the invention provides a processor configured to execute the interaction method for an internet platform and internet of things equipment.
In particular, the processor may be configured to:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to an Internet platform;
under the condition that a target data format of an Internet platform is analyzed through a custom script analysis protocol component, receiving device data of Internet of things devices under the target data format;
and storing the device data under the condition that the verification device data are legal.
In an embodiment of the invention, the processor is configured to:
selecting a communication protocol path through an Internet of things protocol gateway component;
the method comprises the steps that an initial equipment instruction of an Internet platform is converted into a target equipment instruction under a data format corresponding to a communication protocol path through a custom script analysis protocol assembly;
and sending the target equipment instruction to the Internet of things equipment.
In an embodiment of the invention, the processor is configured to:
sending the target device instruction to the internet of things device comprises:
receiving a service interface and a calling mode of the Internet of things equipment;
and sending the target equipment instruction to the Internet of things equipment based on the service interface and the calling mode.
In an embodiment of the invention, the processor is configured to:
sending a heartbeat packet to a first service process corresponding to a target communication protocol of the access internet of things equipment;
under the condition that the response of the first service process is not received within the continuous preset times, determining that the first service process fails;
the failed first service process is restarted.
In an embodiment of the invention, the processor is configured to:
determining the access limit number and the access limit time of the corresponding Internet of things equipment according to the target communication protocol;
and under the condition that the number and time of the internet of things devices accessed to the internet platform through the target communication protocol are both corresponding to the number and time exceeding the access limit, creating a second service process, wherein the second service process is used for accessing the internet of things devices which are determined to exceed the access limit to the internet platform.
In an embodiment of the invention, the processor is configured to:
accessing the target communication protocol of the internet of things device through the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component;
receiving an access address of an Internet of things device;
and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the access address.
In an embodiment of the invention, the processor is configured to:
accessing the target communication protocol of the internet of things device through the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component;
receiving a service port number of the Internet of things device;
and accessing the Internet of things equipment to an Internet platform based on the target communication protocol and the service port number.
The embodiment of the invention provides an interaction device for an Internet platform and Internet of things equipment, which comprises:
the access module is used for accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to the Internet platform;
the receiving module is used for receiving the equipment data of the Internet of things equipment under the data format under the condition that the target data format of the Internet platform is analyzed through the custom script analysis protocol assembly;
and the storage module is used for storing the equipment data under the condition that the equipment data are verified to be legal.
The embodiment of the invention provides a machine-readable storage medium, which stores instructions for causing a machine to execute the interaction method for an internet platform and an internet of things device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. An interaction method for an internet platform and an internet of things device, the method comprising:
accessing a target communication protocol of the Internet of things equipment through an Internet of things protocol gateway component so as to access the Internet of things equipment to the Internet platform;
under the condition that a target data format of the Internet platform is analyzed through a custom script analysis protocol component, receiving device data of the Internet of things device under the target data format;
and storing the equipment data under the condition that the equipment data is verified to be legal.
2. The method according to claim 1, wherein the method further comprises:
selecting a communication protocol path through the Internet of things protocol gateway component;
converting an initial device instruction of the Internet platform into a target device instruction under a data format corresponding to the communication protocol path through the custom script parsing protocol assembly;
and sending the target equipment instruction to the Internet of things equipment.
3. The method of claim 2, wherein the sending the target device instruction to the internet of things device comprises:
receiving a service interface and a calling mode of the Internet of things equipment;
and sending the target equipment instruction to the Internet of things equipment based on the service interface and the calling mode.
4. The method according to claim 1, characterized in that the method comprises:
sending a heartbeat packet to a first service process corresponding to a target communication protocol accessed to the Internet of things equipment;
determining that the first service process fails under the condition that the response of the first service process is not received within the continuous preset times;
restarting the failed first service process.
5. The method according to claim 4, wherein the method further comprises:
determining the corresponding access limit number and access limit time of the Internet of things equipment according to the target communication protocol;
and under the condition that the number and time of the internet of things devices accessed to the internet platform through the target communication protocol are both corresponding to the access limit number and the access limit time, creating a second service process, wherein the second service process is used for accessing the internet of things devices which are determined to exceed the access limit number to the internet platform.
6. The method of claim 1, wherein accessing the internet of things device via the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through an Internet of things protocol gateway component;
receiving an access address of the Internet of things device;
and accessing the Internet of things equipment to the Internet platform based on the target communication protocol and the access address.
7. The method of claim 1, wherein accessing the internet of things device via the internet of things protocol gateway component to access the internet of things device to the internet platform comprises:
accessing a target communication protocol of the Internet of things equipment through an Internet of things protocol gateway component;
receiving a service port number of the Internet of things device;
and accessing the Internet of things equipment to the Internet platform based on the target communication protocol and the service port number.
8. A processor configured to perform the interaction method for an internet platform and an internet of things device according to any one of claims 1 to 7.
9. An interaction device for an internet platform and an internet of things device, the device comprising:
the access module is used for accessing a target communication protocol of the Internet of things equipment through the Internet of things protocol gateway component so as to access the Internet of things equipment to the Internet platform;
the receiving module is used for receiving the equipment data of the Internet of things equipment in the target data format under the condition that the target data format of the Internet platform is analyzed through the custom script analysis protocol component;
and the storage module is used for storing the equipment data under the condition of verifying that the equipment data are legal.
10. A machine-readable storage medium having instructions stored thereon for causing a machine to perform the interaction method for an internet platform and an internet of things device according to any one of claims 1 to 7.
CN202211739493.1A 2022-12-30 2022-12-30 Interaction method, processor and device for Internet platform and Internet of things equipment Pending CN116055524A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211739493.1A CN116055524A (en) 2022-12-30 2022-12-30 Interaction method, processor and device for Internet platform and Internet of things equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211739493.1A CN116055524A (en) 2022-12-30 2022-12-30 Interaction method, processor and device for Internet platform and Internet of things equipment

Publications (1)

Publication Number Publication Date
CN116055524A true CN116055524A (en) 2023-05-02

Family

ID=86122082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211739493.1A Pending CN116055524A (en) 2022-12-30 2022-12-30 Interaction method, processor and device for Internet platform and Internet of things equipment

Country Status (1)

Country Link
CN (1) CN116055524A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116582582A (en) * 2023-07-14 2023-08-11 中冶武勘智诚(武汉)工程技术有限公司 Data acquisition method, system, equipment and medium for component type Internet of things
CN117097589A (en) * 2023-10-16 2023-11-21 四川省公路规划勘察设计研究院有限公司 Multichannel multiprotocol equipment access gateway applied to field highway engineering
CN117290428A (en) * 2023-11-22 2023-12-26 深圳中正信息科技有限公司 Data management method and device for internet of things device and readable storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116582582A (en) * 2023-07-14 2023-08-11 中冶武勘智诚(武汉)工程技术有限公司 Data acquisition method, system, equipment and medium for component type Internet of things
CN116582582B (en) * 2023-07-14 2023-10-13 中冶武勘智诚(武汉)工程技术有限公司 Data acquisition method, system, equipment and medium for component type Internet of things
CN117097589A (en) * 2023-10-16 2023-11-21 四川省公路规划勘察设计研究院有限公司 Multichannel multiprotocol equipment access gateway applied to field highway engineering
CN117097589B (en) * 2023-10-16 2024-01-12 四川省公路规划勘察设计研究院有限公司 Multichannel multiprotocol equipment access gateway applied to field highway engineering
CN117290428A (en) * 2023-11-22 2023-12-26 深圳中正信息科技有限公司 Data management method and device for internet of things device and readable storage medium
CN117290428B (en) * 2023-11-22 2024-04-05 深圳中正信息科技有限公司 Data management method and device for internet of things device and readable storage medium

Similar Documents

Publication Publication Date Title
CN116055524A (en) Interaction method, processor and device for Internet platform and Internet of things equipment
EP3364631B1 (en) Dynamic orchestration of microservices
CN108270818B (en) Micro-service architecture system and access method thereof
US11095717B2 (en) Minimizing data loss in a computer storage environment with non-guaranteed continuous network connectivity
CN113760452B (en) Container scheduling method, system, equipment and storage medium
US8326913B2 (en) Method and system for service contract discovery
CN111338893A (en) Process log processing method and device, computer equipment and storage medium
CN113612686A (en) Traffic scheduling method and device and electronic equipment
CN105577480A (en) Monitoring method and device of network connection performances
CN113556359B (en) Communication protocol conversion method, device, system and gateway device
CN114465867A (en) Server maintenance method and device, storage medium and processor
EP3171565B1 (en) Methods, devices and system for netconf hello packets interaction
CN116915827A (en) Data transmission method and device of internet of things edge gateway, electronic equipment and medium
Narita et al. Reliable cloud-based robot services
CN115632815A (en) Data updating method and device, electronic equipment and storage medium
CN114598749B (en) Service access method and device
CN114938396A (en) Routing method of service call request, method and device for creating service
CN104516883A (en) Webpage sharing method, device and system
CN113992644A (en) Internet of things gateway system based on non-service technology and data processing method thereof
CN108055305B (en) Storage expansion method and storage expansion device
CN109040161B (en) Cloud manufacturing service management system, device and method
CN113645062A (en) Page data processing method and device and electronic equipment
CN112261066A (en) Method for supporting COAP (chip on Board) equipment by cloud service platform
CN112866083A (en) Message sending method, electronic equipment and communication system
CN111988283A (en) Data transmission method, system, device and computer readable storage medium

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