Device binding method and system, device, storage medium and program product

Through two hash operations to generate signatures and NFC technology, combined with cloud server verification, it solves the problems of tedious binding and security risks of IoT devices, and achieves fast, accurate and secure device binding.

CN118714002APending Publication Date: 2024-09-27DONGGUAN ZKTECO ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410977821.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

The existing IoT device binding methods are cumbersome, the Bluetooth distribution network efficiency is low, there are security risks, manual input is error-prone, QR code recognition is inconvenient, Bluetooth broadcast distance is limited and it is easy to interfere with each other.

Method used

Two hash operations are used to generate signatures, and NFC technology is used to quickly bind IoT devices and terminals to avoid exposure of important private data. The cloud server is used to verify the legitimacy of the device and improve binding efficiency and security.

Benefits of technology

It achieves fast and accurate binding of IoT devices and terminals, improves binding efficiency and security, avoids manual input errors and Bluetooth distribution network deficiencies, and enhances the privacy of device private data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714002A
    Figure CN118714002A
Patent Text Reader

Abstract

The invention discloses a device binding method and system, a device, a storage medium and a program product, and the method comprises the steps: in the binding process of an Internet of Things device and a terminal, responding to the received request data sent by the terminal, and based on the device identifier of the Internet of Things device and first interaction information, carrying out the binding of the Internet of Things device and the terminal; generating a first signature through two Hash operations, and sending the first signature to the terminal; and under the condition that the first signature verification is passed, sending equipment information of the Internet of Things equipment to the terminal, so that the terminal completes binding with the Internet of Things equipment based on the equipment information. Therefore, the accuracy and the reliability of the signature are ensured, important private data are prevented from being exposed outside randomly, and the binding of the terminal and the Internet of Things equipment is accurately realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a device binding method, system, device, storage medium and program product. Background Art

[0002] With the development of the times, Internet of Things (IOT) devices are becoming more and more common in life. For example, cloud attendance access control devices used by companies, cameras for home surveillance, etc. When adding these products on a daily basis, the common method is to manually enter the product serial number through the application APP provided by the product, or add the device by scanning the QR code, or through Bluetooth and other methods. Summary of the invention

[0003] In view of this, embodiments of the present application at least provide a device binding method, system, device, storage medium, and program product.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] On the one hand, an embodiment of the present application provides a device binding method, which is applied to an Internet of Things device. The method includes: in the process of binding the Internet of Things device with a terminal, in response to receiving request data sent by the terminal, based on the device identification and first interaction information of the Internet of Things device, generating a first signature through two hash operations, and sending the first signature to the terminal; if the first signature is verified, sending the device information of the Internet of Things device to the terminal, so that the terminal completes the binding with the Internet of Things device based on the device information.

[0006] In the embodiment of the present application, the first signature is generated by two hash operations to ensure the accuracy and reliability of the signature. Based on the signature, the legitimacy of the device can be accurately verified, while important private data is prevented from being exposed to the outside. After the signature verification is passed, the device information is sent to the terminal, which can accurately realize the binding of the terminal and the IoT device.

[0007] On the other hand, an embodiment of the present application provides a device binding method, which is applied to a terminal, and the method includes: in the process of binding an Internet of Things device with the terminal, sending request data to the Internet of Things device; receiving a first signature sent by the Internet of Things device; the first signature is generated by the Internet of Things device through two hash operations based on the device identification of the Internet of Things device and first interaction information; when the first signature is verified, receiving the device information sent by the Internet of Things device, so that the terminal completes the binding with the Internet of Things device based on the device information.

[0008] In the embodiment of the present application, the first signature is generated by two hash operations to ensure the accuracy and reliability of the signature. Based on the signature, the legitimacy of the device can be accurately verified, while important private data can be prevented from being exposed to the outside. After the signature verification is passed, the device information is received, and the binding of the terminal and the IoT device can be accurately realized.

[0009] On the other hand, an embodiment of the present application provides a device binding system, the system comprising an Internet of Things device and a terminal; the Internet of Things device, in response to receiving request data sent by the terminal during the binding process between the Internet of Things device and the terminal, generates a first signature through two hash operations based on a device identification and first interaction information of the Internet of Things device, and sends the first signature to the terminal; when the first signature is verified, the device information of the Internet of Things device is sent to the terminal, so that the terminal completes the binding with the Internet of Things device based on the device information; the terminal, in the process of binding the Internet of Things device and the terminal, sends request data to the Internet of Things device and receives the first signature sent by the Internet of Things device; when the first signature is verified, the device information sent by the Internet of Things device is received, so that the terminal completes the binding with the Internet of Things device based on the device information.

[0010] On the other hand, an embodiment of the present application provides a device binding apparatus for an Internet of Things device, comprising a generating module and a first sending module; the generating module is used to generate a first signature through two hash operations based on a device identification and first interaction information of the Internet of Things device in response to receiving request data sent by the terminal during the binding process between the Internet of Things device and the terminal, and send the first signature to the terminal; the first sending module is used to send the device information of the Internet of Things device to the terminal when the first signature verification passes, so that the terminal completes the binding with the Internet of Things device based on the device information.

[0011] On the other hand, an embodiment of the present application provides a device binding apparatus for a terminal, comprising a second sending module and a receiving module; the second sending module is used to send request data to the Internet of Things device during the process of binding the Internet of Things device to the terminal; the receiving module is used to receive a first signature sent by the Internet of Things device; the first signature is generated by the Internet of Things device through two hash operations based on the device identification of the Internet of Things device and the first interaction information; when the first signature is verified, the device information sent by the Internet of Things device is received, and the binding with the Internet of Things device is completed based on the device information.

[0012] On the other hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0013] On the other hand, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements part or all of the steps in the above method when executed by a processor.

[0014] On the other hand, an embodiment of the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements some or all of the steps in the above method.

[0015] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0017] Figure 1 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 1 ;

[0018] Figure 2 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 2 ;

[0019] Figure 3 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 3 ;

[0020] Figure 4 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 4 ;

[0021] Figure 5 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 5 ;

[0022] Figure 6 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 6 ;

[0023] Figure 7 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 7 ;

[0024] Figure 8 A schematic diagram of the quick binding process of IOT products provided in the embodiment of the present application;

[0025] Fig. 9 A schematic diagram of the structure of a device binding system provided in an embodiment of the present application;

[0026] Fig.10 A hardware entity diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0028] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0030] The embodiment of the present application provides a device binding method, which can be executed by a processor of a computer device. The computer device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device), or other device with data processing capabilities.

