Data transmission method and device of mesh network and mesh network

CN122802986APending Publication Date: 2026-09-22HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610840518.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-11
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

一方面,支持BLE_Mesh功能的芯片性能普遍较低,受应用场景限制,难以采用高性能芯片,这在一定程度上制约了数据传输与处理能力

Benefits of technology

[0019]本发明提供的Mesh网络的数据传输方法、装置及Mesh网络,通过将Mesh网络划分为多个设备组,并利用元素地址的编码规则:主设备最低位为第一值,从设备按预设步长偏移,确定目标设备所在设备组的主设备元素地址及设备编号,实现了控制指令从网络互连设备到设备组内目标设备的精准路由:网络互连设备根据目标设备的元素地址,确定目标设备所在设备组的主设备的元素地址;主设备根据自身元素地址和接收的设备编号能够快速还原目标设备的元素地址,有效减少了数据传输的路径和范围,从而显著提高了数据传输的效率并可以确保控制指令能够稳定、高效地传达至目标设备。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802986A_ABST
    Figure CN122802986A_ABST
Patent Text Reader

Abstract

This invention provides a data transmission method, apparatus, and mesh network for a mesh network, relating to the field of smart home technology. The data transmission method for the mesh network includes: receiving a first mesh message; parsing the first mesh message to obtain a control command for a target device and the element address of the target device; determining, based on the element address of the target device, the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; and sending the control command and device number to the master device based on the element address of the master device. This invention can efficiently and cost-effectively improve the data transmission reliability of large-scale mesh networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart home technology, and in particular to a data transmission method, apparatus, and mesh network for a mesh network. Background Technology

[0002] With the development of computer networks and Internet of Things (IoT) technologies, IoT smart application scenarios are becoming increasingly diverse. In the field of smart home appliances, BLE-Mesh (Bluetooth Low Energy Mesh) networking technology, with its unique advantages, is being used more and more widely, especially in easy-to-use devices such as smart lights and smart switches. Currently, these devices are widely used in home scenarios, working in conjunction with one or more Mesh gateways (Bluetooth Low Energy Mesh Gateways) to achieve remote or local control, greatly improving the convenience and intelligence of home life.

[0003] BLE-Mesh technology primarily relies on the BLE (Bluetooth Low Energy) broadcast channel for data transmission and reception. However, this feature has revealed numerous problems in large-scale home applications. Because this technology is widely used in numerous small home appliances, the effective control and data transmission of BLE devices pose a significant challenge when the number of devices in a home mesh network is large. On the one hand, chips supporting BLE-Mesh functionality generally have lower performance, and due to application scenarios, it is difficult to use high-performance chips, which to some extent restricts data transmission and processing capabilities. On the other hand, existing applications do not fully consider the usage scenarios of home users, resulting in long network transmission latency. Furthermore, the number of devices in the network is not adequately considered during data transmission; too many devices can easily lead to message transmission failures or the receiving end being unable to receive messages. Moreover, once devices are successfully configured, they are rarely reconfigured, which limits network flexibility.

[0004] Therefore, how to efficiently and cost-effectively improve the data transmission reliability of large-scale Mesh networks is an urgent technical problem to be solved. Summary of the Invention

[0005] This invention provides a data transmission method, apparatus, and mesh network for a mesh network, in order to overcome the above-mentioned defects in the prior art and improve the data transmission reliability of large-scale mesh networks efficiently and at low cost.

[0006] This invention provides a data transmission method for a mesh network, applied to network interconnection devices within a mesh network, wherein the mesh network comprises multiple device groups, and the method includes: Receive a first Mesh message; parse the first Mesh message to obtain control instructions for the target device and the element address of the target device; based on the element address of the target device, determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; based on the element address of the master device, send the control instructions and the device number to the master device.

[0007] According to a data transmission method for a mesh network provided by the present invention, the whitelist of the network interconnection device includes the MAC address of the master device of each device group in the mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the mesh network; the whitelist of the master devices of each device group in the mesh network includes the MAC address of the master devices of other device groups in the mesh network, as well as the MAC address of the network interconnection device, so that the master device can receive broadcast messages from the network interconnection device and the master devices of other device groups in the mesh network; the whitelist of the slave device in each device group includes the MAC addresses of the master device and the slave device in the device group to which the slave device belongs, so that the slave device can receive broadcast messages from other devices in its device group.

