Message transmission method and device based on wireless mesh network and electronic equipment
By introducing priority control and dynamic routing optimization in wireless grid networks, the problems of resource waste and delay in message transmission are solved, and more efficient resource utilization and communication efficiency are achieved.
Patent Information
- Application Number
- CN202411850724.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-16
AI Technical Summary
In wireless grid networks, messages need to be redirected multiple devices, resulting in waste of resource utilization and communication delays.
By introducing priority control mechanisms and dynamic routing optimization in the wireless grid network, the transmission path is determined based on the priority of the message and the node information in the adjacency table, avoiding the use of relay nodes with high load or poor signal quality.
It improves the resource utilization rate and communication efficiency of wireless grid networks, ensures rapid transmission of high-priority messages, and reduces transmission delay and hop count.
Smart Images

Figure CN119815317A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of communication technology, and in particular to a message transmission method based on a wireless mesh network, a message transmission device based on a wireless mesh network, an electronic device, and a computer-readable storage medium. Background Art
[0002] Mesh network is a "multi-hop" network. In the process of evolving to the next generation of networks, wireless is an indispensable technology. Wireless mesh network can communicate with other networks. It is a dynamic and continuously expandable network architecture. Any two devices can maintain wireless connection.
[0003] Devices in a Mesh network can transmit messages to each other. However, when messages need to jump through multiple devices, it will lead to problems such as waste of overall resource utilization of the Mesh network and communication delays. Summary of the invention
[0004] In view of the above problems, a method and device for message transmission based on a wireless mesh network is proposed to overcome the above problems or at least partially solve the above problems. The specific technical solution is as follows:
[0005] The embodiment of the present invention discloses a message transmission method based on a wireless mesh network, wherein the wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and a neighboring Bluetooth node device, and the method includes:
[0006] Obtaining a message; the message at least includes a priority, a source node identifier, and a target node identifier;
[0007] Determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path of the message from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier;
[0008] The message is transmitted to the next Bluetooth node device according to the transmission path.
[0009] In an embodiment of the present invention, the priority of the message is determined according to the message type corresponding to the message.
[0010] In one embodiment of the present invention, after obtaining the message, the method further includes:
[0011] The message is reprioritized.
[0012] In one embodiment of the present invention, re-determining the priority of the message includes:
[0013] Get the message creation timestamp and current system time of the message;
[0014] Determining the transmission time of the message according to the message creation timestamp and the current system time;
[0015] The message is re-prioritized based on the transmission time.
[0016] In one embodiment of the present invention, re-determining the priority of the message according to the transmission time includes:
[0017] When the transmission time exceeds a preset time threshold, the priority of the message is increased.
[0018] In one embodiment of the present invention, determining the transmission path of the message according to the priority and the node information of the adjacency table includes:
[0019] Calculate a preliminary path for transmitting the message from the source Bluetooth node device to the target Bluetooth node device in the wireless mesh network;
[0020] Determine the path distance according to the number of the Bluetooth node devices passed by each of the preliminary paths;
[0021] Determining a candidate path from the preliminary path according to the path distance and the node information of the adjacency table;
[0022] A transmission path for the message is screened from the candidate paths according to the priority of the message.
[0023] In one embodiment of the present invention, the node information of the adjacency table includes at least the relationship and connection status between the Bluetooth node device and the neighboring Bluetooth node device, and the connection status includes at least signal strength, link stability and node load.
[0024] In one embodiment of the present invention, after the message is transmitted to the target Bluetooth node device, the target Bluetooth node device is used to send a confirmation message to the source Bluetooth node device, the confirmation message includes at least the path information and transmission time of the transmission path, and the source Bluetooth node device is used to adjust the transmission path according to the confirmation message.
[0025] In one embodiment of the present invention, the method further comprises:
[0026] Send heartbeat messages to neighboring Bluetooth node devices according to preset rules;
[0027] Receiving a response message returned by the neighboring Bluetooth node device in response to the heartbeat information;
[0028] The node information in the adjacency table is updated according to the response message.
[0029] The embodiment of the present invention further discloses a message transmission device based on a wireless mesh network, wherein the wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and a neighboring Bluetooth node device, and the device includes:
[0030] A message acquisition module, used to acquire a message; the message at least includes a priority, a source node identifier and a target node identifier;
[0031] A transmission path determination module, used to determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path for the message to be transmitted from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier;
[0032] A message transmission module is used to transmit the message to the next Bluetooth node device according to the transmission path.
[0033] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0034] The memory is used to store computer programs;
[0035] The processor is used to implement the method described in the embodiment of the present invention when executing the program stored in the memory.
[0036] The embodiment of the present invention further discloses a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the embodiment of the present invention.
[0037] The embodiment of the present invention further discloses a computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, enables the processors to execute the method described in the embodiment of the present invention.
[0038] The embodiments of the present invention include the following advantages:
[0039] In an embodiment of the present invention, a wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table. The adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices. In the process of transmitting a message, the current Bluetooth node device obtains a message, and the message includes at least a priority, a source node identifier, and a target node identifier. The transmission path of the message is determined according to the priority and the node information in the adjacency table. The transmission path is the path for the message to be transmitted from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier. Then, the message can be transmitted to the next Bluetooth node device according to the transmission path until the message is transmitted to the target Bluetooth node device, completing the transmission of the message. In an embodiment of the present invention, in the wireless mesh network, important messages can be processed first according to the priority, and the transmission path of the message can be optimized according to the node information in the adjacency table to avoid the path of the Bluetooth node device with load pressure, thereby improving the overall resource utilization and communication efficiency of the wireless mesh network. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of the steps of a message transmission method based on a wireless mesh network provided in an embodiment of the present invention;
[0041] Figure 2 is a schematic diagram of an application environment provided in an embodiment of the present invention;
[0042] Figure 3 It is a schematic diagram of a data transmission process based on a Bluetooth Mesh network provided in an embodiment of the present invention;
[0043] Figure 4 is a structural block diagram of a message transmission device based on a wireless mesh network provided in an embodiment of the present invention;
[0044] Figure 5 It is a schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention. DETAILED DESCRIPTION
[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0046] Reference Figure 1 , shows a flow chart of the steps of a message transmission method based on a wireless mesh network provided in an embodiment of the present invention, wherein the wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices, and the method may specifically include the following steps:
[0047] Step 101, obtaining a message; the message at least includes a priority, a source node identifier, and a target node identifier.
[0048] In a specific implementation, the wireless mesh network may be a Bluetooth Mesh network, and the Bluetooth Mesh network may include multiple Bluetooth node devices (nodes). For example, refer to Figure 2 , is a schematic diagram of an application environment provided in an embodiment of the present invention. The Bluetooth node device may at least include smart home devices in a smart home system, such as smart bulbs, switches, sockets, temperature and humidity sensors, smoke alarms, smart door locks, and security cameras. The Bluetooth node devices can communicate with each other through a communication protocol.
[0049] Bluetooth Mesh network is a low-power wireless technology used to achieve large-scale device communication. It is mostly used in IoT scenarios such as smart home, industrial automation, and smart lighting. Based on multi-hop communication, Bluetooth Mesh network transmits messages from source Bluetooth node devices to target Bluetooth node devices through relay nodes, thereby achieving wide-range device coverage. In traditional Bluetooth Mesh network, each Bluetooth node device is not only a communication terminal, but also acts as a relay node to help transmit messages in the Bluetooth Mesh network, making the Bluetooth Mesh network have good scalability and can support the interconnection of hundreds or even thousands of Bluetooth node devices. Due to the characteristics of Bluetooth Mesh network based on broadcast and relay mechanisms, in Bluetooth Mesh network, when messages need to go through multiple jumps, it may lead to waste of overall resource utilization of Bluetooth Mesh network and communication delay.
[0050] The current Bluetooth Mesh network has the following problems: 1. Increased delay: Each message needs to be forwarded through multiple relay nodes. Especially in large-scale networks, as the number of hops increases, the message transmission delay increases significantly. 2. Resource competition: All messages are treated equally in the Bluetooth Mesh network, and there is a lack of direct support for message priority mechanisms. Therefore, even urgent or real-time control instructions, critical tasks or important tasks (messages) will be delayed in transmission due to sharing the same transmission path with low-priority messages.
[0051] In view of the above problems, the embodiments of the present invention build a priority control mechanism into the Bluetooth Mesh network to solve the transmission delay problem caused by equal processing of messages in the existing Bluetooth Mesh network.
[0052] In some embodiments, when a Bluetooth node device creates a message or a Bluetooth node device receives a message sent by another Bluetooth node device, different priorities of high, medium, and low can be set for each message. In the Bluetooth Mesh network, high-priority messages will be processed first to ensure that critical tasks (such as emergency alarms, real-time control instructions, etc.) are transmitted quickly to avoid competing for bandwidth with low-priority messages. The built-in priority control mechanism of the embodiment of the present invention breaks the bottleneck caused by resource competition in the traditional Bluetooth Mesh network, improves the responsiveness of the built-in priority control mechanism in high real-time demand scenarios, especially in the fields of smart home and industrial control, ensures the timely execution of important tasks, and improves the overall efficiency and reliability of other systems such as smart home systems. In addition, in combination with the built-in priority control, the embodiment of the present invention also introduces a dynamic routing optimization mechanism, which dynamically selects the optimal path (transmission path) according to the real-time status of each Bluetooth node device in the Bluetooth Mesh network, such as load, signal quality, etc., so that high-priority messages can not only be transmitted first, but also can pass through the shortest or optimal path, further reducing the number of hops (path distance) in the transmission process and reducing the transmission delay of the network. When the Bluetooth node device is overloaded, the algorithm can automatically adjust the route to avoid congested paths and ensure smooth message transmission. In this way, the embodiment of the present invention improves the overall efficiency of the network while ensuring priority transmission of key tasks.
[0053] In an embodiment of the present invention, each Bluetooth node device has its corresponding node identification (node ID), and the Bluetooth node device in the Bluetooth Mesh network can be uniquely identified based on the node identification. Specifically, in the Bluetooth Mesh network, each Bluetooth node device is assigned a unique identifier (node ID) when joining, and broadcasts its existence, and establishes a connection with an adjacent Bluetooth node device using a neighbor discovery mechanism. Each Bluetooth node device records the node information of the Bluetooth node device and its neighbor Bluetooth node devices through an adjacency table. Exemplarily, the node information in the adjacency table of the Bluetooth node device may at least include the relationship and connection status of the Bluetooth node device and its neighbor Bluetooth node devices, and the connection status may at least include information such as signal strength, link stability, and node load.
[0054] After receiving a message, a Bluetooth node device in a Bluetooth Mesh network, such as a source Bluetooth node device, a target Bluetooth node device, or a Bluetooth node device acting as a relay node, can obtain at least the priority of the message from the message, create a source node identifier (source node ID) corresponding to the source Bluetooth node device of the message, and a target node identifier (target node ID) corresponding to the target Bluetooth node device receiving the message.
[0055] In one embodiment of the present invention, the priority of the message can be determined according to the message type corresponding to the message. Specifically, the generation and priority definition of the message are important links to ensure efficient data transmission. To create a message, the source node ID and the target node ID must first be set to clarify the sender (source Bluetooth node device) and the receiver (target Bluetooth node device) of the message. The time sensitivity and urgency of the message can be determined according to the message type of the message, and the priority of the message is divided into three priority levels: priority 1 (high priority) is used for urgent messages such as real-time control instructions and alarms; priority 2 (intermediate priority) is suitable for tasks that require a faster response but are not urgent, such as important status updates and device control commands; priority 3 (low priority) is used for non-real-time messages, such as low-frequency data, logs, and background tasks. In addition, each message is also attached with a creation timestamp to record the creation time of the message, which is convenient for delay calculation and priority enhancement. In the process of the message entering the queue, the Bluetooth node device can classify the message by priority and store it in different queues, among which high-priority messages in the high-priority queue are processed first.
[0056] Step 102: determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path for transmitting the message from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier.
[0057] In an embodiment of the present invention, after a Bluetooth node device obtains a message, it can determine the transmission path of the message based on the priority of the message and the node information of its adjacency table, that is, which relay nodes the message is transmitted from the source Bluetooth node device to the target Bluetooth node device. It can be understood that since the Bluetooth node device processes data based on the priority of the message, it can ensure that high-priority messages can be processed first, and based on the adjacency table, it can ensure that Bluetooth node devices that are currently not suitable for transmitting messages (for example, Bluetooth node devices with load pressure) will not be used as relay nodes in the transmission path, thereby improving the overall resource utilization of the wireless mesh network.
[0058] Step 103: Transmit the message to the next Bluetooth node device according to the transmission path.
[0059] In an embodiment of the present invention, when a Bluetooth node device determines the transmission path of a message in a Bluetooth Mesh network based on the priority of the message and the node information in the adjacency table, the message can be transmitted to the next Bluetooth node device in the Bluetooth Mesh network, and the above steps are repeated until the message is transmitted to the target Bluetooth node device or the message transmission process is ended, thereby completing the transmission of the message in the Bluetooth Mesh network.
[0060] In the above-mentioned message transmission method based on wireless mesh network, the wireless mesh network includes Bluetooth node devices, and the Bluetooth node devices respectively have corresponding node identifiers and adjacency tables, and the adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices. In the process of transmitting messages, the current Bluetooth node device obtains the message, and the message includes at least priority, source node identifier and target node identifier. The transmission path of the message is determined according to the priority and the node information of the adjacency table. The transmission path is the path of the message from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier. Then, the message can be transmitted to the next Bluetooth node device according to the transmission path until the message is transmitted to the target Bluetooth node device, and the message transmission is completed. In the embodiment of the present invention, the messages in the wireless mesh network can give priority to important messages according to the priority, and the transmission path of the message can be optimized according to the node information in the adjacency table to avoid the path of the Bluetooth node device with load pressure, thereby improving the overall resource utilization and communication efficiency of the wireless mesh network.
[0061] In one embodiment of the present invention, after obtaining the message, the method may further include:
[0062] The message is reprioritized.
[0063] In an embodiment of the present invention, the priority of a message can be fixed when it is created, or it can be continuously updated during the transmission process of the Bluetooth Mesh network to adapt to the constantly changing Bluetooth Mesh network, improve the efficiency of message transmission, and thereby ensure the overall resource utilization and communication efficiency in the Bluetooth Mesh network.
[0064] Specifically, re-determining the priority of the message includes:
[0065] Get the message creation timestamp and current system time of the message;
[0066] Determining the transmission time of the message according to the message creation timestamp and the current system time;
[0067] The message is re-prioritized based on the transmission time.
[0068] In an embodiment of the present invention, a high priority message directly enters a high priority queue after being generated. The Bluetooth node device processes the high priority message first and selects the optimal path to ensure the minimum number of hops and the highest transmission speed to transmit the high priority message in the Bluetooth Mesh network. Intermediate priority messages enter the medium priority queue. Intermediate priority messages are processed when the high priority queue is empty. Intermediate priority messages usually do not require the shortest number of hops, but still select a stable path through dynamic routing to share some resources with low priority messages. Low priority messages will only be processed when both the high priority queue and the medium priority queue are empty. The path selection is relatively flexible, allowing the use of suboptimal paths. In addition, the embodiment of the present invention monitors the creation timestamp and current system time of the message in real time to determine the transmission time of the message in the Bluetooth Mesh network, and then can adaptively adjust the priority of the message according to the transmission time, thereby avoiding the message from being unprocessed for a long time.
[0069] In an embodiment of the present invention, re-determining the priority of the message according to the transmission time may include:
[0070] When the transmission time exceeds a preset time threshold, the priority of the message is increased.
[0071] In an embodiment of the present invention, when it is determined that the transmission time of a message in a Bluetooth Mesh network exceeds a preset time threshold, that is, when a message is stranded in the Bluetooth Mesh network, the priority of the message can be automatically increased, so that each message can be processed in a timely manner. For example, assuming that the priority of message A is a medium priority, and the transmission time of message A in a Bluetooth Mesh network exceeds a preset time threshold, the priority of message A can be increased from a medium priority to a high priority, and the stranded message can be processed preferentially.
[0072] It can be seen that the embodiment of the present invention has a built-in feedback mechanism in the Bluetooth Mesh network to monitor the transmission status (including transmission time) of each message in real time, and improve the robustness of the system in combination with the dynamic priority adjustment function. When a message has not been successfully transmitted for a long time in the Bluetooth Mesh network, the system will automatically increase its priority to ensure that important messages can still be delivered first during peak loads, avoiding delays caused by the backlog of low-priority messages. The feedback mechanism not only ensures the efficient operation of the Bluetooth Mesh network, but also continuously optimizes the transmission path, allowing the system to flexibly respond to various changes in a complex network environment and ensure that key tasks are processed in a timely manner.
[0073] In an embodiment of the present invention, determining the transmission path of the message according to the priority and the node information of the adjacency table may include:
[0074] Calculate a preliminary path for transmitting the message from the source Bluetooth node device to the target Bluetooth node device in the wireless mesh network;
[0075] Determine the path distance according to the number of the Bluetooth node devices passed by each of the preliminary paths;
[0076] Determining a candidate path from the preliminary path according to the path distance and the node information of the adjacency table;
[0077] A transmission path for the message is screened from the candidate paths according to the priority of the message.
[0078] In some embodiments of the present invention, for the Bluetooth node device that currently obtains the message, it can use the node information in the adjacency table to calculate multiple preliminary optimal paths (preliminary paths) from the source Bluetooth node device to the target Bluetooth node device through other algorithms such as the Dijkstra algorithm or a location-based routing algorithm, and then determine the path distance of each preliminary path, that is, the number of all Bluetooth node devices passed in the preliminary path. Finally, the Bluetooth node device can determine the candidate path from the preliminary path in combination with the path distance and the node information in its adjacency table. For example, based on the node information in the adjacency table, the preliminary path of the Bluetooth node device with load pressure is removed, and the preliminary path with a path distance higher than a preset distance or a path distance that is too long is removed. Finally, the message transmission path can be screened from the candidate path after removing some preliminary paths according to the priority of the message, and the message can be transmitted to the next Bluetooth node device based on the transmission path.
[0079] For example, for high-priority messages, the Bluetooth node device gives priority to the path with the least hops, the best signal quality and the lowest load, so as to reduce the number of relay nodes and reduce transmission delay. Intermediate priority messages need to choose a path with moderate delay and stability, while low-priority messages can use a regular path, but should avoid occupying the resources required for high-priority messages. In addition, the Bluetooth node device will regularly update the node information of the adjacency table, including the load status and signal strength of the neighboring Bluetooth node devices. In this way, when the relay node load of a certain path is too high or the signal quality decreases, the Bluetooth node device will dynamically adjust the route according to the node information in the adjacency table and reselect the best path.
[0080] In one embodiment of the present invention, after the message is transmitted to the target Bluetooth node device, the target Bluetooth node device is used to send a confirmation message to the source Bluetooth node device, the confirmation message includes at least the path information and transmission time of the transmission path, and the source Bluetooth node device is used to adjust the transmission path according to the confirmation message.
[0081] In an embodiment of the present invention, after each message arrives at the target Bluetooth node device, the target Bluetooth node device will send a confirmation message (ACK) to the source Bluetooth node device to inform the source Bluetooth node device that the message has been successfully received. The confirmation message may include the path information and transmission time of the transmission path to help the source Bluetooth node device optimize subsequent routing decisions. Specifically, the source Bluetooth node device can evaluate the performance of the current transmission path based on the path information and transmission time in the confirmation message (ACK). If the evaluation result shows that the transmission delay of a certain path is high, the source Bluetooth node device can select a new path in subsequent transmissions, thereby ensuring the transmission efficiency of messages in the Bluetooth Mesh network.
[0082] In one embodiment of the present invention, the method may further include:
[0083] Send heartbeat messages to neighboring Bluetooth node devices according to preset rules;
[0084] Receiving a response message returned by the neighboring Bluetooth node device in response to the heartbeat information;
[0085] The node information in the adjacency table is updated according to the response message.
[0086] The preset rule may include regularly sending heartbeat messages at preset time intervals.
[0087] In an embodiment of the present invention, each Bluetooth node device can periodically send heartbeat messages to neighboring Bluetooth node devices to monitor the network status and the load of neighboring Bluetooth node devices, and periodically update the node information of the adjacency table to ensure that the data for routing selection is the latest when calculating the transmission path. During the routing selection process, the Bluetooth node device selects the best path in real time based on the node information of the adjacency table. In addition, if it is found that the Bluetooth node device in the path is overloaded or the signal is weakened, the Bluetooth node device will automatically reselect a new path. In addition, if a message is not transmitted for a long time due to network load, the Bluetooth node device will also dynamically increase its priority, for example, from medium priority to high priority, or from low priority to medium priority, to ensure that the message can be delivered in time even in network congestion.
[0088] In order to enable those skilled in the art to better understand the embodiments of the present invention, specific examples are used below for illustration. Figure 3 , is a schematic diagram of a data transmission process based on a Bluetooth Mesh network provided in an embodiment of the present invention, and the specific steps are as follows:
[0089] Step 1. Network initialization:
[0090] In a Bluetooth Mesh network, a Bluetooth node device (node) is assigned a unique identifier (ID) when it joins, broadcasts its existence, and uses the neighbor discovery mechanism to establish connections with neighboring nodes. Each node records its relationship with neighboring nodes and connection status through an adjacency table, including node information such as signal strength, link stability, and node load.
[0091] Step 2: Message generation and priority definition:
[0092] In the embodiment of the present invention, the generation and priority definition of messages are important links to ensure efficient data transmission. To create a message, the source node ID and the target node ID must first be set to clarify the sender and receiver of the message. Then, the time sensitivity and urgency of the message can be determined according to the message type, and the message can be divided into three priority levels: priority 1 (high priority) is used for urgent messages such as real-time control instructions and alarms; priority 2 (intermediate priority) is suitable for tasks that require a faster response but are not urgent, such as important status updates and device control commands; priority 3 (low priority) is used for non-real-time messages, such as low-frequency data, logs, and background tasks. Each message also needs to be attached with a creation timestamp to record the creation time of the message, which is convenient for subsequent delay calculation and priority improvement. In the process of message enqueuing, the node classifies the message by priority and stores it in different queues (for example, high priority messages are stored in high priority queues, low priority messages are stored in low priority queues, or medium priority messages are stored in medium priority queues, etc.), where high priority messages in high priority queues will be processed first.
[0093] Step 3: Routing selection and path optimization:
[0094] The node uses the node information in the adjacency table to calculate the preliminary optimal path from the source node to the target node through the Dijkstra algorithm or other algorithms such as the location-based routing algorithm. For high-priority messages, the node gives priority to the path with the least hops, the best signal quality and the lowest load, so as to reduce the number of relay nodes used to jump the message and reduce the transmission delay.
[0095] Among them, medium-priority messages need to choose a path with moderate delay and stability, and low-priority messages can use regular paths, but should avoid occupying the resources required by high-priority messages. In addition, the node will regularly update the node information of the adjacency table, including the load of neighboring nodes and signal strength information. In this way, when the relay node of a path is overloaded or the signal quality decreases, the node will dynamically adjust the route and reselect the best path to transmit the message.
[0096] Step 4: Message forwarding mechanism:
[0097] After the high-priority message is generated, it goes directly into the high-priority queue. The node processes the high-priority message first and selects the optimal path to ensure the minimum number of hops and the highest transmission speed. The medium-priority message is processed when the high-priority queue is empty. Although the medium-priority message does not require the shortest number of hops, it still selects a stable path through dynamic routing and shares some resources with low-priority messages. Low-priority messages will only be processed when both the high-priority queue and the medium-priority queue are empty. The path selection is relatively flexible, allowing the use of suboptimal paths. In addition, the node will continuously monitor the creation timestamp of the message and the current system time to determine the transmission time of the message in the Bluetooth Mesh network. If the message is delayed for more than the preset time threshold, the node will automatically increase its priority, so that the node can process the stranded message in time.
[0098] Step 5: Routing confirmation and feedback:
[0099] After each message arrives at the target node, the target node can send an acknowledgment message (ACK) to the source node to inform that the message has arrived successfully. The acknowledgment message can include path information and transmission time, which can help the source node optimize subsequent routing decisions. Based on the path information and transmission time in the acknowledgment message ACK, the source node can evaluate the performance of the current path of the message. If the evaluation result shows that the transmission delay of a certain path is high, the source node can select a new path in subsequent transmissions.
[0100] Step 6: Dynamic adjustment mechanism:
[0101] Each node regularly sends heartbeat messages to neighboring nodes to monitor the network status and the load of neighboring nodes. At the same time, it regularly updates the node information in the adjacency table to ensure that the data for subsequent routing selection based on the adjacency table is the latest. During the routing selection process, the node selects the best path in real time based on the node information in the adjacency table; if it finds that a relay node in the path is overloaded or the signal is weakened, the node will automatically reselect a new path. In addition, if a message has not been delivered for a long time due to network load, the node will dynamically increase its priority to ensure that the message can be delivered in time even in network congestion.
[0102] Therefore, the application of the embodiments of the present invention has at least the following advantages: 1. Reducing transmission delay: Through the priority mechanism, high-priority messages are transmitted first in the Bluetooth Mesh network to avoid competition with low-priority messages, ensuring the rapid transmission of critical tasks. Dynamic routing selection further reduces the number of hops and network congestion, thereby reducing delays and improving real-time response capabilities. 2. Resource optimization and network efficiency improvement: Priority control prevents low-priority messages from occupying too many network resources in the Bluetooth Mesh network, ensuring that important tasks get enough bandwidth, and dynamic routing optimization avoids selecting paths with high-load relay nodes, improving the overall network resource utilization and communication efficiency.
[0103] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0104] Reference Figure 4 , shows a structural block diagram of a message transmission device based on a wireless mesh network provided in an embodiment of the present invention, wherein the wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices, and the device may specifically include the following modules:
[0105] The message acquisition module 401 is used to acquire a message; the message at least includes a priority, a source node identifier and a target node identifier;
[0106] A transmission path determination module 402, used to determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path of the message from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier;
[0107] The message transmission module 403 is used to transmit the message to the next Bluetooth node device according to the transmission path.
[0108] In an embodiment of the present invention, the priority of the message is determined according to the message type corresponding to the message.
[0109] In one embodiment of the present invention, the device further includes: a priority determination module, configured to:
[0110] The message is reprioritized.
[0111] In one embodiment of the present invention, the priority determination module is used to:
[0112] Get the message creation timestamp and current system time of the message;
[0113] Determining the transmission time of the message according to the message creation timestamp and the current system time;
[0114] The message is re-prioritized based on the transmission time.
[0115] In one embodiment of the present invention, the priority determination module is used to:
[0116] When the transmission time exceeds a preset time threshold, the priority of the message is increased.
[0117] In one embodiment of the present invention, the transmission path determination module 402 is used to:
[0118] Calculate a preliminary path for transmitting the message from the source Bluetooth node device to the target Bluetooth node device in the wireless mesh network;
[0119] Determine the path distance according to the number of the Bluetooth node devices passed by each of the preliminary paths;
[0120] Determining a candidate path from the preliminary path according to the path distance and the node information of the adjacency table;
[0121] A transmission path for the message is screened from the candidate paths according to the priority of the message.
[0122] In one embodiment of the present invention, the node information of the adjacency table includes at least the relationship and connection status between the Bluetooth node device and the neighboring Bluetooth node device, and the connection status includes at least signal strength, link stability and node load.
[0123] In one embodiment of the present invention, after the message is transmitted to the target Bluetooth node device, the target Bluetooth node device is used to send a confirmation message to the source Bluetooth node device, the confirmation message includes at least the path information and transmission time of the transmission path, and the source Bluetooth node device is used to adjust the transmission path according to the confirmation message.
[0124] In one embodiment of the present invention, the device further comprises: a feedback module, configured to:
[0125] Send heartbeat messages to neighboring Bluetooth node devices according to preset rules;
[0126] Receiving a response message returned by the neighboring Bluetooth node device in response to the heartbeat information;
[0127] The node information in the adjacency table is updated according to the response message.
[0128] In an embodiment of the present invention, a wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table. The adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices. In the process of transmitting a message, the current Bluetooth node device obtains a message, and the message includes at least a priority, a source node identifier, and a target node identifier. The transmission path of the message is determined according to the priority and the node information in the adjacency table. The transmission path is the path for the message to be transmitted from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier. Then, the message can be transmitted to the next Bluetooth node device according to the transmission path until the message is transmitted to the target Bluetooth node device, completing the transmission of the message. In an embodiment of the present invention, in the wireless mesh network, important messages can be processed first according to the priority, and the transmission path of the message can be optimized according to the node information in the adjacency table to avoid the path of the Bluetooth node device with load pressure, thereby improving the overall resource utilization and communication efficiency of the wireless mesh network.
[0129] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0130] It should be noted that the embodiments of the present invention may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0131] In addition, an embodiment of the present invention further provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned message transmission method embodiment based on the wireless mesh network are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0132] The embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned message transmission method embodiment based on a wireless mesh network is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0133] An embodiment of the present invention also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned message transmission method embodiment based on a wireless mesh network, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0134] Figure 5 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.
[0135] The electronic device 500 includes but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted terminal, a wearable device, and a pedometer.
[0136] It should be understood that in the embodiment of the present invention, the radio frequency unit 501 can be used for receiving and sending signals during information transmission or communication. Specifically, after receiving downlink data from the base station, it is sent to the processor 510 for processing; in addition, uplink data is sent to the base station. Generally, the radio frequency unit 501 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the radio frequency unit 501 can also communicate with the network and other devices through a wireless communication system.
[0137] The electronic device provides users with wireless broadband Internet access through the network module 502, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0138] The audio output unit 503 can convert the audio data received by the RF unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output it as sound. Moreover, the audio output unit 503 can also provide audio output related to a specific function performed by the electronic device 500 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, etc.
[0139] The input unit 504 is used to receive audio or video signals. The input unit 504 may include a graphics processor (GPU) 5041 and a microphone 5042, and the graphics processor 5041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 506. The image frame processed by the graphics processor 5041 can be stored in the memory 509 (or other storage medium) or sent via the radio frequency unit 501 or the network module 502. The microphone 5042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 501 in the case of a telephone call mode.
[0140] The electronic device 500 also includes at least one sensor 505, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 5061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 5061 and / or the backlight when the electronic device 500 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 505 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0141] The display unit 506 is used to display information input by the user or information provided to the user. The display unit 506 may include a display panel 5061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0142] The user input unit 507 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 5071 or near the touch panel 5071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 5071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 510, receives the command sent by the processor 510 and executes it. In addition, the touch panel 5071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 5071, the user input unit 507 may also include other input devices 5072. Specifically, other input devices 5072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.
[0143] Furthermore, the touch panel 5071 may be overlaid on the display panel 5061. When the touch panel 5071 detects a touch operation on or near it, it transmits the information to the processor 510 to determine the type of the touch event. Then, the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Figure 5 In the figure, the touch panel 5071 and the display panel 5061 are used as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 5071 and the display panel 5061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.
[0144] The interface unit 508 is an interface for connecting an external device to the electronic device 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the electronic device 500 or may be used to transmit data between the electronic device 500 and an external device.
[0145] The memory 509 can be used to store software programs and various data. The memory 509 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 509 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0146] The processor 510 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 509 and calling data stored in the memory 509, it performs various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. The processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 510.
[0147] The electronic device 500 may also include a power supply 511 (such as a battery) for supplying power to each component. Preferably, the power supply 511 may be logically connected to the processor 510 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.
[0148] In addition, the electronic device 500 includes some functional modules not shown, which will not be described in detail here.
[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0151] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0154] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0157] If the functions are implemented in the form of software functional units and sold or used as independent products, they 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 the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0158] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A message transmission method based on a wireless mesh network, characterized in that: The wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices, and the method includes: Obtaining a message; the message at least includes a priority, a source node identifier, and a target node identifier; Determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path of the message from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier; The message is transmitted to the next Bluetooth node device according to the transmission path.
2. The method according to claim 1, characterized in that The priority of the message is determined according to the message type corresponding to the message.
3. The method according to claim 2, characterized in that After obtaining the message, the method further includes: The message is reprioritized.
4. The method according to claim 3, characterized in that Reprioritize the message, including: Get the message creation timestamp and current system time of the message; Determining the transmission time of the message according to the message creation timestamp and the current system time; The message is re-prioritized based on the transmission time.
5. The method according to claim 4, characterized in that Re-determining the priority of the message according to the transmission time, comprising: When the transmission time exceeds a preset time threshold, the priority of the message is increased.
6. The method according to claim 1, characterized in that Determining a transmission path of the message according to the priority and the node information of the adjacency table includes: Calculate a preliminary path for transmitting the message from the source Bluetooth node device to the target Bluetooth node device in the wireless mesh network; Determine the path distance according to the number of the Bluetooth node devices passed by each of the preliminary paths; Determining a candidate path from the preliminary path according to the path distance and the node information of the adjacency table; A transmission path for the message is screened from the candidate paths according to the priority of the message.
7. The method according to claim 6, characterized in that The node information of the adjacency table includes at least the relationship and connection status between the Bluetooth node device and the neighboring Bluetooth node device, and the connection status includes at least signal strength, link stability and node load.
8. The method according to claim 4, characterized in that After the message is transmitted to the target Bluetooth node device, the target Bluetooth node device is used to send a confirmation message to the source Bluetooth node device, and the confirmation message includes at least the path information and transmission time of the transmission path. The source Bluetooth node device is used to adjust the transmission path according to the confirmation message.
9. The method according to claim 1, characterized in that: The method further comprises: Send heartbeat messages to neighboring Bluetooth node devices according to preset rules; Receiving a response message returned by the neighboring Bluetooth node device in response to the heartbeat information; The node information in the adjacency table is updated according to the response message.
10. A message transmission device based on a wireless mesh network, characterized in that: The wireless mesh network includes Bluetooth node devices, each of which has a corresponding node identifier and an adjacency table, wherein the adjacency table includes node information of the Bluetooth node device and neighboring Bluetooth node devices, and the apparatus includes: A message acquisition module, used to acquire a message; the message at least includes a priority, a source node identifier and a target node identifier; A transmission path determination module, used to determine the transmission path of the message according to the priority and the node information of the adjacency table; the transmission path is the path for the message to be transmitted from the source Bluetooth node device corresponding to the source node identifier to the target Bluetooth node device corresponding to the target node identifier; A message transmission module is used to transmit the message to the next Bluetooth node device according to the transmission path.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method according to any one of claims 1 to 9 when executing the program stored in the memory.
12. A computer-readable storage medium having instructions stored thereon, which, when executed by one or more processors, cause the processors to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Multi-rate opportunistic routing method for wireless mesh network
CN101945432A
Prioritized queueing in a mesh network based on age of payload data
CN105075373A
Routing optimization method and system for Bluetooth mesh network with mobile node
CN111988827A
Neighbor information updating method and device, electronic equipment and storage medium
CN113382447A
Data transmission method and system, electronic equipment and storage medium
CN117896799A