Method and device for determining forwarding link in weak communication network and electronic equipment

By calculating link latency and bandwidth information in weakly connected networks, transmission capacity parameters are determined and prioritized, solving the problems of data loss and latency, and achieving reliable data transmission on the optimal link.

CN121530907APending Publication Date: 2026-02-13北京东土军悦科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311637618.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing operational networks cannot effectively reflect the true transmission capacity of links in weakly connected networks, leading to data loss and latency issues.

Method used

Transmission capacity parameters are calculated by acquiring link latency and bandwidth information, and target forwarding links are determined according to parameter priority. The forwarding link table is updated regularly to ensure that data is transmitted on the optimal link.

Benefits of technology

This greatly reduces data loss and latency, ensuring reliable data transmission in weakly connected networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121530907A_ABST
    Figure CN121530907A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for determining a forwarding link in a weak Unicom network and electronic equipment, the method is applied to network equipment in the weak Unicom network in which multiple links are connected, and the method for determining the forwarding link in the weak Unicom network comprises the following steps: obtaining link time delay information and link bandwidth information of multiple links; calculating a transmission capability parameter of each link according to the link time delay information and the link bandwidth information; and performing priority ranking on the plurality of links according to the transmission capability parameters, and taking the first priority link as a target forwarding link. According to the technical scheme provided by the embodiment of the invention, the transmission capability parameter of each link is calculated by adopting the link time delay information and the link bandwidth information, and the link with the strongest transmission capability is used as the target forwarding link according to the transmission capability parameter of each link, so that the data can be transmitted on the real optimal link; the problems of data loss, large time delay and the like are greatly reduced, and the method adapts to a weak communication network scene.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of weak connectivity network, and particularly relate to a method and device for determining a forwarding link in a weak connectivity network and an electronic device. BACKGROUND

[0002] The combat network is a communication network connected by transmission, exchange, terminal and various security equipment, which guarantees the military to complete various military activities. The combat network can provide various communication services such as voice, data, fax and image, and is an information transmission platform for various military application systems such as military command and control, intelligence reconnaissance, early warning detection, electronic countermeasures, logistics support and daily office business processing.

[0003] The existing combat network adopts various types of communication modes to ensure the reliability of transmission, and often encounters various complex situations in real combat scenarios, resulting in poor network transmission quality, which cannot meet the real-time transmission and data integrity transmission. The commonly used link selection scheme for the two-layer multi-link transmission network is the spanning tree protocol, which mainly relies on the BPDU (Bridge Protocol Data Unit) protocol to select the forwarding link. The protocol obtains the optimal link according to the calculation of different link cost values, and cannot reflect the real transmission capacity of each transmission link in the weak connectivity network scenario. When the business data is transmitted on the optimal link obtained according to the cost value, problems such as data loss and delay may occur. SUMMARY

[0004] Embodiments of the present application provide a method and device for determining a forwarding link in a weak connectivity network, which solves the problem that data loss and delay may occur.

[0005] To achieve the above-mentioned purpose, in a first aspect, the present application provides a method for determining a forwarding link in a weak connectivity network, applied to a network device in a weak connectivity network connected by multiple links, the method comprising:

[0006] obtaining link delay information and link bandwidth information of multiple links;

[0007] calculating a transmission capacity parameter of each link according to the link delay information and the link bandwidth information;

[0008] performing priority sorting on the multiple links according to the transmission capacity parameter, and taking a first priority link as a target forwarding link.

[0009] In an embodiment of the present application, the transmission capacity parameter is directly proportional to the link bandwidth information, and inversely proportional to the link delay information.

[0010] In an embodiment of the present application, the calculating the transmission capability parameter of each link according to the link delay information and the link bandwidth information comprises:

[0011] obtaining link state information of each link, and calculating a transmission capability parameter of each link according to the link state information of each link, the link delay information and the link bandwidth information.

[0012] In an embodiment of the present application, the calculating the transmission capability parameter of each link according to the link state information of each link, the link delay information and the link bandwidth information comprises:

[0013] calculating the transmission capability parameter of each link according to the formula P n = Link n (k / Delay n + g*BW n ), wherein P n represents the transmission capability parameter corresponding to link n, Delay n represents the delay information of link n, BW n represents the bandwidth information of link n, k represents a preset delay configuration parameter, g represents a preset bandwidth configuration parameter, Link n represents the link state information of link n, wherein Link n = 1 when the link state of link n is connected, and Link n = 0 when the link state of link n is not connected.

