CN113938535B - Internet of things equipment access method and device based on multi-protocol adaptation - Google Patents

Internet of things equipment access method and device based on multi-protocol adaptation Download PDF

Info

Publication number
CN113938535B
CN113938535B CN202111179893.7A CN202111179893A CN113938535B CN 113938535 B CN113938535 B CN 113938535B CN 202111179893 A CN202111179893 A CN 202111179893A CN 113938535 B CN113938535 B CN 113938535B
Authority
CN
China
Prior art keywords
protocol
internet
target
library
things
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111179893.7A
Other languages
Chinese (zh)
Other versions
CN113938535A (en
Inventor
梁秉豪
杨鹤鸣
李斌
陈华荣
麦洪永
金成伟
林涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Planning and Designing Institute of Telecommunications Co Ltd
Original Assignee
Guangdong Planning and Designing Institute of Telecommunications 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 Guangdong Planning and Designing Institute of Telecommunications Co Ltd filed Critical Guangdong Planning and Designing Institute of Telecommunications Co Ltd
Priority to CN202111179893.7A priority Critical patent/CN113938535B/en
Publication of CN113938535A publication Critical patent/CN113938535A/en
Application granted granted Critical
Publication of CN113938535B publication Critical patent/CN113938535B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets

Abstract

The invention discloses an Internet of things equipment access method and device based on multi-protocol adaptation, wherein the method comprises the following steps: the access gateway detects whether target internet of things data sent by target internet of things equipment is received or not; when the detection result is yes, judging whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library; if yes, a target protocol is called to execute data analysis operation on the target internet of things data, and a data analysis result is obtained; performing packaging operation on the data analysis result according to a predetermined data packaging format to obtain a data packaging result; and sending a data packaging result to the Internet of things platform. Therefore, the access gateway based on multi-protocol adaptation can complete data docking of the Internet of things equipment and the Internet of things platform, and is beneficial to solving the problems of high research and development difficulty and complicated steps about realizing data docking operation caused by multiple protocols of the Internet of things equipment and high adaptation difficulty, so that the data docking efficiency and the expandability of the system are improved.

Description

Internet of things equipment access method and device based on multi-protocol adaptation
Technical Field
The invention relates to the technical field of the Internet of things, in particular to an Internet of things equipment access method and device based on multi-protocol adaptation.
Background
Along with development of information technology, the internet of things equipment relates to the power industry, the hydrology industry, the environmental protection industry and other industries, and the internet of things management platform is through receiving the data that internet of things equipment gathered and then realizes functions such as connection management, equipment management, application enable and business analysis, and the function that internet of things equipment can realize gradually increases, and the demand type of internet of things equipment is changing.
At present, because of numerous manufacturers of the internet of things equipment and abundant equipment types and huge quantity of the internet of things equipment, different manufacturers, different equipment types and even different batches of internet of things equipment produced by the same manufacturer can all adopt different communication or application protocols. Based on this problem, the existing solutions are mainly: aiming at different special protocols, the functions of the Internet of things platform are expanded in a code writing mode, so that a newly-added industry protocol analysis module is customized and developed, and because various protocols are used by Internet of things equipment in each industry, the newly-added Internet of things equipment and the Internet of things platform are difficult to dock, the Internet of things data analysis difficulty of the newly-added Internet of things equipment is high, and meanwhile, the expandability of the customized and developed protocols is poor; in addition, the internet of things data is directly obtained from a manufacturer management platform of the internet of things equipment, so that the workload of system architecture and software development can be simplified, but the aspects of system performance, safety and the like extremely depend on the manufacturer management platform, and great constraint is caused on various vertical industry intelligent applications of intelligent cities. Therefore, it is important to provide an access mode for accessing the internet of things equipment to the internet of things platform.
Disclosure of Invention
The technical problem to be solved by the invention is to provide the multi-protocol adaptation-based Internet of things equipment access method and device, which can realize data butt joint between Internet of things equipment and an Internet of things platform by uniformly packaging Internet of things protocols of a plurality of industries, solve the problems of large research and development difficulty and complicated steps for realizing data butt joint between the Internet of things equipment and the Internet of things platform due to the fact that the Internet of things equipment protocols are more and the adaptation difficulty is large, reduce part of complicated steps in the butt joint process of the Internet of things equipment and the Internet of things platform, improve the data butt joint efficiency between the Internet of things equipment and the Internet of things platform, and improve the expandability of a system.
In order to solve the technical problem, a first aspect of the embodiment of the present invention discloses an internet of things device access method based on multi-protocol adaptation, the method is applied to an access gateway, and the method includes:
the access gateway detects whether target internet of things data sent by target internet of things equipment is received or not, wherein the target internet of things equipment is any internet of things equipment which is accessed to the access gateway;
when the condition that the target internet of things data sent by the target internet of things equipment is received is detected, the access gateway judges whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library or not;
When judging that the target protocol matched with the target internet of things equipment exists in the pre-stored protocol library, the access gateway invokes the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result;
the access gateway performs encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result;
and the access gateway sends the data encapsulation result to an Internet of things platform.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
when judging that the target protocol matched with the target internet of things equipment does not exist in the pre-stored protocol library, the access gateway outputs a protocol adding prompt, wherein the protocol adding prompt is used for prompting a corresponding operator to add the target protocol into the protocol library; or,
when judging that the target protocol matched with the target internet of things equipment does not exist in the pre-stored protocol library, the access gateway sends a protocol acquisition request to a cloud server, wherein the protocol acquisition request comprises a protocol identifier of the target protocol and is used for requesting the cloud server to send the target protocol to the access gateway.
As an optional implementation manner, in the first aspect of the present invention, the protocol library includes a first sub-protocol library and a second sub-protocol library, where all protocols included in the first sub-protocol library meet a predetermined first call condition, and all protocols included in the second sub-protocol library do not meet the first call condition;
and the access gateway judges whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library, and the method comprises the following steps:
the access gateway judges whether a target protocol matched with the target internet of things equipment exists in the first sub-protocol library included in a pre-stored protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol exists in the protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the access gateway judges whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
If the second sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol exists in the protocol library;
if the second sub-protocol library included in the pre-stored protocol library is judged to be free of the target protocol matched with the target internet of things device, the access gateway determines that the target protocol is not present in the protocol library.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
when the second sub-protocol library has the target protocol matched with the target internet of things equipment, the access gateway judges whether the target protocol meets the first predetermined call condition;
when the target protocol is judged to meet the first calling condition which is determined in advance, the access gateway moves the target protocol from the second sub-protocol library to the first sub-protocol library;
when the target protocol is judged not to meet the first call condition, the access gateway judges whether the target protocol meets a second call condition which is determined in advance;
And when the target protocol is judged to meet the second call condition, the access gateway deletes the target protocol from the second protocol library.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
the access gateway receives an access instruction of the Internet of things device, and establishes communication connection with a certain Internet of things device indicated by the access instruction of the Internet of things device according to the access instruction of the Internet of things device;
the access gateway judges whether the certain Internet of things equipment is the Internet of things equipment which is accessed to the access gateway in a history way;
when judging that the access gateway history is not accessed to the certain Internet of things equipment, the access gateway judges whether a protocol matched with the certain Internet of things equipment exists in the protocol library;
when judging that the protocol library does not have the protocol matched with the certain Internet of things equipment, the access gateway acquires the protocol matched with the certain Internet of things equipment and adds the acquired protocol matched with the certain Internet of things equipment into the protocol library.
As an alternative embodiment, in the first aspect of the present invention, the method further includes:
The access gateway detects an update instruction; the update instruction comprises a manual trigger update instruction or a timing trigger update instruction;
the access gateway judges whether at least one protocol which does not meet the first calling condition exists in the first sub-protocol library according to the updating instruction;
when judging that at least one protocol which does not meet the first call condition exists in the first protocol library, the access gateway judges whether a protocol which meets a second predetermined call condition exists in a protocol set formed by all protocols which do not meet the first call condition in the first sub-protocol library;
when judging that the protocol set does not have the protocol meeting the second call condition, the access gateway moves all the protocols in the protocol set to the second sub-protocol library;
when judging that the protocol meeting the second call condition exists in the protocol set, the access gateway deletes the protocol meeting the second call condition in the protocol set, and when the rest protocols in the protocol set are not empty, all the rest protocols are moved to the second sub-protocol library;
And/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting the first calling condition exists in the second sub-protocol library according to the updating instruction;
when judging that at least one protocol meeting the first calling condition exists in the second sub-protocol library, the access gateway moves all protocols meeting the first calling condition in the second sub-protocol library to the first sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting the second calling condition exists in the second sub-protocol library according to the updating instruction;
when judging that at least one protocol meeting the second calling condition exists in the second sub-protocol library, the access gateway deletes all protocols meeting the second calling condition in the second sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether a protocol meeting a predetermined upgrading condition exists in the protocol library according to the updating instruction;
and when judging that the protocol meeting the upgrading conditions exists in the protocol library, the access gateway executes upgrading operation on the protocol meeting the upgrading conditions in the protocol library.
As an optional implementation manner, in the first aspect of the present invention, after the access gateway sends the data encapsulation result to the internet of things platform, the method further includes:
the access gateway detects a data failure instruction sent by the internet of things platform aiming at the data encapsulation result;
when the data failure instruction sent by the Internet of things platform is detected, the access gateway judges whether the target protocol meets a predetermined upgrading condition or not;
and when the judgment result is yes, the access gateway executes upgrading operation on the target protocol and retriggers the step of calling the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result.
The second aspect of the invention discloses an Internet of things equipment access device based on multi-protocol adaptation, which comprises:
the detection module is used for detecting whether target internet of things data sent by target internet of things equipment is received or not, wherein the target internet of things equipment is any internet of things equipment which is accessed to the access gateway;
the judging module is used for judging whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library or not when the detecting module detects that the target internet of things data sent by the target internet of things device is received;
The execution module is used for calling the target protocol to execute data analysis operation on the target internet of things data when the judgment module judges that the target protocol matched with the target internet of things device exists in the pre-stored protocol library, so as to obtain a data analysis result;
the execution module is further used for executing the encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result;
the execution module is further used for sending the data encapsulation result to an internet of things platform.
As an alternative embodiment, in the second aspect of the present invention, the apparatus further includes:
the processing module is used for outputting a protocol adding prompt when the judging module judges that the pre-stored protocol library does not have the target protocol matched with the target internet of things equipment, wherein the protocol adding prompt is used for prompting a corresponding operator to add the target protocol into the protocol library; or, sending a protocol acquisition request to a cloud server, where the protocol acquisition request includes a protocol identifier of the target protocol, and the protocol acquisition request is used to request the cloud server to send the target protocol to the access gateway.
As an optional implementation manner, in the second aspect of the present invention, the protocol library includes a first sub-protocol library and a second sub-protocol library, where all protocols included in the first sub-protocol library meet a predetermined first call condition, and all protocols included in the second sub-protocol library do not meet the first call condition;
and the specific mode of judging whether the target protocol matched with the target internet of things equipment exists in the pre-stored protocol library by the judging module is as follows:
the judging module judges whether a target protocol matched with the target internet of things device exists in the first sub-protocol library included in a pre-stored protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the judging module determines that the target protocol exists in the protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the judging module judges whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
If the second sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the judging module determines that the target protocol exists in the protocol library;
and if the second sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the judging module determines that the target protocol does not exist in the protocol library.
In a second aspect of the present invention, the determining module is further configured to determine, when the second sub-protocol library has the target protocol matched with the target internet of things device, whether the target protocol meets the predetermined first call condition;
the execution module is further configured to, when the judgment module judges that the target protocol meets the predetermined first call condition, move the target protocol from the second sub-protocol library to the first sub-protocol library;
the judging module is further configured to judge whether the target protocol meets a predetermined second call condition when it is judged that the target protocol does not meet the first call condition;
The apparatus further comprises:
and the deleting module is used for deleting the target protocol from the second protocol library when the judging module judges that the target protocol meets the second calling condition.
As an optional implementation manner, in the second aspect of the present invention, the execution module is further configured to receive an access instruction of an internet of things device, and establish a communication connection with a certain internet of things device indicated by the access instruction of the internet of things device according to the access instruction of the internet of things device;
the judging module is further configured to judge whether the certain internet of things device is an internet of things device that has been historically accessed to the access gateway;
the judging module is further configured to judge whether a protocol matched with the certain internet of things device exists in the protocol library when it is judged that the access gateway history is not accessed to the certain internet of things device;
the execution module is further configured to acquire a protocol matched with the certain internet of things device and add the acquired protocol matched with the certain internet of things device to the protocol library when the judgment module judges that the protocol matched with the certain internet of things device does not exist in the protocol library.
As an optional implementation manner, in the second aspect of the present invention, the detection module is further configured to detect an update instruction; the update instruction comprises a manual trigger update instruction or a timing trigger update instruction;
the judging module is further configured to judge whether at least one protocol that does not meet the first call condition exists in the first sub-protocol library according to the update instruction;
the judging module is further configured to judge, when it is judged that at least one protocol that does not meet the first call condition exists in the first protocol library, whether a protocol that meets a second predetermined call condition exists in a protocol set that is formed by all protocols that do not meet the first call condition in the first sub-protocol library;
the executing module is further configured to, when the judging module judges that no protocol satisfying the second call condition exists in the protocol set, move all protocols in the protocol set to the second sub-protocol library;
the deleting module is further configured to delete a protocol that satisfies the second call condition in the protocol set when the judging module judges that the protocol that satisfies the second call condition exists in the protocol set;
The execution module is further configured to, when remaining protocols in the protocol set are not empty, move all the remaining protocols to the second sub-protocol library;
and/or the number of the groups of groups,
the judging module is further configured to judge whether at least one protocol that meets the first call condition exists in the second sub-protocol library according to the update instruction;
the execution module is further configured to, when the judgment module judges that at least one protocol that satisfies the first call condition exists in the second sub-protocol library, move and store all protocols that satisfy the first call condition in the second sub-protocol library into the first sub-protocol library;
and/or the number of the groups of groups,
the judging module is further configured to judge whether at least one protocol that meets the second call condition exists in the second sub-protocol library according to the update instruction;
the deleting module is further configured to delete all protocols in the second sub-protocol library that satisfy the second call condition when the judging module judges that at least one protocol in the second sub-protocol library satisfies the second call condition;
and/or the number of the groups of groups,
the judging module is further used for judging whether a protocol meeting a predetermined upgrading condition exists in the protocol library according to the updating instruction;
The execution module is further configured to execute an upgrade operation on a protocol that satisfies the upgrade condition in the protocol library when the judgment module judges that the protocol that satisfies the upgrade condition exists in the protocol library.
As an optional implementation manner, in the second aspect of the present invention, the detection module is further configured to detect a data failure instruction sent by the internet of things platform for the data encapsulation result;
the judging module is further configured to judge whether the target protocol meets a predetermined upgrade condition when the detecting module detects the data failure instruction sent by the internet of things platform;
and the execution module is further used for executing upgrading operation on the target protocol when the judgment module judges that the target protocol meets the predetermined upgrading condition, and re-triggering the step of calling the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result.
The third aspect of the invention discloses another internet of things equipment access device based on multi-protocol adaptation, which comprises:
a memory storing executable program code;
A processor coupled to the memory;
the processor invokes the executable program codes stored in the memory to execute the internet of things equipment access method based on the multi-protocol adaptation disclosed in the first aspect of the invention.
The fourth aspect of the present invention discloses a computer storage medium, where the computer storage medium stores computer instructions, where the computer instructions are used to execute the internet of things device access method based on multi-protocol adaptation disclosed in the first aspect of the present invention when the computer instructions are called.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, an access gateway detects whether target internet of things data sent by target internet of things equipment is received, wherein the target internet of things equipment is any internet of things equipment which is accessed to the access gateway; when detecting that the target internet of things data sent by the target internet of things equipment is received, the access gateway judges whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library; when judging that a target protocol matched with the target internet of things equipment exists in the pre-stored protocol library, the access gateway invokes the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result; the access gateway performs encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result; and the access gateway sends the data encapsulation result to the Internet of things platform.
Therefore, the implementation of the method and the device can uniformly encapsulate different Internet of things equipment protocols, analyze and encapsulate the Internet of things data by combining the encapsulation protocols, acquire the data encapsulation result and send the data encapsulation result to the Internet of things platform so as to complete data docking between the Internet of things equipment and the Internet of things platform, thereby being beneficial to solving the problems of large research and development difficulty and complicated steps for realizing data docking between the Internet of things equipment and the Internet of things platform due to the fact that the Internet of things equipment protocols are more and the adaptation difficulty is large, improving the possibility of successfully completing data docking between different Internet of things equipment and the Internet of things platform, and further improving the efficiency of data docking and the expandability of a system.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow diagram of an access method of an internet of things device based on multi-protocol adaptation, which is disclosed in the embodiment of the present invention;
Fig. 2 is a schematic flow chart of another internet of things device access method based on multi-protocol adaptation disclosed in the embodiment of the present invention;
fig. 3 is a schematic structural diagram of an access device of an internet of things device based on multi-protocol adaptation according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of another internet of things device access apparatus based on multi-protocol adaptation according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an access device of an internet of things device based on multi-protocol adaptation according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The invention discloses an Internet of things equipment access method and device based on multi-protocol adaptation, which can uniformly encapsulate Internet of things protocols of different Internet of things equipment, perform data analysis operation and encapsulation operation on received Internet of things data solutions by combining corresponding Internet of things protocols, send data encapsulation results to an Internet of things platform so as to realize data docking between the Internet of things equipment and the Internet of things platform, and besides, provide an access gateway updating function and an access gateway function for solving the problem of failure of the data encapsulation results, set corresponding processing implementation steps according to various different conditions in the data docking process, improve the probability of successfully completing the data docking operation, improve the data docking efficiency between the Internet of things equipment and the Internet of things platform, reduce the difficulty of realizing the data docking between the Internet of things equipment and the Internet of things platform, and further facilitate improving the software development efficiency and realizing the data sharing. The following will describe in detail.
Example 1
Referring to fig. 1, fig. 1 is a flow chart of an access method of an internet of things device based on multi-protocol adaptation according to an embodiment of the present invention. The method described in fig. 1 may be applied to an internet of things management system, or may be applied to an intelligent terminal of the internet of things, which is not limited by the embodiment of the invention. As shown in fig. 1, the internet of things device access method based on multi-protocol adaptation includes the following operations:
101. the access gateway detects whether target internet of things data sent by target internet of things equipment is received.
In the embodiment of the present invention, specifically, the access gateway detects whether the target internet of things data sent by the target internet of things device is received according to the detection instruction, and when the detection result of step 101 is no, step 101 may be continuously executed.
Optionally, the detection instruction may be an artificial trigger detection instruction or a timing trigger detection instruction, which is not limited in the embodiment of the present invention. Further optionally, the timing trigger detection instruction is a trigger detection instruction for each time a set time length passes, where the set time length may be any time interval, or may be a continuous trigger detection instruction without a time interval.
102. When detecting that the target internet of things data sent by the target internet of things equipment is received, the access gateway judges whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library.
In the embodiment of the present invention, optionally, the target protocol may be a protocol paired with a target internet of things device, or may be a protocol paired with a different manufacturer and/or a different device type and/or a different lot of internet of things device produced by the same manufacturer, where the protocol is applicable to the target internet of things device, and the embodiment of the present invention is not limited.
103. When judging that a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library, the access gateway invokes the target protocol to execute data analysis operation on the target internet of things data, and a data analysis result is obtained.
In the embodiment of the invention, specifically, an access gateway acquires a target protocol matched with target internet of things equipment from a protocol library, and analyzes data analysis operation on the target internet of things data by combining the target protocol and a data communication protocol of the target protocol; optionally, there may be a plurality of sub-protocol libraries in the protocol library, and the target protocol may be stored in at least one sub-protocol library in the protocol library.
104. And the access gateway performs encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result.
In the embodiment of the invention, specifically, the access gateway analyzes the data analysis result, repackages the data analysis result into a fixed header, a variable header and a message body according to the MQTT protocol specification, and obtains the data encapsulation result in the standard data encapsulation format.
105. And the access gateway sends a data encapsulation result to the Internet of things platform.
In the embodiment of the invention, specifically, after the access gateway obtains the data encapsulation result, the data encapsulation result can be sent to the internet of things platform according to the set sending time length between the obtained data encapsulation result and the sent data encapsulation result; optionally, the sending duration may be any time interval, or may be no time interval, that is, the data packaging result is immediately sent to the platform of the internet of things after the data packaging result is obtained.
Therefore, the internet of things device access method based on the multi-protocol adaptation described by the embodiment of the invention can uniformly encapsulate different internet of things device protocols, analyze and encapsulate the internet of things data in combination with the encapsulation protocol, acquire a data encapsulation result and send the data encapsulation result to the internet of things platform so as to finish data docking between the internet of things device and the internet of things platform, thereby being beneficial to solving the problems of large research and development difficulty and complicated steps for realizing data docking between the internet of things device and the internet of things platform caused by a plurality of protocols of the internet of things device and large adaptation difficulty, improving the possibility of successfully completing data docking between different internet of things device and the internet of things platform, and further improving the efficiency of data docking and the expandability of a system.
In an optional embodiment, the internet of things device access method based on the multi-protocol adaptation may further include the following operations:
when judging that a target protocol matched with the target internet of things equipment does not exist in a pre-stored protocol library, the access gateway outputs a protocol adding prompt, wherein the protocol adding prompt is used for prompting a corresponding operator to add the target protocol into the protocol library; or,
when judging that the pre-stored protocol library does not have the target protocol matched with the target internet of things equipment, the access gateway sends a protocol acquisition request to the cloud server, wherein the protocol acquisition request comprises a protocol identifier of the target protocol and is used for requesting the cloud server to send the target protocol to the access gateway.
In the embodiment of the invention, optionally, after the access gateway outputs the protocol adding prompt, the access gateway detects whether the protocol library has added the target protocol at regular time, and when detecting that the protocol library has not added the target protocol, outputs the protocol adding prompt again, and the regular detection duration can be set to any duration according to the requirement; further optionally, the access gateway records the number of protocol addition prompts output for the target protocol, and when the number of protocol addition prompts output is greater than or equal to a set threshold and the target protocol is not yet added in the protocol library, stops detecting whether the target protocol is added in the protocol library and stops outputting the protocol addition prompts.
Therefore, the optional embodiment can provide various modes for prompting and completing the operation of adding the protocol to the protocol library, improves the selectivity of the mode of adding the protocol to the protocol library and the convenience of carrying out the protocol adding operation, is beneficial to better completing the operation of carrying out data analysis on the internet of things data by combining the protocol, and further improves the efficiency of completing the data docking operation between the internet of things equipment and the internet of things platform.
In another optional embodiment, the protocol library includes a first sub-protocol library and a second sub-protocol library, all protocols included in the first sub-protocol library meet a predetermined first call condition, and all protocols included in the second sub-protocol library do not meet the first call condition; further, in step 102, the determining, by the access gateway, whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library may include:
the access gateway judges whether a target protocol matched with target internet of things equipment exists in a first sub-protocol library included in a pre-stored protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol exists in the protocol library;
If the first sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the access gateway judges whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
if the second sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things equipment, the access gateway determines that the target protocol exists in the protocol library;
if the second sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol does not exist in the protocol library.
In the embodiment of the present invention, optionally, the target protocol may be a pairing protocol of other internet of things devices adapted to the target internet of things device, or may be a pairing protocol of the target internet of things device.
Therefore, the optional embodiment sets the sequence of searching the matching protocol operation in the protocol library, so that the searching operation of the matching protocol is more targeted, the searching time is reduced, the matching protocol can be more quickly searched, and the efficiency of completing the data analysis operation and the data encapsulation operation of the internet data is further improved.
In yet another optional embodiment, the internet of things device access method based on multi-protocol adaptation may further include the following operations:
when a target protocol matched with the target internet of things equipment exists in the second sub-protocol library, the access gateway judges whether the target protocol meets a first predetermined call condition or not;
when the target protocol is judged to meet the first calling condition determined in advance, the access gateway moves the target protocol from the second sub-protocol library to the first sub-protocol library;
when the target protocol is judged not to meet the first calling condition, the access gateway judges whether the target protocol meets the second calling condition which is determined in advance;
and when the target protocol is judged to meet the second calling condition, the access gateway deletes the target protocol from the second protocol library.
In the embodiment of the invention, optionally, when the target protocol which does not meet the first call condition is judged to be not met, and the second call condition is not met, the target protocol is continuously stored in the second sub-protocol library;
specifically, the step of meeting the first call condition means that the number of times that a certain protocol is called within a specified time interval threshold is greater than or equal to a set common threshold, the access gateway determines the protocol meeting the first call condition as a common protocol and stores the common protocol into a first sub-protocol library; the fact that the first calling condition is not met means that the number of times that a certain protocol is called within a specified time interval threshold is smaller than a set common threshold, the access gateway determines the protocol which does not meet the first calling condition as an unusual protocol and stores the unusual protocol into a second sub-protocol library; meeting the second call condition means that the number of times that a certain protocol is called in a specified time interval threshold is smaller than a set deletion threshold, and the access gateway deletes the protocol meeting the second call condition from the protocol library;
Optionally, the specified time interval threshold may be set to any duration according to a specific requirement, the setting common threshold may be set to any value according to a specific requirement, and the setting deletion threshold may be set to any value according to a specific requirement.
Therefore, the optional embodiment provides a diversified mode for processing protocol storage, the common protocol is stored separately from the common protocol, and the rarely-called protocol is deleted, so that the protocol matched with the data of the Internet of things equipment can be found more quickly, unnecessary searching operation is reduced, the time for processing the data of the Internet of things equipment is shortened, and the efficiency for completing the data butt joint between the Internet of things equipment and the Internet of things platform is improved.
In yet another alternative embodiment, after the access gateway of step 105 sends the data encapsulation result to the internet of things platform, the method may further include the following operations:
the access gateway detects a data failure instruction sent by the Internet of things platform aiming at a data encapsulation result;
when detecting a data failure instruction sent by the Internet of things platform, the access gateway judges whether a target protocol meets a predetermined upgrading condition;
and when the judgment result is yes, the access gateway executes upgrading operation on the target protocol, and retriggers to invoke the target protocol to execute data analysis operation on the target internet of things data, so as to obtain a data analysis result.
Optionally, when the detection result of the data failure instruction sent by the detection internet of things platform aiming at the data encapsulation result is no, continuing to execute the operation of detecting the data failure instruction sent by the internet of things platform aiming at the data encapsulation result; further optionally, when the target protocol is judged not to meet the predetermined upgrade condition, the access gateway re-triggers the target protocol to perform data analysis operation on the target internet of things data, so as to obtain a data analysis result.
Therefore, the optional embodiment can perform corresponding solving processing operation according to the specific failure condition of the data packaging result, which is beneficial to more pertinently solving the failure problem of the data packaging result, and further improves the successful completion rate of data docking and the effectiveness of the data docking operation.
Example two
Referring to fig. 2, fig. 2 is a flow chart of another internet of things device access method based on multi-protocol adaptation according to an embodiment of the present invention. The method described in fig. 2 may be applied to an internet of things management system, or may be applied to an intelligent terminal of the internet of things, which is not limited by the embodiment of the present invention. As shown in fig. 2, the internet of things device access method based on multi-protocol adaptation includes the following operations:
201. The access gateway detects whether target internet of things data sent by target internet of things equipment is received.
202. When detecting that the target internet of things data sent by the target internet of things equipment is received, the access gateway judges whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library.
203. When judging that a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library, the access gateway invokes the target protocol to execute data analysis operation on the target internet of things data, and a data analysis result is obtained.
204. And the access gateway performs encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result.
205. And the access gateway sends a data encapsulation result to the Internet of things platform.
In the embodiment of the present invention, for other descriptions of the steps 201 to 205, please refer to the detailed descriptions of the steps 201 to 205 in the first embodiment, and the detailed descriptions of the embodiments of the present invention are omitted.
206. The access gateway receives the access instruction of the Internet of things equipment, and establishes communication connection with certain Internet of things equipment indicated by the access instruction of the Internet of things equipment according to the access instruction of the Internet of things equipment.
In the embodiment of the invention, specifically, the access gateway establishes communication connection with a certain internet of things device indicated by the internet of things device access instruction according to a specified establishment mode, and optionally, the establishment of communication connection according to the specified establishment mode may be the establishment of communication connection by combining the access gateway with visual configuration or the automatic establishment operation of communication connection by the access gateway.
207. The access gateway judges whether certain Internet of things equipment is the Internet of things equipment which is accessed through the access gateway in history.
In the embodiment of the invention, optionally, when judging that the access gateway has historically accessed a certain internet of things device, the access gateway judges whether a protocol corresponding to the certain internet of things device exists in the protocol library; when judging that the protocol corresponding to the certain Internet of things equipment does not exist in the protocol library, the access gateway executes the operation of judging whether the protocol matched with the certain Internet of things equipment exists in the protocol library; when judging that a protocol corresponding to a certain Internet of things device exists in the protocol library, executing the operation of calling the protocol corresponding to the certain Internet of things device to execute data analysis operation on the certain Internet of things data to obtain a data analysis result.
208. When judging that the access gateway history is not accessed to a certain Internet of things device, the access gateway judges whether a protocol matched with the certain Internet of things device exists in a protocol library.
In the embodiment of the invention, optionally, when judging that the protocol matched with the certain internet of things device exists in the protocol library, the access gateway outputs a protocol prompt of the matched protocol existing in the protocol library.
209. When judging that the protocol library does not have the protocol matched with the certain Internet of things equipment, the access gateway acquires the protocol matched with the certain Internet of things equipment and adds the acquired protocol matched with the certain Internet of things equipment into the protocol library.
In the embodiment of the invention, specifically, an access gateway combines visual configuration to add a protocol into a protocol library; optionally, the protocol may be an internet of things equipment industry protocol in any industry, or an internet of things equipment private protocol in any industry, which is not limited by the embodiment of the invention.
Therefore, the embodiment of the invention can simplify the flow steps of the access operation and the pairing protocol adding operation of the equipment of the Internet of things, is beneficial to improving the convenience of completing the access operation and the protocol adding operation of the equipment of the Internet of things, shortens the time required for completing the corresponding operation, and further improves the efficiency of completing the data docking operation.
In an optional embodiment, the internet of things device access method based on the multi-protocol adaptation may further include the following operations:
the access gateway detects an update instruction; the update instruction comprises an artificial trigger update instruction or a timing trigger update instruction;
the access gateway judges whether at least one protocol which does not meet the first calling condition exists in the first sub-protocol library according to the updating instruction;
when judging that at least one protocol which does not meet the first calling condition exists in the first protocol library, the access gateway judges whether a protocol which meets the second calling condition determined in advance exists in a protocol set formed by all protocols which do not meet the first calling condition in the first sub-protocol library;
when judging that the protocol set does not have the protocol meeting the second call condition, the access gateway moves all the protocols in the protocol set to a second sub-protocol library;
when judging that the protocol meeting the second call condition exists in the protocol set, the access gateway deletes the protocol meeting the second call condition in the protocol set, and when the rest protocols in the protocol set are not empty, all the rest protocols are moved to a second sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting the first calling condition exists in the second sub-protocol library according to the updating instruction;
When judging that at least one protocol meeting the first calling condition exists in the second sub-protocol library, the access gateway stores all protocols meeting the first calling condition in the second sub-protocol library into the first sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting a second calling condition exists in the second sub-protocol library according to the updating instruction;
when judging that at least one protocol meeting the second calling condition exists in the second sub-protocol library, the access gateway deletes all protocols meeting the second calling condition in the second sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether a protocol meeting a predetermined upgrading condition exists in the protocol library according to the updating instruction;
when judging that the protocol meeting the upgrading conditions exists in the protocol library, the access gateway executes upgrading operation on the protocol meeting the upgrading conditions in the protocol library.
In the embodiment of the present invention, optionally, the update command is triggered at regular intervals according to a set time period, where the time period value of the time interval may be any value, and the time period value may be a fixed value that is not changed, a value that is changed according to different rule conditions, or an irregularly changed value. Alternatively, the upgrade condition may be satisfied when the actual number of upgrades is smaller than the set upgrade number threshold in the predetermined period, or the number of upgrades required for detecting whether or not an upgrade is required in the predetermined period is smaller than the set detection upgrade threshold. Optionally, when the access gateway determines that a protocol meeting the upgrade condition exists in the protocol library, triggering and detecting whether the protocol meeting the upgrade condition has content to be upgraded, and when the access gateway determines that the protocol has the content to be upgraded, the access gateway performs operations of adding content data or deleting content data or replacing content data on the protocol, which is not limited by the embodiment of the invention.
Optionally, when it is determined that at least one protocol that does not meet the first call condition does not exist in the first sub-protocol library, continuing to execute an operation of determining whether at least one protocol that does not meet the first call condition exists in the first sub-protocol library according to the update instruction; optionally, when it is determined that at least one protocol satisfying the first call condition does not exist in the second sub-protocol library, continuing to execute an operation of determining whether at least one protocol satisfying the first call condition exists in the second sub-protocol library according to the update instruction; optionally, when it is determined that at least one protocol satisfying the second call condition does not exist in the second sub-protocol library, continuing to execute an operation of determining whether at least one protocol satisfying the second call condition exists in the second sub-protocol library according to the update instruction; optionally, when it is determined that the protocol library does not have a protocol that satisfies the predetermined upgrade condition, the operation of determining whether the protocol library has a protocol that satisfies the predetermined upgrade condition according to the update instruction is continuously performed.
Therefore, the alternative embodiment provides diversified updating modes through the updating instruction, and carries out different processing operations on the protocol according to different updating modes, so that the operation of calling the protocol and carrying out data analysis by combining the protocol is more effectively completed, the probability of successfully completing the data analysis operation and the data encapsulation operation is favorably improved, and the efficiency of realizing data butt joint between the Internet of things equipment and the Internet of things platform is further improved.
Example III
Referring to fig. 3, fig. 3 is a schematic structural diagram of an access device of an internet of things device based on multi-protocol adaptation according to an embodiment of the present invention. The device described in fig. 3 may be applied to an internet of things management system, or may be applied to an internet of things intelligent terminal, which is not limited by the embodiment of the present invention. As shown in fig. 3, the internet of things device access apparatus based on multi-protocol adaptation may include:
the detection module 301 is configured to detect whether target internet of things data sent by a target internet of things device is received, where the target internet of things device is any internet of things device that has been accessed to the access gateway.
The judging module 302 is configured to judge whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library when the detecting module 301 detects that the target internet of things data sent by the target internet of things device has been received.
And the execution module 303 is configured to, when the judgment module 302 judges that the pre-stored protocol library has the target protocol matched with the target internet of things device, invoke the target protocol to execute a data analysis operation on the target internet of things data, so as to obtain a data analysis result.
The execution module 303 is further configured to execute a packaging operation on the data analysis result according to a predetermined data packaging format, so as to obtain a data packaging result.
The execution module 303 is further configured to send a data encapsulation result to the platform of the internet of things.
Therefore, the internet of things device access apparatus based on multi-protocol adaptation described in fig. 3 can perform unified encapsulation on different internet of things device protocols, analyze and encapsulate the internet of things data in combination with the encapsulation protocol, obtain a data encapsulation result and send the data encapsulation result to the internet of things platform, so as to complete data docking between the internet of things device and the internet of things platform, which is beneficial to solving the problems of large research and development difficulty and complicated steps for realizing data docking between the internet of things device and the internet of things platform due to large number of protocols of the internet of things device and large adaptation difficulty, and improves the possibility of successfully completing data docking between different internet of things device and the internet of things platform, thereby improving the efficiency of data docking and the expandability of the system.
In an alternative embodiment, as shown in fig. 4, the internet of things device access apparatus based on multi-protocol adaptation may further include:
the processing module 304 is configured to output a protocol adding prompt when the judging module 302 judges that a pre-stored protocol library does not have a target protocol matched with the target internet of things device, where the protocol adding prompt is used to prompt a corresponding operator to add the target protocol to the protocol library; or, sending a protocol acquisition request to the cloud server, wherein the protocol acquisition request comprises a protocol identifier of the target protocol, and the protocol acquisition request is used for requesting the cloud server to send the target protocol to the access gateway.
Therefore, the device described in fig. 4 can provide various modes to prompt and complete the operation of adding the protocol to the protocol library, so that the method and the device improve the selectivity of adding the protocol to the protocol library and the convenience of adding the protocol, are favorable for better completing the operation of carrying out data analysis on the internet of things data in combination with the protocol, and further improve the efficiency of completing the data docking operation between the internet of things equipment and the internet of things platform.
In this optional embodiment, as an optional implementation manner, the protocol library includes a first sub-protocol library and a second sub-protocol library, where all protocols included in the first sub-protocol library meet a predetermined first call condition, and all protocols included in the second sub-protocol library do not meet the first call condition;
and, the specific mode of judging whether the pre-stored protocol library has the target protocol matched with the target internet of things device by the judging module 302 includes:
the judging module 302 judges whether a target protocol matched with the target internet of things device exists in a first sub-protocol library included in a pre-stored protocol library;
if it is determined that a target protocol matched with the target internet of things device exists in a first sub-protocol library included in the pre-stored protocol library, the determining module 302 determines that the target protocol exists in the protocol library;
If it is determined that the first sub-protocol library included in the pre-stored protocol library does not have the target protocol matched with the target internet of things device, the determining module 302 determines whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
if it is determined that the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device, the determining module 302 determines that the target protocol exists in the protocol library;
if it is determined that the second sub-protocol library included in the pre-stored protocol library does not have the target protocol matched with the target internet of things device, the determining module 302 determines that the second sub-protocol library does not have the target protocol.
Therefore, the device described in fig. 4 can also set the sequence of searching the matching protocol in the protocol library, so as to more specifically perform the searching operation of the matching protocol, reduce the searching time, facilitate faster searching of the matching protocol, and further improve the efficiency of completing the data analysis operation and the data encapsulation operation on the internet data.
In another optional embodiment, the determining module 302 is further configured to determine, when the second sub-protocol library has a target protocol matched with the target internet of things device, whether the target protocol meets the predetermined first call condition.
The executing module 303 is further configured to, when the judging module 302 judges that the target protocol meets the predetermined first call condition, move the target protocol from the second sub-protocol library to the first sub-protocol library.
The judging module 302 is further configured to, when it is judged that the target protocol does not meet the first call condition, judge whether the target protocol meets a second call condition that is determined in advance.
In this alternative embodiment, as shown in fig. 4, the apparatus may further include:
and the deleting module 305 is configured to delete the target protocol from the second protocol library when the judging module 302 judges that the target protocol meets the second call condition.
Therefore, the device described in fig. 4 can also provide diversified protocol storage, the common protocol is stored separately from the common protocol, and the rarely-called protocol is deleted, so that the protocol matched with the data of the internet of things equipment can be found more quickly, unnecessary searching operation is reduced, the time for processing the data of the internet of things equipment is shortened, and the efficiency for completing the data docking between the internet of things equipment and the internet of things platform is improved.
In yet another optional embodiment, the execution module 303 is further configured to receive an internet of things device access instruction, and establish a communication connection with a certain internet of things device indicated by the internet of things device access instruction according to the internet of things device access instruction.
The judging module 302 is further configured to judge whether a certain internet of things device is an internet of things device that has historically accessed the access gateway.
The judging module 302 is further configured to judge whether a protocol matched with a certain internet of things device exists in the protocol library when it is judged that the access gateway history has not been accessed to the certain internet of things device.
The execution module 303 is further configured to obtain a protocol matched with a certain internet of things device and add the obtained protocol matched with the certain internet of things device to the protocol library when the judgment module 302 judges that the protocol library does not have the protocol matched with the certain internet of things device.
Therefore, the implementation of the device described in fig. 4 can also simplify the flow steps of the access operation and the pairing protocol adding operation of the internet of things device, which is beneficial to improving the convenience of completing the access operation and the protocol adding operation of the internet of things device and shortening the time required for completing the corresponding operation, thereby improving the efficiency of completing the data docking operation.
In yet another alternative embodiment, the detecting module 301 is further configured to detect an update instruction; the update instruction includes an artificial trigger update instruction or a timed trigger update instruction.
The judging module 302 is further configured to judge whether at least one protocol that does not satisfy the first call condition exists in the first sub-protocol library according to the update instruction.
The judging module 302 is further configured to, when it is determined that at least one protocol that does not satisfy the first call condition exists in the first protocol library, judge whether a protocol that satisfies the second call condition determined in advance exists in a protocol set that is formed by all protocols that do not satisfy the first call condition in the first sub-protocol library.
The executing module 303 is further configured to, when the judging module 302 judges that there is no protocol satisfying the second call condition in the protocol set, move all the protocols in the protocol set to the second sub-protocol library.
The deleting module 305 is further configured to delete a protocol that satisfies the second call condition in the protocol set when the judging module 302 judges that the protocol that satisfies the second call condition exists in the protocol set.
The execution module 303 is further configured to, when the remaining protocols in the protocol set are not empty, move all the remaining protocols to the second sub-protocol library.
And/or the number of the groups of groups,
the judging module 302 is further configured to judge whether at least one protocol that satisfies the first call condition exists in the second sub-protocol library according to the update instruction.
The executing module 303 is further configured to, when the judging module 302 judges that at least one protocol that satisfies the first call condition exists in the second sub-protocol library, store all protocols that satisfy the first call condition in the second sub-protocol library into the first sub-protocol library.
And/or the number of the groups of groups,
the judging module 302 is further configured to judge whether at least one protocol that satisfies the second call condition exists in the second sub-protocol library according to the update instruction.
The deleting module 305 is further configured to delete all protocols in the second sub-protocol library that satisfy the second call condition when the judging module 302 judges that at least one protocol in the second sub-protocol library satisfies the second call condition.
And/or the number of the groups of groups,
the judging module 302 is further configured to judge whether a protocol that meets the predetermined upgrade condition exists in the protocol library according to the update instruction.
The execution module 303 is further configured to execute an upgrade operation on a protocol that satisfies the upgrade condition in the protocol library when the determination module 302 determines that the protocol that satisfies the upgrade condition exists in the protocol library.
Therefore, the device described in fig. 4 can provide diversified update modes through the update instruction, and different processing operations are performed on the protocol according to different update modes, so that the operations of calling the protocol and analyzing data by combining the protocol are more effectively completed, the probability of successfully completing the operations of analyzing and packaging the data is improved, and the efficiency of realizing data docking between the internet of things equipment and the internet of things platform is improved.
In yet another optional embodiment, the detection module 301 is further configured to detect a data failure instruction sent by the internet of things platform for a data encapsulation result.
The judging module 302 is further configured to judge whether the target protocol meets a predetermined upgrade condition when the detecting module 301 detects a data failure instruction sent by the internet of things platform.
The execution module 303 is further configured to execute an upgrade operation on the target protocol when the judgment module 302 judges that the target protocol meets the predetermined upgrade condition, and re-trigger the invoking target protocol to execute a data analysis operation on the target internet of things data, so as to obtain a data analysis result.
Therefore, the device described in fig. 4 can also perform corresponding solving processing operation according to the specific failure condition of the data packaging result, which is favorable for more pertinently solving the failure problem of the data packaging result, and further improving the successful completion rate of data docking and the effectiveness of the data docking operation.
Example IV
Referring to fig. 5, fig. 5 is a schematic structural diagram of an access device of an internet of things device based on multi-protocol adaptation according to an embodiment of the present invention. The device described in fig. 5 may be applied to an internet of things management system, or may be applied to an internet of things intelligent terminal, which is not limited by the embodiment of the present invention. As shown in fig. 5, the apparatus may include:
A memory 401 storing executable program codes;
a processor 402 coupled with the memory 401;
further, an input interface 403 and an output interface 404 coupled to the processor 402 may be included;
the processor 402 invokes executable program codes stored in the memory 401, for executing the steps in the internet of things device access method based on the multi-protocol adaptation described in the first or second embodiment.
Example five
The embodiment of the invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the steps in the internet of things device access method based on multi-protocol adaptation described in the first embodiment or the second embodiment.
Example six
An embodiment of the present invention discloses a computer program product, where the computer program product includes a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the steps in the internet of things device access method based on multi-protocol adaptation described in the first or second embodiment.
The apparatus embodiments described above are merely illustrative, wherein the modules illustrated as separate components may or may not be physically separate, and the components shown as modules may or may not be physical, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above detailed description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product that may be stored in a computer-readable storage medium including Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), programmable Read-Only Memory (Programmable Read-Only Memory, PROM), erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory, EPROM), one-time programmable Read-Only Memory (OTPROM), electrically erasable programmable Read-Only Memory (EEPROM), compact disc Read-Only Memory (Compact Disc Read-Only Memory, CD-ROM) or other optical disc Memory, magnetic disc Memory, tape Memory, or any other medium that can be used for computer-readable carrying or storing data.
Finally, it should be noted that: the embodiment of the invention discloses a multi-protocol adaptation-based Internet of things equipment access method and device, which are disclosed as preferred embodiments of the invention, and are only used for illustrating the technical scheme of the invention, but not limiting the technical scheme; although the invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that; the technical scheme recorded in the various embodiments can be modified or part of technical features in the technical scheme can be replaced equivalently; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions.