[0031] When binding an IoT device to a terminal, the terminal often needs to verify the legitimacy of the IoT device. Once the IoT device is confirmed to be legitimate, the IoT device is bound to the terminal. In some cases, some parameters in the IoT device are private data, such as the key identifier secretNo. When binding a device, these parameters can only be obtained by the IoT device and the cloud server, but not by the terminal.

[0032] In order to effectively utilize these private data in the IoT device to verify the legitimacy of the device, an embodiment of the present application provides a device binding method, which is applied to the IoT device. In the process of binding the IoT device with the terminal, in response to receiving the request data sent by the terminal, based on the device identification and the first interaction information of the IoT device, a first signature is generated through two hash operations, and the first signature is sent to the terminal; when the first signature verification passes, the device information of the IoT device is sent to the terminal, so that the terminal completes the binding with the IoT device based on the device information. The first signature is generated by two hash operations to ensure the accuracy and reliability of the signature. The legitimacy of the device can be accurately verified based on the signature, while avoiding the exposure of important private data to the outside. After the signature verification passes, the device information is sent to the terminal, which can accurately realize the binding of the terminal and the IoT device.

[0033] Figure 1 A schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application Figure 1 , applied to IoT devices, such as Figure 1 As shown, the method includes the following steps S101 to S102:

[0034] Step S101: During the binding process between the IoT device and the terminal, in response to receiving request data sent by the terminal, a first signature is generated through two hash operations based on a device identification and first interaction information of the IoT device, and the first signature is sent to the terminal.

[0035] Among them, IoT devices refer to devices that can access the Internet, have a certain degree of intelligence, and can communicate and exchange data. These devices can be interconnected through data transmission technology to achieve linkage and intelligent control between devices, bringing people a more convenient and comfortable life. Common IoT devices include smart home devices, smart watches, etc. The embodiments of this application do not limit the specific form of IoT devices.

[0036] Among them, the terminal refers to various intelligent terminals that can add IoT devices, such as smart phones, tablet computers, etc. The embodiments of the present application do not limit the specific form of the terminal. The terminal stores the APP corresponding to the IoT device, and the terminal and the IoT device can be bound through the APP. After the IoT device is bound to the terminal, the IoT device can be controlled through the terminal. For example, after the smart watch APP of the terminal is bound to the smart watch device, the parameters of the smart watch device can be adjusted through the APP.

[0037] The request data is the data sent by the terminal to the IoT device during the device binding process, which is used to inform the IoT device to start device binding. The request data is the data mutually agreed upon by the terminal and the IoT device. Exemplarily, the request data may be a "Hello" message sent by the terminal. The embodiment of the present application does not limit the content and form of the request data.

[0038] The device ID is the identity information (device ID) of the IoT device. When the device leaves the factory, the device barcode can be used to apply for registration with the cloud server to generate the device ID. The device ID will be burned into the corresponding IoT device and saved in the cloud server at the same time.

[0039] The first interaction information is the information of real-time interaction between the IoT device and the terminal during the device binding process, which can be a random number, a time factor, or a combination of the two generated during the interaction process. The first interaction information is the information agreed upon by the terminal and the IoT device, that is, after the first interaction information is generated, both the terminal and the IoT device are aware of the content of the first interaction information. Exemplarily, the first interaction information can be the time corresponding to an event, or a random number generated in an event.

[0040] Among them, the first signature is a digital signature generated by the IoT device during the interaction between the terminal and the IoT device, which is used by the terminal to determine the legitimacy of the IoT device.

[0041] Among them, when the IoT device is bound to the terminal, the terminal needs to determine the legitimacy of the IoT device. Therefore, after receiving the request data sent by the terminal, the IoT device will send a first signature to the terminal. The terminal can determine whether the IoT device is legal by verifying the first signature.

[0042] In some embodiments, the first key is private data of the IoT device and can only be obtained by the IoT device, while the terminal cannot directly obtain the first key. Therefore, when generating the first signature based on the first key, two hash operations are required. The first hash operation is performed based on the first key and the device identifier to obtain the second key; wherein the first key is used as the key and the device identifier is used as the data; the second hash operation is performed based on the second key and the first interactive information to obtain the first signature. wherein the second key is used as the key and the first interactive information is used as the data. After generating the first signature, the IoT device sends the first signature to the terminal, and the terminal verifies the first signature to determine the legitimacy of the IoT device. wherein the hash algorithm can be any algorithm such as SHA1, SHA256, SHA384, etc. the first hash operation and the second hash operation can be the same or different. the first hash operation and the second hash operation are agreed upon by the IoT device and the terminal.

[0043] In some embodiments, the device identification is used as a key, the first key is used as data, a hash algorithm is performed based on the device identification and the first key to obtain a hash value, and the hash value is used as a second key; a hash operation is performed based on the second key and the first interaction information to obtain a first signature.

[0044] Step S102: When the first signature verification passes, the device information of the IoT device is sent to the terminal, so that the terminal completes binding with the IoT device based on the device information.

[0045] The device information is information related to device binding in the IoT device. The terminal can implement device binding according to the device information. Exemplarily, the device information is the serial number of the device.

[0046] In some embodiments, the terminal can obtain the second key obtained through the first hash operation from the cloud server, and the terminal knows the first interaction information generated during the interaction. After receiving the first signature, the terminal performs a hash operation based on the obtained second key and the known first interaction information to generate a new first signature. The terminal compares the new first signature with the first signature sent by the received IoT device, and determines that the first signature verification has passed if the generated first signature is consistent with the received first signature.

[0047] In some embodiments, when the first signature generated by the terminal is inconsistent with the first signature sent by the received IoT device, it is determined that the first signature verification fails and the IoT device is an illegal device.

[0048] In some embodiments, after receiving the device information, the terminal can add the device information to the APP to complete the device binding, or upload the device information to the cloud server to complete the device binding through the cloud server.

[0049] In an embodiment of the present application, during the process of binding an IoT device with a terminal, in response to receiving the request data sent by the terminal, based on the device identification of the IoT device and the first interaction information, a first signature is generated through two hash operations, and the first signature is sent to the terminal; when the first signature verification passes, the device information of the IoT device is sent to the terminal, so that the terminal completes the binding with the IoT device based on the device information. The first signature is generated through two hash operations to ensure the accuracy and reliability of the signature, and the legitimacy of the device can be accurately verified based on the signature, while preventing important private data from being exposed to the outside. After the signature verification passes, the device information is sent to the terminal, which can accurately realize the binding of the terminal with the IoT device.

[0050] Figure 2 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 2The method may be executed by a processor of a computer device. In step S101, based on the device identification of the IoT device and the first interaction information, a first signature is generated through two hash operations. This process may be implemented through steps S201 and S202.

[0051] Step S201: Perform a hash operation based on the first key and the device identification to obtain a second key.

