Iot device remote control method, platform, storage medium and program product

The method for remote control of IoT devices through self-organizing network communication and server assistance solves the problem of additional encapsulation and parsing programs in existing technologies, realizes secure and efficient remote control, reduces development costs and improves transmission security.

CN119603339BActive Publication Date: 2025-11-21ZHEJIANG FEIHANG INTELLIGENT TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510113939.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-11-21
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

Existing methods for remotely controlling IoT devices require additional information encapsulation and parsing procedures, leading to increased program development costs and lower security of transmission protocols.

Method used

The system connects via an ad hoc network, generates control messages, encapsulates them based on device identifiers and resolution tables, transmits information using a server, ensures security through authentication and encrypted channels, and uses a unified communication protocol for remote control.

Benefits of technology

It enables remote control without the need for additional information encapsulation and parsing programs, reducing development costs and improving the security and reliability of information transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603339B_ABST
    Figure CN119603339B_ABST
Patent Text Reader

Abstract

The application discloses a kind of Internet of Things equipment remote control method, platform, storage medium and program product, it is related to data transmission technical field, Internet of Things equipment remote control method includes: in response to control instruction to second Internet of Things equipment, generate control message, wherein the first Internet of Things equipment and the second Internet of Things equipment are connected by ad hoc network, based on the device identification of second Internet of Things equipment in the control message and the device analysis table generated when ad hoc network, the control message is encapsulated, obtains target encapsulation message with the physical address of second Internet of Things equipment, the target encapsulation message is sent to server, so that the target encapsulation message is sent to the second Internet of Things equipment by the server, remote control to the second Internet of Things equipment is realized, message transmission is carried out by the method, and additional information encapsulation and analysis program are not needed, so that additional program development cost is not generated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data transmission, in particular to a remote control method and platform for Internet of Things devices, a storage medium and a program product. BACKGROUND

[0002] At present, in the remote control process between Internet of Things devices, a message publishing / subscription transmission protocol based on a client-server is usually used for information transmission. Since the transmission protocol only defines the transmission mode of information, but does not involve the specific content and format of information, for Internet of Things devices in different network environments and with different functions, additional information encapsulation and information analysis programs are needed to process the information to be received and sent, so as to realize the remote control of the Internet of Things devices, resulting in additional program development costs. SUMMARY

[0003] The main purpose of the present application is to provide a remote control method and platform for Internet of Things devices, a storage medium and a program product, aiming at solving the technical problem that the processing program for message receiving and sending needs to be modified when performing remote control of Internet of Things devices.

[0004] To achieve the above purpose, the present application provides a remote control method for Internet of Things devices, which comprises:

[0005] In response to the control instruction of the second Internet of Things device, a control message is generated, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network communication network;

[0006] Based on the device identifier of the second Internet of Things device in the control message and the device analysis table generated during ad hoc networking, the control message is encapsulated to obtain a target encapsulation message with the physical address of the second Internet of Things device;

[0007] The target encapsulation message is sent to a server, so that the server sends the target encapsulation message to the second Internet of Things device, realizing the remote control of the second Internet of Things device.

[0008] In an embodiment, the step of encapsulating the control message based on the device identifier of the second Internet of Things device in the control message and the device analysis table generated during ad hoc networking comprises:

[0009] The virtual address corresponding to the device identifier and the physical address in the device analysis table are extracted;

[0010] Based on the virtual address, the control message is encapsulated to obtain a preliminary encapsulation message with the virtual address of the second Internet of Things device;

[0011] Encapsulate the preliminary encapsulation packet based on the physical address to obtain a target encapsulation packet with a physical address of the second Internet of Things device.

[0012] In an embodiment, after the step of generating the control packet in response to the control instruction of the second Internet of Things device, the method further comprises:

[0013] initiating a connection request to the server;

[0014] performing identity authentication on the server based on the received first identity authentication certificate of the server, wherein the first identity authentication certificate is sent by the server to the local after receiving the connection request from the local;

[0015] sending a second identity authentication certificate of the local to the server in response to an identity authentication request sent by the server, so that the server authenticates the identity of the local, wherein the identity authentication request is sent by the server to the local after successfully authenticating the identity of the server;

[0016] if the verification success information is received, establishing an encrypted channel between the local and the server to perform packet transmission based on the encrypted channel, wherein the verification success information is sent by the server to the local after successfully authenticating the identity of the local.

[0017] In an embodiment, after the step of performing identity authentication on the server based on the received first identity authentication certificate of the server, the method further comprises:

[0018] performing key exchange with the server based on an asymmetric encryption algorithm to obtain a symmetric encryption session key;

[0019] In an embodiment, after the step of encapsulating the control packet based on the virtual address to obtain a preliminary encapsulation packet with a virtual address of the second Internet of Things device, the method further comprises:

[0020] encrypting the preliminary encapsulation packet based on the session key to obtain an encrypted preliminary encapsulation packet.

[0021] In an embodiment, the method further comprises:

[0022] when a connection state between the local and the second Internet of Things device changes, sending state change information to the server, so that the server updates the device resolution table based on the state change information;