[0014] In an embodiment of the present application, the prioritizing the multiple links according to the transmission capability parameter and taking a first priority link as a target forwarding link comprises:

[0015] sequentially sorting the transmission capability parameters of each connected link in descending order, and taking a first priority link at the top of the sorting as a target forwarding link.

[0016] In an embodiment of the present application, the obtaining link delay information and link bandwidth information of multiple links comprises:

[0017] taking the difference between the transmission delay of a probe packet leaving a local network device through each link and returning to the local network device again through the corresponding link and the stay delay of the probe packet at a peer network device as the link delay information of each link;

[0018] taking the larger value between the first bandwidth information of each link counted by the local network device and the second bandwidth information of each link fed back by the peer network device as the link bandwidth information of the corresponding link.

[0019] In an embodiment of the present application, the method for determining a forwarding link in a weak connectivity network further comprises:

[0020] periodically updating the target forwarding link, and updating a forwarding link summary table according to the updated target forwarding link, the forwarding link summary table comprising at least the target forwarding link of each update.

[0021] In a second aspect, the present application provides a device for determining a forwarding link in a weak connectivity network, comprising an acquisition module, a calculation module and a determination module. The acquisition module is configured to acquire link delay information and link bandwidth information of a plurality of links; the calculation module is configured to calculate a transmission capability parameter of each link according to the link delay information and the link bandwidth information; and the determination module is configured to prioritize the plurality of links according to the transmission capability parameter, and take a first priority link as a target forwarding link.

[0022] In a third aspect, the present application provides an electronic device, comprising:

[0023] at least one processor; and

[0024] a memory in communication with the at least one processor;

[0025] wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for determining a forwarding link in a weak connectivity network as described above.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium comprising a computer program and instructions, which, when executed on a computer, cause the computer to perform the method for determining a forwarding link in a weak connectivity network as described above.

[0027] Compared with the prior art, the method and device for determining a forwarding link in a weak connectivity network according to the present application calculate a transmission capability parameter of each link using link delay information and link bandwidth information, and take a link with the strongest transmission capability as a target forwarding link according to the transmission capability parameter of each link, which can ensure data transmission on a real optimal link, greatly reducing problems such as data loss and large delay, and is suitable for a weak connectivity network scenario. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 is a flowchart of a method for determining a forwarding link in a weak connectivity network according to an embodiment of the present application;

[0029] Figure 2Fig. 1 is a structural schematic diagram of a device for determining a forwarding link in a weakly connected network according to Embodiment Two of the present application;

[0030] Figure 3 Fig. 2 is a network architecture schematic diagram of a weakly connected network according to Embodiments One and Two of the present application;

[0031] Figure 4 Fig. 3 is a structural schematic diagram of an electronic device according to Embodiment Three of the present application;

[0032] Figure 5 Fig. 4 is a logic flow schematic diagram of a method for determining a forwarding link in a weakly connected network according to a specific embodiment of the present application;

[0033] Figure 6 Fig. 5 is a working principle schematic diagram of a probe packet according to a specific embodiment of the present application. DETAILED DESCRIPTION

[0034] The embodiments of the present application will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the embodiments of the present application, and not to limit the embodiments of the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the embodiments of the present application are shown in the drawings, rather than all the structures.

[0035] For the convenience of understanding, first, the main implementation concept of each embodiment of the present application is simply described.

[0036] The bridge protocol data unit (BPDU, Bridge Protocol Data Unit) spanning tree protocol is a bridge nesting protocol, defined in IEEE 802.1d specification, which can be used to eliminate bridge loops. Its working principle is as follows: the spanning tree protocol defines a data packet called bridge protocol data unit BPDU (Bridge Protocol Data Unit). Bridges use BPDU to communicate with each other, and use the related functions of BPDU to dynamically select root bridges and backup bridges. However, because there is only one path from the center bridge to any network segment, the bridge loop is eliminated. In a spanning tree environment, bridges do not immediately start forwarding functions, they must first select a bridge as a root bridge, and then establish a designated path. The bridge with the lowest bridge ID in a network will become a root bridge, and there is only one root bridge in the entire spanning tree network.

