Equipment binding method and system, storage medium and electronic device

CN121284083APending Publication Date: 2026-01-06QINGDAO HAIER TECH +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511459192.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

[0005]本申请提供一种设备绑定方法、系统、存储介质及电子装置,用以解决现有技术中设备绑定方式依赖云端以致造成单点故障的缺陷,确保绑定操作在稳定的通信路径上进行,避免因通道不稳定导致的绑定失败,减少用户在设备绑定或操作过程中因连接问题导致的等待时间,提升设备绑定的成功率和流畅性

Benefits of technology

[0017]The device binding method, system, storage medium, and electronic device provided in this application, by monitoring the status of the connection channel when the device is online, can promptly detect connection interruptions and other problems, thereby quickly responding to connection changes. Even if a certain connection method fails, communication can still be maintained through other connection channels, reducing the waiting time for users due to connection problems during device binding or operation, ensuring the continuity of device connection, improving system stability, and selecting a valid channel to complete device binding based on the validity of the connection channel after monitoring the status of the connection channel, avoiding unnecessary resource waste, ensuring that the binding operation is carried out on a stable communication path, avoiding binding failure due to channel instability, ensuring the smooth completion of the binding process, and improving the success rate and smoothness of user operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121284083A_ABST
    Figure CN121284083A_ABST
Patent Text Reader

Abstract

The invention discloses a device binding method and system, a storage medium and an electronic device, and relates to the technical field of smart home / smart home, and the device binding method comprises the steps: monitoring the state of at least one connection channel when determining that a target device is in an online state; wherein the connection channel is used for representing a communication path established based on a connection mode selected by a user; and based on the state of the at least one connection channel, selecting the connection channel in an effective state to carry out device binding on the target device. According to the method and the device, the defect that a single-point fault is caused due to the fact that an equipment binding mode depends on the cloud is overcome, binding operation can be ensured to be performed on a stable communication path, binding failure caused by channel instability is avoided, waiting time caused by a connection problem in the equipment binding or operation process of a user is shortened, and the user experience is improved. And the success rate and fluency of equipment binding are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart home / intelligent home technology, and in particular to a device binding method, system, storage medium and electronic device. Background Technology

[0002] Currently, smart home technology is developing rapidly, gradually moving from the initial individual smart devices to intelligent interconnection and whole-house intelligence. Smart home devices, through technologies such as the Internet of Things (IoT), artificial intelligence (AI), and cloud computing, achieve interconnectivity between devices, providing users with a more convenient, efficient, and personalized home experience. Device pairing, as a core component of a smart home system, is the foundation for users to connect smart devices to their home network and achieve remote control and automated management. The pairing process not only requires the device to connect to the home network but also needs to ensure stable communication between the device and the platform or cloud service.

[0003] Currently, the binding of smart devices mainly involves the user entering the identifier of the device to be bound, such as the Media Access Control (MAC) address, into the terminal. The terminal then sends the identifier of the device to be bound and the identifier of the terminal to the server, which then binds the device to be bound to the terminal.

[0004] However, the aforementioned smart device binding methods rely on the cloud. If the cloud service becomes unavailable or malfunctions, it can easily create a single point of failure, making it impossible to complete device binding or control of the bound device, rendering the device unusable. Furthermore, since device and terminal identifiers need to be transmitted to the cloud for processing over the network, this method may also increase the risk of user data leakage. Summary of the Invention

[0005] This application provides a device binding method, system, storage medium, and electronic device to address the shortcomings of existing device binding methods that rely on the cloud, leading to single points of failure. It ensures that the binding operation is performed on a stable communication path, avoids binding failures caused by unstable channels, reduces user waiting time due to connection problems during device binding or operation, and improves the success rate and smoothness of device binding.

[0006] This application provides a device binding method, comprising: when a target device is determined to be online, monitoring the status of at least one connection channel; wherein the connection channel is used to characterize a communication path established based on a connection method selected by the user; and based on the status of at least one connection channel, selecting a valid connection channel to bind the target device.

[0007] According to a device binding method provided in this application, the connection channel includes a cloud relay channel, which represents a communication path established by connecting to a cloud server via the Internet and then connecting the device via the cloud server; monitoring the status of at least one connection channel includes: sending a heartbeat packet to the cloud server and receiving a heartbeat response returned by the cloud server; wherein, the heartbeat packet includes a device identifier and a device timestamp, and the heartbeat response is generated by the cloud server based on verifying the legality of the device identifier and the device timestamp, and the heartbeat response includes a device identifier, a server timestamp, and a status code, the status code representing the legality verification result; based on the heartbeat response, when the status code is determined to be successful, the device identifier in the heartbeat response is matched with the heartbeat packet in the heartbeat packet; when the device identifier in the heartbeat response matches the heartbeat packet in the heartbeat packet, a time difference is obtained based on the server timestamp in the heartbeat response and the device timestamp in the heartbeat packet; when the time difference is determined to be within a preset difference range, the status of the corresponding connection channel is determined to be valid.

