Data transmission method, device, electronic device and wireless communication terminal
By determining the target node set in the wireless ad hoc network and calculating path information, the problem of low data transmission efficiency under dynamic network topology is solved, and efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510558948.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-30
AI Technical Summary
In dynamic network topology scenarios, the data transmission efficiency of wireless ad hoc networks is low, and traditional static routing mechanisms and network flooding algorithms lead to redundant data forwarding and increased network load.
By receiving the data packets of the second node, it is determined that the set of target nodes is the second-level neighbor of the first node and does not belong to the first-level neighbor of the second node, the path information is calculated and the optimal or suboptimal path is selected for data transmission, and the indication information is updated to broadcast the data packet.
Improve data transmission efficiency, avoid redundant forwarding, expand communication range, and improve the accuracy and reliability of data packet transmission.
Smart Images

Figure CN120091383B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technologies, and more particularly, to a data transmission method, apparatus, electronic device, and wireless communication terminal. Background Art
[0002] A wireless ad-hoc network is a distributed wireless network that does not rely on fixed infrastructure (such as base stations, routers, etc.). It is dynamically self-organized by a group of nodes with wireless communication capabilities. Nodes communicate with each other through multi-hop forwarding links, and relay nodes forward data packets sent by source nodes to achieve connectivity between all network nodes. In a scenario with a dynamic network topology, the relative positions of each node (for example, drones, unmanned vehicles, or unmanned boats) are in dynamic change.
[0003] In practical applications, traditional data transmission mechanisms use static routing mechanisms or network flooding algorithms for data transmission. Although the static routing mechanism can reduce the data overhead generated by network flooding, it is difficult to adapt to scenarios with a dynamic network topology. In the network flooding algorithm, network nodes send and forward data packets in a broadcast form, which easily leads to redundant data forwarding, increases the network load of the wireless ad-hoc network, and reduces the data transmission efficiency.
[0004] Therefore, how to improve the data transmission efficiency of wireless ad-hoc networks has become an important problem to be solved urgently. Summary of the Invention
[0005] In a first aspect, a data transmission method is provided, including: receiving a first data packet from a second node; the first data packet includes data content and indication information for indicating identification information of a relay node; when the indication information indicates that the first node is the relay node, determining a set of target nodes; the target nodes belong to the second-level neighbor nodes of the first node and do not belong to the first-level neighbor nodes of the second node; determining path information from the first node to each of the target nodes, and determining a corresponding relay node for each target node according to the path information; updating the indication information according to the relay node corresponding to each target node to obtain a second data packet, and broadcasting the second data packet.
[0006] In the above solution, when receiving the first data packet of the second node, the forwarding task of the relay node is clarified through the indication information, improving the transmission efficiency of the data packet. When the first node is used as the relay node, the method autonomously determines the set of target nodes by comprehensively considering the neighbor node information of the first node and the second node. The target nodes are the second-level neighbor nodes of the first node and do not belong to the first-level neighbor nodes of the second node. Therefore, the communication range can be effectively expanded while avoiding redundant forwarding. By calculating the path information from the first node to each target node, the optimal or sub-optimal path information is selected for data transmission. The relay node corresponding to each target node is determined according to the path information, and the indication information is updated, so that the data packet can be forwarded to the target node along the optimal path information, improving the transmission efficiency of the data transmission.
[0007] In one implementation, the determining the set of target nodes includes: obtaining the neighbor node information of the first node and the neighbor node information of the second node; the neighbor node information includes the information of the first-level neighbor nodes and the information of the second-level neighbor nodes; traversing the second-level neighbor nodes of the first node to determine whether the i-th node among them meets the first preset condition; the first preset condition includes: the i-th node does not belong to the first-level neighbor nodes of the second node; if the i-th node meets the first preset condition, the i-th node is determined as a target node and added to the set of target nodes.
[0008] In one implementation, the determining the path information from the first node to each target node includes: obtaining the neighbor node information of the first node; the neighbor node information includes the information of the first-level neighbor nodes and the information of the second-level neighbor nodes; traversing the first-level neighbor nodes of the first node to determine whether the j-th node among them meets the second preset condition; the second preset condition includes: the first-level neighbor nodes of the j-th node include at least one of the target nodes; if the j-th node meets the second preset condition, the j-th node is determined as a relay node, and the communication among the first node, the j-th node, and a target node is determined as a path information.
[0009] In one implementation, the determining the relay node corresponding to each target node according to the path information includes: traversing the path information from the first node to each target node, and determining the first type of target nodes in the path information; for the first type of target nodes, there is only one path information to receive the data packet of the first node; determining the relay node corresponding to each first type of target node, and adding the relay node corresponding to each first type of target node to the set of relay nodes.
[0010] In one implementation, the method further includes: traversing the path information from the first node to each target node, and determining a second type of target node in the path information; there are at least two pieces of path information for the second type of target node to receive data packets from the first node; determining the relay node corresponding to each second type of target node; if there is a relay node corresponding to the second type of target node in the set of relay nodes, no processing is performed on the relay node corresponding to the second type of target node.
[0011] In one implementation, the method further includes: traversing the path information from the first node to each target node, and determining a second type of target node in the path information; there are at least two pieces of path information for the second type of target node to receive data packets from the first node; determining the relay node corresponding to each second type of target node; if there is no relay node corresponding to the second type of target node in the set of relay nodes, comparing the at least two pieces of path information to determine the target path information; adding the relay node corresponding to the target path information to the set of relay nodes.
[0012] In a second aspect, a data transmission device is provided, including: an acquisition module, configured to receive a first data packet from a second node; the first data packet includes data content and indication information, and the indication information is used to indicate the identification information of a relay node; a processing module, configured to determine a set of target nodes when the indication information indicates that the first node is a relay node; the target nodes belong to the secondary neighbor nodes of the first node and do not belong to the primary neighbor nodes of the second node; a response module, configured to determine the path information from the first node to each of the target nodes, determine the relay node corresponding to each target node according to the path information; update the indication information according to the relay node corresponding to each target node to obtain a second data packet, and broadcast the second data packet.
[0013] In a third aspect, an electronic device for implementing the data transmission method is provided, where the electronic device includes a memory and a processor; wherein, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the data transmission method described in any of the above aspects.
[0014] In a fourth aspect, a wireless communication terminal is provided, characterized in that the wireless communication terminal includes a memory and a processor; wherein, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the data transmission method described in any of the above aspects. Description of the Drawings
[0015] Figure 1It is the first application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0016] Figure 2 It is a schematic flowchart of the data transmission method provided by the embodiments of the present application;
[0017] Figure 3 It is the second application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0018] Figure 4 It is the third application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0019] Figure 5 It is the fourth application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0020] Figure 6 It is the fifth application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0021] Figure 7 It is the sixth application scenario diagram of the data transmission method provided by the embodiments of the present application;
[0022] Figure 8 It is a schematic structural diagram of the data transmission device provided by the embodiments of the present application. Detailed implementation manners
[0023] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application and should not be construed as limiting the present application.
[0024] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features.
[0025] Figure 1 It is the first application scenario diagram of the data transmission method provided by the embodiments of the present application. Refer to Figure 1 , in a wireless ad hoc network, nodes are based on multi-hop forwarding links, and relay nodes forward data packets sent by source nodes to achieve connectivity between each node. Refer to Figure 1, The neighbor nodes of Node1 include Node2, Node6, Node7, and Node8. Each node broadcasts a heartbeat packet message at regular intervals according to the time synchronization information (used to announce its online status to neighbor nodes. If a node does not receive a heartbeat packet from a neighbor for a long time, it is considered that the node has failed or left the network). Taking the heartbeat packet message of Node1 as an example, the heartbeat packet message contains the node identifier of Node1 and the neighbor node information of Node1. Among them, the node identifier is used to uniquely identify a node, and the node identifier can be the physical address of the node. Node1 receives the heartbeat packet information broadcast by its neighbor nodes (Node2, Node6, Node7, Node8).
[0026] Referring to Table 1, the heartbeat packet information includes the node identifier of the node and the neighbor node information of the node. Obtain its first-level neighbor nodes according to the heartbeat packet information of Node1, the heartbeat packet information of Node2, the heartbeat packet information of Node6, the heartbeat packet of Node7, and the heartbeat packet information of Node8.
[0027] Table 1 Node identifier, first-level neighbor nodes of the node
[0028]
[0029] In a wireless ad hoc network, communication between nodes depends on wireless communication technologies such as Wi-Fi, Bluetooth, or dedicated wireless ad hoc network protocols (such as IEEE 802.11s, Zigbee, etc.). Each node uses the same communication protocol to receive the data packets broadcast by neighbor nodes. When parsing the data packets, the first node extracts the data packet header information (such as source address, indication information, protocol type, etc.) and the payload (i.e., the actual data content transmitted) from the first data packet according to the format and protocol of the data packet. Among them, the indication information is located in the header or a specific field of the data packet, and the indication information contains the identifier information of the relay node (such as node identifier, MAC address, etc.).
[0030] Hereinafter, the data transmission method provided by the embodiments of the present application will be specifically described. The first node and the second node are two different nodes in a wireless ad hoc network, and the second node is a first-level neighbor node of the first node. Therefore, the first node can receive the data packets of the second node.
[0031] Figure 2 is a schematic flowchart of the data transmission method provided by the embodiments of the present application. Refer to Figure 2 , The data transmission method provided by the embodiments of the present application includes the following steps 201 to step 203.
[0032] Step 201: Receive the first data packet from the second node. The first data packet includes data content and indication information, where the indication information is used to indicate the identification information of the relay node.
[0033] Exemplarily, denote the first node as Node1 and the second node as Node2. Then Node1 is the current node and Node2 is the source node. Refer to Table 2 and Table 3. Each node maintains a neighbor node information table, which records the information of the node's first-level neighbor nodes and second-level neighbor nodes. In practical applications, nodes update their neighbor node information by periodically sending and receiving heartbeat packets. After the current node receives the heartbeat packet from a neighbor node, it updates the corresponding entry in its neighbor node information table. Each node broadcasts heartbeat packets regularly. The heartbeat packet includes the information of the node's first-level neighbor nodes and second-level neighbor nodes. Each node obtains the information of its first-level neighbor nodes and second-level neighbor nodes by receiving the heartbeat packets from neighbor nodes (first-level neighbor nodes).
[0034] Table 2 Neighbor Node Information of the First Node
[0035]
[0036] Table 3 Neighbor Node Information of the Second Node
[0037]
[0038] When the second node needs to broadcast a data packet to the network, it can encapsulate the data content and indication information into a data packet and send it out through the wireless channel. The data packet includes data content and indication information. The indication information is used to indicate the identification information of the relay node. The indication information contains an instruction for the information of the relay node, or the indication information contains the identification information of the relay node. As a potential relay node, after receiving the first data packet from the second node, the first node parses the first data packet to obtain the data content and indication information in the first data packet.
[0039] In a wireless ad hoc network, the first node can set a listener on its network communication interface to listen for heartbeat packets and data packets of the network. When the first node receives the heartbeat packet from the second node, the listener will trigger an event and parse the neighbor node information of the second node. When the first node receives the first data packet from the second node, the listener will trigger an event, parse the header information of the data packet, and extract the indication information in the first data packet.
[0040] Step 202: In the case where the indication information indicates that the first node is a relay node, determine the set of target nodes. The target nodes belong to the second-level neighbor nodes of the first node and do not belong to the first-level neighbor nodes of the second node.
[0041] To determine whether the first node is a relay node, the first node can match the identification information of the relay node in the indication information, comparing the node identification or the MAC address. If the identification information of the first node matches the identification information of a certain relay node, it is determined that the first node is a relay node. Alternatively, in the case where the identification information of the first node is included in the indication information, it is determined that the first node is a relay node.
[0042] See Figure 3 , taking the source node as Node2 as an example, in the indication information of the first data packet, the identification information of Node1 and the identification information of Node5 are included. After receiving the first data packet, Node1 extracts the indication information in the first data packet. If the indication information includes the identification information of Node1, it indicates that Node1 belongs to a relay node. In this case, the first node determines the set of target nodes according to the neighbor node information of the first node and the neighbor node information of the second node. The target nodes belong to the second-level neighbor nodes of the first node and do not belong to the first-level neighbor nodes of the second node.
[0043] In the process of determining the target nodes, the second-level neighbor nodes of the first node can be traversed to determine whether the i-th node among them meets the first preset condition. The first preset condition includes: the i-th node does not belong to the first-level neighbor nodes of the second node. If the i-th node meets the first preset condition, the i-th node is determined as a target node and added to the set of target nodes.
[0044] Exemplarily, the set of the second-level neighbor nodes of Node1 is denoted as U, then U = {Node3, Node4, Node5, Node9, Node10}. The set of the first-level neighbor nodes of Node2 is denoted as V, then V = {Node1, Node3, Node4, Node5}. Denote the node identification of the target node as a, then a ∈ U - V. See Figure 3 , Node3, Node4, Node5, Node9, and Node10 belong to the second-level neighbor nodes of Node1. Traverse the second-level neighbor nodes of Node1, and according to the above rules, it is determined that Node9 and Node10 meet the first preset condition. Therefore, Node9 and Node10 can be determined as target nodes. Correspondingly, the set of target nodes is {Node9, Node10}.
[0045] Step 203: Determine the path information from the first node to each target node, and determine the relay node corresponding to each target node according to the path information. Update the indication information according to the relay node corresponding to each target node to obtain a second data packet, and broadcast the second data packet.
[0046] In the embodiments of the present application, Figure 3 ,Figure 4 Corresponding to two different situations, the following will, in conjunction with the accompanying drawings, elaborate in detail on how to determine the relay node corresponding to each target node based on the path information. In Figure 3 , there is only one path information for each target node. Calculate the path information of each node in the set from the first node to the target node, and the obtained path information is: Node1—Node7—Node10, Node1—Node8—Node9. Determine the relay nodes corresponding to each target node according to the path information as {Node7, Node8}.
[0047] In practical applications, referring to Figure 4 , the same target node (for example, Node10) may have at least two paths to receive the data packet of Node1. In this case, the first type of target node and the second type of target node can be used for distinction. The first type of target node has only one path information to receive the data packet of the first node (Node1), for example, Node9. The second type of target node has at least two paths information to receive the data packet of the first node (Node1), for example, Node10.
[0048] After calculating the path information of each node in the set from the first node to the target node and obtaining the path information, traverse the path information from the first node to each target node. First, determine the relay node corresponding to the first type of target node. When the target node is the first type of target node, determine the relay node corresponding to each first type of target node, and add the relay node corresponding to each first type of target node to the set of relay nodes. In Figure 4 , Node9 is the first type of target node. Correspondingly, the set of relay nodes is {Node8}.
[0049] Figure 5 is the fourth application scenario diagram of the data transmission method provided by the embodiment of the present application. Referring to Figure 5 , for the target node Node10, there are two path information: Node1—Node7—Node10, Node1—Node8—Node10. When the target node Node10 is the second type of target node, when there is a relay node Node8 corresponding to the target node Node10 in the set of relay nodes {Node8}, then calculate the relay node corresponding to the next second type of target node. Determine the set of relay nodes as {Node8} according to the current calculation rule.
[0050] Figure 6 is the fifth application scenario diagram of the data transmission method provided by the embodiment of the present application. Referring to Figure 6, for the target node Node10, there are two pieces of path information: Node1—Node7—Node10 and Node1—Node8—Node10. When the target node Node10 is a second-type target node, if there is no relay node corresponding to the second-type target node in the set of relay nodes, then at least two pieces of path information are compared (see Table 4), and the target path information is determined to be Node1—Node7—Node10. The corresponding relay node Node7 in the target path information is added to the set of relay nodes, and the set of relay nodes is {Node7}.
[0051] Table 4 Relay Nodes and Corresponding Path Information
[0052]
[0053] In Figure 3 , the set of relay nodes is {Node7, Node8}, in Figure 5 , the set of relay nodes is {Node8}, in Figure 7 , the set of relay nodes is {Node7}. After determining the relay node corresponding to each target node according to the path information, the first node updates the indication information according to the set of relay nodes, and encapsulates the updated indication information and the data content into a second data packet. Then, the first node broadcasts the second data packet to enable the relay nodes to forward the received data packet.
[0054] It should be understood that the nodes in the set of relay nodes will be used as relay nodes for data transmission to ensure that the second data packet can be successfully transmitted from the first node to the target node. After determining the relay node corresponding to each target node, the first node updates the indication information according to the set of relay nodes to obtain a second data packet. The first node can use a network broadcast mechanism (such as UDP broadcast, ICMP Echo request, etc.) to broadcast the encapsulated second data packet into the wireless ad hoc network.
[0055] In one implementation, determining the set of target nodes includes: obtaining the neighbor node information of the first node and the neighbor node information of the second node. The neighbor node information includes the information of the first-level neighbor nodes and the information of the second-level neighbor nodes. Traverse the second-level neighbor nodes of the first node to determine whether the i-th node among them meets the first preset condition. The first preset condition includes: the i-th node does not belong to the first-level neighbor nodes of the second node. If the i-th node meets the first preset condition, then the i-th node is determined as a target node and added to the set of target nodes.
[0056] In the above solution, by traversing the secondary neighbor nodes of the first node, it is determined whether the i-th node meets the first preset condition. This method can effectively screen out the nodes that are not within the range of the first-level neighbor nodes of the second node among the secondary neighbor nodes of the first node as target nodes, ensuring that the target nodes neither belong to the direct communication range of the second node (to avoid duplicate processing), nor are they the secondary neighbor nodes of the first node, while expanding the communication range and avoiding duplicate and invalid data transmission.
[0057] In one implementation, the path information from the first node to each target node is calculated, including: obtaining the neighbor node information of the first node. The neighbor node information includes the information of the first-level neighbor nodes and the information of the secondary neighbor nodes. Traverse the first-level neighbor nodes of the first node to determine whether the j-th node among them meets the second preset condition. The second preset condition includes: the first-level neighbor nodes of the j-th node include at least one target node. If the j-th node meets the second preset condition, the j-th node is determined as a relay node, and the communication among the first node, the j-th node, and a target node is determined as a path information.
[0058] In the embodiment of the present application, refer to Figure 3 , it is defined that the j-th node belongs to the first-level neighbor nodes of the first node. Among the first-level neighbor nodes of the first node, Node7 is the first-level neighbor node of the target node Node10, and Node8 is the first-level neighbor node of the target node Node9. Correspondingly, referring to Table 5, Node7 is determined as a relay node, and a path information Node1—Node7—Node10 is obtained. Node8 is determined as a relay node, and a path information Node1—Node8—Node9 is obtained.
[0059] Table 5 Relay Nodes and Corresponding Path Information
[0060]
[0061] Figure 4 is the third application scenario diagram of the data transmission method provided by the embodiment of the present application. Refer to Figure 4 , it is defined that the j-th node belongs to the first-level neighbor nodes of the first node. Among the first-level neighbor nodes of the first node, Node7 is the first-level neighbor node of the target node Node10, and Node8 is the first-level neighbor node of the target nodes Node9 and Node10. Correspondingly, referring to Table 6, Node7 is determined as a relay node, and a path information Node1—Node7—Node10 is obtained. Node8 is determined as a relay node, and two path information Node1—Node8—Node9 and Node1—Node8—Node10 are obtained.
[0062] Table 6 Relay Nodes and Corresponding Path Information
[0063]
[0064] In the embodiments of the present application, the first type of target nodes and the second type of target nodes are distinguished. The first type of target nodes has only one path information to receive the data packets of the first node. The second type of target nodes has at least two path information to receive the data packets of the first node. Hereinafter, in the case where the target node is the first type of target node, how to determine the relay node corresponding to each target node according to the path information will be specifically described.
[0065] In one implementation, determining the relay node corresponding to each target node according to the path information includes: traversing the path information from the first node to each target node, and determining the first type of target nodes in the path information. The first type of target nodes has only one path information to receive the data packets of the first node. Determine the relay node corresponding to each first type of target node, and add the relay node corresponding to each first type of target node to the set of relay nodes.
[0066] In the embodiments of the present application, a comprehensive network topology graph is constructed. The network topology graph includes the first node (source node) and all potential target nodes in the network. According to the adjacent relationship between the target node and the first-level neighbor nodes of the first node, all possible paths from the first node to each target node are calculated. In the present application, the main focus is on those directly reachable paths, that is, the target node can receive the data packets of the first node through a relay node.
[0067] To efficiently store and retrieve this path information, a path information database can be designed, where each record contains the source node, relay node, target node, and communication link quality. To support subsequent path information comparison and relay node selection, a unique identifier can be generated for each path information in the database.
[0068] After obtaining all the path information, query the path information database, filter out those target nodes corresponding to single path information records, and identify those target nodes that receive the data packets of the first node only through one path information, that is, the first type of target nodes. For each target node identified as the first type of target node, a dedicated path record can be established, which contains the unique path information to reach the target node. This record will be used in the subsequent relay node selection step.
[0069] To determine the relay node corresponding to each first - type target node, it is necessary to select a suitable relay node for each first - type target node. According to the weighted sum of multiple metrics such as the received signal strength and bit error rate of the relay node, calculate the communication link quality of each path information. For each first - type target node, select the path with the highest communication link quality as the optimal path.
[0070] Relay nodes are responsible for forwarding data packets from the first node to the target node. To support flexible relay node selection, a relay node selection algorithm can be used. According to the weighted sum of multiple metrics such as the received signal strength and bit error rate of the relay node, calculate the communication link quality of each path information and select an optimal relay node. After determining the relay nodes corresponding to each first - type target node, these relay nodes can be added to the set of relay nodes for subsequent data packet forwarding and routing decisions.
[0071] To ensure the efficient management and update of the set of relay nodes, a dynamic relay node management mechanism can be used. This mechanism can periodically evaluate the performance of relay nodes and replace or optimize relay nodes according to the evaluation results. In addition, to support efficient relay node lookup and update operations, an efficient index structure or database can be applied to the set of relay nodes.
[0072] In the above - mentioned solution, by traversing the path information, determine the first - type target nodes that have only one path information receiving data packets from the first node. For the first - type target nodes, this method can accurately find the corresponding relay nodes and add them to the set of relay nodes. Ensure that data packets can be forwarded to the target node along the uniquely determined path information, improving the accuracy and reliability of communication. For the second - type target nodes, there are sufficient redundant paths during the transmission process, improving the reliability and fault - tolerance of data transmission. By distinguishing between the first - type target nodes and the second - type target nodes (with multiple path information), this method can optimize the relay node selection strategy and improve the efficiency and performance of the entire communication network.
[0073] In one implementation, the data transmission method provided by the embodiments of the present application further includes the following steps: Traverse the path information from the first node to each target node and determine the second - type target nodes in the path information. The second - type target nodes have at least two path information receiving data packets from the first node. Determine the relay nodes corresponding to each second - type target node. If there is a relay node corresponding to a second - type target node in the set of relay nodes, do not process the relay node corresponding to the second - type target node.
[0074] In the embodiments of the present application, in order to determine the relay node corresponding to each second - type target node, based on various factors such as communication quality, remaining node power, node processing capacity, and relative positions between nodes, etc., the communication link quality of each path information can be calculated. The communication link quality can be the weighted sum of multiple metrics such as path length, signal strength, bit error rate, bandwidth, etc. For each second - type target node, select the path information with the highest communication link quality as the optimal path, and use the last node (except the target node) on the optimal path as the potential relay node of the target node.
[0075] Obtain the node identifier of the current second - type target node, traverse the set of relay nodes, and check whether there is a relay node corresponding to the current second - type target node in the set of relay nodes. The set of relay nodes contains all the already determined relay nodes and their corresponding target node information. Query the set of relay nodes and locate the possible relay nodes according to the identifier information or path information of the target node. If there is already a relay node corresponding to the second - type target node in the set of relay nodes, then no repeated processing or selection is performed on the relay node of this target node. That is, skip the subsequent relay node selection steps and directly proceed to the next operation.
[0076] In the above - mentioned solution, by traversing the path information, determine the second - type target nodes that have at least two path information receiving the data packets of the first node. For the second - type target nodes, check whether there is already a corresponding relay node in the set of relay nodes. If there is already a corresponding relay node in the set of relay nodes, then no additional processing is performed. This method avoids unnecessary repeated selection and redundant calculation, reduces the waste of network resources, and improves the communication efficiency.
[0077] The following specifically describes how to determine the target path information among multiple path information.
[0078] In one implementation manner, the data transmission method provided by the embodiments of the present application further includes the following steps: traverse the path information from the first node to each target node, and determine the second - type target nodes in the path information. The second - type target nodes have at least two path information receiving the data packets of the first node. Determine the relay node corresponding to each second - type target node. If there is no relay node corresponding to the second - type target node in the set of relay nodes, then compare at least two path information to determine the target path information. Add the relay node corresponding to the target path information to the set of relay nodes.
[0079] In the embodiments of the present application, for a certain second type of target node, if there is no corresponding relay node in the set of relay nodes, it is necessary to compare all the path information of the target node to determine the target path information. Each path information is evaluated in detail, including communication quality, node reliability, path diversity (i.e., the number of shared nodes with other path information), etc. According to these evaluation results, a weight is assigned to each evaluation index, and the communication link quality of each path information is calculated. The path information with the highest communication link quality is selected as the target path information. The relay node corresponding to the target path information is added to the set of relay nodes.
[0080] In the above solution, considering the case where there is no corresponding relay node for the second type of target node in the set of relay nodes, for this case, the method selects the optimal or sub-optimal path information as the target path information by comparing at least two path information of the second type of target node, and adds the relay node corresponding to the target path information to the set of relay nodes. This method can ensure that the second type of target node can receive the data packet of the first node through the optimal path, improving the accuracy and reliability of communication. By comparing the advantages and disadvantages of different path information, this method can dynamically adjust the communication path to adapt to the changes in the network environment. Dynamically adjust the set of relay nodes according to the changes in the network to adapt to different data transmission requirements and network environments, enhancing the flexibility and adaptability of the communication network.
[0081] The data transmission method provided by the embodiments of the present application includes the following steps:
[0082] Obtain the neighbor node information of the first node and the neighbor node information of the second node. The neighbor node information includes the information of the first-level neighbor nodes and the information of the second-level neighbor nodes. Traverse the second-level neighbor nodes of the first node to determine whether the i-th node among them meets the first preset condition. The first preset condition includes: the i-th node does not belong to the first-level neighbor nodes of the second node. If the i-th node meets the first preset condition, the i-th node is determined as a target node, and the i-th node is added to the set of target nodes.
[0083] Obtain the neighbor node information of the first node. The neighbor node information includes the information of the first-level neighbor nodes and the information of the second-level neighbor nodes. Traverse the first-level neighbor nodes of the first node to determine whether the j-th node among them meets the second preset condition. The second preset condition includes: the first-level neighbor nodes of the j-th node include at least one target node. If the j-th node meets the second preset condition, the j-th node is determined as a relay node, and the communication among the first node, the j-th node, and a target node is determined as a path information.
[0084] Traverse the path information from the first node to each target node, and determine the first type of target nodes in the path information. There is only one path information for the first type of target nodes to receive the data packet from the first node. Determine the relay node corresponding to each first type of target node, and add the relay node corresponding to each first type of target node to the set of relay nodes.
[0085] Traverse the path information from the first node to each target node, and determine the second type of target nodes in the path information. There are at least two path information for the second type of target nodes to receive the data packet from the first node. Determine the relay node corresponding to each second type of target node. If there is a relay node corresponding to the second type of target node in the set of relay nodes, do not process the relay node corresponding to the second type of target node.
[0086] Traverse the path information from the first node to each target node, and determine the second type of target nodes in the path information. There are at least two path information for the second type of target nodes to receive the data packet from the first node. Determine the relay node corresponding to each second type of target node. If there is no relay node corresponding to the second type of target node in the set of relay nodes, compare at least two path information to determine the target path information. Add the relay node corresponding to the target path information to the set of relay nodes.
[0087] Figure 8 It is a schematic structural diagram of the data transmission device provided by the embodiment of the present application. Refer to Figure 8 , the data transmission device 800 provided by the embodiment of the present application includes:
[0088] The obtaining module 801 is used to receive the first data packet from the second node. The first data packet includes data content and indication information. The indication information is used to indicate the identification information of the relay node.
[0089] The processing module 802 is used to determine the set of target nodes when the indication information indicates that the first node is a relay node. The target nodes belong to the secondary neighbor nodes of the first node and do not belong to the primary neighbor nodes of the second node.
[0090] The response module 803 is used to determine the path information from the first node to each target node, determine the relay node corresponding to each target node according to the path information. Update the indication information according to the relay node corresponding to each target node to obtain a second data packet, and broadcast the second data packet.
[0091] The embodiment of the present application provides a wireless communication terminal. The wireless communication terminal includes a memory and a processor. The processor is used to execute a computer program, and the computer program is used to implement the data transmission method in any one of the above.
[0092] The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments, and the similarities or resemblances among them can be referred to each other. The features disclosed in the product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0093] The product embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined, or can be integrated into another, or some features can be ignored, or not executed. In addition, the couplings, direct couplings, and communication connections between the various components shown or discussed can be through some interfaces. The indirect couplings or communication connections of the units can be electrical or mechanical forms.
[0094] This specification uses the phrase "in an embodiment", which may refer to one or more of the same or different embodiments. Terms such as "including", "comprising", "having", etc. used in the embodiments regarding the content of this application are synonymous. Ordinal adjectives "first", "second", and "third" only indicate different instances of referring to similar objects, and are not intended to imply that the objects so described must be in a given sequence in terms of time, space, sorting, or any other way.
[0095] The above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A data transmission method, characterized in that, The method is applied to a first node, and the method includes: Receiving a first data packet from a second node; the first data packet includes data content and indication information for indicating identification information of a relay node; When the indication information indicates that the first node is a relay node, determining a set of target nodes; the target nodes belong to the second-level neighbor nodes of the first node and do not belong to the first-level neighbor nodes of the second node; Determining path information from the first node to each of the target nodes, determining a relay node corresponding to each of the target nodes according to the path information; updating the indication information according to the relay node corresponding to each of the target nodes to obtain a second data packet, and broadcasting the second data packet; Wherein, determining a relay node corresponding to each of the target nodes according to the path information includes: Traversing the path information from the first node to each target node, and determining a first type of target nodes in the path information; there is only one path information for the first type of target nodes to receive data packets from the first node; Determining a relay node corresponding to each first type of target node, and adding the relay node corresponding to each first type of target node to the set of relay nodes; Traversing the path information from the first node to each target node, and determining a second type of target nodes in the path information; there are at least two path informations for the second type of target nodes to receive data packets from the first node; Determining a relay node corresponding to each second type of target node; if there is a relay node corresponding to the second type of target node in the set of relay nodes, no processing is performed on the relay node corresponding to the second type of target node.
2. The method according to claim 1, wherein The determining the set of target nodes includes: Obtaining neighbor node information of the first node and neighbor node information of the second node; the neighbor node information includes information of first-level neighbor nodes and information of second-level neighbor nodes; Traversing the second-level neighbor nodes of the first node, and determining whether the i-th node among them meets a first preset condition; the first preset condition includes: the i-th node does not belong to the first-level neighbor nodes of the second node; If the i-th node meets the first preset condition, determining the i-th node as a target node and adding the i-th node to the set of target nodes.
3. The method according to claim 1, wherein The determining the path information from the first node to each of the target nodes includes: Obtaining neighbor node information of the first node; the neighbor node information includes information of first-level neighbor nodes and information of second-level neighbor nodes; Traversing the first-level neighbor nodes of the first node, and determining whether the j-th node among them meets a second preset condition; the second preset condition includes: the first-level neighbor nodes of the j-th node include at least one of the target nodes; If the j-th node meets the second preset condition, determining the j-th node as a relay node and determining the communication among the first node, the j-th node, and a target node as a path information.
4. The method according to claim 1, wherein The method further includes: Traverse the path information from the first node to each target node, and determine the second type of target nodes in the path information; there are at least two path information for the second type of target nodes to receive the data packets of the first node. Determine the relay node corresponding to each second type of target node; if the relay node corresponding to the second type of target node does not exist in the set of relay nodes, then compare the at least two path information to determine the target path information. Add the relay node corresponding to the target path information to the set of relay nodes.
5. A data transmission device, characterized in that, It includes: An acquisition module, configured to receive the first data packet of the second node. The first data packet includes data content and indication information, and the indication information is used to indicate the identification information of the relay node. A processing module, configured to determine the set of target nodes when the indication information indicates that the first node is a relay node. The target node belongs to the second-level neighbor nodes of the first node and does not belong to the first-level neighbor nodes of the second node. A response module, configured to determine the path information from the first node to each target node, and determine the relay node corresponding to each target node according to the path information. Update the indication information according to the relay node corresponding to each target node to obtain a second data packet, and broadcast the second data packet. Wherein, determining the relay node corresponding to each target node according to the path information includes: Traverse the path information from the first node to each target node, and determine the first type of target nodes in the path information; there is only one path information for the first type of target nodes to receive the data packets of the first node. Determine the relay node corresponding to each first type of target node, and add the relay node corresponding to each first type of target node to the set of relay nodes. Traverse the path information from the first node to each target node, and determine the second type of target nodes in the path information; there are at least two path information for the second type of target nodes to receive the data packets of the first node. Determine the relay node corresponding to each second type of target node; if there is a relay node corresponding to the second type of target node in the set of relay nodes, then do not process the relay node corresponding to the second type of target node.
6. An electronic device for implementing a data transmission method, characterized in that, The electronic device includes a memory and a processor; wherein, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method according to any one of claims 1-4.
7. A wireless communication terminal, characterized in that, The wireless communication terminal includes a memory and a processor; wherein, the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the method according to any one of claims 1-4.
Citation Information
Patent Citations
Voice data transmission method and device, electronic equipment and storage medium
CN117425131A