A data packet sending method, electronic device and computer storage medium
By judging the estimated number of receptions of neighbor nodes in the Mesh network, we decide whether to forward data packets, which solves the problem of network resource waste caused by flooding, and improves transmission efficiency and bandwidth utilization.
Patent Information
- Application Number
- CN202411419532.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-10-12
AI Technical Summary
Flooded broadcasting in Mesh networks leads to waste of network resources, low transmission efficiency, reduced bandwidth and even crashes.
After the target node receives the data packet, it obtains the estimated number of times it receives from its neighbor node, and determines whether it is greater than or equal to the set number of times it receives. If so, the data packet will be discarded, otherwise it will be forwarded.
Reduces flooding on the network, realizes on-demand forwarding, improves network transmission efficiency, and reduces bandwidth usage.
Smart Images

Figure CN118921316B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of networking technology, and in particular to a data packet sending method, an electronic device and a computer storage medium. Background Art
[0002] Mesh network is a network technology that automatically interconnects network devices. Each device in the Mesh network can forward data from other devices to solve the problem that two devices that need to communicate with each other cannot communicate directly due to certain restrictions. Mesh network can use flooding or routing to forward messages. Using routing can ensure the rational use of network resources, and most protocols are based on this method.
[0003] The Mesh standard uses a Mesh network technology based on a flooding algorithm to achieve information transmission. The flooding algorithm is a relatively basic Mesh network technology. The protocol nodes do not need to maintain the network topology and related routing status information. The control overhead is small, the mode is simple, and it is easy to implement. Among them, the data packets at the network layer are sent and forwarded in the form of broadcast.
[0004] However, flooding broadcasts will cause the network to be filled with a large amount of repeated data, occupying network resources, resulting in low transmission efficiency of the Mesh network, reduced bandwidth, or even collapse. Summary of the invention
[0005] The present application provides a data packet sending method, an electronic device and a computer storage medium.
[0006] In order to solve the above technical problems, the present application proposes a data packet sending method, which includes: in response to a target node receiving a data packet, obtaining the estimated reception times of the neighboring nodes of the target node; judging whether the estimated reception times of all the neighboring nodes are greater than or equal to the estimated reception target times set for the data packet; if not, forwarding the data packet to all the neighboring nodes; if so, discarding the data packet.
[0007] Among them, in response to the target node receiving a data packet, obtaining the estimated reception times of the neighbor nodes of the target node includes: in response to the target node receiving a data packet from one of the neighbor nodes, obtaining the common neighbor nodes of the target node and one of the neighbor nodes; accumulating a first preset value to the count of the estimated reception times of the common neighbor nodes; accumulating a second preset value to the count of the estimated reception times of one of the neighbor nodes; and obtaining the estimated reception times of all neighbor nodes after accumulation.
[0008] Among them, in response to the target node receiving a data packet, obtaining the estimated reception times of the neighbor nodes of the target node includes: in response to the target node receiving a data packet from one of the neighbor nodes, determining whether the target node and one of the neighbor nodes have a common neighbor node; if not, accumulating the count of the estimated reception times of one of the neighbor nodes by a second preset value, wherein the second preset value is greater than the first preset value, and the second preset value is greater than or equal to the estimated target reception times; obtaining the accumulated estimated reception times of all neighbor nodes.
[0009] Among them, in response to the target node receiving the data packet, the estimated reception times of the neighbor nodes of the target node are obtained, including: in response to the target node receiving the data packet for the first time, obtaining the first common neighbor node of the target node and the first neighbor node that sends the data packet; accumulating the counts of the estimated reception times of the first neighbor node and the first common neighbor node to obtain a first preset value; determining the target time period based on the forwarding time slot and the time point of the first reception of the data packet; continuing to receive the data packets sent by other neighbor nodes in the target time period, and obtaining the second common neighbor node of the target node and the second neighbor node that sends the data packet each time; accumulating the counts of the estimated reception times of the second neighbor node and the second common neighbor node to a first preset value; and obtaining the estimated reception times of all neighbor nodes after accumulation.
[0010] Wherein, the data packet sending method further includes: after the target time period ends, not receiving the data packet.
[0011] The data packet sending method further includes: receiving a neighbor notification message from the neighbor node; and storing the node address of the neighbor node and the neighbor node of the neighbor node in the neighbor notification message.
[0012] The data packet sending method further includes: sending a neighbor notification message, wherein the neighbor notification message includes the number and node addresses of all neighbor nodes.
[0013] The sending of the neighbor notification message includes: obtaining the network topology stability of the networking network; determining the message sending frequency based on the network topology stability; and sending the neighbor notification message according to the message sending frequency.
[0014] In order to solve the above technical problems, the present application proposes an electronic device, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above data packet sending method.
[0015] In order to solve the above technical problems, the present application proposes a computer storage medium, wherein the computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the above data packet sending method.
[0016] Different from the prior art, the beneficial effect of the present application is that: in response to receiving a data packet, the electronic device obtains the estimated reception times of the neighboring node; determines whether the estimated reception times of all the neighboring nodes are greater than or equal to the estimated reception target times set for the data packet; if not, forwards the data packet to all the neighboring nodes; if so, discards the data packet. In the above manner, according to the estimated reception times of the neighboring node, it is determined whether the neighboring node has the need to receive the data packet, so as to achieve the goal of forwarding according to the needs of the neighbors, rather than blindly forwarding, thereby reducing flooding on the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 It is a flowchart of a first embodiment of a method for sending a data packet provided by the present application;
[0019] Figure 2 It is a flowchart of the speculation acceptance algorithm provided by this application;
[0020] Figure 3 It is a flowchart of a second embodiment of the method for sending a data packet provided by the present application;
[0021] Figure 4 It is a flowchart of a third embodiment of the method for sending a data packet proposed in the present application;
[0022] Figure 5 is a schematic diagram of a neighbor management system provided by this application;
[0023] Figure 6 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0024] Figure 7 It is a structural diagram of an embodiment of a computer storage medium provided by the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0026] The data packet sending method of the present application is applied to an electronic device, wherein the electronic device of the present application can be a server, or a system composed of a server and a local terminal. Accordingly, the various parts of the electronic device, such as various units, subunits, modules, and submodules, can all be set in the server, or can be set in the server and the local terminal respectively.
[0027] Furthermore, the above-mentioned server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules, such as software or software modules used to provide distributed servers, or it can be implemented as a single software or software module, which is not specifically limited here. In some possible implementations, the data packet sending method of the embodiment of the present application can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0028] See also Figure 1-Figure 2 , Figure 1 is a flowchart of a first embodiment of a method for sending a data packet provided by the present application, Figure 2 It is a flowchart of the speculation acceptance algorithm provided by this application.
[0029] like Figure 1 As shown, the specific steps are as follows:
[0030] Step S11: in response to the target node receiving the data packet, obtaining the estimated reception times of the neighboring nodes of the target node.
[0031] Specifically, after the electronic device receives the data packet at the target node, it obtains the recommended reception times of the neighboring nodes of the target node. The method for calculating the recommended reception times proposed in the embodiment of the present application is described in detail in the following specific embodiments.
[0032] The data packet sending method of the present application is applied to a Mesh network, which is a network technology that automatically interconnects network devices. Each device in the Mesh network can forward data from other devices.
[0033] Among them, a neighbor node refers to a node in a Mesh network. If a node can directly receive data packets sent by other nodes without being forwarded by other nodes, the node that sends the data packet is called a neighbor of the node.
[0034] For example, in a Mesh network, if the data packet sent by node N1 can be directly received by node N2 without being forwarded by other nodes, then node N1 can be considered as a neighbor of N2. If the packet sent by N2 can also be directly received by node N1, then node N2 can be considered as a neighbor of node N1.
[0035] It should be noted that the data transmission relationship between neighbor nodes can be bidirectional or unidirectional.
[0036] Among them, inferred reception means that in a Mesh network, if a node receives a data packet, it can be inferred that every neighbor node of the sender of the data packet has also received the data packet.
[0037] The inferred reception count refers to the number of times a neighbor node inferred by a node has received the same data packet. For example, for data packet P1, node N2 is a neighbor of node N1. Nodes N3, N4, and N5 are common neighbors of nodes N1 and N2, and node N6 is only a neighbor of node N1, not a neighbor of node N2. If nodes N3, N4, and N5 all forward the data packet, then for node N1, the inferred reception count of the node is 3, and node N6 also forwards the data packet, but the reception count of node N2 recorded by node N1 is still 3.
[0038] Step S12: Determine whether the estimated reception times of all neighboring nodes are greater than or equal to the estimated reception target times set for the data packet.
[0039] Specifically, the electronic device obtains the estimated reception times of all neighboring nodes of a target node in the Mesh network, and determines whether the estimated reception times of all neighboring nodes are greater than a preset estimated reception target time. If so, step S14 is executed, and if not, step S13 is executed.
[0040] The estimated reception target number refers to the estimated reception number threshold set for the same data packet in the Mesh network definition.
[0041] In a specific embodiment of the present application, for Mesh networks, for different Mesh networks, different parameters can be set for estimating the target number of receptions to adapt to different Mesh networks, and customized designs can be performed according to different network topologies, network functions, reliability requirements, etc., and no specific limitations are made here.
[0042] In the embodiment of the present application, the estimated receiving target number can be determined according to the reliability, stability, response delay and other requirements of the network. For a high reliability network, a larger estimated receiving target number can be set; for a network with low reliability requirements but requiring to reduce network flooding, a smaller estimated receiving target number can be set. In this way, a trade-off between flooding control and reliability in the Mesh network can be made freely.
[0043] For example, there is a data packet P1 and a node N1. Node N1 has 10 neighbors. When forwarding data packet P1, node N1 will count the number of times all 10 neighbors have speculated that P1 has been received. If the number of times the 10 neighbor nodes have speculated that P1 has been received is greater than or equal to 3, then the data packet P1 will not be forwarded. Otherwise, the data packet will be forwarded.
[0044] Step S13: forwarding the data packet to all neighboring nodes.
[0045] Specifically, if the estimated reception times of one or more neighbor nodes among all neighbor nodes of the target node are less than the estimated reception target times, the target node forwards the data packet P1 to all neighbor nodes. When the estimated reception times of not all neighbor nodes are greater than the estimated reception target times, it means that a neighbor node has not received the data packet, and the electronic device forwards the data packet to all neighbor nodes.
[0046] Step S14: discard the data packet.
[0047] Specifically, if it is time for the target node to forward a data packet P1, and the estimated reception times of all neighbors of the target node are greater than or equal to the estimated reception target times, the target node will not forward the data packet P1. When the estimated reception times of all neighbor nodes are greater than the estimated reception target times, there is no need to forward the data packet to the neighbor nodes, thus achieving the goal of forwarding according to the needs of neighbors instead of blindly forwarding. This greatly reduces flooding on the network.
[0048] The present application utilizes the information of the number of times a node receives a data packet, and also utilizes the neighbor information and the neighbor's neighbor information, and adds this information into the decision-making of the forwarding algorithm.
[0049] This application proposes an embodiment for obtaining the recommended reception times of neighbor nodes. For details, please refer to Figure 3 , Figure 3 It is a flowchart of the second embodiment of the method for sending a data packet provided in the present application.
[0050] like Figure 3 As shown, the specific steps are as follows:
[0051] Step S21: in response to the target node receiving a data packet from one of the neighbor nodes, obtaining common neighbor nodes of the target node and one of the neighbor nodes.
[0052] Specifically, after the target node receives a data packet for the first time, the electronic device needs to calculate the estimated reception times of each neighbor node of the target node, and the electronic device searches for the neighbor nodes of the target node to obtain the common neighbor nodes with the neighbor nodes.
[0053] For example, for data packet P1, node N2 is a neighbor of node N1. Nodes N3, N4, and N5 are common neighbors of nodes N1 and N2, and node N6 is only a neighbor of node N1, not a neighbor of node N2. If nodes N3, N4, and N5 all forward the data packet, then for node N1, the estimated number of receptions of the node is 3, and node N6 also forwards the data packet, but the number of receptions of node N2 recorded by node N1 is still 3.
[0054] Step S22: Accumulate a first preset value to count the number of inferred reception times of the common neighboring nodes.
[0055] In the embodiment of the present application, the first preset value can be any number. The first preset value represents a count used to characterize the accumulated inferred reception times. In the specific embodiment of the present application, the first preset value takes 1 as an example.
[0056] After the destination node receives the data packet P1, the destination node calculates the estimated reception times of each of its neighbors.
[0057] Whenever the target node receives a packet P1 from a neighbor node, the node that searches for the neighbor node makes an intersection with the neighbor nodes of the target node itself, and all nodes in the intersection are common neighbor nodes. For common neighbor nodes, the number of inferred receptions of packet P1 increases by 1.
[0058] For the sender of data packet P1, its estimated reception times are increased by the “estimated reception target times”, indicating that the sending node has definitely received data packet P1.
[0059] Step S23: Accumulate a second preset value to the count of the estimated reception times of one of the neighboring nodes.
[0060] Among them, one of the neighbor nodes is a node that is adjacent to the target node but not adjacent to the neighbor node of the target node.
[0061] Further, in an embodiment of the present application, in response to the target node receiving a data packet from one of the neighboring nodes, the electronic device determines whether it has a common neighboring node with one of the neighboring nodes; if not, the count of the estimated reception times of one of the neighboring nodes is accumulated by a second preset value. In an embodiment of the present application, the second preset value is greater than the first preset value, and the second preset value is greater than or equal to the estimated reception target number; and the accumulated estimated reception times of all neighboring nodes are obtained.
[0062] Step S24: Obtain the accumulated estimated reception times of all neighboring nodes.
[0063] Through the above method, including notifying the dynamically acquired neighbor information and the neighbor's neighbor information, the sender can use this information to infer that the sender's neighbor has also received the data packet, so as to confirm whether it needs to forward the data packet for the neighbor, thereby reducing the flooding of data packets on the Mesh network.
[0064] This application proposes a specific embodiment for obtaining the estimated reception target number of times, which is as follows:
[0065] In this embodiment, for node N1, the neighbor nodes are node N2, node N3, node N4, and node N5; for neighbor node N2, the neighbor nodes of node N2 are node N1, node N3, and node N4; for neighbor node N3, the neighbor nodes of node N3 are node N1 and node N2; for neighbor node N4, the neighbor nodes of node N4 are node N1, node N6, and node N7; for neighbor node N5, the neighbor nodes of node N5 are node N1 and node N4.
[0066] When node N1 receives a data packet P1 sent by node N2 for the first time, the estimated reception data of all neighbors recorded by node N1 is 0. Since node N2 and node N1 have common neighbors N3 and N4, and node N2 is the sender, the estimated reception table of the data packet at this time is:
[0067] Table 1 Schematic table of an embodiment of a guess receiving table 1
[0068]
[0069] Furthermore, node N1 receives the data packet P1 sent by node N4. Since node N4 and itself have no common neighbor, it is inferred that the received data table is updated as shown in Table 2:
[0070] Among them, the estimated reception number of N4 is the original estimated reception number superimposed on the second preset value that is greater than or equal to the estimated reception target number. In this embodiment, the second preset value equal to the estimated reception target number 2 is taken as an example.
[0071] Table 2 Schematic diagram of another embodiment of the inferred receiving table
[0072]
[0073] Furthermore, node N1 receives a packet sent by node N5. Since the common neighbor of node N5 and node N1 is node N4, the inferred received data table is updated as shown in Table 3:
[0074] Table 3 Schematic diagram of another embodiment of the inferred receiving table
[0075]
[0076] Assume that the time slot of the data packet P1 has arrived at this time. Node N1 counts the reception status of all its neighboring nodes N2, N3, N4, and N5 for the data packet P1, which are as shown in the above data table: 2 times, 1 time, 4 times, and 2 times. Among them, node N3 only received it once, which did not reach the value set in the "estimated reception target number of times", so node N1 forwarded the data packet P1 to all neighboring nodes.
[0077] The present application also proposes an embodiment for obtaining the estimated reception times according to the forwarding time slot and the time of receiving the data packet. Figure 4 , Figure 4 It is a flowchart of the third embodiment of the data packet sending method proposed in this application.
[0078] like Figure 4 As shown, the specific steps are as follows:
[0079] Step S31: in response to the target node receiving a data packet for the first time, obtaining a first common neighbor node between the target node and a first neighbor node that sends the data packet.
[0080] The first neighbor node is a neighbor node of the target node, and the first common neighbor node is a common node of the target node and the first neighbor node.
[0081] Step S32: Accumulate a first preset value to count the estimated reception times of the first neighbor node and the first common neighbor node.
[0082] The count of the number of inferred reception times of the first neighbor node and the first common neighbor node is increased by 1.
[0083] Step S33: Determine the target time period based on the forwarding time slot and the time point of first receiving the data packet.
[0084] The forwarding time slot refers to the time point when a node in a Mesh network plans to forward a data packet when it receives it for the first time. After the forwarding time slot arrives, the node can decide whether to actually forward the data packet based on the time slot calculation algorithm. For example, for data packet P1, when node N1 receives the data packet for the first time, it calculates that the forwarding time slot is 100ms. Then node N1 will determine whether to send the data packet P1 after 100ms. Whether to send is determined by other algorithms.
[0085] In the embodiment of the present application, after the target time period ends, no data packet is received.
[0086] Step S34: Continue to receive data packets sent by other neighboring nodes in the target time period, and obtain the second common neighbor node between the target node and the second neighbor node that sends a data packet each time.
[0087] When the forwarding time slot arrives, the node counts the estimated reception times of each neighbor of the packet to see if they all reach the value of the "estimated reception target times". If any neighbor does not reach the "estimated reception target times", the data packet is forwarded. If the estimated reception times of all neighbors are not less than the "estimated reception target times" of the Mesh network, the data packet is not forwarded and is directly discarded.
[0088] Step S35: Accumulate a first preset value to count the estimated reception times of the second neighbor node and the second common neighbor node.
[0089] The count of the number of inferred reception times of the second neighbor node and the second common neighbor node is increased by 1.
[0090] Step S36: Obtain the accumulated estimated reception times of all neighboring nodes.
[0091] In an embodiment of the present application, for each data packet received for the first time, the node will save the data packet and generate a forwarding time slot. When the time reaches the time slot, the node will decide whether to forward the data packet based on the calculation method of the estimated number of reception times in the embodiment of the present application.
[0092] Furthermore, in a completed Mesh network, each node will send neighbor node notification messages according to the neighbor node notification policy. Figure 5 , Figure 5 Schematic diagram of the neighbor management system provided by the present application. After receiving the neighbor notification message, the target node records the information of the target node, including the address of the target node and the neighbor information of the node, and saves the information. In one embodiment of the application, the following steps are also included:
[0093] The electronic device receives a neighbor notification message from a neighbor node; and stores the node address of the neighbor node and the neighbor node of the neighbor node in the neighbor notification message.
[0094] The data packet sending method further includes: sending a neighbor notification message, wherein the neighbor notification message includes the number and node addresses of all neighbor nodes.
[0095] Specifically, neighbor management is divided into the neighbor publishing process of the node itself and the process of processing neighbor information of other nodes. The TTL of the neighbor notification message is 1. Only nodes within the communication range of a certain node can receive the neighbor notification message. The nodes that receive the neighbor notification message are all neighbors of the sender, and the message does not need to be replied.
[0096] After receiving the neighbor notification message sent by node N2, node N1 puts the address of node N2 into its own neighbor list and saves the data in the message for subsequent speculative reception.
[0097] The neighbor notification message sent by the node N2 includes the neighbor node data of the node N2.
[0098] The content of the neighbor notification message sent by the node is the address of the received neighbor notification message saved above.
[0099] For example, node N1 receives neighbor notification messages from N2, N3, and N4. The content of the neighbor notification message sent by N1 is shown in Table 4:
[0100] Table 4 Message content diagram
[0101]
[0102] In the embodiment of the present application, because sending a neighbor notification message will occupy a certain bandwidth, the node can use different algorithms to send its own neighbor notification message as needed.
[0103] In an embodiment of the present application, the electronic device obtains the network topology stability of the networking network; determines the message sending frequency based on the network topology stability; and sends a neighbor notification message according to the message sending frequency.
[0104] Specifically, for systems with relatively stable network topology, the relative positions of nodes do not change. In the early stage of networking, the message can be sent intensively. After all devices are connected to the network and the topology is fixed, the message can be reduced or stopped. Until the network topology changes. For systems with frequently changing network topology, the relative positions of nodes change, and devices often go online or offline, it is necessary to increase the frequency of sending neighbor notification messages to obtain more accurate neighbor information in real time.
[0105] If the network topology is uncertain, the frequency of sending neighbor notification messages can be increased or decreased according to the network topology detection algorithm and the result of the topology detection. The network topology detection algorithm can be any one and this application does not make any specific limitation.
[0106] In order to implement the data packet sending method of the above embodiment, the present application also provides an electronic device, which is specifically referred to as Figure 6 , Figure 6 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0107] like Figure 6 As shown, the electronic device 600 of this embodiment includes a processor 61 , a memory 62 , an input / output device 63 , and a bus 64 .
[0108] The processor 61 , the memory 62 , and the input / output device 63 are respectively connected to the bus 64 . The memory 62 stores a computer program. The processor 61 is used to execute the computer program to implement the data packet sending method of the above embodiment.
[0109] In this embodiment, the processor 61 may also be referred to as a CPU (Central Processing Unit). The processor 61 may be an integrated circuit chip with signal processing capabilities. The processor 61 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The processor 61 may also be a GPU (Graphics Processing Unit), also known as a display core, a visual processor, or a display chip, which is a microprocessor that is specifically used for image computing on computers, workstations, game consoles, and some mobile devices (such as tablet computers, smart phones, etc.). The purpose of the GPU is to convert and drive the display information required by the computer system, and to provide a line scan signal to the display to control the correct display of the display. It is an important component that connects the display and the computer motherboard. As an important component of the computer host, the graphics card is responsible for outputting display graphics. The general-purpose processor may be a microprocessor or the processor 61 may also be any conventional processor, etc.
[0110] The present application also provides a computer storage medium, such as Figure 7 As shown, the computer storage medium 700 is used to store a computer program 71. When the computer program 71 is executed by a processor, it is used to implement the data packet sending method of the present application.
[0111] The methods involved in the embodiments of the present application, when implemented in the form of software functional units and sold or used as independent products, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc., which can store program code.
[0112] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for sending data packets based on a networking network, characterized in that: The data packet sending method comprises: In response to a target node receiving a data packet, obtaining a presumed reception count of a neighboring node of the target node; Determine whether the estimated reception times of all the neighboring nodes are greater than or equal to the estimated reception target times set for the data packet; If not, forward the data packet to all the neighboring nodes; If yes, discard the data packet; In response to the target node receiving the data packet, obtaining the estimated reception times of the neighbor nodes of the target node includes: In response to the target node receiving a data packet from one of the neighbor nodes, obtaining a common neighbor node between the target node and one of the neighbor nodes; Accumulating a first preset value for the count of the number of inferred reception times of the common neighbor node; Accumulating a second preset value for the count of the estimated reception times of one of the neighboring nodes; Wherein, the second preset value is greater than or equal to the estimated reception target number of times; Get the estimated reception times of all neighbor nodes after accumulation.
2. The method for sending a data packet according to claim 1, characterized in that: In response to the target node receiving the data packet, obtaining the estimated reception times of the neighbor nodes of the target node includes: In response to the target node receiving a data packet from one of the neighbor nodes, determining whether the target node and one of the neighbor nodes have a common neighbor node; If not, adding a second preset value to the count of the estimated reception times of one of the neighboring nodes, wherein the second preset value is greater than the first preset value; Get the estimated reception times of all neighbor nodes after accumulation.
3. The method for sending a data packet according to claim 1, characterized in that: In response to the target node receiving the data packet, obtaining the estimated reception times of the neighbor nodes of the target node includes: In response to the target node receiving the data packet for the first time, acquiring a first common neighbor node between the target node and a first neighbor node that sends the data packet; Accumulating a first preset value for the count of the estimated reception times of the first neighbor node and the first common neighbor node; Determine the target time period based on the forwarding time slot and the time point of first receiving the data packet; Continue to receive the data packets sent by other neighboring nodes in the target time period, and obtain a second common neighbor node between the target node and the second neighbor node that sends the data packet each time; Accumulating a first preset value for the count of the estimated reception times of the second neighbor node and the second common neighbor node; Get the estimated reception times of all neighbor nodes after accumulation.
4. The method for sending a data packet according to claim 3, characterized in that: The data packet sending method further includes: After the target time period ends, the data packet is not received.
5. The method for sending a data packet according to claim 1, characterized in that: The data packet sending method further includes: Receiving a neighbor notification message from the neighbor node; The node address of the neighbor node and the neighbor node of the neighbor node in the neighbor notification message are stored.
6. The method for sending a data packet according to claim 1, characterized in that: The data packet sending method further includes: A neighbor notification message is sent, wherein the neighbor notification message includes the number and node addresses of all neighbor nodes.
7. The method for sending a data packet according to claim 6, characterized in that: The sending of the neighbor notification message includes: Obtain the network topology stability of the networking network; Based on the network topology stability, determining a message sending frequency; The neighbor notification message is sent according to the message sending frequency.
8. An electronic device, characterized in that: The electronic device includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the data packet sending method according to any one of claims 1 to 7.
9. A computer storage medium, characterized in that The computer storage medium is used to store program data, and when the program data is executed by a computer, it is used to implement the data packet sending method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Mesh network data transmission method, electronic equipment and storage medium
CN115915263A
Network node control method, electronic equipment and computer readable storage medium
CN117201388A