[0008] According to a device binding method provided in this application, the connection channel includes a LAN direct connection channel, which is used to characterize a communication path established based on the connection of devices via a local router; monitoring the status of at least one connection channel includes: obtaining a device identifier, and obtaining a mapping table of online devices in the local LAN through an Address Resolution Protocol (APR) request; wherein the mapping table is created based on the device identifier and the assigned IP address of each device; when the IP address corresponding to the device identifier is found in the mapping table based on the device identifier, the status of the corresponding connection channel is determined to be valid; or, obtaining the target IP address corresponding to the device identifier; sending a UDP / TCP probe packet to the target device corresponding to the target IP address based on the target IP address, and receiving the response returned by the target device within the target duration to determine that the status of the corresponding connection channel is valid.

[0009] According to a device binding method provided in this application, the connection channel includes a near-field direct channel, which is used to characterize a communication path established based on Bluetooth connection within a target distance; monitoring the state of at least one connection channel includes: reading the Bluetooth signal strength RSSI of the target device, and determining that the state of the corresponding connection channel is valid when the RSSI meets a preset strength threshold range; or, reading the connection state characteristics of the target device through the Bluetooth protocol stack, and determining that the state of the corresponding connection channel is valid when the connection state characteristics are in a connected state.

[0010] According to a device binding method provided in this application, at least one connection channel includes at least one of a cloud relay channel, a local area network direct connection channel, and a near-field direct channel. The cloud relay channel is used to represent a communication path established by connecting to a cloud server via the Internet and then connecting the device via the cloud server. The local area network direct connection channel is used to represent a communication path established by connecting the device via a local router. The near-field direct channel is used to represent a communication path established by connecting the device via Bluetooth within a target distance. After monitoring the status of at least one connection channel, the method includes: determining the display status of the user interface based on the status of each connection channel, according to a preset channel priority and a preset display rule; the preset channel priority is used to limit the display order of each connection channel, and the preset display rule is used to limit the user interface display status corresponding to the status of each connection channel; based on the display status of the user interface, a status change event is published, and the user interface display component is used to update the user interface based on the status change event.

[0011] According to a device binding method provided in this application, the user interface display component updates the user interface based on a state change event, including: using the user interface display component to receive a state change event, and determining that when the time interval between the state change event and the previous update of the user interface exceeds a first preset interval threshold, performing icon switching of the corresponding connection channel according to the state change event; Before determining the display state of the user interface based on the status of each connection channel, preset channel priority, and preset display rules, the process includes: determining the display state of the user interface based on the status of each monitored connection channel when the time interval between state changes of the same connection channel exceeds a second preset interval threshold, based on the status of each connection channel, preset channel priority, and preset display rules; and determining the display state of the user interface based on the status of each connection channel, preset channel priority, and preset display rules when the time interval between state changes of the same connection channel does not exceed the second preset interval threshold, waiting for the time interval between two adjacent state changes of the corresponding connection channel to exceed the second preset interval threshold.

[0012] According to a device binding method provided in this application, at least one connection channel includes at least one of a cloud relay channel, a local area network direct connection channel, and a near-field direct channel. The cloud relay channel represents a communication path established by connecting to a cloud server via the internet, and then connecting the device from the cloud server. The local area network direct connection channel represents a communication path established by connecting to the device via a local router. The near-field direct channel represents a communication path established by connecting to the device via Bluetooth within a target distance. Based on the state of at least one connection channel, selecting a valid connection channel to bind the target device includes: Based on the status of at least one connection channel, determine the connection channel with a valid status; Based on the valid connection channel status and the preset channel priority, select the connection channel with higher priority; Based on the selected connection channel being a cloud relay channel, a device binding request is sent to the cloud server, and the device identifier is retrieved from the preset device list by the cloud server based on the device binding request; wherein, the preset device list is created in advance based on the devices managed by the cloud server; Based on the received device identifier, the system obtains the home network configuration information and sends it to the cloud server. The cloud server then generates a binding credential based on the home network configuration information and sends it to the target device. The cloud server, based on the target device's returned device connection status (successful), binds the target device to the corresponding smart home within the home network. The device connection status is generated by the target device connecting to the corresponding home network based on the binding credential. If the selected connection channel is a LAN direct connection channel, a configuration data packet is generated and sent to the target device. The system receives the binding status returned by the target device and completes the device binding based on a successful binding status. The binding status is generated by the target device connecting to the corresponding home network based on the home network configuration information extracted from the configuration data packet. If the selected connection channel is a near-field direct channel, smart home information is sent to the target device, and the system receives a status confirmation message from the target device. If the status confirmation message indicates successful binding, the device binding is complete. The status confirmation message is generated by the target device based on the associated smart home information.

[0013] This application also provides a device binding system, including: a status monitoring module, which monitors the status of at least one connection channel when the target device is determined to be online; wherein the connection channel is used to represent a communication path established based on the connection method selected by the user; and a device binding module, which selects a valid connection channel to bind the target device based on the status of at least one connection channel.

[0014] This application also provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to execute, through the computer program, a device bonding method as described above.

[0015] This application also provides a computer-readable storage medium comprising a stored program, wherein the program, when executed, implements any of the device binding methods described above.

