CN116566877A - Method, device and multi-hop network system for determining data packet forwarding times - Google Patents

Method, device and multi-hop network system for determining data packet forwarding times Download PDF

Info

Publication number
CN116566877A
CN116566877A CN202310333153.7A CN202310333153A CN116566877A CN 116566877 A CN116566877 A CN 116566877A CN 202310333153 A CN202310333153 A CN 202310333153A CN 116566877 A CN116566877 A CN 116566877A
Authority
CN
China
Prior art keywords
node
forwarding
data packet
forwarding times
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310333153.7A
Other languages
Chinese (zh)
Inventor
郝术华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd, Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202310333153.7A priority Critical patent/CN116566877A/en
Publication of CN116566877A publication Critical patent/CN116566877A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/20Hop count for routing purposes, e.g. TTL
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/32Flooding
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a method, a device and a multi-hop network system for determining the forwarding times of data packets, which relate to the technical field of intelligent home, and the method comprises the following steps: after receiving the reply data packet sent by each node device in the multi-hop network, the sending device determines the target forwarding times required by the multi-hop network based on the node forwarding times in the reply data packet, and because the target forwarding times are determined based on the node forwarding times replied by all the node devices, the target forwarding times can effectively adapt to the scale of the multi-hop network, and the sending of the data packet based on the target forwarding times can ensure that all the node devices in the multi-hop network can receive the data packet, ensure the effectiveness of the data packet sending and promote the broadcasting effect of the multi-hop network.

Description