[0052] The first key is a key stored in the IoT device, which is used as an input parameter of the hash operation. Exemplarily, the first key is secretNo. The first key is private data in the IoT device and cannot be directly obtained by the terminal.

[0053] In some embodiments, the first key is used as data and the device identifier is used as the key. These two parameters are input into a first hash operation, and the first hash operation outputs a hash value, which is used as the second key. The operation process of the first hash operation is agreed upon in advance by the IoT device and the terminal.

[0054] Step S202: Perform a hash operation based on the second key and the first interactive information to obtain a first signature.

[0055] In some embodiments, the second key is used as the key, the first interaction information is used as data, the two parameters are input into a second hash operation, the second hash operation outputs a hash value, and the hash value is used as the first signature. The operation process of the second hash operation is agreed upon in advance by the IoT device and the terminal.

[0056] In the embodiment of the present application, a hash operation is performed based on the first key and the device identification to obtain the second key; a hash operation is performed based on the second key and the first interactive information to obtain the first signature. In this way, an accurate signature can be generated based on the device identification and the first interactive information, and the first key in the signature generation process will not be exposed to the terminal, thereby improving the privacy of private data of the IoT device.

[0057] Figure 3 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 3 , the method may be executed by a processor of a computer device. Figure 3 As shown, the method includes steps S301 and S302, combining Figure 3 The steps shown are explained.

[0058] Step S301: parse the request data to obtain a parsing result.

[0059] In some embodiments, the terminal and the IoT device agree on some information that both parties need to exchange during the device binding process according to the agreed protocol. The IoT device will respond to the request data only when it determines that the request data sent by the terminal is the target result. Therefore, the IoT device needs to parse the request data to further determine whether the parsed result is the target result.

[0060] The request data is encapsulated data containing agreed information, and the request data needs to be parsed according to the agreed protocol to obtain a parsing result. Exemplarily, the request data is data containing "Hello" information.

[0061] Step S302: When the analysis result is a target result, the analysis result is sent to the terminal; the target result represents the information agreed upon between the IoT device and the terminal.

[0062] In some embodiments, after obtaining the parsing result, the IoT device compares the parsing result with the target result. When the parsing result is consistent with the target result, it is determined that the terminal is the terminal that the device needs to bind to. Therefore, the parsing result can be sent to the terminal so that the terminal verifies the legitimacy of the IoT device based on the parsing result. When the parsing result is inconsistent with the target result, the request data sent by the terminal is illegal data, and the terminal is not the terminal required for device binding. Therefore, the IoT device will not respond, that is, it will not send the parsing result to the terminal, nor will it send the first signature. The IoT device sends the parsing result to the terminal, and the terminal can determine based on the parsing result that the IoT device has received the request data and responded to the request data.

[0063] In the embodiment of the present application, the request data is parsed to obtain a parsing result; if the parsing result is the target result, the parsing result is sent to the terminal. In this way, the legitimacy of the terminal can be verified based on the parsing result, and by sending the parsing result to the terminal, the terminal can determine that the IoT device has received the request data, thereby further verifying the legitimacy of the IoT device.

[0064] Figure 4 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 4 The method may be executed by a processor of a computer device. The step S102 of "sending the device information of the IoT device to the terminal when the first signature verification passes" is updated to S401 to S402. Figure 4 The steps shown are explained.

[0065] Step S401: When the first signature verification passes, receive the second signature sent by the terminal, and verify the second signature to obtain a verification result.

[0066] The second signature is used to verify the legitimacy of the terminal. The second signature may be generated by the terminal or generated by the cloud server and sent to the terminal.

[0067] In some embodiments, the second signature is generated by a cloud server. The cloud server performs a hash operation based on the first key and the device identifier to obtain a hash value, and uses the hash value as the second key; performs a hash operation based on the second key and the second interaction information to obtain a second signature. The second interaction information is information generated during the interaction process agreed upon by the terminal and the IoT device, and the second interaction information may be a random number generated during the interaction process, a time factor, or a combination of the two. The second interaction information is different from the first interaction information.

[0068] Among them, if the first signature verification is passed, the terminal will send the second signature to the IoT device. After receiving the second signature, the IoT device needs to verify the second signature to determine the legitimacy of the terminal. The IoT device itself stores the first key and device identification, so the IoT device can directly perform a hash operation based on the first key and device identification to obtain the second key; the IoT device performs a hash operation based on the generated second key and the original second interaction information to obtain a newly generated second signature. The IoT device compares the newly generated second signature with the second signature sent by the receiving terminal to determine the legitimacy of the terminal.

[0069] Step S402: When the verification result is that the verification is passed, the device information of the Internet of Things device is sent to the terminal.

[0070] Among them, when the verification result is verification passed, the Internet of Things device determines that the terminal is legal, and therefore sends the device information of the Internet of Things device to the terminal; when the verification result is verification failed, it is determined that the terminal is illegal and no device information is sent to the terminal.

[0071] In the embodiment of the present application, when the first signature is verified, the second signature sent by the terminal is received, and the second signature is verified to obtain a verification result; when the verification result is that the verification is passed, the device information of the IoT device is sent to the terminal. In this way, the IoT device can send device information when the terminal is legal, thereby improving the success rate of device binding.

[0072] Figure 5 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 5 , the method can be executed by a processor of a computer device. Figure 1 The method further comprises steps S501 to S502, combining Figure 5 The steps shown are explained.

[0073] Step S501: continuously monitor the terminal through a near field communication NFC module.

[0074] Among them, Near Field Communication (NFC) is a short-range high-frequency wireless communication technology that allows contactless data exchange between electronic devices within a distance of a few centimeters.

[0075] In some embodiments, the terminal and the IoT device integrate NFC modules. After the NFC function is turned on, the IoT device can continuously monitor the terminal through the signal transmitted by the NFC module. When the distance between the terminal and the IoT device is less than a preset distance, the NFC module will sense the approach of the terminal.

[0076] Step S502: When monitoring that the terminal is close to the IoT device, receiving request data sent by the terminal through the NFC module.

[0077] In some embodiments, when the IoT device is not bound, the NFC function enters peer-to-peer mode, and data can be transmitted between the two devices through the NFC module. When the terminal is detected to be close to the IoT device, the terminal sends request data through the NFC module, and the IoT device receives the request data through the NFC module.

[0078] Among them, all data transmission in the device binding process is carried out through the NFC module between the terminal and the IoT device.

[0079] In the embodiment of the present application, the terminal is continuously monitored through the near field communication NFC module; when the terminal is monitored to be close to the IoT device, the request data sent by the terminal is received through the NFC module. In this way, data transmission based on NFC technology is realized to bind the IoT device to the terminal, solving the problems of cumbersome manual binding, low efficiency of Bluetooth network configuration, and certain security risks at the current stage.

