Method and apparatus for configuring a bluetooth mesh network via bluetooth advertising
By configuring a Bluetooth Mesh network via Bluetooth broadcast and using message identifiers and address information for device matching, identification, and dynamic forwarding, the problem of low network configuration efficiency and insufficient flexibility in existing technologies is solved, enabling large-scale, fast, and accurate network access.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing Bluetooth Mesh network configuration methods are inefficient, costly, and inflexible in large-scale network deployment or long-distance scenarios, and cannot adapt to the device access needs in dynamic scenarios.
Configure the Bluetooth Mesh network via Bluetooth broadcast, use the message identifier and address information in the Bluetooth network configuration broadcast information to match and identify devices, dynamically adjust the message forwarding flag to achieve accurate access and relay forwarding, and build a network configuration mechanism with a clear structure, accurate identification and controlled propagation.
It enables rapid and wide-range network configuration without manual connection or factory preset configuration, improving network configuration efficiency and reducing resource redundancy, thus ensuring the accuracy and efficiency of the network configuration process.
Smart Images

Figure CN120547531B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method and apparatus for configuring a Bluetooth Mesh network via Bluetooth broadcast. Background Technology
[0002] In the field of Internet of Things (IoT) technology, it involves setting network parameters for devices to be connected, thereby enabling devices to automatically connect and communicate in a Bluetooth Mesh network.
[0003] Among the relevant network configuration methods, one approach is to establish a point-to-point connection with the device via mobile phone or dedicated network configuration device using BLE or GATT methods, and then send network parameters to the device to enable the device to access the Mesh network. However, this approach requires the device and the network configuration device to be within a physically direct connection range, and the configuration process relies on manual operation and is cumbersome. This results in low deployment efficiency and high labor costs in large-scale network deployment or long-distance scenarios, and the network configuration function is limited by physical distance.
[0004] On the other hand, network parameters are preset before the device leaves the factory, so that the device can connect to the Mesh network as soon as it is powered on; however, this method lacks flexibility and needs to be reconfigured once the network structure changes, which cannot adapt to the device access needs in dynamic scenarios. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, and computer-readable storage medium for configuring a Bluetooth Mesh network via Bluetooth broadcast to address the aforementioned technical problems, thereby improving network configuration efficiency and reducing resource redundancy during the network configuration process.
[0006] Firstly, this application provides a method for configuring a Bluetooth Mesh network via Bluetooth broadcast, applicable to devices to be networked, including:
[0007] Receive Bluetooth network configuration broadcast information, which is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured, and the network connection reference information includes the message number and the message forwarding flag.
[0008] Based on the first matching result between the message number and the cached information in the device to be configured, the processing status of the Bluetooth configuration broadcast information of the device to be configured is determined;
[0009] If the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information in the historical period, then the matching relationship between the device to be configured and the target device to be configured is determined according to the second matching result between the target address information and the address information of the device to be configured.
[0010] If the second matching result indicates that the device to be configured on the network matches the target device to be configured on the network, then the device to be configured on the network is designated as the target device to be configured on the network and accessed to the Bluetooth Mesh network based on the Bluetooth configuration broadcast information;
[0011] If the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding flag is updated to obtain the updated Bluetooth configuration broadcast information, and the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured, until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
[0012] Secondly, this application provides a method for configuring a Bluetooth Mesh network via Bluetooth broadcast, applicable to a network configuration node, including:
[0013] Broadcast Bluetooth network configuration information;
[0014] If a network configuration response broadcast message is received from the target device to be configured in response to the Bluetooth network configuration broadcast message, it indicates that the network configuration of the target device to be configured has been successful.
[0015] If the network distribution response broadcast information is not received within the preset time period, it indicates that the network distribution to the target device to be distributed has failed.
[0016] Historical network configuration records are retrieved from the local storage or cloud storage of the network configuration node. The historical network configuration records are parsed to obtain the message jump path of the Bluetooth network configuration broadcast information within the historical time period.
[0017] Based on the structural distribution characteristics of the message jump path, the expected distance radius corresponding to the response area of the target network device to be configured is calculated;
[0018] The number of message forwardings in the Bluetooth network configuration broadcast information is dynamically adjusted according to the expected distance radius, so as to generate adjusted Bluetooth network configuration broadcast information based on the adjusted number of message forwardings. The adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured.
[0019] The adjusted Bluetooth network configuration broadcast information is rebroadcast until the target device to be configured for network configuration is successfully configured.
[0020] Thirdly, this application also provides a device for configuring a Bluetooth Mesh network via Bluetooth broadcast, applicable to devices to be networked, including:
[0021] The receiving module is used to receive Bluetooth network configuration broadcast information. The Bluetooth network configuration broadcast information is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured. The network connection reference information includes the message number and the message forwarding mark.
[0022] The first matching module is used to determine the processing status of the Bluetooth network configuration broadcast information of the device to be configured based on the first matching result between the message identifier and the cached information in the device to be configured.
[0023] The second matching module is used to determine the matching relationship between the device to be configured and the target device to be configured if the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information in a historical period.
[0024] The first analysis module is used to, if the second matching result indicates that the device to be configured for network configuration matches the target device to be configured for network configuration, then to use the device to be configured for network configuration as the target device to be configured for network configuration and to access the Bluetooth Mesh network based on the Bluetooth configuration broadcast information;
[0025] The second analysis module is used to update the message forwarding flag to obtain the updated Bluetooth network configuration broadcast information if the second matching result indicates that the device to be configured does not match the target device to be configured. The updated Bluetooth network configuration broadcast information is then forwarded to the next device to be configured until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
[0026] Fourthly, this application also provides a device for configuring a Bluetooth Mesh network via Bluetooth broadcast, applied to a network distribution node, including:
[0027] The broadcast module is used to broadcast Bluetooth network configuration information.
[0028] The first detection module is used to indicate that the network configuration of the target device to be configured is successful if it receives a network configuration response broadcast message from the target device to be configured in response to the Bluetooth network configuration broadcast message.
[0029] The second detection module is used to indicate that the network configuration for the target device to be configured has failed if the network configuration response broadcast information is not received within a preset time period.
[0030] The third analysis module is used to obtain historical network distribution records from the local storage or cloud storage of the network distribution node, parse the historical network distribution records, and obtain the message jump path of the Bluetooth network distribution broadcast information within the historical time period.
[0031] The fourth analysis module is used to calculate the expected distance radius corresponding to the response area of the target network device based on the structural distribution characteristics of the message jump path.
[0032] An adjustment module is used to dynamically adjust the number of message forwardings in the Bluetooth network configuration broadcast information according to the expected distance radius, so as to generate adjusted Bluetooth network configuration broadcast information based on the adjusted number of message forwardings, and the adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured.
[0033] The broadcast module is also used to: rebroadcast the adjusted Bluetooth network configuration broadcast information until the target device to be configured for network configuration is successfully configured.
[0034] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the above steps.
[0035] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the above steps.
[0036] The method, apparatus, computer device, and computer-readable storage medium for configuring a Bluetooth Mesh network via Bluetooth broadcast described above, firstly, the device to be configured receives Bluetooth network configuration broadcast information. Based on a first matching result between the message identifier in the Bluetooth network configuration broadcast information and the cached information, it effectively identifies and excludes already processed broadcast information, avoiding duplicate processing. Secondly, if the first matching result indicates that the device to be configured has not processed any broadcast information, based on a second matching result between the target address information in the Bluetooth network configuration broadcast information and the current device address, it accurately identifies the device identity, ensuring that the network configuration action is performed only on the target device to be configured. Furthermore, if the second matching result indicates that the device to be configured has matched... For the target device to be configured, the access operation is driven, thereby achieving accurate access between the target device and the Bluetooth Mesh network. Furthermore, if the second matching result indicates that the device to be configured does not match the target device, relay forwarding is performed according to the updated message forwarding flag, thereby enabling the propagation and delivery of Bluetooth configuration broadcast information within a limited range. Based on this, a Mesh configuration mechanism with a clear structure, accurate identification, and controlled propagation can be constructed. During the configuration process, no manual connection or factory preset configuration is required. It can achieve rapid configuration over a wide range by relaying within the dynamic message distance according to the customized broadcast information, thereby improving configuration efficiency and reducing resource redundancy during the configuration process. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating a method for configuring a Bluetooth Mesh network via Bluetooth broadcast in one embodiment.
[0039] Figure 2 This is a flowchart illustrating a method for configuring a Bluetooth Mesh network via Bluetooth broadcast in another embodiment.
[0040] Figure 3 This is a flowchart illustrating a method for configuring a Bluetooth Mesh network via Bluetooth broadcast in another embodiment.
[0041] Figure 4 This is a structural block diagram of an apparatus for configuring a Bluetooth Mesh network via Bluetooth broadcast in one embodiment;
[0042] Figure 5 This is a structural block diagram of an apparatus for configuring a Bluetooth Mesh network via Bluetooth broadcast in another embodiment. Detailed Implementation
[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0044] In one embodiment, such as Figure 1 As shown, a method for configuring a Bluetooth Mesh network via Bluetooth broadcast is provided. This embodiment uses the method applied to a device to be configured as an example for illustration. The method includes the following steps S101 to S105.
[0045] Step S101: Receive Bluetooth network configuration broadcast information. The Bluetooth network configuration broadcast information is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured, and the network connection reference information includes the message number and the message forwarding mark.
[0046] The Bluetooth configuration broadcast message refers to a set of data frames constructed by the configuration node and sent via Bluetooth broadcast to implement the configuration operation of the Bluetooth Mesh network, guiding the target device to complete the network access process. The configuration node refers to a Mesh device node that has already connected to the Bluetooth Mesh network and has the capability to send Bluetooth configuration broadcast messages. It is used to proactively initiate network access guidance broadcasts to other unconfigured devices in the network, such as gateways and dedicated configuration devices.
[0047] In this context, "device to be configured" refers to the device that receives Bluetooth configuration broadcast information during the Bluetooth Mesh network configuration process and participates in identifying and processing this information to determine whether it is the target device for access. "Target device to be configured" refers to the target device for access explicitly specified in the Bluetooth configuration broadcast information.
[0048] Among them, the network configuration information represents the set of core parameters required to guide the target device to complete the Bluetooth Mesh network access process, namely, the network parameters and security parameters of the target device to be configured and initialized; the target address information represents the address field in the Bluetooth configuration broadcast information used to indicate the identity of the target device to be configured, and is used to guide each device to be configured to perform address comparison to determine whether it is the target of this access operation.
[0049] The network connection reference information represents a set of auxiliary parameters used to indicate the transmission status, forwarding path, and processing history of Bluetooth network configuration broadcast information, which guides the transmission and identification of Bluetooth network configuration broadcast information among multiple devices to be configured. The message identifier represents an identification number used to uniquely identify the Bluetooth network configuration broadcast information, which helps the device to be configured to receive the broadcast information to determine whether it has already processed the current broadcast information, avoiding duplicate responses and redundant processing. The message forwarding flag represents a control field in the Bluetooth network configuration broadcast information used to record the message forwarding status, which limits the propagation range and forwarding path length of the broadcast information, ensuring that the broadcast information is reasonably propagated in the network.
[0050] For example, the device to be configured is in a state where it can listen to broadcast signals and continuously parses the received Bluetooth configuration broadcast information. The received Bluetooth configuration broadcast information is a data set generated by encapsulating and structurally encoding the preset network configuration information in the Bluetooth Mesh network and the network connection reference information of the configuration nodes. On one hand, the network configuration information is used to accurately identify which devices to be configured are the target access objects during the broadcast process. This typically includes the target address information of the target devices, which is used to accurately compare with the address of the listening device itself. On the other hand, the network connection reference information contains the message number and message forwarding flag corresponding to the configuration broadcast. This information is used to determine the forwarding status of the broadcast message among the subsequent devices to be configured and to determine whether to continue forwarding the current Bluetooth configuration broadcast information.
[0051] Step S102: Based on the first matching result between the message identifier and the cached information in the device to be configured, determine the processing status of the Bluetooth configuration broadcast information of the device to be configured.
[0052] Among them, the cache information in the device to be configured represents a temporary data set stored inside the device to record the identifiers of Bluetooth network configuration broadcast information that has been recently received and processed, which is used to support the device to be configured to determine whether newly received broadcast information is duplicated.
[0053] The first matching result represents the judgment result after the device to be configured compares the message number in the currently received Bluetooth configuration broadcast information with the cached information. It is used to identify whether the current Bluetooth configuration broadcast information is historically processed information, such as obtaining a processing status judgment value of "unprocessed" or "processed" after comparison.
[0054] For example, after receiving Bluetooth network configuration broadcast information, the device to be configured needs to compare and analyze the message number of the information with the cached information stored in the device. The message number is used to assign a unique identifier to each Bluetooth network configuration broadcast message, so that each device to be configured can determine whether the currently received Bluetooth network configuration broadcast message is the first time it has been received, or whether the same broadcast message has been processed in a previous period of time. Specifically, to implement this comparison process, the device to be configured needs to maintain a cache mechanism based on historical broadcast identifiers, which stores message identifiers that have been processed within a certain time range. When executing the comparison logic, the device to be configured extracts the message identifier from the current Bluetooth configuration broadcast information and compares it with all recorded message identifiers in the cache. If no corresponding message identifier is found in the cache, it can be determined that the Bluetooth configuration broadcast information is being received for the first time, and thus the device to be configured is in a state where the Bluetooth configuration broadcast information has not yet been processed. Conversely, if the message identifier already exists in the cache, it means that the current Bluetooth configuration broadcast information has been processed, and the device to be configured can directly discard the broadcast information to avoid redundant processing. Based on this, the unique identification of Bluetooth configuration broadcast information is achieved, preventing duplicate processing, improving the logical clarity and operational efficiency of the entire broadcast configuration process, and ensuring that each device to be configured can correctly distinguish between processed and unprocessed information content.
[0055] Step S103: If the first matching result indicates that the device to be configured has not processed Bluetooth configuration broadcast information in the historical time period, then the matching relationship between the device to be configured and the target device to be configured is determined according to the second matching result between the target address information and the address information of the device to be configured.
[0056] The second matching result refers to the judgment result after the device to be configured compares the target address information in the Bluetooth configuration broadcast information with its own address, provided that the current Bluetooth configuration broadcast information is received for the first time. This result is used to determine whether the device is the target of the current configuration operation. For example, the comparison will result in an address identification result of "match" or "not match".
[0057] For example, after confirming that the current Bluetooth network configuration broadcast message is being received for the first time, the device to be configured further extracts the target address information from the Bluetooth network configuration broadcast message and compares it one by one with its own internally stored device address information to determine whether the current Bluetooth network configuration broadcast message is intended for this device. The target address information is the target device address set by the configuration node, which indicates the scope of the Bluetooth network configuration broadcast message. Specifically, during this comparison process, the device to be configured must completely read the target address information and match it bit by bit with its own address information to ensure that the address content is consistent in terms of format, encoding length, and specific values before a successful match can be determined. If any differences are found during the comparison process, whether it is a format deviation or a numerical inconsistency, it should be considered a mismatch. Based on this, it is ensured that each Bluetooth network configuration broadcast message is only processed by the target device to be configured, preventing non-target devices from participating in the incorrect configuration process due to mismatch, thereby maintaining the accuracy and order of Bluetooth Mesh network configuration operations.
[0058] Step S104: If the second matching result indicates that the device to be configured matches the target device to be configured, then the device to be configured is used as the target device to be configured and accesses the Bluetooth Mesh network based on the Bluetooth configuration broadcast information.
[0059] For example, if the second matching result shows that the address information of the device to be configured is completely consistent with the target address information in the Bluetooth configuration broadcast information, then it is determined that the current device to be configured is the target device to be configured as indicated by the Bluetooth configuration broadcast information. At this time, the target device to be configured needs to perform an access operation based on the content of the received complete Bluetooth configuration broadcast information, that is, to perform network initialization settings and resource mapping operations based on the network configuration information therein. This access process involves reading the parameters provided in the Bluetooth configuration broadcast information item by item and mapping them to the target device's local configuration module, including configuring the network group ID, subnet grouping parameters, and network communication control parameters. Furthermore, after loading these parameters, the target device to be configured further enters the Bluetooth Mesh network access process, sending a network access request flag to the network through the device's internal communication protocol stack mechanism, and simultaneously updating its own network status flag to reflect the current access status. Based on this, a logical closed loop from broadcast reception and judgment to formal network access is realized, thereby completing the identity verification and network affiliation conversion of the target device to be configured.
[0060] Step S105: If the second matching result indicates that the device to be configured does not match the target device to be configured, then update the message forwarding flag to obtain the updated Bluetooth configuration broadcast information, and forward the updated Bluetooth configuration broadcast information to the next device to be configured, until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
[0061] Among them, the dynamic message distance represents the distance control parameter used to indicate the maximum transmission range or remaining hops of Bluetooth configuration broadcast information that can continue to be forwarded in the Bluetooth Mesh network. It is used to limit the forwarding chain length of Bluetooth configuration broadcast information to ensure that it reaches the target device to be configured within a limited propagation path. For example, the hop count, which is initialized to 3, is decremented by 1 after each forwarding until it reaches 0 and then the transmission is terminated.
[0062] For example, if the second matching result indicates that the current device to be configured does not match the target address information in the Bluetooth configuration broadcast information, meaning the current device to be configured is not the target device to be configured as indicated by the Bluetooth configuration broadcast information, then the current device to be configured will not perform an access operation. Instead, it will process the current Bluetooth configuration broadcast information to continue forwarding it to other devices to be configured in the network. To this end, the message forwarding flag in the Bluetooth configuration broadcast information needs to be updated to update the forwarding status of the Bluetooth configuration broadcast information, thereby indicating that the current Bluetooth configuration broadcast information has been processed by this device. Specifically, updating the message forwarding flag is reflected in adjusting the dynamic message distance of the broadcast transmission, for example, by indicating the remaining transmission hops in a decremental manner, thereby limiting the transmission range of the Bluetooth configuration broadcast information in the network and preventing unlimited propagation that could cause network congestion. Furthermore, after completing the message forwarding flag update, the current device to be configured repackages the updated Bluetooth configuration broadcast information according to the broadcast mechanism in the protocol stack and forwards it to surrounding devices to be configured through the local wireless communication channel.
[0063] Subsequent receiving devices will continue the receiving, matching, and forwarding process based on the same judgment mechanism as the current device, until a device to be configured is identified as the target device and completes the connection within a limited number of transmission hops. Based on this, by constructing a forwarding chain for Bluetooth configuration broadcast information and combining it with a hop count limitation mechanism for message forwarding tags, the propagation of Bluetooth configuration broadcast information in a Bluetooth Mesh network can be controlled, ensuring that the information can accurately locate the target device to be configured and complete the configuration process within a controllable range.
[0064] In the above method for configuring a Bluetooth Mesh network via Bluetooth broadcast, firstly, the device to be configured receives Bluetooth network configuration broadcast information. Based on the first matching result between the message identifier in the Bluetooth network configuration broadcast information and the cached information, it effectively identifies and excludes already processed broadcast information, avoiding duplicate processing. Secondly, if the first matching result indicates that the device to be configured has not processed any broadcast information, based on the second matching result between the target address information in the Bluetooth network configuration broadcast information and the current device address, it accurately identifies the device identity, ensuring that the network configuration action is performed only on the target device to be configured. Furthermore, if the second matching result indicates that the device to be configured matches the target device to be configured... This drives the access operation, enabling precise access between the target device to be configured and the Bluetooth Mesh network. Furthermore, if the second matching result indicates that the device to be configured does not match the target device, relay forwarding is performed according to the updated message forwarding flag, thereby enabling the propagation and delivery of Bluetooth configuration broadcast information within a limited range. Based on this, a well-structured, accurately identified, and controlled Mesh configuration mechanism can be constructed. During the configuration process, no manual connection or factory preset configuration is required. It can achieve rapid configuration over a wide range by relaying within the dynamic message distance according to the customized broadcast information, thereby improving configuration efficiency and reducing resource redundancy during the configuration process.
[0065] In an exemplary embodiment, if the second matching result indicates that the device to be configured matches the target device to be configured, then the device to be configured is used as the target device to be configured and accesses the Bluetooth Mesh network based on the Bluetooth configuration broadcast information, including steps S201 to S202; the method further includes steps S203 to S205.
[0066] Step S201: If the second matching result indicates that the device to be configured on the network matches the target device to be configured on the network, then obtain the network key, application key, and network device address from the network configuration information.
[0067] The network key represents the underlying key used to encrypt and decrypt communication data between devices in a Bluetooth Mesh network. It is used to ensure the security and consistency of communication between the access device and the network, such as for encryption authentication when the device receives and parses network messages.
[0068] The application key is an encryption key used to bind the relationship between the application functions of a device and its network permissions. It is used to ensure that the device can only access application layer control commands that match its role, such as limiting a device to the application permissions of a lighting control module.
[0069] The network device address represents a unique address code used to identify the target device in the Bluetooth Mesh network. It is used for data exchange and addressing operations between devices, such as determining the unicast address of the data target during network forwarding.
[0070] For example, after confirming that the second matching result shows that the address information of the current device to be configured matches the target address information in the Bluetooth configuration broadcast information, the current device to be configured is used as the target device to be configured for subsequent access configuration processing. Specifically, to achieve effective configuration of the target device to be configured, key parameters required for network access need to be extracted from the received Bluetooth configuration broadcast information. These parameters include the network key, application key, and network device address. Among them, the network key, as a basic parameter supporting communication encryption and network identification, plays a role in maintaining the basic communication security and consistency of the target device to be configured after joining the network; the application key, as an encryption parameter for distinguishing the access control of device functional modules, plays a role in ensuring that the target device to be configured can only access application resources or task commands that match its own identity after accessing the network; the network device address, as an address field that uniquely identifies the target device to be configured, is used to ensure that the address of the target device to be configured is not duplicated with the address of existing devices in the network.
[0071] In step S202, during the network configuration process of the target device to be configured, the network layer communication parameters of the target device to be configured are encrypted according to the network key, the application function modules of the target device to be configured are bound to permissions according to the application key, and the network identity of the target device to be configured is identified according to the network device address, so as to obtain the target device to be configured with network and access the Bluetooth Mesh network.
[0072] Among them, the network layer communication parameters represent a set of control fields related to the device's communication capabilities, which are obtained based on the network key configuration. These fields are used to manage the device's data forwarding behavior and encryption verification process at the network layer, and may include encryption indexes, receiving lists, or forwarding control fields.
[0073] The application function module represents a logical unit in the device that performs specific functions. It is used to respond to upper-layer application control commands and execute corresponding tasks, such as adjusting light brightness, collecting sensor data, or controlling switches.
[0074] Among them, network identity identifiers represent a set of identifiers used to identify and label the identity of devices within a Mesh network. They are used to bind devices to their addresses, communication states, etc., such as a node identity description value generated by combining a network address and an identity label.
[0075] For example, during the network configuration process for a target device, firstly, the network key needs to be loaded into the network communication module within the target device. Based on this network key, the network layer communication parameters used by the device are updated, including the encryption algorithm seed, broadcast group identifier, and related authentication values, to enable the target device to subsequently recognize and respond to Mesh network messages. Secondly, the application key needs to be bound to the preset application function module identifier in the target device. This means pairing the application key with specific function service logic to ensure that the target device only activates relevant control function services with authorization. Thirdly, the network device address needs to be written into the address register structure of the target device and used as the network identifier address for external communication, for subsequent data transmission and reception, network path identification, and authentication. Finally, throughout the entire network configuration process, it must be ensured that the above parameters are written only after data verification, so that the configured target device can access the Bluetooth Mesh network.
[0076] Step S203: Obtain the message forwarding count from the network connection reference information and the address information of the network configuration node from the network configuration information. Perform message forwarding mark restoration processing based on the message forwarding count to obtain the message forwarding mark in the initial state.
[0077] The message forwarding count indicates the maximum number of times a Bluetooth configuration broadcast message is allowed to be forwarded in a Mesh network. It is used to limit the scope of message propagation and prevent broadcast flooding. For example, configuration broadcasts are allowed to relay a maximum of 3 times.
[0078] For example, during the previous network configuration broadcast propagation process, the message forwarding flag in the Bluetooth network configuration broadcast information is modified or decremented with each relay to indicate its forwarding status and remaining transmission depth. Therefore, after the target device to be configured for network access completes its network entry configuration, in order to construct the response information broadcast back to the network configuration node, it is necessary to restore the relevant control fields for message forwarding in the current device to support subsequent broadcast backhaul. Specifically, firstly, the message forwarding count and the address information of the network configuration node initially included in the Bluetooth network configuration broadcast information are obtained. The message forwarding count records the maximum propagation distance or allowed hop value originally set for the Bluetooth network configuration broadcast information, and the address information of the network configuration node records the information source of the Bluetooth network configuration broadcast information and the target sending address corresponding to the response information of the target device to be configured for network access. Secondly, based on the message forwarding count, the previously decremented message forwarding flag is restored to the same value as the initial state so that the response information has equivalent propagation capability when constructing the broadcast backhaul path, ensuring that the response information can be successfully propagated back to the original network configuration node in subsequent backhaul broadcasts, thereby completing the network entry confirmation.
[0079] Step S204: Obtain the randomly generated target message label, and encapsulate the message forwarding flag, message forwarding count, target message label, and address information of the distribution network node in the initial state to obtain the distribution network response broadcast information.
[0080] Among them, the distribution network response broadcast information refers to the broadcast data packet generated and sent by the target distribution network device after completing the network configuration, which is used to inform the distribution network node that it has successfully accessed the network.
[0081] The target message number represents a unique identifier created by the target network device when generating the network response broadcast information. It is used to distinguish different network response broadcasts to confirm the source of the response.
[0082] For example, firstly, a new target message identifier is generated. This identifier can be generated in the same way as the message identifier in the Bluetooth network configuration broadcast message to meet the requirements of uniqueness and traceability. The generated target message identifier is used to identify the identity of this network configuration response broadcast and is used as a pairing basis after the network configuration node receives it. Subsequently, the message forwarding flag restored to its initial state, the message forwarding count extracted from the Bluetooth network configuration broadcast message, the newly generated target message identifier, and the address information of the network configuration node are packaged and encapsulated to form a structured network configuration response broadcast message. During the encapsulation process, field encoding and content combination must be performed according to the established data frame structure in the Mesh network to ensure that the network configuration node can correctly identify the semantics of each field and verify its source and matching relationship upon receipt. Furthermore, the encapsulated network configuration response broadcast message should also carry the current device's access status to inform the network configuration node of the network access completion status.
[0083] Step S205: Based on the dynamic message distance determined by the message forwarding tag in the initial state, broadcast the distribution network response broadcast information until the distribution network node receives the distribution network response broadcast information to determine that the target device to be distributed has been connected to the Bluetooth Mesh network.
[0084] For example, a broadcast operation is initiated based on the encapsulated distribution network response broadcast information, ensuring that this information is ultimately delivered to the original distribution network node to complete the network access confirmation. Specifically, the dynamic message distance that the distribution network response broadcast information can propagate is determined based on the dynamically changing message forwarding flag in the information, i.e., the maximum number of hops the broadcast information can be forwarded in the network, to control the propagation range of the information and avoid unnecessary network congestion. Furthermore, during the broadcast initiation process, the distribution network response broadcast information is sent according to the standard Mesh broadcast protocol, and is decremented based on the current hop count during each relay until the hop count is exhausted or the information is received by the distribution network node. Moreover, throughout the broadcast propagation path, the relay devices in the Mesh network identify and compare the identifier field of the broadcast information to ensure its validity and propagation authority, while avoiding confusion with other broadcast information. Finally, after the distribution network node receives the distribution network response broadcast information carrying the corresponding target message identifier and the distribution network node address information, it can confirm that the corresponding target device to be configured has completed the access operation.
[0085] In this embodiment, firstly, by extracting and processing the network key, application key, and network device address from the Bluetooth network configuration broadcast information, a complete set of network access parameters is provided for the target device to be configured. Secondly, based on the corresponding configuration behavior of the network key, application key, and network device address, comprehensive access initialization of the target device to be configured at the network layer, application layer, and address layer is achieved. Thirdly, the message forwarding mark is restored, and the corresponding information is encapsulated into a unique and complete network configuration response broadcast information, thereby restoring the propagation capability of the response information and ensuring an effective return path for the response information. Fourthly, based on the broadcast mechanism under dynamic message distance control, reliable perception of the network status of the target device to be configured is achieved by the network configuration node, improving the traceability of the network configuration process and the network feedback capability upon configuration completion.
[0086] In an exemplary embodiment, if the second matching result indicates that the device to be configured does not match the target device to be configured, the message forwarding flag is updated to obtain the updated Bluetooth configuration broadcast information, and the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured, including steps S301 to S302; the method further includes step S303.
[0087] Step S301: If the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding mark is updated by decreasing according to the preset update step size to obtain the updated message forwarding mark, and the updated Bluetooth configuration broadcast information is obtained according to the updated message forwarding mark.
[0088] The update step size represents the fixed reduction unit used when decrementing the message forwarding tag, which is used to reduce the remaining value of the message forwarding tag after each relay process, thereby controlling the propagation depth of broadcast information in the Mesh network.
[0089] For example, after comparing the target address information in the Bluetooth network configuration broadcast message with the address information of the device to be configured, if the second matching result shows that the two are inconsistent, it is determined that the device to be configured is not the target device to be configured in this network configuration broadcast. At this time, the device to be configured should not perform network access configuration, but should enter the relay forwarding process of the Bluetooth network configuration broadcast message. In order to control the transmission depth of the Bluetooth network configuration broadcast message in the network and prevent the Bluetooth network configuration broadcast message from spreading indefinitely, the device to be configured needs to perform a decrement update operation on the message forwarding flag carried in the Bluetooth network configuration broadcast message. Specifically, this update is based on a preset step size value, usually a fixed decrement operation, indicating that the device to be configured has completed one forwarding behavior. Based on this, the updated message forwarding tag indicates that the Bluetooth network configuration broadcast message has undergone a new relay process and the current hop count has decreased. Subsequently, the device to be configured embeds the updated message forwarding tag into the corresponding field of the original Bluetooth network configuration broadcast message to construct a new Bluetooth network configuration broadcast message. That is, the new Bluetooth network configuration broadcast message maintains the integrity of the original fields in structure, and only the value of the message forwarding tag changes. Based on this, it is ensured that the propagation path length of the Bluetooth network configuration broadcast message can be tracked after passing through each device node, and a basis for determining whether to continue forwarding is provided.
[0090] In step S302, if the updated message forwarding tag meets the preset threshold condition, the device to be configured is used as a message relay node to forward the updated Bluetooth configuration broadcast information to the next device to be configured.
[0091] The preset threshold condition refers to the numerical limit standard used to determine whether the message forwarding flag has reached the condition for allowing continued forwarding. It is used to determine whether the current network device to be configured has relay permission. For example, the minimum allowed forwarding flag value is set to 1. If the current value of the message forwarding flag is less than 1, it will no longer be forwarded.
[0092] Among them, the message relay node refers to the device node that receives, updates and rebroadcasts the broadcast information during the distribution network broadcast process, and is used to relay Bluetooth distribution network broadcast information between devices.
[0093] For example, after updating the message forwarding tag, the device to be configured needs to perform a conditional judgment on the current value of the updated message forwarding tag to determine whether it has the authority to continue forwarding the Bluetooth configuration broadcast information to the next device to be configured. Specifically, this judgment is based on a set threshold condition: if the current value of the message forwarding tag is greater than zero, relaying can continue; otherwise, forwarding stops. Further, provided that the current value of the message forwarding tag meets the threshold condition, the device to be configured needs to set itself as a message relay node. In this state, the device to be configured broadcasts the updated Bluetooth configuration broadcast information through its local broadcast mechanism, so that the updated Bluetooth configuration broadcast information can be received by other devices within its communication range in the network. Based on this, it ensures that the Bluetooth configuration broadcast information can be received and judged by multiple devices within a reasonable hop count, which helps improve the discovery probability of the target device to be configured, while also controlling the depth of the forwarding path and avoiding network congestion caused by excessive broadcasting.
[0094] In step S303, if the updated message forwarding tag does not meet the preset threshold condition, the device to be configured is used as a message termination node to discard the updated Bluetooth configuration broadcast information.
[0095] For example, a message termination node refers to a device node that, during the distribution network broadcasting process, determines that the broadcast information has reached the maximum allowed number of propagations and then performs a termination operation on the broadcast information to prevent the broadcast information from continuing to spread.
[0096] For example, if the device to be configured finds that the current value of the updated message forwarding tag does not meet the preset threshold condition after performing a threshold judgment on the updated message forwarding tag, i.e., the current value has decreased to zero or reached the specified termination state, it indicates that the Bluetooth configuration broadcast information has propagated to the maximum allowed hop count in the network and cannot continue to propagate to other devices. In this case, the device to be configured needs to identify the currently received Bluetooth configuration broadcast information as information exceeding the propagation range and set itself as a logical role of a message termination node. In this state, the device to be configured will actively discard the Bluetooth configuration broadcast information that has reached the propagation limit to terminate the further spread of the Bluetooth configuration broadcast information in the network. Based on this, the circular propagation or ineffective propagation of Bluetooth configuration broadcast information in the network is effectively avoided, the overall network propagation efficiency is improved, and the controllable allocation of network resources is ensured, logically realizing the automatic termination mechanism of the Mesh broadcast path.
[0097] In this embodiment, firstly, when the second matching result indicates that the device to be configured and the target device to be configured do not match, the propagation depth of the Bluetooth configuration broadcast information is dynamically adjusted and a clear propagation hierarchy is established by decrementing and updating the message forwarding flag. Secondly, it is determined whether the updated message forwarding flag meets the preset threshold condition, so that the device to be configured with relay conditions performs the forwarding operation and continues the broadcast path, while the device to be configured without relay conditions performs the discard operation to achieve automatic termination of the broadcast information and release of resources at the propagation limit. Based on this, a Mesh broadcast management mechanism with controlled forwarding range, adaptive node roles, and terminateable propagation path can be constructed, thereby improving the efficiency of configuration broadcast and the orderliness of network transmission.
[0098] In an exemplary embodiment, if the second matching result indicates that the device to be configured does not match the target device to be configured, the message forwarding mark is updated by decreasing according to the preset update step size to obtain the updated message forwarding mark, including steps S401 to S402; the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured, including step S403.
[0099] Step S401: If the second matching result indicates that the device to be configured does not match the target device to be configured, then the forwarding priority of the device to be configured is obtained. The forwarding priority of the device to be configured is determined based on the network characteristics and historical operating characteristics of the device to be configured in the current network environment.
[0100] Among them, forwarding priority indicates the priority level of the device to be configured when performing Bluetooth configuration broadcast relay forwarding operation. It is used to measure the ability and applicability of the device to be configured to undertake forwarding tasks in the network. For example, it can be rated as a high-priority device based on node stability and forwarding success rate.
[0101] Among them, the network characteristics and historical operating characteristics in the current network environment represent a set of dynamic parameters used to evaluate the forwarding priority of the device. The network characteristics include information such as the connection density of the current device, the quality of neighboring nodes, and the stability of the location channel. The historical operating characteristics include the number of successful forwardings, response latency, and broadcast coverage of the current device in previous forwarding processes, which are used to comprehensively judge the forwarding performance of the current device.
[0102] For example, if the second matching result indicates that the device to be configured is not the target device to be configured as indicated by the Bluetooth configuration broadcast information, then the configuration access operation is not performed at this time, and the preparation stage for forwarding the broadcast information is entered. Specifically, in order to further optimize the forwarding efficiency and propagation path selection mechanism of the Bluetooth configuration broadcast information, it is necessary to obtain the forwarding priority of the current device to be configured. This forwarding priority is not a fixed parameter, but is obtained by comprehensively evaluating the actual network characteristics of the network environment in which the current device to be configured is located and its historical operating characteristics formed in previous communication processes. The network characteristics may include factors such as the connection density and stability between the device and surrounding nodes, the transmission quality of the communication link, and the physical or topological location of the device node; the historical operating characteristics cover the device's participation frequency, success rate, response latency, and other operating indicators in past forwarding tasks. Based on this, by analyzing the parameter content of the above multiple dimensions, a numerical evaluation that measures the device's relay capability and network role is finally formed as the forwarding priority of the device to be configured. This forwarding priority is used to guide the step size selection and delay control in subsequent forwarding behavior and is the basis for constructing a multi-level broadcast strategy.
[0103] Step S402: Determine the update step size corresponding to the device to be configured based on the forwarding priority of the device to be configured, and update the message forwarding mark by decrementing according to the update step size corresponding to the device to be configured to obtain the updated message forwarding mark.
[0104] For example, after acquiring and confirming its own forwarding priority, the device to be configured in the network needs to determine the corresponding update step size based on the forwarding priority to perform a decrement update operation on the message forwarding tag. Specifically, there is a corresponding relationship between the update step size and the forwarding priority. Generally, the higher the forwarding priority, the smaller the update step size, indicating that the device, due to its stronger forwarding capability or superior position, should propagate its broadcast information as many hops as possible to expand its coverage. Conversely, devices with lower forwarding priorities correspond to larger update step sizes to limit their broadcast range and avoid unnecessary network load. In this process, the device to be configured in the network converts the current forwarding priority into the corresponding update step size value through a preset mapping function or lookup table structure, and then subtracts the corresponding update step size value from the original message forwarding tag to obtain the updated message forwarding tag. Furthermore, after performing this decrement operation, the device to be configured in the network also needs to verify the numerical range of the message forwarding tag to ensure that it does not exceed the allowable limit and avoid overflow or negative values. Based on this, a dynamic correspondence between forwarding depth and device capability is realized, thereby improving the rationality of broadcast paths in the network and the accuracy of resource allocation for message propagation.
[0105] Step S403: Determine the forwarding delay corresponding to the device to be configured based on the forwarding priority of the device to be configured, and forward the updated Bluetooth configuration broadcast information to the next device to be configured according to the forwarding delay corresponding to the device to be configured.
[0106] The forwarding delay refers to the waiting time set by the device to be configured after receiving the Bluetooth configuration broadcast information to be forwarded, according to its forwarding priority. This is used to disperse broadcast conflicts caused by multiple devices forwarding at the same time, thereby controlling the broadcast order in an orderly manner. For example, high forwarding priority device nodes are set to broadcast forwarding after 20 milliseconds, while low forwarding priority device nodes are set to broadcast forwarding after 100 milliseconds.
[0107] For example, after updating the message forwarding tag, the device to be configured enters the broadcast information sending phase. Before the broadcast operation is executed, the forwarding delay setting needs to be further determined according to the forwarding priority of the current device to be configured. This forwarding delay represents the waiting time between the device receiving the broadcast information and starting the forwarding operation, and its setting is used to control the conflict problem caused by concurrent forwarding of multiple nodes in the Mesh network. Specifically, devices with higher forwarding priority are allocated shorter forwarding delays, allowing them to send broadcast information first, thereby improving the occupancy rate of efficient paths; while devices with lower forwarding priority need to wait for a longer time to avoid redundant conflicts in the network. Based on this, the device to be configured finds the corresponding forwarding delay value according to the forwarding priority and waits; when the set time point corresponding to the forwarding delay value is reached, the device to be configured sends the updated Bluetooth configuration broadcast information through the local broadcast function, covering other devices to be configured within the current broadcast range. Based on this, not only is the timing management of the broadcast ensured, but the coordination capability of concurrent forwarding of multiple devices in the Mesh network is also optimized by introducing a delay mechanism, thereby enhancing the orderliness and transmission efficiency of the entire configuration broadcast process.
[0108] Furthermore, firstly, an adaptive priority update mechanism based on real-time network topology changes can be introduced. This involves continuously collecting environmental parameters such as network connectivity, node density changes, and channel stability during device operation, and adjusting the forwarding priority of the device to be configured in real time, thereby achieving dynamic optimization of the broadcast path. Secondly, regarding forwarding delay control, a conflict prediction model can be introduced by combining the forwarding behavior records of neighboring nodes and the frequency of conflict occurrences. The forwarding delay of the device to be configured can be adjusted based on the prediction results output by the conflict prediction model, further reducing transmission conflicts caused by concurrent broadcasts. In addition, a priority backoff mechanism can be introduced. When multiple high-forwarding-priority nodes are preparing to forward simultaneously in adjacent areas, some nodes can be guided to actively delay forwarding through probabilistic control to maintain the dispersion of broadcast streams in the network, improving overall network stability and broadcast transmission efficiency. Through these extensions, an intelligent broadcast control mechanism oriented towards dynamic network environments can be formed, thereby achieving a balance between structural controllability and policy flexibility.
[0109] Furthermore, a segmented adjustment logic can be introduced into the update step size mechanism. For example, the current update step size can be determined jointly based on the forwarding priority and the current message forwarding tag value, making the propagation strategy at different stages more adaptable and rhythmic. Specifically, when updating the message forwarding tag, a fixed update step size corresponding one-to-one with the forwarding priority is no longer used. Instead, a two-factor decision mechanism based on forwarding priority and forwarding status is introduced. Specifically, first, the priority range (e.g., high, medium, low) of the device to be configured is determined based on its forwarding priority. Then, combined with the message forwarding tag value currently carried by the broadcast information, the propagation stage (e.g., initial stage, intermediate stage, tail stage) is determined. In different stages, even if the devices are at the same priority, their update step size will be adjusted accordingly. For example, in the initial stage, if the propagation breadth is prioritized, a smaller update step size is allocated, while in the tail stage, if the termination of propagation needs to be accelerated, a larger update step size is allocated. By using this dynamic mapping method based on two variables, the update step size exhibits phased changes throughout the entire propagation lifecycle. This not only improves the spatial coverage efficiency of broadcasting but also effectively compresses redundant paths at the end of the propagation process, thereby enhancing the rhythm control capability of the broadcast strategy and the utilization rate of network resources.
[0110] In this embodiment, firstly, the forwarding priority is determined based on the network characteristics and historical operating features of the device to be distributed in the current network environment, thereby achieving dynamic evaluation and differentiated identification of the relay capability of the device to be distributed; secondly, the update step size of the message forwarding mark is determined based on the forwarding priority, thereby achieving fine control of message propagation depth and optimization of resource allocation; thirdly, the forwarding delay is determined based on the forwarding priority, thereby effectively avoiding channel conflicts and information interference caused by concurrent forwarding by multiple devices; based on this, a broadcast information relay mechanism that adapts broadcast forwarding behavior to device capabilities and coordinates transmission order with network status can be realized, thereby improving the stability, accuracy and efficiency of network broadcasting.
[0111] In an exemplary embodiment, the message identifier is information generated in the distribution network node by combining the device information, digital signature, and random string of the target device to be distributed to the network according to a preset encoding algorithm.
[0112] Among them, the device information represents a set of identification data related to the target distribution network device, which is used to uniquely identify the identity of the target distribution network device, such as the hardware address, device model or serial number of the target distribution network device.
[0113] Digital signatures refer to encrypted identifiers that authenticate the integrity and origin of data based on cryptographic technology, in order to prevent information from being forged or tampered with. For example, a verification value is obtained by signing device information and a random string using the device's private key.
[0114] The encoding algorithm refers to the logical method used to format and encode multiple data fields of different types according to a predefined structure to generate structured message labels, such as constructing identifier content through field concatenation and hash digest.
[0115] For example, during the construction of Bluetooth network configuration broadcast information, the configuration node combines and encodes the device information, digital signature, and random string of the target device to be configured, to generate a unique message identifier. The device information may include the device type, identification code, or hardware identifier, used to indicate the target object of this broadcast. The digital signature provides an integrity verification mechanism for the broadcast information, ensuring that the message identifier cannot be forged or tampered with. The random string enhances the unpredictability and distinguishability of the message identifier, thereby avoiding identifier conflicts caused by multiple configuration operations of the same device. These three elements are processed in a preset encoding algorithm, which typically has a fixed field structure and length specification, ensuring that the generated message identifier can be accurately parsed by each device. The final generated message identifier serves as the unique identifier for this Bluetooth network configuration broadcast information and is sent to the Mesh network along with the Bluetooth network configuration broadcast information for subsequent receiving devices to perform cache comparison and uniqueness judgment. Based on this, global identifier management for network configuration broadcasts is achieved, laying the foundation for subsequent broadcast processing paths and the determination of the first matching result.
[0116] In an exemplary embodiment, the Bluetooth network configuration broadcast information is generated by verifying and encrypting network configuration information, network connection reference information, preset frame headers, and preset frame trailers in the network configuration node according to a preset layered encryption and verification algorithm.
[0117] Among them, the layered encryption and verification algorithm refers to the processing flow used to perform encryption and verification on different functional data segments in Bluetooth network configuration broadcast information to improve the security and integrity of broadcast information. For example, it can perform symmetric encryption on sensitive parameters and add verification values to the frame structure.
[0118] For example, during the construction of Bluetooth network configuration broadcast information, the network configuration node organizes and protects multiple data segments, including network configuration information, network connection reference information, frame headers, and frame trailers, to generate a complete broadcast information data packet. The network configuration information represents core fields required for network configuration, such as network keys, application keys, and device addresses. The network connection reference information represents control fields that control the propagation path, such as message numbers, message forwarding counts, and message forwarding flags. The preset frame headers and trailers represent identification fields used to define the start and end positions of the entire broadcast data packet. Before integrating and encapsulating these multiple data segments, a layered encryption and verification algorithm can be executed to encrypt and verify the core fields, control fields, and identification fields respectively, ensuring that the information is not tampered with, duplicated, or forged during propagation. Furthermore, the encapsulation process strictly follows the protocol structure, resulting in a broadcast information data packet with semantic structural integrity, field logical correctness, and information security, which can be accurately parsed and used to execute network configuration logic by any device in the Mesh network to be configured.
[0119] Optionally, the layered encryption verification is implemented by dividing the Bluetooth network configuration broadcast information into multiple functional layers, with each layer undergoing encryption and verification processing according to its data type and security requirements. First, the network key, application key, and device address in the network configuration information layer are encrypted using a symmetric encryption algorithm to ensure these sensitive parameters are not leaked during broadcasting. Second, the message identifier, message forwarding count, and message forwarding flag in the network connection reference information layer are verified for integrity using structural verification. Verification values can be generated using checksums or hash digests and appended to the end of the information for the receiving end to parse and confirm. Third, format consistency checks are performed on control fields such as frame headers and trailers to ensure the broadcast frame structure is complete and its boundaries are clear. Finally, the processing results from each layer are encapsulated into a unified data frame structure to generate the overall broadcast information. Based on this, this layered encryption verification mechanism processes data at different levels according to their functional characteristics, improving both information security and parsing reliability and network compatibility.
[0120] In an exemplary embodiment, if the Bluetooth network configuration broadcast information is the initial information sent by the network configuration node, then the message forwarding mark in the network connection reference information is the message forwarding mark in the initial state; if the Bluetooth network configuration broadcast information is the information forwarded by any message relay node, then the message forwarding mark in the network connection reference information is the message forwarding mark in the updated state.
[0121] For example, when a distribution node first broadcasts Bluetooth distribution broadcast information into the network, the broadcast information has not yet undergone any relay forwarding. Therefore, the message forwarding flag contained in its network connection reference information should be in the initial state. The message forwarding flag in the initial state is usually set to a maximum number of forwardable hops or a default hop value, such as 3, which means that the message can undergo a maximum of 3 relay forwarding operations. Based on this, Bluetooth distribution broadcast information has manageable propagation depth attributes from the beginning, improving the scheduling efficiency and transmission order of information flow in the Mesh network.
[0122] For example, if the Bluetooth network configuration broadcast information is not directly sent by the configuration node, but is forwarded from any message relay node in the network, then the message forwarding flag should be in an updated state to reflect its propagation history of completing a certain number of hops. This updated state is not only used to identify whether the broadcast information has been relayed, but also to provide a basis for the next hop node to judge whether it still has the conditions to continue forwarding. Therefore, the process of the message forwarding flag changing from the initial state to the updated state is a record of the trajectory of the Bluetooth network configuration broadcast information propagating layer by layer in the Mesh network. It is a behavioral identification clue of the entire network configuration propagation path. Based on this, it ensures that the broadcast behavior has path constraints and state recognition capabilities, which helps to build a precise, controllable, and decentralized information flow transmission mechanism.
[0123] In an exemplary embodiment, after determining the processing status of the Bluetooth network configuration broadcast information of the device to be configured based on the first matching result between the message identifier and the cached information in the device to be configured, the method further includes steps S601 to S602.
[0124] Step S601: If the message identifier does not match the cache information in the device to be configured, the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information. The message identifier is then stored to obtain new cache information.
[0125] For example, the cache information of the device to be configured stores several historically received message identifiers. These message identifiers can be stored in the form of a queue, hash table, or fixed-capacity circular buffer to ensure that the reception record of recent broadcast information is maintained under resource constraints. Furthermore, if the first matching result indicates that the message identifier in the Bluetooth configuration broadcast information has not yet appeared in the cache information, it is determined that the device to be configured has not processed the Bluetooth configuration broadcast information. In this case, the device to be configured needs to append the message identifier as a new reception record to the cache information. In addition, the device to be configured also needs to set a cache update strategy, such as using a first-in-first-out (FIFO) or prioritizing the removal of older message identifiers when the cache capacity reaches its limit. Based on this, the device to be configured can establish an initial mechanism for uniquely identifying broadcast information, thereby ensuring that each broadcast information is processed only once, which helps improve the orderliness of overall broadcast processing and the accuracy of resource utilization.
[0126] Step S602: If the message number matches the cached information in the device to be configured, the first matching result indicates that the device to be configured has already processed the Bluetooth configuration broadcast information, and the Bluetooth configuration broadcast information is discarded.
[0127] For example, if the first matching result indicates that the message identifier in the Bluetooth network configuration broadcast message has appeared in the cached information, then the device to be configured is determined to have processed the Bluetooth network configuration broadcast message. At this point, it means that the current Bluetooth network configuration broadcast message has already been identified and processed by this device in a previous broadcast cycle, and there is no need to perform matching judgment, address comparison, or forwarding operations again. To prevent redundant processing logic, repeated forwarding of information, or network chaos, the device to be configured must immediately discard the Bluetooth network configuration broadcast message. Based on this, the device to be configured can quickly filter identified information, effectively reducing redundant calculations and communication resource consumption, thereby optimizing the real-time performance and execution efficiency of broadcast processing.
[0128] In this embodiment, firstly, unmatched message labels are stored in cache information to establish a unique identification record for broadcast information, avoiding misidentification during subsequent duplicate judgments. Secondly, matched message labels are judged as processed and Bluetooth network configuration broadcast information is discarded, effectively preventing duplicate broadcast information from entering the subsequent processing flow and reducing computational and communication resource consumption. Based on this, the closed-loop process of broadcast information filtering based on unique label identification provides a low-load, high-response, and structurally simple basic judgment method for information management in Bluetooth Mesh networks, improving the accuracy of the entire network broadcast behavior judgment and the efficiency of resource scheduling.
[0129] In one exemplary embodiment, such as Figure 2 As shown, the method is applied to the device to be distributed to the network, and includes steps S701 to S711.
[0130] Step S701: Receive Bluetooth network configuration broadcast information and read the message identifier and target address information therein.
[0131] Step S702: Determine whether the message identifier already exists in the cache information of the device to be configured. If not, proceed to step S703 to cache the message identifier; if yes, proceed to step S708 to discard the Bluetooth configuration broadcast information.
[0132] After executing step S703, execute step S704 to determine whether the target address information matches the address information of the device to be configured. If not, execute step S705 to decrement the message forwarding flag in the Bluetooth configuration broadcast information by 1; if yes, execute step S709 to read the network key, application key, and device address in the Bluetooth configuration broadcast information so that the device to be configured can automatically join the Mesh network.
[0133] After executing step S709, execute step S710 to encapsulate the message forwarding count, the message forwarding flag in the initial state, the regenerated message number, and the address information of the network distribution node in the Bluetooth network distribution broadcast information to obtain the network distribution response broadcast information and broadcast it.
[0134] After executing step S705, execute step S706 to determine if the message forwarding flag is 0. If not, execute step S707 to forward the Bluetooth network configuration broadcast information; if yes, execute step S711 to discard the Bluetooth network configuration broadcast information.
[0135] In one exemplary embodiment, such as Figure 3 As shown, a method for configuring a Bluetooth Mesh network via Bluetooth broadcast is provided. This embodiment illustrates the method by applying it to a network configuration node. The method includes the following steps S801 to S807.
[0136] Step S801: Broadcast the Bluetooth network configuration information.
[0137] Step S802: If a network configuration response broadcast message is received from the target device to be configured in response to the Bluetooth network configuration broadcast message, it indicates that the network configuration of the target device to be configured is successful.
[0138] For example, the address data in the Bluetooth network configuration broadcast information includes the address information of the network configuration node and the target address information of the target device to be configured, so that the network configuration response broadcast information generated by the target device to be configured contains matching address data.
[0139] Based on this, on the one hand, if the target device receiving the distribution network response broadcast information is a distribution network node type, then based on the matching result between the address information of the target device and the address information of the distribution network node, it is determined that the target device belongs to the distribution network node and the target device to be distributed to the network is successfully distributed; or if the target device does not belong to the distribution network node, the distribution network response broadcast information is processed according to the message forwarding mark in the distribution network response broadcast information.
[0140] On the other hand, if the target device receiving the distribution network response broadcast information is a non-distribution network node type, the distribution network response broadcast information is processed directly according to the message forwarding mark in the distribution network response broadcast information.
[0141] Specifically, after a network distribution node broadcasts Bluetooth network distribution broadcast information, when the target device to be networked receives the Bluetooth network distribution broadcast information and completes address matching and configuration processing, it will send a network distribution response broadcast message to the network in the form of a response, carrying the target message identifier and the MAC address of the specified network distribution node. Furthermore, if a network distribution node in a continuous listening state detects a network distribution response broadcast message containing the target message identifier after the broadcast operation, it will compare the target message identifier with the cached information in the network distribution node. If the target message identifier exists in the cached information of the network distribution node, it indicates that the network distribution node has processed the network distribution response broadcast message in a historical period, and based on the message forwarding flag in the network distribution response broadcast message, it will determine whether to send the network distribution response broadcast message to the next device or discard it. If the target message identifier does not exist in the cache information of the distribution network node, it means that the distribution network node has not processed the distribution network response broadcast information in the historical period. Then, it is further determined whether the MAC address of the specified distribution network node contained in the distribution network response broadcast information matches the MAC address of the current distribution network node. If yes, the distribution network response broadcast information determines that the target device to be distributed has been successfully distributed. If no, the message forwarding flag in the distribution network response broadcast information determines whether to send the distribution network response broadcast information to the next device or discard it.
[0142] More specifically, the Bluetooth network configuration broadcast information includes the MAC address of the network configuration node and the MAC address of the target device to be configured. Correspondingly, the network configuration response broadcast information also simultaneously includes the MAC address of the network configuration node and the MAC address of the target device to be configured. Based on this, the network configuration response broadcast information can be accurately sent to the network configuration node according to the MAC address of the network configuration node, and the network configuration node can accurately locate the message source according to the MAC address of the target device to be configured after receiving the network configuration response broadcast information.
[0143] Furthermore, if multiple distribution network nodes exist, after receiving a distribution network response broadcast message, a distribution network node can directly determine whether it is the specified distribution network node based on the MAC address of the designated distribution network node in the broadcast message. If so, the target device to be distributed to the network is confirmed to have successfully completed the distribution based on the broadcast message. If not, the message forwarding flag in the broadcast message determines whether to send the broadcast message to the next device or discard it. Moreover, devices of other types besides the distribution network node type can directly determine whether to send the broadcast message to the next device or discard it based on the message forwarding flag, without needing to pre-compare the MAC address of the specified distribution network node in the broadcast message.
[0144] Step S803: If no network distribution response broadcast information is received within the preset time period, it indicates that the network distribution to the target device to be distributed has failed.
[0145] For example, after sending a Bluetooth network distribution broadcast message, the distribution node initiates a preset time period for receiving responses. The length of this preset time period is set according to the system configuration to ensure that it covers a reasonable time range required for broadcast propagation, device processing, and feedback. If no network distribution response broadcast message carrying the target message identifier is received within this preset time period, it is determined that this round of broadcasting has not been successfully received, identified, or processed by the target device to be distributed, and the network distribution operation is considered a failure. Based on this, the network distribution behavior is guaranteed to have timeout control and status feedback capabilities.
[0146] Step S804: Obtain historical network configuration records from the local storage or cloud storage of the network configuration node, parse the historical network configuration records, and obtain the message jump path of the Bluetooth network configuration broadcast information within the historical time period.
[0147] Among them, historical distribution network records represent the data set of broadcast transmission and device response processes recorded by distribution network nodes in previous distribution processes. They are used to reflect the actual propagation trajectory and status feedback of each distribution network broadcast in the Mesh network, including distribution time, target device information, broadcast hop count, forwarding node list, and response reception status.
[0148] The message jump path represents the sequence of message relay nodes that a Bluetooth configuration broadcast message goes through during its propagation from the configuration node to the outside in the Mesh network. It is used to describe the actual path of the broadcast message in the network.
[0149] For example, to address the path optimization problem after a network configuration failure, the network configuration node needs to parse the data in historical network configuration records to extract the actual propagation path of the previous Bluetooth network configuration broadcast information in the network, i.e., the specific structure of the message jump path. First, the network configuration node accesses historical network configuration records stored locally or on a cloud server. These records contain key data related to each network configuration operation, including the broadcast initiation time, the corresponding target device identifier, a list of forwarding node addresses, the timestamps of each node's reception, the forwarding order between nodes, and the final response reception status. Next, by filtering historical records corresponding to the current target device and its corresponding message number, the node information of the relay nodes that the Bluetooth network configuration broadcast information passed through during the previous failed propagation is extracted. Then, based on the reception time of each relay node and the forwarding order in the records, the message jump path of the Bluetooth network configuration broadcast information before it was sent from the network configuration node to the target device is reconstructed. The message redirection path reconstructs the information propagation route through the forwarding association structure between nodes. For example, if node B receives the same broadcast information after node A, and there is a forwarding record between A and B, it is considered a valid redirection; and so on, the complete chain of broadcast propagation can be drawn. The parsing process also incorporates auxiliary data such as hop count, signal delay, and node forwarding interval to further enhance the accuracy and timing consistency of the path structure.
[0150] Step S805: Based on the structural distribution characteristics of the message jump path, calculate the expected distance radius corresponding to the response area of the target network device.
[0151] Among them, the structural distribution characteristics of message jump paths represent the spatial distribution status, hop count, forwarding density, and path repetition of each device node in the propagation chain formed by message jump paths. These structural information are used to analyze the diffusion pattern and effective coverage level of broadcast information when it propagates in the network.
[0152] The response area of the target device to be configured in the Mesh network represents the spatial or logical range within which the target device to be configured in the Mesh network can receive Bluetooth configuration broadcast information and respond. It is used to define the area that the Bluetooth configuration broadcast information should effectively cover.
[0153] The expected distance radius represents the maximum number of hops or propagation depth that is expected to be required to cover the response area from the distribution network node to the target distribution network device.
[0154] For example, based on the structural distribution characteristics such as the positional relationships, hop count hierarchy, and distribution density of each relay node in the message jump path, the expected distance radius corresponding to the response area of the target distribution network device is analyzed. Specifically, firstly, the distribution network nodes classify the propagation status of each hop hierarchically according to the order of each hop relay node recorded in the message jump path, such as the first hop, the second hop, and so on up to the last hop, and construct a complete hierarchical propagation model through the grouped hop count information. Then, in the constructed hierarchical propagation model, the distribution changes of the number of relay nodes in each hop are statistically analyzed. Combining the propagation stability and intra-hop redundancy of each hop, it is determined whether the broadcast information exhibits characteristics such as broadcast delay, propagation interruption, or dense distribution within a certain hop. On this basis, the hop count is accumulated layer by layer to determine the expected propagation depth of the distribution network broadcast from its initial transmission until it is responded to by the target distribution network device. If the maximum number of hops in the historical message hop path is 5, and the response information of the target network device has not appeared by the 5th hop, and there is expected to be a stable hop structure and node correlation between the 5th and 6th hops, then the network node can infer that the response area of the target network device has extended to the 6th hop range, and use the 6th hop as the expected distance radius for the next round of broadcasting.
[0155] Here, the expected distance radius is not directly equivalent to the physical distance. Instead, it refers to the outermost hop level that broadcast information must traverse in the message hop path at the network forwarding logic level. It represents the minimum coverage capability that distribution network broadcasts must possess to ensure they can reach the target devices to be distributed. Based on this, the distribution characteristics of historical path structures are transformed into parameter control references for the next round of broadcast strategies. This allows subsequent distribution network behavior to be based on data-supported propagation range estimates, thereby avoiding blindly setting forwarding depths or hop values and improving the accuracy of broadcast behavior and the rationality of network load.
[0156] Step S806: Dynamically adjust the message forwarding count in the Bluetooth network configuration broadcast information according to the expected distance radius, so as to generate the adjusted Bluetooth network configuration broadcast information based on the adjusted message forwarding count. The adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured.
[0157] Step S807: Rebroadcast the adjusted Bluetooth network configuration broadcast information until the target device to be configured for network configuration is successfully configured.
[0158] For example, firstly, the expected distance radius is mapped to the corresponding number of message forwardings. This mapping relationship is usually determined by the preset hop count control rules in the network configuration strategy. For example, each hop corresponds to one valid forwarding, so as to achieve dynamic adjustment of the number of message forwardings. Secondly, after the adjustment of the number of message forwardings is completed, the message forwarding mark is restored according to the adjusted number of message forwardings to obtain the message forwarding mark in the initial state. Then, the adjusted number of message forwardings, the message forwarding mark in the initial state, and the regenerated message number are embedded into the data structure of the original Bluetooth network configuration broadcast information, replacing the original fields, thereby generating the adjusted Bluetooth network configuration broadcast information. The adjusted Bluetooth network configuration broadcast information has stronger propagation adaptability and can cover the response area that was not effectively reached before in subsequent broadcast operations, increasing the probability of successful network configuration.
[0159] In this embodiment, firstly, network configuration confirmation is completed based on the network configuration response broadcast information returned by the target device to be configured, thereby enabling the network configuration node to quickly determine the access status. Secondly, if network configuration fails, the message jump path is extracted and reconstructed based on historical network configuration records, and the expected distance radius is calculated based on the structural distribution characteristics of the message jump path, thereby clarifying the response area level that the broadcast needs to cover and providing data support for subsequent broadcast range adjustment. Furthermore, the number of message forwardings is adjusted according to the expected distance radius, thereby generating broadcast information with better coverage capabilities and improving the success rate of subsequent network configuration. Based on this, a Bluetooth network configuration method with failure response judgment, intelligent path backtracking, and parameter adaptive adjustment capabilities can be constructed, thereby improving the accuracy, success rate, and resource efficiency of device access and broadcast control in the Mesh network.
[0160] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0161] Based on the same inventive concept, this application also provides an apparatus for configuring a Bluetooth Mesh network via Bluetooth broadcast to implement the method for configuring a Bluetooth Mesh network via Bluetooth broadcast described above. The solution provided by this apparatus is similar to the implementation described in the above method. Therefore, the specific limitations of one or more apparatus embodiments for configuring a Bluetooth Mesh network via Bluetooth broadcast provided below can be found in the limitations of the method for configuring a Bluetooth Mesh network via Bluetooth broadcast described above, and will not be repeated here.
[0162] In one exemplary embodiment, such as Figure 4 As shown, a device for configuring a Bluetooth Mesh network via Bluetooth broadcast is provided, applicable to devices to be configured on the network. It includes: a receiving module 401, a first matching module 402, a second matching module 403, a first analysis module 404, and a second analysis module 405, wherein:
[0163] The receiving module 401 is used to receive Bluetooth network configuration broadcast information. The Bluetooth network configuration broadcast information is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured, and the network connection reference information includes the message number and the message forwarding mark.
[0164] The first matching module 402 is used to determine the processing status of the Bluetooth network configuration broadcast information of the device to be configured based on the first matching result between the message number and the cached information in the device to be configured.
[0165] The second matching module 403 is used to determine the matching relationship between the device to be configured and the target device to be configured based on the second matching result between the target address information and the address information of the device to be configured if the first matching result indicates that the device to be configured has not processed Bluetooth configuration broadcast information in the historical period.
[0166] The first analysis module 404 is used to, if the second matching result indicates that the device to be configured matches the target device to be configured, then use the device to be configured as the target device to be configured and access the Bluetooth Mesh network based on the Bluetooth configuration broadcast information.
[0167] The second analysis module 405 is used to update the message forwarding flag to obtain the updated Bluetooth network configuration broadcast information if the second matching result indicates that the device to be configured does not match the target device to be configured. The updated Bluetooth network configuration broadcast information is then forwarded to the next device to be configured until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
[0168] In an exemplary embodiment, the first analysis module 404 is further configured to: if the second matching result indicates that the device to be configured matches the target device to be configured, then obtain the network key, application key, and network device address from the network configuration information; during the network configuration process for the target device to be configured, perform encryption configuration processing on the network layer communication parameters of the target device to be configured according to the network key, perform permission binding processing on the application function modules of the target device to be configured according to the application key, and perform identification configuration processing on the network identity of the target device to be configured according to the network device address, thereby obtaining the network-configured target device to be configured to access the Bluetooth Mesh network; the device also includes a response module. The response module is used to: obtain the message forwarding count from the network connection reference information and the address information of the distribution node from the network configuration information; restore the message forwarding mark according to the message forwarding count to obtain the message forwarding mark in the initial state; obtain the randomly generated target message label; encapsulate the message forwarding mark in the initial state, the message forwarding count, the target message label, and the address information of the distribution node to obtain the distribution response broadcast information; and broadcast the distribution response broadcast information based on the dynamic message distance determined by the message forwarding mark in the initial state until the distribution node receives the distribution response broadcast information to determine that the target device to be distributed has been connected to the Bluetooth Mesh network.
[0169] In an exemplary embodiment, the second analysis module 405 is further configured to: if the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding mark is updated by decreasing according to a preset update step size to obtain an updated message forwarding mark, and the updated Bluetooth configuration broadcast information is obtained according to the updated message forwarding mark; if the updated message forwarding mark meets a preset threshold condition, then the device to be configured is used as a message relay node to forward the updated Bluetooth configuration broadcast information to the next device to be configured; if the updated message forwarding mark does not meet the preset threshold condition, then the device to be configured is used as a message termination node to discard the updated Bluetooth configuration broadcast information.
[0170] In an exemplary embodiment, the second analysis module 405 is further configured to: if the second matching result indicates that the device to be configured does not match the target device to be configured, then obtain the forwarding priority of the device to be configured, wherein the forwarding priority of the device to be configured is determined based on the network characteristics and historical operating characteristics of the device to be configured in the current network environment; determine the update step size corresponding to the device to be configured based on the forwarding priority of the device to be configured, and update the message forwarding mark by decrementing according to the update step size corresponding to the device to be configured to obtain the updated message forwarding mark; determine the forwarding delay corresponding to the device to be configured based on the forwarding priority of the device to be configured, and forward the updated Bluetooth configuration broadcast information to the next device to be configured based on the forwarding delay corresponding to the device to be configured.
[0171] In an exemplary embodiment, the first matching module 402 is further configured to: if the message identifier does not match the cached information in the device to be configured, the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information, and the message identifier is stored to obtain new cached information; if the message identifier matches the cached information in the device to be configured, the first matching result indicates that the device to be configured has processed the Bluetooth configuration broadcast information, and the Bluetooth configuration broadcast information is discarded.
[0172] In one exemplary embodiment, such as Figure 5 As shown, a device for configuring a Bluetooth Mesh network via Bluetooth broadcast is provided, applied to a network distribution node. It includes: a broadcast module 501, a first detection module 502, a second detection module 503, a third analysis module 504, a fourth analysis module 505, and an adjustment module 506, wherein:
[0173] Broadcast module 501 is used to broadcast Bluetooth network configuration information;
[0174] The first detection module 502 is used to indicate that the network configuration of the target device to be configured is successful if it receives a network configuration response broadcast information in response to the Bluetooth network configuration broadcast information from the target device to be configured.
[0175] The second detection module 503 is used to indicate that the network configuration of the target device to be configured has failed if no network configuration response broadcast information is received within a preset time period.
[0176] The third analysis module 504 is used to obtain historical network distribution records from the local storage or cloud storage of the network distribution node, parse the historical network distribution records, and obtain the message jump path of the Bluetooth network distribution broadcast information within the historical time period.
[0177] The fourth analysis module 505 is used to calculate the expected distance radius corresponding to the response area of the target network device based on the structural distribution characteristics of the message jump path.
[0178] The adjustment module 506 is used to dynamically adjust the number of message forwardings in the Bluetooth network configuration broadcast information according to the expected distance radius, so as to generate the adjusted Bluetooth network configuration broadcast information based on the adjusted number of message forwardings. The adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured.
[0179] The broadcast module 501 is also used to: rebroadcast the adjusted Bluetooth network configuration broadcast information until the target device to be configured is successfully configured.
[0180] The modules in the aforementioned device for configuring a Bluetooth Mesh network via Bluetooth broadcast can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0181] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above embodiments.
[0182] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above embodiments.
[0183] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0184] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for configuring a Bluetooth Mesh network via Bluetooth broadcast, characterized in that, Applied to devices to be configured on a network, the method includes: Receive Bluetooth network configuration broadcast information, which is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured, and the network connection reference information includes the message number and the message forwarding flag. Based on the first matching result between the message number and the cached information in the device to be configured, the processing status of the Bluetooth configuration broadcast information of the device to be configured is determined; If the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information in the historical period, then the matching relationship between the device to be configured and the target device to be configured is determined according to the second matching result between the target address information and the address information of the device to be configured. If the second matching result indicates that the device to be configured on the network matches the target device to be configured on the network, then the device to be configured on the network is designated as the target device to be configured on the network and accessed to the Bluetooth Mesh network based on the Bluetooth configuration broadcast information; If the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding flag is updated to obtain the updated Bluetooth configuration broadcast information, and the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured, until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
2. The method according to claim 1, characterized in that, If the second matching result indicates that the device to be configured for network configuration matches the target device to be configured for network configuration, then the device to be configured for network configuration is designated as the target device to be configured for network configuration and accessed to the Bluetooth Mesh network based on the Bluetooth configuration broadcast information, including: If the second matching result indicates that the device to be configured on the network matches the target device to be configured on the network, then the network key, application key, and network device address in the network configuration information are obtained; During the network configuration process of the target device to be configured, the network layer communication parameters of the target device to be configured are encrypted according to the network key, the application function modules of the target device to be configured are bound with permissions according to the application key, and the network identity of the target device to be configured is identified according to the network device address, so as to obtain the target device to be configured with network and access the Bluetooth Mesh network. The method further includes: Obtain the message forwarding count from the network connection reference information and the address information of the network configuration node from the network configuration information. Perform restoration processing on the message forwarding mark according to the message forwarding count to obtain the message forwarding mark in the initial state. Obtain the randomly generated target message label, and encapsulate the message forwarding flag in the initial state, the message forwarding count, the target message label, and the address information of the distribution network node to obtain the distribution network response broadcast information; Based on the dynamic message distance determined by the message forwarding tag in the initial state, the distribution network response broadcast information is broadcast until the distribution network node receives the distribution network response broadcast information to determine that the target device to be distributed has been connected to the Bluetooth Mesh network.
3. The method according to claim 1, characterized in that, If the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding flag is updated to obtain the updated Bluetooth configuration broadcast information, and the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured, including: If the second matching result indicates that the device to be configured does not match the target device to be configured, then the message forwarding mark is updated by decreasing according to the preset update step size to obtain the updated message forwarding mark, and the updated Bluetooth configuration broadcast information is obtained according to the updated message forwarding mark. If the updated message forwarding tag meets the preset threshold condition, the device to be configured is used as a message relay node to forward the updated Bluetooth configuration broadcast information to the next device to be configured. The method further includes: If the updated message forwarding tag does not meet the preset threshold condition, the device to be configured is designated as a message termination node to discard the updated Bluetooth configuration broadcast information.
4. The method according to claim 3, characterized in that, If the second matching result indicates that the device to be configured on the network does not match the target device to be configured on the network, then the message forwarding tag is updated by decrementing according to a preset update step size to obtain the updated message forwarding tag, including: If the second matching result indicates that the device to be configured does not match the target device to be configured, then the forwarding priority of the device to be configured is obtained. The forwarding priority of the device to be configured is determined based on the network characteristics and historical operating characteristics of the device to be configured in the current network environment. Based on the forwarding priority of the device to be configured, determine the update step size corresponding to the device to be configured, and update the message forwarding mark by decrementing according to the update step size corresponding to the device to be configured to obtain the updated message forwarding mark; The step of forwarding the updated Bluetooth network configuration broadcast information to the next device to be configured includes: Based on the forwarding priority of the device to be configured, the forwarding delay corresponding to the device to be configured is determined, and the updated Bluetooth configuration broadcast information is forwarded to the next device to be configured according to the forwarding delay corresponding to the device to be configured.
5. The method according to claim 1, characterized in that, The message identifier is information generated in the distribution network node by combining the device information, digital signature, and random string of the target device to be distributed according to a preset encoding algorithm; The Bluetooth network configuration broadcast information is generated by verifying and encrypting network configuration information, network connection reference information, preset frame header and preset frame tail in the network configuration node according to a preset layered encryption and verification algorithm. If the Bluetooth network configuration broadcast information is information initially sent by the network configuration node, then the message forwarding flag in the network connection reference information is a message forwarding flag in the initial state; if the Bluetooth network configuration broadcast information is information forwarded by any message relay node, then the message forwarding flag in the network connection reference information is a message forwarding flag in the updated state. The address data in the Bluetooth network configuration broadcast information includes the address information of the network configuration node and the target address information of the target device to be configured, so that the network configuration response broadcast information generated by the target device to be configured contains matching address data for: If the target device receiving the distribution network response broadcast information is a distribution network node type, then based on the matching result between the address information of the target device and the address information of the distribution network node, it is determined that the target device belongs to the distribution network node and the target device to be distributed to the network is successfully distributed; or the target device does not belong to the distribution network node and the distribution network response broadcast information is processed according to the message forwarding mark in the distribution network response broadcast information. If the target device receiving the distribution network response broadcast information is a non-distribution network node type, then the distribution network response broadcast information is processed directly according to the message forwarding mark in the distribution network response broadcast information.
6. The method according to claim 1, characterized in that, After determining the processing status of the Bluetooth network configuration broadcast information of the device to be configured based on the first matching result between the message identifier and the cached information in the device to be configured, the method further includes: If the message identifier does not match the cache information in the device to be configured, the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information, and the message identifier is stored to obtain new cache information; If the message number matches the cached information in the device to be configured, the first matching result indicates that the device to be configured has already processed the Bluetooth configuration broadcast information and will discard the Bluetooth configuration broadcast information.
7. A method for configuring a Bluetooth Mesh network via Bluetooth broadcast, characterized in that, Applied to distribution network nodes, the method includes: Broadcast Bluetooth network configuration information; If a network configuration response broadcast message is received from the target device to be configured in response to the Bluetooth network configuration broadcast message, it indicates that the network configuration of the target device to be configured has been successful. The method further includes: If the network distribution response broadcast information is not received within the preset time period, it indicates that the network distribution to the target device to be distributed has failed. Historical network configuration records are retrieved from the local storage or cloud storage of the network configuration node. The historical network configuration records are parsed to obtain the message jump path of the Bluetooth network configuration broadcast information within the historical time period. Based on the structural distribution characteristics of the message jump path, the expected distance radius corresponding to the response area of the target network device to be configured is calculated; The number of message forwardings in the Bluetooth network configuration broadcast information is dynamically adjusted according to the expected distance radius, so as to generate adjusted Bluetooth network configuration broadcast information based on the adjusted number of message forwardings. The adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured. The adjusted Bluetooth network configuration broadcast information is rebroadcast until the target device to be configured for network configuration is successfully configured.
8. A device for configuring a Bluetooth Mesh network via Bluetooth broadcast, characterized in that, The device is applied to equipment to be distributed in a network and includes: The receiving module is used to receive Bluetooth network configuration broadcast information. The Bluetooth network configuration broadcast information is information constructed based on the network configuration information of the Bluetooth Mesh network and the network connection reference information of the configuration node. The network configuration information includes the target address information of the target device to be configured. The network connection reference information includes the message number and the message forwarding mark. The first matching module is used to determine the processing status of the Bluetooth network configuration broadcast information of the device to be configured based on the first matching result between the message identifier and the cached information in the device to be configured. The second matching module is used to determine the matching relationship between the device to be configured and the target device to be configured if the first matching result indicates that the device to be configured has not processed the Bluetooth configuration broadcast information in a historical period. The first analysis module is used to, if the second matching result indicates that the device to be configured for network configuration matches the target device to be configured for network configuration, then to use the device to be configured for network configuration as the target device to be configured for network configuration and to access the Bluetooth Mesh network based on the Bluetooth configuration broadcast information; The second analysis module is used to update the message forwarding flag to obtain the updated Bluetooth network configuration broadcast information if the second matching result indicates that the device to be configured does not match the target device to be configured. The updated Bluetooth network configuration broadcast information is then forwarded to the next device to be configured until the target device to be configured is matched within the dynamic message distance determined based on the message forwarding flag and connected to the Bluetooth Mesh network.
9. A device for configuring a Bluetooth Mesh network via Bluetooth broadcast, characterized in that, The device, applied to a distribution network node, includes: The broadcast module is used to broadcast Bluetooth network configuration information. The first detection module is used to indicate that the network configuration of the target device to be configured is successful if it receives a network configuration response broadcast message from the target device to be configured in response to the Bluetooth network configuration broadcast message. The second detection module is used to indicate that the network configuration for the target device to be configured has failed if the network configuration response broadcast information is not received within a preset time period. The third analysis module is used to obtain historical network distribution records from the local storage or cloud storage of the network distribution node, parse the historical network distribution records, and obtain the message jump path of the Bluetooth network distribution broadcast information within the historical time period. The fourth analysis module is used to calculate the expected distance radius corresponding to the response area of the target network device based on the structural distribution characteristics of the message jump path. An adjustment module is used to dynamically adjust the number of message forwardings in the Bluetooth network configuration broadcast information according to the expected distance radius, so as to generate adjusted Bluetooth network configuration broadcast information based on the adjusted number of message forwardings, and the adjusted Bluetooth network configuration broadcast information dynamically covers the response area of the target device to be configured. The broadcast module is also used to: rebroadcast the adjusted Bluetooth network configuration broadcast information until the target device to be configured for network configuration is successfully configured.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Network configuration method and device for Bluetooth equipment based on Bluetooth mesh
CN107508714A
Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
CN111263338A