Method, device and multi-hop network system for determining data packet forwarding times
Technical Field
The application relates to the field of smart home, in particular to a method, a device and a multi-hop network system for determining the forwarding times of a data packet.
Background
Fixed packet forwarding times (TTL) are set when the equipment leaves the factory, but in a practical application scene, networking scales with various different specifications exist, for example, the networking scales are dense and short in distance or sparse and long in distance. In dense scale, the method is carried out once, and if the number of times of forwarding is too large, flooding can be caused. And under the sparse scale, the times of forwarding are up to a certain number to ensure that all node devices are forwarded, and if the times of forwarding are too small, some nodes cannot receive the data packet.
In the process of implementing the embodiment of the present application, it is found that at least the following problems exist in the related art:
the packet forwarding times of the multi-hop network are preset and fixed, so that the problems of data flooding or network total capacity reduction easily occur, and the network scale and the network data sending effect are limited.
It should be noted that the information disclosed in the foregoing background section is only for enhancing understanding of the background of the present application and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview, and is intended to neither identify key/critical elements nor delineate the scope of such embodiments, but is intended as a prelude to the more detailed description that follows.
The embodiment of the application provides a method, a device and a multi-hop network system for determining the forwarding times of a data packet so as to improve the effectiveness of multi-hop network data transmission.
In some embodiments, the method is applied to a transmitting device of a multi-hop network, the method comprising: receiving a reply data packet sent by each node device; wherein, each reply data packet comprises node forwarding times of the sending equipment; determining target forwarding times based on node forwarding times of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
Optionally, after receiving the reply data packet sent by each node device, the method further includes: acquiring the forwarding times of each node in a plurality of reply data packets sent by current node equipment; determining the maximum node forwarding times from the node forwarding times; and determining the maximum node forwarding times as the node forwarding times of the current node equipment.
Optionally, the determining the target forwarding number based on the node forwarding number of each node device includes: taking the minimum value of all node forwarding times corresponding to each node device as a first node forwarding time; and determining target forwarding times according to the first node forwarding times and a preset maximum forwarding times.
Optionally, the determining the target forwarding number according to the first node forwarding number and the preset maximum forwarding number includes: determining a difference value between the preset maximum forwarding times and the first node forwarding times; and determining the target forwarding times required by the multi-hop network according to the difference value.
Optionally, the determining the target forwarding times required by the multi-hop network according to the difference value includes: determining the sum of the difference value and N as the target forwarding times required by the multi-hop network; wherein N is an integer greater than or equal to 2.
Optionally, the preset maximum forwarding number is 127.
In some embodiments, the method is applied to a node device of a multi-hop network, the method comprising: receiving a detection data packet; wherein, the detection data packet comprises the forwarding times of the first node; determining the node forwarding times of the node equipment according to the first node forwarding times; sending a reply data packet; the reply data packet includes node forwarding times of the node equipment.
Optionally, the determining the node forwarding number of the node device according to the first node forwarding number includes: comparing the first node forwarding times with second node forwarding times cached by the node equipment; and under the condition that the forwarding frequency of the first node is larger than that of the second node, determining the forwarding frequency of the second node as the node forwarding frequency of the node equipment.
Optionally, after comparing the first node forwarding number with the second node forwarding number cached by the node device, the method further includes: and discarding the received probe data packet under the condition that the forwarding times of the first node are smaller than or equal to the forwarding times of the second node.
Optionally, before comparing the first node forwarding number with the second node forwarding number cached by the node device, the method further includes: judging whether the second node forwarding times of the cache exist in the node equipment or not; and under the condition that the second node forwarding times of the buffer memory do not exist in the node equipment, the first node forwarding times contained in the received detection data packet are used as the second node forwarding times to be buffered in the node equipment.
Optionally, after replacing the second node forwarding number with the first node forwarding number, the method further includes: subtracting one from the forwarding times of the first node contained in the received probe data packet under the condition that the forwarding condition is met; and continuing to forward the detection data packet to other node devices in the multi-hop network.
Optionally, the forwarding condition includes at least one of: the forwarding times of the first node contained in the received detection data packet are equal to 1; the current time reaches a preset forwarding time limit.
In some embodiments, the apparatus is applied to a transmitting device of a multi-hop network, the apparatus comprising: the receiving module is configured to receive reply data packets sent by each node device; wherein, each reply data packet comprises node forwarding times of the sending equipment; the determining module is configured to determine a target forwarding frequency based on the node forwarding frequency of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
In some embodiments, the apparatus is applied to a node device of a multi-hop network, the apparatus comprising: a receiving module configured to receive a probe packet; wherein, the detection data packet comprises the forwarding times of the first node; the determining module is configured to determine the node forwarding times of the node equipment according to the first node forwarding times; a transmitting module configured to transmit a reply packet; the reply data packet includes node forwarding times of the node equipment.
In some embodiments, the multi-hop network system comprises: a transmitting device configured to transmit a probe packet to the multi-hop network; wherein, the detection data packet comprises the forwarding times of the first node; the node equipment is configured to receive the detection data packet, determine the node forwarding times of the node equipment according to the first node forwarding times, and send a reply data packet; the reply data packet comprises node forwarding times of the node equipment; the sending device is further configured to receive the reply data packet sent by each node device, and determine the target forwarding times based on the node forwarding times of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
The method, the device and the multi-hop network system for determining the data packet forwarding times provided by the embodiment of the application can realize the following technical effects:
after receiving the reply data packet sent by each node device in the multi-hop network, the sending device determines the target forwarding times required by the multi-hop network based on the node forwarding times in the reply data packet, and because the target forwarding times are determined based on the node forwarding times replied by all the node devices, the target forwarding times can effectively adapt to the scale of the multi-hop network, and the sending of the data packet based on the target forwarding times can ensure that all the node devices in the multi-hop network can receive the data packet, ensure the effectiveness of data packet sending and improve the broadcasting effect of the multi-hop network.
The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic diagram of a hardware environment of a method for determining a number of packet forwarding times according to an embodiment of the present application;
fig. 2 is an application scenario schematic diagram of a method for determining a number of data packet forwarding times according to an embodiment of the present application;
fig. 3 is a flowchart of a method for determining a number of forwarding times of a packet according to an embodiment of the present application;
fig. 4 is a flowchart of another method for determining the number of packet forwarding times according to an embodiment of the present application;
fig. 5 is a flowchart of a method for determining a number of forwarding times of a packet according to an embodiment of the present application;
fig. 6 is a flowchart of another method for determining the number of packet forwarding times according to an embodiment of the present application;
fig. 7 is a flowchart of a method for determining the number of forwarding times of a data packet in a practical application scenario provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a determining process of node transferring method times in an actual application scenario according to an embodiment of the present application;
fig. 9 is a schematic diagram of an apparatus for determining a number of forwarding times of a packet according to an embodiment of the present application;
fig. 10 is a schematic diagram of another apparatus for determining a number of forwarding times of a packet according to an embodiment of the present application;
Fig. 11 is a schematic structural diagram of another apparatus for determining the number of forwarding times of a packet according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a multi-hop network system according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method for determining the data packet forwarding times can be widely applied to full-house intelligent digital control application scenes such as Smart Home (Smart Home), intelligent Home equipment ecology, intelligent Home (Intelligence House) ecology and the like. Alternatively, in this embodiment, the above-mentioned interaction method of the smart home device may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be used to provide services (such as application services and the like) for a terminal or a client installed on the terminal, a database may be set on the server or independent of the server, for providing data storage services for the server 104, and cloud computing and/or edge computing services may be configured on the server or independent of the server, for providing data computing services for the server 104.
It should be understood that the above-mentioned terminal device 102 may be referred to as a User Equipment (ue), a terminal device, a mobile device, or a mobile terminal, etc., and for example, the terminal device 102 may not be limited to a PC, a mobile phone, a tablet computer, a computer with a mobile terminal, etc. For another example, the terminal device 102 may also be an intelligent air conditioner, an intelligent smoke machine, an intelligent refrigerator, an intelligent oven, an intelligent stove, an intelligent washing machine, an intelligent water heater, an intelligent washing device, an intelligent dish washer, an intelligent projection device, an intelligent television, an intelligent clothes hanger, an intelligent curtain, an intelligent video, an intelligent socket, an intelligent sound box, an intelligent fresh air device, an intelligent kitchen and toilet device, an intelligent bathroom device, an intelligent sweeping robot, an intelligent window cleaning robot, an intelligent mopping robot, an intelligent air purifying device, an intelligent steam box, an intelligent microwave oven, an intelligent kitchen appliance, an intelligent purifier, an intelligent water dispenser, an intelligent door lock, and the like.
Fig. 2 shows an application scenario diagram 200 provided in an embodiment of the present application, including: a transmitting device 210 and a node device 220. The node apparatus 220 is plural, and the transmitting apparatus 210 and the node apparatus 220 have been connected in the multi-hop network. Fig. 2 exemplifies one transmitting device 210 and three node devices 220. The sending device 210 is a device that prepares to send a data packet to the multi-hop network, and the node device 220 is a device that needs to receive the data packet. When the transmitting device 210 transmits a data packet to the multi-hop network, it is first required to set the packet forwarding number, that is, TTL, of the data packet, and in the related art, a fixed TTL value is directly set, for example, to the maximum value 127, or to set a relatively small value 15 in order to improve the data transmission efficiency. However, the number of forwarding times used for different networking scales needs to have a reasonable value, and in general, the networking scale can be simply divided into dense networking or sparse networking. In the case of dense networking, the data packet may need to be forwarded only once to each device, and in the case of such dense networking, if the TTL is set to be too large, each node device needs to be forwarded multiple times, for example, each node device needs to be forwarded at least 8 times, which is very likely to cause flooding of the data packet. Another case is a sparse networking case, where a data packet needs to be forwarded at least 5 times to be transferred to each node device, and if the TTL setting is smaller in the sparse networking scenario, forwarding less than 5 times easily results in that some node devices cannot receive all the data packet.
The embodiment of the application provides a method for determining the forwarding times of data packets, which can optimize the forwarding times suitable for the current scene according to the networking scale, thereby improving the communication performance of a multi-hop network and ensuring the effectiveness of data packet transmission.
Referring to fig. 3, a method for determining the number of times of forwarding a packet according to an embodiment of the present application is applied to a transmitting device in a multi-hop (Mesh) network, as shown in fig. 3, and includes the following steps:
s302: and receiving the reply data packet sent by each node device.
Wherein each reply data packet includes the node forwarding times of the transmitting device. In order to distinguish the reply data packet sent by each node device, the reply data packet further includes identification information of the node device, where the identification information is used to uniquely characterize one node device, that is, the node device and other node devices can be distinguished through the identification information. In some examples, the identification information may be an ID of the node device, a serial number of the node device, or a node address of the node device in the multi-hop network.
The transmitting device may be a proxy device, which may be a device having a communication function in a multi-hop network and capable of communicating with the outside, such as various types of multi-hop gateways, intelligent terminals having a multi-hop function, and the like. The transmitting device is preferably a stationary gateway that does not move. The node device is various terminal devices with forwarding functions in the multi-hop network, and messages of other devices can be forwarded through the node device.
S304: and determining the target forwarding times based on the node forwarding times of each node device.
And the target forwarding times enable each node device in the multi-hop network to receive the data packet.
According to the method provided by the embodiment of the application, after receiving the reply data packet sent by each node device in the multi-hop network, the sending device determines the target forwarding times required by the multi-hop network based on the node forwarding times in the reply data packet, and because the target forwarding times are determined based on the node forwarding times replied by all the node devices, the target forwarding times can effectively adapt to the scale of the multi-hop network, and the sending of the data packet based on the target forwarding times can ensure that all the node devices in the multi-hop network can receive the data packet, ensure the effectiveness of data packet sending and promote the broadcasting effect of the multi-hop network.
Optionally, after receiving the reply data packet sent by each node device, the method further includes: acquiring the forwarding times of each node in a plurality of reply data packets sent by current node equipment; determining the maximum node forwarding times from the node forwarding times; and determining the maximum node forwarding times as the node forwarding times of the current node equipment.
Specifically, each node device receives multiple probing data packets, where the probing data packets may be sent by an upper node device of the node device, or may be sent by a lower node device of the node device, and the maximum node forwarding number is determined from the multiple node forwarding numbers, that is, the probing data packet sent by a node higher than the node level is received, for example, for the node device a, the TTL in the first received probing data packet is 125, the TTL in the second received probing data packet is 122, and the TTL in the third received probing data packet is 115, and then the finally determined node forwarding number of the node device a is 125.
Therefore, the maximum value of TTL of the detection data packet received in each node device can be determined, namely, the forwarding times of the detection data packet received by the node can be ensured by using the minimum forwarding times, multiple invalid forwarding is avoided, the forwarding efficiency is improved, and finally the determined forwarding times are more accurate.
Optionally, the determining the target forwarding number based on the node forwarding number of each node device includes: taking the minimum value of all node forwarding times corresponding to each node device as a first node forwarding time; and determining target forwarding times according to the first node forwarding times and a preset maximum forwarding times.
Taking the example that the node devices include A, B and C, for the node device a, the node forwarding number corresponding to the node device a is 122, the node forwarding number corresponding to the node device B is 125, and the node forwarding number corresponding to the node device C is 121, the minimum value of the node forwarding numbers of all the node devices A, B and C, that is, the minimum value 121 of 122, 125 and 121 is taken as the first node forwarding number. And determines a target forwarding number according to the first node forwarding number 121 and the preset maximum forwarding number.
The forwarding times in the detection data packet are reduced every time of forwarding, so that the smaller the node forwarding times of the received detection data packet, the more the forwarding times of the detection data packet are, the minimum value selected from all the node forwarding times, namely the longest path of the detection data packet, namely the end-most node of the multi-hop network reached after the longest forwarding, is indicated, the scale of the multi-hop network can be accurately determined, the forwarding times of the first node determined according to the minimum value can ensure that the end-most node equipment can receive the data packet, the problem that the node equipment with a far distance from the sending equipment cannot ensure to receive the data packet due to the fact that the forwarding times are too small is avoided, and the effectiveness of data transmission is ensured.
Optionally, the determining the target forwarding number according to the first node forwarding number and the preset maximum forwarding number includes: determining a difference value between the preset maximum forwarding times and the first node forwarding times; and determining the target forwarding times required by the multi-hop network according to the difference value.
Optionally, the determining the target forwarding times required by the multi-hop network according to the difference value includes: determining the sum of the difference value and N as the target forwarding times required by the multi-hop network; wherein N is an integer greater than or equal to 2.
Continuing the example, after determining that the number of times of forwarding by the first node is 121, the number of times of forwarding by the first node is 121 is different from a preset maximum number of times of forwarding, where the preset maximum number of times of forwarding may be the maximum number of times of forwarding by the multi-hop network, for example, may be 110 and 120, and preferably the preset maximum number of times of forwarding is 127. Taking the preset maximum forwarding number as 127 as an example, the difference value is 127-121=6. Further, the number of forwarding times is targeted according to 6+N. Taking n=2 as an example, the final target forwarding number is 8. The purpose of N is to provide some margin for node forwarding in a multi-hop network, so N need not be set to an excessive value.
As shown in fig. 4, another method for determining the number of forwarding times of a data packet according to an embodiment of the present application is applied to a transmitting device in a multi-hop network, where three node devices are A, B and C, and the method includes the following steps:
s402: and receiving reply data packets sent by the 3 node devices.
Wherein, each reply data packet comprises node forwarding times of the sending equipment;
s404: and obtaining the forwarding times of each node in the multiple reply data packets sent by the current node equipment.
For example, the node forwarding times for node device a include 121, 122, 123, respectively. The node forwarding times of the node device B include 120, 125, 122. The node forwarding times of the node device C include 121, 122.
S406: and determining the maximum node forwarding times from the plurality of node forwarding times corresponding to each node device.
The maximum node forwarding number of the plurality of node forwarding numbers of the node device a is 123. The maximum node forwarding number among the plurality of node forwarding numbers of the node device B is 125. The maximum node transfer number of the plurality of node transfer numbers of the node device C is 122.
S408: and determining the maximum node forwarding times as the node forwarding times of the current node equipment.
S410: and taking the minimum value of all the node forwarding times corresponding to each node device as the first node forwarding time.
The minimum value 122 among the node forwarding number 123 of the node device a, the node forwarding number 125 of the node device B, and the node forwarding number 122 of the node device C is taken as the first node forwarding number.
S412: a difference between a preset maximum number of forwarding times 127 and the first node forwarding times is determined.
The difference is determined to be 127-122=5.
S414: and determining the sum value of the difference value and 2 as the target forwarding times required by the multi-hop network.
And finally determining the target forwarding times to be 5+2=7 times.
In this way, each data packet is forwarded 7 times in the multi-hop network, and because the node device at the end is the node device C, the data packet can be received by 5 times of forwarding, and therefore, the set forwarding times are 7 times, and each node device can be ensured to receive the data packet.
Referring to fig. 5, a method for determining the number of forwarding times of a data packet according to an embodiment of the present application is applied to a node device in a multi-hop network, as shown in fig. 5, and specifically includes the following steps:
s502: a probe packet is received.
Wherein, the detection data packet comprises the forwarding times of the first node;
s504: and determining the node forwarding times of the node equipment according to the first node forwarding times.
S506: and sending a reply data packet.
The reply data packet includes node forwarding times of the node equipment.
According to the method provided by the embodiment of the application, after each node device receives the detection data packet, the node forwarding times of the node are determined according to the first node forwarding times in the detection data packet, and the reply data packet containing the node forwarding times of the node is replied. In this way, the transmitting apparatus can determine the target number of times of forwarding required for the multi-hop network based on the number of times of forwarding of all nodes of each node. The target forwarding times are determined according to the node forwarding times replied by each node after sending out the detection data packet, so that the method can more meet the requirements of the current multi-hop network, each node device in the multi-hop network can be ensured to receive the data packet, the effectiveness of data packet sending is further ensured, and the broadcasting effect of the multi-hop network is improved.
Optionally, the determining the node forwarding number of the node device according to the first node forwarding number includes: comparing the first node forwarding times with second node forwarding times cached by the node equipment; and under the condition that the first node forwarding frequency is larger than the second node forwarding frequency, determining the second node forwarding frequency as the node forwarding frequency of the node equipment.
Specifically, after receiving the probe data packet, the node device compares the first node forwarding frequency in the probe data packet with the second node forwarding frequency cached locally, and when the first node forwarding frequency is greater than the second node forwarding frequency, which indicates that the current node device can receive the data packet forwarded by the node device closer to the transmitting device, the second node forwarding frequency cached by the node device is used as the node forwarding frequency of the node device, and feeds back the node forwarding frequency to the transmitting device which transmits the probe data packet. In this way, the transmitting device may receive the maximum number of forwarding times that each node device can receive, and based thereon determine the target number of forwarding times required for the multi-hop network. Because the target forwarding times are dynamically determined according to the forwarding times replied by each node after sending out the detection data packet, the method can better meet the requirements of the current multi-hop network, ensure that each node device in the multi-hop network can receive the data packet, ensure the effectiveness of data packet sending and promote the broadcasting effect of the multi-hop network.
Optionally, after comparing the first node forwarding number with the second node forwarding number cached by the node device, the method further includes: and discarding the received probe data packet under the condition that the forwarding times of the first node are smaller than or equal to the forwarding times of the second node.
The forwarding times are smaller than or equal to the forwarding times of the second node, which means that the level of forwarding equipment of the detection data packet is lower than that of the current node, so that the detection data packet is directly abandoned without processing, invalid calculation is avoided, the calculation efficiency of the target forwarding times is improved, and the determination time of the forwarding times is saved.
Optionally, before comparing the first node forwarding number with the second node forwarding number cached by the node device, the method further includes: judging whether the second node forwarding times of the cache exist in the node equipment or not; and under the condition that the second node forwarding times of the buffer memory do not exist in the node equipment, the first node forwarding times contained in the received detection data packet are used as the second node forwarding times to be buffered in the node equipment.
The device receiving a packet with TTL 0 has no way to determine whether this packet is the initial packet or a packet with TTL 0 last forwarded many times. For example, when the device receives a packet with TTL 0 and the next received packet has TTL 1, the previously received packet with TTL 0 is not used.
Specifically, when the current node device receives the probe data packet for the first time, the node device does not have the second node forwarding frequency cached locally at this time, so that the first node forwarding frequency contained in the received probe data packet is directly cached in the node device as the second node forwarding frequency without comparison.
Optionally, after replacing the second node forwarding number with the first node forwarding number, the method further includes: subtracting one from the forwarding times of the first node contained in the received probe data packet under the condition that the forwarding condition is met; and continuing to forward the detection data packet to other node devices in the multi-hop network.
Optionally, the forwarding condition includes at least one of: the forwarding times of the first node contained in the received detection data packet are equal to 1; the current time reaches a preset forwarding time limit.
In this way, the forwarding is stopped after all the node devices are forwarded, or the forwarding of the detection data packet is stopped after the forwarding times are used up, so that the accuracy of the determined forwarding times is improved, and the efficiency can be considered.
Referring to fig. 6, another method for determining the number of times of forwarding a data packet according to an embodiment of the present application is applied to a node device a in a multi-hop network, as shown in fig. 6, and includes the following steps:
s602: a probe packet is received.
Wherein the probing data packet includes the first node forwarding number 122.
S604: and judging whether the cached second node forwarding times exist in the node equipment A. If not, step S606 is performed. If so, step S608 is performed.
S606: and caching the first node forwarding times contained in the received detection data packet as second node forwarding times in the node equipment.
S608: comparing whether the first node forwarding number is greater than the second node forwarding number cached by the node device, if so, executing step S610, otherwise, executing step S616.
S610: and determining the second node forwarding times as the node forwarding times of the node equipment.
S612: and sending a reply data packet.
The reply data packet comprises node forwarding times of the node equipment;
s614: the received probe packet is discarded.
S616: and under the condition that the current moment does not reach the preset forwarding time limit, subtracting 1 from the forwarding times of the first node contained in the received detection data packet, and continuously forwarding the detection data packet to other node devices in the multi-hop network.
As shown in fig. 7, a method for determining the number of forwarding times of a data packet in a practical application scenario is provided in the embodiment of the present application, where the method is applied to a communication system formed by a multi-hop network, and the communication system includes a proxy device 71 and a node device 72. As shown in fig. 7, the method specifically includes the following steps:
S702: the proxy device sends the probe packet to the multi-hop network.
The proxy device is the transmitting device.
S704: when the node device receives the detection data packet for the first time, the TTL value of the detection data packet is marked as TTL2 and is cached in the node device.
S706: after the node device receives the detection data packet for the second time and later, the TTL value in the detection data packet is marked as TTL1.
S708: the node device compares the locally buffered TTL2 with TTL1 in the received probe packet, and discards the probe packet if TTL1 is less than or equal to TTL2.
S710: if TTL1 is greater than TTL2, the node device updates TTL2 with TTL1.
S712: the node device broadcasts the node address and the TTL2 in the form of a reply data packet.
S714: after receiving the reply data packet, the proxy device caches the node address and the corresponding TTL2 locally.
S716: the proxy device stops receiving the reply packet when the TTL of the probe packet is 0.
S718: the proxy equipment compares TTL2 corresponding to each node address, and takes the maximum TTL2 as Tmax corresponding to the node address.
S720: the proxy device compares all Tmax to determine the minimum Tmax, denoted Tmin.
S722: the proxy device determines that the target TTL value of the data packet is [127-Tmin ] +2.
Referring to fig. 8, in a process for determining the number of node forwarding times in an actual application scenario provided by an embodiment of the present application, as shown in fig. 8, according to any one of the methods provided in the foregoing embodiments of the present application, it is determined that the final device 9 is the farthest node, and the final target TTL value is set to 5, so that it is ensured that all nodes in the multi-hop network receive the data packet, and effective communication of the multi-hop network is ensured.
Referring to fig. 9, an embodiment of the present application provides an apparatus 900 for determining a number of packet forwarding times, which is applied to a transmitting device of a multi-hop and multi-hop network, and includes a receiving module 902 and a determining module 904. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the receiving module 902 is configured to receive a reply data packet sent by each node device; wherein, each reply data packet comprises node forwarding times of the sending equipment;
the determining module 904 is configured to determine a target forwarding number based on the node forwarding number of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
According to the device provided by the embodiment of the application, after receiving the reply data packet sent by each node device in the multi-hop network, the sending device determines the target forwarding times required by the multi-hop network based on the node forwarding times in the reply data packet, and because the target forwarding times are determined based on the node forwarding times replied by all the node devices, the target forwarding times can effectively adapt to the scale of the multi-hop network, and the sending of the data packet based on the target forwarding times can ensure that all the node devices in the multi-hop network can receive the data packet, ensure the effectiveness of data packet sending and promote the broadcasting effect of the multi-hop network.
Optionally, the apparatus further comprises: the node forwarding frequency determining module is configured to acquire forwarding frequency of each node in a plurality of reply data packets sent by the current node equipment; the maximum node forwarding frequency determining module is configured to determine the maximum node forwarding frequency from the plurality of node forwarding frequencies; and the current node forwarding frequency determining module is configured to determine the maximum node forwarding frequency as the node forwarding frequency of the current node equipment.
Optionally, the determining module 904 is further configured to take a minimum value of all node forwarding times corresponding to each node device as the first node forwarding times; and determining target forwarding times according to the first node forwarding times and a preset maximum forwarding times.
Optionally, the determining the target forwarding number according to the first node forwarding number and the preset maximum forwarding number includes: determining a difference value between the preset maximum forwarding times and the first node forwarding times; and determining the target forwarding times required by the multi-hop network according to the difference value.
Optionally, the determining the target forwarding times required by the multi-hop network according to the difference value includes: determining the sum of the difference value and N as the target forwarding times required by the multi-hop network; wherein N is an integer greater than or equal to 2.
Optionally, the preset maximum forwarding number is 127.
Referring to fig. 10, a schematic diagram of another apparatus for determining a number of forwarding times of a packet according to an embodiment of the present application is shown. The device is applied to node equipment of a multi-hop network and comprises a receiving module 1002, a determining module 1004 and a sending module 1006. Wherein, the liquid crystal display device comprises a liquid crystal display device,
the receiving module 1002 is configured to receive a probe packet; wherein, the detection data packet comprises the forwarding times of the first node;
the determining module 1004 is configured to determine the node forwarding times of the node device according to the first node forwarding times;
the sending module 1006 is configured to send a reply data packet; the reply data packet includes node forwarding times of the node equipment.
According to the device provided by the embodiment of the application, after each node device receives the detection data packet, the node forwarding times of the node are determined according to the first node forwarding times in the detection data packet, and the reply data packet containing the node forwarding times of the node is replied. In this way, the transmitting apparatus can determine the target number of times of forwarding required for the multi-hop network based on the number of times of forwarding of all nodes of each node. The target forwarding times are determined according to the node forwarding times replied by each node after sending out the detection data packet, so that the method can more meet the requirements of the current multi-hop network, each node device in the multi-hop network can be ensured to receive the data packet, the effectiveness of data packet sending is further ensured, and the broadcasting effect of the multi-hop network is improved.
Optionally, the determining module 1004 is further configured to compare the first node forwarding number with a second node forwarding number cached by the node device; and under the condition that the first node forwarding frequency is larger than the second node forwarding frequency, determining the second node forwarding frequency as the node forwarding frequency of the node equipment.
Optionally, the apparatus further comprises: and the discarding module is configured to discard the received probe data packet under the condition that the forwarding frequency of the first node is less than or equal to the forwarding frequency of the second node.
Optionally, the apparatus further comprises: the buffer module is configured to judge whether the second node forwarding times of the buffer exist in the node equipment; and under the condition that the second node forwarding times of the buffer memory do not exist in the node equipment, the first node forwarding times contained in the received detection data packet are used as the second node forwarding times to be buffered in the node equipment.
Optionally, the apparatus further comprises: a forwarding module configured to reduce the number of times of forwarding of the first node included in the received probe packet by one if a forwarding condition is satisfied; and continuing to forward the detection data packet to other node devices in the multi-hop network.
Optionally, the forwarding condition includes at least one of: the forwarding times of the first node contained in the received detection data packet are equal to 1; the current time reaches a preset forwarding time limit.
Referring to fig. 11, an apparatus 1100 for determining a number of times a packet is forwarded is provided in an embodiment of the present application, and includes a processor (processor) 100 and a memory (memory) 101. Optionally, the apparatus may further comprise a communication interface (Communication Interface) 102 and a bus 103. The processor 100, the communication interface 102, and the memory 101 may communicate with each other via the bus 103. The communication interface 102 may be used for information transfer. Processor 100 may invoke logic instructions in memory 101 to perform the method for determining the number of packet forwarding times of the above-described embodiments.
Further, the logic instructions in the memory 101 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product.
The memory 101 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and program instructions/modules corresponding to the methods in the embodiments of the present application. The processor 100 executes functional applications and data processing by executing program instructions/modules stored in the memory 101, i.e. implements the method for determining the number of packet forwarding times of the above-described embodiments.
The memory 101 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the terminal device, etc. Further, the memory 101 may include a high-speed random access memory, and may also include a nonvolatile memory.
As shown in conjunction with fig. 12, an embodiment of the present application provides a multi-hop network system 1200, including: a transmitting device 1202 and a node device 1204. Wherein the transmitting device 1202 is configured to transmit probe packets to the multi-hop network; wherein, the detection data packet comprises the forwarding times of the first node; the node device 1204 is configured to receive the probe packet, determine the node forwarding times of the node device according to the first node forwarding times, and send a reply packet; the reply data packet comprises node forwarding times of the node equipment; the sending device 1204 is further configured to receive the reply data packet sent by each node device, and determine the target forwarding times based on the node forwarding times of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
The present embodiments provide a computer readable storage medium storing computer executable instructions configured to perform the method for determining a number of packet forwarding times of the above embodiments.
The present application provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method for determining a number of data packet forwarding times of the above embodiments.
The computer readable storage medium may be a transitory computer readable storage medium or a non-transitory computer readable storage medium.
The technical solutions of the embodiments of the present application may be embodied in the form of a software product, where the software product is stored in a storage medium, and includes one or more instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium may be a non-transitory storage medium including: a plurality of media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or a transitory storage medium.
The above description and the drawings illustrate embodiments of the present application sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and features of some embodiments may be included in, or substituted for, those of others. Moreover, the terminology used in the present application is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. Furthermore, when used in this application, the terms "comprises," "comprising," and/or "includes," and variations thereof, mean that the stated features, integers, steps, operations, elements, and/or components are present, but that the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof is not precluded. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled person may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present application. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the embodiments disclosed herein, the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be practiced in other ways. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units may be merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to implement the present embodiment. In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (12)

