Internet of things communication method and device

By using Bluetooth chips in IoT devices to establish encrypted data channels with terminal devices, the problems of high operation and maintenance costs and insufficient security of IoT devices are solved, and safe and efficient operation and maintenance data transmission is achieved.

WO2024198738A1PCT designated stage expired Publication Date: 2024-10-03HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/076298
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-31
Filing Date
2024-02-06
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

The operation and maintenance cost of IoT devices is high and the operation and maintenance methods are dangerous. Especially for off-ground equipment, the serial port operation and maintenance method is not conducive to ensuring the safety of operation and maintenance personnel.

Method used

By setting up a Bluetooth chip in the IoT device to establish an encrypted data channel with the terminal device, and using the DTLS protocol to negotiate the session key, encrypted data transmission is achieved, reducing operation and maintenance costs and improving security.

Benefits of technology

It effectively reduces the operation and maintenance costs of IoT devices, improves the safety of operation and maintenance personnel, and ensures the security and reliability of data transmission through encrypted data channels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024076298_03102024_PF_FP_ABST
    Figure CN2024076298_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are an Internet of Things (IoT) communication method and device, which are used for reducing the operation and maintenance cost of an IoT device, and ensuring the safety of operation and maintenance personnel. The method can be applied to a master control CPU in an IoT device, wherein the master control CPU can be connected to a Bluetooth chip, a Bluetooth connection is established with a terminal device by means of the Bluetooth chip, an encrypted data channel based on a DTLS protocol is established with the terminal device on the basis of the Bluetooth connection, and then user data is transmitted in the encrypted data channel. In this way, even if the Bluetooth chip cannot establish an encrypted Bluetooth connection with the terminal device, the user data is transmitted by means of the encrypted data channel, such that the security of the user data is ensured. The encrypted data channel may be an encrypted data channel based on a TLS protocol or the DTLS protocol, which channel is established on the basis of PSK negotiation.
Need to check novelty before this filing date? Find Prior Art

Description

Internet of Things communication method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 31, 2023, with application number 202310363392.7 and invention name “A Method and Device for Internet of Things Communication”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to an Internet of Things communication method and device. Background Art

[0003] The IoT system contains a large number of IoT devices with limited capabilities or resources. Due to low configuration or limited power supply, these IoT devices generally have low traffic, low speed, low power consumption, and low cost. Currently, operations and maintenance personnel generally use serial port operations to operate IoT devices. For example, connecting a PC serial port to the IoT device serial port to transmit configuration data related to operations and maintenance.

[0004] As more and more IoT devices are deployed by businesses and individuals, operation and maintenance costs continue to rise. Furthermore, for devices located above ground, serial port operation and maintenance is highly risky and poses a risk to the safety of operators.

[0005] Summary of the Invention

[0006] The present application provides an Internet of Things communication method and device for reducing the operation and maintenance costs of Internet of Things devices and ensuring the safety of operation and maintenance personnel.

[0007] In the first aspect, the present application provides an Internet of Things communication method, which can be applied to a device. The present application does not limit the type of device. For example, the device may include a processor and a memory, and the processor executes the above method when running the instructions stored in the memory. The present application does not limit the performance of the device. For example, the device can be a low-power device. The device can be connected to a Bluetooth chip. The present application does not limit the connection method between the two. For example, the two can be connected through a serial port, and the serial port is, for example, a universal asynchronous receiver / transmitter (UART). The device and the Bluetooth chip can be set in the same device. For example, the two are set in the same Internet of Things (IoT) device. Optionally, the device may include a main control processor of the IoT device.

[0008] The IoT communication method is used to establish a transmission channel between the apparatus and a terminal device and transmit data in the transmission channel. The terminal device supports Bluetooth transmission technology. This application does not limit the type of terminal device. For example, the terminal device is a mobile smart terminal.

[0009] For the convenience of description, this application refers to the data transmitted during the process of establishing a transmission channel as control data, and the data transmitted in the transmission channel as user data.

[0010] The process of establishing a transmission channel may include: establishing a Bluetooth connection with a terminal device via a Bluetooth chip; and establishing an encrypted data channel using the Datagram Transport Layer Security (DTLS) protocol with the terminal device based on the Bluetooth connection. The process of transmitting user data in the transmission channel may include: transmitting data with the terminal device via the encrypted data channel.

[0011] In the aforementioned IoT communication method, the data transmitted via the encrypted data channel can be referred to as user data. This application does not limit the type of user data; for example, the user data can be the configuration data related to operation and maintenance mentioned in the background technology. In this way, operation and maintenance personnel can operate a terminal device to establish a Bluetooth connection with the Bluetooth chip of the IoT device. Based on this Bluetooth connection, the configuration data is transmitted between the terminal device and the main control processor of the IoT device, thereby reducing the operation and maintenance costs of the IoT device for the operation and maintenance personnel and ensuring their safety.

[0012] Furthermore, in the above method, the transmission channel includes not only the Bluetooth connection established by the Bluetooth chip, but also the encrypted data channel established between the apparatus and the terminal device over the Bluetooth connection. For example, the payload of the Bluetooth message transmitted between the Bluetooth chip and the terminal device can be encrypted user data. In this way, even if the Bluetooth chip cannot establish an encrypted Bluetooth connection with the terminal device, the encrypted data channel helps improve the security of user data.

[0013] Optionally, establishing a DTLS encrypted data channel with the terminal device based on the Bluetooth connection involves negotiating a session key for the encrypted data channel with the terminal device based on the Bluetooth connection. After the two parties have negotiated and determined the session key, they can use the session key to encrypt and transmit user data over the Bluetooth connection.

[0014] Transmitting data between the apparatus and the terminal device through the encrypted data channel includes: the apparatus sending data to the terminal device through the encrypted data channel, and / or the apparatus receiving data from the terminal device through the encrypted data channel.

[0015] The terminal device sending data through the encrypted data channel may include: the terminal device encrypting the data according to the session key to obtain first encrypted data, sending the first encrypted data to the device through the Bluetooth connection, and the device decrypting the first encrypted data according to the session key to obtain the data. Similarly, the device sending data through the encrypted data channel may include: the device encrypting the data according to the session key to obtain second encrypted data, sending the data to the terminal device through the Bluetooth connection, and the terminal device decrypting the second encrypted data according to the session key to obtain the data.

[0016] In order to ensure the security of the session key, the establishment of an encrypted data channel of the Data Packet Transport Layer Security (DTLS) protocol with the terminal device based on the Bluetooth connection may include: negotiating the configuration information of the pre-shared key (PSK) with the terminal device based on the Bluetooth connection; and negotiating the session key of the encrypted data channel with the terminal device based on the configuration information of the PSK.

[0017] After the device negotiates the configuration information for the pre-shared key (PSK) with the terminal device based on the Bluetooth connection, it can be considered that a trust relationship has been established between the device and the terminal device based on the PSK configuration information. That is, both parties have set the configuration information for verifying the trust relationship. The device can then negotiate a session key for an encrypted data channel with the device with this trust relationship (referred to as the trusted device) based on the PSK configuration information.

