Binding method of Internet of Things equipment and computer equipment
By sending acquisition requests to two cloud servers and scanning image codes for binding, the existing IoT device binding methods are solved, and efficient and secure IoT device binding and control are achieved.
Patent Information
- Application Number
- CN202310724105.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-17
AI Technical Summary
The existing IoT device binding methods have problems such as Bluetooth technology and Zifeng technology, such as wireless communication technologies, such as low efficiency, cumbersome operation and insufficient security.
By sending acquisition requests to at least two cloud servers, receiving and displaying image codes, the user terminal scans the image code to obtain verification codes and binds them to the Internet of Things devices, establishing peer-to-peer network communications, simplifying the binding process and improving security.
It improves the binding efficiency and security of IoT devices, and is simple and convenient to operate. Users can directly control IoT devices through user terminals, improving the convenience of use and user experience.
Smart Images

Figure CN119155172A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Things, and in particular to a binding method for Internet of Things devices and a computer device. Background Art
[0002] With the development of IoT technology, there are more and more IoT devices, such as air conditioners, door locks, sweeping robots, etc., and the application of these IoT devices is becoming more and more extensive. In order to improve the convenience and safety of operating IoT devices, these IoT devices can be controlled through user terminals. Before the user terminal controls the IoT device, it is necessary to bind the user terminal to the IoT device. Current IoT devices usually use wireless communication technologies such as Bluetooth technology and Zigbee technology to achieve the binding between the user terminal and the IoT device.
[0003] However, the binding operation through wireless communication technologies such as Bluetooth technology and ZigBee technology is not convenient and the binding efficiency is not high. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a binding method and computer device for IoT devices, which can improve the binding efficiency of IoT devices.
[0005] In a first aspect, the present application provides a binding method for an Internet of Things device, the method comprising: sending a first acquisition request to at least two cloud servers; receiving an image code carrying a verification code generated by at least two cloud servers in response to the first acquisition request; displaying one of the received image codes on a display interface for a user terminal to scan the image code to obtain the verification code, thereby allowing the user terminal to send a binding request to bind to the Internet of Things device to the cloud server corresponding to the Internet Protocol address of the user terminal; receiving a binding result sent by the cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that it has been bound to the user terminal, establishing peer-to-peer network communication with the user terminal.
[0006] In a second aspect, the present application provides a binding method for an Internet of Things device, the method comprising: receiving a binding request sent by a user terminal and carrying a device identification and a verification code of the Internet of Things device; wherein the binding request is obtained by the user terminal scanning an image code displayed on the display interface of the Internet of Things device to obtain the device identification and the verification code, and is generated based on the device identification and the verification code; the image code is generated by this cloud server or other cloud servers in response to a first acquisition request sent by the Internet of Things device, and carries the device identification and the verification code; in response to the binding request, a binding operation is performed to bind the user terminal and the Internet of Things device based on the device identification and the verification code.
[0007] In a third aspect, the present application provides a binding method for an Internet of Things device, the method comprising: scanning an image code displayed on a display interface of the Internet of Things device to obtain a device identification and a verification code of the Internet of Things device; wherein the image code is generated by at least one cloud server in response to a first acquisition request sent by the Internet of Things device, and carries the device identification and the verification code; sending a binding request carrying the device identification and the verification code to the cloud server corresponding to the Internet Protocol address of the user terminal; receiving a binding result sent by the cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that it has been bound to the Internet of Things device, establishing peer-to-peer network communication with the Internet of Things device.
[0008] In a fourth aspect, the present application provides a computer device, which includes a memory and a processor, wherein the memory is coupled to the processor, the memory stores a computer program, and the processor is used to execute the computer program to implement the method as described above.
[0009] The beneficial effects of the present application are as follows: Different from the prior art, a first acquisition request is sent to at least two cloud servers through an IoT device, so that at least two cloud servers generate image codes in response to the first acquisition request, and the IoT device receives and displays one of the image codes received from the cloud server on the display interface, the image code carries a verification code pointing to the IoT device, and the verification code corresponds to the IoT device to be bound, so that the user terminal can obtain the verification code by scanning the image code, and sends a binding request to the cloud server corresponding to the Internet Protocol address of the user terminal, and then the IoT device receives the binding result indicated by the cloud server that it has been bound to the user terminal, and establishes peer-to-peer network communication with the user terminal. Through the above method, from the user's perspective, the user only needs to scan the image code displayed on the display interface of the IoT device through the user terminal to bind with the IoT device, which is simple and convenient to operate, and the binding efficiency of the IoT device is high. In addition, after binding, peer-to-peer network communication is established between the IoT device and the user terminal, so that direct communication between the user terminal and the IoT device can be realized, and the user can directly control the IoT device through the user terminal, effectively improving the convenience and operability of using the IoT device, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a flow chart of the first embodiment of the method for binding an IoT device of the present application;
[0011] Figure 2 This is a schematic diagram of the timing of the process of the first embodiment of the method for binding an IoT device of the present application;
[0012] Figure 3 This is a flow chart of the second embodiment of the method for binding an IoT device of the present application;
[0013] Figure 4 This is a flow chart of the second embodiment of the method for binding an IoT device of the present application;
[0014] Figure 5 This is a flowchart of the third embodiment of the method for binding an IoT device of the present application;
[0015] Figure 6 It is a schematic block diagram of the circuit structure of an embodiment of a computer device of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] With the development of IoT technology, there are more and more IoT devices, and various IoT devices are gradually entering people's lives. Before using IoT devices, users usually need to bind their user terminals with IoT devices, and then use the user terminals to control IoT devices to achieve different functions. For example, the user terminal can be used to control the opening or temperature adjustment of air conditioners, and the user terminal can be used to control the door locks and door openings. At present, users usually use wireless communication technologies such as Bluetooth technology and ZigBee technology to bind IoT devices.
[0018] After long-term research, the inventors of this application have found that binding IoT devices through wireless communication technology usually requires both the user terminal and the IoT device to turn on wireless communication such as Bluetooth and match the connection, and then verify by entering a password or other methods to complete the binding. The steps are relatively cumbersome, and such a method relies on a good wireless connection environment. When the wireless connection environment at the user's location is not good, it is very likely that the binding cannot be completed due to difficulty in matching the connection. In addition, connecting through wireless communication technology to bind IoT devices can easily lead to unrestricted binding and unbinding of IoT devices, which can lead to the loss of IoT devices or the misappropriation of IoT devices by others, and security cannot be guaranteed, resulting in poor user experience. Based on this, the present application proposes the following solution to solve the above technical problems.
[0019] The IoT device 10 described in the IoT device embodiment of the present application can be bound to the user terminal 20, and after binding, a peer-to-peer network communication (Peer-To-Peer, P2P) is established between the IoT device 10 and the user terminal 20, so that information can be transmitted between the IoT device 10 and the user terminal 20 through the peer-to-peer network communication. The IoT device 10 can have a display interface to display an image code for the user terminal 20 to scan, thereby realizing the binding between the IoT device 10 and the user terminal 20. The image code can be, for example, a QR code. The user terminal 20 can be a mobile terminal, a computer or other terminal, etc. The mobile terminal can be a mobile phone, a laptop computer, a tablet computer, a smart wearable device, etc., and the computer can be a desktop computer, etc.
[0020] The cloud server 30 is used to collect and store relevant data of the IoT device 10 and the user terminal 20 and to perform calculations, processing and management on the data, and to perform corresponding binding operations on the IoT device 10 and the user terminal 20 .
[0021] For details, please refer to the following description of the embodiment of the binding method of the Internet of Things device of the present application.
[0022] like Figure 1 and Figure 2 As shown, the first embodiment of the method for binding an IoT device of the present application can use the IoT device 10 as the execution subject, and the method for binding an IoT device described therein may include:
[0023] S100: Send a first acquisition request to at least two cloud servers.
[0024] S200: Receiving an image code carrying a verification code generated by at least two cloud servers in response to a first acquisition request.
[0025] S300: Displaying one of the received image codes on a display interface so that the user terminal can scan the image code to obtain a verification code, thereby enabling the user terminal to send a binding request to bind to the IoT device to a cloud server corresponding to the Internet Protocol address of the user terminal.
[0026] S400: receiving a binding result sent by a cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that the user terminal has been bound, establishing peer-to-peer network communication with the user terminal.
[0027] The IoT device sends a first acquisition request to at least two cloud servers, so that at least two cloud servers generate image codes in response to the first acquisition request. The IoT device receives and displays one of the image codes received from the cloud server on the display interface. The image code carries a verification code pointing to the IoT device, so that the user terminal can obtain the device identification and verification code by scanning the image code. The verification code corresponds to the IoT device to be bound, and sends a binding request to the cloud server corresponding to the Internet Protocol address of the user terminal. Subsequently, the IoT device receives the binding result indicated by the cloud server that it has been bound to the user terminal, and establishes peer-to-peer network communication with the user terminal. Through the above method, from the user's perspective, the user only needs to scan the image code displayed on the display interface of the IoT device through the user terminal to bind with the IoT device. The operation is simple and convenient, and the binding efficiency of the IoT device is high. In addition, after binding, peer-to-peer network communication is established between the IoT device and the user terminal, so that direct communication between the user terminal and the IoT device can be realized. The user can directly control the IoT device through the user terminal, effectively improving the convenience and operability of using the IoT device and improving the user experience.
[0028] The following is a detailed description of an embodiment of a method for binding an IoT device of the present application.
[0029] S100: Send a first acquisition request to at least two cloud servers.
[0030] Before receiving the image code from the cloud server 30, the IoT device 10 needs to send a first acquisition request to at least two cloud servers 30. Optionally, the IoT device 10 can send the first acquisition request to at least two cloud servers 30 by connecting to WIFI.
[0031] Since the IoT device 10 will be sold and used in different countries and regions, the Internet Protocol addresses of the user terminals 20 are also different. In order to improve data processing efficiency and reduce the difficulty of data storage and processing, different countries and regions have different cloud servers 30, that is, different Internet Protocol addresses correspond to different cloud servers 30. For example, the cloud server 30 with an Internet Protocol address pointing to Country A and the cloud server 30 with an Internet Protocol address pointing to Country B are different cloud servers 30. Each cloud server 30 is independent, and the data in different cloud servers 30 are also independent. When the IoT device 10 is manufactured, it is not known which country or region the user will purchase and use it. In order to facilitate the management of the relevant data of the IoT device 10, the IoT device 10 is usually factory-set to initialize an Internet Protocol address for it, so that it can access the cloud server 30 corresponding to the initialized Internet Protocol address without being bound by the user terminal 20. The Internet Protocol address is, for example, a domain name address.
[0032] The Internet Protocol address initialized by the IoT device 10 and the Internet Protocol address of the user terminal 20 may not be the same Internet Protocol address, which will result in the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20 being unable to obtain relevant information of the IoT device 10 when the IoT device 10 only sends the first acquisition request to the cloud server 30 corresponding to the initialized Internet Protocol address, and the data of each cloud server 30 is independent, which may cause subsequent binding failure. The IoT device 10 sends the first acquisition request to at least two cloud servers 30, so that multiple cloud servers 30 can obtain relevant information of the IoT device 10, reducing the possibility of binding failure due to inconsistency between the Internet Protocol address of the IoT device 10 and the Internet Protocol address of the user terminal 20, and effectively improving the binding efficiency of the IoT device 10.
[0033] The number of at least two cloud servers 30 can be, for example, two, three, four, five, etc., and can also be other numbers. The number of at least two cloud servers 30 can be related to the total number of cloud servers 30, for example, the number of at least two cloud servers 30 can be equal to the total number of cloud servers 30.
[0034] Optionally, the first acquisition request may carry a device identifier and a preset characteristic value. For details, see the following steps included in S100:
[0035] S110: Sending a first acquisition request carrying a device identifier and a preset feature value to at least two cloud servers, so that the at least two cloud servers can generate the same verification code using the same preset feature value, thereby enabling the at least two cloud servers to generate an image code carrying the same device identifier and verification code.
[0036] The device identification is the device information of the IoT device 10, which can be compared to the "ID number" of the IoT device 10. The device identification of each IoT device 10 is unique and does not overlap with the device identification of other IoT devices 10. The device identification can be the serial number (SN) of the IoT device 10, the MAC address (WIFI MAC) of the WIFI network card, or the physical address (BT MAC) of the Bluetooth adapter, or other device information, or of course, a collection of multiple device information.
[0037] The preset characteristic value is data randomly generated by the IoT device 10 and is used to assist the cloud server 30 in generating a verification code. The same preset characteristic value will cause the cloud server 30 to generate the same verification code.
[0038] After at least two cloud servers 30 receive the first acquisition request sent by the Internet of Things device 10, they obtain the device identification and preset characteristic value of the Internet of Things device 10. Each cloud server 30 generates the same verification code with the assistance of the preset characteristic value. Therefore, each cloud server 30 stores the same device identification and verification code for binding the Internet of Things device 10 with the user terminal 20, and the device identification and verification code carried by the generated image code are the same.
[0039] S200: Receiving an image code carrying a verification code generated by at least two cloud servers in response to a first acquisition request.
[0040] The IoT device 10 receives image codes generated by at least two cloud servers 30 , wherein the number of image codes is the same as the number of at least two cloud servers 30 , that is, each cloud server 30 that receives the first acquisition request sent by the IoT device 10 generates an image code.
[0041] S300: Displaying one of the received image codes on a display interface so that the user terminal can scan the image code to obtain a verification code, thereby enabling the user terminal to send a binding request to bind to the IoT device to a cloud server corresponding to the Internet Protocol address of the user terminal.
[0042] Because the preset characteristic value carried by the first acquisition request sent to each cloud server 30 is the same, although the specific data of the image code generated by each cloud server 30 is different, the verification code carried is the same, that is, the user terminal 20 will obtain the same verification code after scanning any one of these image codes and decrypting it.
[0043] Optionally, the device identification and verification code carried by the image code generated by each cloud server 30 are the same, and the IoT device 10 can display the image code generated by any cloud server 30 on the display interface, so that the user terminal 20 can scan the image code to obtain the same device identification and the same verification code, so that the user terminal sends a binding request to the cloud server 30 corresponding to the Internet Protocol address of the user terminal, that is, the user terminal 20 sends a binding request to the cloud server 30 corresponding to its Internet Protocol address, and the binding request carries the device identification and verification code obtained by scanning the image code. Because each of the at least two cloud servers 30 stores the device identification and verification code required for binding, regardless of whether the Internet Protocol address of the user terminal 20 is the same as the Internet Protocol address initialized by the IoT device 10, the subsequent verification and binding process can be carried out smoothly, effectively improving the binding efficiency of the IoT device 10 and reducing the possibility of binding failure of the IoT device 10.
[0044] S400: receiving a binding result sent by a cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that the user terminal has been bound, establishing peer-to-peer network communication with the user terminal.
[0045] The IoT device 10 may receive a binding result sent by the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20 . If the binding result indicates that the IoT device 10 has been bound to the user terminal 20 , the IoT device 10 establishes peer-to-peer network communication with the user terminal 20 .
[0046] Optionally, the IoT device 10 may establish peer-to-peer network communication with the user terminal 20 by receiving the authentication key sent by the cloud server 30. For details, see the following steps included in S400:
[0047] In response to the binding result indicating that the terminal has been bound to the user terminal, S410 is executed: receiving an authentication key sent by a cloud server corresponding to the Internet Protocol address of the user terminal.
[0048] In response to the binding result indicating that the IoT device 10 has been bound to the user terminal 20 , the IoT device 10 receives the authentication key sent by the cloud server 30 that returns the binding result. The cloud server 30 may be the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20 .
[0049] S420: After receiving the authentication key, a second acquisition request for acquiring peer communication service configuration information is sent to a cloud server corresponding to the Internet Protocol address of the user terminal.
[0050] After the IoT device 10 receives the authentication key, the IoT device 10 processes the authentication key and sends a second acquisition request to the cloud server 30 that sent the authentication key. The cloud server 30 may be the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20. The second acquisition request is directed to acquiring peer-to-peer communication service configuration information, which is used for the IoT device 10 and the user terminal 20 to establish peer-to-peer network communication. The peer-to-peer communication service configuration information may be, for example, a P2P server program (P2P Server) or a P2P client program (P2P Client), or other information.
[0051] S430: Receive peer communication service configuration information sent by the cloud server corresponding to the Internet Protocol address of the user terminal in response to the second acquisition request, and start the peer communication service based on the peer communication service configuration information to establish peer network communication with the user terminal.
[0052] The IoT device 10 can receive the peer communication service configuration information sent by the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20 in response to the second acquisition request, and start the peer communication service based on the peer communication service configuration information so as to establish peer network communication with the user terminal 20.
[0053] Optionally, the IoT device 10 may obtain the binding result by querying at least two cloud servers 30 whether it has been bound to the user terminal 20. Specifically, the IoT device 10 may query at least two cloud servers 30 at preset intervals to determine whether it has been bound to the user terminal 20, that is, at each preset interval, the IoT device 10 queries each of the at least two cloud servers 30 to determine whether it has been bound to the user terminal 20.
[0054] In response to the binding result indicating that the image code is not bound to the user terminal 20 and the display duration of the image code reaches the preset expiration duration set for the image code, S100 is executed again: sending a first acquisition request to at least two cloud servers.
[0055] In order to ensure the security of the user terminal 20 binding with the IoT device 10 by scanning the image code and prevent users who are not users of the IoT device 10 from stealing the image code and binding with the IoT device 10, the cloud server 30 sets a preset expiration time for the image code when generating it. Within the preset expiration time, the user terminal 20 can bind with the IoT device 10 by scanning the image code, and if the preset expiration time is exceeded, the image code becomes invalid, and the user terminal 20 cannot bind with the IoT device 10 by scanning the image code, effectively reducing the possibility of others stealing the image code and binding with the IoT device 10, and effectively improving the security of binding with the IoT device 10.
[0056] like Figure 3 and Figure 4 As shown, the second embodiment of the binding method of the Internet of Things device of the present application can use the cloud server 30 as the execution body, and the method described can include the following steps.
[0057] M110: Receive the first acquisition request sent by the IoT device.
[0058] The cloud server receives a first acquisition request sent by the IoT device to generate an image code for scanning by the user terminal.
[0059] Optionally, the cloud server 30 receives a first acquisition request carrying a device identifier and a preset characteristic value sent by the IoT device 10, thereby generating an image code carrying the device identifier and a verification code. Specifically, the cloud server 30 generates a matching verification code based on the preset characteristic value, and generates an image code carrying the device identifier and the verification code. In some embodiments, because the verification code is generated with the assistance of a preset characteristic value, the same preset characteristic value will cause the cloud server 30 to generate the same verification code, then the IoT device 10 may send a first acquisition request carrying a device identifier and a preset characteristic value to this cloud server 30 and other cloud servers 30, and all cloud servers 30 that receive the first acquisition request generate an image code carrying the same device identifier and verification code. Among them, the number of other cloud servers is at least one, and can be one, two, three, four, and of course other numbers.
[0060] Optionally, the cloud server 30 receives a first acquisition request carrying a device identification sent by the IoT device 10 to generate an image code. For details, see the following steps included in M110:
[0061] M120: In response to the first acquisition request, generate an image code carrying a device identification and a verification code.
[0062] Since the first acquisition request only carries the device identification but not the preset characteristic value, the cloud server 30 randomly generates a verification code and generates an image code carrying the device identification and the verification code. At this time, since the verification code is randomly generated, in order to ensure the smooth progress of the binding and avoid confusion in the subsequent binding due to multiple verification codes, the IoT device 10 only sends the first acquisition request carrying the device identification to the cloud server 30 corresponding to the initialized Internet Protocol address, that is, the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10.
[0063] Optionally, when the cloud server 30 generates the image code, it sets a preset expiration time for it to improve the security of subsequent binding operations. For details, see the following steps included in M110:
[0064] M130: Get a random code and set a preset expiration time, and generate an image code carrying the device identification and verification code based on the random code and the preset expiration time.
[0065] The cloud server 30 generates a random code and sets a preset expiration time for the random code. The image code carrying the device identification and verification code generated based on the random code also has a preset expiration time. Within the preset expiration time, the user terminal 20 can obtain the device identification and verification code by scanning the image code. If the preset expiration time is exceeded, the image code becomes invalid, and the user terminal 20 cannot obtain the device identification and verification code by scanning the image code, thereby effectively ensuring the timeliness of the image code and reducing the occurrence of situations such as others secretly taking pictures of the image code and causing non-owners of the IoT device 10 to bind the IoT device 10, which is beneficial to improving the security of the binding between the IoT device 10 and the user terminal 20.
[0066] M140: Send the image code to the IoT device, so that the IoT device selectively displays an image code on the display interface.
[0067] The cloud server 30 sends the image code to the IoT device 10 , so that the IoT device 10 selectively displays an image code on the display interface.
[0068] In some embodiments, when the IoT device 10 only sends the first acquisition request carrying the device identification to the cloud server 30, the IoT device 10 only receives an image code sent by the cloud server 30, and the IoT device 10 displays the image code on the display interface. At this time, the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10.
[0069] In other embodiments, when the IoT device 10 sends a first acquisition request carrying a device identifier and a preset feature value to both the cloud server 30 and other cloud servers 30, the IoT device 10 receives at least two image codes sent by the cloud server 30 and other cloud servers 30, and the IoT device 10 selectively displays one image code on the display interface. That is, the image code displayed on the display interface of the IoT device 10 at this time may be generated by the cloud server 30 in response to the first acquisition request sent by the IoT device 10, or may be generated by other cloud servers 30 in response to the first acquisition request sent by the IoT device 10.
[0070] M100: Receive a binding request sent by a user terminal that carries the device identification and verification code of the IoT device.
[0071] The cloud server 30 receives a binding request sent by the user terminal 20 that carries the device identification and verification code of the IoT device 10. The binding request is generated by the user terminal 20 scanning the image code displayed on the display interface of the IoT device 10 to obtain the device identification and verification code, and is based on the device identification and verification code. The image code scanned by the user terminal 20 is generated by this cloud server 30 or other cloud servers 30 in response to the first acquisition request sent by the IoT device 10, and carries the device identification and verification code. The cloud server 30 receives the binding request sent by the user terminal 20, indicating that the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20.
[0072] In some embodiments, the IoT device 10 only sends a first acquisition request carrying the device identification to the cloud server 30. At this time, the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10. If the cloud server 30 receives a binding request sent by the user terminal 20 at this time, the cloud server 30 is also the cloud server 30 corresponding to the Internet Protocol address of the location of the user terminal 20, that is, the Internet Protocol address initialized by the IoT device 10 and the Internet Protocol address of the user terminal 20 are the same Internet Protocol address, and the corresponding cloud servers 30 are all the cloud server 30.
[0073] In other embodiments, the IoT device 10 sends a first acquisition request carrying a device identifier and a preset characteristic value to the cloud server 30 and other cloud servers 30. If the cloud server 30 receives a binding request sent by the user terminal 20 at this time, the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20. However, at this time, the cloud server 30 may be the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10, or it may not be.
[0074] M200: In response to the binding request, a binding operation is performed to bind the user terminal and the IoT device based on the device identification and the verification code.
[0075] After receiving the binding request, the cloud server 30 responds to the binding request, determines and verifies the device identification and the verification code, and performs a binding operation to bind the user terminal 20 and the IoT device 10 after the verification is passed.
[0076] Optionally, before performing the binding operation, the cloud server 30 needs to determine whether the cloud server 30 stores a device identification and a verification code corresponding to the binding operation, so as to bind the user terminal 20 and the IoT device 10. For details, refer to the following steps included in M200.
[0077] M210: Determine whether the device identification and verification code are stored, or verify whether the device identification and verification code are consistent with the stored device identification and verification code.
[0078] If not stored or inconsistent, execute M220: obtain device identification and verification code from other cloud servers.
[0079] When the IoT device 10 sends the first acquisition request only to the cloud server 30 corresponding to the initialized Internet Protocol address, if the cloud server 30 is not the cloud server 30 corresponding to the initialized Internet Protocol address, the cloud server 30 does not store the device identification and verification code, or the stored device identification and verification code are inconsistent with those carried in the binding request. At this time, the cloud server 30 obtains the device identification and verification code required to perform the binding operation from other cloud servers 30.
[0080] M230: Verify the device identification and verification code obtained from other cloud servers and user terminals, and bind the user terminal and IoT device after the verification is consistent.
[0081] After receiving the device identification and verification code sent by other cloud servers 30, this cloud server 30 uses the device identification and verification code to verify the device identification and verification code carried in the binding request sent by the user terminal 20. If the two are consistent, the verification passes, and this cloud server 30 performs the binding operation to bind the user terminal 20 and the Internet of Things device 10.
[0082] Optionally, the cloud server 30 may send a binding result to the IoT device by receiving and responding to the query information sent by the IoT device 10. For details, see the following steps included in M200.
[0083] M240: Receives query information sent by the IoT device to inquire whether it is bound to the user terminal.
[0084] The IoT device 10 may poll at least one cloud server 30 at preset intervals to determine whether it has been bound to the user terminal 20. That is, at each preset interval, the IoT device 10 sends query information to each of the at least one cloud server 30 to inquire whether it has been bound to the user terminal 20. The at least one cloud server 30 may include the present cloud server 30 or other cloud servers 30.
[0085] In some embodiments, the IoT device 10 only sends a first acquisition request carrying a device identifier to the cloud server 30. At this time, the cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10. When sending query information, the IoT device 10 also only sends it to the cloud server 30.
[0086] In other embodiments, the IoT device 10 sends a first acquisition request carrying a device identification and a preset characteristic value to the current cloud server 30 and other cloud servers 30. At this time, regardless of whether the current cloud server 30 is the cloud server 30 corresponding to the Internet Protocol address initialized by the IoT device 10, the IoT device 10 will send query information to all cloud servers 30 that have sent the first acquisition request, including the current cloud server 30.
[0087] M250: In response to the query information, sends a binding result to the IoT device.
[0088] In response to receiving the query information from the IoT device 10 , the cloud server 30 sends a corresponding binding result to the IoT device 10 , for example, the binding result indicates that the IoT device 10 has been bound to the user terminal 20 , or that the IoT device 10 has not been bound to the user terminal 20 .
[0089] If the binding result indicates that the IoT device 10 has been bound to the user terminal 20 , execute M260 : send the authentication key to the IoT device.
[0090] M270: Receive a second acquisition request for acquiring peer communication service configuration information sent by the Internet of Things device after receiving the authentication key.
[0091] After the IoT device 10 receives the authentication key, the IoT device 10 performs data processing on the authentication key and sends a second acquisition request to the cloud server 30 that sent the authentication key.
[0092] M280: In response to the second acquisition request, send peer communication service configuration information to the Internet of Things device.
[0093] The second acquisition request is directed to acquiring peer-to-peer communication service configuration information, which is used for establishing peer-to-peer network communication between the IoT device 10 and the user terminal 20. The peer-to-peer communication service configuration information may be, for example, a P2P server program (P2P Server) or a P2P client program (P2P Client), or other information.
[0094] like Figure 5 As shown, the third embodiment of the method for binding an IoT device of the present application can be performed by the user terminal 20, and the method described can include the following steps.
[0095] N100: Scan the image code displayed on the display interface of the IoT device to obtain the device identification and verification code of the IoT device.
[0096] The user terminal 20 scans the image code displayed on the display interface of the IoT device 10 to perform corresponding data decoding processing on the image code, thereby obtaining the device identification and verification code carried in the image code. The image code is generated by the cloud server 30 in response to the first acquisition request sent by the IoT device 10, and carries the device identification and verification code, which point to the IoT device 10 whose display interface is scanned by the user terminal 20.
[0097] N200: Send a binding request carrying a device identification and a verification code to the cloud server corresponding to the Internet Protocol address of the user terminal.
[0098] After obtaining the device identification and verification code, the user terminal 20 sends a binding request to the cloud server 30 corresponding to its Internet Protocol address, and the binding request carries the device identification and verification code.
[0099] N300: Receive a binding result sent by a cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that the user terminal has been bound to the IoT device, establish peer-to-peer network communication with the IoT device.
[0100] The user terminal receives a binding result sent by a cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that it has been bound to the IoT device, establishes peer-to-peer network communication with the IoT device.
[0101] Optionally, after the user terminal 20 establishes peer-to-peer network communication with the IoT device 10, the user terminal 20 determines whether its Internet Protocol address is the same as the Internet Protocol address initialized by the IoT device 10. If not, the user terminal 20 sends a change instruction to the IoT device 10, so that the IoT device 10 changes the Internet Protocol address from the initialized Internet Protocol address to the Internet Protocol address of the user terminal 20. At this time, the Internet Protocol addresses of the two are the same, and the corresponding cloud servers 30 are also the same.
[0102] The following is an exemplary description of an embodiment of a binding method for an IoT device.
[0103] In some embodiments, Figure 2As shown, the IoT device 10 sends a first acquisition request carrying a device identifier and a preset feature value to at least two cloud servers 30, and each of the at least two cloud servers 30 generates an image code carrying the same device identifier and verification code, and sends the image code to the IoT device 10, and the IoT device 10 selectively displays the at least two received image codes on the display interface. The user terminal 20 scans and decodes the image code displayed on the display interface of the IoT device 10, obtains the device identifier and verification code therefrom, and sends a binding request carrying the device identifier and verification code to the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20, and the cloud server 30 verifies the device identifier and verification code to bind the user terminal 20 and the IoT device 10. The IoT device 10 queries at least two cloud servers 30 at preset intervals whether it has been bound to the user terminal 20, and the cloud server 30 corresponding to the Internet Protocol address of the user terminal 20 sends a binding result of binding to the IoT device 10 in response to the query information, and sends an authentication key to the IoT device 10. After receiving the binding result and authentication key indicating that the binding has been completed, the IoT device 10 sends a second acquisition request to the cloud server 30 that sent the binding result and authentication key. The cloud server 30 sends peer communication service configuration information to the IoT device 10 in response to the second acquisition request. The IoT device 10 starts the peer communication service based on the peer communication service configuration information so as to be able to establish peer network communication with the user terminal 20.
[0104] In other embodiments, Figure 4As shown, the IoT device 10 only sends a first acquisition request carrying a device identifier to the cloud server 30 corresponding to the initialized Internet Protocol address. The cloud server 30 generates an image code carrying a device identifier and a verification code in response to the first acquisition request, and sends the image code to the IoT device 10, which displays the image code on the display interface. The user terminal 20 scans and decodes the image code to obtain the device identifier and verification code, and sends a binding request carrying the device identifier and verification code to the cloud server 30 corresponding to the Internet Protocol address at the location of the user terminal 20. If the Internet Protocol address at the location of the user terminal 20 is not the same as the Internet Protocol address initialized by the IoT device 10, the cloud server 30 that receives the binding request does not store the device identifier and verification code for binding, then the cloud server 30 obtains the device identifier and verification code from other cloud servers 30, and verifies the obtained device identifier and verification code with the device identifier and verification code carried in the binding request, and binds the user terminal 20 and the IoT device 10 after the verification is consistent. The IoT device 10 may query the cloud server 30 corresponding to the initialized Internet Protocol address at preset intervals whether it has been bound to the user terminal 20. The cloud server 30 may obtain the binding result from other cloud servers 30 and send it to the IoT device 10, and send the authentication key to the IoT device 10. After receiving the binding result and the authentication key indicating that it has been bound, the IoT device 10 may send a second acquisition request to the cloud server 30 that sent the binding result and the authentication key. The cloud server 30 sends the peer-to-peer communication service configuration information to the IoT device 10 in response to the second acquisition request. The IoT device 10 starts the peer-to-peer communication service based on the peer-to-peer communication service configuration information so as to be able to establish peer-to-peer network communication with the user terminal 20.
[0105] like Figure 6 As shown, the computer device 100 described in the computer device embodiment of the present application can be an Internet of Things device 10, a user terminal 20, or a cloud server 30. The computer device 100 includes a processor 110 and a memory 120. The memory 120 is coupled to the processor 110. The processor 110 and the memory 120 can be connected via a bus or a signal line.
[0106] The memory 120 stores a computer program, which may be a RAM, a ROM, or other types of storage devices. Specifically, the memory 120 may include one or more computer-readable storage media, which may be non-transitory. The memory 120 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 120 is used to store at least one program code.
[0107] The processor 110 is used to execute computer programs, and the processor 110 may also be referred to as a CPU (Central Processing Unit). The processor 110 may be an integrated circuit chip having signal processing capabilities. The processor 110 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 110 may also be any conventional processor, etc.
[0108] The processor 110 is used to execute the computer program stored in the memory 120 to implement the processing method described in the embodiment of the sound comparison processing method of the present application.
[0109] In the several embodiments provided in the present application, it should be understood that the disclosed audio processing device and the sound comparison processing method can be implemented in other ways. For example, the various embodiments of the audio processing device described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for binding an Internet of Things device, characterized in that: include: Sending a first acquisition request to at least two cloud servers; receiving an image code carrying a verification code generated by the at least two cloud servers in response to the first acquisition request; Displaying one of the received image codes on a display interface so that the user terminal can scan the image code to obtain the verification code, thereby causing the user terminal to send a binding request to bind with the IoT device to the cloud server corresponding to the Internet Protocol address of the user terminal; Receive a binding result sent by the cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that the user terminal has been bound, establish peer-to-peer network communication with the user terminal.
2. The method according to claim 1, characterized in that The sending a first acquisition request to at least two cloud servers includes: The first acquisition request carrying the device identification and the preset characteristic value is sent to the at least two cloud servers, so that the at least two cloud servers can generate the same verification code using the same preset characteristic value, thereby enabling the at least two cloud servers to generate the image code carrying the same device identification and the verification code.
3. The method according to claim 2, characterized in that The step of displaying one of the received image codes on the display interface comprises: The image code generated by any of the cloud servers is displayed on the display interface, so that the user terminal can scan the image code to obtain the same device identification and the same verification code, thereby enabling the user terminal to send the binding request to the cloud server corresponding to the Internet Protocol address of the user terminal.
4. The method according to claim 1, characterized in that: Before receiving the binding result bound to the user terminal and sent by the cloud server corresponding to the Internet Protocol address of the user terminal, the method includes: The at least two cloud servers are queried to determine whether they are bound to the user terminal.
5. The method according to claim 4, characterized in that The querying of the at least two cloud servers as to whether they are bound to the user terminal includes: At preset intervals, the at least two cloud servers are queried respectively to determine whether they are bound to the user terminal.
6. The method according to claim 1, characterized in that The step of establishing peer-to-peer network communication with the user terminal in response to the binding result indicating that the user terminal has been bound, comprises: In response to the binding result indicating that the user terminal has been bound, receiving an authentication key sent by the cloud server corresponding to the Internet Protocol address of the user terminal; After receiving the authentication key, sending a second acquisition request for acquiring peer-to-peer communication service configuration information to the cloud server corresponding to the Internet Protocol address of the user terminal; Receive the peer communication service configuration information sent by the cloud server corresponding to the Internet Protocol address of the user terminal in response to the second acquisition request, and start the peer communication service based on the peer communication service configuration information to establish peer network communication with the user terminal.
7. The method according to claim 1, characterized in that The method further comprises: In response to the binding result indicating that the image code is not bound to the user terminal, and the display duration of the image code reaches the preset expiration duration set for the image code, the first acquisition request is sent to at least two cloud servers again.
8. A method for binding an Internet of Things device, characterized in that: include: Receive a binding request sent by a user terminal and carrying a device identification and a verification code of the IoT device; wherein the binding request is obtained by the user terminal by scanning an image code displayed on a display interface of the IoT device, and is generated based on the device identification and the verification code; the image code is generated by the cloud server or other cloud servers in response to a first acquisition request sent by the IoT device, and carries the device identification and the verification code; In response to the binding request, a binding operation of binding the user terminal and the Internet of Things device is performed based on the device identification and the verification code.
9. The method according to claim 8, characterized in that Before receiving the binding request sent by the user terminal and carrying the device identification and verification code of the Internet of Things device, the method includes: Receiving the first acquisition request sent by the Internet of Things device; In response to the first acquisition request, generating the image code carrying the verification code; The image code is sent to the IoT device, so that the IoT device selectively displays one of the image codes on the display interface.
10. The method according to claim 9, characterized in that The receiving the first acquisition request sent by the Internet of Things device includes: Receiving the first acquisition request sent by the IoT device and carrying the device identifier and the preset characteristic value; The generating the image code carrying the device identification and the verification code comprises: The matching verification code is generated based on the preset feature value, and the image code carrying the device identification and the verification code is generated.
11. The method according to claim 9, characterized in that After the binding operation of binding the user terminal and the IoT device is performed, the method further includes: Receiving query information sent by the Internet of Things device to inquire whether it is bound to the user terminal; In response to the query information, a binding result is sent to the Internet of Things device.
12. The method according to claim 11, characterized in that After sending the binding result to the IoT device, the method further includes: If the binding result indicates that the IoT device has been bound to the user terminal, sending an authentication key to the IoT device; Receiving a second acquisition request for acquiring peer communication service configuration information sent by the Internet of Things device after receiving the authentication key; In response to the second acquisition request, peer communication service configuration information is sent to the Internet of Things device.
13. The method according to claim 9, characterized in that The receiving the first acquisition request sent by the IoT device and carrying at least the device identification includes: Receiving the first acquisition request carrying the device identification sent by the Internet of Things device; The generating the image code carrying the device identification and the verification code comprises: The verification code is randomly generated, and the image code carrying the device identification and the verification code is generated.
14. The method according to claim 10 or 13, characterized in that The generating the image code carrying the device identification and the verification code comprises: A random code is obtained and a preset expiration time is set, and the image code carrying the device identification and the verification code is generated based on the random code and the preset expiration time.
15. The method according to claim 8, characterized in that The image code is generated by the cloud server or the other cloud server in response to a first acquisition request sent by the IoT device and carrying at least the device identifier; The binding operation of binding the user terminal and the Internet of Things device based on the device identifier and the verification code includes: Determining whether the device identification and the verification code are stored, or verifying whether the device identification and the verification code are consistent with the stored device identification and verification code; If not stored or inconsistent, obtaining the device identification and the verification code from the other cloud server; The device identification and the verification code obtained from the other cloud server and the user terminal are verified, and the user terminal and the Internet of Things device are bound after the verification is consistent.
16. A method for binding an Internet of Things device, characterized in that: include: Scanning an image code displayed on a display interface of the IoT device to obtain a device identification and a verification code of the IoT device; wherein the image code is generated by at least one cloud server in response to a first acquisition request sent by the IoT device, and carries the device identification and the verification code; Sending a binding request carrying the device identifier and the verification code to a cloud server corresponding to the Internet Protocol address of the user terminal; Receive a binding result sent by the cloud server corresponding to the Internet Protocol address of the user terminal, and in response to the binding result indicating that it has been bound to the Internet of Things device, establish peer-to-peer network communication with the Internet of Things device.
17. A computer device, characterized in that: It comprises a memory and a processor; the memory is coupled to the processor, the memory stores a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1-18.