[0023] when receiving a connection state confirmation request sent by the server, feeding back connection state information to the server, wherein the connection confirmation request is sent by the server to the local every first preset time period.

[0024] To achieve the above object, the application further provides a remote control method of an Internet of Things device, applied to a server, comprising:

[0025] receiving a target encapsulation packet, decrypting the target encapsulation packet based on a session key to obtain a decrypted encapsulation packet, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network, the target encapsulation packet is obtained by encapsulating a control packet based on the device identifier of the second Internet of Things device in the control packet and a device resolution table generated when the ad hoc network is established, the control packet is generated by the first Internet of Things device in response to a control instruction of the second Internet of Things device, and the session key is obtained by negotiation with the first Internet of Things device;

[0026] sending the decrypted encapsulation packet to the second Internet of Things device based on the physical address in the decrypted encapsulation packet to realize remote control of the second Internet of Things device.

[0027] In an embodiment, the method further comprises:

[0028] sending a connection state confirmation request to the Internet of Things device every preset first time period;

[0029] judging whether the corresponding Internet of Things device is in a connection state based on whether the connection state information fed back by the Internet of Things device is received within a preset second time period;

[0030] if the connection state information is not received within the preset second time period, judging that the corresponding Internet of Things device is not in a connection state;

[0031] updating the device resolution table based on the judgment result.

[0032] In addition, to achieve the above object, the application further provides a remote control platform of an Internet of Things device, comprising:

[0033] a first Internet of Things device, configured to generate a control packet in response to a control instruction of a second Internet of Things device, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network, the control packet is encapsulated based on the device identifier of the second Internet of Things device in the control packet and a device resolution table generated when the ad hoc network is established to obtain a target encapsulation packet with the physical address of the second Internet of Things device, the target encapsulation packet is sent to a server, the server sends the target encapsulation packet to the second Internet of Things device, and remote control of the second Internet of Things device is realized;

[0034] The service end is used for receiving a target encapsulation packet, decrypting the target encapsulation packet based on a session key to obtain a decrypted encapsulation packet, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network, the target encapsulation packet is obtained by encapsulating a control packet by the first Internet of Things device based on the device identifier of the second Internet of Things device in the control packet and a device resolution table generated when the ad hoc network is established, the control packet is generated by the first Internet of Things device in response to a control instruction for the second Internet of Things device, and the session key is obtained by negotiation with the first Internet of Things device, and the decrypted encapsulation packet is sent to the second Internet of Things device based on the physical address in the decrypted encapsulation packet, so as to realize remote control of the second Internet of Things device.

[0035] In addition, to achieve the above object, the application further provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the Internet of Things device remote control method.

[0036] In addition, to achieve the above object, the application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the Internet of Things device remote control method.

[0037] The one or more technical solutions provided by the application have at least the following technical effects:

[0038] The application generates a control packet in response to a control instruction for a second Internet of Things device, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network, the control packet is encapsulated based on the device identifier of the second Internet of Things device in the control packet and a device resolution table generated when the ad hoc network is established, to obtain a target encapsulation packet with the physical address of the second Internet of Things device, and the target encapsulation packet is sent to a service end, so that the target encapsulation packet can be sent to the second Internet of Things device through the service end, and remote control of the second Internet of Things device is realized.

[0039] Since the first Internet of Things device and the second Internet of Things device are connected through the ad hoc network, a unified communication protocol can be used for the Internet of Things devices in the network connection, the target encapsulation message with the physical address of the second Internet of Things device can be sent to the second Internet of Things device through the server by encapsulating the control message into the target encapsulation message, and since the information transmission uses a unified communication information, the second Internet of Things device can directly analyze the control message in the target encapsulation message, so that the first Internet of Things device can realize remote control of the second Internet of Things device through the control message, without additional information encapsulation and information analysis program, thereby avoiding additional program development cost. BRIEF DESCRIPTION OF DRAWINGS

[0040] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0042] Figure 1 A flowchart is provided for the first embodiment of the Internet of Things device remote control method of the present application;

[0043] Figure 2 A first scene diagram is provided for the first embodiment of the Internet of Things device remote control method of the present application;

[0044] Figure 3 A second scene diagram is provided for the first embodiment of the Internet of Things device remote control method of the present application;

[0045] Figure 4 A flowchart is provided for the second embodiment of the Internet of Things device remote control method of the present application;

[0046] Figure 5 A flowchart is provided for the third embodiment of the Internet of Things device remote control method of the present application;

[0047] Figure 6 A structure diagram of the Internet of Things device remote control platform of the present application embodiment is provided.

[0048] The object implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0049] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.

[0050] In order to better understand the technical solutions of the present application, the following will be described in detail in combination with the accompanying drawings and specific embodiments.

[0051] It should be noted that the execution subject of the present embodiment can be a computing service device with message processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a message transmission device, etc. capable of realizing the above functions. Hereinafter, the message transmission device will be taken as an example to describe the present embodiment and the following embodiments.

[0052] Based on this, the present embodiment provides a remote control method for Internet of Things devices, which is described in detail with reference to Figure 1 , Figure 1 The flowchart of the first embodiment of the remote control method for Internet of Things devices of the present application is shown in the figure.

