ARP (Address Resolution Protocol) request sending method, system, equipment and program product
By calculating the packet loss rate and ARP lifecycle, and adjusting the number of ARP request sending times and intervals, the communication interruption problem caused by ARP cache loss under high packet loss rates was solved, thus achieving network communication stability and smoothness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-23
- Publication Date
- 2026-03-13
AI Technical Summary
In scenarios with high packet loss rates, ARP cache loss can lead to communication interruptions between network devices and target devices. Existing technologies struggle to effectively update ARP caches, impacting the smoothness of network communications such as video conferencing.
By obtaining the current packet loss rate, and based on the preset correlation between the packet loss rate and the minimum number of ARP request transmissions, the ARP request transmission interval is calculated to ensure that the number of transmissions within an ARP lifecycle is greater than or equal to the minimum number of transmissions, and ARP requests are sent to the target device using the transmission interval.
It increases the probability of successfully sending ARP requests and receiving responses from the target device in scenarios with high packet loss, alleviates communication interruption problems caused by ARP cache loss, and improves the smoothness of network communication.
Smart Images

Figure CN121664768A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to an ARP request sending method, system, device and program product. Background Technology
[0002] When transmitting data between network devices, MAC addresses (physical addresses at the data link layer) are needed to locate the target device. ARP (Address Resolution Protocol) is used for mapping and converting IP addresses (logical addresses at the network layer) to MAC addresses. Network devices maintain ARP caches to communicate with target devices. However, if the ARP entry for the target device cannot be successfully obtained from the ARP cache, the network device cannot send data frames to the target device.
[0003] For example, in a video conference, participating terminals communicate with the gateway device to send audio and video stream data to the gateway device, which then sends the data to the video conferencing platform. The gateway device also receives the audio and video stream data sent by the video conferencing platform. Participating terminals communicate with the gateway device through ARP caching. There are two ways to implement ARP caching: (1) Static ARP binding: The MAC address of the gateway device is statically bound on the video conferencing terminal. However, the gateway device may change, resulting in inaccurate ARP information, or some video conferencing terminals may not support ARP binding operations. (2) Dynamic ARP caching: An aging time is set for each entry in the ARP cache. Before aging, the participating terminal will try to send several ARP requests to update the ARP cache. In long-term video conferences, there may be multiple ARP cache aging processes. However, due to network conditions, in scenarios with high packet loss, ARP requests or the gateway device's response to ARP requests may be lost, causing interruption of data communication between the participating terminal and the gateway device. The video conferencing platform will not be able to continue to obtain the stream of the participating terminal, affecting the implementation of the video conference.
[0004] There are several ways to update the existing ARP cache: (1) In scenarios with high packet loss, the ARP parameters can be adjusted directly in the operating system to increase the number of ARP retries and the timeout. However, Linux systems may allow modification of ARP parameters, but Windows systems have difficulty in modifying ARP parameters. This method is not universal and requires manual adjustment by the user. (2) Set up timed ping in the video conferencing terminal. After the corresponding ARP cache entry expires or is deleted, ping will trigger an ARP request to the gateway device to update the ARP cache. However, when ping does not receive the ARP information returned by the gateway device within the preset time, the terminal's network card will stop sending bitstream data to the gateway device. The gateway device will not be able to receive audio and video bitstream data, and there will be a situation where audio and video bitstream data is missing for a certain period of time. (3) The video conferencing terminal sends ARP requests to the gateway device at regular intervals. However, when the frequency of sending ARP requests is too high, it will put a heavy burden on the devices in the local area network. When the frequency of sending is low, it may be affected by network fluctuations and fail to receive a reply smoothly. Summary of the Invention
[0005] To address the problems in the prior art, the purpose of this application is to provide an ARP request sending method, system, device, and program product to alleviate the problem of communication interruption caused by ARP cache loss in scenarios with high packet loss rates.
[0006] The first aspect of this application provides an ARP request sending method, comprising the following steps: Get the current packet loss rate; Based on the preset correlation between packet loss rate and minimum number of ARP request transmissions, the minimum number of transmissions corresponding to the current packet loss rate is determined; in the correlation, the higher the packet loss rate, the higher the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with the target device's data link layer physical address; The sending interval of ARP requests is calculated based on the minimum number of transmissions and the preset ARP lifecycle, so that when ARP requests are sent using the sending interval, the number of transmissions within one ARP lifecycle is greater than or equal to the minimum number of ARP requests. ARP requests are sent to the target device based on the sending interval.
[0007] In some embodiments, the current packet loss rate includes uplink packet loss rate and downlink packet loss rate; Based on the preset correlation between packet loss rate and minimum number of ARP request transmissions, the minimum number of transmissions corresponding to the current packet loss rate is determined, including the following steps: The probability of a single packet success is calculated based on the uplink packet loss rate and downlink packet loss rate, and is used as the single packet success probability. The minimum number of transmissions n is calculated based on the single packet success probability and a preset probability threshold, so that the combined probability of the single packet success of n ARP requests is greater than or equal to the preset probability threshold.
[0008] In some embodiments, the following steps are also included: Monitor the status of each entry in the ARP cache list. When an entry with an abnormal status is detected, send an ARP request to the target device corresponding to the abnormal entry.
[0009] In some embodiments, when an entry with an abnormal state is detected, the number of ARP requests to be sent within the ARP unicast retry interval is determined based on the minimum number of transmissions.
[0010] In some embodiments, sending an ARP request to the target device based on a transmission interval includes the following steps: Determine if a valid entry for the target device exists in the ARP cache list. The entry is configured to store the mapping between the network layer logical address and the data link layer physical address. If it exists, then unicast is used to send ARP requests to the target device based on the sending interval; If it does not exist, an ARP request is sent to all devices in the target device's network via broadcast, based on the sending interval.
[0011] In some embodiments, the method is deployed in the participating terminals of a video conference; before sending an ARP request to the target device based on the sending interval, the method further includes the following steps: the participating terminal obtains the IP address and data link layer physical address of the participating terminal and the IP address and data link layer physical address of the target device.
[0012] In some embodiments, the method is deployed on the participating terminals of a video conference; the method further includes the following steps: When a participating terminal joins the meeting, it sends multiple ARP requests to the target device based on the minimum number of requests required.
[0013] A second aspect of this application provides an ARP request sending system for implementing the ARP request sending method of the first aspect, the system comprising: The packet loss rate acquisition module is used to obtain the current packet loss rate; The number of transmissions determination module is used to determine the minimum number of transmissions corresponding to the current packet loss rate based on the preset correlation between the packet loss rate and the minimum number of ARP request transmissions; in the correlation, the higher the packet loss rate, the higher the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with the target device's data link layer physical address; The interval determination module is used to calculate the sending interval of ARP requests based on the minimum number of transmissions and the preset ARP lifecycle, so that when ARP requests are sent using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions. The request sending module is used to send ARP requests to the target device based on the sending interval.
[0014] A third aspect of this application also provides an ARP request sending device, comprising: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the ARP request sending method described above by executing the executable instructions.
[0015] A fourth aspect of this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the ARP request sending method described above.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application.
[0017] The ARP request sending method, system, device, and program products of this application have the following beneficial effects: By employing this application, the current packet loss rate is statistically analyzed, and the minimum number of transmissions is determined based on the packet loss rate. Furthermore, the transmission interval is calculated based on the minimum number of transmissions and the ARP lifecycle length. In scenarios with high packet loss rates, the minimum number of transmissions is increased accordingly, thereby shortening the transmission interval for sending ARP requests to the target device within one ARP lifecycle. By sending ARP requests to the target device based on the transmission interval, the probability of successfully sending an ARP request and successfully receiving an ARP reply from the target device within one ARP lifecycle is increased. This alleviates the problem of communication interruption caused by ARP cache loss in scenarios with high packet loss rates and improves the smoothness of network communication. Attached Figure Description
[0018] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0019] Figure 1 This is a flowchart of an ARP request sending method according to an embodiment of this application; Figure 2 This is a flowchart illustrating the determination of the minimum number of transmissions according to an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an ARP request sending system according to an embodiment of this application; Figure 4 This is a schematic diagram of the structure of an ARP request sending device according to an embodiment of this application. Detailed Implementation
[0020] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0021] Furthermore, the accompanying drawings are merely illustrative of this application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0022] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined. Therefore, the actual execution order may change depending on the specific circumstances.
[0023] To address the technical problems of existing technologies, this application provides an ARP request sending method deployed in a network device. ARP (Address Resolution Protocol) is used for mapping and converting IP addresses (network layer logical addresses) to MAC addresses. The network device sends an ARP request to a target device using this method, requesting the target device to reply with its data link layer physical address (MAC address), enabling the network device to communicate with the target device based on the received MAC address. The target device is a device that communicates with the network device, such as a gateway device.
[0024] like Figure 1 As shown, in this embodiment, the ARP request sending method includes the following steps: S110: Get the current packet loss rate; After a network device establishes communication with a target device, the network device can periodically count the difference between the data packets sent to the target device and the responses received within a statistical period and calculate the packet loss rate. The data packets sent by the network device to the target device are not limited to ARP request packets, but also include other types of data packets sent between the network device and the target device during communication, such as audio and video data packets and status feedback data packets in video conferencing. S120: Based on the preset correlation between packet loss rate and minimum number of ARP request transmissions, determine the minimum number of transmissions corresponding to the current packet loss rate; in the correlation, the higher the packet loss rate, the higher the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with the target device's data link layer physical address; The relationship between the preset packet loss rate and the minimum number of ARP requests can include a functional relationship between the packet loss rate and the minimum number of ARP requests, with the packet loss rate as the variable and the minimum number of ARP requests as the calculation result; or, the relationship between the preset packet loss rate and the minimum number of ARP requests can be a mapping table, which divides the numerical range of the packet loss rate into multiple numerical intervals, and sets a minimum number of requests for each numerical interval of the packet loss rate. In this embodiment, since the higher the packet loss rate, the higher the corresponding minimum number of transmissions, in scenarios with a high packet loss rate, increasing the minimum number of transmissions is beneficial to increasing the probability of successfully sending the ARP request to the target device and successfully receiving the MAC address from the target device, and reducing the probability of communication interruption due to ARP cache aging. S130: Calculate the ARP request sending interval based on the minimum number of transmissions and the preset ARP lifecycle, so that when sending ARP requests using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions. The operating system of network devices has an ARP cache list to store ARP information entries. Each ARP information entry includes the mapping information of the target device's IP address and MAC address, the entry validity status (such as valid, stale, delayed probe, probe, etc.) and the ARP lifecycle. The ARP lifecycle refers to the duration for an ARP information entry to change from the start point of the valid state (the moment it is successfully stored in the ARP cache) to the stale state in the ARP cache list. The sending interval is calculated based on the ARP lifecycle and the minimum number of transmissions. This ensures that when sending ARP requests according to the sending interval, the number of ARP requests within one ARP lifecycle is greater than or equal to the minimum number of transmissions. Therefore, the sending interval is inversely proportional to the minimum number of transmissions. When the packet loss rate is high, increasing the minimum number of ARP requests and correspondingly shortening the sending interval helps to increase the number of ARP requests sent within one ARP lifecycle. This, in turn, increases the probability of successfully sending ARP requests to the target device and successfully receiving the MAC address reply from the target device within one ARP lifecycle, thus increasing the probability of successfully updating the corresponding ARP information entry of the target device within one ARP lifecycle. S140: Send an ARP request to the target device based on the transmission interval; By setting the sending interval through the above steps, the probability of failing to update the ARP cache within an ARP lifecycle can be reduced, alleviating communication interruption caused by lost ARP requests or ARP replies in scenarios with high packet loss rates, and maintaining smooth communication between network devices and target devices. The operating system of a network device is configured to send ARP requests to the target device according to the ARP lifecycle. However, the ARP request sending method of this application is independent of the ARP requests sent by the operating system, and sends ARP requests according to the calculated ARP request sending interval. Existing operating systems send ARP requests to the target device before the ARP information entries in their own maintained ARP cache list are about to expire. The target device only receives the ARP requests sent by the operating system. In scenarios with high packet loss, if the ARP requests sent by the operating system are lost or the ARP replies from the target device are lost, the operating system cannot update the ARP information entries in time, which will lead to communication interruption. In addition to the ARP requests sent by the operating system, this application also uses the ARP request method of this application to send ARP requests at the calculated interval within each ARP lifecycle. That is, the target device will receive the ARP requests sent by the operating system and the ARP requests sent using the ARP request sending method of this application, and will reply to each received ARP request, thereby greatly increasing the probability of obtaining ARP replies at the network device and greatly increasing the probability of successfully updating the cached ARP information entries within the ARP lifecycle.
[0025] By employing the APP request sending method of this application, step S110 calculates the current packet loss rate, step S120 determines the minimum number of transmissions based on the packet loss rate, and step S130 further calculates the transmission interval based on the minimum number of transmissions and the ARP lifecycle length. In scenarios with a high packet loss rate, the minimum number of transmissions is increased accordingly, correspondingly shortening the transmission interval for sending ARP requests to the target device within one ARP lifecycle. Step S140 sends ARP requests to the target device based on the transmission interval, increasing the probability of successfully sending ARP requests and successfully receiving ARP replies from the target device within one ARP lifecycle. This alleviates the problem of communication interruption caused by ARP cache loss in scenarios with a high packet loss rate, improving the smoothness of network communication. Conversely, in scenarios with a low packet loss rate, the minimum number of transmissions can be reduced accordingly, and the transmission interval for sending ARP requests to the target device within one ARP lifecycle can be extended, reducing the communication burden on network devices.
[0026] In this embodiment, the relationship between the preset packet loss rate and the minimum number of ARP request transmissions satisfies the following: under a scenario corresponding to a certain packet loss rate, when the number of Address Resolution Protocol (ARP) requests sent is greater than or equal to the corresponding minimum number of transmissions, the probability of receiving at least one reply meets a preset probability requirement. This preset probability requirement includes, for example, a preset probability threshold, where the probability of receiving at least one reply is greater than or equal to this preset probability threshold. The preset probability threshold is set to a value close to 1; the closer it is to 1, the greater the probability of successfully receiving at least one reply when the number of ARP requests sent is greater than or equal to the corresponding minimum number of transmissions.
[0027] In this embodiment, the current packet loss rate includes uplink packet loss and downlink packet loss. The network device can calculate the uplink packet loss rate by counting the number of data packets sent and the number of responses received from the peer within a statistical period. The downlink packet loss rate can be calculated as follows: the network device receives data packets sent by the peer and calculates the packet loss rate based on the theoretically expected number of data packets and the actual number of data packets received within a statistical period according to the data packet sequence number; or it can calculate the packet loss rate based on the number of data packets retransmitted after timeout and the theoretically expected number of data packets to be sent by the peer. The calculation methods for uplink and downlink packet loss rates described here are merely examples. In other embodiments, the network device can obtain the packet loss rate through other methods, such as using a dedicated packet loss rate statistics tool or receiving the packet loss rate calculation results from the peer.
[0028] like Figure 2 As shown, step S120: Based on the preset correlation between packet loss rate and the minimum number of ARP request transmissions, determine the minimum number of transmissions corresponding to the current packet loss rate, including the following steps: S121: Calculate the probability of a successful ARP request transmission and successful response based on the uplink packet loss rate and downlink packet loss rate, and use it as the single packet success probability s; For example, the success probability of a single packet is s = (1 - uplink_loss) (1-downlink_loss) also corresponds to the probability that a data packet sent by a network device to a target device is successfully received by the target device and the network device successfully receives a reply from the target device; S122: Calculate the minimum number of transmissions n based on the single packet success probability and the preset probability threshold, so that the combined probability of the single packet success of n ARP requests is greater than or equal to the preset probability threshold.
[0029] In this embodiment, step S122 further includes, for example, the following step: after calculating the success probability of a single packet, the probability q of a single packet failing can be further calculated (the probability that an ARP request sent by the network device is not successfully sent or that the ARP request is successfully sent but not successfully received from the target device, i.e., the probability that either the ARP request or the ARP reply is lost). q = 1 - s =1-(1- uplink_loss) (1- downlink_loss) =( uplink_loss + downlink_loss)-( uplink_loss downlink_loss) The probability p of receiving at least one successful reply after sending n ARP requests in the event of packet loss is: p = 1 - q^n = 1 - (1 - s)^n n = log(1 - p) / log(q)= log(1 - p) / log(1-s) The probability p is the combined probability s of the success of a single ARP request among n ARP requests. This combined probability means that, given a single ARP request success probability of s, when a network device sends n consecutive ARP requests, at least one request will successfully complete the ARP request sending and ARP reply receiving process, thus updating the ARP entry information. The higher this combined probability, the higher the probability of successfully updating the ARP entry information. The target value of probability p cannot be guaranteed to be 1; therefore, the target value of probability p can be set to a preset probability threshold close to 1. This preset probability threshold is set as a confidence level. The minimum number of transmissions n can then be calculated using the following formula based on the preset probability threshold: p ≥ confidence Then n ≥ log(1 - confidence) / log(q) That is, n ≥ log(1-confidence) / log(1-s) In this embodiment, the smallest positive integer value satisfying the above formula is selected as the minimum number of transmissions n. Alternatively, the smallest positive integer value satisfying the above formula plus x (x≥1) can be selected as the minimum number of transmissions n based on the network status. The value of n calculated by the above formula can satisfy the condition that the combined probability p of the success probability of a single packet of n ARP requests is greater than or equal to a preset probability threshold (confidence).
[0030] Therefore, in this embodiment, step S122: calculating the minimum number of transmissions n, such that the combined probability of the success probability of a single packet of n ARP requests is greater than or equal to a preset probability threshold, includes: calculating the quotient of log(1 - confidence) and log(1-s), and taking the smallest integer value greater than or equal to the quotient as the minimum number of transmissions n.
[0031] In this embodiment, the preset ARP lifecycle is "lifetime". As long as a reply to an ARP request is successfully received within the ARP lifecycle, the lifecycle of that ARP entry can be refreshed to a new "lifetime". Therefore, the ARP sending interval "interval" within the ARP lifecycle must satisfy the following: interval ≤ lifetime / (n-1) That is, interval ≤ lifetime / (log(1 - confidence) / log(q) -1) Therefore, in this embodiment, step S300: calculating the ARP request sending interval based on the minimum number of transmissions and the preset ARP lifecycle, so that when sending ARP requests using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions, includes: calculating the quotient of the ARP lifecycle lifetime and (n-1), and taking the interval that is less than or equal to the quotient and closest to the quotient as the sending interval interval, thereby satisfying that the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions n.
[0032] In this embodiment, the update period for the minimum number of transmissions n and the transmission interval in steps S120 and S130 can be determined based on the statistical period of the packet loss rate. For example, the update period for the minimum number of transmissions n and the transmission interval can be set to be equal to the statistical period of the packet loss rate. To avoid adjusting the update period for the minimum number of transmissions n and the transmission interval too frequently, the update period for the minimum number of transmissions n and the transmission interval can also be set to be greater than the statistical period of the packet loss rate, or the decision to update the minimum number of transmissions n and the transmission interval can be determined based on the degree of change in the packet loss rate. For example, before step S120, the following step is also included: determining whether the difference between the current packet loss rate and the packet loss rate of the previous statistical period is greater than a preset packet loss rate difference threshold. If yes, then continue with step S120; if no, then keep the minimum number of transmissions n and the transmission interval unchanged, and continue with step S140.
[0033] In this embodiment, step S140, sending an ARP request to the target device based on the sending interval, can be achieved by directly using the sending interval as the actual interval for the target device to send ARP requests, i.e., sending an ARP request to the target device once every interval. In other embodiments, the sending interval and the actual interval for sending ARP requests may not be exactly the same. For example, a sending interval threshold can be set. When the sending interval is greater than this threshold, the multiple sending of ARP requests has a smaller impact on the network. To improve reliability, the actual interval for sending ARP requests can be increased, such as dividing the sending interval by a certain multiple and using it as the actual interval for sending ARP requests (e.g., sending an ARP request to the target device once every interval / 2, where the multiple is just an example).
[0034] Therefore, in this embodiment, the transmission interval can be pre-divided into multiple time intervals, and the relationship between multiple time intervals and the multiplier k can be set. Step S140: Sending an ARP request to the target device based on the transmission interval includes: selecting the multiplier k corresponding to the time interval based on which time interval the current transmission interval falls into, and using interval / k as the actual interval for sending the ARP request to the target device. The larger the time value of the time interval, the larger the corresponding k value. For time intervals greater than the transmission time threshold, the corresponding k value is a value greater than 1, such as 2 or 3. For time intervals less than or equal to the transmission time interval threshold, the corresponding k value can be 1 or less than 1.
[0035] After receiving a reply to an ARP request from the target device, the operating system of the network device extracts the target device's data link layer physical address from the reply and stores the target device's network layer logical address (IP address) and the received target device's data link layer physical address as entries in the ARP cache list. Therefore, regardless of whether the target device's reply is to an ARP request sent by the operating system or to an ARP request sent using the ARP request sending method of this application, the operating system will process and store the entries in the ARP cache list.
[0036] In this embodiment, the APP request sending method further includes the following steps: The status of each entry in the ARP cache list is monitored. When an entry with an abnormal status is detected, an ARP request is sent to the target device corresponding to the abnormal entry. Here, abnormal status refers to invalid status, including expired (Stale), delayed (Delay), and probing (Probe). When an abnormal entry status is detected, multiple ARP requests are sent to the target device corresponding to the abnormal entry to increase the probability of receiving an ARP reply.
[0037] In this embodiment, commands such as Get-NetNeighbor can be used to monitor the status of ARP entries, as follows:
[0038] In this embodiment, when an entry with an abnormal state is detected, the number of ARP requests to be sent within the ARP unicast retry interval is determined based on the minimum number of transmissions. For example, using the previously calculated value of n, n ARP packets are sent within the ARP unicast retry interval. Here, the ARP unicast retry interval refers to the time required to send an ARP request via unicast after an ARP entry is found to be invalid. If no ARP reply is received after this interval, an ARP request is sent via broadcast. For example, if it is assumed that there will be 3 unicast requests after a typical ARP entry ages, with each unicast interval being 1 second, then the ARP unicast retry interval is 2 seconds.
[0039] In this embodiment, step S140: sending an ARP request to the target device based on the transmission interval includes the following steps: Determine whether a valid entry for the target device exists in the ARP cache list. This entry is configured to store the correspondence between the network layer logical address and the data link layer physical address. If it exists, an ARP request is sent to the target device via unicast based on the sending interval. After sending the ARP request, if the target device successfully receives the ARP request, it will send an ARP reply, which carries the MAC address of the target device. If the target device does not exist, an ARP request is broadcast to all devices in the target device's network at regular intervals. After broadcasting the ARP request, if the target device successfully receives it, it will send an ARP reply containing the target device's MAC address. Additionally, if a network device's neighboring devices have already established communication with the target device, they can also reply to the ARP request, providing their known MAC address. The network device can store either the target device's replying MAC address in its ARP cache or the neighboring device's replying MAC address in its ARP cache.
[0040] In this embodiment, the ARP request sending method is deployed on the participating terminals in the video conference; that is, the network device executing the ARP request sending method is the participating terminal. The participating terminal itself has an operating system and a conference system deployed, and the ARP request sending method is deployed within the conference system. In existing video conferencing communication methods, if the video conference lasts for a long time, after the ARP lifecycle of an entry in the ARP cache list expires, the operating system of the participating terminal will actively send an ARP unicast or broadcast to the target device to update the ARP lifecycle. However, in a high packet loss environment, a limited number of ARP requests and replies may be lost. Thus, the entry in the ARP cache list may need to wait a set time before being re-requested or may be directly deleted, resulting in the inability to send audio and video streams normally.
[0041] By employing the ARP request sending method of this application, in addition to the ARP request update of ARP entries sent by the operating system of the participating terminal, a method is further added to calculate the sending interval based on the packet loss rate and send ARP requests based on this sending interval. The target terminal will not only receive ARP requests sent by the operating system of the participating terminal, but also ARP requests sent using the method of this application. Moreover, in scenarios with high packet loss rates, the sending interval of the method of this application is smaller, and the number of ARP requests sent within an ARP lifecycle is greater, increasing the probability of successfully receiving the MAC address reply from the target device within an ARP lifecycle. This greatly ensures that ARP entries remain within their valid ARP lifecycle, reducing the probability of data stream transmission interruption due to ARP aging and guaranteeing the normal transmission of audio and video data. In scenarios with low packet loss rates, the minimum number of transmissions can be reduced accordingly, and the sending interval of sending ARP requests to the target device within an ARP lifecycle can be extended accordingly, reducing the communication burden on network devices.
[0042] In this embodiment, the ARP request sending method further includes the following steps: When a participating terminal joins the meeting, it sends multiple ARP requests to the target device based on the minimum number of transmissions. Since the remaining ARP lifetime of the corresponding entry in the ARP cache list is unknown at the time of joining, n ARP requests can be sent directly within a preset fast transmission time to update the ARP lifetime. For example, if an ARP request is sent once per second, then n ARP requests will be sent quickly within n seconds, and n seconds corresponds to the preset fast transmission time. Specifically, when a participating terminal joins the meeting, after obtaining the first packet loss rate statistics and calculating the minimum number of transmissions based on that rate, it can send n ARP requests within the preset fast transmission time, which is less than the ARP lifetime.
[0043] In this embodiment, since the ARP request sending method is deployed in the conferencing system rather than the operating system, it is necessary to obtain the IP address and data link layer physical address of the participating terminals and the IP address and data link layer physical address of the target device from the operating system before constructing the ARP request. Specifically, before step S140: sending the ARP request to the target device based on the sending interval, the following steps are also included: the participating terminals obtain their IP address and data link layer physical address, as well as the IP address and data link layer physical address of the target device. If the data link layer physical address of the target device can be obtained at this time, a unicast ARP request is constructed based on this obtained information and sent to the target device; if the data link layer physical address of the target device cannot be obtained at this time, the data link layer physical address of the target device is set to a default value, and a broadcast ARP request is constructed based on other obtained information and sent to the target device and other neighboring devices.
[0044] In one embodiment of this application, taking the target device as a gateway device as an example, the ARP request method may include the following steps: (1) The participating terminal obtains the terminal IP address, denoted as terminal_ip, and obtains the terminal MAC address, denoted as terminal_mac; (2) The participating terminal obtains the gateway device IP address, denoted as gateway_ip, and obtains the gateway MAC address, denoted as gateway_mac. If the gateway MAC address is not obtained, gateway_mac is set to the default value. (3) When a participating terminal joins the meeting, steps S110 and S120 are executed to calculate the minimum number of transmissions, and multiple ARP requests are sent to the target device according to the minimum number of transmissions. The operating system of the participating terminal is configured to store the corresponding ARP cache entry based on the MAC address of the target device in the received ARP reply, and the conference system of the participating terminal communicates with the target device based on the MAC address of the target device. (4) During the data communication process, steps S110~S140 are executed to dynamically update the minimum number of transmissions and the transmission interval based on the packet loss rate. The interval for sending ARP requests to the target device is controlled based on the transmission interval. The operating system of the participating terminal is configured to update the corresponding ARP cache entry based on the MAC address of the target device in the received ARP reply, so that the conference system can maintain continuous communication with the target device based on the cached ARP entry. At the same time, the participating terminal continuously monitors the status of the cached ARP entry. When an abnormal status is detected, multiple ARP requests are sent to the target device in a short period of time to further increase the probability of receiving ARP replies.
[0045] like Figure 3 As shown in the illustration, this application also provides an ARP request sending system for implementing the ARP request sending method of the first aspect. The system includes: The packet loss rate acquisition module M100 is used to acquire the current packet loss rate; The number of transmissions determination module M200 is used to determine the minimum number of transmissions corresponding to the current packet loss rate based on the preset correlation between the packet loss rate and the minimum number of ARP request transmissions; in the correlation, the higher the packet loss rate, the higher the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with the target device's data link layer physical address; The interval determination module M300 is used to calculate the sending interval of ARP requests based on the minimum number of transmissions and the preset ARP lifecycle, so that when ARP requests are sent using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions. The request sending module M400 is used to send ARP requests to the target device based on the sending interval.
[0046] By employing the APP request sending system of this application, the packet loss rate acquisition module M100 counts the current packet loss rate, and the number of transmissions determination module M200 determines the minimum number of transmissions based on the packet loss rate. The interval determination module M300 further calculates the transmission interval based on the minimum number of transmissions and the length of the ARP lifecycle. In scenarios with high packet loss rates, the minimum number of transmissions is increased accordingly, which shortens the transmission interval for sending ARP requests to the target device within one ARP lifecycle. The request sending module M400 sends ARP requests to the target device based on the transmission interval, thereby increasing the probability of successfully sending ARP requests and successfully receiving ARP replies from the target device within one ARP lifecycle. This alleviates the problem of communication interruption caused by ARP cache loss in scenarios with high packet loss rates and improves the smoothness of network communication.
[0047] In the ARP request sending system of this application, the functions of each module can be implemented using the specific implementation method of the ARP request sending method described above, which will not be elaborated here.
[0048] This application also provides an ARP request sending device, including a processor; a memory storing executable instructions of the processor; wherein the processor is configured to perform the steps of the ARP request sending method by executing the executable instructions.
[0049] Those skilled in the art will understand that various aspects of this application can be implemented as systems, methods, or computer program products. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "platform."
[0050] The following reference Figure 4 To describe an electronic device 600 according to this embodiment of the present application. Figure 4 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0051] like Figure 4 As shown, the electronic device 600 is presented in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including storage unit 620 and processing unit 610), a display unit 640, etc.
[0052] The storage unit stores program code that can be executed by the processing unit 610, causing the processing unit 610 to perform the steps described in the ARP request sending method section of this specification according to various exemplary embodiments of this application. For example, the processing unit 610 can perform actions such as... Figure 1 The steps are shown in the figure.
[0053] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only memory unit (ROM) 6203.
[0054] The storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0055] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0056] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. Network adapter 660 can communicate with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0057] In the ARP request sending device, when the program in the memory is executed by the processor, it implements the steps of the ARP request sending method. Therefore, the device can also obtain the technical effects of the ARP request sending method.
[0058] An exemplary embodiment of this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the ARP request sending method described above.
[0059] In one embodiment, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. Exemplarily, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0060] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0061] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, C++, and Python. Program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0062] Computer programs can be carried or transmitted via signals such as electrical, magnetic, optical, electromagnetic, and infrared rays. Electronic devices can convert signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, the processor of the electronic device to execute) the method steps of various exemplary embodiments of this application, such as the steps of the ARP request sending method described above.
[0063] When the computer program is executed by the processor, it implements the steps of the ARP request sending method described above. Therefore, the computer program product can also obtain the technical effects of the ARP request sending method described above.
[0064] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of this application and should not be construed as limiting the specific implementation of this application to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of this application, and all such modifications or substitutions should be considered within the scope of protection of this application.
Claims
1. A method for sending ARP requests, characterized in that, Includes the following steps: Get the current packet loss rate; Based on the preset correlation between packet loss rate and minimum number of ARP request transmissions, the minimum number of transmissions corresponding to the current packet loss rate is determined. In the aforementioned association, the higher the packet loss rate, the greater the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with its data link layer physical address; The ARP request sending interval is calculated based on the minimum number of sending times and the preset ARP lifecycle, so that when sending ARP requests using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of sending times. ARP requests are sent to the target device based on the specified sending interval.
2. The ARP request sending method according to claim 1, characterized in that, The current packet loss rate includes the uplink packet loss rate and the downlink packet loss rate; The step of determining the minimum number of transmissions corresponding to the current packet loss rate based on a preset correlation between the packet loss rate and the minimum number of ARP request transmissions includes the following steps: The probability of a single packet success is calculated based on the uplink packet loss rate and the downlink packet loss rate, and is used as the single packet success probability. The minimum number of transmissions n is calculated based on the single packet success probability and the preset probability threshold, so that the combined probability of the single packet success of n ARP requests is greater than or equal to the preset probability threshold.
3. The ARP request sending method according to claim 1, characterized in that, It also includes the following steps: Monitor the status of each entry in the ARP cache list. When an entry with an abnormal status is detected, send an ARP request to the target device corresponding to the abnormal entry.
4. The ARP request sending method according to claim 3, characterized in that, When an entry with an abnormal state is detected, the number of ARP requests to be sent within the ARP unicast retry interval is determined based on the minimum number of transmissions.
5. The ARP request sending method according to claim 1, characterized in that, Sending an ARP request to the target device based on the transmission interval includes the following steps: Determine whether there is a valid entry for the target device in the ARP cache list. The entry is configured to store the correspondence between the network layer logical address and the data link layer physical address. If it exists, an ARP request is sent to the target device via unicast based on the specified sending interval. If it does not exist, an ARP request will be sent to all devices in the network where the target device is located via broadcast, based on the specified sending interval.
6. The ARP request sending method according to claim 1, characterized in that, The method is deployed in the participating terminals of a video conference; before sending an ARP request to the target device based on the sending interval, it further includes the following steps: the participating terminal obtains the IP address and data link layer physical address of the participating terminal and the IP address and data link layer physical address of the target device.
7. The ARP request sending method according to claim 1, characterized in that, This method is deployed on the participating terminals of a video conference; the method also includes the following steps: When a participating terminal joins the meeting, it sends multiple ARP requests to the target device according to the minimum number of transmissions.
8. An ARP request sending system, characterized in that, The system for implementing the ARP request sending method according to any one of claims 1 to 7, the system comprising: The packet loss rate acquisition module is used to obtain the current packet loss rate; The number of transmissions determination module is used to determine the minimum number of transmissions corresponding to the current packet loss rate based on a preset correlation between the packet loss rate and the minimum number of transmissions for Address Resolution Protocol (ARP) requests; in the correlation, the higher the packet loss rate, the higher the corresponding minimum number of transmissions; the ARP request is used to request the target device to reply with the data link layer physical address of the target device; An interval determination module is used to calculate the sending interval of ARP requests based on the minimum number of transmissions and a preset ARP lifecycle, so that when ARP requests are sent using the sending interval, the number of ARP requests sent within one ARP lifecycle is greater than or equal to the minimum number of transmissions. The request sending module is used to send an ARP request to the target device based on the sending interval.
9. An ARP request sending device, characterized in that, include: processor; A memory in which executable instructions of the processor are stored; The processor is configured to perform the steps of the ARP request sending method according to any one of claims 1 to 7 by executing the executable instructions.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the ARP request sending method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Reliable routing method of mobile Ad hoc network
CN101534520A
Velocity adjust method, device and network equipment
CN102630095A
Heterogeneous multimode gateway device, and transmission method and application thereof
CN107018070A
Method and device for preventing address resolution protocol (ARP) attacks, as well as computer equipment and storage medium
CN108234522A
Method and device for sending retransmission request, data receiving end equipment and storage medium
CN116112128A