[0008] According to a data transmission method for a Mesh network provided by the present invention, the total number of master devices and slave devices included in each device group is determined based on the whitelist capacity of the master devices and slave devices within the device group; the whitelist capacity is determined based on the BLE chip used by the corresponding slave device or master device.

[0009] According to a data transmission method for a mesh network provided by the present invention, the step of sending the control command and the device number to the master device based on the element address of the master device includes: constructing a second mesh message; writing the control command into the payload of the second mesh message; writing the device number into a preset field of the payload; and sending the second mesh message to the master device based on the element address of the master device.

[0010] This invention also provides a data transmission method for a mesh network, applied to the master device of the mesh network, wherein the mesh network comprises multiple device groups, and the method includes: The system receives a control command for a target device and the device number of the target device within a device group; determines the target device as a slave device within the device group based on the device number; determines the element address of the target device based on its own element address and the device number; constructs a third Mesh message based on the element address of the target device and the control command; and sends the third Mesh message to the target device. The control command and the device number are sent by the network interconnection devices within the Mesh network based on the element address of the master device. The element address of the master device and the device number are determined based on the element address of the target device. The element address of the target device and the control command are obtained by parsing a first Mesh message. In each device group, the least significant bit of the master device's element address is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size.

[0011] According to a data transmission method for a mesh network provided by the present invention, the whitelist of the network interconnection device includes the MAC address of the master device of each device group in the mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the mesh network; the whitelist of the master devices of each device group in the mesh network includes the MAC address of the master devices of other device groups in the mesh network, as well as the MAC address of the network interconnection device, so that the master device can receive broadcast messages from the network interconnection device and the master devices of other device groups in the mesh network; the whitelist of the slave device in each device group includes the MAC addresses of the master device and the slave device in the device group to which the slave device belongs, so that the slave device can receive broadcast messages from other devices in its device group.

[0012] According to a data transmission method for a mesh network provided by the present invention, the step of receiving a control command for a target device and the device number of the target device in a device group includes: receiving a second mesh message; wherein the payload of the second mesh message transmits the control command; a preset field of the payload transmits the device number; parsing the control command from the payload of the second mesh message; and reading the device number from the preset field of the payload.

[0013] The present invention also provides a data transmission method for a mesh network, applied to a slave device in the mesh network, wherein the mesh network comprises multiple device groups, and the method includes: Receive a third Mesh message; parse the third Mesh message to obtain the element address and control command of the target device; determine that the element address points to itself, and execute the control command; wherein, the control command is sent by the master device of the device group to which the slave device belongs, based on the element address of the target device; the element address of the target device is determined by the master device based on its own element address and the device number of the slave device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size.

[0014] According to a data transmission method for a mesh network provided by the present invention, the whitelist of the network interconnection device includes the MAC address of the master device of each device group in the mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the mesh network; the whitelist of the master devices of each device group in the mesh network includes the MAC address of the master devices of other device groups in the mesh network, as well as the MAC address of the network interconnection device, so that the master device can receive broadcast messages from the network interconnection device and the master devices of other device groups in the mesh network; the whitelist of the slave device in each device group includes the MAC addresses of the master device and the slave device in the device group to which the slave device belongs, so that the slave device can receive broadcast messages from other devices in its device group.

[0015] The present invention also provides a data transmission device for a mesh network, comprising a network interconnection device disposed within the mesh network, wherein the mesh network includes multiple device groups, and the device includes the following modules: A receiving module is used to receive a first Mesh message; a parsing module is used to parse the first Mesh message to obtain control instructions for the target device and the element address of the target device; a determining module is used to determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group, based on the element address of the target device; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; and a sending module is used to send the control instructions and the device number to the master device based on the element address of the master device.

[0016] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a data transmission method for any of the Mesh networks described above.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data transmission method for a Mesh network as described above.

[0018] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a data transmission method for any of the Mesh networks described above.

[0019] The data transmission method, apparatus, and mesh network provided by this invention divide the mesh network into multiple device groups and utilize the encoding rules of element addresses: the least significant bit of the master device is the first value, and the slave devices are offset by a preset step size to determine the master device element address and device number of the device group to which the target device belongs. This achieves precise routing of control commands from interconnected network devices to the target device within the device group: the interconnected network devices determine the master device element address of the device group to which the target device belongs based on the element address of the target device; the master device can quickly reconstruct the element address of the target device based on its own element address and the received device number, effectively reducing the data transmission path and range, thereby significantly improving data transmission efficiency and ensuring that control commands can be stably and efficiently transmitted to the target device. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of the hardware environment for an interaction method of a smart device according to an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the Mesh network provided by the present invention; Figure 3 This is one of the flowcharts illustrating the data transmission method for a Mesh network provided by the present invention; Figure 4 This is the second flowchart illustrating the data transmission method for a Mesh network provided by this invention; Figure 5 This is the third flowchart illustrating the data transmission method for Mesh networks provided by this invention; Figure 6 This is a schematic diagram illustrating the interaction process of various devices within a Mesh network provided by the present invention; Figure 7 This is a schematic diagram of the data transmission device for a Mesh network provided by the present invention; Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

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

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

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

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

[0026] Figure 2 This is a schematic diagram of the structure of the Mesh network provided by the present invention.

[0027] Mesh networks, or wireless mesh networks, are a type of wireless network based on multi-hop interconnection. In traditional mesh networks, any two devices can maintain a wireless connection. It's a decentralized wireless network topology, with multiple nodes interconnected to form a "mesh," allowing nodes to send, receive, and relay data, achieving wider coverage. However, large-scale deployment of mesh technology in homes has exposed several problems: the performance of chips supporting this function is generally low, limiting data transmission and processing capabilities; existing applications do not fully consider the home scenario, resulting in long network transmission latency; data transmission does not adequately consider the number of devices, easily leading to packet problems; and devices are rarely reconfigured after initial setup, limiting network flexibility.

[0028] To address the above problems, the embodiments provided by this invention, such as... Figure 2 As shown, a mesh network consists of interconnected network devices and multiple device groups. The mesh network includes multiple device groups such as group A, group B, group C, group D, etc. Each device group includes one master device and multiple slave devices. Group A includes master device 220, slave device 221, slave device 222, slave device 223, etc.; Group B includes master device 230, slave device 231, slave device 232, slave device 233, etc.

[0029] The protocols that can be used in the Mesh network provided in this embodiment of the invention may include, but are not limited to: Bluetooth Mesh Protocol, Dynamic Source Routing (DSR), Destination-Sequenced Distance-Vector Routing (DSDV), ZigBee Mesh Protocol, Wi-Fi Mesh Protocol, etc.

[0030] Network interconnection devices are hardware devices used to achieve physical connections, data transmission, and protocol adaptation between different networks. For example, a network interconnection device is a BLE gateway.

[0031] A master device is the core device in a device group responsible for communicating with master devices in other device groups or network interconnection devices. For example, the master device of a device group could be a smart luminaire configured in relay mode.

[0032] Slave devices are node devices that connect to the network in a non-centralized role and collaboratively complete data transmission, such as smart light bulbs, temperature and humidity sensors, and curtain motors—smart home terminals. These devices are both the final receivers of network data, responsible for executing their own business logic, and can also forward data within the device group.

[0033] Taking a Bluetooth Low Energy (BLE Mesh) smart home network as an example, this network covers thousands of devices (such as lighting fixtures, temperature and humidity sensors, and air conditioning controllers) in a multi-story office building, and its specific composition is as follows: Device Groups: This smart home network consists of multiple device groups, each containing devices such as smart lights, environmental sensors, and air conditioning controllers. Within each device group, one smart light or switch is selected as the master device and configured in relay mode; the remaining devices act as slave devices.

[0034] BLE Gateway: Connects the BLE Mesh network to the external internet (such as Wi-Fi / 4G), enabling communication between cloud control and the local Mesh network. The gateway manages the master device of all device groups through the BLE Mesh protocol, ensuring the delivery of cloud commands and the uploading of data from each device group.

[0035] In each device group, the least significant bit of the element address of the master device is the first value; the element address of the slave device is determined based on the first value, according to its device number and preset step size. The device number of the master device is the first value.

[0036] Both the first value and the preset step size are preset values. In actual implementation, the values ​​of the first value and the preset step size can be set according to the needs of the group network, and are not limited to the description in this manual.

[0037] For example, with a first value of 0 and a preset step size of 1, the element addresses of each device in a device group are continuously allocated: the element address of the master device is 0x1230 and the device number is 0; the element address of the slave device with device number 1 is 0x1231, the element address of the slave device with device number 2 is 0x1232, the element address of the slave device with device number 3 is 0x1233, and so on.

[0038] For example, with a first value of 0 and a preset step size of 2, the element addresses of each device in a device group are continuously allocated in even numbers: the element address of the master device is 0x1230, and the device number is 0; the element address of the slave device with device number 1 is 0x1232, the element address of the slave device with device number 2 is 0x1234, the element address of the slave device with device number 3 is 0x1236, and so on.

[0039] For example, with a first value of 1 and a preset step size of 2, the element addresses of each device in a device group are continuously allocated in odd numbers: the element address of the master device is 0x1231, and the device number is 1; the element address of the slave device with device number 1 is 0x1233, the element address of the slave device with device number 2 is 0x1235, the element address of the slave device with device number 3 is 0x1237, and so on.

[0040] Based on the above address configuration rules, network interconnection devices can quickly and accurately determine the element address of the master device in the device group to which the target device belongs, as well as the device number of the target device in the device group, according to the element address of the target device.

[0041] In practice, the lowest value of the target device's element address can be set as the first value, thus obtaining the element address of the master device. The device number of the target device can be obtained by comparing the difference between the element addresses of the target device and the master device with a preset step size. For example, with a first value of 0 and a preset step size of 1, when the element address of the target device is 0x1234, the element address of the master device can be determined to be 0x1230, and the device number of the target device can be 4.

[0042] Based on the above address configuration rules, the master device can quickly and accurately determine the element address of the target device according to its own element address and the device number of the target device.

[0043] In practice, the master device can obtain the element address of the target device by adding its own element address to the product of the target device's device number and the preset step size. For example, with a first value of 0 and a preset step size of 1, the element address of the master device is 0x1230. When the target device's device number is 2, the element address of the target device can be determined to be 0x1232.

[0044] In practice, after receiving a Mesh message from a user or the cloud, the network interconnection device sends the Mesh message to the master device of the device group where the target device resides; the master device then forwards the Mesh message to the target device. See details below. Figures 3 to 5 The relevant content will not be repeated here. To improve network transmission efficiency, the master device can select a Mesh device in the device group that is close to the control initiating device (such as a Mesh gateway).

[0045] In some embodiments, to limit the forwarding scope of Mesh broadcast messages and ensure that broadcast messages from outside the Mesh network are forwarded only between network interconnection devices and master devices of each device group, and that broadcast messages from master devices are propagated only between devices within the device group, a whitelist of each device in the Mesh network can be set using the following rules.

[0046] The whitelist of network interconnection devices includes the MAC addresses of the master devices of each device group in the Mesh network, so that the network interconnection devices can receive broadcast messages from the master devices of each device group in the Mesh network.

[0047] The whitelist of master devices in each device group within a Mesh network includes the MAC addresses of master devices in other device groups within the Mesh network, as well as the MAC addresses of interconnected devices, enabling master devices to receive broadcast messages from interconnected devices and master devices in other device groups within the Mesh network.

[0048] The whitelist for slave devices within each device group includes the MAC addresses of the master and slave devices within the same device group, enabling slave devices to receive broadcast messages from other devices within their device group.

[0049] A MAC address is a data link layer physical address used to uniquely identify a device in data link layer communication. Different mesh protocols have their own specific names and representations for MAC addresses.