1. A method for determining the number of times of forwarding a data packet, applied to a transmitting device of a multi-hop network, comprising:
receiving a reply data packet sent by each node device; wherein, each reply data packet comprises node forwarding times of the sending equipment;
determining target forwarding times based on node forwarding times of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
2. The method of claim 1, further comprising, after receiving the reply packet sent by each node device:
acquiring the forwarding times of each node in a plurality of reply data packets sent by current node equipment;
determining the maximum node forwarding times from the node forwarding times;
and determining the maximum node forwarding times as the node forwarding times of the current node equipment.
3. The method of claim 1, wherein the determining the target forwarding number based on the node forwarding number of each node device comprises:
taking the minimum value of all node forwarding times corresponding to each node device as a first node forwarding time;
and determining target forwarding times according to the first node forwarding times and a preset maximum forwarding times.
4. The method of claim 3, wherein the determining the target forwarding number according to the first node forwarding number and the preset maximum forwarding number comprises:
determining a difference value between the preset maximum forwarding times and the first node forwarding times;
and determining the target forwarding times required by the multi-hop network according to the difference value.
5. A method for determining the number of times of forwarding a data packet, applied to a node device of a multi-hop network, comprising:
receiving a detection data packet; wherein, the detection data packet comprises the forwarding times of the first node;
determining the node forwarding times of the node equipment according to the first node forwarding times;
sending a reply data packet; the reply data packet includes node forwarding times of the node equipment.
6. The method of claim 5, wherein determining the number of node forwarding times for the node device based on the first number of node forwarding times comprises:
comparing the first node forwarding times with second node forwarding times cached by the node equipment;
and under the condition that the forwarding frequency of the first node is larger than that of the second node, determining the forwarding frequency of the second node as the node forwarding frequency of the node equipment.
7. The method of claim 6, wherein the comparing the first node forwarding number with the second node forwarding number cached by the node device further comprises:
judging whether the second node forwarding times of the cache exist in the node equipment or not;
and under the condition that the second node forwarding times of the buffer memory do not exist in the node equipment, the first node forwarding times contained in the received detection data packet are used as the second node forwarding times to be buffered in the node equipment.
8. The method of claim 6, wherein said replacing said second node forwarding number with said first node forwarding number further comprises:
subtracting one from the forwarding times of the first node contained in the received probe data packet under the condition that the forwarding condition is met;
And continuing to forward the detection data packet to other node devices in the multi-hop network.
9. The method of claim 8, wherein the forwarding condition comprises at least one of:
the forwarding times of the first node contained in the received detection data packet are equal to 1;
the current time reaches a preset forwarding time limit.
10. An apparatus for determining the number of times of forwarding a packet, applied to a transmitting device of a multi-hop network, comprising:
the receiving module is configured to receive reply data packets sent by each node device; wherein, each reply data packet comprises node forwarding times of the sending equipment;
the determining module is configured to determine a target forwarding frequency based on the node forwarding frequency of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
11. An apparatus for determining a number of times of forwarding a packet, applied to a node device of a multi-hop network, comprising:
a receiving module configured to receive a probe packet; wherein, the detection data packet comprises the forwarding times of the first node;
the determining module is configured to determine the node forwarding times of the node equipment according to the first node forwarding times;
A transmitting module configured to transmit a reply packet; the reply data packet includes node forwarding times of the node equipment.
12. A multi-hop network system, comprising:
a transmitting device configured to transmit a probe packet to the multi-hop network; wherein, the detection data packet comprises the forwarding times of the first node;
the node equipment is configured to receive the detection data packet, determine the node forwarding times of the node equipment according to the first node forwarding times, and send a reply data packet; the reply data packet comprises node forwarding times of the node equipment;
the sending device is further configured to receive the reply data packet sent by each node device, and determine the target forwarding times based on the node forwarding times of each node device; and the target forwarding times enable each node device in the multi-hop network to receive the data packet.
CN202310333153.7A 2023-03-30 2023-03-30 Method, device and multi-hop network system for determining data packet forwarding times Pending CN116566877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310333153.7A CN116566877A (en) 2023-03-30 2023-03-30 Method, device and multi-hop network system for determining data packet forwarding times

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310333153.7A CN116566877A (en) 2023-03-30 2023-03-30 Method, device and multi-hop network system for determining data packet forwarding times