[0053] In the present embodiment, the remote control method for Internet of Things devices comprises steps S10-S30:

[0054] Step S10, in response to the control instruction for the second Internet of Things device, a control message is generated, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network.

[0055] It can be understood that the current Internet of Things message transmission generally adopts a message publishing / subscription transmission protocol based on a client-server architecture, such as the MQTT (Message Queuing Telemetry Transport) protocol, which is described in detail with reference to Figure 2 . This transmission protocol only supports string type information transmission and does not support complex data types. There may be message duplication and message loss in the information transmission process, and the information transmission does not involve the specific content and format of the information. For Internet of Things devices in different network environments and with different functions, additional information encapsulation and information analysis programs are required to process the information to be received and sent, so as to realize the remote control of the Internet of Things devices, resulting in additional program development costs.

[0056] It should be noted that the server is a system or platform specially used for managing and monitoring Internet of Things devices, which is mainly used for information transmission in the present embodiment. The first Internet of Things device is the Internet of Things device that sends the control instruction, and the second Internet of Things device is the target Internet of Things device that receives the control instruction.

[0057] Different from the traditional way of controlling all the Internet of Things devices by the server, in the embodiment, the control instruction of the Internet of Things device is sent from the first Internet of Things device to the second Internet of Things device in a self-organizing network in a different place. Different control instructions generate different control messages, and the second Internet of Things device is controlled by the control message.

[0058] Specifically, the devices A and B in the locations A and B far away from each other are connected by the self-organizing network. The overall manufacturing efficiency of the Internet of Things devices in the two locations needs to be higher than a preset value. When the manufacturing efficiency of the device A is lower than the preset value, the device A sends a control instruction for improving the manufacturing efficiency to the device B, generates a corresponding control message, and controls the device B to improve the manufacturing efficiency by the control message, so that the overall manufacturing efficiency is higher than the preset value.

[0059] In step S20, the control message is encapsulated based on the device identifier of the second Internet of Things device in the control message and the device resolution table generated when the self-organizing network is generated, to obtain a target encapsulation message with the physical address of the second Internet of Things device.

[0060] It should be noted that in the embodiment, the target Internet of Things device to be controlled is determined by the device identifier such as the device code of the Internet of Things device, and the physical address and the virtual address of the specific target Internet of Things device are obtained by the device resolution table.

[0061] The device resolution table is a table for recording the relationship between the device code, the virtual IP (Internet Protocol) address and the physical address of each Internet of Things device.

[0062] It can be understood that by determining the device code of the target Internet of Things device, the virtual address and the physical address of the target Internet of Things device can be determined by the device resolution table, so that the control message can be sent to the target Internet of Things device.

[0063] In order to ensure the reliability and efficiency of the message in the transmission process, the data needs to be encapsulated. Since the virtual address and the physical address of the target Internet of Things device can be determined by the device resolution table, the control message is encapsulated into a message with the physical address of the target Internet of Things device in the process of message transmission, so that the control message can be accurately sent to the target Internet of Things device.

[0064] In a feasible implementation, the specific implementation of encapsulating the control message based on the device identifier of the second Internet of Things device in the control message and the device resolution table generated when the self-organizing network is generated can also be:

[0065] Extract the virtual address corresponding to the device identifier and the physical address in the device resolution table of the device, encapsulate the control message based on the virtual address to obtain a preliminary encapsulation message with the virtual address of the second Internet of Things device, and encapsulate the preliminary encapsulation message based on the physical address to obtain a target encapsulation message with the physical address of the second Internet of Things device.

[0066] It should be noted that the preliminary encapsulation message has a virtual IP address of the second Internet of Things device, and the target encapsulation message has a physical address of the second Internet of Things device, which is used for data transmission within the same local area network. By using the physical address, the control message can be accurately sent to the target Internet of Things device.

[0067] The process of encapsulating the message data into a first encapsulation message is performed by the sending process of the first Internet of Things device, and the process of encapsulating the preliminary encapsulation message into a target encapsulation message is performed by first sending to a Tun (network tunnel, Tunnel) network card device and then by a client networking program. Refer to Figure 3 The Tun network card device is a virtual network interface that can be used to create and process IP packets.

[0068] It can be understood that the client networking program is a user-side program, and if the encrypted message data is processed through the client networking program, the message data usually needs to pass through a physical network interface. However, by using the Tun card, the user space program can directly read and write IP packets without passing through the physical network interface, thereby improving the stability and security of the transmission process.

[0069] In step S30, the target encapsulation message is sent to the server, so that the server sends the target encapsulation message to the second Internet of Things device, thereby realizing remote control of the second Internet of Things device.

[0070] It should be noted that the sending of the target encapsulation message is performed by a network card in the first Internet of Things device that can access the Internet.

[0071] It can be understood that the first Internet of Things device and the second Internet of Things device of the embodiment are Internet of Things devices located in different places and cannot transmit information by direct transmission, therefore, a network card that can access the Internet is needed to transmit information through the Internet.