[0050] For example, for Bluetooth Low Energy (BLE) devices, their MAC address is called the BLE address (Bluetooth LowEnergy Address). The BLE address follows the IEEE 802.15.1 standard and is formatted as 48 bits (6 bytes), usually represented as a 12-bit hexadecimal number (e.g., 00:1A:7D:DA:71:13).

[0051] For example, for ZigBee devices, their MAC address is called the ZigBee MAC address. The ZigBee MAC address follows the IEEE 802.15.4 standard, and its format is also 48 bits (6 bytes), and the representation is similar to BLE (e.g., 00:12:4B:00:00:01).

[0052] In practical implementation, the number of Mesh devices in each device group can be determined based on the whitelist capacity supported by the BLE chip used by each device in the Mesh network. For example, if the BLE chip supports 12 whitelists, 10 Mesh devices can be selected as a group. If the BLE chip supports a larger number of whitelists, this can be extended to a maximum of 16 due to the limitation on Mesh device element addresses.

[0053] In the actual implementation process, the total number of master devices and slave devices in each device group is determined based on the whitelist capacity of the master devices and slave devices in the device group; the whitelist capacity is determined based on the BLE chip used by its corresponding slave device or master device.

[0054] In some embodiments, all devices in a Mesh network use the same BLE chip. In this case, all master and slave devices in the Mesh network have the same whitelist capacity, and the total number of master and slave devices in each device group is determined by this unified whitelist capacity. The capacity limit of each device group is consistent, and there is no need to consider chip differences when networking.

[0055] In some embodiments of a Mesh network, a device group may use a different BLE chip than other device groups, while the master and slave devices within each device group may use the same BLE chip. In this case, the whitelist capacity of the master and slave devices within each device group is determined by the BLE chip used by the devices in that group. Therefore, the total number of master and slave devices in different device groups can be different, allowing different device groups to have different capacity limits to adapt to different network scale requirements.

[0056] In some embodiments, devices in a device group use different BLE chips. For example, the master device uses a different BLE chip than the slave devices, or slave device A uses a different BLE chip than other slave devices and the master device. In this case, since different BLE chips support different whitelist capacities, the minimum whitelist capacity corresponding to the BLE chips used by each device can be taken as the unified whitelist capacity for the master and slave devices in the device group, thereby ensuring that the whitelist capacity of all devices in the group is consistent and that communication is conducted within the unified whitelist range.

[0057] In the embodiments provided by this invention, by grouping devices in the Mesh network and using a whitelist of devices to limit the forwarding range of Mesh broadcast messages, the following technical effects can be achieved: It can effectively improve network resource utilization. On the one hand, it can reduce unnecessary data transmission; for example, broadcast messages from outside the Mesh network do not need to propagate among all devices in the device group, and those from the master device only propagate within the device group, reducing network bandwidth consumption. It can save device energy consumption; for example, with battery-powered devices such as smart sensors, the reduced reception and processing of broadcast messages extends battery life. It can improve the accuracy and timeliness of message transmission; broadcast messages can quickly and accurately reach the target device, reducing interference and delays. Furthermore, it can resist external attacks; broadcast messages from outside the network can only flow between network-interconnected devices and the master device, preventing malicious message infiltration, such as preventing malicious commands from attacking smart home devices.

[0058] In the embodiments provided by this invention, whitelisting technology for Mesh devices is used to split large-scale Mesh networks into independent small networks (device groups), transforming the original one-to-the-whole-network mode of Mesh transmission into a controllable one-to-many transmission. This effectively improves the data transmission reliability of large-scale Mesh networks.

[0059] The following is combined Figures 3-6 The present invention describes a data transmission method for a Mesh network.

[0060] Figure 3 This is one of the flowcharts illustrating the data transmission method for a Mesh network provided by the present invention.

[0061] This method is applied to network interconnection devices within a Mesh network, which contains multiple groups of devices.

[0062] like Figure 3 As shown, the method includes the following steps: Step 301: Receive the first Mesh message.

[0063] The first Mesh message is the initial message transmitted over the Mesh network, containing control commands and target device information. For example, a user's command to turn on a smart light sent via a mobile app is encapsulated in a BLE-Mesh format message for transmission.