[0018] The configuration information of PSK may include a PSK-pair, and the PSK-pair may include a PSK and a pre-shared key identifier (PSK-ID). The present application does not limit the specific implementation process of negotiating the session key of the encrypted data channel with the terminal device based on the configuration information of the PSK. For example, the process can be understood with reference to the encryption suite related to PSK in the DTLS protocol. For example, the device and the terminal device can verify whether the other party is a trusted device based on the saved configuration information. If both parties pass the verification, the two parties can generate the session key of the encrypted data channel based on the saved PSK. If one or both parties fail the verification, the two parties can terminate the process of establishing the encrypted data channel.

[0019] Optionally, the terminal device may obtain a pre-shared key pair (PSK-pair) input by the user, and then send PSK configuration information to the device based on the PSK-pair. Accordingly, negotiating the PSK configuration information with the terminal device based on the Bluetooth connection includes: receiving and saving the configuration information sent by the terminal device via the Bluetooth connection.

[0020] Compared with pre-storing the PSK configuration information in the device before leaving the factory, the user sends the PSK configuration information to the device through the terminal device, which does not require the user to remember the factory settings, thereby simplifying user operations.

[0021] To prevent PSK configuration information from being eavesdropped, the device can control the Bluetooth chip to transmit Bluetooth signals at a lower transmit power before the terminal device and the device complete the channel establishment or before the trust relationship is established. To facilitate data exchange between the user and the device using the terminal device, the device can control the Bluetooth chip to transmit Bluetooth signals at a higher transmit power after the terminal device and the device complete the channel establishment or after the trust relationship is established.

[0022] For example, the method may also include: based on the configuration information of the PSK not saved, controlling the Bluetooth chip to transmit the Bluetooth signal at a first transmission power; based on the configuration information of the PSK saved, controlling the Bluetooth chip to transmit the Bluetooth signal at a second transmission power, wherein the first transmission power is less than the second transmission power.

[0023] This application does not limit the type of user data. In some examples, the user data sent by the terminal device to the apparatus may be a request sent by the client to the server, and the user data sent by the apparatus to the terminal device may be a response sent by the server to the request.

[0024] Assuming that the device is used to provide one or more services (referred to as target services) for a terminal device, the device can be considered as a server and the terminal device as a client. User data can be data related to the target service exchanged between the server and the client. Alternatively, user data is data (referred to as management data) exchanged between the client and the server during the process of the user managing the server through the client. For example, management data may include at least one of configuration data, status data, remote procedure call (RPC), and notification data exchanged between the client and the server. In some examples, the device and the terminal device support the network configuration protocol NETCONF, and are respectively the server and client of the protocol, and user data is data exchanged between the client and the server of the NETCONF protocol.

[0025] Optionally, the user data is data modeled using a target modeling language. For example, the target modeling language is used to support the complete description of data between a client and a server of the NETCONF protocol. Optionally, the target modeling language is a YANG model or a thing model.

[0026] The Bluetooth chip may be a Bluetooth low energy (BLE) chip. BLE chips have the advantage of low power consumption, but the maximum payload size of a BLE message is relatively small, for example, typically 244 bytes. The data output by the target modeling language is typically a larger file, such as a JavaScript Object Notation (JSON) file (or JSON data) or an Extensible Markup Language (XML) file (or XML data), which is much larger than the maximum payload size of a Bluetooth message.

[0027] To facilitate the Bluetooth chip's reception of data sent by a terminal device, the terminal device, after encrypting the first encrypted data, may fragment the first encrypted data to obtain and transmit multiple first data blocks via the Bluetooth connection. Accordingly, the apparatus receiving data sent by the terminal device via the encrypted data channel may include: receiving the multiple first data blocks sent by the terminal device via the Bluetooth chip; packetizing the multiple first data blocks to obtain first encrypted data; and decrypting the first encrypted data using the session key of the encrypted data channel to obtain the data.

[0028] To facilitate the Bluetooth chip transmitting data to the terminal device, transmitting data to the terminal device via the encrypted data channel includes: encrypting the data using the session key of the encrypted data channel to obtain second encrypted data; fragmenting the second encrypted data to obtain multiple second data blocks; and transmitting the multiple second data blocks separately via the Bluetooth chip. Accordingly, the terminal device can receive the multiple second data blocks separately via the Bluetooth connection, group the multiple second data blocks together to obtain second encrypted data, and decrypt the second encrypted data using the session key of the encrypted data channel to obtain the data.

[0029] In some examples, stream data (e.g., UART data) is transmitted between the device and the Bluetooth chip via a serial port. Since the Bluetooth chip cannot control the time interval between the arrival of multiple first data blocks at the Bluetooth chip, in order to optimize the transmission performance between the Bluetooth chip and the device (e.g., reduce transmission delay), the Bluetooth chip may continuously send multiple first data blocks via the serial port. Then, the first stream data received by the device via the serial port may include stream data corresponding to the multiple first data blocks. The device may decompose the first stream data into multiple first data blocks, and then group the multiple first data blocks to obtain first encrypted data, and use the session key of the encrypted data channel to decrypt the first encrypted data to obtain the data.

[0030] In order to facilitate the device to disassemble multiple first data blocks from the first stream data, the Bluetooth chip can add a frame header (called a framing frame header) to the first data block to instruct the device to determine the corresponding data block from the first stream data. The device can disassemble multiple first data blocks from the first stream data based on the framing frame header of the first data block.

[0031] Optionally, if the device sends multiple second data blocks to the Bluetooth chip through the serial port, in order to optimize the transmission performance between the Bluetooth chip and the device (for example, reduce transmission delay), the device can merge the multiple second data blocks into second stream data and send the second stream data to the Bluetooth chip through the serial port.

[0032] In order to facilitate the Bluetooth chip to disassemble multiple second data blocks from the second stream data, the device can add a frame header (called a framing frame header) to the second data block to instruct the Bluetooth chip to determine the corresponding data block from the second stream data. The device can disassemble multiple second data blocks from the second stream data based on the framing frame header of the second data block.

[0033] Optionally, in order to improve the reliability of data transmission in the encrypted data channel, after sending the data to the terminal device through the encrypted data channel, the method further includes: repeatedly sending the data to the terminal device through the encrypted data channel.

[0034] In the second aspect, the present application provides an Internet of Things communication method, which is applied to a communication system, wherein the communication system includes a first terminal device and a second terminal device, the second terminal device includes a device and a Bluetooth chip, and the device is connected to the Bluetooth chip, and is characterized in that it includes: the device establishes a Bluetooth connection with the first terminal device through the Bluetooth chip; the device establishes an encrypted data channel of the DTLS protocol with the first terminal device based on the Bluetooth connection; the first terminal device transmits data with the device through the encrypted data channel.