[0072] It should also be noted that the server has an Internet networking server program and a DNS (Domain Name System) service. The Internet networking server is used for centralized management of Internet of Things devices in the Internet of Things, and the DNS (Domain Name System, Domain Name System) service is used for an Internet of Things device to query the corresponding virtual IP address and physical address through device coding.

[0073] It can be understood that, based on the physical address of the second Internet of Things device in the encapsulated message data, it can be determined to which Internet of Things device the message data needs to be sent, and the Internet of Things devices can be in different network environments, and direct communication can encounter network connection problems. Therefore, the server needs to be used as an intermediary for information transmission.

[0074] In a possible implementation, the implementation of the method can also be:

[0075] When the connection state between the second Internet of Things device changes, state change information is sent to the server for updating the device resolution table based on the state change information, and when the connection state confirmation request sent by the server is received, connection state information is fed back to the server, wherein the connection confirmation request is sent to the local by the server every preset first time period.

[0076] It should be noted that the state change information includes the case that a certain Internet of Things device is connected to other Internet of Things devices, and the case that a certain Internet of Things device is disconnected from other Internet of Things devices.

[0077] It can be understood that, unlike Internet communication, the Internet of Things environment usually involves Machine to Machine (M2M) communication, and the machine devices in the Internet of Things environment need to continuously or intermittently communicate with other devices. When the connection state of the networking Internet of Things device changes, it can affect other Internet of Things devices, and therefore, the device resolution table is updated based on the connection state change of the Internet of Things device.

[0078] The device resolution table recording the virtual IP address and device code and other information of the Internet of Things device is generated and updated by the server. The server synchronizes the generated device resolution table to the DNS service, so that the first Internet of Things device can query the corresponding device virtual IP address and physical address when sending messages.

[0079] When a certain Internet of Things device is connected to other Internet of Things devices, or a certain Internet of Things device is disconnected from other Internet of Things devices, the Internet of Things device information in the device resolution table will be different from the actual Internet of Things device information. Therefore, the state change information needs to be sent to the server by the Internet of Things device for updating the device resolution table.

[0080] It should also be noted that the request information is used to confirm whether the Internet of Things device is still in the connection state, and the Internet of Things device usually feeds back the connection state information by sending a heartbeat packet.

[0081] It can be understood that the Internet of Things device will normally send its state change information to the server, but when the network connection of the device is suddenly interrupted, etc., the Internet of Things device cannot send its state change information to the server, and the server does not update the device resolution table because it does not receive the information sent by the Internet of Things device. Therefore, when receiving the request information sent by the server, the Internet of Things device needs to send feedback information for confirming the connection state to the server for updating the device resolution table.

[0082] In summary, the first Internet of Things device generates a control message in response to a control instruction for a second Internet of Things device, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network communication connection. Based on the device identifier of the second Internet of Things device in the control message and the device resolution table generated during ad hoc networking, the control message is encapsulated to obtain a target encapsulation message with the physical address of the second Internet of Things device. The target encapsulation message is sent to the server, so that the server can send the target encapsulation message to the second Internet of Things device, thereby realizing remote control of the second Internet of Things device.

[0083] Since the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network communication connection, a unified communication protocol can be used for Internet of Things devices in the network connection. By encapsulating the control message into a target encapsulation message with the physical address of the second Internet of Things device, the target encapsulation message can be sent to the second Internet of Things device through the server. Since the information transmission uses a unified communication protocol, the second Internet of Things device can directly parse the control message in the target encapsulation message, so that the first Internet of Things device can remotely control the second Internet of Things device through the control message without additional information encapsulation and information parsing procedures, thereby avoiding additional program development costs.

[0084] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above-mentioned first embodiment can be referred to the above introduction, and will not be repeated hereinafter. On this basis, please refer to Figure 4 , after the step of generating a control message in response to a control instruction for a second Internet of Things device, the steps S11-S14 are further included:

[0085] Step S11, initiating a connection request to the server;

[0086] It should be noted that the message transmission mode based on the client-server message publishing / subscription transmission protocol is that the client publishing the message to the server includes a topic in the published message, the client wanting to receive the message subscribes to the topic, and the server sends the information to all clients subscribing to the topic after receiving the information published by the client to the topic.

[0087] The data transmitted by the above message transmission mode is not encrypted by default, and there is no strict control on which client can subscribe to which topic, and malicious users may listen to sensitive information or publish false messages to specific topics. Therefore, the security of the message transmission of the Internet of Things device using the client-server is low, and the message transmission program needs to be adapted and modified, resulting in high implementation complexity.

[0088] It can be understood that the message transmission may cause problems such as data being intercepted or tampered with by a man-in-the-middle, and the security of data transmission needs to be ensured by establishing a secure transmission channel, so first, a connection request needs to be initiated to the server to perform subsequent identity authentication and information encryption and other operations that can improve the security of information transmission.

[0089] In step S12, the service end is authenticated based on the received first identity authentication certificate of the service end, wherein the first identity authentication certificate is sent to the local by the server after receiving the local connection request;

[0090] It should be noted that the first identity authentication certificate is used by the first Internet of Things device to verify the identity of the service, and in this embodiment, the verification method can be TLS (Transport Layer Security) and SSL (Secure Sockets Layer) authentication method.