[0037] When the selected root bridge, before forwarding the data packet, they must decide each network segment designated bridge, using the algorithm of spanning tree, root bridge every 2 seconds from its all ports send BPDU packet, BPDU packet is copied by all bridges from their root ports, root port is the bridge port of the root bridge. BPDU includes information called port COST, network administrator assigns port COST to all bridge ports, when the root bridge sends BPDU, the root bridge sets its port value to zero. Then along the path, the next bridge increases its configuration port COST to a value, which is the value of it receiving and forwarding data packet to the next network segment. In this way, each bridge increases its port COST value to the COST value of the received BPDU packet, all bridges detect their port COST value, the bridge with the lowest port COST value becomes the designated bridge. The bridge with higher port COST value sets its port into the blocking state, becomes a backup bridge. In the blocking state, a bridge stops forwarding, but it will continue to receive and process BPDU packets.

[0038] The existing BPDU protocol determines the optimal link by calculating the cost value of multiple links, and the cost value is related to the transmission bandwidth, the larger the transmission bandwidth, the smaller the cost value, which cannot fully reflect the real transmission capacity of the link, and cannot guarantee the data transmission on the real optimal link.

[0039] The inventor finds the technical defects as described in the foregoing background, and hopes to find a way to flexibly select the link in the weak connectivity network based on the BPDU protocol. Based on this, the inventor creatively proposes a method and device for determining a forwarding link in a weak connectivity network, which guarantees that data is always transmitted on the optimal link in the weak connectivity network, greatly reducing the transmission information loss caused by data loss and large delay.

[0040] Embodiment one

[0041] Figure 1 is a flowchart of a method for determining a forwarding link in a weak connectivity network in the embodiment one of the present application, as Figure 1 shown, the embodiment one provides a method for determining a forwarding link in a weak connectivity network, applied to a network device in a weak connectivity network 301 connected by multiple links.

[0042] Specifically, as Figure 3As shown, the weakly connected network 301 includes a local network device 302 and a peer network device 303 connected by four links, but the embodiment is not limited thereto, and any number of links and any number of peer network devices 303 can be used, as long as the local network device 302 is connected to the peer network device 303 through multiple links. The peer network device 303 can also be multiple. The four links are the first link, the second link, the third link, and the fourth link in the weakly connected network 301, which can be any one of an Ethernet link, a 5G network link, and a satellite network link. Figure 3 The local network device 302 can be a root bridge (also a root switch), and the link preference protocol is generated by modifying the BPDU protocol. The peer network device 303 can be a backup bridge (also a backup switch).

[0043] The method for determining a forwarding link in the weakly connected network includes the following steps.

[0044] In step S100, link delay information and link bandwidth information of multiple links are obtained.

[0045] The link delay information is the time consumption of a message in the corresponding link, and the smaller the link delay, the faster the message is transmitted in the corresponding link. Specifically, the link delay information of multiple links is obtained by S110, which is the difference between the transmission delay of a probe message leaving the local network device 302 through each link and returning to the local network device 302 again through the corresponding link and the dwell delay of the probe message in the peer network device 303.

[0046] In one specific embodiment, when the local network device 302 sends a probe message to the peer network device 303 through each link, it reads its own timestamp L n T1, the peer network device 303 obtains the timestamp L n T2 when the probe message leaves the peer network device 303, and the local network device 302 obtains the timestamp L n T3 when the probe message returns to the local network device through the corresponding link. According to the timestamps L n T1, L n T2, L n T3, and L n T4, the link delay information of each link is calculated, and the link delay of each link is specifically calculated as follows. n Delay n = (L n T4-Ln T1)-(L n T3-L n T2),Delay n The link delay of link n is represented. It should be noted that the probe message fed back by the opposite network device 303 can be different from the message sent by the local network device 302, and at this time the opposite network device 303 will load the obtained timestamp L n T2, L n T3 in the feedback probe message, and the timestamp L n T1 carried in the probe message sent by the local network device 302, and the timestamp L n T1 is also loaded in the feedback probe message, so that the local network device 302 obtains the timestamp L n T4 according to the timestamp L n T1, L n T2, L n T3 in the feedback probe message of the opposite network device 303, and calculates the link delay information according to the timestamps L

[0047] The link bandwidth information represents the transmission rate of the link, and the higher the bandwidth, the higher the transmission capacity. Specifically, obtaining the link bandwidth information includes: taking the larger value between the first bandwidth information of each link counted by the local network device 302 and the second bandwidth information of each link fed back by the opposite network device 303 as the link bandwidth information of the corresponding link.

[0048] In one of the specific embodiments, when the local network device 302 sends the probe message to the opposite network device 303 in each link, the probe message carries the link bandwidth information L n B1 of each link, and the opposite network device 303 loads the link bandwidth information L n B2 of each corresponding link counted by itself into the probe message to reply to the local network device 302. n B2 in the probe message to the local network device 302, and the local network device 302 or the opposite network device 303 selects the larger link bandwidth information from the link bandwidth information L n B1 and L n B2 as the link bandwidth information of each corresponding link. It should be noted that the probe message sent by the local network device 302 and the probe message fed back by the opposite network device 303 can be the same or different, as long as each corresponding link carries the link bandwidth information.

[0049] Step S200, calculating the transmission capacity parameter of each link according to the link delay information and the link bandwidth information.

[0050] Since the link delay information indicates the time consumption of the message transmission on the corresponding link, and the link bandwidth information indicates the transmission rate of the link, the transmission capacity parameter representing the transmission performance of each link can be calculated according to the two parameters.

[0051] Specifically, the transmission capacity parameter is proportional to the link bandwidth information, and the transmission capacity parameter is inversely proportional to the link delay information, that is, P n = k / Delay n + g*BW n Since the smaller the link delay is, the faster the message transmission on the corresponding link is, and the higher the bandwidth is, the faster the transmission capacity rate is, the transmission capacity parameter of each link can be calculated according to the two parameters. It should be noted here that it is assumed that each link is connected, that is, it is assumed that each link can transmit the message.

[0052] Step S300: Prioritizing the plurality of links according to the transmission capacity parameter, and taking the first priority link as the target forwarding link.

[0053] Since the transmission capacity parameter can represent the transmission capacity of each link, the plurality of links are sorted, and the link with the strongest transmission capacity (i.e., the first priority link) is taken as the target forwarding link to forward the message data. Specifically, the transmission capacity parameters of each connected link are sorted in descending order, and the first priority link at the top of the sorting is taken as the target forwarding link.

[0054] Based on the above analysis, the transmission capacity parameter of each link is calculated by obtaining the link bandwidth information and the link delay information of each link, and the plurality of links are prioritized, so that the optimal link (the first priority link) in the current weakly connected network 301 can be obtained to forward the service data, thereby ensuring that the service data is transmitted best and fastest, and ensuring that the service data is not lost.

[0055] In one embodiment, step S200 further includes: S210, obtaining link state information of each link, and calculating the transmission capacity parameter of each link according to the link state information of each link, the link delay information and the link bandwidth information.

[0056] In actual link transmission, there may be a state that the link is not connected. At this time, the link state information needs to be combined to determine the transmission capacity of the link. For example, if the link state information of a link is obtained as not connected, the transmission capacity parameter of the link is directly determined as 0, that is, the link has no transmission capacity, thereby further accurately reflecting the transmission capacity of each link.

[0057] The specific method for judging the link state is that the local network device 302 sends a probe packet to the opposite network device 303, and when the local network device 302 does not receive the feedback of the opposite network device 303 within a preset packet period (for example, three packet periods) through a certain link, the link state information of the link is set to be not connected; if the feedback of the opposite network device 303 is received within a preset packet period through a certain link, it is determined that the link state information of the link is connected.

[0058] Further, S210 specifically comprises: calculating the transmission capacity parameter of each link according to the formula P n = Link n (k / Delay n + g*BW n ), wherein P n represents the transmission capacity parameter corresponding to the link n, Delay n represents the time delay information of the link n, BW n represents the bandwidth information of the link n, k represents a preset time delay configuration parameter, g represents a preset bandwidth configuration parameter, Link n represents the link state information of the link n, wherein when the link state of the link n is connected, Link n = 1, and when the link state of the link n is not connected, Link n = 0.

[0059] In one of the embodiments, the method further comprises: S400, periodically updating the target forwarding link, and updating the forwarding link summary table according to the updated target forwarding link, wherein the forwarding link summary table at least includes the target forwarding link of each update.

[0060] Because of the priority of the BPDU protocol transmission, the optimal link will not change as long as the current link can forward the BPDU packet after the optimal link is determined, and it is impossible to guarantee that the data is always transmitted on the optimal link. To solve this problem, the target forwarding link can be periodically re-determined according to the demand, for example, when a preset period is reached, the steps S100 to S300 are re-executed to obtain a new target forwarding link, and the data is forwarded using the new target forwarding link, so as to guarantee that the business data can be always transmitted on the optimal link in the weakly connected network 301, and further guarantee that the business data is transmitted best and fastest.

[0061] Specifically, the forwarding link summary table can further include a link number, a transmission capability parameter (including link state information, link delay information and link bandwidth information), and a log record. The link number represents a unique identification of a link, the transmission capability parameter corresponds to the link number, and the log record is automatically generated by the local network device 302. The log record reflects the process of determining a target forwarding link by the local network device 302 and the process of updating a new target forwarding link, for example, when the local network device 302 determines a new first priority link as a new target forwarding link, the forwarding link summary table is updated accordingly. Regardless of whether the new target forwarding link is the same as the target forwarding link in the forwarding link summary table, the new target forwarding link is recorded in the forwarding link summary table. That is, even if the new target forwarding link is the same as the target forwarding link in the forwarding link summary table, the transmission capability parameter of the new target forwarding link is recorded in the transmission capability parameter of the link corresponding to the link number. For example, the new target forwarding link is the first link, and the current target forwarding link in the forwarding link summary table is also the first link. Although they are both the first link, the transmission capability parameter of the new target forwarding link can be different from that of the current target forwarding link. Therefore, the new target forwarding link needs to be recorded in the forwarding link summary table every time. When the forwarding link summary table is updated, the local network device 302 can send a reminder message to the administrator (to remind the administrator that the forwarding link summary table has update information). When the administrator checks the forwarding link summary table, the detailed information of each link can be clearly known, such as the link number of each link, the link bandwidth information, the link delay information, the link state information and the transmission capability parameter corresponding to each link, etc. This facilitates the administrator to analyze, manage and evaluate the network, for example, the transmission capability of the first link, the second link, the third link and the fourth link in a specific time period can be statistically analyzed, such as the strongest transmission capability, the smallest transmission delay and the largest transmission bandwidth.

[0062] In a specific embodiment, as Figures 5 to 6In actual application, the local network device 302 enables the link preference protocol to send the probe packet to the opposite network device 303 through the first link, the second link, the third link and the fourth link, that is, the same probe packet is sent on each link; the opposite network device 303 receives the four probe packets through the first link, the second link, the third link and the fourth link, and feeds back the received four probe packets respectively (through the same link as the received probe packet) to the local network device 302; at this time, the local network device 302 can obtain the link delay information and the link bandwidth information of the first link, the second link, the third link and the fourth link.

[0063] Specifically, taking the first link L1 as an example (the second link, the third link and the fourth link have the same implementation as the first link, which will not be described here), as shown in Figure 6 When the probe packet sent by the local network device reaches the opposite network device 303 through the first link, the probe packet at this time includes the first time stamp L1T1 and the first bandwidth information L1B1; the opposite network device 303 obtains the current second time stamp L1T2 when receiving the probe packet, and obtains the current third time stamp L1T3 and the second bandwidth information L1B2 of the first link when the opposite network device 303 replies the probe packet to the local network device 302 through the first link, and sends the first time stamp L1T1, the first bandwidth information L1B1, the second time stamp L1T2, the third time stamp L1T3 and the second bandwidth information L1B2 obtained from the probe packet to the local network device 302 through the reply probe packet; wherein the first time stamp L1T1 is the time when the probe packet leaves the local network device 302, the second time stamp L1T2 is the time when the probe packet reaches the opposite network device 303, the third time stamp L1T3 is the time when the reply probe packet leaves the opposite network device 303, and the fourth time stamp L1T4 is the time when the feedback probe packet reaches the local network device 302; wherein the first bandwidth information L1B1 is the link bandwidth information of the first link counted by the local network device 302 (which can be obtained by port flow counting of the local network device 302), and the second bandwidth information L1B2 is the link bandwidth information of the first link counted by the opposite network device 303 (which can be obtained by port flow counting of the opposite network device 303).

[0064] At this time, the local network device 302 can calculate the link delay information and the link bandwidth information of the first link through the following formula (1) and formula (2):

[0065] Delay1=(L1T4-L1T1)-(L1T3-L1T2) (1)

[0066] wherein, Delay1 represents the link delay of the first link, (L1T4-L1T1) represents the transmission delay of the probe packet leaving the local network device 302 through the first link and returning to the local network device 302 through the first link again, (L1T3-L1T2) represents the stay delay of the probe packet transmitted through the first link in the opposite network device 303; wherein, the link delay of the first link represents the time consumption of the packet in the first link transmission, the smaller the link delay, the faster the packet transmission in the first link.

[0067] BW1 = MAX(L1B1, L1B2) (2)

[0068] wherein, BW1 represents the link bandwidth of the first link, L1B1 represents the first bandwidth information of the first link, L1B2 represents the second bandwidth information of the first link, MAX(L1B1, L1B2) represents the maximum value of the first bandwidth information and the second bandwidth information; wherein, the link bandwidth of the first link represents the transmission rate of the first link, the greater the bandwidth (bandwidth value), the higher the transmission capacity of the first link.

[0069] Based on the above analysis, the host network device obtains the link delay information and the link bandwidth information of the multiple links through the communication interaction with the opposite network device 303, and further obtains the two key information of the link delay information and the link bandwidth information which the service data actually depends on when forwarding in each link.

[0070] In the embodiment, the host network device can calculate the transmission capacity parameter of each link according to the link delay information and the link bandwidth information of each link calculated above; wherein, the transmission capacity parameter of each link is proportional to its link bandwidth information, and the transmission capacity parameter of each link is inversely proportional to its link delay information, because the smaller the link delay, the faster the packet transmission in the first link, the higher the bandwidth, and the faster the transmission capacity rate, so the transmission capacity parameter of each link can be calculated according to the two parameters; wherein, it is assumed that each link is connected, i.e. it is assumed that each link can transmit packets.

[0071] However, in actual link transmission, there may be a state of non-connection of the link, so it is necessary to determine the transmission capacity of each link in combination with the link state information, for example, if the link state information of the second link is obtained as non-connection, the transmission capacity parameter of the second link is directly determined as 0, i.e. the second link has no transmission capacity, so that the transmission capacity of each link can be further quickly and accurately reflected.

[0072] That is, when calculating the transmission capability parameters of the first link, the second link, the third link and the fourth link, the link state information of each link needs to be combined, that is, the master network device needs to obtain the link state information of each link, and calculate the transmission capability parameters of each link according to the link state information of each link, the link delay information and the link bandwidth information.

[0073] Specifically, obtaining the link state information of each link may, for example, adopt the following manner:

[0074] Firstly, the probe message plays a role in detecting whether the link is connected and obtaining the link delay information and the link bandwidth information. The probe message sent by the local network device 302 to the opposite network device 303, when the local network device 302 does not receive the feedback of the opposite network device 303 within a preset message period (for example, three message periods) through the third link, for example, the link state information of the third link is set to be not connected (for example, Link3=0, 3 represents the link number (the third link), and 0 represents the link state of not connected), at this time, the local network device and the opposite network device cannot obtain the link delay information and the link bandwidth information of the corresponding link through the probe message; if the feedback of the opposite network device 303 is received through the fourth link within the preset message period, it is determined that the link state information of the fourth link is connected (for example, Link4=1, 4 represents the link number (the fourth link), and 1 represents the link state of connected), at this time, the local network device and the opposite network device obtain the link delay information and the link bandwidth information of the corresponding link through the probe message (for details, refer to the foregoing, which will not be described here). This method can obtain all parameters for calculating the link transmission capability by sending one message, which is simple and convenient.

[0075] Wherein, the link bandwidth information, the link delay information and the link state information of the plurality of links are stored in the local network device 302 (for example, in the forwarding link summary table in the local network device 302), for example, if the link bandwidth information, the link delay information or the link state information of the first link changes, the local network device 302 can automatically update the corresponding information in the forwarding link summary table, which is convenient for subsequent analysis and management.

[0076] Secondly, before the local network device 302 sends the probe message to the opposite network device 303, it is determined whether the link state of each link is connected, that is, the probe connection message for determining whether the link is connected is separated from the subsequent probe message, and after the link state information of the plurality of links is determined, the probe message is sent to the link with the connected link state information, so as to reduce the calculation of the non-connected link.

[0077] Specifically, taking the first link as an example, the master network device can calculate the transmission capability parameter of the first link (the calculation methods of the second link, the third link and the fourth link are the same as that of the first link, which will not be described here) through the following formula (3):

[0078] P1 = Link1 (k / Delay1 + g*BW1) (3)

[0079] wherein, P1 represents the transmission capability parameter corresponding to the first link, Delay1 represents the time delay information of the first link, BW1 represents the bandwidth information of the first link, k represents a preset time delay configuration parameter, g represents a preset bandwidth configuration parameter, Link1 represents the link state information of the first link; wherein, when the link state information of the first link is connected, Link1 = 1, and when the link state information of the first link is not connected, Link1 = 0.

[0080] Based on the above analysis, it can be seen that the transmission capability parameter fully combines the link state information, the link time delay information and the link bandwidth information of each link, so as to accurately reflect the transmission capability of each link.

[0081] In the embodiment, after obtaining the transmission capability parameters of the first link, the second link, the third link and the fourth link, the master network device can sequentially sort the transmission capability parameters of each connected link in descending order, and take the first priority link with the highest order as the target forwarding link to forward the packet data.