[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the device binding methods described above.

[0017] The device binding method, system, storage medium, and electronic device provided in this application, by monitoring the status of the connection channel when the device is online, can promptly detect connection interruptions and other problems, thereby quickly responding to connection changes. Even if a certain connection method fails, communication can still be maintained through other connection channels, reducing the waiting time for users due to connection problems during device binding or operation, ensuring the continuity of device connection, improving system stability, and selecting a valid channel to complete device binding based on the validity of the connection channel after monitoring the status of the connection channel, avoiding unnecessary resource waste, ensuring that the binding operation is carried out on a stable communication path, avoiding binding failure due to channel instability, ensuring the smooth completion of the binding process, and improving the success rate and smoothness of user operations. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the hardware environment for a device binding method according to an embodiment of this application; Figure 2 This is one of the flowcharts illustrating the device binding method provided in this application; Figure 3 This is the second flowchart illustrating the device binding method provided in this application; Figure 4 This is a schematic diagram of the device binding system provided in this application; Figure 5 This is a schematic diagram of the electronic device provided in this application. Detailed Implementation

[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0023] According to one aspect of the embodiments of this application, a device binding method is provided. This device binding method is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned device binding method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0024] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0025] Figure 2A flowchart illustrating a device binding method is shown, which includes: S21, when it is determined that the target device is online, the status of at least one connection channel is monitored; wherein, the connection channel is used to characterize the communication path established based on the connection method selected by the user; S22, based on the status of at least one connection channel, select a connection channel with an effective status to bind the target device.

[0026] It should be noted that the execution subject of this method is the user terminal, such as the user's application (App), etc., without further limitation here. The step numbers "S21-S22" in this specification do not represent the order of the device binding methods; the specific order will be discussed below. Figure 3 The device binding method of the present invention is described.

[0027] Step S21: When it is determined that the target device is online, monitor the status of at least one connection channel; wherein, the connection channel is used to characterize the communication path established based on the connection method selected by the user.

[0028] It should be noted that at least one type of connection channel includes at least one of cloud relay channel, LAN direct connection channel and near-field direct channel. Cloud relay channel is used to characterize a communication path established by connecting to a cloud server via the Internet and then connecting the cloud server to the device. LAN direct connection channel is used to characterize a communication path established by connecting to the device via a local router. Near-field direct channel is used to characterize a communication path established by connecting to the device via Bluetooth within the target distance.

[0029] In one optional embodiment, the connection channel includes a cloud relay channel. Monitoring the status of at least one connection channel includes: sending a heartbeat packet to a cloud server and receiving a heartbeat response returned by the cloud server; wherein the heartbeat packet includes a device identifier and a device timestamp, and the heartbeat response is generated by the cloud server based on verifying the legality of the device identifier and device timestamp. The heartbeat response includes a device identifier, a server timestamp, and a status code, and the status code is used to characterize the legality verification result; based on the heartbeat response, if the status code indicates successful verification, the device identifier in the heartbeat response is matched with the heartbeat packet in the heartbeat packet; if the device identifier in the heartbeat response matches the heartbeat packet in the heartbeat packet, a time difference is obtained based on the server timestamp in the heartbeat response and the device timestamp in the heartbeat packet; if the time difference meets a preset difference range, the status of the corresponding connection channel is determined to be valid.

[0030] It should be added that before monitoring the status of at least one connection channel, the process includes: obtaining device identifier and user authentication information; establishing an initial connection with the cloud server based on the device identifier and user authentication information, so as to send heartbeat packets to the cloud server subsequently based on the initial connection. Additionally, when sending heartbeat packets to the cloud server, they can be sent periodically based on a first preset time period to promptly understand whether the status of the corresponding connection channel has changed.

[0031] Furthermore, after receiving the heartbeat response from the cloud server, the process also includes: if the status code indicates verification failure, determining that the corresponding connection channel is in an invalid state.

[0032] Furthermore, matching the device identifier in the heartbeat response with the heartbeat packet in the heartbeat packet also includes: when it is determined that the device identifier in the heartbeat response does not match the heartbeat packet in the heartbeat packet, determining that the corresponding connection channel is in an invalid state.

[0033] Furthermore, after obtaining the time difference, the method also includes: when it is determined that the time difference does not conform to the preset difference range, the state of the corresponding connection channel is determined to be invalid.

[0034] In one optional embodiment, the connection channel includes a LAN direct connection channel. Monitoring the status of at least one connection channel includes: obtaining a device identifier and obtaining a mapping table of online devices within the local LAN via an Address Resolution Protocol (APR) request; wherein the mapping table is created based on the device identifiers and assigned IP addresses of each device; when the IP address corresponding to the device identifier is found in the mapping table, the status of the corresponding connection channel is determined to be valid; or, obtaining the target IP address corresponding to the device identifier; sending a UDP / TCP probe packet to the target device corresponding to the target IP address, and receiving a response from the target device within a target duration to determine that the status of the corresponding connection channel is valid.

[0035] It should be added that before monitoring the status of at least one connection channel, the process includes: scanning the local area network to obtain the IP addresses of all online devices; and filtering the IP addresses of the target device based on device identifiers (such as MAC addresses) to establish an initial connection with the target device.

[0036] In addition, after obtaining the device identifier and obtaining the mapping table of online devices in the local area network through the Address Resolution Protocol (APR) request, the following steps are taken: if the IP address corresponding to the device identifier is not in the mapping table, the status of the corresponding connection channel is determined to be invalid.