[0091] It can be understood that ordinary data transmission emphasizes the confidentiality and integrity of user data in a virtual network to prevent sensitive information from being leaked, and in the process of interaction of multiple Internet of Things devices, if the sent route is tampered with, it may have a great impact on remote control, causing the Internet of Things device to malfunction, therefore, in addition to ensuring the confidentiality and integrity of the data, the service end is authenticated by the identity authentication certificate for the data transmission between the Internet of Things devices.

[0092] Specifically, when the first Internet of Things device sends a message, it may send the message to other devices due to problems such as tampering with the sent route. Therefore, before sending the message, it is necessary to verify whether the target of the message sending is correct, therefore, the identity of the service end needs to be verified through the first identity authentication certificate of the service end.

[0093] Step S13, in response to the service end sending an identity authentication request, send the local second identity authentication certificate to the service end for the service end to authenticate the local identity, wherein the identity authentication request is sent to the local after successfully authenticating the identity of the service end;

[0094] It should be noted that the second identity authentication certificate is used for the service end to authenticate the identity of the first Internet of Things device.

[0095] It can be understood that only the first identity authentication certificate can allow the first Internet of Things device to authenticate the identity of the service end, but the service end cannot determine whether the identity of the first Internet of Things device is correct, which may cause the service end to receive incorrect messages. Therefore, after the first Internet of Things device successfully authenticates the identity of the service end, the identity of the first Internet of Things device needs to be authenticated by the second identity authentication certificate to ensure the security of information transmission.

[0096] Step S14, if the verification success information is received, an encrypted channel between the first Internet of Things device and the service end is established for message transmission based on the encrypted channel, wherein the verification success information is sent by the service end to the local after successfully authenticating the local identity.

[0097] It can be understood that the first Internet of Things device and the service end successfully authenticate the identity of each other, and both can correctly send and receive messages. Therefore, by establishing an encrypted channel for message transmission between the first Internet of Things device and the service end, the messages transmitted in the encrypted channel cannot be intercepted, ensuring the security of message transmission.

[0098] In a feasible implementation, after the step of authenticating the identity of the service end based on the received first identity authentication certificate of the service end, the implementation can also be:

[0099] Based on the asymmetric encryption algorithm, a key exchange is performed with the server to obtain a symmetric encryption session key, wherein after the step of encapsulating the control message based on the virtual address to obtain the preliminary encapsulation message with the virtual address of the second Internet of Things device, the implementation further includes:

[0100] Based on the session key, the preliminary encapsulation message is encrypted to obtain an encrypted preliminary encapsulation message.

[0101] It can be understood that in the process of message transmission, there may be a case that a third party modifies the message, causing the message received by the service end to be different from the message sent by the first Internet of Things device,

[0102] Therefore, it is necessary to encrypt the process of message transmission to ensure that only the first Internet of Things device and the receiving end can decrypt the information. The encryption and decryption of message data is usually based on the session key of both parties.

[0103] The session key is a temporary encryption key used to protect data transmission between two communication entities during a specific session. The session key is usually negotiated by the sender and the receiver. Since the negotiated session key may also be intercepted or tampered with, in order to further increase the security of message transmission, the negotiation process of the session key also needs to be encrypted.

[0104] The embodiment uses an asymmetric encryption method to encrypt the key negotiation process. Asymmetric encryption encrypts by generating a public key and a private key. The embodiment is illustrated by the RSA (Rivest-Shamir-Adleman) asymmetric encryption method.

[0105] When encrypting the key by RSA, the server will first generate a public key and a private key. The public key and the private key are reciprocal. Information encrypted by the public key can only be decrypted by the private key, and information encrypted by the private key can only be decrypted by the public key. The public key will be sent by the server to the first Internet of Things device. The first Internet of Things device will randomly generate a session key and encrypt it by the public key. The encrypted session key will be sent by the first Internet of Things device to the server, and the server will decrypt it by the private key to obtain the session key. Therefore, by using the asymmetric encryption method, the security of the key negotiation process can be ensured.

[0106] After key negotiation by the asymmetric encryption method, both the sender and the receiver of the message data obtain the key for encrypting and decrypting the data. Therefore, during the message transmission process, the symmetric encryption session key is obtained by performing key exchange with the server based on the asymmetric encryption algorithm.

[0107] It can be understood that ordinary data transmission mainly uses general-purpose computing devices such as computers, laptops, smartphones, and tablets. These devices usually have high computing power and large storage space. The Internet of Things includes various types of embedded devices such as sensors, actuators, and other special-purpose hardware. These devices often have limited resources and limited computing power. Therefore, when transmitting information between Internet of Things devices, the complexity of the calculation needs to be reduced.

[0108] Specifically, since the asymmetric encryption can improve the security of the key agreement process, but the complexity of the calculation is high, and the processing speed is relatively slow. Therefore, after the key agreement and the message transmission connection are completed at the sending end and the receiving end, the symmetric encryption algorithm with low complexity of calculation is used to encrypt the message data to be transmitted in the embodiment, so as to improve the efficiency of the message transmission while ensuring the security of the message transmission. Therefore, the preliminary encapsulated message is encrypted by the symmetric encryption method based on the session key, and the encrypted preliminary encapsulated message is obtained.

