Universal protocol access method and system for internet of things device
Patent Information
- Application Number
- CN202211668879.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2042-12-21
AI Technical Summary
相关技术中,在将sdk接入应用程序时,技术人员拷贝sdk包括的代码文件、配置文件和资源文件,然后分别将拷贝的代码文件、配置文件和资源文件放置在应用程序的相应文件目录下,但是目前各个厂家通常都有自己的私有sdk,同时兼容一些国标的协议,一般情况下只能对接本厂的sdk,在这样的环境下导致了不同厂家的设备很难一起使用,这就缩小了客户的选择面,限制了物联网的发展
[0049]1)由于不同的厂家配置不同的sdk接口,一般情况下只能接入本厂的sdk接口,为了打破不同厂家之间的接入隔阂,在进行sdk对接前,先获取对接设备的sdk接口,对其进行分析得到对应的接口协议,然后针对接口协议之间的差异建立接口公共协议,最后公共接口公共协议完成对接工作,这样一来实现了不同厂家的sdk的对接,扩大了sdk的信息交互,这就拓展了客户的选择面,促进了物联网的发展,方便技术人员进行下一步操作。
Smart Images

Figure CN116846984B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) interfaces, and in particular to a universal protocol access method and system for IoT devices. Background Technology
[0002] An SDK (Software Development Kit) is a collection of development tools. When developing applications, engineers can integrate the SDK into their applications to directly use the functionality provided by the SDK. An SDK includes code files, configuration files, and resource files. In related technologies, when integrating an SDK into an application, engineers copy the code files, configuration files, and resource files included in the SDK, and then place these copied files in the corresponding directories of the application. However, currently, each manufacturer usually has its own proprietary SDK, which is compatible with some national standard protocols. Generally, it can only interface with its own manufacturer's SDK. This environment makes it difficult for devices from different manufacturers to be used together, which narrows the customer's choices and limits the development of the Internet of Things (IoT). Summary of the Invention
[0003] To address the aforementioned issues, this invention provides a universal protocol access method and system for IoT devices. This addresses the problem mentioned in the background section, where devices from different manufacturers are generally limited to their own SDKs, making it difficult to use them together. This narrows the customer's choices and restricts the development of the Internet of Things.
[0004] A general protocol access method for IoT devices includes the following steps:
[0005] Obtain the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device;
[0006] Based on the first SDK interface identifier and the first SDK interface identifier, search in the preset interface protocol library for the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface.
[0007] When the first interface protocol is incompatible with the second interface protocol, a common interface protocol for the first interface protocol and the second interface protocol shall be established.
[0008] Connect the first interface protocol and the second interface protocol to the common interface protocol to complete the interface connection.
[0009] Preferably, before establishing a common interface protocol for the first and second interface protocols when the first interface protocol is incompatible with the second interface protocol, the method further includes:
[0010] Analyze the first interface protocol and the second interface protocol to determine whether the first interface protocol and the second interface protocol are compatible;
[0011] If the first interface protocol and the second interface protocol are to be interoperated.
[0012] Preferably, obtaining the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device includes:
[0013] Send interface query commands to the first docking device and the second docking device respectively, and receive the first command reply from the first docking device and the second command reply from the second docking device;
[0014] Parse the first instruction receipt and the second instruction receipt to obtain multiple first interface information of the first docking device and multiple second interface information of the second docking device;
[0015] Filter out the corresponding first SDK interface information from the plurality of first interface information and filter out the corresponding second SDK interface information from the plurality of second interface information;
[0016] The first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device are obtained based on the first SDK interface information and the second SDK interface information.
[0017] Preferably, when the first interface protocol and the second interface protocol are incompatible, establishing a common interface protocol for the first interface protocol and the second interface protocol includes:
[0018] The first interface protocol and the second interface protocol are parsed respectively to obtain the first encoding format of the first SDK interface and the second encoding format of the second SDK interface;
[0019] Establish a first encoding consistent with the first encoding format, and a second encoding consistent with the second encoding format;
[0020] The first and second codes are input into a preset encoding environment, and the first and second codes are run synchronously in the preset encoding environment to obtain the running protocol.
[0021] The operating protocol is trained to adapt to each other with the first interface protocol and the second interface protocol to obtain a common interface protocol.
[0022] Preferably, the step of performing mutual adaptation training between the operating protocol and the first interface protocol and the second interface protocol to obtain an interface common protocol includes:
[0023] Obtain the first interface method of the first interface protocol and the second interface method of the second interface protocol;
[0024] Establish a permitted docking area based on the first docking method and the second docking method;
[0025] The operating protocol is sliced to obtain several protocol fragments;
[0026] Adjust the segment docking mode corresponding to each protocol segment to the allowed docking area, and record the adjusted protocol segment as a feasible segment;
[0027] The feasible fragments are sorted to obtain the common interface protocol.
[0028] Preferably, the step of connecting the first interface protocol and the second interface protocol to the interface common protocol to complete the interface connection includes:
[0029] By connecting the first interface protocol to the interface common protocol, a first interface protocol is obtained;
[0030] Transmit the verification data packet through the first docking protocol and record the first transmission information of the verification data packet;
[0031] Parse the first transmission information to obtain the first transmission rate of the first docking protocol;
[0032] If the first transmission rate is less than the preset transmission rate, adjust the first protocol structure of the first docking protocol until the first transmission rate is greater than the preset transmission rate.
[0033] By connecting the second interface protocol to the first docking protocol, a second docking protocol is obtained;
[0034] The verification data packet is transmitted via the second docking protocol, and the second transmission information of the verification data packet is recorded.
[0035] Parse the second transmission information to obtain the second transmission rate of the second docking protocol;
[0036] If the second transmission rate is less than the preset transmission rate, adjust the second protocol structure of the second docking protocol until the second transmission rate is greater than the preset transmission rate.
[0037] Obtain the adjusted first and second docking protocols and complete the docking between them.
[0038] Preferably, the step of inputting the first code and the second code into a preset encoding environment, and synchronously running the first code and the second code in the preset encoding environment to obtain an operating protocol, includes:
[0039] The first encoding and the second encoding are run in the preset encoding environment to obtain the first running result and the second running result.
[0040] The third protocol structure is obtained by parsing the first and second execution results.
[0041] A protocol framework is established based on the aforementioned third protocol structure;
[0042] The first and second codes are run synchronously in the preset encoding environment, and the running results are input into the protocol framework to obtain the running protocol.
[0043] A universal protocol access system for Internet of Things (IoT) devices, the system comprising:
[0044] The acquisition module is used to acquire the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device.
[0045] The lookup module is used to look up the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface in a preset interface protocol library based on the first SDK interface identifier and the first SDK interface identifier.
[0046] A module is established to establish a common interface protocol for the first interface protocol and the second interface protocol when the first interface protocol is incompatible with the second interface protocol.
[0047] The access module is used to connect the first interface protocol and the second interface protocol to the interface common protocol to complete the docking.
[0048] Through the above technical solutions, the present invention can achieve the following beneficial effects:
[0049] 1) Since different manufacturers configure different SDK interfaces, it is generally possible to connect only to the SDK interface of the manufacturer. In order to break down the access barriers between different manufacturers, before SDK integration, the SDK interface of the device to be connected is obtained, analyzed to obtain the corresponding interface protocol, and then a common interface protocol is established to address the differences between the interface protocols. Finally, the common interface protocol completes the integration work. In this way, the integration of SDKs from different manufacturers is realized, expanding the information exchange of SDKs. This broadens the customer's choices, promotes the development of the Internet of Things, and facilitates the next step of operation for technical personnel.
[0050] 2) In order to speed up the docking process and improve docking efficiency, docking can be performed directly if the first interface protocol and the second interface protocol are compatible, which improves stability and work efficiency.
[0051] 3) Since the differences between different SDK interfaces are small, in order to avoid docking failure due to analysis errors, a query command is sent to the docking device before docking to obtain the device's response. Further analysis of the response can reveal the SDK interface of the docking device, which prepares for subsequent docking.
[0052] 4) Since the common interface protocol is the key protocol for interfacing, in order to obtain a feasible common interface protocol, the encoding format of each SDK interface is obtained by analyzing the interface protocol. Then, encoding can be built according to the encoding format. Running the encoding will produce a running protocol. In order to avoid protocol conflicts between the running protocol and the first or second interface protocol, the running protocol is trained to adapt to the first and second interface protocols. Finally, a common interface protocol is obtained, which lays the foundation for subsequent interfacing.
[0053] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.
[0054] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0055] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0056] Figure 1 This is a flowchart illustrating a general protocol access method for an IoT device according to an embodiment of the present invention.
[0057] Figure 2 This is another flowchart illustrating a general protocol access method for IoT devices according to an embodiment of the present invention;
[0058] Figure 3 This is another flowchart illustrating a general protocol access method for IoT devices according to an embodiment of the present invention;
[0059] Figure 4 This is a schematic diagram of the structure of a general protocol access system for an Internet of Things (IoT) device according to an embodiment of the present invention. Detailed Implementation
[0060] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0061] An SDK (Software Development Kit) is a collection of development tools. When developing applications, engineers can integrate the SDK into the application to directly use the functions provided by the SDK. An SDK includes code files, configuration files, and resource files. In related technologies, when integrating an SDK into an application, engineers copy the code files, configuration files, and resource files included in the SDK, and then place the copied code files, configuration files, and resource files in the corresponding file directories of the application. However, currently, each manufacturer usually has its own proprietary SDK, which is compatible with some national standard protocols. Generally, it can only interface with its own manufacturer's SDK. In this environment, it is difficult for devices from different manufacturers to be used together, which narrows the customer's choices and restricts the development of the Internet of Things (IoT). To solve the above problems, this embodiment discloses a universal protocol access method for IoT devices.
[0062] A general protocol access method for IoT devices, such as Figure 1 As shown, it includes the following steps:
[0063] Step S101: Obtain the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device;
[0064] Step S102: Based on the first SDK interface identifier and the first SDK interface identifier, search in the preset interface protocol library for the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface.
[0065] Step S103: When the first interface protocol is incompatible with the second interface protocol, establish a common interface protocol for the first interface protocol and the second interface protocol.
[0066] Step S104: Connect the first interface protocol and the second interface protocol to the interface common protocol to complete the docking.
[0067] In this example, the first docking device and the second docking device represent two devices waiting to perform the docking operation;
[0068] In this example, the first SDK interface and the first interface protocol correspond to the first docking device, and the second SDK interface and the second interface protocol correspond to the second docking device;
[0069] In this example, after the integration is completed, technicians can perform a series of tasks such as copying the SDK's code files, configuration files, and resource files.
[0070] The working principle of the above technical solution is as follows: obtain the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device; search for the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface in the preset interface protocol library according to the first SDK interface identifier and the first SDK interface identifier; when the first interface protocol and the second interface protocol are incompatible, establish a common interface protocol for the first interface protocol and the second interface protocol, and connect the first interface protocol and the second interface protocol to the common interface protocol to complete the docking.
[0071] The beneficial effects of the above technical solution are as follows: Since different manufacturers configure different SDK interfaces, generally only the SDK interface of the manufacturer can be connected. In order to break down the access barriers between different manufacturers, before SDK docking, the SDK interface of the device to be docked is obtained, analyzed to obtain the corresponding interface protocol, and then a common interface protocol is established for the differences between the interface protocols. Finally, the common interface and common protocol complete the docking work. In this way, the docking of SDKs from different manufacturers is realized, the information exchange of SDKs is expanded, which broadens the customer's choices, promotes the development of the Internet of Things, and facilitates the next step of operation for technicians.
[0072] Since different manufacturers configure different SDK interfaces, we first obtain the SDK interface of the device to be connected, analyze it to obtain the corresponding interface protocol, then establish a common interface protocol to address the differences between the interface protocols, and finally complete the connection work using the common interface protocol to facilitate the next step of the operation by the technicians.
[0073] In one embodiment, before establishing a common interface protocol for the first and second interface protocols when the first interface protocol is incompatible with the second interface protocol, the method further includes:
[0074] Analyze the first interface protocol and the second interface protocol to determine whether the first interface protocol and the second interface protocol are compatible;
[0075] If the first interface protocol and the second interface protocol are to be interoperated.
[0076] The beneficial effects of the above technical solution are as follows: In order to speed up the docking speed and improve the docking efficiency, if the first interface protocol and the second interface protocol are compatible, docking can be performed directly, which improves stability and work efficiency.
[0077] In one embodiment, such as Figure 2 As shown, obtaining the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device includes:
[0078] Step S201: Send interface query commands to the first docking device and the second docking device respectively, and receive the first command receipt from the first docking device and the second command receipt from the second docking device.
[0079] Step S202: Parse the first instruction receipt and the second instruction receipt to obtain multiple first interface information of the first docking device and multiple second interface information of the second docking device;
[0080] Step S203: Filter out the corresponding first SDK interface information from the plurality of first interface information and filter out the corresponding second SDK interface information from the plurality of second interface information;
[0081] Step S204: Obtain the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device based on the first SDK interface information and the second SDK interface information.
[0082] In this example, the query command represents a command to query device interface information;
[0083] In this example, the device interface information represents the basic information of an SDK interface, which can also be understood as the distinguishing information between different SDK interfaces.
[0084] In this example, the receipt represents the response from the docked device after receiving the query command.
[0085] The beneficial effects of the above technical solution are as follows: Since the differences between different SDK interfaces are small, in order to avoid docking failure due to analysis errors, a query command is sent to the docking device before docking to obtain the device's response. Further analysis of the response can reveal the SDK interface of the docking device, thus preparing for subsequent docking.
[0086] In one embodiment, such as Figure 3 As shown, when the first interface protocol and the second interface protocol are incompatible, establishing a common interface protocol for the first interface protocol and the second interface protocol includes:
[0087] Step S301: Parse the first interface protocol and the second interface protocol respectively to obtain the first encoding format of the first SDK interface and the second encoding format of the second SDK interface;
[0088] Step S302: Establish a first encoding consistent with the first encoding format and a second encoding consistent with the second encoding format;
[0089] Step S303: Input the first code and the second code into a preset encoding environment, and run the first code and the second code synchronously in the preset encoding environment to obtain the running protocol;
[0090] Step S304: Perform mutual adaptation training between the running protocol and the first interface protocol and the second interface protocol respectively to obtain the interface common protocol.
[0091] In this example, the encoding format indicates how the SDK interface encodes the data after receiving it.
[0092] In this example, the running protocol refers to the protocol generated after the first encoding and the second encoding are run in a preset encoding environment;
[0093] In this example, the common interface protocol refers to the protocol that can interface with the first interface protocol and the second interface protocol.
[0094] The beneficial effects of the above technical solution are as follows: Since the interface common protocol is the key protocol for interfacing, in order to obtain a feasible interface common protocol, the encoding format of each SDK interface is obtained by analyzing the interface protocol. Then, encoding can be established according to the encoding format. Running the encoding can obtain a running protocol. In order to avoid protocol conflicts between the running protocol and the first or second interface protocol, the running protocol is trained to adapt to the first and second interface protocols, and finally an interface common protocol is obtained, which lays the foundation for subsequent interfacing.
[0095] In one embodiment, the step of performing mutual adaptation training between the operating protocol and the first interface protocol and the second interface protocol respectively to obtain an interface common protocol includes:
[0096] Obtain the first interface method of the first interface protocol and the second interface method of the second interface protocol;
[0097] Establish a permitted docking area based on the first docking method and the second docking method;
[0098] The operating protocol is sliced to obtain several protocol fragments;
[0099] Adjust the segment docking mode corresponding to each protocol segment to the allowed docking area, and record the adjusted protocol segment as a feasible segment;
[0100] The feasible fragments are sorted to obtain the common interface protocol.
[0101] In this example, slicing refers to the operation of dividing the running protocol into several protocol fragments;
[0102] In this example, each protocol fragment comes from the runtime protocol and is a part of the runtime protocol;
[0103] In this example, the feasible fragment refers to the protocol fragment after adjusting the fragment docking method, and its docking method belongs to one of the docking methods in the allowed docking area.
[0104] The beneficial effects of the above technical solution are as follows: In order to further enhance the connection between the interface common protocol and the first interface protocol and the second interface protocol, each protocol segment in the running protocol is adjusted to the docking method of the first interface protocol and the second interface protocol. Then, the adjusted protocols can be sorted to obtain the interface common protocol, which facilitates subsequent docking.
[0105] In one embodiment, the step of connecting the first interface protocol and the second interface protocol to the interface common protocol to complete the interface connection includes:
[0106] By connecting the first interface protocol to the interface common protocol, a first interface protocol is obtained;
[0107] Transmit the verification data packet through the first docking protocol and record the first transmission information of the verification data packet;
[0108] Parse the first transmission information to obtain the first transmission rate of the first docking protocol;
[0109] If the first transmission rate is less than the preset transmission rate, adjust the first protocol structure of the first docking protocol until the first transmission rate is greater than the preset transmission rate.
[0110] By connecting the second interface protocol to the first docking protocol, a second docking protocol is obtained;
[0111] The verification data packet is transmitted via the second docking protocol, and the second transmission information of the verification data packet is recorded.
[0112] Parse the second transmission information to obtain the second transmission rate of the second docking protocol;
[0113] If the second transmission rate is less than the preset transmission rate, adjust the second protocol structure of the second docking protocol until the second transmission rate is greater than the preset transmission rate.
[0114] Obtain the adjusted first and second docking protocols and complete the docking between them.
[0115] In this example, the verification data packet represents the data used to verify the information transmitted by the docking protocol;
[0116] In this example, the transmission information refers to the process information generated when the docking protocol transmits information;
[0117] In this example, the protocol structure represents the framework of the protocol.
[0118] The beneficial effects of the above technical solution are as follows: In order to ensure the smooth connection of the first interface protocol and the second interface protocol, before the connection is performed, one interface protocol is first connected with the interface common protocol, and then tested. Adjustments are made according to the test results. Then the other interface protocol is connected with the interface common protocol. Finally, after adjustment, the connection is completed.
[0119] In one embodiment, the step of inputting the first encoding and the second encoding into a preset encoding environment, and synchronously running the first encoding and the second encoding in the preset encoding environment to obtain an operating protocol includes:
[0120] The first encoding and the second encoding are run in the preset encoding environment to obtain the first running result and the second running result.
[0121] The third protocol structure is obtained by parsing the first and second execution results.
[0122] A protocol framework is established based on the aforementioned third protocol structure;
[0123] The first and second codes are run synchronously in the preset encoding environment, and the running results are input into the protocol framework to obtain the running protocol.
[0124] The beneficial effects of the above technical solution are as follows: In order to ensure the smooth completion of subsequent docking work, in the process of obtaining the running protocol, the first code and the second code are run in the preset coding environment first. The protocol structure of the running protocol is analyzed according to the running results. Then, synchronous running is performed, and the results of synchronous running are transmitted to the protocol framework to obtain a running protocol. This speeds up the construction of the running protocol and improves docking efficiency.
[0125] This embodiment also discloses a standard interface system for Internet of Things (IoT) devices, such as... Figure 4 As shown, the system includes:
[0126] The acquisition module 401 is used to acquire the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device.
[0127] The lookup module 402 is used to look up the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface in a preset interface protocol library based on the first SDK interface identifier and the first SDK interface identifier.
[0128] Establishment module 403 is used to establish a common interface protocol for the first interface protocol and the second interface protocol when the first interface protocol is incompatible with the second interface protocol.
[0129] The access module 404 is used to connect the first interface protocol and the second interface protocol to the interface common protocol to complete the docking.
[0130] The working principle and beneficial effects of the above technical solution have been explained in the method claims, and will not be repeated here.
[0131] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A universal protocol access method for Internet of Things (IoT) devices, characterized in that, Includes the following steps: Obtain the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device; Based on the first SDK interface identifier and the second SDK interface identifier, search in the preset interface protocol library for the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface. When the first interface protocol and the second interface protocol are incompatible, a common interface protocol for the first and second interface protocols is established, including: parsing the first and second interface protocols respectively to obtain a first encoding format for the first SDK interface and a second encoding format for the second SDK interface; establishing a first encoding consistent with the first encoding format and a second encoding consistent with the second encoding format; inputting the first and second encodings into a preset encoding environment, and synchronously running the first and second encodings in the preset encoding environment to obtain a running protocol; performing mutual adaptation training between the running protocol and the first and second interface protocols respectively to obtain a common interface protocol, including: obtaining a first docking method for the first interface protocol and a second docking method for the second interface protocol; establishing an allowed docking region based on the first and second docking methods; slicing the running protocol to obtain several protocol segments; adjusting the docking method of each protocol segment to the allowed docking region, and recording the adjusted protocol segments as feasible segments; sorting the feasible segments to obtain the common interface protocol. Connect the first interface protocol and the second interface protocol to the common interface protocol to complete the interface connection.
2. The general protocol access method for IoT devices as described in claim 1, characterized in that, Before establishing a common interface protocol for the first and second interface protocols when the first interface protocol is incompatible with the second interface protocol, the method further includes: Analyze the first interface protocol and the second interface protocol to determine whether the first interface protocol and the second interface protocol are compatible; If the first interface protocol and the second interface protocol are to be interoperated.
3. The general protocol access method for IoT devices as described in claim 1, characterized in that, The step of obtaining the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device includes: Send interface query commands to the first docking device and the second docking device respectively, and receive the first command reply from the first docking device and the second command reply from the second docking device; Parse the first instruction receipt and the second instruction receipt to obtain multiple first interface information of the first docking device and multiple second interface information of the second docking device; Filter out the corresponding first SDK interface information from the plurality of first interface information and filter out the corresponding second SDK interface information from the plurality of second interface information; The first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device are obtained based on the first SDK interface information and the second SDK interface information.
4. The general protocol access method for IoT devices as described in claim 1, characterized in that, The step of connecting the first interface protocol and the second interface protocol to the interface common protocol to complete the interface connection includes: By connecting the first interface protocol to the interface common protocol, a first interface protocol is obtained; Transmit the verification data packet through the first docking protocol and record the first transmission information of the verification data packet; Parse the first transmission information to obtain the first transmission rate of the first docking protocol; If the first transmission rate is less than the preset transmission rate, adjust the first protocol structure of the first docking protocol until the first transmission rate is greater than the preset transmission rate. By connecting the second interface protocol to the first docking protocol, a second docking protocol is obtained; The verification data packet is transmitted via the second docking protocol, and the second transmission information of the verification data packet is recorded. Parse the second transmission information to obtain the second transmission rate of the second docking protocol; If the second transmission rate is less than the preset transmission rate, adjust the second protocol structure of the second docking protocol until the second transmission rate is greater than the preset transmission rate. Obtain the adjusted first and second docking protocols and complete the docking between them.
5. The general protocol access method for IoT devices as described in claim 1, characterized in that, The step of inputting the first and second codes into a preset encoding environment, and synchronously running the first and second codes in the preset encoding environment to obtain an operating protocol includes: The first encoding and the second encoding are run in the preset encoding environment to obtain the first running result and the second running result. The third protocol structure is obtained by parsing the first and second execution results. A protocol framework is established based on the aforementioned third protocol structure; The first and second codes are run synchronously in the preset encoding environment, and the running results are input into the protocol framework to obtain the running protocol.
6. A universal protocol access system for Internet of Things (IoT) devices, characterized in that, The system includes: The acquisition module is used to acquire the first SDK interface identifier of the first docking device and the second SDK interface identifier of the second docking device. The lookup module is used to look up the first interface protocol corresponding to the first SDK interface and the second interface protocol corresponding to the second SDK interface in a preset interface protocol library based on the first SDK interface identifier and the second SDK interface identifier. A module is established to establish a common interface protocol for the first and second interface protocols when the first interface protocol and the second interface protocol are incompatible. This includes: parsing the first and second interface protocols respectively to obtain a first encoding format for the first SDK interface and a second encoding format for the second SDK interface; establishing a first encoding consistent with the first encoding format and a second encoding consistent with the second encoding format; inputting the first and second encodings into a preset encoding environment and synchronously running the first and second encodings in the preset encoding environment to obtain a running protocol; and performing mutual adaptation training between the running protocol and the first and second interface protocols respectively to obtain a common interface protocol. This includes: obtaining a first docking method for the first interface protocol and a second docking method for the second interface protocol; establishing an allowed docking region based on the first and second docking methods; slicing the running protocol to obtain several protocol fragments; adjusting the docking method of each protocol fragment to the allowed docking region, and recording the adjusted protocol fragments as feasible fragments; and sorting the feasible fragments to obtain the common interface protocol. The access module is used to connect the first interface protocol and the second interface protocol to the interface common protocol to complete the docking.
Citation Information
Patent Citations
Deploying and controlling method and device, electronic equipment and storage medium
CN112738231A