[0037] In addition, after sending a UDP / TCP probe packet to the target device corresponding to the target IP address, the process also includes: if no response is received from the target device within the target time, determining that the corresponding connection channel is in an invalid state.

[0038] It is worth noting that when the connection channel includes a LAN direct connection channel, the monitoring of the status of the corresponding connection channel can also refer to the monitoring method of the cloud relay channel mentioned above. The difference is that a status query request is sent directly to the target device. The status query request includes the device identifier and query timestamp, and the status response includes the device identifier, status timestamp and status code. There is no need to communicate with the target device through the cloud server. The specific monitoring logic can be referred to above, and will not be repeated here.

[0039] In one optional embodiment, the connection channel includes a near-field direct channel. Monitoring the status of at least one connection channel includes: reading the Bluetooth signal strength RSSI of the target device, and determining that the status of the corresponding connection channel is valid when the RSSI meets a preset strength threshold range; or, reading the connection status characteristics of the target device through the Bluetooth protocol stack, and determining that the status of the corresponding connection channel is valid when the connection status characteristics are in a connected state.

[0040] It should be noted that before monitoring the status of at least one connection channel, the process includes: obtaining the device identifier and scanning for Bluetooth devices within the target range; filtering the scanned Bluetooth devices based on the device identifier to obtain the target device, and establishing an initial Bluetooth connection with the target device.

[0041] Additionally, after reading the Bluetooth signal strength RSSI of the target device, the system determines that if the RSSI does not meet the preset strength threshold range, the corresponding connection channel is invalid. It should be noted that the preset strength threshold range can be set based on the actual Bluetooth signal strength. For example, a signal strength less than -70dBm indicates a weak Bluetooth signal, while a value of 0 indicates the device is outside the Bluetooth connection range. Therefore, the preset strength threshold range can be determined based on -70dBm, 0, and actual design requirements; further limitations are not specified here.

[0042] In addition, after reading the connection status characteristics of the target device through the Bluetooth protocol stack, the following steps are taken: when the connection status characteristics are in the disconnected state, the corresponding connection channel is determined to be in an invalid state.

[0043] It's worth noting that the Bluetooth protocol stack defines various device states that describe the device's behavior during communication. Connection state characteristics include the ready, broadcast, scanning, connected, and disconnected states. Specifically: the ready state indicates that the device has not established a connection but can initiate or respond to connection requests; the broadcast state indicates that the device actively broadcasts its existence, allowing other devices to scan and discover it; the scanning state indicates that the device is in scanning mode, searching for connectable devices; the connected state indicates that the device has successfully established a connection with other devices and can transmit data; and the disconnected state indicates that the connection has been interrupted, and the device returns to the ready or broadcast state.

[0044] Furthermore, connection state characteristics are defined through different layers in the Bluetooth protocol stack, which includes the link layer, the Logical Link Control and Adaptation Protocol Layer (L2CAP), and the General Attribute Profile Layer (GATT). Specifically: the link layer is responsible for establishing and managing connections between Bluetooth devices, managing device state changes through the discovery, pairing, and connection processes. For example, during the connection process, devices send and receive specific data packets to determine if a connection has been successfully established. The L2CAP provides logical channels for data transmission and supports connection state management. For example, L2CAP ensures connection stability by managing connection intervals, packet segmentation, and reassembly. In Bluetooth Low Energy (BLE) communication, the GATT defines how devices exchange data and supports reading device states. For example, GATT can be used to read whether a device is in a connected state, as well as the stability and quality of the connection.

[0045] In addition, a heartbeat signal can be sent to the target device to check whether the response returned by the target device contains the correct device identifier and timestamp. For details, please refer to the method of monitoring the cloud relay channel above. No further limitations will be made here.

[0046] In one optional embodiment, after monitoring the status of at least one connection channel, the method includes: determining the display status of the user interface based on the status of each connection channel, a preset channel priority, and a preset display rule; the preset channel priority is used to limit the display order of each connection channel, and the preset display rule is used to limit the display status of the user interface corresponding to the status of each connection channel; based on the display status of the user interface, a status change event is published, and the user interface display component is used to update the user interface based on the status change event.

[0047] It should be noted that since the display state of the user interface changes continuously with the status of the listening connection channel, the display state of the corresponding user interface can be cached each time it is obtained. This way, when the display state of the user interface is obtained again, a state change event can be published only when the display state of the user interface is different from the previously cached display state. This allows the user interface display component to update the corresponding user interface based on the state change event.

[0048] Furthermore, before determining the display state of the user interface based on the status of each connection channel, the preset channel priority, and the preset display rules, the process includes: determining the display state of the user interface based on the status of each monitored connection channel when the time interval between state changes of the same connection channel exceeds a second preset interval threshold, based on the status of each connection channel, the preset channel priority, and the preset display rules; and determining the display state of the user interface based on the status of each connection channel when the time interval between state changes of the same connection channel does not exceed the second preset interval threshold, and waiting for the time interval between two adjacent state changes of the corresponding connection channel to exceed the second preset interval threshold.