[0109] In summary, the message transmission connection between the first Internet of Things device and the server is established by bidirectional authentication in the embodiment, the session key between the first Internet of Things device and the server is determined based on the asymmetric encryption algorithm, and the transmitted message is encrypted based on the session key.

[0110] The message transmission may cause problems such as message interception or tampering by an intermediate person. The message interception usually occurs in the process of transmitting the message data from the sending end to the receiving end, and the message tampering is usually caused by the fact that the message is not encrypted, and the message tampered by the intermediate person can still be received by the receiving end. By establishing the message transmission connection between the first Internet of Things device and the server, the message interception can be prevented, the session key for message encryption can be determined, the message tampering can be prevented by encrypting the message, and based on the asymmetric encryption algorithm, the session key between the first Internet of Things device and the server can be determined, and the security of the message transmission can be further improved. Therefore, the message in the transmission process is encrypted, and the message transmission connection is established, so that the confidentiality, integrity and availability of the data transmission are ensured.

[0111] Based on this, the third embodiment of the present application further provides an Internet of Things device remote control method, referring to Figure 5 , Figure 5 is a flowchart of the third embodiment of the Internet of Things device remote control method of the present application; the same or similar content as the above-mentioned first embodiment and second embodiment can be referred to the above introduction, and will not be described in detail hereinafter.

[0112] The Internet of Things device remote control method is applied to a server, and the method comprises steps H10-H20.

[0113] Step H10, receiving a target encapsulation packet, decrypting the target encapsulation packet based on a session key to obtain a decrypted encapsulation packet, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network, the target encapsulation packet is obtained by the first Internet of Things device based on the device identifier of the second Internet of Things device in the control packet and the device resolution table generated when the ad hoc network is generated, and the control packet is obtained by the first Internet of Things device based on the device identifier of the second Internet of Things device in the control packet and the device resolution table generated when the ad hoc network is generated, and the control packet is generated by the first Internet of Things device in response to the control instruction of the second Internet of Things device, and the session key is obtained by the first Internet of Things device and the server.

[0114] It can be understood that the encrypted packet needs to be decrypted to obtain the information therein, and the target encapsulation packet received by the server is a packet encrypted by the first Internet of Things device, and the key for encrypting the target encapsulation packet is obtained by the first Internet of Things device and the server. Therefore, the server can decrypt the target encapsulation packet by using the session key obtained by negotiation, and obtain the information therein.

[0115] Step H20, sending the decrypted encapsulation packet to the second Internet of Things device based on the physical address in the decrypted encapsulation packet to achieve remote control of the second Internet of Things device.

[0116] It can be understood that the server can obtain the physical address information in the target encapsulation packet after decrypting the target encapsulation packet, and the server can confirm the second Internet of Things device through the physical address information. Since the server has a route from the server to each Internet device, after determining the second Internet of Things device, the server can send the packet to the network card of the second Internet of Things device through the route, so that the second Internet of Things device can analyze the packet, and run based on the analyzed control packet, thereby achieving remote control of the second Internet of Things device.

[0117] In a possible implementation, the method can also be implemented as follows:

[0118] Every preset first time interval, a connection state confirmation request is sent to the Internet of Things device, whether the connection state information fed back by the Internet of Things device is received within a preset second time interval, whether the corresponding Internet of Things device is in a connection state is judged, if the connection state information is not received within the preset second time interval, it is judged that the corresponding Internet of Things device is not in a connection state, and the device resolution table is updated based on the judgment result.

[0119] It should be noted that the preset first time interval is the time interval at which the server sends a request to each Internet of Things device, and the preset second time interval is used to determine whether the Internet of Things device is in a connection state.

[0120] It can be understood that when the connection state of the Internet of Things device changes, there may be a network connection interruption and the like, so that the Internet of Things device cannot send the state change information to the server. Therefore, the server needs to send request information every fixed time period to confirm the state of each Internet of Things device.

[0121] After the server sends the request information, if the Internet of Things device can send feedback information back to the server within a preset second time period, the server determines that the Internet of Things device is still in a connection state. Otherwise, the server determines that the Internet of Things device is not in a connection state.

[0122] According to the determination result, there may be a difference between the actual connection state of the Internet of Things device and the device state recorded in the device analysis table. Therefore, the server needs to update the device analysis table based on the determination result.

[0123] Specifically, the Internet of Things devices 1 to 6 are networked, the Internet of Things device 1 is disconnected from other Internet of Things devices due to network connection problems, and does not send the disconnection information to the server. After the preset first time period, the server sends request information to all Internet of Things devices in the network. The Internet of Things devices 2 to 5 in the connection state send feedback information back to the server, and the server confirms that the Internet of Things devices 2 to 5 are still in a connection state. After the preset second time period, the server does not receive feedback information from the Internet of Things device 1, so the server determines that the Internet of Things device 1 is not in a connection state, and updates the device analysis table according to the determination result.