[0064] For example, network interconnection devices (such as BLE-Mesh gateways) receive BLE-Mesh format messages from user terminals (such as mobile phones) or the cloud via their Bluetooth modules.

[0065] Step 302: Parse the first Mesh message to obtain the control instructions for the target device and the element address of the target device.

[0066] Control commands are specific operations that the target device is required to perform.

[0067] The element address of the target device is a unique identifier for the target device in the Mesh network, used to locate the target device.

[0068] For example, the control instruction is to instruct the smart light to turn on, and the element address of the target device is 0x1234.

[0069] In the specific implementation process, the network interconnection device parses the first Mesh message it receives; extracts control commands from the preset fields of the message; and simultaneously parses the element address of the target device from the target address field of the message.

[0070] Step 303: Based on the element address of the target device, determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group.

[0071] For a detailed description of this step, please refer to [link / reference]. Figure 2 The relevant content will not be repeated here.

[0072] Step 304: Based on the element address of the master device, send the control command and device number to the master device.

[0073] In some embodiments, control instructions and a device number can be sent to the master device by: constructing a second Mesh message; writing control instructions into the payload of the second Mesh message; writing the device number into a preset field (e.g., a byte) of the payload; and sending the second Mesh message to the master device based on the element address of the master device.

[0074] In the embodiments provided by the present invention, by extending the preset field to transmit the device number of the target device in the payload of the Mesh message, the precise routing of messages within the device group is achieved, thereby improving data transmission efficiency and reliability.

[0075] After receiving the control command and device number, the master device determines the target device as a slave device within the device group based on the device number; it then determines the target device's element address based on its own element address and the device number; and finally, it forwards the control command to the target device based on the target device's element address. See the following for a detailed description. Figure 4 The content.

[0076] Figure 4 This is the second flowchart illustrating the data transmission method for a Mesh network provided by this invention.

[0077] The master device used in a mesh network. A mesh network consists of multiple groups of devices. For a detailed description of this mesh network, see [link to relevant documentation]. Figure 2 The relevant content will not be repeated here.

[0078] like Figure 4 As shown, the method includes the following steps: Step 401: Receive the control command for the target device and the device number of the target device in the device group.

[0079] In the specific implementation process, control commands for the target device and the device number of the target device within the device group are received through the following methods: Receive a second Mesh message; wherein the payload of the second Mesh message transmits control instructions; the preset field of the payload transmits the device number; parse the control instructions from the payload of the second Mesh message; read the device number from the preset field of the payload.

[0080] Step 402: Based on the device number, determine that the target device is a slave device within the device group.

[0081] If the master device determines that the element address of the target device is itself, it executes the control command; if it determines that the element address of the target device points to a slave device within the device group, it executes the following steps.

[0082] Step 403: Determine the element address of the target device based on its own element address and device number.

[0083] For a detailed description of how the master device determines the element address of the target device based on its own element address and device number, please refer to [link to documentation]. Figure 2 The relevant content will not be repeated here.

[0084] Step 404: Construct a third Mesh message based on the element address and control instructions of the target device.

[0085] In the specific implementation process, a third mesh message can be constructed, control instructions can be written into the payload of the third mesh message, the element address of the target device can be written into the target address field of the third mesh message, and then the third mesh message can be sent.

[0086] Step 405: Send the third Mesh message to the target device.

[0087] Figure 5 This is the third flowchart illustrating the data transmission method for Mesh networks provided by this invention.

[0088] This method is applied to slave devices in a mesh network, which consists of multiple groups of devices. For a detailed description of mesh networks, see [link to relevant documentation]. Figure 2 The relevant content will not be repeated here.

[0089] like Figure 5 As shown, the method includes the following steps: Step 501: Receive the third Mesh message.

[0090] Step 502: Obtain the element address and control commands of the target device from the third Mesh message.

[0091] Step 502: Determine that the element address points to itself and execute the control instruction.

[0092] Figure 6 This is a schematic diagram illustrating the interaction process of various devices within a Mesh network provided by this invention. For example... Figure 6 As shown, within a Mesh network, the following interactive operations are performed between interconnected network devices, master devices in device groups, and slave devices.