[0080] Figure 6 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 6 , the method can be executed by a processor of a computer device. Figure 1 The method further comprises steps S601 to S603, combining Figure 6 The steps shown are explained.

[0081] Step S601: Based on the needs of the IoT device, information on whether the IoT device needs to be connected to the Internet is sent to the terminal.

[0082] Among them, the demand for IoT devices refers to whether the IoT devices need to be connected to the Internet.

[0083] In some embodiments, the IoT device can be connected to the Internet to achieve more functions. When the IoT device is able to connect to the Internet and is not currently connected to the network, the IoT device needs to send a connection requirement to the terminal to inform the terminal that the IoT device needs to connect to the Internet; when the IoT device does not need to connect to the Internet or is already connected to the network, the IoT device needs to send information that it does not need to connect to the network to the terminal.

[0084] Among them, the information that requires networking can be sent as “network required”, and the information that does not require networking can be sent as “network not required”.

[0085] Step S602: When the IoT device needs to be connected to the Internet, receive preset network information sent by the terminal.

[0086] The preset network information may be pre-set network information, such as wired network information (wired network address), wireless network information (wireless account, password).

[0087] In some embodiments, available network configuration information is preset in the terminal, and after receiving information that the IoT device needs to be connected to the Internet, the preset network information will be sent to the IoT device.

[0088] Step S603: configure the network of the IoT device based on the preset network information.

[0089] Among them, after receiving the preset network information, the Internet of Things device can configure the network of the Internet of Things device according to the preset network information to enable the Internet of Things device to connect to the network.

[0090] In the embodiment of the present application, based on the needs of the IoT device, information is sent to the terminal as to whether the IoT device needs to be connected to the Internet; if the IoT device needs to be connected to the Internet, the preset network information sent by the terminal is received; and the network of the IoT device is configured based on the preset network information. In this way, the networking function of the IoT device can be realized during the device binding process.

[0091] Figure 7 This is a schematic diagram of the implementation process of a device binding method provided in an embodiment of the present application. Figure 7 , the method may be executed by a processor of a computer device. Figure 7 As shown, the method is applied to a terminal, and the method includes S701 to S703, combining Figure 7 The steps shown are explained.

[0092] Step S701: During the binding process between the IoT device and the terminal, request data is sent to the IoT device.

[0093] When the terminal is bound to the IoT device, the terminal will first send a request data to the IoT device. After receiving the request data, the IoT device determines that the device binding can be started. The request data is the data mutually agreed upon by the terminal and the IoT device. For example, the request data can be a "Hello" message sent by the terminal.

[0094] Step S702: Receive a first signature sent by the IoT device; the first signature is generated by the IoT device through two hash operations based on the device identifier of the IoT device and the first interaction information.

[0095] Among them, the first signature is a digital signature generated by the IoT device during the interaction between the terminal and the IoT device, which is used by the terminal to determine the legitimacy of the IoT device.

[0096] When the IoT device is bound to the terminal, the terminal needs to determine the legitimacy of the IoT device. Therefore, the terminal will receive the first signature sent by the IoT device. The terminal can determine whether the IoT device is legitimate by verifying the first signature.

[0097] In some embodiments, when generating the first signature based on the first key, two hash operations are required. The first hash operation is performed based on the first key and the device identifier to obtain the second key; wherein the first key is used as the key and the device identifier is used as the data; the second hash operation is performed based on the second key and the first interactive information to obtain the first signature. wherein the second key is used as the key and the first interactive information is used as the data. After generating the first signature, the IoT device sends the first signature to the terminal, and the terminal verifies the first signature to determine the legitimacy of the IoT device. wherein the hash algorithm can be any algorithm such as SHA1, SHA256, SHA384, etc. the first hash operation and the second hash operation can be the same or different. the first hash operation and the second hash operation are agreed upon by the IoT device and the terminal.

[0098] In some embodiments, the device identification is used as a key, the first key is used as data, a hash operation is performed based on the device identification and the first key to obtain a hash value, and the hash value is used as a second key; a hash operation is performed based on the second key and the first interaction information to obtain a first signature.

[0099] Step S703: When the first signature verification passes, receive the device information sent by the IoT device, and complete binding with the IoT device based on the device information.

[0100] The device information is information related to device binding in the IoT device. The terminal can implement device binding according to the device information. Exemplarily, the device information is the serial number of the device.

[0101] In some embodiments, the terminal can obtain the second key obtained through the first hash operation and encryption from the cloud server, and the terminal knows the first interaction information generated during the interaction. After receiving the first signature, the terminal performs a hash operation based on the obtained second key and the known first interaction information to generate a new first signature. The terminal compares the new first signature with the first signature sent by the received IoT device, and determines that the first signature verification passes when the generated first signature is consistent with the received first signature. The terminal receives the device information sent by the IoT device.

[0102] In some embodiments, when the first signature generated by the terminal is inconsistent with the first signature sent by the received IoT device, it is determined that the first signature verification fails, the IoT device is an illegal device, and the terminal will not receive the first signature of the IoT device.

[0103] In some embodiments, after receiving the device information, the terminal can add the device information to the APP to complete the device binding, or upload the device information to the cloud server to complete the device binding through the cloud server.

[0104] In an embodiment of the present application, during the process of binding the IoT device with the terminal, request data is sent to the IoT device; a first signature sent by the IoT device is received; the first signature is generated by the IoT device through two hash operations based on the device identification of the IoT device and the first interaction information; when the first signature is verified, the device information sent by the IoT device is received, so that the terminal completes the binding with the IoT device based on the device information. In this way, the first signature is generated through two hash operations to ensure the accuracy and reliability of the signature, and the legitimacy of the device can be accurately verified based on the signature, while avoiding the exposure of important private data to the outside. After the signature verification is passed, the device information is received, and the binding of the terminal and the IoT device can be accurately realized.

[0105] In some embodiments, the first signature is obtained by performing a hash operation based on the second key and the first interaction information, and the second key is obtained by performing a hash operation based on the first key and the device identification.

[0106] The device identification and the first key are input into the hash algorithm, the hash algorithm outputs a hash value, and the hash value is used as the second key. The first interaction information and the second key are input into the hash algorithm, the hash algorithm outputs a hash value, and the hash value is used as the first signature.

[0107] In the embodiment of the present application, a hash operation is performed based on the first key and the device identification to obtain the second key; a hash operation is performed based on the second key and the first interactive information to obtain the first signature. In this way, an accurate signature can be generated based on the device identification and the first interactive information. During the signature generation process, the first key will not be exposed to the terminal, thereby improving the privacy of private data of the IoT device.