[0049] It should be added that for continuous status updates on the same connection channel, a second preset interval threshold is set to introduce a short delay, effectively reducing frequent switching of the user interface (UI) due to instantaneous fluctuations. The second preset interval threshold can be set according to actual design requirements, such as 300-500 milliseconds, etc., and is not further limited here.

[0050] In addition, the user interface display component updates the user interface based on the state change event, including: using the user interface display component to receive the state change event, and when it is determined that the time interval between the state change event and the previous update of the user interface exceeds a first preset interval threshold, the corresponding connection channel icon is switched according to the state change event.

[0051] Furthermore, based on the status change event, the icon switching of the corresponding connection channel is performed, including: based on the status change event, determining the icon of the corresponding connection channel to be switched, and triggering a status switching command to switch the status of the corresponding icon.

[0052] It should be added that when switching the state of the corresponding icon, preset icon transition animations can be used to smoothly switch the states of UI icons such as WiFi, cloud functions, and / or Bluetooth. For example, refer to... Figure 3When the cloud relay channel is confirmed to be valid, the corresponding icons for WiFi and cloud functions will be switched to an available status mark. When the cloud relay channel is confirmed to be invalid, and the LAN direct connection channel is confirmed to be valid, the WiFi icon will be switched to an available status mark, and the cloud function image will be switched to gray or another unavailable status mark. When the LAN direct connection channel is confirmed to be invalid, and the near-field direct channel is confirmed to be valid, the Bluetooth icon will be switched to an available status mark. The specific icon shapes, available status marks, and unavailable status marks can be designed according to actual design requirements and interface display requirements, and are not further limited here.

[0053] In addition, preset icon transition animations can be designed according to actual design needs. For example, icons can fade out, rotate, scale, or move along a path to the initial position of a new icon before fading in, significantly improving the smoothness of the user experience.

[0054] In one optional embodiment, before determining that the target device is online, the process includes: determining whether the device is online; if not, determining that the device to be bound is offline, then directly displaying that the device is offline. It should be noted that the method for displaying the device offline status can refer to the method for displaying the connection channel status described above, and will not be repeated here.

[0055] Step S22: Based on the status of at least one connection channel, select a connection channel with an effective status to bind the target device.

[0056] In this embodiment, at least one connection channel includes at least one of cloud relay channels, LAN direct connection channels, and near-field direct channels. Based on the status of at least one connection channel, a valid connection channel is selected to bind the target device, including: determining a valid connection channel based on the status of at least one connection channel; selecting a connection channel with higher priority based on the valid connection channel and a preset channel priority; sending a device binding request to the cloud server based on the selected connection channel being a cloud relay channel, and receiving a device identifier from a preset device list searched by the cloud server based on the device binding request; wherein the preset device list is created in advance based on the devices managed by the cloud server; obtaining home network configuration information based on the received device identifier, and sending the home network configuration information to the cloud server so that the cloud server can generate a binding based on the home network configuration information. The process involves: sending credentials to the target device; binding the target device to the corresponding smart home network via the cloud server based on the successful device connection status returned by the target device (the device connection status is generated by the target device connecting to the corresponding home network based on the binding credentials); generating a configuration data packet and sending it to the target device based on the selected LAN direct connection channel; receiving the binding status returned by the target device and completing the device binding based on a successful binding status (the binding status is generated by the target device connecting to the corresponding home network based on the home network configuration information extracted from the configuration data packet); sending smart home information to the target device based on the selected near-field direct channel and receiving the status confirmation information returned by the target device (the status confirmation information is generated by the target device based on the associated smart home information).

[0057] In summary, this invention, by monitoring the status of the connection channel when the device is online, can promptly detect connection interruptions and other issues, thereby quickly responding to connection changes. Even if a certain connection method fails, communication can still be maintained through other connection channels. This reduces the waiting time for users due to connection problems during device binding or operation, ensures the continuity of device connections, improves system stability, and, based on the validity of the connection channel after monitoring its status, selects a valid channel to complete device binding, avoiding unnecessary resource waste. It ensures that the binding operation is performed on a stable communication path, avoiding binding failures due to channel instability, ensuring the smooth completion of the binding process, and improving the success rate and smoothness of device binding.

[0058] The device binding apparatus provided in this application is described below. The device binding apparatus described below and the device binding method described above can be referred to in correspondence.

[0059] Figure 4 A schematic diagram of a device bonding system is shown, the system comprising: The status monitoring module 41, when determining that the target device is online, monitors the status of at least one connection channel; wherein, the connection channel is used to characterize the communication path established based on the connection method selected by the user; The device binding module 42 selects a valid connection channel to bind the target device based on the status of at least one connection channel.

[0060] In an optional embodiment, the connection channel includes a cloud relay channel and a status monitoring module 41, configured to: send a heartbeat packet to the cloud server and receive a heartbeat response returned by the cloud server; wherein the heartbeat packet includes a device identifier and a device timestamp, and the heartbeat response is generated by the cloud server based on verifying the legality of the device identifier and device timestamp, and the heartbeat response includes a device identifier, a server timestamp, and a status code, the status code being used to characterize the legality verification result; based on the heartbeat response, if the status code indicates successful verification, the device identifier in the heartbeat response is matched with the heartbeat packet in the heartbeat packet; if the device identifier in the heartbeat response matches the heartbeat packet in the heartbeat packet, a time difference is obtained based on the server timestamp in the heartbeat response and the device timestamp in the heartbeat packet; if the time difference meets a preset difference range, the status of the corresponding connection channel is determined to be valid.