[0093] Network interconnection devices: Receive the first Mesh message.

[0094] The control commands for the target device and the element address of the target device are obtained by parsing the first Mesh message.

[0095] Based on the element address of the target device, determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group.

[0096] In each device group, the least significant bit of the element address of the master device is the first value; the element address of the slave device is determined based on the first value, according to its device number and preset step size.

[0097] Based on the element address of the master device, the control command and the device number are sent to the master device.

[0098] Main equipment: Receive control commands for the target device and the device number of the target device within the device group.

[0099] The element address of the target device is determined based on its own element address and the device number.

[0100] A third Mesh message is constructed based on the element address of the target device and the control command.

[0101] The third Mesh message is sent to the target device.

[0102] From the device: Receive third-party Mesh messages.

[0103] The element address and control commands of the target device are obtained from the parsing of the third Mesh message.

[0104] Once the element address is determined to point to itself, the control instruction is executed.

[0105] For a detailed description of the above steps, please refer to [link / reference]. Figures 2 to 5 The relevant content will not be repeated here.

[0106] The data transmission device for a Mesh network provided by the present invention will be described below. The data transmission device for a Mesh network described below can be referred to in correspondence with the data transmission method for a Mesh network described above.

[0107] Figure 7 This is a schematic diagram of the data transmission device for a Mesh network provided by the present invention. Figure 7 As shown, the data transmission device 700 of the Mesh network includes the following modules: The receiving module 710 is used to receive the first Mesh message.

[0108] The parsing module 720 is used to parse the first Mesh message to obtain the control instructions for the target device and the element address of the target device.

[0109] The determination module 730 is used to determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group, based on the element address of the target device; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size.

[0110] The sending module 740 is used to send the control command and the device number to the master device based on the element address of the master device.

[0111] After receiving the control command and the device number, the master device determines the element address of the target device based on its own element address and the device number; and forwards the control command to the target device based on the element address of the target device.

[0112] Figure 8 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, communications interface 820, and memory 830 communicate with each other through the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a data transmission method for a mesh network. This method includes: receiving a first mesh message; parsing the first mesh message to obtain control instructions for a target device and the element address of the target device; determining, based on the element address of the target device, the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; and sending the control instructions and the device number to the master device based on the element address of the master device.

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

[0114] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data transmission method for a Mesh network provided by the above methods. The method includes: receiving a first Mesh message; parsing the first Mesh message to obtain a control instruction for a target device and an element address of the target device; determining, based on the element address of the target device, the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; and sending the control instruction and the device number to the master device based on the element address of the master device.

[0115] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a data transmission method for a Mesh network provided by the methods described above. The method includes: receiving a first Mesh message; parsing the first Mesh message to obtain a control instruction for a target device and an element address of the target device; determining, based on the element address of the target device, the element address of the master device in a device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of a slave device is determined based on the first value, according to its device number and a preset step size; and sending the control instruction and the device number to the master device based on the element address of the master device.

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

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

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

Claims

1. A data transmission method for a mesh network, characterized in that, The method, applied to network interconnection devices within a mesh network comprising multiple device groups, includes: Receive the first Mesh message; The control commands for the target device and the element address of the target device are obtained from the first Mesh message; Based on the element address of the target device, determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; Based on the element address of the master device, the control command and the device number are sent to the master device.

2. The data transmission method for a mesh network according to claim 1, characterized in that, The whitelist of the network interconnection device includes the MAC address of the master device of each device group in the Mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the Mesh network. The whitelist of master devices in each device group within the Mesh network includes the MAC addresses of master devices in other device groups within the Mesh network, as well as the MAC addresses of the network interconnection devices, so that the master device can receive broadcast messages from the network interconnection devices and the master devices of other device groups within the Mesh network. The whitelist for slave devices within each device group includes the MAC addresses of the master and slave devices within the same device group, enabling the slave device to receive broadcast messages from other devices within its device group.

3. The data transmission method for a mesh network according to claim 2, characterized in that, The total number of master and slave devices in each device group is determined based on the whitelist capacity of the master and slave devices within the device group; the whitelist capacity is determined based on the BLE chip used by the corresponding slave or master device.