[0108] In some embodiments, the method further includes: receiving a parsing result sent by the IoT device; and verifying the first signature when the parsing result is a target result; the target result represents information agreed upon between the IoT device and the terminal.

[0109] The parsing result is the result obtained by the IoT device parsing the request data.

[0110] Among them, the terminal and the IoT device agree on some information that both parties need to interact during the device binding process according to the agreed agreement. The terminal receives the parsing result sent by the IoT device, compares the parsing result with the target result, and when it is determined that the parsing result is the target result, the IoT device is determined to be a legal device, and the first signature will be verified at this time; when it is determined that the parsing result is not the target result, the IoT device is determined to be not a legal device, and the first signature will not be verified at this time.

[0111] The IoT device sends the parsing result to the terminal, and the terminal can determine based on the parsing result that the IoT device has received the request data and has responded to the request data.

[0112] In the embodiment of the present application, the parsing result sent by the IoT device is received; when the parsing result is the target result, the first signature is verified; the target result represents the information agreed upon between the IoT device and the terminal. In this way, the terminal can determine the legitimacy of the IoT device based on the received parsing result, thereby improving the effectiveness of signature verification. When the parsing result is the target result, it can be determined that the IoT device has received the request data.

[0113] In some embodiments, the method also includes: sending a request for a second key corresponding to the device identifier to a cloud server; receiving the second key sent by the cloud server; verifying the first signature based on the second key, generating a second signature and sending the second signature to the IoT device.

[0114] The cloud server stores the first key and device identification of the IoT device, but the terminal cannot obtain the first key. Therefore, the terminal cannot directly generate the second key, and the terminal needs to send a request for the second key corresponding to the device identification to the cloud server. During the interaction between the terminal and the IoT device, the terminal will receive the device identification sent by the IoT device.

[0115] After receiving the request for the second key, the cloud server will perform a hash operation based on the first key and device identification of the IoT device to generate the second key, and send the second key to the terminal. The terminal receives the second key sent by the cloud server, and can verify the first signature and generate the second signature based on the second key.

[0116] The terminal performs a hash operation based on the second key and the first interactive information to obtain a new first signature, compares the new first signature with the first signature sent by the received IoT device, and determines that the first signature verification has passed if the new first signature is consistent with the received first signature. If the first signature verification has passed, a hash operation is performed based on the second signature and the second interactive information to obtain a second signature, and the second signature is sent to the IoT device.

[0117] In the embodiment of the present application, a request for the second key corresponding to the device identifier is sent to the cloud server; the second key sent by the cloud server is received; based on the second key, the first signature is verified, a second signature is generated, and the second signature is sent to the IoT device. By sending a request for the second key to the cloud server, the terminal can effectively obtain the second key.

[0118] In some embodiments, the method further includes: when the IoT device verifies the second signature and the verification result is verification passed, receiving device information sent by the IoT device.

[0119] After receiving the second signature, the IoT device will verify the second signature to determine the legitimacy of the terminal. The IoT device will send device information to the terminal only when it determines that the terminal is legitimate. Therefore, the terminal will receive the device information sent by the IoT device only when the IoT device verifies the second signature and the verification result is passed. The terminal can realize the binding of IoT devices based on the device information.

[0120] In the embodiment of the present application, when the IoT device verifies the second signature and the verification result is a passed verification, the device information sent by the IoT device is received. In this way, the terminal can receive the device information only after confirming the legitimacy of the terminal, thereby improving the binding efficiency of the terminal.

[0121] In some embodiments, the method further includes: sending the device information to a cloud server so that the cloud server adds the IoT device to the cloud server based on the device information.

[0122] Among them, after receiving the device information, the terminal can upload the device information to the cloud server. The cloud server adds the IoT device to the cloud server device list based on the device information to achieve device binding.

[0123] Among them, storing device information in the cloud server instead of the terminal locally can realize convenient access to device information. After logging into the APP, other terminals will synchronously obtain the latest device information stored in the cloud server device list, without the need to bind again, improving binding efficiency and robustness.

[0124] In the embodiment of the present application, the device information is sent to the cloud server so that the cloud server adds the IoT device to the cloud server based on the device information. In this way, the cloud server saves the device information to achieve device binding, facilitates quick access by the terminal, and improves binding efficiency and robustness.

[0125] In some embodiments, the method further includes: continuously monitoring the IoT device through a near field communication (NFC) module; and sending request data to the IoT device through the NFC module when it is monitored that the IoT device is close to the terminal.

[0126] Among them, the terminal and the IoT device are integrated with NFC modules. After turning on the NFC function, the terminal can continuously monitor the IoT device through the signal transmitted by the NFC module. When the distance between the terminal and the IoT device is less than the preset distance, the NFC module will sense the approach of the IoT device. When it is detected that the terminal is close to the IoT device, the terminal sends request data through the NFC module, and the IoT device receives the request data through the NFC module.

[0127] In the embodiment of the present application, the IoT device is continuously monitored through the near field communication NFC module; when the IoT device is monitored to be close to the terminal, the NFC module sends request data to the IoT device. In this way, data transmission based on NFC technology is realized to bind the IoT device to the terminal, solving the problems of cumbersome manual binding, low efficiency of Bluetooth network configuration, and certain security risks at the current stage.

[0128] In some embodiments, the method also includes: receiving information sent by the IoT device on whether the IoT device needs to be connected to the Internet; the information is sent by the IoT device based on the needs of the IoT device; if the IoT device needs to be connected to the Internet, sending preset network information to the IoT device; the preset network information is used to configure the network of the IoT device.

[0129] Among them, when the IoT device is able to connect to the Internet but is not currently connected to the network, the IoT device needs to send the networking requirement to the terminal to inform the terminal that the IoT device needs to connect to the Internet; when the IoT device does not need to connect to the Internet or is already connected to the network, the IoT device needs to send information that it does not need to connect to the network to the terminal.

[0130] The preset network information may be pre-set network information, such as wired network information (wired network address) and wireless network information (wireless account, password). The terminal presets available network configuration information, and after receiving information that the IoT device needs to be connected to the Internet, the preset network information will be sent to the IoT device. After receiving the preset network information, the IoT device can configure the network of the IoT device according to the preset network information to enable the IoT device to connect to the network.

[0131] In the embodiment of the present application, the information sent by the IoT device indicating whether the IoT device needs to be connected to the Internet is received; if the IoT device needs to be connected to the Internet, the preset network information is sent to the IoT device. In this way, the networking function of the IoT device can be realized during the device binding process.

[0132] In some embodiments, a device binding method is applied to a cloud server, the method comprising: in response to receiving a request for a second key corresponding to a device identifier sent by a terminal, generating a second key and sending the second key to the terminal.