Publications (1)

Publication Number Publication Date
CN116566877A true CN116566877A (en) 2023-08-08

Family

ID=87502738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310333153.7A Pending CN116566877A (en) 2023-03-30 2023-03-30 Method, device and multi-hop network system for determining data packet forwarding times

Country Status (1)

Country Link
CN (1) CN116566877A (en)

Similar Documents

Publication Publication Date Title
US11122490B2 (en) Message frame disambiguation in a flood fill mesh radio network
CN112332889B (en) Data transmission method and device, power line communication network and power system
US20150120863A1 (en) Proxy network device selection in a communication network
CN106302104B (en) User relationship identification method and device
CN108984433B (en) Cache data control method and equipment
CN103297468A (en) Operation method for group resources and group server
CN109800270B (en) Data storage and query method and Internet of things system
CN103222229A (en) Path characteristic based association of communication devices
Miranda et al. A power-aware broadcasting algorithm
CN112468372A (en) Equipment state detection method and device in power line communication network
KR100921559B1 (en) Energy efficiency flooding method and system of wireless sensor network
CN101969398A (en) Aging method and system of MAC (Media Access Control) address
WO2014180151A1 (en) Time slot state update method and device
CN112838989A (en) Data stream management method, network equipment and storage medium
CN116566877A (en) Method, device and multi-hop network system for determining data packet forwarding times
CN116614858A (en) Data transmission method and device, storage medium and electronic equipment
EP2914028A1 (en) Method and apparatus for deregistering terminal peripheral
KR20140125223A (en) Method for collecting information with management interface in contents network based on information centric networking, content network management system, and node apparatus
CN113452763B (en) Smart home business registration method and device and smart home system
CN106131046B (en) anti-attack processing method and device
CN1883163A (en) Processing of an interruption to a communication connection between a domestic appliance and a controller in a local network
Xiao et al. Anycast routing in probabilistically contacted delay tolerant networks
CN111371675A (en) Intelligent addressing method, device, equipment and storage medium thereof
CN116016001A (en) Method for searching equipment, storage medium and electronic device
CN108475210B (en) Rack sensing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination