Packet forwarding method, device, apparatus and storage medium
By establishing negotiation groups in the IP network and using uncongested links to forward packets, the problem of unreasonable router link utilization is solved, and packet forwarding efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2026-03-27
AI Technical Summary
In IP networks, some links on a router may be congested while others are idle, leading to inefficient link utilization and reduced packet forwarding efficiency.
The first router generates a negotiation message, which is broadcast to multiple routers in the target area to form a negotiation group. The group then identifies and utilizes uncongested links for message forwarding, thus avoiding congested links.
It improves the transmission efficiency of router links, solves the problem of unreasonable link utilization, and improves packet forwarding efficiency.
Smart Images

Figure CN116647499B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a message forwarding method and device, equipment and storage medium. BACKGROUND
[0002] With the development of communication network, the operators realize the communication between terminal devices and content sources (such as data centers) through routers (i.e. routing forwarding devices) and lines (i.e. links) between routers. Specifically, in the current internet protocol (IP) network, when the terminal device sends a message (i.e. a data packet or information) to the content source, it needs to forward the message to the next router through the corresponding link on the router based on the pre-set routing protocol and the routing table information corresponding to the router according to the IP address included in the message, and then send the message to the content source.
[0003] In the above method, when all routers included in the IP network run the same pre-set routing protocol to forward the message, some links on the router may be congested while some links are idle, resulting in unreasonable utilization of the links. Therefore, the efficiency of forwarding the message is poor. SUMMARY
[0004] The present application provides a message forwarding method, device, equipment and storage medium, which is used to solve the problem that some links on the router are congested while some links are idle when forwarding the message, thereby improving the efficiency of forwarding the message.
[0005] To achieve the above purpose, the present application adopts the following technical solutions:
[0006] In a first aspect, a message forwarding method is provided. The method includes: determining at least one link as a congested link when determining that the resource utilization of at least one link included in a plurality of links corresponding to a first router is greater than or equal to a pre-set threshold; generating a negotiation message through the first router and broadcasting the negotiation message to each second router in a plurality of second routers included in a target area; determining at least one second router from the plurality of second routers based on the negotiation message, constructing the first router and the at least one second router as a negotiation group, and each second router in the at least one second router including at least one congested link in a plurality of links corresponding to the second router; determining a target routing link from the negotiation group, and forwarding the message transmitted on the congested link to the target routing link to complete the transmission of the message through the target routing link, the target routing link including at least one third router in the negotiation group, and each third router in the at least one third router corresponding to a target link with a resource utilization less than the pre-set threshold.
[0007] In a possible implementation, determining the at least one second router from the plurality of second routers based on the negotiation message comprises: determining, based on the negotiation message, whether each of the plurality of second routers returns an answer message to the first router within a first preset time length, the answer message being used to indicate that at least one congested link is included in the plurality of links corresponding to the second router; and determining the at least one second router from the plurality of second routers that returns the answer message to the first router.
[0008] In a possible implementation, the method further comprises: sending a routing policy between any two routers included in the negotiation group, the routing policy being used to indicate a target link corresponding to each router and having a resource utilization less than a preset threshold; and determining, based on the routing policy, the target link corresponding to each router included in the negotiation group.
[0009] In a possible implementation, the method further comprises: completing, within a second preset time length, message forwarding between the terminal devices through the target routing link; and disbanding the target routing link when a duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset time length.
[0010] In a second aspect, a message forwarding apparatus is provided, which comprises a determining unit, a processing unit, and a transmission unit. The determining unit is configured to determine at least one link as a congested link when a resource utilization of the at least one link included in a plurality of links corresponding to a first router is greater than or equal to a preset threshold. The processing unit is configured to generate a negotiation message through the first router. The transmission unit is configured to broadcast the negotiation message to each of a plurality of second routers included in a target area. The determining unit is further configured to determine the at least one second router from the plurality of second routers based on the negotiation message, each of the at least one second router having at least one congested link included in a plurality of links corresponding to the second router. The processing unit is further configured to construct the first router and the at least one second router as a negotiation group. The determining unit is further configured to determine a target routing link from the negotiation group, the target routing link including at least one third router in the negotiation group, each of the at least one third router corresponding to a target link having a resource utilization less than the preset threshold. The transmission unit is further configured to forward a message transmitted on the congested link to the target routing link, and complete transmission of the message through the target routing link.
[0011] In a possible implementation, the determining unit is further configured to determine, based on the negotiation message, whether each of the second routers returns an answer message to the first router within a first preset time length, the answer message being used to indicate that at least one congested link is included in the links corresponding to the second router; and the determining unit is further configured to determine at least one second router that returns the answer message to the first router from the second routers.
[0012] In a possible implementation, the transmitting unit is further configured to send a routing strategy between any two routers included in the negotiation group, the routing strategy being used to indicate a target link corresponding to each router and having a resource utilization less than a preset threshold; and the determining unit is further configured to determine the target link corresponding to each router included in the negotiation group based on the routing strategy.
[0013] In a possible implementation, the transmitting unit is further configured to complete message forwarding between the terminal devices through the target routing link within a second preset time length; and the processing unit is further configured to disperse the target routing link when a duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset time length.
[0014] In a third aspect, an electronic device is provided, including a processor and a memory; the memory is configured to store one or more programs including computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device executes the message forwarding method in the first aspect.
[0015] In a fourth aspect, a computer readable storage medium storing one or more programs is provided, the one or more programs including instructions that, when executed by a computer, cause the computer to perform the message forwarding method in the first aspect.
[0016] The application provides a message forwarding method, device, equipment and storage medium, and is applied to a scenario of forwarding messages between routers. When it is determined that the resource utilization of at least one link in a plurality of links corresponding to a first router is greater than or equal to a preset threshold, the at least one link is determined as a congested link. Therefore, a negotiation message can be generated by the first router, and the negotiation message is broadcast to each second router in a plurality of second routers included in a target area. At least one second router including the congested link is determined from the plurality of second routers based on the negotiation message, and the first router and the at least one second router are constructed as a negotiation group, so that each router in the negotiation group is a router including at least one congested link. Further, at least one third router including a non-congested link is determined from the routers included in the negotiation group, so that a target routing link is constructed, and the message transmitted on the congested link is forwarded to the target routing link, and the transmission of the message is completed through the target routing link. Through the above method, the message transmitted on the congested link in the router including the congested link can be transferred to the non-congested link for transmission, so that the efficiency of transmitting the message on the link of the router is improved. Therefore, the problem that some links of the router are congested while some links are idle when the message is transmitted is solved, and the efficiency of forwarding the message is improved. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 A message forwarding schematic diagram provided for an embodiment of the application;
[0018] Figure 2 A structure schematic diagram of a message forwarding system provided for an embodiment of the application;
[0019] Figure 3 A message forwarding method flow schematic provided for an embodiment of the application Figure 1 ;
[0020] Figure 4 A message forwarding method flow schematic provided for an embodiment of the application Figure 2 ;
[0021] Figure 5 A message forwarding method flow schematic provided for an embodiment of the application Figure 3 ;
[0022] Figure 6 A message forwarding method flow schematic provided for an embodiment of the application Figure 4 ;
[0023] Figure 7 A structure schematic diagram of a message forwarding device provided for an embodiment of the application;
[0024] Figure 8An electronic device structure schematic diagram provided for an embodiment of the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0026] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this document is only a description of the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, "at least one" "multiple" means two or more. "First", "second", and the like do not limit the quantity and execution order, and "first", "second", and the like do not necessarily mean different.
[0027] In a communication network, an IP network composed of devices and links is maintained by an operator, one end of the IP network is connected to a user (i.e. a terminal device), and the other end is connected to a content source. Information (i.e. a packet) can be transmitted from the end connected to the user to the end connected to the content source through the IP network to realize communication between people and communication between people and content. The most important device included in the IP network is a router (i.e. a routing and forwarding device), and the line used to connect the routers in the IP network can be called a link. When each device in the IP network runs the same pre-set routing protocol, the routing protocol can be used to exchange information of each device, each device generates a topology graph and forms and saves a dynamic routing table, and the routing device can use the network layer of the transmission control protocol / internet protocol (TCP / IP) to forward all types and all addresses of packets through the information in the routing table, thereby maintaining the operation of the entire IP network.
[0028] TCP / IP is a layered five-layer protocol architecture evolved from the seven-layer Open Systems Interconnection (OSI) architecture. Each layer of TCP / IP comprises different protocol types and encapsulation methods, forming various routing protocols within the TCP / IP framework. Specifically, the first layer of TCP / IP is the Media Access Control (MAC) layer; the second layer is the Data Link Layer; the third layer is the Network Layer, which, for IP networks, uses the IP protocol and encapsulates information such as IP addresses (source and destination addresses); the fourth layer is the Session Layer, primarily using TCP and User Datagram Protocol (UDP), and encapsulating information such as port numbers; the fifth layer is the Application Layer, which includes protocols such as Hypertext Transfer Protocol (HTTP) and Simple Mail Transfer Protocol (SMTP), and encapsulates the actual business data.
[0029] When a router receives a packet, it can look up the information encapsulated in the packet (i.e., the IP address) through the MAC layer, data link layer, and network layer encapsulation headers. Based on the IP address and the routing table formed under the constraints of the routing protocol, it forwards the packet from the corresponding port to the next-hop device (i.e., the router connected via the link). The next-hop device, upon receiving the packet, performs the same operation and forwards the packet to the next hop device. In this way, the packet is transmitted to its destination through multiple forwardings. Figure 1 The diagram illustrates a message forwarding scenario. When terminal device A communicates with terminal device B, terminal device A can send messages to the IP network, which then forwards the messages to terminal device B via routers R1, R2, R3, R4, R5, and R6.
[0030] In the above method, when all devices in the entire IP network or the IP network in a certain area are running the same pre-configured routing protocol (i.e. all devices have the same forwarding method), some links will be congested while others will be idle when all devices forward packets based on the same forwarding method, resulting in unreasonable utilization of links when forwarding packets.
[0031] The application provides a message forwarding method. When it is determined that the resource utilization of at least one link in a plurality of links corresponding to a first router is greater than or equal to a preset threshold, the at least one link is determined as a congested link. Therefore, a negotiation message can be generated by the first router, and the negotiation message is broadcast to each second router in a plurality of second routers included in a target area. At least one second router including the congested link is determined from the plurality of second routers based on the negotiation message, and the first router and the at least one second router are constructed as a negotiation group, so that each router in the negotiation group is a router including at least one congested link. Further, at least one third router including a non-congested link is determined from the routers included in the negotiation group, so that a target routing link is constructed, and a message transmitted on the congested link is forwarded to the target routing link, and the transmission of the message is completed through the target routing link. Through the above method, the message transmitted on the congested link of the router including the congested link can be transferred to the non-congested link for transmission, so as to improve the efficiency of link message transmission of the router. Therefore, the problem that some links of the router are congested while some links are idle when the message is transmitted is solved, and the efficiency of message forwarding is improved.
[0032] The message forwarding method provided by the application embodiment can be applied to a message forwarding system. Figure 2 A structural schematic diagram of a message forwarding system is shown. As shown in Figure 2 The message forwarding system 20 includes an electronic device 21, a first router 22 and a plurality of second routers 23.
[0033] The electronic device 21 is configured to determine that at least one congested link is included in a plurality of links corresponding to the first router 22 and the plurality of second routers 23, construct the first router 22 and at least one second router 23 as a negotiation group, and determine a target routing link from the negotiation group.
[0034] The first router 22 is configured to generate a negotiation message, broadcast the negotiation message to a plurality of second routers 23 included in a target area, and forward a message transmitted on a congested link to a target routing link.
[0035] Each second router 23 in the plurality of second routers 23 is configured to receive a negotiation message from the first router 22, determine at least one second router 23 including at least one congested link in a plurality of links corresponding to the at least one second router 23 based on the negotiation message, forward a message transmitted on the congested link to a target routing link, realize the determination of the target routing link by the electronic device 21, and complete the transmission of the message by the first router 22 and the second router 23.
[0036] It should be noted that the first router 22 can be connected with at least one of the plurality of second routers 23, and any two of the plurality of second routers 23 can also be connected, thereby forming a routing link.
[0037] The packet forwarding method provided by the embodiment of the present application will be described below in combination with the accompanying drawings. As shown in the figure, the packet forwarding method provided by the embodiment of the present application is applied to an electronic device, and the method comprises S201-S205: Figure 3
[0038] S201, when it is determined that the resource utilization of at least one link in the plurality of links corresponding to the first router is greater than or equal to a preset threshold value, the at least one link is determined as a congested link.
[0039] It can be understood that when it is determined that the resource utilization of at least one link in the plurality of links corresponding to the first router is greater than or equal to a preset threshold value, the electronic device can determine the at least one link as a congested link.
[0040] Optionally, the preset threshold value Y of each link in the plurality of links corresponding to the first router on the first router can be set by the electronic device, and then the resource utilization of each link in the plurality of links corresponding to the first router is detected by the first router, and it is judged whether the resource utilization of each link is greater than or equal to the preset threshold value. When it is determined that the resource utilization of at least one link is greater than or equal to the preset threshold value Y, the at least one link corresponding to the first router on the first router can be determined as a congested link.
[0041] Optionally, an area containing a certain number of routing devices (i.e. routers) can be designated as a target area, and the target area can include the first router and the plurality of second routers.
[0042] For example, the preset threshold value Y can be 80%, or 85% or other reasonable values.
[0043] It should be noted that the router is a necessary device in the wired communication network, which is a three-layer routing forwarding device, can identify the network layer address (i.e. IP address) of the packet, query the routing table information, and forward the packet to the next hop device according to the destination address (i.e. destination IP address). A router includes a plurality of ports, and a port is connected to a link. The value of the preset threshold value Y can be uniformly set in the target area, or can be set differently according to different routing devices.
[0044] S202, generating a negotiation packet by the first router, and broadcasting the negotiation packet to each of the plurality of second routers included in the target area.
[0045] It can be understood that the electronic device can generate the negotiation message through the first router, and broadcast the negotiation message to each of the plurality of second routers included in the target area through the first router.
[0046] Optionally, when the electronic device determines that the at least one congested link on the first router, the negotiation message can be generated through the router, and the destination IP address of the negotiation message is set to a multicast address, and then the negotiation message can be broadcasted to each of the plurality of second routers included in the target area through the first router in a multicast manner, and each of the plurality of second routers included in the target area can receive the negotiation message broadcasted by the first router.
[0047] It should be noted that the negotiation message is a message of a specific format composed of specific fields.
[0048] S203, determining at least one second router from the plurality of second routers based on the negotiation message.
[0049] S204, constructing the first router and the at least one second router as a negotiation group.
[0050] Each of the at least one second router corresponds to at least one congested link in the plurality of links.
[0051] It can be understood that the electronic device can determine at least one second router corresponding to at least one congested link in the plurality of links from the plurality of second routers based on the negotiation message, and construct the first router and the at least one second router as a negotiation group.
[0052] Optionally, each of the plurality of second routers can identify the content of the specific field included in the negotiation message, to determine at least one second router from the plurality of second routers based on the content of the specific field included in the negotiation message, and construct the first router and the at least one second router as a negotiation group, to complete the signaling interaction and negotiation process with the first router.
[0053] S205, determining a target routing link from the negotiation group, and forwarding the message transmitted on the congested link to the target routing link, to complete the transmission of the message through the target routing link.
[0054] The target routing link includes at least one third router in the negotiation group, and each of the at least one third router corresponds to a target link with a resource utilization rate less than a preset threshold.
[0055] It can be understood that the electronic device can determine a target routing link including at least one third router from the negotiation group, and forward the packet transmitted on the congested link to the target routing link, so as to complete the transmission of the packet through the target routing link.
[0056] Optionally, the first router and the plurality of second routers included in the negotiation group can mutually advertise the congested link and the non-congested link (i.e., the link with a resource utilization less than the preset threshold Y) corresponding to each router, so as to determine at least one third router corresponding to one non-congested link from the first router and the plurality of second routers, and construct the non-congested link corresponding to each router in the at least one third router into a target routing link. Further, the packet transmitted on the congested link is forwarded to the target routing link, so as to complete the transmission of the packet through the target routing link and the at least one third router corresponding to the target routing link.
[0057] It should be noted that one router is connected to multiple links, so that all the links connected by one router are not congested, but one link connected by the router is congested, and multiple links connected by the router are not congested or even idle. The non-congested link can be divided into a normal link and an idle link.
[0058] In one possible implementation, when the routing negotiation broadcast is performed in the target area, the number of generated negotiation packets can be controlled within a certain range to control the increased network load while achieving the goal of routing negotiation. Otherwise, when the routing negotiation broadcast is performed in the whole network, a large number of negotiation packets will be generated, which will increase a large amount of data in the whole network, resulting in too large network load. The packet transmitted on the congested link in the router including the congested link is transferred to the non-congested link for transmission, which can improve the rationality of using the links on the router, and further improve the efficiency of transmitting the packet on the link of the router.
[0059] In one design, as shown in Figure 4 The packet forwarding method provided by the embodiment of the present application includes the method in step S203, and specifically includes steps S301-S302.
[0060] S301, based on the negotiation packet, determining whether each second router in the plurality of second routers returns an answer packet to the first router within a first preset time length.
[0061] The answer packet is used to indicate that at least one congested link is included in the plurality of links corresponding to the second router.
[0062] It can be understood that based on the negotiation packet, it can be determined whether each second router in the plurality of second routers returns an answer packet to the first router within a first preset time length, the answer packet being used to indicate that at least one congested link is included in the plurality of links corresponding to the second router.
[0063] Optionally, a negotiation time T (i.e., a first preset duration) can be set for each router included in the target area. When the first router broadcasts a negotiation message for the first time, a timestamp T0 can be inserted into the content of the negotiation message. If, at some point within the time range (T0, T0+T), a router in the target area that does not have a congested link receives the negotiation message broadcast by the first router, then the negotiation message is saved, the timestamp of the negotiation message is set to T0+T, and the negotiation message is discarded. If, at some point within the time range (T0, T0+T), a router in the target area that includes a congested link (i.e., a second router whose links among multiple second routers include at least one congested link) receives the negotiation message broadcast by the first router, then the router that includes the congested link sends a response message to the first router.
[0064] It should be noted that setting the time point for receiving negotiation messages to T0+T means that the router receiving the negotiation messages cannot join the negotiation group.
[0065] S302. Determine at least one second router from among the multiple second routers that returned a response message to the first router.
[0066] It is understandable that at least one second router can be identified from a plurality of second routers that returns a response message to the first router, and the first router and at least one second router can be constructed into a negotiation group.
[0067] Optionally, within a time range (T0, T0+T), the second router that returns an answer message to the first router can be determined from among multiple second routers, and the second router that returns the answer message and the first router can be added to the negotiation group; the second router that does not return an answer message within the time range (T0, T0+T) cannot be added to the negotiation group.
[0068] In one possible implementation, determining whether each of the multiple second routers returns a response message to the first router within a first preset time period can prevent the first router from continuously broadcasting negotiation messages to other routers in the target area for an excessively long period, thus avoiding the occupancy of network transmission links in the target area. Simultaneously, it can prevent new routers from continuously joining the negotiation group during the negotiation process, thus avoiding the need for reorganization of the routers included in the negotiation group and increasing system complexity.
[0069] In a design, such as Figure 5 As shown in the embodiment of this application, a message forwarding method is provided, which further includes steps S401-S402:
[0070] S401. Send routing policies between any two routers included in the negotiation group.
[0071] The routing strategy is used to indicate a target link corresponding to each router and having a resource utilization less than a preset threshold.
[0072] It can be understood that the routing strategy used to indicate a target link corresponding to each router and having a resource utilization less than a preset threshold can be sent between any two routers included in the negotiation group.
[0073] Optionally, at least one routing strategy can be set on any router included in the negotiation group, and each routing strategy in the at least one routing strategy can be sent to other routers in the negotiation group except the any router.
[0074] It should be noted that one routing strategy corresponds to one target link having a resource utilization less than a preset threshold, and the routing strategy is used to indicate that a packet transmitted on a congested link of a router is forwarded to a non-congested link (i.e., a target link having a resource utilization less than a preset threshold) of the router for transmission.
[0075] S402, based on the routing strategy, determining a target link corresponding to each router included in the negotiation group.
[0076] It can be understood that the target link corresponding to each router included in the negotiation group can be determined based on the routing strategy.
[0077] Optionally, other routers in the negotiation group except any router can evaluate an influence of each routing strategy in at least one routing strategy sent by any router included in the negotiation group on a connection link of the other routers, and feed back an opinion on each routing strategy to the any router according to the influence of each routing strategy on the connection link of the other routers. The opinion on each routing strategy can be represented by a weight value, and the greater the weight value fed back, the more the other routers agree with the routing strategy.
[0078] Optionally, each router included in the negotiation group can obtain a weight of a routing strategy sent by other routers in the negotiation group to the router. Any router included in the negotiation group can determine one routing strategy having a maximum weight value from at least one routing strategy sent by any router based on the weight of each routing strategy in the at least one routing strategy sent by the any router, and determine a link corresponding to the one routing strategy having the maximum weight value as a target link corresponding to the any router. Further, at least one third router can be determined from all routers included in the negotiation group based on the target link corresponding to each router included in the negotiation group, and a target routing link can be constructed from the target link corresponding to each third router in the at least one third router.
[0079] For example, the opinion of the router on the routing strategy can be represented by a weight value W, and W can take values of W0, W1, …, Wn, where W0< W1< … < Wn. If the negotiation group includes 6 routers, namely router 1, router 2, router 3, router 4, router 5, and router 6, router 1 corresponds to two routing strategies, namely routing strategy 1 and routing strategy 2.
[0080] Assuming that the weight value W0 of router 2 on routing strategy 1 is 1, the weight value W1 of router 3 on routing strategy 1 is 2, the weight value W2 of router 4 on routing strategy 1 is 3, the weight value W3 of router 5 on routing strategy 1 is 4, and the weight value W4 of router 5 on routing strategy 1 is 5, the total weight value corresponding to routing strategy 1 is W0+W1+W2+W3+W4=1+2+3+4+5=15; assuming that the weight value W0 of router 2 on routing strategy 2 is 1, the weight value W1 of router 3 on routing strategy 2 is 2, the weight value W2 of router 4 on routing strategy 2 is 3, the weight value W3 of router 5 on routing strategy 2 is 4, and the weight value W4 of router 5 on routing strategy 2 is 7, the total weight value corresponding to routing strategy 2 is W0+W1+W2+W3+W4=1+2+3+4+7=17. It can be seen that the total weight value corresponding to routing strategy 1 is greater than the total weight value corresponding to routing strategy 2, so the routing strategy with the largest weight value among the two routing strategies corresponding to router 1 is routing strategy 1.
[0081] In one design, as shown in FIG. 1, Figure 6 As shown in FIG. 1, a packet forwarding method provided by an embodiment of the present application includes S501-S502.
[0082] S501, complete packet forwarding between terminal devices through the target routing link within a second preset time length.
[0083] It can be understood that packet forwarding between terminal devices can be completed through the target routing link within the second preset time length.
[0084] Optionally, a recovery time T' (i.e., the second preset time length) can be set for each router included in the target area, and when starting packet forwarding between terminal devices through the target routing link, the routers included in the target routing link start timing, until the timing duration of the routers included in the target routing link is greater than T'.
[0085] For example, the start time of packet forwarding between terminal devices through the target routing link can be set to 0, and packet forwarding between terminal devices through the target routing link can be completed within the time range (0, T').
[0086] S502, when the duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset duration, disbanding the target routing link.
[0087] It can be understood that when the duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset duration, the target routing link can be disbanding.
[0088] Optionally, when the duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset duration, the target routing link will be disbanding, that is, the message forwarding between the terminal devices through the target routing link will not continue, but the message forwarding between the terminal devices through the original link will continue.
[0089] In a possible implementation, the message forwarding between the terminal devices through the target routing link within the preset duration can be used to cope with some special situations (such as a large number of congested links existing in a target area within a certain period of time, causing the rate of message forwarding to be too slow). In general situations, the routing protocol is reasonable, so the message forwarding should be mainly constrained by the routing protocol. At the same time, if there are a large number of negotiation processes in the network, it will cause the message forwarding to deviate from the requirements of the routing protocol in the overall aspect.
[0090] The embodiment of the present application provides a message method, and the present application can realize routing forwarding by joint negotiation of routers, can independently initiate a request by a router in which a link is congested, establish a negotiation group, and negotiate and short-term adjust for a specific route, thereby improving the overall utilization rate of network links and increasing the rationality of network operation, can effectively solve the unreasonable places of the routing network on the basis of the routing protocol, and provide higher protection for the entire network and better utilize the link resources of the entire network.
[0091] The above mainly introduces the scheme provided by the embodiment of the present application from the perspective of the method. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present text can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0092] The embodiments of the present application can divide the function modules of a packet forwarding method according to the above method examples. For example, each function module can be divided according to each function, or two or more functions can be integrated in one processing module. The above integrated module can be realized in the form of hardware or in the form of a software function module. Optionally, the division of the modules in the embodiments of the present application is illustrative, and is only a logical function division. In actual implementation, another division manner can be used.
[0093] Figure 7 A structural schematic diagram of a packet forwarding device provided by the embodiments of the present application is shown in FIG. 1. As shown in FIG. 1, a packet forwarding device 40 is used to improve the efficiency of packet forwarding, for example, used to execute a packet forwarding method shown in FIG. 2. The packet forwarding device 40 includes a determination unit 401, a processing unit 402 and a transmission unit 403. Figure 7 Figure 3 The determination unit 401 is used to determine at least one link as a congested link when it is determined that the resource utilization of at least one link included in a plurality of links corresponding to a first router is greater than or equal to a preset threshold value.
[0094] The processing unit 402 is used to generate a negotiation packet through the first router.
[0095] The transmission unit 403 is used to broadcast the negotiation packet to each second router in a plurality of second routers included in a target area.
[0096] The determination unit 401 is further used to determine at least one second router from the plurality of second routers based on the negotiation packet, each second router in the at least one second router including at least one congested link in a plurality of links corresponding to the second router.
[0097] The processing unit 402 is further used to construct the first router and the at least one second router as a negotiation group.
[0098] The determination unit 401 is further used to determine a target routing link from the negotiation group, the target routing link including at least one third router in the negotiation group, each third router in the at least one third router corresponding to a target link with a resource utilization less than the preset threshold value.
[0099] The transmission unit 403 is further used to forward a packet transmitted on the congested link to the target routing link, and complete the transmission of the packet through the target routing link.
[0100] The transmission unit 403 is further used to forward a packet transmitted on the congested link to the target routing link, and complete the transmission of the packet through the target routing link.
[0101] In a possible implementation, the determining unit 401 is further configured to determine, based on the negotiation message, whether each of the plurality of second routers returns an acknowledgement message to the first router within a first preset time length, the acknowledgement message being used to indicate that at least one congested link is included in the plurality of links corresponding to the second router; and the determining unit 401 is further configured to determine, from the plurality of second routers, at least one second router that returns the acknowledgement message to the first router.
[0102] In a possible implementation, the transmitting unit 403 is further configured to send, between any two routers included in the negotiation group, a routing policy, the routing policy being used to indicate a target link corresponding to each router and having a resource utilization less than a preset threshold; and the determining unit 401 is further configured to determine, based on the routing policy, the target link corresponding to each router included in the negotiation group.
[0103] In a possible implementation, the transmitting unit 403 is further configured to complete, within a second preset time length, message forwarding between the terminal devices through the target routing link; and the processing unit 402 is further configured to disband the target routing link when a duration of completing the message forwarding between the terminal devices through the target routing link is greater than the second preset time length.
[0104] In a case where the functions of the above-described integrated modules are implemented in the form of hardware, the embodiment of the present application provides a possible structural diagram of an electronic device involved in the above-described embodiments. As shown in Figure 8 FIG. 6 is a structural diagram of an electronic device 60, which is used to improve the efficiency of message forwarding, for example, is used to perform the message forwarding method shown in Figure 3 FIG. 1. The electronic device 60 includes a processor 601, a memory 602, and a bus 603. The processor 601 and the memory 602 can be connected through the bus 603.
[0105] The processor 601 is a control center of the communication device, and can be one processor or a general term of multiple processing elements. For example, the processor 601 can be a general central processing unit (CPU), or other general-purpose processors, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0106] As an embodiment, the processor 601 can include one or more CPUs, for example, the CPU 0 and the CPU 1 shown in Figure 8 FIG. 6.
[0107] The memory 602 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM), or other type of dynamic storage device that can store information and instructions for execution by the processor 601, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium, or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
[0108] As one possible implementation, the memory 602 can exist independently of the processor 601, and the memory 602 can be connected to the processor 601 through the bus 603 for storing instructions or program code. When the processor 601 invokes and executes the instructions or program code stored in the memory 602, the packet forwarding method provided by the embodiments of the present application can be implemented.
[0109] In another possible implementation, the memory 602 can also be integrated with the processor 601.
[0110] The bus 603 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 8 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0111] It should be noted that Figure 8 The structure shown does not constitute a limitation on the electronic device 60. In addition to Figure 8 the components shown, the electronic device 60 can include more or fewer components than shown, or combine some components, or different component arrangements.
[0112] As an example, in combination with Figure 7 the functions implemented by the determination unit 401, the processing unit 402, and the transmission unit 403 in the packet forwarding device 40 are the same as the functions of the processor 601 in Figure 8 .
[0113] Optionally, as shown in Figure 8 The electronic device 60 provided by the embodiments of the present application can further include a communication interface 604.
[0114] The communication interface 604 is configured to connect with other devices through a communication network. The communication network can be an Ethernet, a wireless access network, a wireless local area network (WLAN), etc. The communication interface 604 can include a receiving unit configured to receive data, and a sending unit configured to send data.
[0115] In one design, the communication interface in the electronic device provided by the embodiments of the present application can be integrated in the processor.
[0116] From the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity, only the division of the above functional units is exemplified. In actual application, the above functions can be completed by different functional units according to needs, that is, the internal structure of the device is divided into different functional units to complete all or part of the functions described above. The specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0117] The embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores instructions. When a computer executes the instructions, the computer executes each step in the method flow shown in the foregoing method embodiments.
[0118] The embodiments of the present application provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform a packet forwarding method in the foregoing method embodiments.
[0119] The computer readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0120] An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. Of course, the storage medium can be a part of the processor. Consistent with the teachings provided herein, the processor can execute instructions embodied by computer readable storage medium. The instructions may, and often do, alter the state of the processor, thereby affecting what the processor does.
[0121] In embodiments of the present application, the computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
[0122] Since the electronic device, the computer readable storage medium, and the computer program product in embodiments of the present application can be applied to the above method, the technical effects they can obtain can be referred to the above method embodiments, and the embodiments of the present application will not be repeated here.
[0123] The above merely describes specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application.
Claims
1. A packet forwarding method, characterized by, The method comprises: determining that at least one link in a plurality of links corresponding to the first router is a congested link when resource utilization of the at least one link is greater than or equal to a preset threshold; generating a negotiation message by the first router and broadcasting the negotiation message to each of a plurality of second routers included in a target area; determining at least one second router from the plurality of second routers based on the negotiation message, and constructing the first router and the at least one second router as a negotiation group, each of the at least one second router including at least one congested link in a plurality of links corresponding to the second router; determining a target routing link from the negotiation group, and forwarding a message transmitted on the congested link to the target routing link, and completing transmission of the message through the target routing link, the target routing link including at least one third router in the negotiation group, each of the at least one third router corresponding to a target link with resource utilization less than the preset threshold, the target link being a link corresponding to a routing strategy with the largest weight in at least one routing strategy corresponding to any router included in the negotiation group, the weight being determined based on weights of each of the at least one routing strategy sent by the any router to other routers included in the negotiation group.
2. The method of claim 1, wherein, The determining at least one second router from the plurality of second routers based on the negotiation message comprises: determining, based on the negotiation message, whether each of the plurality of second routers returns a response message to the first router within a first preset time period, the response message being used to indicate that at least one congested link is included in a plurality of links corresponding to the second router; determining the at least one second router from the plurality of second routers that returns the response message to the first router.
3. The method according to claim 1 or 2, characterized in that, The method further comprises: sending a routing strategy between any two routers included in the negotiation group, the routing strategy being used to indicate a target link corresponding to each router with resource utilization less than the preset threshold; determining the target link corresponding to each router included in the negotiation group based on the routing strategy.
4. The method according to claim 1 or 2, characterized in that, The method further comprises: completing message forwarding between terminal devices through the target routing link within a second preset time period; dissolving the target routing link when a duration of completing message forwarding between terminal devices through the target routing link is greater than the second preset time period.
5. A packet forwarding device, characterized by, The message forwarding device comprises a determination unit, a processing unit and a transmission unit. The determination unit is configured to determine that at least one link in a plurality of links corresponding to the first router is a congested link when resource utilization of the at least one link is greater than or equal to a preset threshold. The processing unit is configured to generate a negotiation message by the first router. The transmission unit is configured to broadcast the negotiation message to each of a plurality of second routers included in a target area. The determining unit is further configured to determine at least one second router from the multiple second routers based on the negotiation message, each of the at least one second router including at least one congested link in the multiple links corresponding to the second router. The processing unit is further configured to construct the first router and the at least one second router into a negotiation group. The determining unit is further configured to determine a target routing link from the negotiation group, the target routing link including at least one third router in the negotiation group, each of the at least one third router corresponding to a target link with a resource utilization less than the preset threshold; the target link being a link corresponding to a routing strategy with a maximum weight in at least one routing strategy corresponding to any router in the negotiation group; the weight being determined based on weights of each of the at least one routing strategy sent by other routers in the negotiation group to the any router. The transmitting unit is further configured to forward a message transmitted on a congested link to the target routing link, and complete transmission of the message through the target routing link.
6. The packet forwarding device of claim 5, wherein, The determining unit is further configured to determine, based on the negotiation message, whether each of the multiple second routers returns an acknowledgement message to the first router within a first preset time length, the acknowledgement message being used to indicate that at least one congested link is included in the multiple links corresponding to the second router. The determining unit is further configured to determine the at least one second router that returns the acknowledgement message to the first router from the multiple second routers.
7. The packet forwarding device of claim 5 or 6, wherein, The transmitting unit is further configured to send a routing strategy between any two routers in the negotiation group, the routing strategy being used to indicate a target link corresponding to each router and having a resource utilization less than the preset threshold. The determining unit is further configured to determine, based on the routing strategy, the target link corresponding to each router in the negotiation group.
8. The packet forwarding device of claim 5 or 6, wherein, The transmitting unit is further configured to complete message forwarding between terminal devices through the target routing link within a second preset time length. The processing unit is further configured to disperse the target routing link when a duration of completing message forwarding between the terminal devices through the target routing link is greater than the second preset time length.
9. An electronic device, comprising: A device includes: a processor and a memory; the memory is configured to store one or more programs, the one or more programs including computer execution instructions; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device executes the message forwarding method in any one of claims 1-4.
10. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions for: The one or more programs include instructions that, when executed by a computer, cause the computer to perform the message forwarding method in any one of claims 1-4.
Citation Information
Patent Citations
Route selection method for solving problem of wired network congestion
CN104038436A