A device network distribution method, device, apparatus and storage medium
By obtaining device identification information through the target QR code and using Bluetooth connection to achieve network configuration of smart devices, the problem of not being able to accurately configure specific devices in existing technologies is solved, thus improving the user experience.
Patent Information
- Application Number
- CN202310943155.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-28
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-07-28
AI Technical Summary
In existing technologies, smart device network configuration is usually triggered by physical buttons, which causes multiple devices to enter the network configuration state at the same time, making it impossible to achieve precise network configuration operation for a specific device and affecting the user experience.
The device identification information is obtained by scanning the target QR code, a Bluetooth connection is established using the Bluetooth communication module, and the device to be configured is bound to the target gateway to realize the network configuration operation of the specified device.
It enables precise network configuration for designated smart devices, improves user experience, and avoids the chaos of configuring multiple devices simultaneously.
Smart Images

Figure CN116743568B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of data processing, and particularly relates to a device network configuration method and device, apparatus, and storage medium. BACKGROUND
[0002] In daily life, the use of smart devices often needs network configuration, that is, the device enters a network configuration state. At present, a physical button triggering method is usually used to configure the network of the device. For example, for a smart lamp, the switch of the smart lamp needs to be turned on and off multiple times, and in most cases, multiple devices are usually installed in the same loop. If the above network configuration method is used, all devices will enter the network configuration state, and it is impossible to realize the network configuration operation for a specified device.
[0003] Therefore, how to realize the network configuration operation for a specified device to improve the user experience is a technical problem to be solved at present. SUMMARY
[0004] To solve the above technical problem, the present disclosure provides a device network configuration method.
[0005] In a first aspect, the present disclosure provides a device network configuration method, which comprises:
[0006] obtaining device identification information through a target two-dimensional code; wherein the device identification information is used to identify a device to be configured, and the device to be configured is deployed with a Bluetooth communication module;
[0007] establishing a Bluetooth connection with the device to be configured by matching the received at least one Bluetooth broadcast message with the device identification information;
[0008] controlling the device to be configured to bind with a target gateway based on the Bluetooth connection.
[0009] In an optional implementation, the controlling the device to be configured to bind with the target gateway based on the Bluetooth connection comprises:
[0010] sending a binding request to the device to be configured based on the Bluetooth connection; wherein the binding request is used to instruct the device to be configured to enter a network configuration state;
[0011] sending a network configuration instruction to the target gateway; wherein the network configuration instruction is used to instruct the target gateway to enter a binding listening state and bind with the device to be configured in the network configuration state.
[0012] In an alternative implementation, the device identification information comprises a media access control (MAC) address of the device to be configured, and the establishing of the Bluetooth connection with the device to be configured comprises:
[0013] analyzing the received Bluetooth broadcast message to obtain a target MAC address carried by the Bluetooth broadcast message;
[0014] matching the target MAC address with the MAC address of the device to be configured;
[0015] if it is determined that the target MAC address matches the MAC address of the device to be configured, establishing a Bluetooth connection with the device sending the Bluetooth broadcast message.
[0016] In an alternative implementation, the establishing of the Bluetooth connection with the device sending the Bluetooth broadcast message if it is determined that the target MAC address matches the MAC address of the device to be configured comprises:
[0017] if it is determined that the target MAC address matches the MAC address of the device to be configured, sending a verification request carrying the target MAC address to a target server; wherein the verification request is used to instruct the target server to determine whether the target MAC address belongs to MAC addresses in a preset list;
[0018] if a preset confirmation message from the target server is received, establishing a Bluetooth connection with the device sending the Bluetooth broadcast message; wherein the preset confirmation message is used to indicate that the target MAC address belongs to the MAC addresses in the preset list.
[0019] In an alternative implementation, the binding request is specifically used to instruct the device to be configured to clear local user data and enter a configuration state.
[0020] In an alternative implementation, after the sending of the configuration instruction to the target gateway, the method further comprises:
[0021] receiving a successful binding message from the target server; wherein the successful binding message is sent by the target server after the binding relationship between the device to be configured and the current account is established.
[0022] In an alternative implementation, the device to be configured is further provided with a ZigBee communication module.
[0023] In an alternative implementation, the device to be configured is used to send a Bluetooth broadcast message carrying the MAC address of the device to be configured based on the Bluetooth communication module.
[0024] In a second aspect, the present disclosure provides a device network configuration device, the device comprising:
[0025] an acquisition module configured to acquire device identification information via a target two-dimensional code, wherein the device identification information is used to identify a device to be configured in a network, and the device to be configured in the network is deployed with a Bluetooth communication module;
[0026] a Bluetooth connection module configured to establish a Bluetooth connection with the device to be configured in the network by matching at least one received Bluetooth broadcast message with the device identification information;
[0027] a control module configured to control the device to be configured in the network to bind with a target gateway based on the Bluetooth connection.
[0028] In a third aspect, the present disclosure provides a computer-readable storage medium having instructions stored therein, which, when executed on a terminal device, cause the terminal device to implement the method described above.
[0029] In a fourth aspect, the present disclosure provides a device network configuration device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described above when executing the computer program.
[0030] In a fifth aspect, the present disclosure provides a computer program product comprising computer programs / instructions, which, when executed by a processor, implement the method described above.
[0031] Compared with the prior art, the technical solutions provided by the embodiments of the present disclosure have at least the following advantages:
[0032] The embodiments of the present disclosure provide a device network configuration method, device identification information is acquired via a target two-dimensional code, wherein the device identification information is used to identify a device to be configured in a network, and the device to be configured in the network is deployed with a Bluetooth communication module; a Bluetooth connection is established with the device to be configured in the network by matching at least one received Bluetooth broadcast message with the device identification information; and a target device is controlled to bind with a target gateway based on the Bluetooth connection. As can be seen, the embodiments of the present disclosure can acquire device identification information of a device to be configured in a network and establish a Bluetooth connection by scanning a two-dimensional code, and then implement network configuration operation for a specified device to be configured in a network based on the Bluetooth connection. BRIEF DESCRIPTION OF DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
[0035] Figure 1 A flowchart of a device network configuration method provided by an embodiment of the present disclosure;
[0036] Figure 2 A flowchart of a device network configuration provided by an embodiment of the present disclosure;
[0037] Figure 3 A schematic diagram of a device network configuration system provided by an embodiment of the present disclosure;
[0038] Figure 4 A structural schematic diagram of a device network configuration apparatus provided by an embodiment of the present disclosure;
[0039] Figure 5 A structural schematic diagram of a device network configuration apparatus provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0040] In order to more clearly illustrate the above-mentioned purposes, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0041] In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some of the embodiments of the present disclosure, not all the embodiments.
[0042] In daily life, the use of smart devices often needs to be networked, that is, to make the device enter the network configuration state. At present, the device is usually networked by using a physical button trigger, for example, for a smart lamp, the switch of the smart lamp needs to be turned on and off for many times, and in most cases, multiple devices are generally installed in the same loop. If the above network configuration method is used, all devices will enter the network configuration state, and it is impossible to realize the network configuration operation for a specified device.
[0043] To this end, the embodiment of the present disclosure provides a device network configuration method, device identification information is obtained through a target two-dimensional code, wherein the device identification information is used to identify a device to be configured in a network, and the device to be configured in the network is deployed with a Bluetooth communication module; at least one Bluetooth broadcast message received is matched with the device identification information, and a Bluetooth connection is established with the device to be configured in the network; and based on the Bluetooth connection, the target device is controlled to be bound with a target gateway. It can be seen that the embodiment of the present disclosure can obtain the device identification information of the device to be configured in the network and establish a Bluetooth connection through the scanning of a two-dimensional code, and then implement the network configuration operation for the specified device to be configured in the network based on the Bluetooth connection.
[0044] Based on this, the embodiment of the present disclosure provides a device network configuration method, referring to Figure 1 The flowchart of the device network configuration method provided by the embodiment of the present disclosure is as follows, and the method specifically includes:
[0045] S101: Obtain device identification information through a target two-dimensional code.
[0046] The device identification information is used to identify a device to be configured in a network, and the device to be configured in the network is deployed with a Bluetooth communication module.
[0047] The device network configuration method provided by the embodiment of the present disclosure can be applied to a client, for example, the client can include a client deployed on a smart phone, a client deployed on a tablet computer, etc.
[0048] In actual application, in order to facilitate the user to understand the basic information of the smart device, the basic information of the smart device is usually stored in the form of a two-dimensional code, for example, in the process of producing the smart device, the corresponding two-dimensional code is pasted on the smart device, so that the smart device has a unique identifier. After the user obtains the smart device, the user can scan the two-dimensional code corresponding to the smart device through the client deployed with the device network configuration method provided by the embodiment of the present disclosure, so as to obtain the basic information of the smart device.
[0049] In the embodiment of the present disclosure, when the scanning operation of the user for the target two-dimensional code is received, the target two-dimensional code corresponding to the device to be configured in the network is obtained, and then the device identification information of the device to be configured in the network is obtained based on the scanned target two-dimensional code.
[0050] In the embodiment of the present disclosure, the device to be configured in the network can be any smart device deployed with a Bluetooth communication module, for example, a smart lamp, a smart socket, etc. Since the device to be configured in the network is deployed with a Bluetooth communication module, the device to be configured in the network can continuously send a Bluetooth broadcast message to the outside under the condition of being turned on, so that the client can establish a Bluetooth connection with the device to be configured in the network based on the received Bluetooth broadcast message.
[0051] In an optional implementation, the device to be commissioned can also be deployed with a ZigBee communication module; ZigBee is a wireless network protocol for low-speed short-distance transmission, and is suitable for a series of electronic component devices with short transmission range and low data transmission rate, and has a relatively wide application in smart devices. Since most devices deployed only with a ZigBee communication module do not have a gateway, a user cannot directly connect a client to a ZigBee device. Based on this, the embodiment of the present disclosure provides a device to be commissioned that is deployed with a ZigBee communication module and a Bluetooth communication module, and realizes the binding between the ZigBee device and the client through Bluetooth connection, thereby better compensating for the defects of the ZigBee device.
[0052] In another optional implementation, the device to be commissioned can also be a smart device deployed with other communication modules, such as a device deployed with a Wi-Fi (wireless network communication technology) communication module and a Bluetooth communication module, a device deployed with an RS-485 (serial communication technology) communication module and a Bluetooth communication module, and a device deployed with a Thread (home Internet of Things communication protocol technology) communication module and a Bluetooth communication module, and the like. The embodiment of the present disclosure does not limit the communication modules deployed by the device to be commissioned.
[0053] In the embodiment of the present disclosure, the target two-dimensional code carries device identification information of the device to be commissioned. The device identification information can be used to uniquely identify the corresponding device to be commissioned.
[0054] In an optional implementation, the device identification information can include a media access control address (MAC address) of the device to be commissioned. The MAC address is an address that can be used to uniquely determine the location of a network device (i.e., the device to be commissioned), and is written in the hardware of the device by the device manufacturer during the production of the device to be commissioned, and cannot be modified after production.
[0055] In another optional implementation, the device identification information can include a Bluetooth address of the device to be commissioned. The Bluetooth address can also be used to identify the device to be commissioned deployed with a Bluetooth communication module.
[0056] S102: Establish a Bluetooth connection with the device to be commissioned by matching the received at least one Bluetooth broadcast message with the device identification information.
[0057] In the embodiment of the present disclosure, when the client receives at least one Bluetooth broadcast message, it matches the at least one Bluetooth broadcast message with the device identification information. If it is determined that the Bluetooth broadcast message and the device identification information match successfully, a Bluetooth connection is established with the device to be commissioned identified by the device identification information.
[0058] In one optional implementation, since the Bluetooth broadcast message carries a MAC address, when at least one Bluetooth broadcast message is received, a Bluetooth connection can be established with the device to be configured by matching the MAC address carried in the Bluetooth broadcast message with the MAC address of the device to be configured. The specific implementation process will be described in detail in the following embodiments and will not be repeated here.
[0059] S103: Based on the Bluetooth connection, control the device to be configured to bind with the target gateway.
[0060] In this embodiment of the disclosure, after establishing a Bluetooth connection with the device to be configured on the network, messages or instructions can be sent to the device to be configured on the network based on the Bluetooth connection, and the device to be configured on the network can be controlled to execute the events corresponding to the instructions.
[0061] In one optional implementation, after establishing a Bluetooth connection with the device to be configured, a binding request can be sent to the device to be configured based on the Bluetooth connection. Specifically, the binding request is used to instruct the device to be configured to enter the configuration state, and the device to be configured in the configuration state can be monitored by the target gateway.
[0062] In practical applications, when the device to be configured cannot directly connect to the client, the configuration of the device to be configured is mainly completed through the target gateway. Therefore, after sending a binding request to the device to be configured based on the Bluetooth connection, a configuration command can also be sent to the target gateway. The configuration command is used to instruct the target gateway to enter the binding listening state and bind to the device to be configured that is in the configuration state.
[0063] In this embodiment of the disclosure, the target gateway is used to enter a binding listening state when it receives a network configuration command from the client. When the target gateway in the binding listening state detects a device to be configured in the network configuration state, it can bind with the device to be configured via Bluetooth. After binding with the device to be configured, the target gateway can register the device to be configured under the target server, that is, establish a binding relationship between the device to be configured and the current account. At this time, the device to be configured can communicate with the target server.
[0064] In practical applications, since the device to be configured may have already been bound to a user, that is, the device to be configured stores user data, after establishing a Bluetooth connection with the device to be configured, a binding request can be sent to the device to be configured to instruct the device to clear local user data and enter the configuration state based on the Bluetooth connection.
[0065] In an alternative embodiment, after sending the binding request to the device to be commissioned and the commissioning instruction to the target gateway based on the Bluetooth connection, a successful binding message from the target server can also be received, wherein the successful binding message is sent by the target server after establishing the binding relationship between the device to be commissioned and the current account, and the successful binding message is used to indicate that the device to be commissioned and the current account can normally communicate.
[0066] In the device commissioning method provided by the embodiments of the present disclosure, the device identification information is obtained through the target two-dimensional code, wherein the device identification information is used to identify the device to be commissioned, and the device to be commissioned is deployed with a Bluetooth communication module; the Bluetooth connection with the device to be commissioned is established by matching the received at least one Bluetooth broadcast message with the device identification information; and the target device is bound with the target gateway based on the Bluetooth connection. It can be seen that, in the embodiments of the present disclosure, the device identification information of the device to be commissioned can be obtained by scanning the two-dimensional code and establishing the Bluetooth connection, and then the commissioning operation for the specified device to be commissioned can be realized based on the Bluetooth connection.
[0067] In actual application, the device identification information obtained through the target two-dimensional code can include the MAC address of the device to be commissioned. Since the MAC address can be used to identify the device to be commissioned, and the MAC address cannot be modified once generated, in order to better establish the Bluetooth connection with the device to be commissioned, the embodiments of the present disclosure match the received at least one Bluetooth broadcast message with the MAC address of the device to be commissioned, and then establish the Bluetooth connection with the device to be matched.
[0068] Specifically, first, the device identification information is obtained through the target two-dimensional code, wherein the device identification information includes the media access control (MAC) address of the device to be commissioned, then the received Bluetooth broadcast message is parsed to obtain the target MAC address carried by the Bluetooth broadcast message, the target MAC address is matched with the MAC address of the device to be commissioned, and if it is determined that the target MAC address and the MAC address of the device to be commissioned match successfully, the Bluetooth connection with the device sending the Bluetooth broadcast message is established.
[0069] In the embodiments of the present disclosure, since the device to be commissioned is deployed with a Bluetooth communication module, under the condition of being powered on, the device to be commissioned can continuously send the Bluetooth broadcast message carrying the MAC address based on the Bluetooth communication module, wherein the Bluetooth broadcast message can be, for example, a connectable undirected advertisement packet (ADV_IND) carrying the MAC address. This type of broadcast message is used to indicate that the current device can receive the connection request of any other device, in addition, the device sending the connectable undirected advertisement packet can also be scanned by other devices, and the Bluetooth connection can be established based on the carried MAC address.
[0070] In the embodiments of the present disclosure, the target MAC address is carried in the Bluetooth broadcast message, and the target MAC address is specifically used to identify the device sending the Bluetooth broadcast message. The device identification information obtained based on the target two-dimensional code includes the MAC address of the device to be configured in a network. The MAC address of the device to be configured in a network is used to identify the device to be configured in a network itself. Therefore, by matching the target MAC address with the MAC address of the device to be configured in a network, it can be determined whether the device identified by the target MAC address and the device to be configured in a network identified by the MAC address are the same device.
[0071] In the embodiments of the present disclosure, if it is determined that the target MAC address matches the MAC address of the device to be configured in a network, that is, the device identified by the target MAC address and the device to be configured in a network are the same device, a Bluetooth connection is established with the device identified by the target MAC address, so that the device to be configured in a network (that is, the device identified by the target MAC address) can be controlled to be bound to the target gateway based on the Bluetooth connection subsequently.
[0072] In an optional implementation, after it is determined that the target MAC address matches the MAC address of the device to be configured in a network, the device identified by the target MAC address (that is, the device sending the Bluetooth broadcast message) needs to be further verified to determine whether the device identified by the target MAC address is a device meeting a preset condition.
[0073] In actual application, after the production of a smart device is completed, the MAC address used to identify the smart device is usually stored in a preset list of a target server. The preset list is used to store legal devices meeting a preset condition, for example, the preset list can be used to store smart devices manufactured by a specific manufacturer. If the MAC address of a smart device is stored in the preset list, it indicates that the smart device is a legal device manufactured by the specific manufacturer.
[0074] Based on this, the embodiments of the present disclosure provide a method for determining whether the device identified by the target MAC address is a device meeting a preset condition. Specifically, if it is determined that the target MAC address matches the MAC address of the device to be configured in a network, a verification request carrying the target MAC address is sent to a target server, and the target server determines whether the target MAC address belongs to the MAC addresses in the preset list.
[0075] In the embodiments of the present disclosure, the target server is used to determine whether the device identified by the target MAC address is a device meeting a preset condition by querying whether the target MAC address belongs to the MAC addresses in the preset list after receiving the verification request carrying the target MAC address. If it is determined that the target MAC address belongs to the MAC addresses in the preset list, a preset determination message for the target MAC address is returned to the client.
[0076] In the embodiments of the present disclosure, if the preset determination message from the target server is received, a Bluetooth connection is established with the device sending the Bluetooth broadcast message (i.e., the device identified by the target MAC address), wherein the preset determination message is used to represent that the target MAC address belongs to the MAC address in the preset list.
[0077] It can be seen that, in the embodiments of the present disclosure, whether the device sending the Bluetooth broadcast message and the device to be configured are the same device can be determined based on the target MAC address and the MAC address of the device to be configured, and after it is determined that the device sending the Bluetooth broadcast message and the device to be configured are the same device, whether the target MAC address belongs to the MAC address in the preset list can be determined based on the target server, and if it is determined that the target MAC address belongs to the MAC address in the preset list, a Bluetooth connection is established with the device sending the Bluetooth broadcast message (i.e., the device identified by the target MAC address), so that the device to be configured can be bound with the target gateway based on the Bluetooth connection subsequently.
[0078] Based on the above method embodiments, the present disclosure further provides a flowchart of device configuration and networking, and specifically takes the client, the device to be configured, the target gateway, and the target server as examples, as shown in Figure 2 , which is a flowchart of device configuration and networking provided by the embodiments of the present disclosure.
[0079] Firstly, the network configuration personnel triggers the intelligent configuration and networking process by scanning the target two-dimensional code corresponding to the device to be configured, and the client obtains the device identification information of the device to be configured through the target two-dimensional code, wherein the device identification information includes the MAC address of the device to be configured and the Bluetooth hotspot information of the device to be configured.
[0080] At the same time, the device to be configured continuously sends the Bluetooth broadcast message carrying the target MAC address based on the Bluetooth communication module, and the client analyzes the Bluetooth broadcast message when receiving the Bluetooth broadcast message, obtains the target MAC address carried by the Bluetooth broadcast message, and matches the target MAC address with the MAC address of the device to be configured, and if it is determined that the target MAC address and the MAC address of the device to be configured match successfully, the verification request carrying the target MAC address is sent to the target server.
[0081] When the target server receives the verification request carrying the target MAC address, it queries whether the target MAC address belongs to the MAC address in the preset list, and if it is determined that the target MAC belongs to the MAC address in the preset list, a preset confirmation message is returned to the client.
[0082] The client establishes a Bluetooth connection between the client and the device to be configured for networking when receiving the preset confirmation message sent by the target server, and sends a binding request to the device to be configured for networking based on the Bluetooth connection. The device to be configured for networking clears local user data and enters a configuration networking state when receiving the binding request.
[0083] At this time, the client also sends a configuration networking instruction to the target gateway. The target gateway enters a binding listening state and binds with the device to be configured for networking in the configuration networking state when receiving the configuration networking instruction, and requests the target server to establish a binding relationship between the device to be configured for networking and the current account.
[0084] The target server sends a successful binding message to the client after establishing the binding relationship between the device to be configured for networking and the current account. The client means that the device to be configured for networking successfully completes the configuration networking operation when receiving the successful binding message from the target server.
[0085] It can be seen that the flowchart of device configuration networking provided by the embodiment of the present disclosure can obtain the device identification information of the device to be configured for networking and establish a Bluetooth connection through the scanning of a two-dimensional code, and then implement the configuration networking operation for the specified device to be configured for networking based on the Bluetooth connection.
[0086] Based on the above method embodiment, the present disclosure further provides a system diagram of device configuration networking, wherein the system includes a client, a device to be configured for networking, a target gateway, and a target server, as shown in Figure 3 The system diagram of device configuration networking provided by the embodiment of the present disclosure is shown.
[0087] The client obtains the device identification information of the device to be configured for networking through the target two-dimensional code, wherein the device identification information includes the MAC address of the device to be configured for networking.
[0088] The device to be configured for networking is deployed with a Bluetooth communication module and a ZigBee communication module, and continuously sends Bluetooth broadcast messages based on the Bluetooth communication module. The client establishes a Bluetooth connection with the device to be configured for networking by matching at least one received Bluetooth broadcast message with the device identification information when receiving the Bluetooth broadcast message, controls the device to be configured for networking to bind with the target gateway based on the Bluetooth connection, and finally, the target gateway completes the binding of the device to be configured for networking to the target server.
[0089] It can be seen that the system diagram of device configuration networking provided by the embodiment of the present disclosure can obtain the device identification information of the device to be configured for networking and establish a Bluetooth connection through the scanning of a two-dimensional code, and then implement the configuration networking operation for the specified device to be configured for networking based on the Bluetooth connection.
[0090] Based on the above method embodiment, the present disclosure further provides a device configuration networking device, which is described with reference to Figure 4A structural schematic diagram of a device network configuration device is provided for an embodiment of the present disclosure, and the device includes
[0091] The acquisition module 401 is configured to acquire device identification information through a target two-dimensional code; wherein the device identification information is used to identify a device to be configured in a network, and the device to be configured in the network is deployed with a Bluetooth communication module;
[0092] The establishment module 402 is configured to establish a Bluetooth connection with the device to be configured in the network by matching the received at least one Bluetooth broadcast message with the device identification information;
[0093] The control module 403 is configured to control the device to be configured in the network to bind with a target gateway based on the Bluetooth connection.
[0094] In an optional implementation, the control module includes:
[0095] The first sending sub-module is configured to send a binding request to the device to be configured in the network based on the Bluetooth connection; wherein the binding request is used to instruct the device to be configured in the network to enter a network configuration state;
[0096] The second sending sub-module is configured to send a network configuration instruction to the target gateway; wherein the network configuration instruction is used to instruct the target gateway to enter a binding listening state and bind with the device to be configured in the network in the network configuration state.
[0097] In an optional implementation, the device identification information includes a media access control (MAC) address of the device to be configured in the network, and the establishment module includes:
[0098] The analysis sub-module is configured to analyze the received Bluetooth broadcast message to obtain a target MAC address carried by the Bluetooth broadcast message;
[0099] The matching sub-module is configured to match the target MAC address with the MAC address of the device to be configured in the network;
[0100] The first establishment sub-module is configured to establish a Bluetooth connection with a device sending the Bluetooth broadcast message if it is determined that the target MAC address and the MAC address of the device to be configured in the network match successfully.
[0101] In an optional implementation, the first establishment sub-module includes:
[0102] The third sending sub-module is configured to send a verification request carrying the target MAC address to a target server if it is determined that the target MAC address and the MAC address of the device to be configured in the network match successfully; wherein the verification request is used to instruct the target server to determine whether the target MAC address belongs to a MAC address in a preset list.
[0103] a second establishing sub-module, configured to establish a Bluetooth connection with the device that sends the Bluetooth broadcast message if a preset confirmation message from the target server is received, wherein the preset confirmation message is used to indicate that the target MAC address belongs to the MAC addresses in the preset list.
[0104] In an optional implementation, the binding request is specifically used to instruct the device to be commissioned to clear local user data and enter a commissioning state.
[0105] In an optional implementation, the apparatus further includes:
[0106] a receiving module, configured to receive a successful binding message from the target server, wherein the successful binding message is sent by the target server after the binding relationship between the device to be commissioned and the current account is established.
[0107] In an optional implementation, the device to be commissioned is further deployed with a ZigBee communication module.
[0108] In an optional implementation, the device to be commissioned is used to send a Bluetooth broadcast message carrying the MAC address of the device to be commissioned based on the Bluetooth communication module.
[0109] In the device commissioning method provided by the embodiments of the present disclosure, the device identification information is obtained through a target two-dimensional code, wherein the device identification information is used to identify a device to be commissioned, and the device to be commissioned is deployed with a Bluetooth communication module; the Bluetooth connection with the device to be commissioned is established by matching the received at least one Bluetooth broadcast message with the device identification information; and the target device is bound with the target gateway based on the Bluetooth connection. It can be seen that, in the embodiments of the present disclosure, the device identification information of the device to be commissioned can be obtained and the Bluetooth connection can be established through the scanning of the two-dimensional code, and then the commissioning operation for the specified device to be commissioned can be realized based on the Bluetooth connection.
[0110] In addition to the method and the apparatus, the embodiments of the present disclosure further provide a computer readable storage medium, wherein instructions are stored in the computer readable storage medium, and when the instructions are run on a terminal device, the terminal device implements the device commissioning method provided by the embodiments of the present disclosure.
[0111] The embodiments of the present disclosure further provide a computer program product, wherein the computer program product includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the device commissioning method provided by the embodiments of the present disclosure.
[0112] In addition, the embodiments of the present disclosure further provide a device commissioning device, as shown in Figure 5 The device commissioning device can include:
[0113] The processor 501, the memory 502, the input device 503 and the output device 504. The number of processors 501 in the device network device can be one or more, Figure 5 In some embodiments of the present disclosure, the processor 501, the memory 502, the input device 503 and the output device 504 can be connected by bus or other means, wherein, Figure 5 In some embodiments of the present disclosure, the processor 501, the memory 502, the input device 503 and the output device 504 can be connected by bus or other means, wherein,
[0114] The memory 502 can be used to store software programs and modules, and the processor 501 can execute various functional applications and data processing of the device network device by running the software programs and modules stored in the memory 502. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required by a function, etc. In addition, the memory 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. The input device 503 can be used to receive input digital or character information, and generate signal input related to user settings and function control of the device network device.
[0115] In particular, in this embodiment, the processor 501 loads the executable file corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and runs the application program stored in the memory 502 by the processor 501, thereby realizing the various functions of the device network device described above.
[0116] It should be noted that in this paper, the relationship terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a…" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0117] The foregoing is merely illustrative of the various implementations of the present disclosure and the general principles thereof. Numerous modifications can be made to these illustrations, and equivalents can be substituted therefor, without departing from the scope of the present disclosure. The specific embodiments commensurate with the specific application are intended to be illustrative only and not limiting of the scope of the application as set forth in the following claims.
Claims
1. A device commissioning method, the method comprising: The method comprises: Obtaining device identification information through a target two-dimensional code; wherein the device identification information is used to identify a device to be configured with a network, and the device to be configured with a network is deployed with a Bluetooth communication module; Establishing a Bluetooth connection with the device to be configured with a network by matching at least one received Bluetooth broadcast message with the device identification information; Controlling the device to be configured with a network to bind with a target gateway based on the Bluetooth connection; The controlling the device to be configured with a network to bind with a target gateway based on the Bluetooth connection comprises: Sending a binding request to the device to be configured with a network based on the Bluetooth connection; wherein the binding request is used to instruct the device to be configured with a network to enter a network configuration state; Sending a network configuration instruction to the target gateway; wherein the network configuration instruction is used to instruct the target gateway to enter a binding listening state and bind with the device to be configured with a network in the network configuration state; The device identification information comprises a media access control (MAC) address of the device to be configured with a network, and the establishing a Bluetooth connection with the device to be configured with a network by matching at least one received Bluetooth broadcast message with the device identification information comprises: Analyzing the received Bluetooth broadcast message to obtain a target MAC address carried by the Bluetooth broadcast message; Matching the target MAC address with the MAC address of the device to be configured with a network; If it is determined that the target MAC address matches the MAC address of the device to be configured with a network successfully, establishing a Bluetooth connection with the device sending the Bluetooth broadcast message.
2. The method of claim 1, wherein, The establishing a Bluetooth connection with the device sending the Bluetooth broadcast message if it is determined that the target MAC address matches the MAC address of the device to be configured with a network successfully comprises: If it is determined that the target MAC address matches the MAC address of the device to be configured with a network successfully, sending a verification request carrying the target MAC address to a target server; wherein the verification request is used to instruct the target server to determine whether the target MAC address belongs to a MAC address in a preset list; If a preset confirmation message from the target server is received, establishing a Bluetooth connection with the device sending the Bluetooth broadcast message; wherein the preset confirmation message is used to indicate that the target MAC address belongs to the MAC address in the preset list.
3. The method of claim 1, wherein, The binding request is specifically used to instruct the device to be configured with a network to clear local user data and enter a network configuration state.
4. The method of claim 1, wherein, After the network configuration instruction is sent to the target gateway, the method further comprises: Receiving a successful binding message from a target server; wherein the successful binding message is sent by the target server after a binding relationship between the device to be configured with a network and a current account is established.
5. The method of claim 1, wherein, The device to be configured with a network is further deployed with a ZigBee communication module.
6. The method of claim 1 or 2, wherein, The device to be configured with a network is used to send a Bluetooth broadcast message carrying the MAC address of the device to be configured with a network based on the Bluetooth communication module.
7. A device provisioning apparatus, comprising: The apparatus comprises: An obtaining module, configured to obtain device identification information through a target two-dimensional code; wherein the device identification information is used to identify a device to be configured with a network, and the device to be configured with a network is deployed with a Bluetooth communication module; The establishing module is configured to establish a Bluetooth connection with the device to be commissioned by matching the received at least one Bluetooth broadcast message with the device identification information; The control module is configured to control the device to be commissioned to bind with a target gateway based on the Bluetooth connection; The control module comprises: A first sending sub-module configured to send a binding request to the device to be commissioned based on the Bluetooth connection; wherein the binding request is used to instruct the device to be commissioned to enter a commissioning state; A second sending sub-module configured to send a commissioning instruction to the target gateway; wherein the commissioning instruction is used to instruct the target gateway to enter a binding listening state and bind with the device to be commissioned in the commissioning state; The device identification information comprises a media access control (MAC) address of the device to be commissioned, and the establishing module comprises: An analyzing sub-module configured to analyze the received Bluetooth broadcast message to obtain a target MAC address carried by the Bluetooth broadcast message; A matching sub-module configured to match the target MAC address with the MAC address of the device to be commissioned; A first establishing sub-module configured to establish a Bluetooth connection with a device sending the Bluetooth broadcast message if it is determined that the target MAC address matches the MAC address of the device to be commissioned successfully.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores instructions, and when the instructions run on a terminal device, the terminal device implements the method in any one of claims 1-6.
9. A device commissioning device, comprising: Comprise: A memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Setting method and distributing method for terminal equipment MAC address
CN104079686A
Intelligent device network distribution method and equipment and storage medium
CN111866996A