4. The data transmission method for a Mesh network according to any one of claims 1 to 3, characterized in that, The step of sending the control command and the device number to the master device based on the element address of the master device includes: Construct the second Mesh message; Write the control command into the payload of the second Mesh message; The device number is written into a preset field of the payload; The second Mesh message is sent to the master device based on the element address of the master device.

5. A data transmission method for a mesh network, characterized in that, The method, applied to a master device in a mesh network comprising multiple device groups, includes: Receive control commands for the target device and the device number of the target device within the device group; Based on the device number, the target device is determined to be a slave device within the device group; The element address of the target device is determined based on its own element address and the device number; Based on the element address of the target device and the control command, a third Mesh message is constructed; Send the third Mesh message to the target device; Wherein, the control command and the device number are sent by the network interconnection device within the Mesh network based on the element address of the master device; the element address of the master device and the device number are determined based on the element address of the target device; the element address of the target device and the control command are obtained from parsing the first Mesh message; In each device group, the least significant bit of the element address of the master device is the first value; the element address of the slave device is determined based on the first value, according to its device number and preset step size.

6. The data transmission method for a mesh network according to claim 5, characterized in that, The whitelist of the network interconnection device includes the MAC address of the master device of each device group in the Mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the Mesh network. The whitelist of master devices in each device group within the Mesh network includes the MAC addresses of master devices in other device groups within the Mesh network, as well as the MAC addresses of the network interconnection devices, so that the master device can receive broadcast messages from the network interconnection devices and the master devices of other device groups within the Mesh network. The whitelist for slave devices within each device group includes the MAC addresses of the master and slave devices within the same device group, enabling the slave device to receive broadcast messages from other devices within its device group.

7. The data transmission method for a mesh network according to claim 5 or 6, characterized in that, Receiving control commands for the target device and the device number of the target device within the device group includes: Receive a second Mesh message; wherein the payload of the second Mesh message transmits the control command; a preset field of the payload transmits the device number; The control instructions are obtained by parsing the payload of the second Mesh message; The device number is read from a preset field of the payload.

8. A data transmission method for a mesh network, characterized in that, The method, applied to slave devices in a mesh network comprising multiple groups of devices, includes: Receive third-party Mesh messages; The element address and control commands of the target device are obtained from the third Mesh message; Once the element address is determined to point to itself, the control instruction is executed. The control command is sent by the master device of the device group to which the slave device belongs, based on the element address of the target device; the element address of the target device is determined by the master device based on its own element address and the device number of the slave device in the device group. In each device group, the least significant bit of the element address of the master device is the first value; the element address of the slave device is determined based on the first value, according to its device number and preset step size.

9. The data transmission method for a mesh network according to claim 8, characterized in that, The whitelist of the network interconnection device includes the MAC address of the master device of each device group in the Mesh network, so that the network interconnection device can receive broadcast messages from the master devices of each device group in the Mesh network. The whitelist of master devices in each device group within the Mesh network includes the MAC addresses of master devices in other device groups within the Mesh network, as well as the MAC addresses of the network interconnection devices, so that the master device can receive broadcast messages from the network interconnection devices and the master devices of other device groups within the Mesh network. The whitelist for slave devices within each device group includes the MAC addresses of the master and slave devices within the same device group, enabling the slave device to receive broadcast messages from other devices within its device group.

10. A data transmission device for a mesh network, characterized in that, Network interconnection devices configured within a mesh network, wherein the mesh network comprises multiple device groups, the devices include: The receiving module is used to receive the first Mesh message; The parsing module is used to parse the first Mesh message to obtain the control instructions for the target device and the element address of the target device; The determination module is used to determine the element address of the master device in the device group to which the target device belongs, and the device number of the target device in the device group, based on the element address of the target device; wherein, in each device group, the least significant bit of the element address of the master device is a first value; the element address of the slave device is determined based on the first value, according to its device number and a preset step size; The sending module is used to send the control command and the device number to the master device based on the element address of the master device.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the data transmission method of the Mesh network as described in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the data transmission method of the Mesh network as described in any one of claims 1 to 9.