Claims (7)

1. An internet of things device access method based on multi-protocol adaptation, which is characterized in that the method is applied to an access gateway and comprises the following steps:
the access gateway detects whether target internet of things data sent by target internet of things equipment is received or not, wherein the target internet of things equipment is any internet of things equipment which is accessed to the access gateway;
when the condition that the target internet of things data sent by the target internet of things equipment is received is detected, the access gateway judges whether a target protocol matched with the target internet of things equipment exists in a pre-stored protocol library or not;
When judging that the target protocol matched with the target internet of things equipment exists in the pre-stored protocol library, the access gateway invokes the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result;
the access gateway performs encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result;
the access gateway sends the data encapsulation result to an internet of things platform;
the protocol library comprises a first sub-protocol library and a second sub-protocol library, all protocols included in the first sub-protocol library meet a first calling condition determined in advance, and all protocols included in the second sub-protocol library do not meet the first calling condition;
and the access gateway judges whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library, and the method comprises the following steps:
the access gateway judges whether a target protocol matched with the target internet of things equipment exists in the first sub-protocol library included in a pre-stored protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol exists in the protocol library;
If the first sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the access gateway judges whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
if the second sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol exists in the protocol library;
if the second sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the access gateway determines that the target protocol does not exist in the protocol library;
and, the method further comprises:
when the second sub-protocol library has the target protocol matched with the target internet of things equipment, the access gateway judges whether the target protocol meets the first predetermined call condition;
when the target protocol is judged to meet the first calling condition which is determined in advance, the access gateway moves the target protocol from the second sub-protocol library to the first sub-protocol library;
When the target protocol is judged not to meet the first call condition, the access gateway judges whether the target protocol meets a second call condition which is determined in advance;
when the target protocol is judged to meet the second calling condition, the access gateway deletes the target protocol from the second sub-protocol library;
and, the method further comprises:
the access gateway receives an access instruction of the Internet of things device, and establishes communication connection with a certain Internet of things device indicated by the access instruction of the Internet of things device according to the access instruction of the Internet of things device;
the access gateway judges whether the certain Internet of things equipment is the Internet of things equipment which is accessed to the access gateway in a history way;
when judging that the access gateway history is not accessed to the certain Internet of things equipment, the access gateway judges whether a protocol matched with the certain Internet of things equipment exists in the protocol library;
when judging that the protocol library does not have the protocol matched with the certain Internet of things equipment, the access gateway acquires the protocol matched with the certain Internet of things equipment and adds the acquired protocol matched with the certain Internet of things equipment into the protocol library.
2. The internet of things device access method based on multi-protocol adaptation according to claim 1, wherein the method further comprises:
when judging that the target protocol matched with the target internet of things equipment does not exist in the pre-stored protocol library, the access gateway outputs a protocol adding prompt, wherein the protocol adding prompt is used for prompting a corresponding operator to add the target protocol into the protocol library; or,
when judging that the target protocol matched with the target internet of things equipment does not exist in the pre-stored protocol library, the access gateway sends a protocol acquisition request to a cloud server, wherein the protocol acquisition request comprises a protocol identifier of the target protocol and is used for requesting the cloud server to send the target protocol to the access gateway.
3. The internet of things device access method based on multi-protocol adaptation according to claim 1, wherein the method further comprises:
the access gateway detects an update instruction; the update instruction comprises a manual trigger update instruction or a timing trigger update instruction;
the access gateway judges whether at least one protocol which does not meet the first calling condition exists in the first sub-protocol library according to the updating instruction;
When judging that at least one protocol which does not meet the first call condition exists in the first sub-protocol library, the access gateway judges whether a protocol which meets a second predetermined call condition exists in a protocol set formed by all protocols which do not meet the first call condition in the first sub-protocol library;
when judging that the protocol set does not have the protocol meeting the second call condition, the access gateway moves all the protocols in the protocol set to the second sub-protocol library;
when judging that the protocol meeting the second call condition exists in the protocol set, the access gateway deletes the protocol meeting the second call condition in the protocol set, and when the rest protocols in the protocol set are not empty, all the rest protocols are moved to the second sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting the first calling condition exists in the second sub-protocol library according to the updating instruction;
when judging that at least one protocol meeting the first calling condition exists in the second sub-protocol library, the access gateway moves all protocols meeting the first calling condition in the second sub-protocol library to the first sub-protocol library;
And/or the number of the groups of groups,
the access gateway judges whether at least one protocol meeting the second calling condition exists in the second sub-protocol library according to the updating instruction;
when judging that at least one protocol meeting the second calling condition exists in the second sub-protocol library, the access gateway deletes all protocols meeting the second calling condition in the second sub-protocol library;
and/or the number of the groups of groups,
the access gateway judges whether a protocol meeting a predetermined upgrading condition exists in the protocol library according to the updating instruction;
and when judging that the protocol meeting the upgrading conditions exists in the protocol library, the access gateway executes upgrading operation on the protocol meeting the upgrading conditions in the protocol library.
4. A method for accessing an internet of things device based on multi-protocol adaptation according to any one of claims 1-3, wherein after the access gateway sends the data encapsulation result to the internet of things platform, the method further comprises:
the access gateway detects a data failure instruction sent by the internet of things platform aiming at the data encapsulation result;
when the data failure instruction sent by the Internet of things platform is detected, the access gateway judges whether the target protocol meets a predetermined upgrading condition or not;
And when the judgment result is yes, the access gateway executes upgrading operation on the target protocol and retriggers the step of calling the target protocol to execute data analysis operation on the target internet of things data to obtain a data analysis result.
5. An internet of things device access apparatus based on multi-protocol adaptation, wherein the apparatus is applied to an access gateway, the apparatus comprises:
the detection module is used for detecting whether target internet of things data sent by target internet of things equipment is received or not, wherein the target internet of things equipment is any internet of things equipment which is accessed to the access gateway;
the judging module is used for judging whether a target protocol matched with the target internet of things device exists in a pre-stored protocol library or not when the detecting module detects that the target internet of things data sent by the target internet of things device is received;
the execution module is used for calling the target protocol to execute data analysis operation on the target internet of things data when the judgment module judges that the target protocol matched with the target internet of things device exists in the pre-stored protocol library, so as to obtain a data analysis result;
The execution module is further used for executing the encapsulation operation on the data analysis result according to a predetermined data encapsulation format to obtain a data encapsulation result;
the execution module is further used for sending the data encapsulation result to an internet of things platform;
the protocol library comprises a first sub-protocol library and a second sub-protocol library, all protocols included in the first sub-protocol library meet a first calling condition determined in advance, and all protocols included in the second sub-protocol library do not meet the first calling condition;
and the specific mode of judging whether the target protocol matched with the target internet of things equipment exists in the pre-stored protocol library by the judging module is as follows:
the judging module judges whether a target protocol matched with the target internet of things device exists in the first sub-protocol library included in a pre-stored protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the judging module determines that the target protocol exists in the protocol library;
if the first sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the judging module judges whether the second sub-protocol library included in the pre-stored protocol library has the target protocol matched with the target internet of things device;
If the second sub-protocol library included in the pre-stored protocol library is judged to have the target protocol matched with the target internet of things device, the judging module determines that the target protocol exists in the protocol library;
if the second sub-protocol library included in the pre-stored protocol library is judged to not have the target protocol matched with the target internet of things device, the judging module determines that the target protocol does not exist in the protocol library;
the judging module is further configured to judge whether the target protocol meets the predetermined first call condition when the second sub-protocol library has the target protocol matched with the target internet of things device;
the execution module is further configured to, when the judgment module judges that the target protocol meets the predetermined first call condition, move the target protocol from the second sub-protocol library to the first sub-protocol library;
the judging module is further configured to judge whether the target protocol meets a predetermined second call condition when it is judged that the target protocol does not meet the first call condition;
The apparatus further comprises:
the deleting module is used for deleting the target protocol from the second sub-protocol library when the judging module judges that the target protocol meets the second calling condition;
the execution module is further used for receiving an Internet of things device access instruction, and establishing communication connection with certain Internet of things device indicated by the Internet of things device access instruction according to the Internet of things device access instruction;
the judging module is further configured to judge whether the certain internet of things device is an internet of things device that has been historically accessed to the access gateway;
the judging module is further configured to judge whether a protocol matched with the certain internet of things device exists in the protocol library when it is judged that the access gateway history is not accessed to the certain internet of things device;
the execution module is further configured to acquire a protocol matched with the certain internet of things device and add the acquired protocol matched with the certain internet of things device to the protocol library when the judgment module judges that the protocol matched with the certain internet of things device does not exist in the protocol library.
6. An internet of things device access apparatus based on multi-protocol adaptation, the apparatus comprising:
a memory storing executable program code;
a processor coupled to the memory;
the processor invokes the executable program code stored in the memory to perform the internet of things device access method based on multi-protocol adaptation as claimed in any one of claims 1-4.
7. A computer storage medium storing computer instructions which, when invoked, are operable to perform the internet of things device access method based on multi-protocol adaptation of any one of claims 1-4.
CN202111179893.7A 2021-10-11 2021-10-11 Internet of things equipment access method and device based on multi-protocol adaptation Active CN113938535B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111179893.7A CN113938535B (en) 2021-10-11 2021-10-11 Internet of things equipment access method and device based on multi-protocol adaptation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111179893.7A CN113938535B (en) 2021-10-11 2021-10-11 Internet of things equipment access method and device based on multi-protocol adaptation