[0133] In some embodiments, the method further includes: receiving device information sent by the terminal; adding the IoT terminal to the device list based on the device information, and sending information indicating successful addition to the terminal.

[0134] The following describes the application of the device binding method provided in the embodiment of the present application in a practical scenario.

[0135] When adding IoT devices on a daily basis, the common method is to manually enter the product serial number through the APP provided by the product, or to add the device by scanning the QR code, or by Bluetooth and other methods. Manually enter the serial number, that is, directly enter the serial number of the product on the APP to complete the addition. Scanning the QR code to add, the principle is similar to manually entering the serial number. The serial number information of the device is formed into a QR code or a QR code is formed after specific processing. For devices without screens, the QR code may be a paper QR code, and for devices with displays, it may be displayed on the screen. The Bluetooth adding method requires the device to broadcast Bluetooth, the smartphone to search for the device, and then the Bluetooth handshake is connected. After the connection is successful, some information is exchanged, and the smartphone can obtain product information and add the device to the APP.

[0136] These traditional methods usually have the following problems: 1. Manual input is prone to errors; 2. Paper barcodes or QR codes tend to turn yellow or scratch over time, making them difficult to identify; 3. The camera scanning process is slow, and some old mobile phones may have slow focusing and other problems that affect recognition; 4. The Bluetooth mode requires the device to broadcast first, and then the mobile phone discovers the device, and then a handshake connection is made. Due to the characteristics of Bluetooth, the broadcast distance is long, and within a certain range, there are many devices, which are prone to mutual interference, slow handshake process, and certain risks.

[0137] Near Field Communication (NFC) is an emerging technology that allows two NFC devices to exchange data when they are close to each other. In recent years, with the rapid development and popularization of smart devices, NFC technology has been widely used in mobile payment, electronic ticketing, access control and other scenarios.

[0138] The embodiment of the present application provides a method for quickly binding IoT products based on NFC technology, which can solve the problems of cumbersome manual binding, low efficiency of Bluetooth network configuration, and certain security risks at the current stage.

[0139] Figure 8 This is a schematic diagram of the IOT product quick binding process provided by the embodiment of this application. Figure 8 As shown, it includes steps S801 to S818:

[0140] Among them, the IOT device supports the NFC module, a smart phone that supports the NFC function, and an APP program corresponding to the embodiment of the present application is installed. When the IOT device is not added and bound, the NFC function enters the point-to-point mode.

[0141] Step S801: The smart phone is placed close to the IOT device and recognizes the NFC device;

[0142] Among them, the smartphone turns on the NFC function, opens the APP to add the device page, and approaches the device.

[0143] Step S802: The smart phone sends a request data "Hello" to the IOT device;

[0144] Among them, the IOT device detects the approach of NFC, the IOT reads the data, and the mobile phone APP sends the data.

[0145] Step S803: The NFC module of the IOT device recognizes that the smartphone is approaching, reads the data, and parses the data according to the agreed protocol;

[0146] Step S804: The IOT device generates a first signature and sends "Hello" data and the signature to the smart phone;

[0147] Among them, the IOT device and the smart phone use the protocol agreed by both parties for verification. If the verification passes, it means it is legal and can proceed to the next step. If the verification fails, it means it is an unknown device or an illegal protocol and no processing is done.

[0148] Among them, this solution uses NFC technology, which is not as fast as wireless LAN Wi-Fi and Bluetooth technology in terms of data transmission rate. Therefore, to verify the legitimacy of the device, the method of hashing the key data to obtain the summary and then digitally signing the summary is adopted.

[0149] Among them, when each device leaves the factory, it will register with the server through the device barcode to generate two unique parameters: deviceID and secretNo. These two unique parameters will be burned into each corresponding device and saved in the cloud server at the same time. Method for generating a signature: Use deviceID as the key, secretNo as the data, and use the hash HMAC algorithm to obtain the hash value. Using the above hash value as the key, some dynamic factors of the interaction between the device and the APP as data (can be a random number, or a time factor, or a combination of the two. The embodiment of the present application may adopt one or more of them and put them in different products), and then use the HMAC algorithm to obtain the hash value as the signature. The HMAC algorithm will select different schemes such as SHA1, SHA256, SHA384, etc. according to the product. The advantage of using the core data signature method is that the length of the generated data is fixed, and important data will not be exposed to the outside at will, and there is no need for both ends to encrypt and decrypt the data.

[0150] Step S805: The smartphone requests a signature key from the cloud server according to the deviceID;

[0151] Step S806: The smart phone receives the signature key sent by the cloud server;

[0152] Step S807: The smart phone verifies the first signature based on the signature key and obtains a verification success result;

[0153] Step S808: The smart phone generates a second signature based on the signature key, and sends the second signature to the IOT device;

[0154] Step S809: The IOT device verifies the second signature and obtains a verification success result;

[0155] Step S810: The IOT device sends device information to the smart phone;

[0156] Step S811, the smartphone executes the process of adding a device and sends device information to the cloud server;

[0157] After the verification process is passed, the mobile APP obtains the serial number of the IOT device, and the APP adds the serial number to the server. After the verification is passed, the mobile end will not save the device information locally in the APP. Instead, it notifies the cloud server to add the current device, indicating that the device binding is completed. At this time, when the web end and other APP ends refresh the request, they will obtain the latest device list of the cloud server, and you can see the newly added device on the page in real time. With the display of the cloud server device list, it means that the device binding is successful.

[0158] Step S812: The cloud server refreshes the cloud device list based on the device information;

[0159] Step S813: The cloud server sends a message indicating successful addition to the terminal;

[0160] Step S814: The terminal sends a message indicating that the addition is successful to the IOT device;

[0161] Step S815: The IOT device determines whether network information is needed according to the device requirements, and sends information on whether a network is needed to the smart phone;

[0162] Among them, according to the agreement, IOT devices can be connected to the Internet in advance. If the device is not connected to the network cable and is a WIFI device, the network information preset by the mobile phone (depending on the support of the IOT device, it can be wired address information or wireless hotspot account password) can be sent to the IOT device according to the protocol.

[0163] Step S816: When the IOT device needs network information, the smart phone sends the preset network information to the IOT device; when the IOT device does not need network information, the page prompts completion;

[0164] Step S817, the IOT device configures the network based on the preset network information;

[0165] Step S818: The smartphone waits for the device to connect to the Internet, and the APP can check the status and interact using Ethernet.

[0166] In the embodiments of the present application, compared with manual input, the problem of input errors is eliminated; compared with scanning code to add, the problem of barcode storage and other issues are solved; compared with Bluetooth mode, it has a shorter distance, so it is more secure; compared with Bluetooth broadcasting, then discovery, and then handshake interaction; it has a faster way, without the need for broadcasting and discovery, and can interact directly by approaching.