[0061] It should be added that the system also includes: a connection establishment module, which obtains device identification and user authentication information before monitoring the status of at least one connection channel; and establishes an initial connection with the cloud server based on the device identification and user authentication information, so as to send heartbeat packets to the cloud server subsequently based on the initial connection.

[0062] Furthermore, the status monitoring module 41 is also used to: after receiving the heartbeat response returned by the cloud server, if the status code is determined to be verification failure, determine that the status of the corresponding connection channel is invalid.

[0063] Furthermore, the status monitoring module 41 is also used to: match the device identifier in the heartbeat response with the heartbeat packet in the heartbeat packet, and determine that the status of the corresponding connection channel is invalid when it is determined that the device identifier in the heartbeat response does not match the heartbeat packet in the heartbeat packet.

[0064] Furthermore, the status monitoring module 41 is also used to: after obtaining the time difference, if it is determined that the time difference does not conform to the preset difference range, determine that the status of the corresponding connection channel is invalid.

[0065] In an optional embodiment, the connection channel includes a LAN direct connection channel and a status monitoring module 41, used for: obtaining a device identifier and obtaining a mapping table of online devices in the local LAN through an Address Resolution Protocol (APR) request; wherein the mapping table is created based on the device identifier and the assigned IP address of each device; when the IP address corresponding to the device identifier is found in the mapping table, the status of the corresponding connection channel is determined to be valid; or, obtaining the target IP address corresponding to the device identifier; sending a UDP / TCP probe packet to the target device corresponding to the target IP address, and receiving a response from the target device within the target duration to determine that the status of the corresponding connection channel is valid.

[0066] It should be added that the connection establishment module is also used to: scan the local area network to obtain the IP addresses of all online devices before listening to the status of at least one connection channel; and filter the IP addresses of the target device based on the device identifier (such as MAC address) to establish an initial connection with the target device.

[0067] In addition, the status monitoring module 41 is also used to: after obtaining the device identifier and obtaining the mapping table of online devices in the local area network through the address resolution APR request, determine that the status of the corresponding connection channel is invalid when it is determined that the IP address corresponding to the device identifier is not in the mapping table based on the device identifier.

[0068] In addition, the status monitoring module 41 is also used to: after sending a UDP / TCP probe packet to the target device corresponding to the target IP address, if no reply is received from the target device within the target time, determine that the status of the corresponding connection channel is invalid.

[0069] In an optional embodiment, the connection channel includes a near-field direct channel and a status monitoring module 41, which is used to: read the Bluetooth signal strength RSSI of the target device, and determine that the status of the corresponding connection channel is valid when the RSSI meets the preset strength threshold range; or, through the Bluetooth protocol stack, read the connection status characteristics of the target device, and determine that the status of the corresponding connection channel is valid when the connection status characteristics are in a connected state.

[0070] It should be added that the connection establishment module is also used to: obtain the device identifier and scan for Bluetooth devices within the target range before listening to the status of at least one connection channel; filter the scanned Bluetooth devices according to the device identifier to obtain the target device, and establish an initial Bluetooth connection with the target device.

[0071] In addition, the status monitoring module 41 is also used to: after reading the Bluetooth signal strength RSSI of the target device, if it is determined that the RSSI does not meet the preset strength threshold range, determine that the status of the corresponding connection channel is invalid.

[0072] In addition, the status monitoring module 41 is also used to: after reading the connection status characteristics of the target device through the Bluetooth protocol stack, determine that the status of the corresponding connection channel is invalid when the connection status characteristics are disconnected.

[0073] In an optional embodiment, the system further includes: a state determination module, which, after monitoring the state of at least one connection channel, determines the display state of the user interface based on the state of each connection channel, a preset channel priority, and a preset display rule; the preset channel priority is used to limit the display order of each connection channel, and the preset display rule is used to limit the display state of the user interface corresponding to the state of each connection channel; and an interface update module, which publishes a state change event based on the display state of the user interface, and updates the user interface based on the state change event using the user interface display component.

[0074] Furthermore, the system also includes: a status judgment module, which, before determining the display status of the user interface based on the status of each connection channel, according to preset channel priorities and preset display rules, determines the display status of the user interface based on the status of each monitored connection channel when the time interval between status changes of the same connection channel exceeds a second preset interval threshold; and determines the display status of the user interface based on the status of each connection channel, according to preset channel priorities and preset display rules when the time interval between status changes of the same connection channel does not exceed the second preset interval threshold.

[0075] In addition, the interface update module is used to: receive state change events using the user interface display component, determine when the time interval between the state change event and the previous update of the user interface exceeds a first preset interval threshold, and perform icon switching for the corresponding connection channel according to the state change event.

[0076] Furthermore, the interface update module is also used to: determine the icon of the corresponding connection channel to be switched based on the state change event, and trigger the state switching command to switch the state of the corresponding icon.