[0082] Specifically, the local network device 302 can perform priority sorting of multiple links according to the transmission capability parameters of each link. For example, the transmission capability parameter of the first link is 10, the transmission capability parameter of the second link is 5, the transmission capability parameter of the third link is 3, and the transmission capability parameter of the fourth link is 7, so the priority sorting of multiple links is: the first link, the fourth link, the second link and the third link. The data of the link priority sorting is stored in the local network device 302, for example, in the memory or flash memory of the local network device 302. The local network device 302 selects the first priority link (the link with the highest order, i.e. the first link) as the target forwarding link to forward the packet data, and needs to set other links (i.e. the second link, the third link and the fourth link) to the blocking (Blocking) state, so as to avoid that after the service data is forwarded from the first link to the opposite network device, the opposite network device feeds back the data from the second link, the third link and the fourth link to the local network device, and the local network device mistakenly regards the service data fed back from the second link, the third link and the fourth link as new service data and retransmits the service data through the first link, thereby forming a network storm.

[0083] Based on the above analysis, by obtaining the link state information, link bandwidth information and link delay information of each link, the transmission capability parameters of each link are calculated and prioritized, so that the optimal link (first priority link) in the current weakly connected network 301 can be obtained for forwarding service data, thereby ensuring the best and fastest transmission of service data and ensuring no loss of service data.

[0084] In the present embodiment, after the local network device 302 determines the first priority link as the target forwarding link (for example, the current target forwarding link is the first link), it will periodically (preset period) continue to determine the target forwarding link. If a new target forwarding link is determined, the new target forwarding link is directly used to forward service data, so that the service data between the local network device 302 and the opposite network device 303 in the weakly connected network 301 can always be transmitted on the optimal link, thereby ensuring the best and fastest transmission of service data and ensuring no loss of service data.

[0085] Specifically, as shown in Figure 5 When the target forwarding link is determined, it needs to be continuously determined whether the preset period t is reached. When it is determined that the preset period t is reached, the transmission capability parameters P of each link are recalculated according to the link state information, the link bandwidth information and the link delay information. n According to the transmission capability parameters P n The first priority link is prioritized as the target forwarding link, and the remaining links are set to be blocked. If it is determined that the preset period t is not reached, the current target forwarding link is continued to be used to transmit service data. The purpose of setting the remaining links to be blocked (Blocking) is to avoid the data from the target forwarding link being forwarded to the opposite network device, and then the opposite network device re-feedbacks the data from other links to the local network device. The local network device will mistakenly consider the feedback message from other links as new message data and re-forward it through the target forwarding link, thereby forming a network storm. Specifically, the remaining links that are not the target forwarding link are set to be blocked, which only limits the transmission of service data by the remaining links, but does not limit the transmission of protocol messages (such as probe messages), so that these links can participate in the calculation of the transmission capability parameters in the next preset period t. Moreover, the blocked state is only set in the current preset period, and the state of each link will be reset in the next preset period.

[0086] Based on the above analysis, the target forwarding link is not always the same, but needs to be determined again according to the preset period, so that the service data is always forwarded on the optimal link.

[0087] Embodiment Two

[0088] Figure 2 is a structure diagram of a device for determining a forwarding link in a weakly connected network in Embodiment One of the present application, as shown in Figure 2 Embodiment Two provides a device for determining a forwarding link in a weakly connected network, which comprises an acquisition module 201, a calculation module 202 and a determination module 203. The acquisition module 201 is configured to acquire link delay information and link bandwidth information of a plurality of links; the calculation module 202 is configured to calculate a transmission capability parameter of each link according to the link delay information and the link bandwidth information; and the determination module 203 is configured to perform priority ranking on the plurality of links according to the transmission capability parameter, and take a first priority link as a target forwarding link.

[0089] In this embodiment, the transmission capability parameter is directly proportional to the link bandwidth information, and inversely proportional to the link delay information.

[0090] In this embodiment, the calculation module 202 comprises:

[0091] a calculation unit configured to acquire link state information of each link, and calculate a transmission capability parameter of each link according to the link state information of each link, the link delay information and the link bandwidth information.

[0092] In this embodiment, the calculation of the transmission capability parameter of each link according to the link state information of each link, the link delay information and the link bandwidth information comprises:

[0093] calculating the transmission capability parameter of each link according to a formula P n = Link n (k / Delay n + g*BW n ), wherein P n represents the transmission capability parameter corresponding to link n, Delay n represents the delay information of link n, BW n represents the bandwidth information of link n, k represents a preset delay configuration parameter, g represents a preset bandwidth configuration parameter, Link n represents the link state information of link n, wherein Link n = 1 when the link state of link n is connected, and Link n = 0 when the link state of link n is not connected.

[0094] In this embodiment, the determination module 203 comprises:

[0095] The determining unit is configured to sort the transmission capability parameters of each communication link in descending order, and take the first priority link with the highest transmission capability parameter as the target forwarding link.

[0096] In the embodiment, the obtaining module 201 comprises:

[0097] The first selecting unit is configured to take the difference between the transmission delay of the probe packet leaving the local network device 302 through each link and returning to the local network device 302 again through the corresponding link and the stay delay of the probe packet in the opposite network device 303 as the link delay information of each link.

[0098] The second selecting unit is configured to take the larger value between the first bandwidth information of each link counted by the local network device 302 and the second bandwidth information of each link fed back by the opposite network device 303 as the link bandwidth information of the corresponding link.

[0099] In the embodiment, the device for determining the forwarding link in the weakly connected network further comprises:

[0100] The updating module is configured to update the target forwarding link periodically, and update the forwarding link summary table according to the updated target forwarding link, wherein the forwarding link summary table at least comprises the target forwarding link of each update.

[0101] The various variations and specific examples of the method for determining the forwarding link in the weakly connected network provided in Embodiment One are also applicable to the device for determining the forwarding link in the weakly connected network provided in the present embodiment. Through the foregoing detailed description of the method for determining the forwarding link in the weakly connected network, those skilled in the art can clearly know the implementation of the device for determining the forwarding link in the weakly connected network in the present embodiment. Therefore, for the sake of brevity of the specification, the device for determining the forwarding link in the weakly connected network will not be described in detail herein.

[0102] Embodiment Three

[0103] Figure 4 is a structural schematic diagram of an electronic device in Embodiment Three. As shown in Figure 4 Embodiment Three further provides an electronic device 400, which can comprise a processor 401 and a memory 402.

[0104] The memory 402 is configured to store programs; the memory 402 can include volatile memory (for example, random-access memory (RAM), such as static random-access memory (SRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), etc.), and / or non-volatile memory (for example, flash memory). The memory 402 is configured to store computer programs (for example, application programs, functional modules, etc. for implementing the above-described methods), computer instructions, etc. The computer programs, computer instructions, etc. described above can be stored in one or more memories 402 in a partitioned manner. Furthermore, the computer programs, computer instructions, data, etc. described above can be invoked by the processor 401.

[0105] The computer programs, computer instructions, etc. described above can be stored in one or more memories 402 in a partitioned manner. Furthermore, the computer programs, computer instructions, etc. described above can be invoked by the processor 401.

[0106] The processor 401 is configured to execute the computer programs stored in the memory 402, so as to implement each step in the methods described in the above embodiments.

[0107] For details, refer to the related descriptions in the above method embodiments.

[0108] The processor 401 and the memory 402 can be independent structures, or can be integrated into an integrated structure. When the processor 401 and the memory 402 are independent structures, the memory 402 and the processor 401 can be coupled and connected through the bus 403.

[0109] The electronic device of the present embodiment can execute the technical solutions in the above-described methods, and the specific implementation process and technical principles are the same, which will not be described herein again.

[0110] Embodiment Four

[0111] Embodiment Four also provides a computer-readable storage medium including computer programs and instructions, which, when executed on a computer, cause the computer to perform the method for determining a forwarding link in a weakly connected network according to any of the embodiments of the present application.

[0112] The computer-readable storage medium includes a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, and the like, which can store program codes.

[0113] The embodiment further provides a computer program product, which comprises a computer program stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program to enable the electronic device to execute the scheme provided in any one of the above embodiments.

[0114] It should be understood that the steps shown in the above various forms of flowcharts can be reordered, added or deleted. For example, each step described in the present disclosure can be executed in parallel, sequentially or in different orders,

[0115] It should be understood that the steps shown in the above various forms of flowcharts can be reordered, added or deleted. For example, each step described in the present disclosure can be executed in parallel, sequentially or in different orders,

[0116] In summary, the method and device for determining a forwarding link in a weakly connected network according to the present application ensure that data is always transmitted on an optimal link in a weakly connected network, greatly reducing the loss of transmitted information caused by data loss and large time delay.

[0117] Note that the above are only the preferred embodiments of the present application and the principles of the applied technology. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.