[0124] As can be seen from the above, in this embodiment, the request information for confirming the connection state is sent to each networked device every preset first time period, whether the feedback information of the networked device is received within the preset second time period is determined to determine whether the corresponding networked device is in a connection state, if the feedback information of the networked device cannot be received within the preset second time period, it is determined that the corresponding networked device is not in a connection state, and the device analysis table is updated based on the determination result.

[0125] When the connection state of the Internet of Things device changes, the Internet of Things device may not be able to send the state change information to the server, the server needs to send request information every fixed time period to confirm the state of each Internet of Things device. The actual state of each Internet of Things device may be different from that recorded in the device analysis table, and the server needs to update the device analysis table according to the determination result of the connection state of the Internet of Things device. Therefore, in this embodiment, the device analysis table is updated by the request information of the server and the feedback information of the Internet of Things device, so as to ensure the accuracy of confirming the corresponding virtual IP address according to the device name.

[0126] It should be noted that the above examples are only used for understanding the present application and do not constitute a limitation on the remote control method of the Internet of Things device of the present application, and more forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0127] The present application also provides a remote control platform for Internet of Things devices, please refer to Figure 6 , the remote control platform for Internet of Things devices comprises:

[0128] The first Internet of Things device 10 is configured to generate a control message in response to a control instruction for a second Internet of Things device, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network communication network, and the control message is encapsulated based on a device identifier of the second Internet of Things device in the control message and a device resolution table generated when the ad hoc network is formed, to obtain a target encapsulated message with a physical address of the second Internet of Things device, and the target encapsulated message is sent to a server, so that the server sends the target encapsulated message to the second Internet of Things device, thereby realizing remote control of the second Internet of Things device.

[0129] The server 20 is configured to receive a target encapsulated message, decrypt the target encapsulated message based on a session key, and obtain a decrypted encapsulated message, wherein the first Internet of Things device and the second Internet of Things device are connected through an ad hoc network communication network, the target encapsulated message is obtained by encapsulating a control message based on a device identifier of the second Internet of Things device in the control message and a device resolution table generated when the ad hoc network is formed, the control message is generated by the first Internet of Things device in response to a control instruction for the second Internet of Things device, the session key is obtained by negotiation with the first Internet of Things device, and the decrypted encapsulated message is sent to the second Internet of Things device based on a physical address in the decrypted encapsulated message, thereby realizing remote control of the second Internet of Things device.

[0130] The present application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the remote control method of the Internet of Things device in the above embodiments.

[0131] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), and the like, or any suitable combination of the above.

[0132] The above computer readable storage medium can be included in a message transmission device, or can exist separately without being assembled into a message transmission device.

[0133] The above computer readable storage medium carries one or more programs, which, when executed by the message transmission device, cause the message transmission device to perform the above Internet of Things device remote control method.

[0134] Computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as "C" or similar programming languages. Program code can be executed entirely on a user computer, partially on a user computer, as a separate software package, partially on a user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).

[0135] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0136] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.

[0137] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the above-mentioned Internet of Things device remote control method, and can solve the technical problem that the processing program for receiving and sending messages needs to be modified when performing remote control of the Internet of Things device. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the Internet of Things device remote control method provided by the above-mentioned embodiments, which will not be described here.

[0138] The present application also provides a computer program product comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned Internet of Things device remote control method.

[0139] The computer program product provided by the present application can solve the technical problem that the processing program for receiving and sending messages needs to be modified when performing remote control of the Internet of Things device. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the Internet of Things device remote control method provided by the above-mentioned embodiments, which will not be described here.

[0140] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A method for remote control of an Internet of Things (IoT) device, characterized in that, Applied to a first Internet of Things (IoT) device, the method includes: In response to a control command to a second IoT device, a control message is generated, wherein the first IoT device and the second IoT device are connected via an ad hoc network, and the control command is sent from the first IoT device to the second IoT device, which is located in a different location and is in the ad hoc network. Based on the device identifier of the second IoT device in the control message and the device resolution table generated during self-organizing network, the control message is encapsulated to obtain a target encapsulated message with the physical address of the second IoT device. The device resolution table is a table used to record the relationship between the device code, virtual address and physical address of each IoT device. The step of encapsulating the control message based on the device identifier of the second IoT device in the control message and the device resolution table generated during self-organizing network includes: Extract the virtual address and physical address corresponding to the device identifier in the device resolution table; Based on the virtual address, the control message is encapsulated to obtain a preliminary encapsulated message with the virtual address of the second IoT device; The initially encapsulated message is sent to the network tunnel; In the network tunnel, based on the physical address and the preset client networking program, the preliminary encapsulated message is encapsulated to obtain a target encapsulated message with the physical address of the second IoT device; The target encapsulated message is sent to the server, so that the server can send the target encapsulated message to the second IoT device, thereby realizing remote control of the second IoT device.

2. The method as described in claim 1, characterized in that, After the step of generating a control message in response to a control command to the second IoT device, the method further includes: Initiate a connection request to the server; The server is authenticated based on the first authentication certificate received from the server, wherein the first authentication certificate is sent to the local machine by the server after receiving the connection request from the local machine; In response to an authentication request sent by the server, a local second authentication certificate is sent to the server for the server to verify the local identity. The authentication request is sent by the server to the local machine after the server has successfully verified the identity of the local machine. If a successful verification message is received, an encrypted channel is established between the server and the local machine for message transmission. The successful verification message is sent by the server to the local machine after successfully verifying the local identity.