[0077] In an optional embodiment, the system further includes: a display module, which determines whether the device is online before determining that the target device is online; if the device to be bound is determined to be offline, the system directly displays that the device is offline.

[0078] In this embodiment, at least one connection channel includes at least one of cloud relay channel, LAN direct connection channel, and near-field direct channel. The device binding module 42 is used to: determine a valid connection channel based on the status of at least one connection channel; select a connection channel with higher priority based on the valid connection channel and a preset channel priority; send a device binding request to the cloud server based on the selected connection channel being a cloud relay channel, and receive a device identifier from a preset device list retrieved by the cloud server based on the device binding request; wherein the preset device list is created prior to the devices managed by the cloud server; obtain home network configuration information based on the received device identifier, and send the home network configuration information to the cloud server, so that the cloud server can generate a binding credential based on the home network configuration information and send it to the target device; and... The cloud server, based on the successful device connection status returned by the target device, binds the target device to the corresponding smart home network. The device connection status is generated by the target device connecting to the corresponding home network based on the binding credentials. Based on the selected connection channel being a LAN direct connection channel, a configuration data packet is generated and sent to the target device. The server receives the binding status returned by the target device and, based on a successful binding status, completes the device binding. The binding status is generated by the target device connecting to the corresponding home network based on the home network configuration information extracted from the configuration data packet. Based on the selected connection channel being a near-field direct channel, smart home information is sent to the target device, and the server receives the status confirmation information returned by the target device. Based on the status confirmation information being successful, the device binding is completed. The status confirmation information is generated by the target device based on the associated smart home information.

[0079] In summary, this invention, when a device is online, monitors the status of the connection channel through a status monitoring module to promptly detect connection interruptions and other issues, thereby quickly responding to connection changes. Even if a certain connection method fails, communication can still be maintained through other connection channels, reducing user waiting time due to connection problems during device binding or operation, ensuring continuous device connection, improving system stability, and after monitoring the status of the connection channel, the device binding module selects a valid channel to complete device binding based on the validity of the connection channel, avoiding unnecessary resource waste, ensuring that the binding operation is performed on a stable communication path, avoiding binding failure due to channel instability, ensuring the smooth completion of the binding process, and improving the success rate and smoothness of device binding.

[0080] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can invoke logical instructions in the memory 530 to execute a device binding method, which includes: when the target device is determined to be online, monitoring the status of at least one connection channel; wherein the connection channel is used to characterize a communication path established based on a user-selected connection method; and based on the status of at least one connection channel, selecting a valid connection channel to bind the target device.

[0081] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0082] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the device binding method provided by the above methods. The method includes: when it is determined that the target device is online, listening to the status of at least one connection channel; wherein the connection channel is used to characterize a communication path established based on a connection method selected by the user; and selecting a valid connection channel to bind the target device based on the status of at least one connection channel.

[0083] In another aspect, this application also provides a computer-readable storage medium, the computer-readable storage medium including a stored program, wherein the program executes the device binding method provided by the above methods when it runs, the method including: when it is determined that the target device is online, listening to the status of at least one connection channel; wherein the connection channel is used to characterize a communication path established based on the connection method selected by the user; and based on the status of at least one connection channel, selecting a valid connection channel to bind the target device.

[0084] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A device binding method, comprising: The method comprises: When determining that the target device is in an online state, listening to the state of at least one connection channel; wherein the connection channel is used to represent a communication path established based on a user-selected connection mode; Based on the state of the at least one connection channel, selecting a connection channel in an effective state to perform device binding on the target device.

2. The device binding method of claim 1, wherein, The connection channel includes a cloud relay channel, and the cloud relay channel is used to represent a communication path established based on connecting a cloud server through the Internet and then connecting a device through the cloud server; The listening to the state of at least one connection channel comprises: Sending a heartbeat packet to the cloud server and receiving a heartbeat response returned by the cloud server; wherein the heartbeat packet comprises a device identifier and a device timestamp, the heartbeat response is generated by the cloud server based on verification of the legality of the device identifier and the device timestamp, the heartbeat response comprises a device identifier, a server timestamp and a status code, and the status code is used to represent a legality verification result; According to the heartbeat response, when determining that the status code is a verification success, matching the device identifier in the heartbeat response with the heartbeat packet in the heartbeat packet; When determining that the device identifier in the heartbeat response matches the heartbeat packet in the heartbeat packet, obtaining a time difference value according to the server timestamp in the heartbeat response and the device timestamp in the heartbeat packet; When determining that the time difference value meets a preset difference value range, determining that the state of the corresponding connection channel is an effective state.

3. The device binding method of claim 1, wherein, The connection channel includes a local area network direct connection channel, and the local area network direct connection channel is used to represent a communication path established based on connecting a device through a local router; The listening to the state of at least one connection channel comprises: Obtaining a device identifier and a mapping table of online devices in a local area network through address resolution APR request; wherein the mapping table is created based on the device identifier and the assigned IP address of each device; According to the device identifier, when determining that the device identifier corresponds to an IP address in the mapping table, determining that the state of the corresponding connection channel is an effective state; or Obtaining a target IP address corresponding to the device identifier; According to the target IP address, sending a user datagram protocol UDP / transmission control protocol TCP probe packet to a target device corresponding to the target IP address, and based on a target time length, receiving a reply returned by the target device to determine that the state of the corresponding connection channel is an effective state.

