CN115801911A - DFS-based Internet of things equipment protocol self-adaption method - Google Patents

DFS-based Internet of things equipment protocol self-adaption method Download PDF

Info

Publication number
CN115801911A
CN115801911A CN202211323219.6A CN202211323219A CN115801911A CN 115801911 A CN115801911 A CN 115801911A CN 202211323219 A CN202211323219 A CN 202211323219A CN 115801911 A CN115801911 A CN 115801911A
Authority
CN
China
Prior art keywords
protocol
layer
dfs
adaptation
stack
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211323219.6A
Other languages
Chinese (zh)
Inventor
熊平
李元海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wuyou Chuangxiang Information Technology Co ltd
Original Assignee
Beijing Wuyou Chuangxiang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Wuyou Chuangxiang Information Technology Co ltd filed Critical Beijing Wuyou Chuangxiang Information Technology Co ltd
Priority to CN202211323219.6A priority Critical patent/CN115801911A/en
Publication of CN115801911A publication Critical patent/CN115801911A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

The invention belongs to the technical field of Internet of things equipment protocols, and particularly discloses a DFS-based Internet of things equipment protocol self-adaptation method, which comprises the steps of carrying out protocol layering and protocol classification on a protocol by adopting a DFS algorithm to obtain a pruning condition, carrying out adaptation analysis on equipment data by utilizing an LRU algorithm according to the pruning condition to obtain an iterator of a protocol container, iterating the protocol meeting requirements, instantiating the protocol, analyzing received messages, adding the protocol into a protocol stack if the instantiated protocol can correctly analyze the received messages, successfully adapting the protocol, finishing adaptation, reducing a search range by adopting the protocol layering protocol classification as the pruning condition, keeping a platform system not exceeding a load under the condition that the number of the protocol is continuously increased, improving adaptation efficiency when the protocol is searched by a self-adaptation algorithm, reducing the protocol search range and improving the protocol search efficiency by adopting a slightly improved depth-first search algorithm to carry out automatic adaptation on the protocol.

Description