[0035] In some examples, the communication system is an IoT system, and the second terminal device may be an IoT device.

[0036] In some examples, the operations performed by the first terminal can be understood with reference to the operations performed by the terminal device mentioned in the first aspect or any possible implementation of the first aspect, the operations performed by the device can be understood with reference to the operations performed by the device mentioned in the first aspect or any possible implementation of the first aspect, and the operations performed by the Bluetooth chip can be understood with reference to the operations performed by the Bluetooth chip mentioned in the first aspect or any possible implementation of the first aspect.

[0037] In the third aspect, the present application provides a device, which includes a connection module and a transmission module; the connection module is used to establish a Bluetooth connection with a terminal device through a Bluetooth chip; the connection module is also used to establish an encrypted data channel of the Data Packet Transport Layer Security (DTLS) protocol with the terminal device based on the Bluetooth connection; the transmission module is used to transmit data with the terminal device through the encrypted data channel.

[0038] Optionally, the connection module is specifically used to: negotiate configuration information of a pre-shared key PSK with the terminal device based on the Bluetooth connection; and negotiate a session key of the encrypted data channel with the terminal device based on the configuration information of the PSK.

[0039] Optionally, the connection module is specifically configured to receive and save the configuration information from the terminal device via the Bluetooth connection, where the configuration information is obtained by the terminal device from the user.

[0040] Optionally, the connection module is also used to: based on the configuration information not being saved, control the Bluetooth chip to transmit Bluetooth signals at a first transmission power; based on the configuration information being saved, control the Bluetooth chip to transmit Bluetooth signals at a second transmission power, the first transmission power being less than the second transmission power.

[0041] Optionally, the data is data described using a next-generation modeling language YANG model or a physical model.

[0042] Optionally, the transmission module is specifically used to: receive first stream data from the Bluetooth chip through the serial port, where the first stream data is sent by the Bluetooth chip to the serial port after receiving multiple first data blocks sent by the terminal device; disassemble the first stream data into the multiple first data blocks; group the multiple first data blocks to obtain first encrypted data; and decrypt the first encrypted data using the session key of the encrypted data channel to obtain the data.

[0043] Optionally, the transmission module is specifically used to: encrypt the data using the session key of the encrypted data channel to obtain second encrypted data; segment the second encrypted data to obtain multiple second data blocks; merge the multiple second data blocks into second stream data; and send the second stream data to the Bluetooth chip through the serial port.

[0044] Optionally, the device and the Bluetooth chip are arranged in the same IoT device, and the device is connected to the Bluetooth chip.

[0045] In a fourth aspect, the present application provides a device comprising a processor and a memory, wherein when the processor runs instructions stored in the memory, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0046] In a fifth aspect, the present application provides a device, comprising a Bluetooth chip and the apparatus provided in the third aspect or the fourth aspect, wherein the Bluetooth chip is connected to the apparatus.

[0047] In a sixth aspect, the present application provides a system comprising a terminal device and the device as described in the fifth aspect.

[0048] Optionally, the system may be an Internet of Things system.

[0049] In a seventh aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect or any possible implementation of the first aspect.

[0050] Since the various device examples provided in this application can be used to execute the corresponding method examples mentioned above, the technical effects that can be obtained by the various device examples in this application can refer to the technical effects obtained by the corresponding method examples mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] FIG1 schematically illustrates a communication system provided by the present application;

[0052] FIG2 schematically illustrates a possible structure of an IoT device and the IoT communication method provided by this application;

[0053] Figure 3 schematically illustrates the process of establishing a transmission channel between a mobile phone and the main control CPU of an IoT device;

[0054] Figure 4-1 schematically illustrates the YANG model in an IoT device or smart terminal.

[0055] Figures 4-2 to 4-4 schematically illustrate the user data output by the YANG model;

[0056] FIG5 schematically illustrates the process of transmitting user data between a mobile phone and the main control CPU of an IoT device;

[0057] FIG6 schematically illustrates a possible structure of a computing device provided by the present application;

[0058] FIG7 schematically shows a possible structure of the device provided in this application. DETAILED DESCRIPTION

[0059] The present application provides a communication system. Referring to FIG1 , the communication system may be an IoT system. The IoT system may include, but is not limited to, a smart terminal and an IoT device. FIG1 takes the communication system including one smart terminal and one IoT device as an example. Optionally, the communication system may include more devices, for example, multiple smart terminals, or multiple IoT devices, or multiple smart terminals and multiple IoT devices.

[0060] The IoT device can be a dumb terminal or a thin terminal. Compared to smart terminals, dumb terminals generally have lower configurations, limited resources, and weaker security protections, making them resource-constrained devices.

[0061] Figure 1 takes the example of the first terminal device and the second terminal device being a mobile phone and a hydrological monitoring device respectively. The first terminal device can also be a handheld smart terminal such as a laptop computer, tablet computer, smart watch or smart glasses, or other types of smart terminal devices such as a vehicle-mounted terminal (such as a car computer or a vehicle-mounted computer). The second terminal device can also be a dumb terminal in an enterprise office area (such as a wireless printer and / or camera), or a dumb terminal in a logistics warehousing area (such as an automatic guided vehicle), or a dumb terminal in a smart building area (such as a direct digital control controller), or a dumb terminal in a medical setting (such as medical equipment such as an infusion pump), and other types of IoT devices.

[0062] The smart terminal mentioned in this application can be replaced by a first terminal device, and this application does not limit the type of the first terminal device. Similarly, the IoT device provided in this application can be replaced by a second terminal device, and this application does not limit the type of the second terminal device. Accordingly, the communication system shown in Figure 1 can be a communication system other than an IoT system.

[0063] FIG1 and the following text take the first terminal device and the second terminal device as an example to introduce respectively a smart terminal and an IoT device.

[0064] A transmission channel can be established between the smart terminal and the IoT device, and data can be transmitted on the transmission channel. For ease of description, this application refers to the data transmitted during the process of establishing the transmission channel as control data, and the data transmitted in the transmission channel as user data.

[0065] This application does not limit the type of user data. Assuming that the IoT device is used to provide one or more services (called target services) for the smart terminal, the IoT device can be considered as the server and the smart terminal as the client. User data can be data related to the target service (or business data) exchanged between the server and the client. Alternatively, user data is user data (or management data) exchanged between the client and the server in the process of the user managing the server through the client. Management data may include at least one of the configuration data, status data, remote procedure call (RPC) and notification data exchanged between the client and the server. Configuration data includes but is not limited to software application upgrades, installations and uninstallations. In some examples, the smart terminal and the IoT device support the network configuration (NETCONF) protocol and are the client and server of the protocol respectively.

[0066] Smart terminals and IoT devices can establish transmission channels via serial ports. However, as more and more IoT devices are deployed by businesses and individuals, operational costs are high. Furthermore, for devices located above ground, serial port operation and maintenance is risky, hindering the safety of operators.