4. The device binding method of claim 1, wherein, The connection channel includes a near-field direct channel, and the near-field direct channel is used to represent a communication path established based on connecting a device through Bluetooth within a target distance; The listening to the state of at least one connection channel comprises: Reading a Bluetooth received signal strength indication RSSI of a target device, and when determining that the RSSI meets a preset strength threshold range, determining that the state of the corresponding connection channel is an effective state; Or Reading a connection state characteristic of a target device through a Bluetooth protocol stack, and when determining that the connection state characteristic is in a connected state, determining that the state of the corresponding connection channel is an effective state.

5. The device binding method of claim 1, wherein, The at least one connection channel includes at least one of a cloud relay channel, a local area network direct connection channel, and a near field direct connection channel, the cloud relay channel is used to represent a communication path established in a manner of connecting a cloud server based on the Internet and then connecting a device by the cloud server, the local area network direct connection channel is used to represent a communication path established in a manner of connecting a device based on a local router, and the near field direct connection channel is used to represent a communication path established in a manner of connecting a device based on Bluetooth within a target distance; After listening to the states of the at least one connection channel, the method comprises: According to the states of the connection channels, a preset channel priority and a preset display rule, a display state of the user interface is determined; the preset channel priority is used to limit the display order of the connection channels, and the preset display rule is used to limit the user interface display state corresponding to the state of the connection channel; According to the display state of the user interface, a state change event is published, and the user interface is updated based on the state change event by using a user interface display component.

6. The device binding method of claim 5, wherein, The user interface is updated based on the state change event by using the user interface display component, comprising: When the state change event and the time interval of updating the user interface in advance exceed a first preset interval threshold, the icon of the corresponding connection channel is switched according to the state change event by using the user interface display component; Before determining the display state of the user interface according to the states of the connection channels, the preset channel priority and the preset display rule, the method comprises: When the state change time interval of the same connection channel exceeds a second preset interval threshold according to the states of the connection channels, the display state of the user interface is determined according to the states of the connection channels, the preset channel priority and the preset display rule; When the state change time interval of the same connection channel does not exceed the second preset interval threshold, the display state of the user interface is determined according to the states of the connection channels, the preset channel priority and the preset display rule when the state change time interval of the corresponding connection channel exceeds the second preset interval threshold.

7. The device binding method of claim 1, wherein, The at least one connection channel includes at least one of a cloud relay channel, a local area network direct connection channel, and a near field direct connection channel, the cloud relay channel is used to represent a communication path established in a manner of connecting a cloud server based on the Internet and then connecting a device by the cloud server, the local area network direct connection channel is used to represent a communication path established in a manner of connecting a device based on a local router, and the near field direct connection channel is used to represent a communication path established in a manner of connecting a device based on Bluetooth within a target distance; Based on the states of the at least one connection channel, the connection channel in an effective state is selected to perform device binding on the target device, comprising: Based on the states of the at least one connection channel, the connection channel in an effective state is determined; According to the connection channel in the effective state, a connection channel with a high priority is selected in combination with a preset channel priority. The device binding request is sent to the cloud server based on the selected connection channel being a cloud relay channel, and the device identifier searched by the cloud server based on the preset device list is received; wherein the preset device list is created in advance according to the devices managed by the cloud server; Based on the received device identifier, the home network configuration information is obtained, and the home network configuration information is sent to the cloud server to generate a binding credential based on the home network configuration information and send it to the target device through the cloud server, and based on the device connection state returned by the target device being successful, the target device is bound to the corresponding smart home of the home network, and the device connection state is generated by the target device according to the binding credential to connect the corresponding home network; Based on the selected connection channel being the local area network direct connection channel, a configuration data packet is generated and sent to the target device; The binding state returned by the target device is received, and based on the binding state being successful binding, the device binding is completed; wherein the binding state is generated by the target device based on the home network configuration information extracted from the configuration data packet to connect the corresponding home network; Based on the selected connection channel being the near field direct channel, the smart home information is sent to the target device, and the state confirmation information returned by the target device is received, based on the state confirmation information being successful binding, the device binding is completed; wherein the state confirmation information is generated by the target device based on the association of the smart home information.

8. A device binding system, characterized by Comprising: The state monitoring module determines that the target device is in an online state, and monitors the state of at least one connection channel; wherein the connection channel is used to represent the communication path established based on the user selected connection method; The device binding module selects the connection channel with an effective state to perform device binding on the target device based on the state of the at least one connection channel.

9. A computer readable storage medium, characterized in that, The computer readable storage medium includes a stored program, wherein the program runs to execute the method of any one of claims 1 to 7. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Intelligent device connection method, device and system

    CN105282234A

  • Intelligent equipment control method and device, electronic equipment and storage medium

    CN111064552A

  • Communication channel switching method and device, computer equipment and readable storage medium

    CN113038440A

  • Connection channel determination method and device, electronic equipment and processor

    CN117527462A

  • Screen projection processing method and device, electronic equipment and storage medium

    CN119071547A