[0167] Fig. 9 A schematic diagram of the structure of a device binding system provided in an embodiment of the present application is shown in FIG. Fig. 9 As shown, the device binding system 900 includes: an Internet of Things device 910, a terminal 920, wherein:

[0168] The Internet of Things device 910 is used to generate a first signature through two hash operations based on the device identification of the Internet of Things device and the first interaction information in response to receiving the request data sent by the terminal during the binding process between the Internet of Things device and the terminal, and send the first signature to the terminal; the Internet of Things device 910 is also used to send the device information of the Internet of Things device to the terminal when the first signature verification passes, so that the terminal completes the binding with the Internet of Things device based on the device information;

[0169] Terminal 920 is used to send request data to the IoT device and receive a first signature sent by the IoT device during the process of binding the IoT device to the terminal; the terminal 920 is also used to receive device information sent by the IoT device when the first signature verification passes, so that the terminal completes the binding with the IoT device based on the device information.

[0170] In some embodiments, the IoT device 910 is further used to perform a hash operation based on the first key and the device identifier to obtain a second key; and perform a hash operation based on the second key and the first interaction information to obtain a first signature.

[0171] In some embodiments, the IoT device 910 is further used to parse the request data to obtain a parsing result; when the parsing result is a target result, the parsing result is sent to the terminal; the target result represents the information agreed upon between the IoT device and the terminal.

[0172] In some embodiments, the IoT device 910 is further used to receive a second signature sent by the terminal and verify the second signature to obtain a verification result when the first signature verification passes; and to send device information of the IoT device to the terminal when the verification result is verification passed.

[0173] In some embodiments, the Internet of Things device 910 is further used to continuously monitor the terminal through a near field communication NFC module; when it is monitored that the terminal is close to the Internet of Things device, the request data sent by the terminal is received through the NFC module.

[0174] In some embodiments, the Internet of Things device 910 is also used to send information to the terminal on whether the Internet of Things device needs to be connected to the Internet based on the needs of the Internet of Things device; when the Internet of Things device needs to be connected to the Internet, receive preset network information sent by the terminal; and configure the network of the Internet of Things device based on the preset network information.

[0175] In some embodiments, the first signature is obtained by performing a hash operation on the second key and the first interaction information, and the second key is obtained by performing a hash operation on the first key and the device identification.

[0176] In some embodiments, terminal 920 is further used to receive a parsing result sent by the IoT device; and to verify the first signature when the parsing result is a target result; and the target result represents information agreed upon between the IoT device and the terminal.

[0177] In some embodiments, terminal 920 is also used to send a request for a second key corresponding to the device identifier to the cloud server; receive the second key sent by the cloud server; based on the second key, verify the first signature, generate a second signature and send the second signature to the Internet of Things device.

[0178] In some embodiments, the terminal 920 is further configured to receive device information sent by the IoT device when the IoT device verifies the second signature and the verification result is verification passed.

[0179] In some embodiments, the terminal 920 is further used to send the device information to the cloud server, so that the cloud server adds the IoT device to the cloud server based on the device information.

[0180] In some embodiments, the terminal 920 is further used to continuously monitor the IoT device through a near field communication NFC module; when it is monitored that the IoT device is close to the terminal, request data is sent to the IoT device through the NFC module.

[0181] In some embodiments, terminal 920 is also used to receive information sent by the IoT device on whether the IoT device needs to be connected to the Internet; the information is sent by the IoT device based on the needs of the IoT device; when the IoT device needs to be connected to the Internet, preset network information is sent to the IoT device; the preset network information is used to configure the network of the IoT device.

[0182] In some embodiments, the device binding system further includes a cloud server, wherein the cloud server is configured to generate a second key and send the second key to the terminal in response to receiving a request for a second key corresponding to a device identifier sent by the terminal.

[0183] In some embodiments, the cloud server is further used to receive device information sent by the terminal; based on the device information, the IoT terminal is added to the device list, and a successful addition information is sent to the terminal.

[0184] Based on the foregoing embodiments, an embodiment of the present application provides a device binding device, which includes the units included and the modules included in the units, which can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0185] The embodiment of the present application provides a device binding apparatus for an Internet of Things device, including a generating module and a first sending module;

[0186] A generating module, configured to generate a first signature through two hash operations based on a device identifier of the IoT device and first interaction information in response to receiving request data sent by the terminal during the binding process of the IoT device and the terminal, and send the first signature to the terminal;

[0187] The first sending module is used to send the device information of the Internet of Things device to the terminal when the first signature verification passes, so that the terminal completes the binding with the Internet of Things device based on the device information.

[0188] In some embodiments, the generation module is further used to perform a hash operation based on the first key and the device identification to obtain a second key; and perform a hash operation based on the second key and the first interaction information to obtain a first signature.

[0189] In some embodiments, the generation module is further used to parse the request data to obtain a parsing result; if the parsing result is a target result, the parsing result is sent to the terminal; the target result represents the information agreed upon between the IoT device and the terminal.

[0190] In some embodiments, the first sending module is further used to receive a second signature sent by the terminal and verify the second signature to obtain a verification result when the first signature verification passes; and to send device information of the Internet of Things device to the terminal when the verification result is verification passed.

[0191] In some embodiments, the generating module is further used to continuously monitor the terminal through a near field communication (NFC) module; when it is monitored that the terminal is close to the IoT device, the generating module receives the request data sent by the terminal through the NFC module.

[0192] In some embodiments, the first sending module is also used to send information to the terminal on whether the Internet of Things device needs to be connected to the Internet based on the needs of the Internet of Things device; when the Internet of Things device needs to be connected to the Internet, receive preset network information sent by the terminal; and configure the network of the Internet of Things device based on the preset network information.

[0193] The embodiment of the present application provides a device binding apparatus for a terminal, comprising a second sending module and a receiving module;

[0194] A second sending module, used to send request data to the Internet of Things device during the process of binding the Internet of Things device with the terminal;

[0195] A receiving module is used to receive a first signature sent by the IoT device; the first signature is generated by the IoT device through two hash operations based on the device identification of the IoT device and the first interaction information; when the first signature is verified, the device information sent by the IoT device is received, and binding with the IoT device is completed based on the device information.

[0196] In some embodiments, the first signature is obtained by performing a hash operation based on a second key and the first interaction information, and the second key is obtained by performing a hash operation based on the first key and the device identification.

[0197] In some embodiments, the receiving module is further used to receive the parsing result sent by the IoT device; when the parsing result is the target result, the first signature is verified; the target result represents the information agreed upon by the IoT device and the terminal.