[0067] To improve O&M efficiency and ensure the safety of operators, smart terminals can communicate with IoT devices through servers. However, this additional hardware deployment increases the cost of the communication system. Furthermore, IoT devices are often deployed in remote areas or harsh environments with poor signal strength, making it difficult to establish a stable communication connection with the server.

[0068] Smart terminals generally have Bluetooth transmission capabilities. In order to establish an end-to-end transmission channel (or P2P connection) between the smart terminal and the IoT device, a Bluetooth chip can be set in the IoT device. The Bluetooth chip can be a low-power Bluetooth low energy (BLE) chip, which helps to reduce the power consumption of the IoT device.

[0069] FIG2 schematically illustrates a possible structure of an IoT device. Referring to FIG2 , the IoT device includes, but is not limited to, a central processing unit (CPU) and a Bluetooth chip. The CPU and the Bluetooth chip are connected via a serial port. The bold line in FIG2 represents the serial port connection line. This application does not limit the type of the serial port; for example, the serial port may be a universal asynchronous receiver / transmitter (UART).

[0070] Based on the structure of the IoT device shown in Figure 2, this application provides an IoT communication method. The idea of ​​this method is that the transmission channel established between the IoT device and the smart terminal is an encrypted communication channel established between the main control CPU and the smart terminal based on the Bluetooth connection. The main control CPU and the smart terminal transmit user data through this encrypted communication channel to improve the security of user data.

[0071] It should be noted that the IoT device shown in Figure 2 can be replaced by other terminal devices, and the main control CPU shown in Figure 2 can be replaced by any device that can execute the IoT communication method. The present application does not limit the type of device. For example, the device may include a processor and a memory, and the processor executes the above method when running the instructions stored in the memory. The structure of the device will be introduced with examples later, which will not be expanded here. Figure 2 takes the serial port connection between the main control CPU and the Bluetooth chip as an example. The present application does not limit the connection method between the two. For example, the two can be connected through a bus. Below, the IoT communication method is introduced by taking the device as the main control CPU and the serial port connection between the device and the Bluetooth chip as an example.

[0072] Continuing to refer to FIG. 2 , the IoT communication method may include steps S201 to S203 .

[0073] S201, the main control CPU establishes a Bluetooth connection with the smart terminal through the Bluetooth chip;

[0074] This application does not limit the way in which the main control CPU establishes a Bluetooth connection with the smart terminal through the Bluetooth chip. For example, the Bluetooth chip can broadcast Bluetooth information, and the smart terminal scans the Bluetooth chip through the Bluetooth information, and then pairs with the Bluetooth chip to establish a Bluetooth connection.

[0075] The present application does not limit the pairing method between the smart terminal and the Bluetooth chip. For example, the two can be paired using methods such as numeric comparison, passkey entry, or just work.

[0076] S202, the main control CPU establishes an encrypted data channel of the DTLS protocol with the smart terminal based on the Bluetooth connection;

[0077] After the main control CPU establishes a Bluetooth connection with the smart terminal through the Bluetooth chip, the main control CPU establishes an encrypted data channel of the DTLS protocol with the smart terminal based on the Bluetooth connection.

[0078] The process of establishing an encrypted data channel of the DTLS protocol with the terminal device based on the Bluetooth connection is that the device negotiates the session key of the encrypted data channel with the terminal device based on the Bluetooth connection.

[0079] The process of establishing a DTLS encrypted data channel between the main control CPU and the smart terminal based on a certain protocol can be found in the relevant content of the DTLS protocol. This process will be explained later with an example method, so it will not be expanded here.

[0080] S203. The smart terminal transmits data to the terminal device through an encrypted data channel.

[0081] For ease of description, this application refers to the data sent by the smart terminal to the main control CPU via the encrypted data channel as first data. Accordingly, the main control CPU can receive the first data via the encrypted data channel. This application refers to the data sent by the main control CPU to the smart terminal via the encrypted data channel as second data. Accordingly, the smart terminal can receive the second data via the encrypted data channel.

[0082] S201 and S202 can be understood as the process of establishing a transmission channel between the main control CPU and the smart terminal, and S203 can be understood as the process of transmitting user data between the main control CPU and the smart terminal. After S202, the main control CPU and the smart terminal negotiate and determine a session key, which can then be used to encrypt and transmit user data over the Bluetooth connection.

[0083] For example, the smart terminal sending the first data through the encrypted data channel may include: the smart terminal encrypting the first data according to the session key to obtain the first encrypted data, sending the first encrypted data to the main control CPU via Bluetooth connection, and the main control CPU decrypting the first encrypted data according to the session key to obtain the first data.

[0084] Similarly, the main control CPU sending the second data through the encrypted data channel may include: the main control CPU encrypting the second data according to the session key to obtain the second encrypted data, and after sending it to the smart terminal via Bluetooth connection, the smart terminal can decrypt the second encrypted data according to the session key to obtain the second data.

[0085] In the IoT communication method shown in Figure 2, the first data and the second data can be user data. The operation and maintenance personnel can operate the smart terminal to establish a Bluetooth connection with the Bluetooth chip of the IoT device. The smart terminal and the IoT device transmit the user data based on the Bluetooth connection, which is conducive to reducing the operation and maintenance costs of the IoT device for the operation and maintenance personnel and ensuring the safety of the operation and maintenance personnel.

[0086] Furthermore, in the above method, the transmission channel includes not only the Bluetooth connection established by the Bluetooth chip but also the encrypted data channel established between the main control CPU and the smart terminal over the Bluetooth connection. For example, the payload of the Bluetooth message transmitted between the Bluetooth chip and the smart terminal can be encrypted user data. This way, even if the Bluetooth chip cannot establish an encrypted Bluetooth connection with the smart terminal, the encrypted data channel can still improve the security of user data.

[0087] For ease of description, this application refers to the data exchanged between the main control CPU and the smart terminal during the process of establishing an encrypted data channel using the DTLS protocol as channel establishment data. To ensure the security of the channel establishment data transmitted over the Bluetooth connection, establishing an encrypted data channel using the Data Transport Layer Security (DTLS) protocol with the smart terminal based on the Bluetooth connection may include: negotiating configuration information for a pre-shared key (PSK) with the smart terminal based on the Bluetooth connection; and negotiating a session key for the encrypted data channel with the smart terminal based on the PSK configuration information.

[0088] After the master CPU negotiates the configuration information for the pre-shared key (PSK) with the smart terminal over the Bluetooth connection, a trust relationship based on the PSK configuration is established between the master CPU and the smart terminal. The master CPU can then negotiate the session key for the encrypted data channel with the device in this trust relationship (referred to as the trusted device) based on the PSK configuration information.

[0089] Compared with the personal identification number (PIN) used by Bluetooth chips, PSK does not rely on the subscriber identification module (SIM) card in the device, making it easier for users to replace other smart terminals to exchange user data with the main control CPU.