Publications (2)

Publication Number Publication Date
CN113938535A CN113938535A (en) 2022-01-14
CN113938535B true CN113938535B (en) 2023-12-26

Family

ID=79278077

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111179893.7A Active CN113938535B (en) 2021-10-11 2021-10-11 Internet of things equipment access method and device based on multi-protocol adaptation

Country Status (1)

Country Link
CN (1) CN113938535B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745437A (en) * 2022-04-28 2022-07-12 南方电网深圳数字电网研究院有限公司 Method and device for unified data access
CN115001772B (en) * 2022-05-26 2023-03-24 深圳市恺恩科技有限公司 Power transmission line Internet of things gateway control method, control system and computer readable storage medium
CN114726720B (en) * 2022-06-10 2022-09-30 广东卓维网络有限公司 Small-flow Internet of things gateway upgrading method, device, equipment and storage medium
CN115296998B (en) * 2022-07-07 2023-08-11 珠海格力电器股份有限公司 Analysis protocol upgrading method and device, electronic equipment and storage medium
CN115396523A (en) * 2022-08-23 2022-11-25 北京软通智慧科技有限公司 Internet of things data processing method, device, equipment, medium and internet of things soft gateway
CN115733894A (en) * 2022-10-21 2023-03-03 云南电网有限责任公司电力科学研究院 Multi-protocol data access management method, device and equipment for power system
CN116095198B (en) * 2023-01-04 2024-01-30 上海邺洋生物技术应用有限公司 Intelligent construction method and system for laboratory data center

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297306A (en) * 2013-06-28 2013-09-11 王毅 Internet of Things system for agriculture
CN105577817A (en) * 2016-01-20 2016-05-11 刘圣德 Agricultural Internet of Things system based on 433M communication
CN106230713A (en) * 2016-08-26 2016-12-14 南威软件股份有限公司 A kind of intelligent gateway
CN112261061A (en) * 2020-11-03 2021-01-22 合沃物联技术(南京)有限公司 Equipment multi-protocol analysis method based on industrial Internet of things gateway
CN112702317A (en) * 2020-12-11 2021-04-23 广东电力通信科技有限公司 Communication protocol optimization method based on intelligent gateway

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120077546A1 (en) * 2010-09-24 2012-03-29 Nokia Corporation Method and apparatus for customizing application protocols
CN107306263B (en) * 2016-04-21 2020-02-18 杭州海康威视系统技术有限公司 Protocol conversion method, platform and protocol conversion gateway

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297306A (en) * 2013-06-28 2013-09-11 王毅 Internet of Things system for agriculture
CN105577817A (en) * 2016-01-20 2016-05-11 刘圣德 Agricultural Internet of Things system based on 433M communication
CN106230713A (en) * 2016-08-26 2016-12-14 南威软件股份有限公司 A kind of intelligent gateway
CN112261061A (en) * 2020-11-03 2021-01-22 合沃物联技术(南京)有限公司 Equipment multi-protocol analysis method based on industrial Internet of things gateway
CN112702317A (en) * 2020-12-11 2021-04-23 广东电力通信科技有限公司 Communication protocol optimization method based on intelligent gateway