[0198] In some embodiments, the second sending module is also used to send a request for a second key corresponding to the device identifier to the cloud server; receive the second key sent by the cloud server; based on the second key, verify the first signature, generate a second signature and send the second signature to the Internet of Things device.

[0199] In some embodiments, the receiving module is further used to receive device information sent by the Internet of Things device when the Internet of Things device verifies the second signature and the verification result is verification passed.

[0200] In some embodiments, the second sending module is further used to send the device information to the cloud server, so that the cloud server adds the Internet of Things device to the cloud server based on the device information.

[0201] In some embodiments, the second sending module is also used to continuously monitor the Internet of Things device through a near field communication NFC module; when it is monitored that the Internet of Things device is close to the terminal, the second sending module sends request data to the Internet of Things device through the NFC module.

[0202] In some embodiments, the receiving module is also used to receive information sent by the IoT device indicating whether the IoT device needs to be connected to the Internet; the information is sent by the IoT device based on the needs of the IoT device; when the IoT device needs to be connected to the Internet, preset network information is sent to the IoT device; the preset network information is used to configure the network of the IoT device.

[0203] The embodiment of the present application provides a device binding apparatus of a cloud server, comprising a third sending module and an adding module;

[0204] A third sending module, configured to generate a second key and send the second key to the terminal in response to receiving a request for a second key corresponding to the device identifier sent by the terminal;

[0205] The adding module is used to receive the device information sent by the terminal; based on the device information, the IoT terminal is added to the device list, and a successful addition message is sent to the terminal.

[0206] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0207] It should be noted that in the embodiment of the present application, if the above-mentioned device binding method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0208] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0209] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0210] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0211] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0212] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0213] Fig.10 A hardware entity diagram of a computer device provided in an embodiment of the present application is shown in FIG. Fig.10 As shown, the hardware entity of the computer device 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

[0214] The memory 1002 stores computer programs that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and various modules in the computer device 1100 (for example, image data, audio data, voice communication data, and video communication data). This can be achieved through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0215] When the processor 1001 executes the program, the steps of any of the above-mentioned device binding methods are implemented. The processor 1001 generally controls the overall operation of the computer device 1000.

[0216] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the device binding method in any of the above embodiments.

[0217] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0218] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0219] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0220] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A device binding method, applied to IoT devices, characterized in that: The method comprises: During the binding process between the IoT device and the terminal, in response to receiving request data sent by the terminal, generating a first signature through two hash operations based on the device identifier of the IoT device and the first interaction information, and sending the first signature to the terminal; If the first signature verification passes, the device information of the Internet of Things device is sent to the terminal, so that the terminal completes the binding with the Internet of Things device based on the device information.

2. The method according to claim 1, characterized in that The generating of the first signature by performing two hash operations based on the device identification of the IoT device and the first interaction information includes: Performing a hash operation based on the first key and the device identifier to obtain a second key; A hash operation is performed based on the second key and the first interactive information to obtain a first signature.

3. The method according to claim 1, characterized in that Before sending the first signature to the terminal, the method further includes: Parsing the request data to obtain a parsing result; In the case where the parsing result is a target result, the parsing result is sent to the terminal; the target result represents the information agreed upon between the IoT device and the terminal.

4. The method according to claim 1, wherein The sending of the device information of the IoT device to the terminal when the first signature verification passes includes: If the first signature verification passes, receiving the second signature sent by the terminal, and verifying the second signature to obtain a verification result; If the verification result is that the verification is passed, the device information of the Internet of Things device is sent to the terminal.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Continuously monitoring the terminal through a near field communication (NFC) module; When it is monitored that the terminal is close to the Internet of Things device, the request data sent by the terminal is received through the NFC module.

6. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Based on the needs of the IoT device, sending information to the terminal as to whether the IoT device needs to be connected to the Internet; When the IoT device needs to be connected to the Internet, receiving preset network information sent by the terminal; The network of the Internet of Things device is configured based on the preset network information.

7. A device binding method, applied to a terminal, characterized in that: The method comprises: During the binding process between the IoT device and the terminal, sending request data to the IoT device; Receiving a first signature sent by the IoT device; the first signature is generated by the IoT device through two hash operations based on the device identifier of the IoT device and the first interaction information; If the first signature verification passes, the device information sent by the IoT device is received, and binding with the IoT device is completed based on the device information.

8. The method according to claim 7, characterized in that The first signature is obtained by performing a hash operation based on a second key and the first interaction information, and the second key is obtained by performing a hash operation based on the first key and the device identifier.

9. The method according to claim 7, characterized in that The method further comprises: Receiving the analysis result sent by the IoT device; When the parsing result is a target result, the first signature is verified; the target result represents the information agreed upon between the IoT device and the terminal.

10. The method according to claim 9, characterized in that The method further comprises: Sending a request for a second key corresponding to the device identifier to a cloud server; receiving the second key sent by the cloud server; The first signature is verified based on the second key, a second signature is generated, and the second signature is sent to the IoT device.

11. The method according to claim 10, characterized in that The method further comprises: When the IoT device verifies the second signature and the verification result is verification passed, the device information sent by the IoT device is received.

12. The method according to claim 11, characterized in that The method further comprises: The device information is sent to a cloud server, so that the cloud server adds the IoT device to the cloud server based on the device information.

13. The method according to any one of claims 7 to 12, characterized in that The method further comprises: Continuously monitoring the IoT device through a near field communication (NFC) module; When it is monitored that the IoT device is close to the terminal, request data is sent to the IoT device through the NFC module.

14. The method according to any one of claims 7 to 12, characterized in that The method further comprises: Receiving information sent by the IoT device indicating whether the IoT device needs to be connected to the Internet; the information is sent by the IoT device based on the needs of the IoT device; When the IoT device needs to be connected to the Internet, preset network information is sent to the IoT device; the preset network information is used to configure the network of the IoT device.

15. A device binding system, characterized in that: The system includes IoT devices and terminals; The IoT device is configured to, in response to receiving request data sent by the terminal during binding between the IoT device and the terminal, generate a first signature through two hash operations based on the device identifier of the IoT device and the first interaction information, and send the first signature to the terminal; and if the first signature passes verification, send the device information of the IoT device to the terminal, so that the terminal completes binding with the IoT device based on the device information; The terminal is configured to send request data to the IoT device and receive a first signature sent by the IoT device during the binding process between the IoT device and the terminal; When the first signature verification passes, the device information sent by the IoT device is received, so that the terminal completes binding with the IoT device based on the device information.

16. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 6 or 7 to 14 are implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 or 7 to 14 are implemented.

18. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 or 7 to 14 are implemented.