[0090] The configuration information of PSK may include a PSK-pair, and the PSK-pair may include a PSK and a pre-shared key identifier (PSK-ID). This application does not limit the specific implementation process of negotiating the session key of the encrypted data channel with the smart terminal based on the configuration information of PSK. For example, the process can be understood with reference to the encryption suite related to PSK in the DTLS protocol. For example, the main control CPU and the smart terminal can verify whether the other party is a trusted device based on the saved configuration information. If both parties pass the verification, the two parties can generate the session key of the encrypted data channel based on the saved PSK. If one or both parties fail the verification, the two parties can terminate the process of establishing the encrypted data channel. The following text will introduce this process with examples of the method, which will not be expanded here.

[0091] Optionally, the smart terminal can obtain a pre-shared key (PSK) pair input by the user and then send PSK configuration information to the main control CPU based on the PSK pair. Accordingly, negotiating the PSK configuration information with the smart terminal over the Bluetooth connection includes receiving and saving the configuration information sent by the smart terminal via the Bluetooth connection. This process will be described later with examples, so it will not be elaborated here.

[0092] Compared with pre-storing the PSK configuration information in the main control CPU before leaving the factory, the user sends the PSK configuration information to the main control CPU through the smart terminal, which does not require the user to remember the factory settings, simplifying user operations.

[0093] To prevent PSK configuration information from being eavesdropped, the main CPU can control the Bluetooth chip to transmit Bluetooth signals at a lower transmit power before the smart terminal and the main CPU negotiate and determine the PSK configuration information. To facilitate data exchange between the user's smart terminal and the main CPU, the main CPU can control the Bluetooth chip to transmit Bluetooth signals at a higher transmit power after the smart terminal and the main CPU have established a channel or a trust relationship.

[0094] For example, the method may further include: based on the master CPU not storing the PSK configuration information, the master CPU may control the Bluetooth chip to transmit the Bluetooth signal at a first transmission power; based on the master CPU storing the PSK configuration information, the master CPU may control the Bluetooth chip to transmit the Bluetooth signal at a second transmission power, wherein the first transmission power is less than the second transmission power.

[0095] Figure 3 takes a mobile phone as an example to schematically illustrate the process of establishing a transmission channel between the smart terminal and the main control CPU. Referring to Figure 3, the process of establishing a transmission channel may include steps S301 to S316.

[0096] S301, the smart terminal establishes a Bluetooth connection with the Bluetooth chip;

[0097] S302. The mobile phone obtains the PSK-pair input by the user;

[0098] The mobile phone can output a first interface to the user, and the user can input the PSK-pair on the first interface.

[0099] If the intelligent terminal has not negotiated with the main control CPU to determine the PSK configuration information, after S302, S303 to S307 can be executed in sequence. In addition, to ensure the security of the PSK configuration information, before S305, the transmission power of the Bluetooth chip can be the first transmission power described above.

[0100] If the smart terminal and the main control CPU have negotiated and determined the PSK configuration information, S306 to S307 can be executed sequentially after S302. Optionally, the Bluetooth chip's transmit power can be the second transmit power described above. If the user enters an incorrect PSK pair multiple times on the first interface, the IoT device may be locked and will not allow the user to log in again until a certain period of time has passed.

[0101] S303, the mobile phone sends a PSK-pair to the main control CPU via Bluetooth connection;

[0102] S304, the main control CPU saves the PSK-pair;

[0103] S305, the main control CPU sends the configuration result to the mobile phone via Bluetooth connection;

[0104] This configuration result indicates that the main control CPU successfully receives the PSK pair.

[0105] S306: The mobile phone sends a login request to the main control CPU via the Bluetooth connection.

[0106] The login request is used to request to start establishing an encrypted data channel (or session channel).

[0107] S307, the main control CPU sends a login response to the mobile phone via Bluetooth connection;

[0108] After receiving the login request, the main control CPU may respond to the login request, for example, by sending a login response to the login request to the mobile phone. The login response may indicate approval to start establishing the encrypted data channel or rejection of the encrypted data channel establishment. If the login response indicates approval to start establishing the encrypted data channel, the process may further include S308 to S316.

[0109] S308, the mobile phone sends a client-hello message to the main control CPU;

[0110] The client-hello message is used to initiate a session.

[0111] S309, the main control CPU sends HelloRetryRequest+cookie to the mobile phone;

[0112] After receiving the client-hello message, the master CPU can respond with a HelloRetryRequest+cookie. The HelloRetryRequest+cookie is used to respond to the session initiation request and initiate cookie verification.

[0113] S310, the mobile phone sends client-hello+cookie to the main control CPU;

[0114] The mobile app sends client-hello+cookie, which is used to respond to cookie verification.

[0115] S311, the main control CPU verifies the cookie;

[0116] For example, the main control CPU can verify whether the cookies transmitted in S309 and S310 are consistent. If the verification is successful, S312 is triggered. If the verification is not successful, the establishment of the encrypted data channel is rejected.

[0117] S312, the main control CPU sends ServerHello+ServerKeyExchanned+ServerHelloDone to the mobile phone;

[0118] The ServerKeyExchanned field can carry the PSK-ID.

[0119] S313: The mobile phone verifies the identity of the main control CPU and calculates the session key;

[0120] The phone can verify the ServerKeyExchanned, for example, by verifying whether the PSK-ID in the ServerKeyExchanned matches the stored PSK-ID. If they match, verification is successful, and the session key is calculated based on the stored PSK. If they do not match, the encrypted data channel establishment is rejected.

[0121] S314: The mobile phone sends ClientKeyExchanned+ChangeCipherSpec Finished to the main control CPU.

[0122] The ClientKeyExchanned field can carry the PSK-ID.

[0123] S315, the main control CPU verifies the identity of the mobile phone and calculates the session key;

[0124] The master CPU can verify the ClientKeyExchanned, for example, by verifying whether the PSK-ID in the ClientKeyExchanned matches the stored PSK-ID. If they match, verification is successful, and the session key is calculated based on the stored PSK. If they do not match, the encrypted data channel establishment is rejected. The session key is calculated based on the PSK.

[0125] S316: The main control CPU sends a ChangeCipherSpec Finished message to the mobile phone.

[0126] The main CPU and mobile phone successfully establish a session / encrypted data channel.

[0127] The messages in S308 to S316 may be understood by referring to the encryption suite related to PSK in the DTLS protocol.

[0128] 3 , the data sent by the mobile phone to the main control CPU via Bluetooth connection passes through the Bluetooth chip and the serial port to reach the main control CPU, and the data sent by the main CPU to the mobile phone via Bluetooth connection passes through the serial port and the Bluetooth chip to reach the mobile phone.

[0129] After the main control CPU and the mobile phone successfully establish an encrypted data channel using the DTLS protocol, the mobile phone displays a management interface for the IoT device. The user can enter operational instructions on this interface, and the mobile phone sends these instructions to the IoT device via the encrypted data channel. After receiving the operational instructions, the IoT device can determine whether the access rights of the instruction are consistent with those of the currently logged-in user. If they are consistent, it can respond with a reply message. If they are inconsistent (for example, insufficient permissions), it can reply with insufficient permissions. This helps ensure the security of user data.