DFS-based Internet of things equipment protocol self-adaption method
Technical Field
The invention belongs to the technical field of Internet of things equipment protocols, and particularly relates to a DFS-based Internet of things equipment protocol self-adaption method.
Background
With the gradual maturity of the technology of the internet of things, the application field of the internet of things is also continuously expanded. Because the sensing devices in the internet of things are various and the device analysis protocols are different, the upper-layer application of the internet of things is very difficult to acquire various data. Therefore, an internet of things resource access platform is developed.
Through search, the application numbers of the Chinese patent documents are as follows: 201810771294.6 discloses an access method and device for internet of things equipment, the access method for the internet of things equipment comprises: creating an Internet of things equipment abstract model for the equipment to be accessed into the Internet of things; calling a resource model according to the service attribute of the equipment to be accessed into the Internet of things, and generating a resource instance for quoting at least one target resource model; associating the resource instance which refers to at least one target resource model to the Internet of things equipment abstract model to obtain an Internet of things equipment instance corresponding to the Internet of things equipment to be accessed; and accessing the equipment to be accessed into the Internet of things to the Internet of things platform through the Internet of things equipment instance. By adopting the access method and the access device of the Internet of things equipment, the problem that resources are wasted in the access of the Internet of things equipment in the prior art is solved.
However, although the access device of the internet of things device can shield the heterogeneous structure of the bottom layer device of the internet of things and provide uniform data service for upper layer application, the device needs to access a large number of heterogeneous devices, and the resolution protocols of different devices are different, if each device is accessed, manual protocol adaptation is performed, the workload of platform maintenance becomes huge, and therefore the adaptation efficiency is reduced.
Disclosure of Invention
The invention aims to provide a DFS-based Internet of things equipment protocol self-adaptation method, which mainly adopts a DFS algorithm as a basic algorithm, and performs adaptation analysis on equipment data by taking protocol layering and protocol classification as pruning conditions so as to solve the problem that the workload of platform maintenance is very huge because a large number of heterogeneous equipment needs to be accessed by the device and the analysis protocols of different equipment are different and manual protocol adaptation is performed when each equipment is accessed in the background technology.
In order to achieve the purpose, the invention adopts the following technical scheme:
a DFS-based Internet of things equipment protocol self-adaption method comprises the following steps:
s1, carrying out protocol layering and protocol classification on a protocol by adopting a DFS algorithm to obtain a pruning condition;
s2, carrying out adaptive analysis on the equipment data by utilizing an LRU algorithm according to the pruning condition to obtain an iterator of the protocol container;
s3, iterating the protocols meeting the requirements, then instantiating the protocols, and analyzing the received messages;
s4, if the instantiated protocol cannot correctly analyze the received message, adding 1 to the traversal level, returning to the step S2, and otherwise, entering S5;
and S5, adding the protocol into the protocol stack, successfully adapting the protocol, and finishing the adaptation.
Preferably, the DFS algorithm described in step 1 is an algorithm for traversing or searching a tree or a graph, nodes of the tree are traversed along the depth of the tree, branches of the tree are searched to a deep extent, when all edges of the node v have been searched, a starting node of the edge that backtracks to the found node v is searched, the process is carried out until all nodes that can be reached from the source node are found, if there are nodes that can not be found, one of the nodes is selected as the source node and the above process is repeated, and the whole process is repeated until all nodes are visited.
Preferably, the DFS algorithm includes backtracking and pruning, the backtracking is forward search according to a selection condition to achieve the purpose of search, but when a step is found by search, the step is returned to reselect when the original selection fails to reach the target; the pruning is a means for reducing the size of the search tree and eliminating unnecessary branches in the search tree as early as possible.
Preferably, the protocol layering is to divide the internet of things device protocol into multiple layers according to an application layer, a presentation layer, a session layer, a transport layer, a network layer, a data connection layer and a physical layer, and the protocol classification is to divide the internet of things device protocol under each layer into classes, wherein the classes of the application layer include a DHCP protocol, an FTP protocol, an HTTP protocol, an FTP protocol, an SNMP protocol, a DHCP protocol, a GDP protocol and a VT protocol, the classes of the presentation layer include a DP protocol and a DIS protocol, the protocols of the session layer include an SSL protocol, a DAP protocol and an LDAP protocol, the classes of the transport layer include a TCP protocol, a TLS protocol, a TCP protocol, a UDP protocol and a TLS protocol, the classes of the network layer include an IP protocol, a RIP protocol, a TCP protocol and a TLS protocol, the classes of the data link layer include a Wifi protocol, an ATM protocol, a PPTP protocol, an L2F protocol, an ATM protocol, an ARP protocol and a RARP protocol, and the classes of the physical layer include an ethernet protocol.
Preferably, the LRU algorithm in step S2 makes a decision according to the usage of the page after calling the page into the memory, when a new process accesses a certain page, the number of the page is pressed to the top of the stack, and other page numbers are moved to the bottom of the stack, if the memory is insufficient, the page number at the bottom of the stack is removed, so that the top of the stack is always the number of the page that is accessed most recently, and the bottom of the stack is the page number of the page that has not been accessed most recently.
Preferably, the specific process of performing the adaptive analysis on the device data by the LRU algorithm is as follows:
a1, starting analysis, and confirming whether the analysis condition exceeds the protocol level range;
a2, traversing the protocols of corresponding layers and types if the resolution conditions do not exceed the protocol layer range, and then determining whether the protocols of the layer are traversed or not;
a3, if the protocol of the local layer is traversed, subtracting 1 from the traversed layer, and returning to A1; otherwise, entering A4;
a4, analyzing the residual data and confirming whether the analysis is successful;
a5, if the analysis is unsuccessful, entering A1, and if the analysis is successful, confirming whether the analysis is completed;
and A6, if the analysis is confirmed to be completed, the protocol stack is successfully adapted, and if the analysis is not confirmed to be completed, the protocol stack enters A1.
Preferably, in step A1, if it is determined that the pruning condition exceeds the protocol hierarchy range, the protocol stack fails to adapt, and it is further determined whether to change another pruning condition for adapting according to actual requirements.
Preferably, the implementation protocol in step S3 is to perform simulation implementation drilling according to rules and contents meeting the required protocol, confirm the verification whether the protocol of the internet of things device is self-adaptive, and if the protocol adaptation is successful, indicate that the protocol in the protocol container can analyze the data of the internet of things device.
Compared with the prior art, the DFS-based Internet of things equipment protocol self-adaption method provided by the invention has the following advantages that:
1. the invention adopts DFS algorithm to carry out protocol layering and protocol classification on the protocol to obtain pruning condition, utilizes LRU algorithm to carry out adaptation analysis on equipment data according to the pruning condition to obtain an iterator of a protocol container, iterates the protocol meeting the requirement, instantiates the protocol, analyzes the received message, if the instantiated protocol can correctly analyze the received message, adds the protocol into a protocol stack, successfully adapts the protocol, finishes adaptation, reduces the search range by adopting the protocol layering protocol classification as the pruning condition, aims to keep the platform system not to exceed load under the condition that the number of the protocol is continuously increased, and can improve the adaptation efficiency when the self-adapting algorithm searches the protocol.
2. The DFS algorithm of the invention can generate the corresponding topological sorting table of the target graph by utilizing the depth-first search algorithm, can conveniently solve a plurality of related graph theory problems such as the maximum path problem and the like by utilizing the topological sorting table, and reduces the range of protocol search and improves the efficiency of protocol search by adopting the slightly improved depth-first search algorithm to automatically adapt the protocol.
Drawings
FIG. 1 is a block flow diagram of the present invention;
FIG. 2 is a flow chart of adaptation resolution of the present invention;
FIG. 3 is a diagram of a self-adaptive protocol stack class architecture of the present invention;
FIG. 4 is a protocol container design of the present invention;
FIG. 5 is a diagram of a protocol information class structure of the present invention;
FIG. 6 is a diagram of an installList management policy of the present invention;
fig. 7 is a management policy diagram of uninstantallelist according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The specific embodiments described herein are merely illustrative of the invention and do not delimit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a DFS-based Internet of things equipment protocol self-adaption method, which comprises the following steps of:
s1, carrying out protocol layering and protocol classification on a protocol by adopting a DFS algorithm to obtain a pruning condition;
the DFS algorithm is an algorithm for traversing or searching a tree or a graph, nodes of the tree are traversed along the depth of the tree, branches of the tree are searched deeply, when all edges of a node v are searched, a starting node of the edge which is traced back to the found node v is searched, the process is carried out until all nodes which can be reached from a source node are found, if nodes which can not be found exist, one of the nodes is selected as the source node, the process is repeated, and the whole process is repeatedly carried out until all the nodes are visited.
The DFS algorithm comprises backtracking and pruning, wherein the backtracking is to search forwards according to a selection condition so as to achieve the purpose of searching, but when a certain step is searched, the step is returned to reselect when the original selection can not reach the target; the method comprises the steps of pruning, searching and searching a tree, wherein unnecessary branches in the tree are eliminated as early as possible, a DFS algorithm can generate a corresponding topological sorting table of a target graph by using a depth-first searching algorithm, a plurality of related graph theory problems such as the maximum path problem and the like can be conveniently solved by using the topological sorting table, and the protocol is automatically adapted by using a slightly improved depth-first searching algorithm, so that the protocol searching range is reduced, and the protocol searching efficiency is improved.
The protocol layering is to divide the Internet of things equipment protocol into multiple layers according to an application layer, a presentation layer, a session layer, a transmission layer, a network layer, a data connection layer and a physical layer, the protocol classification is to divide the Internet of things equipment protocol under each layer into types, wherein the types of the application layer comprise a DHCP protocol, an FTP protocol, an HTTP protocol, an FTP protocol, an SNMP protocol, a DHCP protocol, a GDP protocol and a VT protocol, the types of the presentation layer comprise a DP protocol and a DIS protocol, the session layer comprises an SSL protocol, a DAP protocol and an LDAP protocol, the types of the transmission layer comprise a TCP protocol, a TLS protocol, a TCP protocol, a UDP protocol and a TLS protocol, the types of the network layer comprise an IP protocol, a RIP protocol, a TCP protocol and a TLS protocol, the types of the data link layer comprise a Wifi protocol, an ATM protocol, a PPTP protocol, an L2TP protocol, an L2F protocol, an ATMP protocol, an ARP protocol and a RARP protocol, and the types of the physical layer comprise an Ethernet protocol.
S2, carrying out adaptive analysis on the equipment data by utilizing an LRU algorithm according to the pruning condition to obtain an iterator of the protocol container;
the LRU algorithm is used for making a decision according to the use condition of a page after the page is called into the memory, when a new process accesses a certain page, the number of the page is pressed to the top of the stack, other page numbers are moved to the bottom of the stack, if the memory is insufficient, the page number at the bottom of the stack is removed, so that the top of the stack is always the number of the page which is accessed most recently, and the bottom of the stack is the page number of the page which is not accessed most recently.
The specific process of the LRU algorithm for carrying out the adaptive analysis on the equipment data is as follows:
a1, starting analysis, and confirming whether the analysis condition exceeds the protocol level range;
a2, traversing the protocol of the corresponding layer and type if the resolution condition does not exceed the protocol layer range, and then confirming whether the protocol of the current layer is traversed or not, if the pruning condition is confirmed to exceed the protocol layer range, the protocol stack fails to adapt, and further confirming whether another pruning condition is changed for adapting or not according to actual requirements;
a3, if the protocol of the current layer is traversed, subtracting 1 from the traversed layer, and returning to A1; otherwise, entering A4;
a4, analyzing the residual data and confirming whether the analysis is successful;
a5, if the analysis is unsuccessful, entering A1, and if the analysis is successful, confirming whether the analysis is completed;
and A6, if the analysis is confirmed to be completed, the protocol stack is successfully adapted, and if the analysis is confirmed to be not completed, the protocol stack enters A1.
S3, iterating the protocols meeting the requirements, then instantiating the protocols, and analyzing the received messages;
the implementation protocol is used for carrying out simulation implementation drilling according to rules and contents meeting the required protocol, verifying whether the protocol of the Internet of things equipment can be self-adapted or not, and if the protocol is successfully adapted, the protocol in the protocol container can analyze the data of the Internet of things equipment.
S4, if the instantiated protocol cannot correctly analyze the received message, adding 1 to the traversal level, returning to the step S2, and otherwise, entering S5;
s5, adding the protocol into the protocol stack, successfully adapting the protocol, and finishing the adaptation;
in summary, a protocol layering and a protocol classification are performed on a protocol by using a DFS algorithm to obtain a pruning condition, adaptation analysis is performed on equipment data by using an LRU algorithm according to the pruning condition to obtain an iterator of a protocol container, the protocol meeting requirements is iterated, then the protocol is instantiated to analyze the received message, if the instantiated protocol can correctly analyze the received message, the protocol is added into a protocol stack, the protocol adaptation is successful, the adaptation is finished, the search range is reduced by using the protocol layering protocol classification as the pruning condition, in order to keep a platform system not exceeding a load under the condition that the number of the protocols is continuously increased, and the adaptation efficiency can be improved when the protocol is searched by using a self-adaptation algorithm.
As shown in fig. 2, when performing intelligent matching, the program will obtain the iterator of the protocol container, iteratively select a satisfactory protocol according to the level and device type (initial level is 1) of the protocol required by the current recursion, then instantiate the protocol to parse the received message, add the protocol to the protocol stack if the protocol can parse the message correctly, otherwise iterate the next satisfactory protocol. And if the protocol is completely analyzed and has no residual content, the protocol stack is completely assembled. If the protocol can be resolved correctly but there is residual content, then the container iterator will be reacquired to perform recursive matching of the next layer of protocols. If all the protocols of a certain layer cannot be matched, the upper layer replaces the next protocol, and if the protocols of the bottom layer cannot be matched after being completely traversed, the protocol adaptation failure indicates that the protocols in the protocol container cannot analyze the data of the equipment.
Wherein, the self-adaptive protocol stack:
although the protocol component can be directly used after being loaded to the internet of things resource access platform, if the protocol component is used as the most basic functional component, in the case of multi-protocol encapsulated data, directly using the protocol component to perform data analysis of one layer and one layer may cause confusion of analyzed data and inconvenience in management. For this purpose, a protocol stack structure is designed on the basis of taking protocol components as atoms.
The data encapsulation structure is as follows:
Figure DEST_PATH_IMAGE002
one data is encapsulated into a message packet by three protocols A, B, C according to the sequence, and after receiving the message packet, the protocol stack extracts the data according to the analysis sequence of C, B, A.
The function of the self-adaptive protocol stack is not only to analyze data according to the protocol stack mode, but also to analyze data according to the equipment data automatic adaptation protocol, and the structure of the self-adaptive protocol stack type stackShell is shown in fig. 3.
The self-adaptive protocol stack comprises a private attribute, the protocols attribute adopts ArrayList to store the protocol list in the protocol stack, and the position of the protocol in the ArrayList represents the hierarchy of the protocol. The addLayer method has the function of adding a layer of protocol to the protocol stack and is used for adding a layer of protocol when the protocol stack is automatically assembled; the removeLayer method has the function of deleting a top-layer protocol from a protocol stack, and is used for deleting an error protocol when the protocol stack is automatically assembled; the delete function is deleting the protocol stack, and processing the associated operation required when the protocol stack is deleted; the analyze method has the function of analyzing data and is used for analyzing the data uploaded by the equipment; the sendCommand method has the functions of encapsulating data and encapsulating a control command sent by an upper layer application into data which can be identified by equipment; the adapter method has the function of adapting the protocol, and the automatic adaptation protocol analyzes the incoming data and stores the corresponding protocol sequence.
Designing a protocol container:
with the continuous increase of equipment needing to be accessed to the platform, a protocol set searched by a protocol self-adaptation algorithm is larger and larger, and in order to improve the efficiency of protocol adaptation and ensure that a loaded protocol does not exceed the load of the platform, a protocol container is designed to manage the protocol set.
1. Protocol container class:
the protocol container adopts a protocol info class to package protocol information, and then adopts a data structure of a multilevel queue to store a protocol information example, and the design of the protocol container is shown in figure 4;
two private elements are contained in the protocol container. The installList attribute is the set of available protocols, stored using the modified linkedlst class, and stores information of available protocols, i.e. installed but not used protocols, and protocols in use. The uninstantalllist attribute is a hanging protocol set, and is also stored by using an improved linkedlst class, and information of a hanging protocol, namely a protocol which exists in a system but is unloaded, is stored.
2. The protocol information class:
the protocol container defines a storage unit protocol info of protocol information as shown in fig. 5. The protocol container defines a storage unit ProtocoInfo of the protocol information, wherein the ProtocoInfo comprises four private attributes, the type attribute is a protocol type, namely a connection type of the protocol, the type of the serial port equipment is 1, the type of the internet port equipment is 2, if the protocol does not relate to the connection (namely a top layer data analysis protocol), the type is 0, and when the intelligent adaptation protocol stack acquires the protocol for intelligent adaptation, the intelligent adaptation can be carried out through a connection mode and a protocol layer which need to be matched; the name attribute is a protocol name and is used for storing name information of the protocol so as to facilitate the protocol container to search the protocol when the protocol in the suspended state needs to be loaded; the status attribute is a protocol state, is used for preserving the state of the protocol in the life cycle, and is convenient for the management of the protocol container, wherein the protocol state is a suspended state when the status is-1, the protocol state is an available state when the status is 0, and the status is an in-use state when the status is greater than zero, after the protocol is used by the protocol stack to generate a protocol instance, the status will add 1, and when the protocol stack is deleted, all the protocol statuses in the stack will reduce 1. The freq attribute is used for storing the called frequency of the protocol, and the freq attribute is used as the weight of the protocol sequencing when the protocol container adopts the ordered queue storage protocol.
In addition, the protocol info provides a public method interface for carrying out access operation on the attribute, the setType function sets the protocol type, and the getType function acquires the protocol type; the setName function sets a protocol name, and the getName acquires the protocol name; the setStatus function sets the protocol state, and the getStatus acquires the protocol state; setFreq sets the protocol frequency, getFreq obtains the protocol frequency; the incFreq function performs operation of adding 1 to freq attribute execution of the protocol information object, and the operation can be executed to the contained protocol information object after the intelligent adaptation protocol stack successfully adapts the protocol; and finally, designing a factory method getInstance, and dynamically creating an instance of the protocol by adopting a java reflection technology.
3. A multi-level sequence management strategy:
the internet of things resource access platform has numerous protocols, and intelligent matching of the protocols is very frequent along with the increase of the frequency of access equipment. The larger the size of the protocol adaptation event, the closer the frequency with which each protocol is adopted is to the twenty-eight law. The two eight laws, also known as the pareto law, the imbalance principle, etc., are a theory of uneven distribution, and have been widely applied to sociology, enterprise management and economics, and also are applicable to the field of computer science, such as application load, disk access, storage system design, etc., which are uneven and randomly distributed. Therefore, to improve the efficiency of protocol matching, a disk cache design scheme that is also applicable to the twenty-eight law may be adopted.
The protocol container in the application manages the protocol by adopting a multi-stage ordered queue strategy. Two-way linked lists are adopted in the protocol container to store protocol information, installList is used for storing the protocol information of the loaded protocol assembly, namely the protocol information of the available state and the in-use state, and uninstantlllist is used for storing the protocol information of the unloaded protocol assembly, namely the protocol information of the suspended state.
The InstallList uses a slightly modified LRU (Least Recently Used) algorithm for protocol ordering and protocol elimination, with the core idea being "if data has been accessed Recently, then the probability of future access is higher".
When a protocol is adopted by a protocol stack, the freq field and the status field in the corresponding protocol message are increased automatically (freq is the number of times the protocol is adopted, and the status value represents the number of instantiated protocols), wherein if the previous protocol state is suspended, the status field in the protocol message is set to 1, and the protocol message is moved to the head of the chain table again. When the system scans for newly accessed protocols and loads them into an available state, the protocol information of the newly loaded protocol is added to the linked list header of the installList, and since the newly added protocols are generally used immediately, they are adjusted to the oldest traversed position.
When the installList reaches the maximum capacity, that is, when the loaded protocol in the resource access platform reaches saturation, the protocol container will traverse the protocol information from the tail of the linked list to the front, unload the first protocol not in use (i.e., status is 0), change the status field of the protocol information to-1, and move to the uninstalled linked list, as shown in fig. 6.
The UninstallList uses a slightly modified LFU (Least Frequently Used) algorithm weighted against the freq field in the protocol information for protocol ordering, which is based on the idea that if a data is Used a few times in a period of time, it will be Used a little in the future period of time.
And sequencing the protocol information in the UninstallList from large to small according to a freq field, and inserting the protocol information into a corresponding position by a protocol container by adopting an insertion sequencing algorithm when a protocol is moved from an installList queue. When the intelligent adaptation protocol stack traverses the lookup protocol, the protocol components are temporarily loaded and used by the protocol stack, and if a certain protocol is successfully adapted, the freq field plus 1,status field in the protocol information becomes 1, and the protocol information is moved from the uninstantalllist queue to the head of the uninstantalllist queue.
Meanwhile, the uninstantallList queue can also play a role in proposing protocols in the administrator management platform, when the protocol information in the uninstantallList exceeds a certain amount, the protocol information of the part of the queue tail exceeding the specified amount is pushed to the administrator, and the administrator is reminded whether the part of the protocol is not used for a long time and needs to be cleared. If the uninstantalllist queue reaches maximum capacity, the system will automatically discard the protocol at the tail of the queue, as shown in fig. 7.
The protocol container is also provided with a daemon thread, the thread scans the installList queue every certain time, if the queue exceeds a certain capacity, half of the unloading of the protocol which is not in use is carried out, and the unloading is moved into the unintalllist, so that the protocol can be maintained; the thread will also scan uninstantaillist queue, shift the freq field of the protocol information in uninstantaillist to the right, and form an exponentially decaying average number of usage, so as to avoid some protocols from being used many times in a certain period of time, but not being used any more later.
The protocol container adopts a multi-stage ordered queue management protocol set, and has the following advantages.
Firstly, the installList queue has a fixed capacity, that is, the number of protocol components in the ACTIVE state has an upper limit, the internet of things resource access platform can control the number of ACTIVE state protocol components by configuring the capacity of the installList, and when the available number of protocols exceeds the capacity, the protocol container can unload the protocol of the part exceeding the capacity, so that the protocol container can ensure that the system load cannot be exceeded in the long-term use of the resource access platform. And the protocol container can also clear the protocol from the available protocol at regular time, so that the system can keep a small load in the long-term process and use more resources for device connection and data analysis.
Secondly, the protocol queue in the protocol container puts the most frequently used protocol in front of the list according to the LRU or LFU algorithm, so that the required protocol can be found out fast in a statistical sense when the intelligent adaptive protocol stack matches the protocol.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still make modifications to the technical solutions described in the foregoing embodiments, or make equivalent substitutions and improvements to part of the technical features of the foregoing embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A DFS-based Internet of things equipment protocol self-adaption method is characterized in that: the method comprises the following steps:
s1, carrying out protocol layering and protocol classification on a protocol by adopting a DFS algorithm to obtain a pruning condition;
s2, carrying out adaptive analysis on the equipment data by utilizing an LRU algorithm according to the pruning condition to obtain an iterator of the protocol container;
s3, iterating the protocol meeting the requirement, then instantiating the protocol, and analyzing the received message;
s4, if the instantiated protocol cannot correctly analyze the received message, adding 1 to the traversal level, returning to the step S2, and otherwise, entering S5;
and S5, adding the protocol into the protocol stack, successfully adapting the protocol, and finishing the adaptation.
2. The DFS-based Internet of things device protocol self-adaptation method according to claim 1, wherein: the DFS algorithm described in step 1 is an algorithm for traversing or searching a tree or a graph, nodes of the tree are traversed along the depth of the tree, branches of the tree are searched to a deep degree, when all edges of a node v have been searched, a starting node of the edge that is traced back to the found node v is searched, the process is carried out until all nodes that can be reached from a source node are found, if there are no found nodes, one of the nodes is selected as the source node and the above process is repeated, and the whole process is repeated until all nodes are visited.
3. The DFS-based Internet of things device protocol self-adaptation method according to claim 2, wherein: the DFS algorithm comprises backtracking and pruning, wherein the backtracking is to search forwards according to a selection condition so as to achieve the purpose of searching, but when a certain step is searched, the step is returned to reselect when the original selection can not reach the target; the pruning is a means for reducing the size of the search tree and eliminating unnecessary branches in the search tree as early as possible.
4. The DFS-based Internet of things device protocol self-adaptation method according to claim 3, wherein: the protocol layering is to divide the Internet of things equipment protocol into multiple layers according to an application layer, a presentation layer, a session layer, a transmission layer, a network layer, a data connection layer and a physical layer, the protocol classification is to divide the Internet of things equipment protocol under each layer into types, wherein the types of the application layer comprise a DHCP protocol, an FTP protocol, an HTTP protocol, an FTP protocol, an SNMP protocol, a DHCP protocol, a GDP protocol and a VT protocol, the types of the presentation layer comprise a DP protocol and a DIS protocol, the session layer comprises an SSL protocol, a DAP protocol and an LDAP protocol, the types of the transmission layer comprise a TCP protocol, a TLS protocol, a TCP protocol, a UDP protocol and a TLS protocol, the types of the network layer comprise an IP protocol, a RIP protocol, a TCP protocol and a TLS protocol, the types of the data link layer comprise a Wifi protocol, an ATM protocol, a PPTP protocol, an L2TP protocol, an L2F protocol, an ATMP protocol, an ARP protocol and a RARP protocol, and the types of the physical layer comprise an Ethernet protocol.
5. The DFS-based Internet of things device protocol self-adaptation method according to claim 1, wherein: the LRU algorithm in step S2 makes a decision according to the usage of the page after calling the memory, when a new process accesses a page, the number of the page is pressed to the top of the stack, and other page numbers are moved to the bottom of the stack, if the memory is insufficient, the page number at the bottom of the stack is removed, so that the top of the stack is always the number of the newly accessed page, and the bottom of the stack is the page number of the page that has not been accessed for the latest.
6. The DFS-based Internet of things device protocol self-adaptation method according to claim 1, wherein: the specific process of the LRU algorithm for carrying out the adaptive analysis on the equipment data is as follows:
a1, starting analysis, and confirming whether the analysis condition exceeds the protocol level range;
a2, traversing the protocols of corresponding layers and types if the resolution conditions do not exceed the protocol layer range, and then determining whether the protocols of the layer are traversed or not;
a3, if the protocol of the local layer is traversed, subtracting 1 from the traversed layer, and returning to A1; otherwise, entering A4;
a4, analyzing the residual data and confirming whether the analysis is successful;
a5, if the analysis is unsuccessful, entering A1, and if the analysis is successful, confirming whether the analysis is completed;
and A6, if the analysis is confirmed to be completed, the protocol stack is successfully adapted, and if the analysis is confirmed to be not completed, the protocol stack enters A1.
7. The DFS-based Internet of things device protocol self-adaptation method according to claim 6, wherein: in step A1, if it is determined that the pruning condition exceeds the protocol level range, the protocol stack fails to adapt, and it is further determined whether to change another pruning condition for adaptation according to actual requirements.
8. The DFS-based Internet of things device protocol self-adaptation method according to claim 6, wherein: and the implementation protocol in the step S3 is to perform simulation implementation drilling according to the rules and contents meeting the required protocol, confirm the verification whether the protocol of the Internet of things equipment can be self-adapted, and if the protocol is successfully adapted, show that the protocol in the protocol container can analyze the data of the Internet of things equipment.
CN202211323219.6A 2022-10-27 2022-10-27 DFS-based Internet of things equipment protocol self-adaption method Pending CN115801911A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211323219.6A CN115801911A (en) 2022-10-27 2022-10-27 DFS-based Internet of things equipment protocol self-adaption method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211323219.6A CN115801911A (en) 2022-10-27 2022-10-27 DFS-based Internet of things equipment protocol self-adaption method