3. The method as described in claim 2, characterized in that, After the step of authenticating the server based on the received first authentication certificate of the server, the method further includes: Based on an asymmetric encryption algorithm, a key exchange is performed with the server to obtain a symmetric encryption session key; The step of encapsulating the control message based on the virtual address to obtain a preliminary encapsulated message with the virtual address of the second IoT device further includes: Based on the session key, the initial encapsulated message is encrypted to obtain the encrypted initial encapsulated message.

4. The method as described in claim 1, characterized in that, The method further includes: When the connection status with the second IoT device changes, the status change information is sent to the server so that the server can update the device resolution table based on the status change information. When a connection status confirmation request is received from the server, connection status information is fed back to the server. The connection confirmation request is sent to the local machine by the server at preset first time intervals.

5. A method for remote control of an Internet of Things (IoT) device, characterized in that, When applied to the server side, the method includes: The system receives a target encapsulated message, decrypts it based on a session key, and obtains a decrypted encapsulated message. The first IoT device and the second IoT device communicate via an ad hoc network. The target encapsulated message is generated by the first IoT device extracting the virtual address and physical address based on the device identifier of the second IoT device in the control message and a device resolution table generated during ad hoc networking. Based on the virtual address, the control message is encapsulated to obtain a preliminary encapsulated message with the virtual address of the second IoT device. This preliminary encapsulated message is sent to a network tunnel. In the network tunnel, the preliminary encapsulated message is further encapsulated based on the physical address and a preset client networking program. The device resolution table records the relationship between the device code, virtual address, and physical address of each IoT device. The control message is generated by the first IoT device in response to a control command to the second IoT device. The session key is negotiated with the first IoT device. The control command is sent from the first IoT device to the second IoT device, which is located in a different ad hoc network. Based on the physical address in the decrypted and encapsulated message, the decrypted and encapsulated message is sent to the second IoT device to realize remote control of the second IoT device, wherein the local device has a route from the local device to each IoT device.

6. The method as described in claim 5, characterized in that, The method further includes: Every preset first time interval, a connection status confirmation request is sent to the IoT device; Based on whether the connection status information fed back by the IoT device is received within the preset second time period, it is determined whether the corresponding IoT device is in a connected state. If the connection status information is not received within the preset second time period, it is determined that the corresponding IoT device is not in a connected state. Based on the judgment result, the device resolution table is updated.

7. A remote control platform for Internet of Things (IoT) devices, characterized in that, The IoT device remote control platform includes a first IoT device and a server: A first IoT device generates a control message in response to a control command to a second IoT device. The first and second IoT devices are connected via an ad hoc network. The control command is sent from the first IoT device to the second IoT device, which is located in a different area within the ad hoc network. Based on the device identifier of the second IoT device in the control message and a device resolution table generated during ad hoc networking, the control message is encapsulated to obtain a target encapsulated message containing the physical address of the second IoT device. The device resolution table is used to record the relationship between the device code, virtual address, and physical address of each IoT device. Based on the device identifier of the second IoT device in the control message, and... The steps for encapsulating the control message in the device resolution table generated during self-organizing network formation include: extracting the virtual address and physical address corresponding to the device identifier in the device resolution table; encapsulating the control message based on the virtual address to obtain a preliminary encapsulated message with the virtual address of the second IoT device; sending the preliminary encapsulated message to the network tunnel; encapsulating the preliminary encapsulated message based on the physical address and a preset client networking program in the network tunnel to obtain a target encapsulated message with the physical address of the second IoT device; and sending the target encapsulated message to the server so that the server can send the target encapsulated message to the second IoT device to realize remote control of the second IoT device. The server receives the target encapsulated message, decrypts it based on a session key, and obtains a decrypted encapsulated message. The first IoT device and the second IoT device are connected via an ad hoc network. The target encapsulated message is obtained by the first IoT device encapsulating a control message based on the device identifier of the second IoT device in the control message and a device resolution table generated during ad hoc networking. The device resolution table records the relationship between the device codes, virtual addresses, and physical addresses of each IoT device. The control message is generated by the first IoT device in response to a control command to the second IoT device. The session key is negotiated with the first IoT device. The control command is sent from the first IoT device to the second IoT device, which is located in a different area within the ad hoc network. Based on the physical address in the decrypted encapsulated message, the server sends the decrypted encapsulated message to the second IoT device to achieve remote control of the second IoT device. The local machine has routes from the local machine to each IoT device.

8. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the remote control method for IoT devices as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the remote control method for an Internet of Things device as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Wireless ad hoc network system

    CN111065093A

  • Secure transmission method and system based on SM2 key negotiation mechanism

    CN113079022A

  • Big data analysis method based on Internet of Things

    CN113518072A

  • Internet of Things communication method and device, equipment and storage medium

    CN117793164A

  • Data interaction method, device and system and storage medium

    CN118413565A