[0130] After the main CPU and mobile phone successfully establish an encrypted data channel using the DTLS protocol, if the IoT device detects that the BLE air interface has been disconnected, the open BLE operation and maintenance interface can be closed. After the main CPU and mobile phone successfully establish an encrypted data channel, if the IoT device monitors that there has been no operation and maintenance message exchange between the mobile phone and the IoT device for a long period of time, the open BLE operation and maintenance interface can be closed. Closing the BLE operation and maintenance interface can indicate returning to S301 or S302.

[0131] After the user uses a smart terminal to negotiate with the main control CPU to determine the PSK configuration information, he can use other smart terminals to execute S302, S306, S307 and S308 to S316 with the main control CPU in sequence to establish an encrypted data channel with the main control CPU, and then operate and maintain IoT devices.

[0132] The above describes the process of establishing an encrypted data channel by way of example. The following describes the process of transmitting the first user data and / or the second data in the encrypted data channel.

[0133] This application does not limit the type of user data. In some examples, user data can be data related to the target business that is exchanged between the server and the client, or data (called management data) that is exchanged between the client and the server during the process of the user managing the server through the client. For example, management data may include at least one of the configuration data, status data, remote procedure call (RPC) and notification data exchanged between the client and the server. In some examples, the main control CPU and the intelligent terminal support the network configuration protocol NETCONF, and are the server and client of the protocol, respectively, and the user data is the data exchanged between the client and the server of the NETCONF protocol.

[0134] Optionally, IoT devices and smart terminals can predefine a target modeling language, and user data can be data modeled using the target modeling language. For example, the target modeling language supports the complete description of data between the client and server of the NETCONF protocol. Optionally, the target modeling language is a YANG model or a thing model, a next-generation modeling language. Figure 4-1 schematically illustrates a YANG model in an IoT device or smart terminal, and Figures 4-2 through 4-4 schematically illustrate the user data output by the YANG model. When user data is used to configure an IoT device, the user data output by the YANG model of the smart terminal can be understood with reference to Figure 4-2. When user data is used to query data in an IoT device, the user data output by the YANG model of the smart terminal can be understood with reference to Figure 4-3. When user data is used to respond to an IoT interrupt, the user data output by the YANG model of the IoT device can be understood with reference to Figure 4-4.

[0135] BLE chips offer the advantage of low power consumption, but the maximum payload size of a BLE message is typically small, for example, 244 bytes. The data output by the target modeling language is typically large files, such as JavaScript Object Notation (JSON) files (or JSON data) or Extensible Markup Language (XML) files (or XML data), which are much larger than the maximum payload size of a BLE message.

[0136] To facilitate the Bluetooth chip's reception of the first data sent by the smart terminal, the smart terminal may, after encrypting the first encrypted data, fragment the first encrypted data to obtain and transmit multiple first data blocks via the Bluetooth connection. Accordingly, the main control CPU receiving the first data sent by the smart terminal via the encrypted data channel may include: receiving the multiple first data blocks sent by the smart terminal via the Bluetooth chip; grouping the multiple first data blocks to obtain the first encrypted data; and decrypting the first encrypted data using the session key of the encrypted data channel to obtain the first data.

[0137] To facilitate the Bluetooth chip transmitting the second data to the smart terminal, the second data is transmitted to the smart terminal via an encrypted data channel, including: encrypting the second data using a session key of the encrypted data channel to obtain second encrypted data; fragmenting the second encrypted data to obtain multiple second data blocks; and transmitting the multiple second data blocks separately via the Bluetooth chip. Accordingly, the smart terminal can receive the multiple second data blocks separately via the Bluetooth connection, combine the multiple second data blocks to obtain second encrypted data, and decrypt the second encrypted data using the session key of the encrypted data channel to obtain the second data.

[0138] In some examples, the main control CPU and the Bluetooth chip transmit stream data (e.g., UART data) via a serial port. Since the Bluetooth chip cannot control the time interval between the arrival of multiple first data blocks at the Bluetooth chip, in order to optimize the transmission performance between the Bluetooth chip and the main control CPU (e.g., reduce transmission delay), the Bluetooth chip may continuously send multiple first data blocks via the serial port. Then, the first stream data received by the main control CPU via the serial port may include stream data corresponding to the multiple first data blocks. The main control CPU can disassemble the first stream data into multiple first data blocks, and then group the multiple first data blocks to obtain first encrypted data, and use the session key of the encrypted data channel to decrypt the first encrypted data to obtain the first data.

[0139] In order to facilitate the main control CPU to disassemble multiple first data blocks from the first stream data, the Bluetooth chip can add a frame header (called a framing frame header) to the first data block to instruct the main control CPU to determine the corresponding data block from the first stream data. The main control CPU can disassemble multiple first data blocks from the first stream data based on the framing frame header of the first data block.

[0140] Optionally, if the main control CPU sends multiple second data blocks to the Bluetooth chip through the serial port, in order to optimize the transmission performance between the Bluetooth chip and the main control CPU (for example, reduce transmission delay), the main control CPU can merge the multiple second data blocks into second stream data and send the second stream data to the Bluetooth chip through the serial port.

[0141] In order to facilitate the Bluetooth chip to disassemble multiple second data blocks from the second stream data, the main control CPU can add a frame header (called a framing frame header) to the second data block to instruct the Bluetooth chip to determine the corresponding data block from the second stream data. The main control CPU can disassemble multiple second data blocks from the second stream data based on the framing frame header of the second data block.

[0142] Figure 5 takes a mobile phone as an example, and the bold line represents a UART serial port connection line, schematically illustrating a possible process of transmitting user data between the smart terminal and the main control CPU in an encrypted data channel. Referring to Figure 5, the process of transmitting user data may include steps S501 to S506.

[0143] S501, the mobile phone sends a first Bluetooth message sequence to the Bluetooth chip;

[0144] The user can input an operation and maintenance instruction into the second interface of the mobile phone, and the mobile phone can use the YANG model to convert the operation and maintenance instruction into modeled data, for example, the data is JSON data. Optionally, the JSON data can include the first response header.

[0145] The mobile phone uses the session key to encrypt the JSON data to obtain first encrypted data, and then encapsulates the first encrypted data with a DTLS header to obtain first DTLS data.

[0146] The mobile phone may fragment the first DTLS data to obtain m fragments, where m is a positive integer. In the following, it is assumed that the length of the first DTLS data is 1200 bytes, and the mobile phone fragments the first DTLS data to obtain 10 fragments, each of which is 120 bytes long.

[0147] The mobile phone can add a slice header to each slice, obtaining information about 10 slices. The slice header includes, for example, a 2-byte "length" field, a 2-byte "ID" field, and a 2-byte slice information field. "Length" is the length of the first DTLS data, and "ID" is used to identify the slice, instructing the receiving end to restore the 10 slices into the first DTLS data. The slice information can indicate whether the slice is the last slice and / or its offset.

