Equipment binding method, server and Internet of Things equipment
By dividing the binding process of IoT devices into two parts, first accessing the communication channel and then binding, the problem of the device being unable to bind in a weak network state is solved, and the binding stability and user experience are improved.
Patent Information
- Application Number
- CN202510090565.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-16
AI Technical Summary
During the binding process of IoT devices, the device is in a weak or uninterrupted state, resulting in the inability to use and communicate normally, affecting the user experience.
A device binding method is proposed, which is divided into two parts to execute: first, after receiving the activation request of the Internet of Things device, the server returns to the network access permission to allow the device to access the first communication channel; second, the server performs a binding operation after monitoring that the device has successfully connected to the communication channel.
Through asynchronous binding, the stability and reliability of device binding are improved, the system performance bottlenecks in high concurrency environments are reduced, and the user experience is not affected by the device network conditions.
Smart Images

Figure CN120017669A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of IoT device management, and in particular to a device binding method, a server, and an IoT device. Background Art
[0002] With the rapid development of IoT technology, IoT devices are increasingly used in daily life and industrial fields. However, during the device binding process, the server may have successfully bound the IoT device to the user account, but because the IoT device is in a weak network or no network state, it fails to successfully connect to the server's communication channel, resulting in the IoT device being unable to use and communicate normally even though the server has completed the binding. Summary of the invention
[0003] The present disclosure provides a device binding method, a server, and an Internet of Things device to solve or alleviate one or more technical problems in the prior art.
[0004] In a first aspect, the present disclosure provides a device binding method, applied to a server, comprising:
[0005] In response to receiving an activation request from the IoT device, based on device information of the IoT device and account information of the user account in the activation request, storing binding information between the IoT device and the user account;
[0006] Sending a network access permission to the IoT device; wherein the network access permission is used for the IoT device to access the first communication channel; the first communication channel is used for sending and receiving business data between the IoT device and the server;
[0007] When it is detected that the IoT device is connected to the first communication channel, the IoT device and the user account are bound based on the binding information.
[0008] In a second aspect, the present disclosure provides a device binding method, which is applied to an IoT device, comprising:
[0009] Sending an activation request to the server; wherein the activation request includes device information of the IoT device and account information of the user account; the device information of the IoT device and the account information of the user account are used by the server to determine binding information between the IoT device and the user account;
[0010] Receive a network access permission from a server, and access a first communication channel based on the network access permission to trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
[0011] In a third aspect, the present disclosure provides a server, including:
[0012] A storage module, configured to, in response to receiving an activation request from the Internet of Things device, store binding information between the Internet of Things device and the user account based on device information of the Internet of Things device and account information of the user account in the activation request;
[0013] A network access permission sending module is used to send a network access permission to an IoT device; wherein the network access permission is used for the IoT device to access a first communication channel; and the first communication channel is used for sending and receiving business data between the IoT device and the server;
[0014] The binding module is used to bind the IoT device and the user account based on the binding information when it is detected that the IoT device is connected to the first communication channel.
[0015] In a fourth aspect, the present disclosure provides an Internet of Things device, including:
[0016] An activation request sending module, used to send an activation request to a server; wherein the activation request includes device information of the IoT device and account information of the user account; the device information of the IoT device and the account information of the user account are used by the server to determine the binding information between the IoT device and the user account;
[0017] The binding trigger module is used to receive a network access permission from a server, access a first communication channel based on the network access permission, and trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
[0018] In a fifth aspect, a server is provided, including:
[0019] at least one processor; and
[0020] a memory communicatively connected to the at least one processor; wherein,
[0021] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0022] In a sixth aspect, an Internet of Things device is provided, including:
[0023] at least one processor; and
[0024] a memory communicatively connected to the at least one processor; wherein,
[0025] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0026] In a seventh aspect, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute any method according to the embodiments of the present disclosure.
[0027] In an eighth aspect, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements any method according to the embodiments of the present disclosure.
[0028] The beneficial effects of the technical solution provided by the present disclosure include at least: the binding process of the IoT device can be divided into two parts: first, when the server receives the activation request sent by the IoT device, the server can return the network access permission, so that the IoT device can use the network access permission to communicate with the server. Secondly, the server monitors the first communication channel used by the IoT device, and the server performs the binding operation only after the IoT device successfully connects to the first communication channel. In this method of asynchronous device binding, the usable state of the IoT device and the user device is synchronized with the binding state in the server, which improves the stability and reliability of device binding, effectively disperses the system load, reduces the system performance bottleneck problem in a high-concurrency environment, and ensures that the user's experience after binding the IoT device will not be affected by the network status of the IoT device during binding.
[0029] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments provided according to the present disclosure and should not be regarded as limiting the scope of the present disclosure.
[0031] Figure 1 is a schematic diagram of a device binding method provided by an embodiment of the present disclosure;
[0032] Figure 2 is a schematic diagram of a device binding method provided by another embodiment of the present disclosure;
[0033] Figure 3 is a schematic diagram of an application example of the device binding method provided by an embodiment of the present disclosure;
[0034] Figure 4 is a schematic block diagram of a server provided in an embodiment of the present disclosure;
[0035] Figure 5is a schematic block diagram of a server provided by another embodiment of the present disclosure;
[0036] Figure 6 is a schematic block diagram of an Internet of Things device provided by an embodiment of the present disclosure;
[0037] Figure 7 It is a block diagram of an electronic device used to implement the device binding method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] The present disclosure will be further described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0039] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present disclosure.
[0040] In order to facilitate understanding of the device binding method provided by the embodiment of the present disclosure, the related technologies of the embodiment of the present disclosure are explained below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiment of the present disclosure as optional solutions, and they all belong to the protection scope of the embodiment of the present disclosure.
[0041] In related technologies, IoT device binding usually relies on synchronous requests, that is, the IoT device and the user account are bound at the same time as the server receives the binding request. However, this may lead to system performance bottlenecks in a high-concurrency environment. Due to the strong coupling between the systems, consistency problems are prone to occur, resulting in the IoT device's binding status being out of sync with the server's binding status. There may be delays, and the operation steps are complicated, making system maintenance difficult, affecting user experience. In addition, during the IoT device binding process, if the IoT device is in a weak network or no network state, the IoT device may not be able to successfully connect to the server's communication channel, resulting in the IoT device being unable to use and communicate normally.
[0042] The device binding method provided by the embodiment of the present disclosure can divide the binding process of the IoT device into two parts: First, when the server receives the activation request sent by the IoT device, the server can return the network access permission, so that the IoT device can use the network access permission to communicate with the server. Secondly, the server can monitor the first communication channel used by the IoT device, and the server will perform the binding operation only after the IoT device successfully connects to the first communication channel. In this method of asynchronous device binding, the usable state of the IoT device and the user device are synchronized with the binding state in the server, which improves the stability and reliability of device binding, effectively disperses the system load, reduces the system performance bottleneck problem in a high-concurrency environment, and ensures that the user's experience after binding the IoT device will not be affected by the network status of the IoT device during binding.
[0043] The device binding method provided in the embodiment of the present disclosure can be applied to the management of various IoT devices, and has strong versatility and scalability. For example, IoT devices may include, for example, IPC (Internet Protocol Camera), wearable devices, electric meters, household appliances, etc. In practical applications, the binding strategy can be flexibly adjusted according to the specific application scenario to meet the needs of different types of IoT devices and network environments.
[0044] Figure 1 FIG. 1 is a schematic diagram showing a device binding method provided by an embodiment of the present disclosure. The method can be applied to a server. Figure 1 As shown, the method may include the following steps S110 to S130.
[0045] Step S110: In response to receiving an activation request from the Internet of Things device, based on the device information of the Internet of Things device and the account information of the user account in the activation request, storing the binding information between the Internet of Things device and the user account.
[0046] Optionally, the user can use an APP (Application) to start binding the IoT device with the user account. The APP can obtain the device information of the IoT device based on the information read from the IoT device or the information input by the user, thereby confirming the IoT device to be bound, and sending the account information of the user account to the IoT device. Optionally, the device information of the IoT device can also be sent. After obtaining the device information and account information, the IoT device can send an activation request to the server. Optionally, the activation request can be sent to the server via HTTP (HyperText TransferProtocol).
[0047] Optionally, the server may be a remote server, a cloud server, etc. In some descriptions, a cloud server may also be referred to as a cloud server.
[0048] In the embodiment of the present disclosure, when the server receives an activation request from an IoT device, it can determine the binding information between the IoT device and the user account based on the device information of the IoT device and the account information of the user account, and store the binding information without binding the IoT device first.
[0049] Optionally, the IoT device may determine device information of the IoT device and account information of the user account in the activation request by decoding the activation request.
[0050] In the disclosed embodiment, the activation request may include device information of the IoT device and account information of the user account. Optionally, the device information of the IoT device may include an ID (Identification) of the device, and the account information of the user account may include a user ID. The server may associate the device ID with the user ID to determine the stored binding information.
[0051] Among them, the user can open an APP (Application) on the user device to scan the QR code of the IoT device, or manually enter the device information to obtain the device information of the IoT device, and the user can open the APP on the user device to log in to obtain the account information of the user account.
[0052] Optionally, the device information of the IoT device may include a serial number, a unique identifier (UID), a device version, a device type, and other information that can identify the IoT device.
[0053] Optionally, the account information of the user account may include the account code (eg, a character string), user name, UID, and other information that can identify the user account.
[0054] Step S120: Send a network access license to the IoT device; wherein the network access license is used for the IoT device to access the first communication channel; the first communication channel is used for sending and receiving business data between the IoT device and the server.
[0055] In the disclosed embodiment, the server may generate a network access permission based on the device information of the IoT device, and then send the network access permission to the IoT device. Optionally, the server may send the network access permission to the IoT device via HTTP.
[0056] Correspondingly, the IoT device can receive the network access permission. When the network status of the IoT device is normal, the IoT device can use the network access permission to establish a first communication channel with the server, that is, the IoT device accesses the first communication channel.
[0057] Optionally, the IoT device may send an online notification to the server based on the first communication channel. When the server receives the online notification, it may be regarded that the server detects that the IoT device has accessed the first communication channel.
[0058] In actual applications, after binding, the business data between the IoT device and the server can be sent and received through the first communication channel, so that the IoT device can be used and communicated normally. For example, the business data may include instructions sent by the server to the IoT device, and may also include information reported by the IoT device to the server.
[0059] Step S130: When it is detected that the IoT device is connected to the first communication channel, the IoT device and the user account are bound based on the binding information.
[0060] In the disclosed embodiment, the server can monitor in real time whether the IoT device is connected to the first communication channel. When it is detected that the IoT device is not connected to the first communication channel, it can indicate that the network status of the IoT device is poor or there is no network, and the server does not bind the IoT device to the user account. Until the server detects that the IoT device is connected to the first communication channel, it can indicate that the network status of the IoT device is normal, and the IoT device can communicate through the first communication channel, so that the server can read the previously stored binding information and bind the IoT device to the user account.
[0061] Optionally, after the server successfully binds the IoT device to the user account, the server may inform the user that the binding with the IoT device is successful.
[0062] The device binding method provided by the embodiment of the present disclosure can divide the binding process of the IoT device into two parts: First, when the server receives the activation request sent by the IoT device, the server can return the network access permission, so that the IoT device can use the network access permission to communicate with the server. Secondly, the server monitors the first communication channel used by the IoT device, and the server performs the binding operation only after the IoT device successfully connects to the first communication channel. In this method of asynchronous device binding, the usable state of the IoT device and the user device are synchronized with the binding state in the server, which improves the stability and reliability of device binding, effectively disperses the system load, reduces the system performance bottleneck problem in a high-concurrency environment, and ensures that the user's experience after binding the IoT device will not be affected by the network status of the IoT device during binding.
[0063] In some embodiments, step S110, in response to receiving an activation request from an IoT device, storing binding information between the IoT device and the user account based on device information of the IoT device and account information of the user account in the activation request, includes:
[0064] In response to receiving an activation request from an IoT device, determining the legitimacy of the IoT device based on device information of the IoT device in the activation request;
[0065] In the case where the legitimacy of the IoT device is positive information, the binding information between the IoT device and the user account is stored based on the device information of the IoT device in the activation request and the account information of the user account.
[0066] In the disclosed embodiment, the legitimacy of the IoT device may include whether the IoT device is an authorized device, that is, whether the IoT device is in the authorization list of the manufacturer or the server. When the IoT device is in the authorization list of the manufacturer or the server, the legitimacy of the IoT device can be determined as positive information; when the IoT device is not in the authorization list of the manufacturer or the server, the legitimacy of the IoT device can be determined as negative information.
[0067] Optionally, the device information may include a serial number, a UID, a device version, a device type, etc. of the IoT device, and the server may determine the legitimacy of the IoT device based on any at least one of the above device information.
[0068] According to the above embodiment, by verifying the legitimacy of the IoT device, it is possible to effectively prevent the binding of IoT devices that do not have legitimacy, thereby further improving the reliability of binding the IoT device.
[0069] In some embodiments, the device binding method further includes:
[0070] When the IoT device and the user account are successfully bound, a successful binding notification is sent to the user device based on the user account.
[0071] In the embodiment of the present disclosure, when the server successfully binds the IoT device and the user account, the user can view the successful binding notification displayed in the user account through the user device, so that the user can subsequently control the IoT device through the user account.
[0072] According to the above embodiment, the server can notify the user that the binding is successful, so that after the binding is successful, the user can manage and control the IoT device through the user account, further improving the user experience.
[0073] In some embodiments, when the IoT device and the user account are successfully bound, the server can first send a successful binding notification to the IoT device. When the IoT device is monitored to receive the successful binding notification through the first communication channel, for example, when the binding confirmation information sent by the IoT device is received, a successful binding notification is sent to the user device based on the user account, thereby ensuring that the usable status of the IoT device and the binding status in the server are synchronized, further improving the user experience.
[0074] In some embodiments, the first communication channel is a communication channel based on the MQTT (Message Queuing Telemetry Transport) protocol or the WebSocket protocol.
[0075] In the disclosed embodiments, the MQTT protocol and the WebSocket protocol use smaller data packets. Business data reception and transmission between IoT devices and servers can be achieved through the MQTT protocol or the WebSocket protocol, which can reduce network overhead, thereby reducing the load of data transmission and improving data transmission efficiency.
[0076] Figure 2 FIG. 1 is a schematic diagram showing a device binding method provided by another embodiment of the present disclosure. The method can be applied to IoT devices. Figure 2 As shown, the method may include the following steps S210 to S220.
[0077] Step S210: sending an activation request to the server; wherein the activation request includes device information of the IoT device and account information of the user account; the device information of the IoT device and the account information of the user account are used by the server to determine binding information between the IoT device and the user account;
[0078] Prior to the disclosed embodiment, a user could use an APP to start binding an IoT device with a user account. Optionally, the user could scan a QR code of the IoT device on the user device, or manually input device information to obtain device information of the IoT device, and the user could open the APP on the user device to log in and obtain account information of the user account.
[0079] In the disclosed embodiment, the IoT device may send an activation request to the server after receiving the device information and account information sent by the APP. The activation request may include the device information of the IoT device and the account information of the user account.
[0080] Accordingly, when the server receives an activation request from the IoT device, the server can store the binding information between the IoT device and the user account based on the device information of the IoT device and the account information of the user account in the activation request, and send a network access permit to the IoT device.
[0081] Step S220, receiving a network access permission from the server, and accessing a first communication channel based on the network access permission to trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
[0082] In the disclosed embodiment, the IoT device can receive a network access permission. When the network status of the IoT device is normal, the IoT device can use the network access permission to establish a first communication channel with the server, that is, the IoT device accesses the first communication channel based on the network access permission. Optionally, the IoT device can receive the network access permission sent by the IoT device via HTTP.
[0083] Accordingly, when the server detects that the IoT device is connected to the first communication channel, the server can bind the IoT device and the user account based on the binding information.
[0084] In the device binding method provided by the embodiment of the present disclosure, the IoT device can send an activation request to the server so that the server returns the network access permission, and then the IoT device can use the permission to communicate with the server, so that the server can perform the binding operation only when the IoT device successfully connects to the first communication channel. In this device asynchronous binding method, the usable state of the IoT device and the user device is synchronized with the binding state in the server, which improves the stability and reliability of device binding, effectively disperses the system load, reduces the system performance bottleneck problem in a high-concurrency environment, and ensures that the user's experience after binding the IoT device will not be affected by the network status of the IoT device during binding.
[0085] In some embodiments, step S210, sending an activation request to a server, includes:
[0086] Accessing a second communication channel based on a connection between a user device corresponding to the user account;
[0087] Based on the second communication channel, an activation request is sent to the server.
[0088] In the disclosed embodiment, when the user starts binding (for example, scanning the QR code of the IoT device, or manually inputting the device information), the user device can be connected to the IoT device based on the device information, and the IoT device can access the second communication channel. The second communication channel and the first communication channel can be constructed based on different communication protocols. Only when the IoT device can access the second communication channel and the first communication channel can the IoT device and the user account be bound.
[0089] Optionally, the APP can notify the IoT device via message push or short messaging service (SMS). If the IoT device receives the above notification, it can be regarded as the IoT device is connected to the user device, and then the IoT device can access the second communication channel and send an activation request to the server based on the second communication channel.
[0090] According to the above embodiment, the IoT device can access the second communication channel and send an activation request to the server in response to the user starting binding, thereby further improving data transmission efficiency.
[0091] In some embodiments, the second communication channel is a communication channel based on the HTTP protocol.
[0092] In the disclosed embodiment, the IoT device may send an activation request to the server via the HTTP protocol, thereby achieving cross-platform data transmission and improving data transmission efficiency and security.
[0093] In some embodiments, the first communication channel is a communication channel based on the MQTT protocol or the WebSocket protocol.
[0094] In the disclosed embodiments, the MQTT protocol and the WebSocket protocol use smaller data packets. Business data reception and transmission between IoT devices and servers can be achieved through the MQTT protocol or the WebSocket protocol, which can reduce network overhead, thereby reducing the load of data transmission and improving data transmission efficiency.
[0095] In order to more clearly understand the technical solution of the embodiment of the present disclosure, a specific application example is provided below. Figure 3 A schematic diagram of the device binding method is shown in FIG. Figure 3 As shown, the device binding method may include the following steps S310-S390:
[0096] Step S310: The user uses the APP to bind the IoT device to the user account;
[0097] Step S320, the APP notifies the IoT device user that it is ready to start binding;
[0098] Step S330: The IoT device requests the server to activate and bind the device via HTTP protocol;
[0099] Step S340, the logic of the server may include: the server only activates the device, does not bind the device, and temporarily stores the binding relationship;
[0100] Step S350: The server issues a network access permit to the IoT device, allowing the IoT device to access the network for communication;
[0101] Step S360: The IoT device uses the network access permission to communicate with the first communication channel;
[0102] Step S370: The server detects that the IoT device has communicated normally, obtains previously stored binding information, and binds the user account to the IoT device;
[0103] Step S380: The server notifies the IoT device that the binding is successful;
[0104] Step S390: The server informs the user that the binding is successful; wherein, the user may be notified of the successful binding through the APP, and the user may confirm that the device is successfully bound in the APP.
[0105] According to the above embodiment, the device-side available status and the server binding status can be synchronized, avoiding the problem of inconsistent status on both sides, improving user experience and reducing customer complaints. At the same time, by separating the device activation and binding processes, the system performance bottleneck problem in a high-concurrency environment is reduced, ensuring the stability and reliability of the system.
[0106] In order to describe the device binding method provided by the present disclosure in detail, two application examples are provided below. The two application examples adopt similar methods, but are adjusted in certain parameters and details to adapt to different application scenarios.
[0107] Application example 1:
[0108] Step 1: The user uses the APP to start binding the IoT device with the user account. First, the user opens the APP on his mobile phone and performs a preliminary binding between the IoT device and the user account by scanning the QR code or manually entering the device serial number.
[0109] Step 2: The APP notifies the IoT device that the user is ready to start binding. Specifically, after the user completes the initial binding, the APP sends a binding preparation notification to the IoT device, and the IoT device enters the binding preparation state after receiving the notification.
[0110] Step 3: The IoT device requests the server to activate and bind the device through the HTTP protocol. That is, after receiving the binding preparation notification, the IoT device sends a device activation request to the server. The activation request may include necessary information such as the device serial number, device model, and account information.
[0111] Step 4: Server logic may include:
[0112] 4.1. The server only activates IoT devices and does not bind IoT devices. After receiving the device activation request, the server first verifies the legitimacy of the IoT device. If the legitimacy of the IoT device is positive, the server confirms the activation status of the IoT device.
[0113] 4.2. The server temporarily stores the binding information between the IoT device and the user account. That is, the server temporarily stores the user ID and device ID in the database.
[0114] Step 5: The server issues a network access license to the IoT device. The server returns the generated network access license to the IoT device via the HTTP protocol, and the IoT device parses and stores it after receiving it.
[0115] Step 6: The IoT device uses the network access permission to communicate with the server based on the first communication channel. Specifically, the IoT device uses the network access permission to establish a connection with the first communication channel through the MQTT protocol or other applicable communication protocols, and sends a communication request.
[0116] Step 7: The server detects that the IoT device has communicated normally, obtains the previously stored binding relationship, and binds the IoT device to the user account. Specifically, the server monitors the communication status of the IoT device, and after confirming that the IoT device has communicated normally, obtains the binding information from the temporary storage, and completes the binding of the IoT device to the user account.
[0117] Step 8: The server informs the user and the IoT device that the binding is successful. Specifically, after completing the binding operation, the server sends a binding success notification to the APP corresponding to the IoT device and the user account. After the IoT device receives the notification, the APP can prompt the user with the binding success notification, and the user can confirm the successful device binding in the APP to complete the entire binding process.
[0118] Application example 2:
[0119] Step 1: The user uses the APP to start binding the IoT device with the user account. Specifically, the user can enter the unique identification code and account information of the IoT device in the APP to perform a preliminary binding association.
[0120] Step 2: The APP notifies the user of the IoT device that it is ready to start binding. Specifically, the APP can notify the IoT device to enter the binding preparation state through message push or short message service.
[0121] Step 3: The IoT device requests the server to activate and bind the device through the HTTP protocol. Specifically, after receiving the binding preparation notification, the IoT device sends an activation request containing device UID, device version, device type, account information, etc. to the server.
[0122] Step 4: Server logic may include:
[0123] 4.1. The server only activates IoT devices and does not bind IoT devices. After verifying the device information, the server only activates the IoT device and does not bind it.
[0124] 4.2. The server temporarily stores the binding information between the IoT device and the user account. That is, the server stores the binding information in a temporary database, waiting for subsequent processing.
[0125] Step 5: The server issues a network access permission to the IoT device. Specifically, after the IoT device receives the network access permission returned by the server, it is stored in the memory of the IoT device.
[0126] Step 6: The IoT device uses the network access permission to communicate with the first communication channel. Specifically, the IoT device uses the network access permission to establish a connection with the first communication channel through the WebSocket protocol and sends a communication request.
[0127] Step 7: The server detects that the IoT device has communicated normally, obtains the previously stored binding information, and binds the IoT device to the user account. Specifically, the server monitors the connection status of the IoT device in real time, and after confirming that the IoT device has communicated normally, reads the binding information from the temporary database to complete the binding of the IoT device and the user account.
[0128] Step 8: The server informs the user and the IoT device that the binding is successful. Specifically, after the server completes the binding operation, it sends a binding success notification to the APP corresponding to the IoT device and the user account. After the IoT device receives the notification, the APP can display the binding success notification to the user. The user can confirm that the device is successfully bound in the APP, completing the entire binding process.
[0129] It can be seen that the device binding method provided by the present disclosure can have the following beneficial effects:
[0130] 1. Improve system performance: The present disclosure divides the binding process of IoT devices into two parts. The IoT device first requests device activation through the HTTP protocol, and the server returns the network access permission. The IoT device uses the permission to communicate with the server. Then the server monitors the first communication channel used by the IoT device. When it detects that the IoT device has communicated, it obtains the binding information stored in the server and associates the IoT device with the user account. This asynchronous binding method effectively disperses the system load and reduces the system performance bottleneck problem in a high-concurrency environment.
[0131] 2. Reduce consistency issues: Since the activation and binding of IoT devices are separated, the server performs the binding operation only after the IoT device successfully connects to the communication channel, avoiding the problem of inconsistent binding status caused by strong coupling between systems. This ensures that the available status of the device is consistent with the binding status of the server, improving the stability and reliability of the system.
[0132] 3. Improve user experience: Through asynchronous binding, IoT devices can be used and communicate normally after activation even in weak or no network conditions. That is, the binding operation is performed after the IoT device is successfully connected to the first communication channel, ensuring that the user experience after device activation will not be affected by network conditions, reducing user waiting time and operation complexity.
[0133] 4. Reduce maintenance complexity: The asynchronous binding method simplifies the operation steps in the device binding process and reduces the complexity of system maintenance. The server only needs to monitor the communication status of the IoT device and complete the binding operation at the appropriate time, which improves the automation of the system and reduces the workload of maintenance personnel.
[0134] 5. Reduce customer complaint rate: By improving the success rate and stability of device binding, it ensures that users will not encounter problems during use due to inconsistent binding status between the device and the server, thereby reducing customer complaint rate and improving overall user satisfaction.
[0135] 6. Enhance the scalability of the system: The device binding method disclosed in the present invention can be applied to the management of various IoT devices, and has strong versatility and scalability. The binding strategy can be flexibly adjusted according to the specific application scenario to meet the needs of different types of IoT devices and network environments.
[0136] According to an embodiment of the present disclosure, the present disclosure also provides a server, Figure 4 A schematic block diagram of a server provided by an embodiment of the present disclosure is shown. Figure 4 As shown, the server includes:
[0137] The storage module 410 is used to store the binding information between the Internet of Things device and the user account based on the device information of the Internet of Things device and the account information of the user account in the activation request in response to receiving the activation request from the Internet of Things device;
[0138] The network access permission sending module 420 is used to send the network access permission to the IoT device; wherein the network access permission is used for the IoT device to access the first communication channel; the first communication channel is used for sending and receiving business data between the IoT device and the server;
[0139] The binding module 430 is used to bind the IoT device and the user account based on the binding information when it is detected that the IoT device is connected to the first communication channel.
[0140] In some embodiments, the storage module 410 is specifically configured to:
[0141] In response to receiving an activation request from an IoT device, determining the legitimacy of the IoT device based on device information of the IoT device in the activation request;
[0142] In the case where the legitimacy of the IoT device is positive information, the binding information between the IoT device and the user account is stored based on the device information of the IoT device in the activation request and the account information of the user account.
[0143] In some embodiments, Figure 5 As shown, the server also includes a binding notification module 510:
[0144] The binding notification module 510 is used to send a successful binding notification to the user device based on the user account when the IoT device and the user account are successfully bound.
[0145] In some embodiments, the first communication channel is a communication channel based on the MQTT protocol or the WebSocket protocol.
[0146] For the description of specific functions and examples of each module and submodule of the server in the embodiment of the present disclosure, please refer to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0147] According to an embodiment of the present disclosure, the present disclosure also provides an Internet of Things device, Figure 6 A schematic block diagram of an Internet of Things device provided by an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the IoT device includes:
[0148] The activation request sending module 610 is used to send an activation request to the server; wherein the activation request includes device information of the IoT device and account information of the user account; the device information of the IoT device and the account information of the user account are used by the server to determine the binding information between the IoT device and the user account;
[0149] The binding trigger module 620 is used to receive the network access permission from the server, access the first communication channel based on the network access permission, and trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
[0150] In some embodiments, the activation request sending module 610 is specifically configured to:
[0151] Accessing a second communication channel based on a connection between a user device corresponding to the user account;
[0152] Based on the second communication channel, an activation request is sent to the server.
[0153] In some embodiments, the second communication channel is a communication channel based on the HTTP protocol.
[0154] In some embodiments, the first communication channel is a communication channel based on the MQTT or WebSocket protocol.
[0155] For the description of specific functions and examples of each module and submodule of the Internet of Things device in the embodiment of the present disclosure, please refer to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0156] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0157] Figure 7 FIG. 1 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 7 As shown, the electronic device includes: a memory 710 and a processor 720, and the memory 710 stores a computer program that can be run on the processor 720. The number of the memory 710 and the processor 720 can be one or more. The memory 710 can store one or more computer programs. When the one or more computer programs are executed by the electronic device, the electronic device executes the method provided by the above method embodiment. The electronic device may also include: a communication interface 730, which is used to communicate with external devices and perform data exchange transmission.
[0158] If the memory 710, the processor 720 and the communication interface 730 are implemented independently, the memory 710, the processor 720 and the communication interface 730 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0159] Optionally, in a specific implementation, if the memory 710, the processor 720 and the communication interface 730 are integrated on a chip, the memory 710, the processor 720 and the communication interface 730 can communicate with each other through an internal interface.
[0160] In one implementation, the electronic device may be a server of the embodiment of the present application, and the electronic device may implement the corresponding processes implemented by the server in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0161] In one embodiment, the electronic device may be an Internet of Things device of the embodiment of the present application, and the electronic device may implement the corresponding processes implemented by the Internet of Things device in each method of the embodiment of the present application, which will not be described in detail here for the sake of brevity.
[0162] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the Advanced RISC Machines (ARM) architecture.
[0163] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include 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), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DR RAM).
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present disclosure is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (for example: coaxial cable, optical fiber, data subscriber line (Digital Subscriber Line, DSL)) or wireless (for example: infrared, Bluetooth, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrations. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)), etc. It is worth noting that the computer-readable storage medium mentioned in the present disclosure may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0165] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0166] In the description of the embodiments of the present disclosure, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0167] In the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" in this article is only a way to describe the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0168] In the description of the embodiments of the present disclosure, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.
[0169] The above description is only an exemplary embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A device binding method, applied to a server, characterized in that: include: In response to receiving an activation request from an Internet of Things device, based on device information of the Internet of Things device and account information of the user account in the activation request, storing binding information between the Internet of Things device and the user account; Sending a network access permission to the IoT device; wherein the network access permission is used for the IoT device to access a first communication channel; the first communication channel is used for sending and receiving business data between the IoT device and the server; When it is detected that the IoT device is connected to the first communication channel, the IoT device is bound to the user account based on the binding information.
2. The method according to claim 1, characterized in that: The step of storing, in response to receiving an activation request from an IoT device, binding information between the IoT device and the user account based on device information of the IoT device and account information of the user account in the activation request, comprises: In response to receiving an activation request from an IoT device, determining the legitimacy of the IoT device based on device information of the IoT device in the activation request; In a case where the legitimacy of the Internet of Things device is positive information, based on the device information of the Internet of Things device and the account information of the user account in the activation request, the binding information between the Internet of Things device and the user account is stored.
3. The method according to claim 1, characterized in that Also includes: When the IoT device and the user account are successfully bound, a successful binding notification is sent to the user device based on the user account.
4. The method according to any one of claims 1 to 3, characterized in that The first communication channel is a communication channel based on the message queue telemetry transmission MQTT protocol or the WebSocket protocol.
5. A device binding method, applied to an Internet of Things device, characterized in that: include: Sending an activation request to a server; wherein the activation request includes device information of the IoT device and account information of the user account; the device information of the IoT device and the account information of the user account are used by the server to determine binding information between the IoT device and the user account; Receive a network access permission from the server, and access a first communication channel based on the network access permission to trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
6. The method according to claim 5, characterized in that The sending of the activation request to the server comprises: accessing a second communication channel based on a connection between a user device corresponding to the user account; Based on the second communication channel, an activation request is sent to the server.
7. The method according to claim 6, characterized in that The second communication channel is a communication channel based on the Hypertext Transfer Protocol HTTP.
8. The method according to any one of claims 5 to 7, characterized in that: The first communication channel is a communication channel based on the MQTT protocol or the WebSocket protocol.
9. A server, characterized in that: include: A storage module, configured to, in response to receiving an activation request from an Internet of Things device, store binding information between the Internet of Things device and the user account based on device information of the Internet of Things device and account information of the user account in the activation request; A network access permission sending module, used to send a network access permission to the IoT device; wherein the network access permission is used for the IoT device to access a first communication channel; the first communication channel is used for sending and receiving business data between the IoT device and the server; A binding module is used to bind the Internet of Things device and the user account based on the binding information when it is detected that the Internet of Things device is connected to the first communication channel.
10. An Internet of Things device, characterized in that: include: An activation request sending module, used to send an activation request to a server; wherein the activation request includes device information of the Internet of Things device and account information of the user account; the device information of the Internet of Things device and the account information of the user account are used by the server to determine the binding information between the Internet of Things device and the user account; A binding trigger module is used to receive a network access permission from the server, and access a first communication channel based on the network access permission to trigger the server to bind the IoT device and the user account based on the binding information; wherein the first communication channel is used for sending and receiving business data between the IoT device and the server.
11. A server, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 4.
12. An Internet of Things device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 5 to 8.
Citation Information
Cited By
Device binding method, server and internet-of-things device
WO2026152658A1