Also Published As

Publication number Publication date
CN113938535A (en) 2022-01-14

Similar Documents

Publication Publication Date Title
CN113938535B (en) Internet of things equipment access method and device based on multi-protocol adaptation
CN110221872B (en) Page jump method and device, electronic equipment and storage medium
CN107704260B (en) Method and system for updating software development kit of application software
CN109635523B (en) Application program detection method and device and computer readable storage medium
CN112988485B (en) Simulation test method and device for electric power Internet of things equipment
CN108600377B (en) Method, device, terminal and storage medium for suspending file downloading
CN112953983A (en) SFTP transmission method and device
CN113168332A (en) Data processing method and device and mobile terminal
CN113672441A (en) Method and device for testing intelligent equipment
CN107861765B (en) Product configuration method, apparatus, and computer-readable storage medium
CN111538515A (en) Method, device and equipment for upgrading electric energy meter program
CN112181147B (en) Small program-based wearable device interaction method and device and electronic device
CN112699034A (en) Virtual login user construction method, device, equipment and storage medium
CN108989428B (en) Bluetooth terminal upgrading method, server, computer readable storage medium and system
CN112235124A (en) Method and device for configuring pico-cell, storage medium and electronic device
CN111538542B (en) System configuration method and related device
CN114745437A (en) Method and device for unified data access
CN111858124A (en) Method and system for automatically detecting integrity of intelligent terminal driver
CN111541774A (en) Equipment upgrading method, device and system
CN112148803A (en) Method, device and equipment for calling tasks in block chain and readable storage medium
CN106713453B (en) Application information monitoring method and device
CN113608817B (en) Method and system for processing bullet frame
US20140208438A1 (en) Download management method and device based on android browser
CN113132324B (en) Sample identification method and system
CN106162609B (en) Data pushing method and device

Legal Events

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