[0148] The mobile phone adds a Bluetooth message header to each fragment information to obtain 10 Bluetooth messages, which are called the first Bluetooth message sequence. The Bluetooth messages are, for example, GATT messages.

[0149] S502, the Bluetooth chip sends a first UART message to the main control CPU through the UART serial port;

[0150] After receiving the first Bluetooth message sequence, the Bluetooth chip can extract the payload (ie, fragment information) in each Bluetooth message, add a UART frame header (ie, a framing frame header) to each payload, and obtain the first UART message.

[0151] The UART frame header may include, for example, a 3-byte "SYN" field, a 1-byte "START" field, a 2-byte "PKTLEN" field, a "DATA" field, a 2-byte "CRC" field, and a 1-byte "END" field. "DATA" is the payload, "SYN" is the synchronization identifier, "START" is the start identifier, "PKTLEN" is the length of "DATA", "CRC" is the CRC value (i.e., the checksum) of "DATA", and "END" is the end identifier.

[0152] S503, the main control CPU obtains JSON data from the first UART message;

[0153] The first UART message is stream data. The master CPU can disassemble the first UART message into 10 fragments and restore the 10 fragments into the first DTLS data based on the fragment headers. The master CPU can then remove the DTLS header from the first DTLS data to obtain the first encrypted data and decrypt the first encrypted data using the session key to obtain the JSON data.

[0154] S504, the main control CPU sends a second UART message to the Bluetooth chip through the UART serial port;

[0155] The main control CPU can parse the JSON data into an understandable data format and respond to obtain response data. Optionally, the response data can be encapsulated with a second response header that matches the first response header.

[0156] The master CPU may use the session key to encrypt the response data to obtain second encrypted data, and then encapsulate the second encrypted data with a DTLS header to obtain second DTLS data.

[0157] The main control CPU may fragment the second DTLS data to obtain n fragments, where n is a positive integer. The main control CPU may add a fragment header to each fragment to obtain n fragment information.

[0158] The main control CPU can add a UART frame header (ie, a fixed frame header) to each fragment information, obtain and send a second UART message to the Bluetooth chip through the UART serial port.

[0159] S505. The Bluetooth chip sends a second Bluetooth message sequence to the mobile phone;

[0160] The second UART message is stream data, and the Bluetooth chip can disassemble the second UART message to obtain n fragment information, add a Bluetooth message header to each fragment information, and obtain n Bluetooth messages, which are called the second Bluetooth message sequence. The Bluetooth message is, for example, a GATT message.

[0161] S506: The mobile phone obtains response data from the second Bluetooth message sequence.

[0162] After receiving the second Bluetooth message sequence, the phone can extract the payload (i.e., fragment information) from each Bluetooth message and, based on the fragment header, restore the n fragments into the second DTLS data. The phone can then remove the DTLS header from the second DTLS data to obtain the second encrypted data, and decrypt the second encrypted data using the session key to obtain the response data. Optionally, the phone can then parse the response content and display it on the phone interface.

[0163] The current DTLS protocol and Bluetooth chip do not have a retransmission mechanism. In order to improve the reliability of the data transmitted by the communication channel, message retransmission can be supported to ensure the reliable transmission of messages. Messages can be selected for retransmission based on importance / performance. Optionally, in order to improve the reliability of the transmission of the first data and the second data in the encrypted data channel, after sending the second data to the smart terminal through the encrypted data channel, the method also includes: repeatedly sending the second data to the smart terminal through the encrypted data channel. For example, continuing to refer to Figure 5, after S501, the mobile phone can start a timer. If the mobile phone does not receive the response data encapsulated with the second response header before the timer times out, the first Bluetooth message sequence can be retransmitted to the Bluetooth chip.

[0164] The above describes the method provided by this application. The following describes the device provided by this application.

[0165] The present application provides a computing device. FIG6 is a schematic diagram of a possible structure of the computing device. Referring to FIG6 , the computing device 6 includes a processor 601 and a memory 602 .

[0166] The processor 601 may be one or more CPUs, and the CPU may be a single-core CPU or a multi-core CPU.

[0167] The memory 602 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), flash memory, or optical storage. The memory 602 stores program code, or computer-readable program code, or code of an operating system and program code, or computer program code, or functional program. Optionally, the memory 602 may be a non-volatile memory or a volatile memory.

[0168] In one possible implementation, the computing device 6 also includes a communication interface 603, which can be a wired interface, such as a fiber distributed data interface (FDDI), a gigabit Ethernet (GE) interface, or the serial port described above; the communication interface 603 can also be a wireless interface.

[0169] In one possible implementation, the computing device 6 further includes an input / output interface 604, which is used to connect to input / output devices. The input / output interface 604 is connected to the input / output devices to obtain input information from the user or output information to the user through the input / output devices. The information may be voice or images. Output devices include, but are not limited to, at least one of a keyboard, a display, and a speaker.

[0170] Optionally, the computing device 6 further includes a bus 605 , and the processor 601 , memory 602 , communication interface 603 and input / output interface 604 may be interconnected via the bus 605 or in other ways.

[0171] The computing device 6 can be the first terminal device or the second terminal device described above, or a device within the second terminal device. The processor 601 reads and executes the program code stored in the memory 602 to cause the computing device 6 to perform the method performed by the corresponding device or device in the above-described method examples. For more details on how the processor 601 reads and executes the stored program code to cause the computing device 6 to perform the above-described steps, please refer to the corresponding descriptions of the above-described method examples and will not be repeated here.

[0172] Optionally, these program codes are stored in a memory external to the computing device. When these program codes are decoded and executed by the processor 601 of the computing device 6, part or all of the program codes are temporarily stored in the memory 602 within the computing device 6. Optionally, part of the program codes are stored in a memory external to the computing device 6, while the rest of the program codes are stored in the memory 602 within the computing device 6.

[0173] This application also provides a chip, or a chip system, comprising a processor and an interface circuit, wherein the processor is coupled to a memory via the interface circuit. The chip may be the device or Bluetooth chip in the second terminal device described above, and the processor is configured to execute instructions stored in the memory, thereby implementing the method performed by the corresponding device or chip in any of the above-described method examples of this application.

[0174] In one example, the processor can execute the program code stored in the memory so that the chip executes any of the above method examples. Optionally, the memory can be a storage unit within the chip system, such as a register, a cache, etc., or the memory can be a memory outside the chip system within a computing device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and program code, a random access memory (RAM), etc. Optionally, the memory can be a non-volatile memory or a volatile memory. Optionally, the processor can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of any of the above method examples.

[0175] The present application provides a device. FIG7 is a schematic diagram of a possible structure of the device 7 provided by the present application. Referring to FIG7 , the device 7 includes a connection module 701 and a transmission module 702 .