Publications (1)

Publication Number Publication Date
CN115801911A true CN115801911A (en) 2023-03-14

Family

ID=85433964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211323219.6A Pending CN115801911A (en) 2022-10-27 2022-10-27 DFS-based Internet of things equipment protocol self-adaption method

Country Status (1)

Country Link
CN (1) CN115801911A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116320077A (en) * 2023-04-07 2023-06-23 武汉万维物联科技有限公司 Access method and device of Internet of things equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116320077A (en) * 2023-04-07 2023-06-23 武汉万维物联科技有限公司 Access method and device of Internet of things equipment

Similar Documents

Publication Publication Date Title
US7478426B2 (en) Multi-field classification dynamic rule updates
US5995971A (en) Apparatus and accompanying methods, using a trie-indexed hierarchy forest, for storing wildcard-based patterns and, given an input key, retrieving, from the forest, a stored pattern that is identical to or more general than the key
CN104348716B (en) A kind of message processing method and equipment
CN104580027B (en) A kind of OpenFlow message forwarding methods and equipment
CN104092756B (en) A kind of resource dynamic distributing method of the cloud storage system based on DHT mechanism
CN107395659A (en) A kind of method and device of service handling and common recognition
US20140281809A1 (en) Merging Independent Writes, Separating Dependent And Independent Writes, And Error Roll Back
US11481441B2 (en) Graph database query pagination
US20170250868A1 (en) Network management using adaptive policy
CN110324245A (en) A kind of method and device to be E-Packeted based on integrated flow table
CN115801911A (en) DFS-based Internet of things equipment protocol self-adaption method
US20180097748A1 (en) Partitioned Topic Based Queue with Automatic Processing Scaling
Chattopadhyay et al. A scalable and approximate mechanism for web service composition
JP6086020B2 (en) Communication device, address learning method, and address learning program
US9122546B1 (en) Rapid processing of event notifications
CN104641607A (en) Ultra low latency multi-protocol network device
Ma et al. A deep reinforcement learning approach for dynamic contents caching in HetNets
Fallon et al. Apex: An engine for dynamic adaptive policy execution
US8886764B2 (en) Quick upload
CN110308901A (en) Handle data variable method, apparatus, equipment and storage medium in front end page
CN107835175B (en) Network connection tracking method adopting balanced binary tree algorithm
US8316151B1 (en) Maintaining spatial ordering in firewall filters
CN105763468A (en) Method and device for transmitting BGP update message
US9705698B1 (en) Apparatus and method for network traffic classification and policy enforcement
US7010661B2 (en) Efficient service management in home gateways

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