Network distribution method and device, control equipment and storage medium
By scanning Bluetooth broadcast packets and establishing a low-power Bluetooth connection, the problem of single-to-single distribution network between devices in the prior art is solved, and the power consumption of equipment during batch distribution is reduced.
Patent Information
- Application Number
- CN202311059291.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, the distribution network between the equipment is usually single-to-single, and the equipment needs to be in the WIFI module on state for a long time during batch distribution, resulting in large power consumption.
By scanning the Bluetooth broadcast packet, determine the list of devices to be distributed, and establish a low-power Bluetooth connection with these devices, and send network information to enable the device to establish a network connection with the router.
It realizes the transmission of distribution information to multiple devices to be distributed through low-power Bluetooth connection, reducing the power consumption consumed by devices during batch distribution.
Smart Images

Figure CN119497203A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a network distribution method, apparatus, control device and storage medium. Background Art
[0002] In the prior art, only one-to-one network configuration can usually be performed between devices.
[0003] For example, when a user needs to implement network configuration between multiple devices to be configured and a specific router, the user usually needs to determine the name of the network provided by the above router in each device to be configured and enter the password of the router. In addition, since the network configuration time is long, the device needs to keep the WIFI (wireless communication technology) module turned on for a long time, and then use the WIFI module to receive WIFI broadcast information, which consumes a lot of power. Summary of the invention
[0004] In view of this, in order to solve some or all of the above technical problems, the embodiments of the present application provide a network distribution method, apparatus, control device and storage medium.
[0005] In a first aspect, an embodiment of the present application provides a network distribution method, which is applied to a control device, and the method includes:
[0006] Scan Bluetooth advertising packets;
[0007] Determine the device that sends the Bluetooth broadcast packet and obtain a device list;
[0008] Determine the devices to be networked from the device list, and obtain the list of devices to be networked;
[0009] Establishing low-power Bluetooth connections with the devices to be configured in the list of devices to be configured;
[0010] Through the low-power Bluetooth connection, network configuration information is sent to the devices to be configured respectively, so that the devices to be configured establish a network connection with the router through the network configuration information.
[0011] In a possible implementation manner, the network connection between the device to be networked and the router is established in the following manner:
[0012] Determine whether the list of devices to be networked includes a target device, wherein the target device is the device to be networked that has not established the network connection with the router;
[0013] In the case where the target device is included in the list of devices to be networked, the following network configuration steps are performed based on the target device:
[0014] Establishing a low-power Bluetooth connection with the target device;
[0015] Sending network configuration information to the target device through the low-power Bluetooth connection, so that the target device establishes the network connection with the router through the network configuration information;
[0016] If the target device is not included in the list of devices to be networked, the network configuration step is stopped.
[0017] In a possible implementation manner, after the to-be-networked device establishes a network connection with the router through the network configuration information, the method further includes:
[0018] Determine whether the list of devices to be networked includes unbound devices, wherein the unbound devices are devices to be networked that have not established a preset association relationship with the control device;
[0019] In a case where the list of devices to be networked includes the unbound device, the preset association relationship is established with the unbound device to bind the unbound device.
[0020] In a possible implementation, the method further includes:
[0021] Detecting a device unbinding operation, wherein the device unbinding operation is used to release the preset association relationship between the device and the control device;
[0022] In the case where the device unbinding operation is detected, determining the device indicated by the device unbinding operation, and obtaining the device to be unbound;
[0023] Obtaining the unbinding password of the device to be unbound;
[0024] Verifying the unbinding password;
[0025] After the unbinding password is verified, the preset association relationship between the device to be unbound and the control device is released.
[0026] In a possible implementation, the sending of network configuration information to the devices to be networked respectively through the low-power Bluetooth connection includes:
[0027] Determine the network configuration priority of the device to be configured in the list of devices to be configured, wherein the network configuration priority is determined based on at least one of the following: the Bluetooth signal strength of the device to be configured, and the distance between the device to be configured and the router;
[0028] According to the determined network configuration priority, low-power Bluetooth connections are established with the devices to be configured, and network configuration information is sent to the devices to be configured.
[0029] In a possible implementation manner, after the device to be networked establishes a network connection with the router through the network configuration information, the device to be networked sends the device information of the device to be networked to the server through the network connection; and
[0030] The method further comprises:
[0031] The device information is obtained from the server through the network connection.
[0032] In a second aspect, an embodiment of the present application provides a network distribution device, which is applied to a control device, and the device includes:
[0033] A scanning unit, used for scanning Bluetooth broadcast packets;
[0034] A first determining unit, configured to determine a device that sends the Bluetooth broadcast packet and obtain a device list;
[0035] A second determining unit is used to determine the to-be-configured network device from the device list to obtain the to-be-configured network device list;
[0036] A connection unit, used to establish low-power Bluetooth connections with the devices to be configured in the list of devices to be configured;
[0037] The sending unit is used to send network configuration information to the devices to be configured through the low-power Bluetooth connection, so that the devices to be configured can establish a network connection with the router through the network configuration information.
[0038] In a possible implementation manner, the network connection between the device to be networked and the router is established in the following manner:
[0039] Determine whether the list of devices to be networked includes a target device, wherein the target device is the device to be networked that has not established the network connection with the router;
[0040] In the case where the target device is included in the list of devices to be networked, the following network configuration steps are performed based on the target device:
[0041] Establishing a low-power Bluetooth connection with the target device;
[0042] Sending network configuration information to the target device through the low-power Bluetooth connection, so that the target device establishes the network connection with the router through the network configuration information;
[0043] If the target device is not included in the list of devices to be networked, the network configuration step is stopped.
[0044] In a possible implementation manner, after the to-be-networked device establishes a network connection with the router through the network configuration information, the apparatus further includes:
[0045] A third determining unit is used to determine whether the list of devices to be networked includes an unbound device, wherein the unbound device is a device to be networked that has not established a preset association relationship with the control device;
[0046] The binding unit is used to establish the preset association relationship with the unbound device to bind the unbound device when the unbound device is included in the list of devices to be networked.
[0047] In a possible implementation, the device further includes:
[0048] A detection unit, configured to detect a device unbinding operation, wherein the device unbinding operation is used to release the preset association relationship between the device and the control device;
[0049] A fourth determining unit is used to determine the device indicated by the device unbinding operation when the device unbinding operation is detected, and obtain the device to be unbound;
[0050] A first obtaining unit, configured to obtain an unbinding password for the device to be unbound;
[0051] A verification unit, used to verify the unbinding password;
[0052] The releasing unit is used to release the preset association relationship between the device to be unbound and the control device after the unbinding password is verified.
[0053] In a possible implementation, the sending of network configuration information to the devices to be networked respectively through the low-power Bluetooth connection includes:
[0054] Determine the network configuration priority of the device to be configured in the list of devices to be configured, wherein the network configuration priority is determined based on at least one of the following: the Bluetooth signal strength of the device to be configured, and the distance between the device to be configured and the router;
[0055] According to the determined network configuration priority, low-power Bluetooth connections are established with the devices to be configured, and network configuration information is sent to the devices to be configured.
[0056] In a possible implementation manner, after the device to be networked establishes a network connection with the router through the network configuration information, the device to be networked sends the device information of the device to be networked to the server through the network connection; and
[0057] The device also includes:
[0058] The second acquisition unit is used to acquire the device information from the server through the network connection.
[0059] In a third aspect, an embodiment of the present application provides a distribution network system, comprising: a control device and a router; wherein the control device is used to implement any method described in the first aspect above.
[0060] In a fourth aspect, an embodiment of the present application provides a control device, including:
[0061] Memory for storing computer programs;
[0062] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method of any embodiment of the network distribution method of the first aspect of the present application is implemented.
[0063] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method of any embodiment of the network distribution method of the first aspect described above is implemented.
[0064] In a sixth aspect, an embodiment of the present application provides a computer program, which includes a computer-readable code. When the computer-readable code is executed on a device, a processor in the device implements a method as in any embodiment of the network configuration method of the first aspect described above.
[0065] The network configuration method provided in the embodiment of the present application is applied to a control device. The method first scans a Bluetooth broadcast packet, then determines the device that sends the Bluetooth broadcast packet to obtain a device list, then determines the device to be configured from the device list to obtain a list of devices to be configured, then establishes a low-power Bluetooth connection with each of the devices to be configured in the list of devices to be configured, and finally, through the low-power Bluetooth connection, sends network configuration information to each of the devices to be configured, so that the devices to be configured establish a network connection with a router through the network configuration information. Thus, network configuration information can be sent to multiple devices to be configured through a low-power Bluetooth connection to establish a network connection between multiple devices to be configured and a router, so that the power consumption of the devices during batch network configuration can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0067] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0068] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0069] Figure 1 A schematic diagram of a flow chart of a network distribution method provided in an embodiment of the present application;
[0070] Figure 2 A flowchart of another network configuration method provided in an embodiment of the present application;
[0071] Figure 3A - Figure 3D A network configuration binding flow chart involved in a network configuration method provided in an embodiment of the present application;
[0072] Figure 4A - Figure 4B A re-network configuration flow chart involved in a network configuration method provided in an embodiment of the present application;
[0073] Figure 5 A flowchart of unbinding involved in a network configuration method provided in an embodiment of the present application;
[0074] Figure 6 A schematic diagram of the structure of a distribution network system provided in an embodiment of the present application;
[0075] Figure 7 A schematic diagram of the structure of a distribution network device provided in an embodiment of the present application;
[0076] Figure 8 A schematic diagram of the structure of a control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0078] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0079] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0080] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0081] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0082] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0083] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0084] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0085] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0086] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0087] In order to solve the technical problem in the prior art that the power consumption of devices during batch network configuration is relatively high, the present application provides a network configuration method that can reduce the power consumption of devices during batch network configuration.
[0088] Figure 1 A flow chart of a network distribution method provided for an embodiment of the present application. The method can be applied to a control device, such as one or more control devices such as a smart phone, a laptop computer, a desktop computer, a portable computer, etc. In addition, the execution subject of the method can be hardware or software. When the above-mentioned execution subject is hardware, the execution subject can be one or more of the above-mentioned control devices. For example, a single control device can execute the method, or multiple control devices can cooperate with each other to execute the method. When the above-mentioned execution subject is software, the method can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0089] like Figure 1 As shown, the method specifically includes:
[0090] Step 101, scanning Bluetooth broadcast packets.
[0091] In this embodiment, the control device may have a Bluetooth function and may scan Bluetooth broadcast packets of surrounding devices.
[0092] The Bluetooth broadcast packet may carry content of manufacturer-defined fields, such as device model, identification code, binding protocol, location information, etc.
[0093] Step 102, determining the device that sends the Bluetooth broadcast packet and obtaining a device list.
[0094] In this embodiment, the control device can find a list of all surrounding devices that broadcast Bluetooth broadcast packets through the Bluetooth broadcast packets it scans.
[0095] The relative positions (order) of the devices in the above device list may be determined in a variety of ways.
[0096] As an example, the relative position of the device can be determined according to the order of the scanned advertising packets. For example, if the control device first scans Bluetooth advertising packet A sent by device A, and then scans Bluetooth advertising packet B sent by device B, then the device list "device A, device B" can be obtained.
[0097] As another example, the relative position of the device can also be determined according to the distance between the position indicated by the position information contained in the scanned broadcast packet and the position of the control device. For example, if the distance between the position indicated by the position information contained in the Bluetooth broadcast packet A scanned by the control device and the position of the control device is 5 meters, and the distance between the position indicated by the position information contained in the scanned Bluetooth broadcast packet B and the position of the control device is 3 meters, then the device list "Device B, Device A" can be obtained.
[0098] Step 103: Determine the devices to be networked from the device list to obtain a list of devices to be networked.
[0099] In this embodiment, the list of devices to be networked may include one or more devices to be networked determined from the device list.
[0100] As an example, after the control device displays the device list, one or more devices to be networked may be determined through a selection operation by a user, thereby obtaining a list of devices to be networked.
[0101] As another example, one or more devices with connection risks may be removed from the device list, and one or more devices to be networked that have not been removed may be determined as the list of devices to be networked.
[0102] Among them, the devices with connection risks may include freeloading devices. Alternatively, the devices with connection risks may also include: devices whose distance from the location of the control device is greater than or equal to a preset distance threshold. Alternatively, the devices with connection risks may also include: devices whose Bluetooth signal strength is less than or equal to a preset signal strength threshold.
[0103] Among them, the above-mentioned freeloading device may refer to a device that is not directly or indirectly authorized to connect to the Internet by a preset administrator account.
[0104] As an example, the above-mentioned free-network device can be determined in the following manner:
[0105] First, when any device is connected to the network provided by the router (ie, the router in the subsequent step 105) for the first time, a prompt message is generated, wherein the prompt message is used to prompt the above-mentioned device to connect to the network provided by the router for the first time.
[0106] Afterwards, it is determined whether an authorization operation performed by a preset administrator account is received, wherein the authorization operation indicates that the preset administrator account authorizes the device to connect to the network provided by the router.
[0107] Then, if the authorization operation is not received within a preset period of time after the generation time of the prompt information, the device is determined to be a freeloading device.
[0108] As another example, the freeloading device may also be determined in the following manner:
[0109] First, when any device is connected to the network provided by the router (ie, the router in the subsequent step 105) for the first time, it is determined whether the device is a device used by the user represented by the preset administrator account.
[0110] For example, it can be determined whether the distance between the location of the user represented by the preset administrator account and the location of the device during a historical time period is less than or equal to a preset distance threshold to determine whether the device is the device used by the user represented by the preset administrator account.
[0111] For another example, it is also possible to determine whether the device is a device used by a user represented by a preset administrator account by determining whether the location of the device is within a preset area.
[0112] The preset area may be determined by a preset administrator account. In addition, the preset area may also be an area reached by a mobile device designated by the preset administrator account. The mobile device is located within the preset area.
[0113] In some cases, the mobile device may be a robot vacuum cleaner. Thus, when any device is connected to the network provided by the router for the first time, the robot vacuum cleaner may be controlled to determine whether the device is located within the preset area represented by the indoor map based on the established indoor map (indicating the location of the preset area).
[0114] Specifically, when the device list includes device A, and device A has not been connected to the network provided by the above router before the current time, the regional location information of the preset area (for example, the indoor map constructed by the sweeping robot (such as the floor plan of the indoor user represented by the preset administrator account)) can be obtained. If device A is located within the range represented by the above indoor map, it can be determined that the device is not a freeloading device; if device A is located outside the above preset area, the networked device B with the smallest distance from device A can be further determined from the preset area. Among them, networked device B is the device with the smallest distance from device A among the devices connected to the network provided by the above router in the preset area. Then, based on the network signal of the network provided by the router scanned by device A and networked device B, and the distance between device A and networked device B, it is determined whether there is a partition (for example, a wall) between device A and networked device B. If there is a partition between device A and networked device B, it is determined that device A is a freeloading device; if there is no partition between device A and networked device B, it is determined that device A is not a freeloading device.
[0115] It can be understood that in the above example, the characteristic of signal attenuation when the network signal encounters a wall or other partition can be used to determine whether device A is a device used by the preset administrator account, and then determine whether device A is a freeloading device. Usually, there is no wall or other partition between the device used by the preset administrator account and the networked device B, and there is a wall or other partition between the device used by a non-preset administrator account (such as a device used by a neighbor or passerby) and the networked device B.
[0116] Step 104: Establish low-power Bluetooth connections with the devices to be networked in the list of devices to be networked.
[0117] In this embodiment, Bluetooth Low Energy, also known as Bluetooth Low Energy (Bluetooth LE, BLE), is a personal area network technology designed and sold by the Bluetooth Technology Alliance. Compared with classic Bluetooth and AP (wireless access point) mode, Bluetooth Low Energy aims to significantly reduce power consumption and cost while maintaining the same communication range.
[0118] Step 105: Send network configuration information to the devices to be networked respectively through the low-power Bluetooth connection, so that the devices to be networked establish a network connection with a router through the network configuration information.
[0119] In this embodiment, the network configuration information can be used for the device to be configured to establish a network connection with the router. As an example, the network configuration information may include an SSID (Service Set Identifier) and a password.
[0120] The control device can connect to each device to be configured in turn through low-power Bluetooth connection, and send the configuration information to each device to be configured. After receiving the configuration information, the device to be configured can actively establish a network connection with the router through the configuration information.
[0121] In some optional implementations of this embodiment, the network connection is established between the device to be networked and the router in the following manner:
[0122] First, determine whether the list of devices to be networked includes the target device.
[0123] The target device is the device to be networked that has not established the network connection with the router.
[0124] Afterwards, when the target device is included in the list of devices to be networked, the following network configuration steps (including step 1 and step 2) are performed based on the target device:
[0125] Step 1: Establish a low-power Bluetooth connection with the target device.
[0126] Step 2: Send network configuration information to the target device through the low-power Bluetooth connection, so that the target device establishes the network connection with the router through the network configuration information.
[0127] In addition, when the target device is not included in the list of devices to be networked, the network configuration step is stopped.
[0128] Here, the target device for executing the above network configuration step can be randomly selected from the network configuration devices that have not established the network connection with the router, or can be selected from the network configuration devices that have not established the network connection with the router according to a certain strategy.
[0129] The above-mentioned preset strategy may be determined based on at least one of the following: the strength of the Bluetooth signal, the distance between the device to be networked and the control device, etc.
[0130] It can be understood that in the above optional implementation method, Bluetooth low-energy connections can be established with the devices to be configured one by one. After establishing a Bluetooth low-energy connection with a single device to be configured, network configuration information can be sent to the target device through the established Bluetooth low-energy connection. Thereafter, Bluetooth low-energy connections can be established with the remaining devices to be configured, and network configuration information can be sent to the target device through the established Bluetooth low-energy connection, and so on, thereby realizing the sending of network configuration information to each device to be configured.
[0131] In some optional implementations of this embodiment, the following method may be used to send network configuration information to the devices to be configured through the low-power Bluetooth connection:
[0132] First, the network configuration priority of the devices to be configured in the list of devices to be configured is determined.
[0133] The network configuration priority may be determined based on at least one of the following: the Bluetooth signal strength of the device to be configured, and the distance between the device to be configured and the router.
[0134] Here, the network configuration priority of the device to be configured may be positively correlated with the Bluetooth signal strength of the device to be configured, and negatively correlated with the distance between the device to be configured and the router.
[0135] The network configuration priority can be used to indicate the order in which the network configuration devices are to be configured.
[0136] As an example, if the Bluetooth signal strength of the device to be networked is higher, the network configuration priority of the device to be networked can be higher. If the distance between the device to be networked and the router is closer, the network configuration priority of the device to be networked can be higher.
[0137] Afterwards, according to the determined network configuration priority, low-power Bluetooth connections are established with the devices to be configured, and network configuration information is sent to the devices to be configured.
[0138] It can be understood that in the above optional implementation, the network configuration priority of the device to be configured can be determined, so that the network configuration of the device to be configured can be performed in the corresponding order. Here, since the network configuration priority is determined based on at least one of the Bluetooth signal strength of the device to be configured and the distance between the device to be configured and the router, the network configuration efficiency of most devices to be configured can be improved by preferentially configuring the devices to be configured with stronger Bluetooth signal strength or closer distance to the router.
[0139] In some optional implementations of this embodiment, after the device to be networked establishes a network connection with a router through the network configuration information, the device to be networked sends the device information of the device to be networked to the server through the network connection.
[0140] On this basis, the device information can be obtained from the server through the network connection.
[0141] It can be understood that in the above optional implementation, although a Bluetooth low-power connection is established between the control device and the device to be bound, when the control device obtains the device information of the device to be bound, it does not directly transmit the device information through the established Bluetooth low-power connection, but obtains the above device information from the server background. In this way, the occupancy of the Bluetooth low-power connection line can be reduced, thereby further improving the network configuration efficiency of each device in the list of devices to be bound.
[0142] The network configuration method provided in the embodiment of the present application is applied to a control device. The method first scans a Bluetooth broadcast packet, then determines the device that sends the Bluetooth broadcast packet to obtain a device list, then determines the device to be configured from the device list to obtain a list of devices to be configured, then establishes a low-power Bluetooth connection with each of the devices to be configured in the list of devices to be configured, and finally, through the low-power Bluetooth connection, sends network configuration information to each of the devices to be configured, so that the devices to be configured establish a network connection with a router through the network configuration information. Thus, network configuration information can be sent to multiple devices to be configured through a low-power Bluetooth connection to establish a network connection between multiple devices to be configured and a router, so that the power consumption of the devices during batch network configuration can be reduced.
[0143] Figure 2 A flow chart of another network configuration method provided in an embodiment of the present application. Figure 2 As shown, the method specifically includes:
[0144] Step 201, scanning Bluetooth broadcast packets.
[0145] In this embodiment, step 201 and Figure 1 Step 101 in the corresponding embodiment is basically the same and will not be described again here.
[0146] Step 202: determine the device that sends the Bluetooth broadcast packet and obtain a device list.
[0147] In this embodiment, step 202 and Figure 1 Step 102 in the corresponding embodiment is basically the same and will not be described again here.
[0148] Step 203: Determine the devices to be networked from the device list to obtain a list of devices to be networked.
[0149] In this embodiment, step 203 and Figure 1 Step 103 in the corresponding embodiment is basically the same and will not be described again here.
[0150] Step 204: Establish low-power Bluetooth connections with the devices to be networked in the list of devices to be networked.
[0151] In this embodiment, step 204 and Figure 1 Step 104 in the corresponding embodiment is basically the same and will not be described again here.
[0152] Step 205: Send network configuration information to the devices to be configured respectively through the low-power Bluetooth connection, so that the devices to be configured establish a network connection with a router through the network configuration information.
[0153] In this embodiment, step 205 and Figure 1 Step 105 in the corresponding embodiment is basically the same and will not be described again here.
[0154] Step 206, determining whether the list of devices to be networked includes unbound devices, wherein the unbound devices are devices to be networked that have not established a preset association relationship with the control device.
[0155] In this embodiment, whether a device is an unbound device may be determined by marking or maintaining a relationship table.
[0156] Step 207: When the list of devices to be networked includes the unbound device, establish the preset association relationship with the unbound device to bind the unbound device.
[0157] In this embodiment, after the network configuration is performed on the device to be configured, the device to be configured may be bound.
[0158] In some optional implementations of this embodiment, the following steps may also be performed:
[0159] First, detect the device unbinding operation.
[0160] The device unbinding operation is used to release the preset association relationship between one or more devices and the control device.
[0161] Afterwards, when the device unbinding operation is detected, one or more devices indicated by the device unbinding operation are determined to obtain devices to be unbound.
[0162] The device to be unbound may be one or more devices for which the device unbinding operation instruction is performed.
[0163] Then, obtain the unbinding password of the device to be unbound.
[0164] Here, each device to be unbound may be set with one or more unbinding passwords. The unbinding passwords corresponding to different devices to be unbound may be the same or different.
[0165] Then, the unbinding password is verified.
[0166] Finally, after the unbinding password is verified, the preset association relationship between the device to be unbound and the control device is released.
[0167] Here, after completing the device binding, you can obtain the device information of the bound device through the background. Users can set the location information, identification information, unbinding password and other information of each device.
[0168] It can be understood that in the above optional implementation method, before unbinding, the unbinding password of the device to be unbound can be verified first. If and only if the unbinding password is verified, the preset association relationship between the device to be unbound and the control device can be released. This improves the security of device unbinding and can avoid the occurrence of misunderstandings.
[0169] It should be noted that, in addition to the above contents, this embodiment may also include Figure 1 The corresponding technical features described in the corresponding embodiments are realized Figure 1 For details, please refer to Figure 1 For the sake of brevity, the relevant description is not repeated here.
[0170] The network configuration method provided in the embodiment of the present application further binds the device to be configured after configuring the device to be configured, thereby facilitating the control device to manage each bound device.
[0171] The following is an illustrative description of the embodiments of the present application, but it should be noted that the embodiments of the present application may have the features described below, but the following description does not constitute a limitation on the scope of protection of the embodiments of the present application.
[0172] Please refer to Figure 3A - Figure 3D , Figure 3A - Figure 3D A network configuration binding flow chart involved in a network configuration method provided in an embodiment of the present application.
[0173] The APP (Application) in the figure can be installed and run on the above control device. DeviceA and deviceB can be two devices that send Bluetooth broadcast packets. Server can be a server.
[0174] like Figure 3A - Figure 3D As shown, the method may include the following steps:
[0175] 1. Device A and device B can send Bluetooth broadcast information (that is, the above-mentioned Bluetooth broadcast packet). The Bluetooth broadcast information carries the content of the manufacturer's customized fields, including device model, identification code, binding protocol, location information, etc.
[0176] 2. When pairing for the first time, both devices (deviceA and deviceB) are in an unbound state. The user uses the APP to perform the binding operation and enter the binding interface.
[0177] 3. The APP scans the Bluetooth broadcast packets of surrounding devices and finds a list of all supported devices around. It can display the device's binding status (including whether it is bound), location information, identification information, etc. When the device is paired for the first time and is in the out-of-box state, the binding status is unbound, the location information is empty, and the identification information is empty.
[0178] 4. After the user obtains the list of peripheral devices, he / she can select the unbound devices for network configuration according to his / her desired network configuration requirements.
[0179] 5. The APP first connects to the first device, then performs a wifi scan. The user selects wifi and enters the password to connect to wifi. After the device is connected to the network, it establishes a connection with the backend to complete the device binding. In the device list, the list of other devices except this device can be used as the list of devices to be networked.
[0180] 6. The APP connects to the remaining checked devices in turn through BLE, and transmits the Wif ISSID selected by the user in the above steps and the password entered (that is, the above network configuration information) to the device. The device actively connects to the WiFi, establishes contact with the background after connecting to the network, and completes the binding of the device.
[0181] 7. After completing the binding of all devices, the APP obtains all device information through the background. Users can set the location information, identification information, unbinding password and other information of each device.
[0182] 8. When the user's wifi password is changed, all devices need to be re-configured. At this time, all devices can be configured once through the configuration operation. The APP scans the surrounding device broadcasts and obtains a list of devices. Each device contains location information, identification information, binding information, etc. You can check the devices you need to configure the network for configuration. The APP connects to the devices one by one through BLE to complete the modification of the configuration information. As an example, please refer to Figure 4A - Figure 4B , Figure 4A - Figure 4B A network reconfiguration flow chart involving a network configuration method provided in an embodiment of the present application.
[0183] 9. To ensure reliability, when the device fails to connect to Wi-Fi, it can try to connect to Wi-Fi multiple times. After multiple failures, the user will be prompted that the device has failed to connect to the network.
[0184] Please continue to refer to Figure 5 , Figure 5 A flowchart of unbinding involved in a network configuration method provided in an embodiment of the present application.
[0185] like Figure 5 As shown, the unbinding process may include:
[0186] 1. The Bluetooth broadcast information is in the bound state. The user uses the APP to unbind and enter the unbinding interface.
[0187] 2APP scans the Bluetooth broadcast packets of surrounding devices and finds all bound devices around.
[0188] 3. Users can unbind the bound device according to their needs.
[0189] 4. The APP first connects to the first device via BLE, then sends an unbinding command, waits for the device to reply to the APP after the unbinding is completed, and the device updates the broadcast.
[0190] 5. The APP connects to the remaining selected devices in turn through BLE, then sends the unbinding command, waits for the device to reply to the APP after the unbinding is completed, and the device updates the broadcast.
[0191] 6. After all devices are unbound, the APP rescans the device broadcast to confirm the status.
[0192] It should be noted that, in addition to the contents recorded above, this embodiment may also include the technical features described in the above embodiments, so as to achieve the technical effects of the network distribution method shown above. Please refer to the above description for details. For the sake of brevity, it will not be repeated here.
[0193] The network configuration method provided in the embodiment of the present application can bind multiple devices simply and quickly. During this process, the device BLE can be always running and can be configured at any time. And because the BLE power consumption is very low, it will basically not affect the standby time of the device. In addition, the above method can automatically bind the unbound devices that are checked, avoiding the user to manually bind the devices one by one, improving the binding efficiency, shortening the binding time, and improving the user experience; the broadcast package carries the location information and identification information of the device. When the device name is the same, the user can identify each device and the location of the device; when unbinding, it is necessary to verify the password to improve the security of unbinding and avoid the situation of misunderstanding; unbinding the checked devices at one time to avoid the user manually unbinding the devices one by one, and improve the unbinding efficiency. After the first device is successfully configured, the APP will connect to other devices one by one and transmit the password. After other devices obtain the wifi password, they will connect and return the connection results to the APP via Bluetooth. When using the BLE method to connect, there is no need to switch to AP mode, and other devices to be configured do not need to actively scan and receive WIFI broadcast packets, saving power consumption.
[0194] Figure 6 A schematic diagram of the structure of a distribution network system provided in an embodiment of the present application.
[0195] The network distribution system 300 includes: a control device 301 and a router 302. The control device 301 is used to implement any of the above network distribution methods. The router 302 can be the router described in any of the above network distribution methods.
[0196] The network configuration system provided by the embodiment of the present application includes: a control device and a router. The control device is used to scan the Bluetooth broadcast packet, and then determine the device that sends the Bluetooth broadcast packet to obtain a device list, and then determine the device to be configured from the device list to obtain a list of devices to be configured, and then establish a low-power Bluetooth connection with each of the devices to be configured in the list of devices to be configured, and finally, through the low-power Bluetooth connection, send network configuration information to each of the devices to be configured, so that the devices to be configured establish a network connection with the router through the network configuration information. Thus, network configuration information can be sent to multiple devices to be configured through a low-power Bluetooth connection to establish a network connection between multiple devices to be configured and a router, so that the power consumption of the devices during batch network configuration can be reduced.
[0197] Figure 7 A schematic diagram of the structure of a network distribution device provided in an embodiment of the present application. The device is applied to control equipment. Specifically includes:
[0198] Scanning unit 401, used for scanning Bluetooth broadcast packets;
[0199] A first determining unit 402 is used to determine a device that sends the Bluetooth broadcast packet and obtain a device list;
[0200] The second determining unit 403 is used to determine the to-be-configured network device from the device list to obtain the to-be-configured network device list;
[0201] A connection unit 404 is used to establish a low-power Bluetooth connection with each of the devices to be networked in the list of devices to be networked;
[0202] The sending unit 405 is used to send network configuration information to the devices to be configured through the low-power Bluetooth connection, so that the devices to be configured establish a network connection with the router through the network configuration information.
[0203] In a possible implementation manner, the network connection between the device to be networked and the router is established in the following manner:
[0204] Determine whether the list of devices to be networked includes a target device, wherein the target device is the device to be networked that has not established the network connection with the router;
[0205] In the case where the target device is included in the list of devices to be networked, the following network configuration steps are performed based on the target device:
[0206] Establishing a low-power Bluetooth connection with the target device;
[0207] Sending network configuration information to the target device through the low-power Bluetooth connection, so that the target device establishes the network connection with the router through the network configuration information;
[0208] If the target device is not included in the list of devices to be networked, the network configuration step is stopped.
[0209] In a possible implementation manner, after the to-be-networked device establishes a network connection with the router through the network configuration information, the apparatus further includes:
[0210] A third determining unit (not shown in the figure) is used to determine whether the list of devices to be networked includes unbound devices, wherein the unbound devices are devices to be networked that have not established a preset association relationship with the control device;
[0211] A binding unit (not shown in the figure) is used to establish the preset association relationship with the unbound device to bind the unbound device when the unbound device is included in the list of devices to be networked.
[0212] In a possible implementation, the device further includes:
[0213] a detection unit (not shown in the figure), used to detect a device unbinding operation, wherein the device unbinding operation is used to release the preset association relationship between the device and the control device;
[0214] A fourth determining unit (not shown in the figure) is used to determine the device indicated by the device unbinding operation when the device unbinding operation is detected, and obtain the device to be unbound;
[0215] A first obtaining unit (not shown in the figure), used to obtain an unbinding password of the device to be unbound;
[0216] A verification unit (not shown in the figure), used to verify the unbinding password;
[0217] A releasing unit (not shown in the figure) is used to release the preset association relationship between the device to be unbound and the control device after the unbinding password is verified.
[0218] In a possible implementation, the sending of network configuration information to the devices to be networked respectively through the low-power Bluetooth connection includes:
[0219] Determine the network configuration priority of the device to be configured in the list of devices to be configured, wherein the network configuration priority is determined based on at least one of the following: the Bluetooth signal strength of the device to be configured, and the distance between the device to be configured and the router;
[0220] According to the determined network configuration priority, low-power Bluetooth connections are established with the devices to be configured, and network configuration information is sent to the devices to be configured.
[0221] In a possible implementation manner, after the device to be networked establishes a network connection with the router through the network configuration information, the device to be networked sends the device information of the device to be networked to the server through the network connection; and
[0222] The device also includes:
[0223] A second acquisition unit (not shown in the figure) is used to acquire the device information from the server through the network connection.
[0224] The network distribution device provided in this embodiment may be as follows Figure 7 The network distribution device shown in can execute all steps of the network distribution methods described above, thereby achieving the technical effects of the network distribution methods described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0225] Figure 8 A schematic diagram of a control device provided in an embodiment of the present application is shown in FIG. Figure 8 The control device 500 shown includes: at least one processor 501, a memory 502, at least one network interface 504 and other user interfaces 503. The various components in the control device 500 are coupled together via a bus system 505. It is understood that the bus system 505 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 505 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 505 is not described in detail. Figure 8 Various buses are labeled as bus system 505 .
[0226] The user interface 503 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0227] It can be understood that the memory 502 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory 502 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0228] In some implementations, the memory 502 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 5021 and an application program 5022 .
[0229] Among them, the operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 5022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 5022.
[0230] In this embodiment, by calling the program or instruction stored in the memory 502, specifically, the program or instruction stored in the application 5022, the processor 501 is used to execute the method steps provided by each method embodiment, for example, including:
[0231] Scan Bluetooth advertising packets;
[0232] Determine the device that sends the Bluetooth broadcast packet and obtain a device list;
[0233] Determine the devices to be networked from the device list, and obtain the list of devices to be networked;
[0234] Establishing low-power Bluetooth connections with the devices to be configured in the list of devices to be configured;
[0235] Through the low-power Bluetooth connection, network configuration information is sent to the devices to be configured respectively, so that the devices to be configured establish a network connection with the router through the network configuration information.
[0236] The method disclosed in the above embodiment of the present application can be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the above method in combination with its hardware.
[0237] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0238] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0239] The control device provided in this embodiment may be as follows Figure 8 The control device shown in can execute all steps of the above-mentioned network distribution methods, thereby achieving the technical effects of the above-mentioned network distribution methods. Please refer to the above related description for details. For the sake of concise description, it will not be repeated here.
[0240] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0241] When one or more programs in the storage medium can be executed by one or more processors, the above-mentioned network configuration method executed on the control device side can be implemented.
[0242] The processor is used to execute the network configuration program stored in the memory to implement the following steps of the network configuration method executed on the control device side:
[0243] Scan Bluetooth advertising packets;
[0244] Determine the device that sends the Bluetooth broadcast packet and obtain a device list;
[0245] Determine the devices to be networked from the device list, and obtain the list of devices to be networked;
[0246] Establishing low-power Bluetooth connections with the devices to be configured in the list of devices to be configured;
[0247] Through the low-power Bluetooth connection, network configuration information is sent to the devices to be configured respectively, so that the devices to be configured establish a network connection with the router through the network configuration information.
[0248] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0249] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented by hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0250] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0251] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A network distribution method, characterized in that: The method is applied to a control device, and the method comprises: Scan Bluetooth advertising packets; Determine the device that sends the Bluetooth broadcast packet and obtain a device list; Determine the devices to be networked from the device list, and obtain the list of devices to be networked; Establishing low-power Bluetooth connections with the devices to be configured in the list of devices to be configured; Through the low-power Bluetooth connection, network configuration information is sent to the devices to be configured respectively, so that the devices to be configured establish a network connection with the router through the network configuration information.
2. The method according to claim 1, characterized in that The network connection between the device to be networked and the router is established in the following manner: Determine whether the list of devices to be networked includes a target device, wherein the target device is the device to be networked that has not established the network connection with the router; In the case where the target device is included in the list of devices to be networked, the following network configuration steps are performed based on the target device: Establishing a low-power Bluetooth connection with the target device; Sending network configuration information to the target device through the low-power Bluetooth connection, so that the target device establishes the network connection with the router through the network configuration information; If the target device is not included in the list of devices to be networked, the network configuration step is stopped.
3. The method according to claim 1, characterized in that After the network-to-be-configured device establishes a network connection with the router through the network configuration information, the method further includes: Determine whether the list of devices to be networked includes unbound devices, wherein the unbound devices are devices to be networked that have not established a preset association relationship with the control device; In a case where the list of devices to be networked includes the unbound device, the preset association relationship is established with the unbound device to bind the unbound device.
4. The method according to claim 3, characterized in that The method further comprises: Detecting a device unbinding operation, wherein the device unbinding operation is used to release the preset association relationship between the device and the control device; In the case where the device unbinding operation is detected, determining the device indicated by the device unbinding operation, and obtaining the device to be unbound; Obtaining the unbinding password of the device to be unbound; Verifying the unbinding password; After the unbinding password is verified, the preset association relationship between the device to be unbound and the control device is released.
5. The method according to claim 1, characterized in that The sending of network configuration information to the devices to be configured via the low-power Bluetooth connection includes: Determine the network configuration priority of the device to be configured in the list of devices to be configured, wherein the network configuration priority is determined based on at least one of the following: the Bluetooth signal strength of the device to be configured, and the distance between the device to be configured and the router; According to the determined network configuration priority, low-power Bluetooth connections are established with the devices to be configured, and network configuration information is sent to the devices to be configured.
6. The method according to any one of claims 1 to 5, characterized in that: After the network configuration device establishes a network connection with the router through the network configuration information, the network configuration device sends the device information of the network configuration device to the server through the network connection; as well as The method further comprises: The device information is obtained from the server through the network connection.
7. A distribution network system, characterized in that: The distribution network system includes: a control device and a router; wherein the control device is used to implement the method described in any one of claims 1 to 6 above.
8. A network distribution device, characterized in that: The device is applied to a control device, and the device comprises: A scanning unit, used for scanning Bluetooth broadcast packets; A first determining unit, configured to determine a device that sends the Bluetooth broadcast packet and obtain a device list; A second determining unit is used to determine the to-be-configured network device from the device list to obtain the to-be-configured network device list; A connection unit, used to establish low-power Bluetooth connections with the devices to be configured in the list of devices to be configured; The sending unit is used to send network configuration information to the devices to be configured through the low-power Bluetooth connection, so that the devices to be configured can establish a network connection with the router through the network configuration information.
9. A control device, characterized in that: include: Memory for storing computer programs; A processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 6 is implemented.