[0176] The apparatus may be an apparatus or a master CPU in the second terminal device mentioned in the method of the present application. The connection module 701 is configured to execute steps S201 and S202 in the example shown in FIG2 , and the transmission module 702 is configured to execute step S203 in the example shown in FIG1 . Alternatively, the connection module 701 is configured to execute the steps executed by the master CPU in the example shown in FIG3 . Alternatively, the transmission module 702 is configured to execute the steps executed by the master CPU in the example shown in FIG5 .

[0177] The apparatus may be the first terminal device or mobile phone mentioned in the method of the present application. The connection module 701 is configured to execute steps S201 and S202 in the example shown in FIG2 , and the transmission module 702 is configured to execute step S203 in the example shown in FIG1 . Alternatively, the connection module 701 is configured to execute the steps executed by the mobile phone in the example shown in FIG3 . Alternatively, the transmission module 702 is configured to execute the steps executed by the mobile phone in the example shown in FIG5 .

[0178] The module division of device 7 depicted in FIG7 is merely illustrative and represents only a logical functional division. In actual implementation, alternative divisions may be employed. For example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not implemented. The functional modules in the device may be integrated into a single processing module, each module may exist physically separately, or two or more modules may be integrated into a single module.

[0179] The modules in FIG. 7 can be implemented in the form of hardware or software functional units. For example, when implemented in software, the modules in FIG. 7 can be implemented by software functional modules generated by processor 601 in FIG. 6 after reading program code stored in memory 602. The modules in FIG. 7 can also be implemented separately by different hardware components in FIG. 6 or by a combination of hardware and software.

[0180] The connection in the examples of this application is a coupling or communication connection between devices, units or modules, which is used for information exchange between the devices, units or modules.

[0181] Those skilled in the art will appreciate that, when using software to realize the various aspects of the application example, or the possible implementation of each aspect, the above-mentioned various aspects, or the possible implementation of each aspect can be realized in whole or in part in the form of a computer program product. A computer program product refers to a program code (or computer-readable program code or computer program program code or functional program or program code) stored in a computer-readable medium. When loading and executing these program codes on a computer, the process or function described in the application example are generated in whole or in part.

[0182] The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. Computer-readable storage media include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination thereof. For example, the computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable compact disc read-only memory (CD-ROM).

[0183] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged under appropriate circumstances. This is merely a way of distinguishing when describing objects with the same properties in the examples of this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units, but may include other units that are not explicitly listed or inherent to these processes, methods, products or apparatuses. The term "plurality" appearing in the examples of this application refers to two or more.

[0184] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the scope of the present invention. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present invention, the present invention is also intended to include these modifications and variations.

Claims

1. An Internet of Things communication method, characterized in that: include: Establish a Bluetooth connection with the terminal device through the Bluetooth chip; Establishing an encrypted data channel of Datagram Transport Layer Security (DTLS) protocol with the terminal device based on the Bluetooth connection; Data is transmitted to the terminal device via the encrypted data channel.

2. The method according to claim 1, characterized in that: The method of establishing an encrypted data channel of a data packet transport layer security (DTLS) protocol with a terminal device based on the Bluetooth connection includes: Negotiate configuration information of a pre-shared key PSK with the terminal device based on the Bluetooth connection; The session key of the encrypted data channel is negotiated with the terminal device based on the configuration information of the PSK.

3. The method according to claim 2, characterized in that The negotiating the configuration information of the PSK with the terminal device based on the Bluetooth connection includes: The configuration information is received and saved from the terminal device through the Bluetooth connection, where the configuration information is obtained by the terminal device from the user.

4. The method according to claim 3, characterized in that The method further comprises: Based on the fact that the configuration information is not saved, controlling the Bluetooth chip to transmit a Bluetooth signal at a first transmission power; Based on the stored configuration information, the Bluetooth chip is controlled to transmit a Bluetooth signal at a second transmission power, wherein the first transmission power is less than the second transmission power.

5. The method according to any one of claims 1 to 4, characterized in that The data is data described using a next generation modeling language YANG model or a physical model.

6. The method according to any one of claims 1 to 5, characterized in that The transmitting data with the terminal device through the encrypted data channel includes: receiving first stream data from the Bluetooth chip through the serial port, where the first stream data is sent by the Bluetooth chip to the serial port after receiving a plurality of first data blocks sent by the terminal device; Decomposing the first stream data into the plurality of first data blocks; Packaging the plurality of first data blocks to obtain first encrypted data; The first encrypted data is decrypted using the session key of the encrypted data channel to obtain the data.

7. The method according to any one of claims 1 to 6, characterized in that The transmitting data with the terminal device through the encrypted data channel includes: Encrypt the data using the session key of the encrypted data channel to obtain second encrypted data; Slicing the second encrypted data to obtain a plurality of second data blocks; Merging the plurality of second data blocks into second stream data; The second stream data is sent to the Bluetooth chip through the serial port.

8. The method according to any one of claims 1 to 7, characterized in that The IoT communication method is applied to a device in an IoT device, the device and the Bluetooth chip are arranged in the IoT device, and the device is connected to the Bluetooth chip.

9. An Internet of Things communication method, applied to an Internet of Things system, the Internet of Things system comprising a first terminal device and a second terminal device, the second terminal device comprising a device and a Bluetooth chip, the device being connected to the Bluetooth chip, characterized in that: include: The device establishes a Bluetooth connection with the first terminal device through the Bluetooth chip; The device establishes an encrypted data channel of Datagram Transport Layer Security (DTLS) protocol with the first terminal device based on the Bluetooth connection; The first terminal device transmits data with the apparatus through the encrypted data channel.

10. A device, characterized in that: The device comprises a connection module and a transmission module; The connection module is used to establish a Bluetooth connection with the terminal device through the Bluetooth chip; The connection module is also used to establish an encrypted data channel of the Data Packet Transport Layer Security (DTLS) protocol with the terminal device based on the Bluetooth connection; The transmission module is used to transmit data with the terminal device through the encrypted data channel.

11. A device, characterized in that: The method comprises a processor and a memory, wherein the processor executes the method according to any one of claims 1 to 8 when running instructions stored in the memory.

12. The device according to claim 11, characterized in that The device is a chip.

13. A device, characterized in that: The device comprises a Bluetooth chip and the apparatus as claimed in claim 10, 11 or 12, wherein the Bluetooth chip is connected to the apparatus.

14. An Internet of Things system, characterized in that: The device comprises one or more terminal devices and one or more devices as claimed in claim 13.

Citation Information

Patent Citations

  • Internet of Things communication method and device

    CN118741466A

  • Local Bluetooth dynamic authentication method and system for Internet of Things equipment

    CN110635901A

  • Data transmission method and device

    CN114142974A

  • Methods, devices, nodes and computer programs for of establishing a cryptographically secured data communication channel

    WO2021130514A1

  • Control method and apparatus for internet of things device, and device and storage medium

    WO2022042258A1