Method, device, equipment and medium for determining and optimizing active interface

By calculating and arranging the average jitter time and range of physical ports in PortChannel, and selecting appropriate active interfaces, the problem of low reliability of active interface determination in the existing technology is solved, and more stable link selection and business flow are achieved. Forward.

CN116208534BActive Publication Date: 2024-10-15INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211726495.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2024-10-15
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In the existing technology, after the portchannel is established, the determination of the active interface depends on the interface/system priority, and the jitter of the link cannot be effectively judged, resulting in low reliability of the determination of the active interface.

Method used

In link aggregation, each physical port sends multiple packets to the peer port, calculates the average jitter time and the range of the jitter time, sorts them in ascending order based on these indicators, and selects the top-ranked physical port as the active interface. Periodically updated to replace existing active interfaces.

Benefits of technology

It improves the reliability of determining active interfaces and ensures low jitter of all active interfaces when forwarding business traffic, reducing business impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116208534B_ABST
    Figure CN116208534B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for determining and optimizing an active interface, comprising: establishing a link aggregation, wherein the link aggregation comprises a plurality of physical ports; each physical port sends a plurality of messages to a port at the opposite end, and calculates an average jitter time and a range of jitter times of the plurality of messages corresponding to each physical port; according to the average jitter time and the range of jitter times of the plurality of messages corresponding to each physical port, the physical ports are arranged in ascending order, and a top-ranked physical port is selected as an active interface. The present invention also provides an apparatus, a device and a medium for determining and optimizing an active interface, which effectively improves the reliability of determining the active interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of active interface determination, and in particular to an active interface determination optimization method, device, equipment and medium. Background Art

[0002] Portchannel (link aggregation) can achieve the purpose of increasing link bandwidth by bundling multiple physical interfaces (ports) into one logical interface (port) without hardware upgrade. While achieving the purpose of increasing bandwidth, link aggregation uses a backup link mechanism to effectively improve the reliability of links between devices. If the bandwidth of a single physical port is 1G, then two ports are in portchannel, and the bandwidth of the logical interface is 2G.

[0003] There are two types of member interfaces of portchannel: active interfaces and inactive interfaces. Interfaces that forward data are called active interfaces, and interfaces that do not forward data are called inactive interfaces. The links corresponding to active interfaces are called active links, and the links corresponding to inactive interfaces are called inactive links.

[0004] In the prior art, after the portchannel is established, in the LACP (Link Aggregation Control Protocol) mode, the interfaces are determined as active interfaces by judging the interfaces of the active end and the system priority. In the manual mode, all configurations need to be configured manually.

[0005] After the existing portchannel is established, the active interface is determined by the interface / system priority. The jitter of the link composed of the port cannot be determined, and the reliability of the active interface determination is not high. Summary of the invention

[0006] In order to solve the problems existing in the prior art, the present invention innovatively proposes a method, device, equipment and medium for optimizing the determination of an active interface, which effectively solves the problem of low reliability of active interface determination caused by the prior art and effectively improves the reliability of active interface determination.

[0007] A first aspect of the present invention provides a method for determining and optimizing an active interface, comprising:

[0008] Establishing a link aggregation, wherein the link aggregation includes multiple physical ports;

[0009] Each physical port sends multiple messages to the opposite port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port;

[0010] According to the average jitter time and the range of the jitter time of multiple messages corresponding to each physical port, the physical ports are sorted in ascending order, and the physical port with the highest ranking is selected as the active interface.

[0011] Optionally, the jitter time is a difference between a receiving time interval and a sending time interval of two adjacent messages.

[0012] Optionally, the physical ports are arranged in ascending order according to an average jitter time and a range of jitter times of a plurality of messages corresponding to each physical port:

[0013] The packets corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, the packets corresponding to the physical port are arranged in ascending order according to their range of jitter time.

[0014] Optionally, it also includes:

[0015] According to a preset detection period, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface.

[0016] Further, the updating of the average jitter time and the range of the jitter time of all physical ports in the link aggregation to replace the existing active interface is specifically:

[0017] Update the average jitter time and the range of jitter time of all physical ports in the link aggregation;

[0018] If the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than that of the existing active interface will replace the existing active interface accordingly.

[0019] Furthermore, it also includes:

[0020] When the average jitter time of the inactive interface is equal to the average jitter time of the existing active interface, if the jitter time range difference of the inactive interface is smaller than the jitter time range difference of the existing active interface, the inactive interface whose jitter time range difference is smaller than that of the existing active interface will replace the existing active interface accordingly.

[0021] Optionally, the active interface is an interface that forwards data, and the inactive interface is an interface that does not forward data.

[0022] A second aspect of the present invention provides a device for determining and optimizing an active interface, comprising:

[0023] Establishing a module to establish a link aggregation, wherein the link aggregation includes a plurality of physical ports;

[0024] A calculation module, each physical port sends multiple messages to the opposite port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port;

[0025] The selection module arranges the physical ports in ascending order according to the average jitter time and the extreme difference of the jitter time of multiple messages corresponding to each physical port, and selects the physical port with the highest ranking as the active interface.

[0026] The third aspect of the present invention provides an electronic device, comprising: a memory for storing a computer program; a processor for implementing the steps of a method for determining and optimizing an active interface as described in the first aspect of the present invention when executing the computer program.

[0027] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of a method for determining and optimizing an active interface as described in the first aspect of the present invention are implemented.

[0028] The technical solution adopted by the present invention includes the following technical effects:

[0029] 1. In the present invention, each physical port sends multiple messages to the opposite port, calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and selects the top-ranked physical ports as active interfaces, so that the selection of active interfaces is more reasonable, effectively solves the problem of low reliability in determining active interfaces due to the prior art, and effectively improves the reliability of determining active interfaces.

[0030] 2. In the technical solution of the present invention, multiple messages corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, they are arranged in ascending order according to the range of the jitter time of the messages corresponding to the physical port. This not only takes into account the average jitter time of the multiple messages corresponding to the physical port, but also takes into account the range of the jitter time of the multiple messages corresponding to the physical port if the average jitter time is consistent, thereby further improving the reliability of determining the active interface.

[0031] 3. In the technical solution of the present invention, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated according to the preset detection cycle to replace the existing active interface, so that the jitter of the active interface participating in service forwarding is smaller and the impact on the service is smaller, so that all active interfaces have lower jitter when forwarding service traffic.

[0032] 4. In the technical solution of the present invention, if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly; if the jitter time extreme difference of the inactive interface is smaller than the jitter time extreme difference of the existing active interface, the inactive interface whose jitter time extreme difference is smaller than the existing active interface will replace the existing active interface accordingly, further ensuring that the jitter of the active interface participating in service forwarding is smaller.

[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0035] Figure 1 A schematic diagram of a process of a method in Embodiment 1 of the present invention;

[0036] Figure 2 Schematic diagram of the process of step S3 in the method of embodiment 1 of the present invention;

[0037] Figure 3 Another schematic diagram of the process of the method of Embodiment 1 in the scheme of the present invention;

[0038] Figure 4 It is a flow chart of step S4 in the method of embodiment 1 of the scheme of the present invention;

[0039] Figure 5 Another schematic flow chart of step S4 in the method of embodiment 1 of the present invention;

[0040] Figure 6 It is a structural schematic diagram of a device in Example 2 of the solution of the present invention;

[0041] Figure 7 Another structural schematic diagram of the device of Example 2 in the scheme of the present invention;

[0042] Figure 8 This is a schematic diagram of the structure of the device of Example 3 in the solution of the present invention. DETAILED DESCRIPTION

[0043] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.

[0044] Embodiment 1

[0045] like Figure 1 As shown, the present invention provides a method for determining and optimizing an active interface, comprising:

[0046] S1, establishing a link aggregation, wherein the link aggregation includes multiple physical ports;

[0047] S2, each physical port sends multiple messages to the opposite port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port;

[0048] S3, according to the average jitter time and the range of the jitter time of multiple messages corresponding to each physical port, the physical ports are arranged in ascending order, and the top ranked physical port is selected as the active interface.

[0049] Wherein, in step S2, the jitter time is the difference between the receiving time interval and the sending time interval of two adjacent messages. That is, the receiving time interval of two adjacent messages minus the sending time interval of these two messages. The message type can be a UDP (User Datagram Protocol) message, and the number of messages sent by each physical port to the opposite port can be 20, or it can be other types of messages or other numbers of messages, and the present invention does not limit this. Each physical port and the opposite port form a link, and the jitter time corresponding to the message sent by each physical port to the opposite port is the jitter time of the link formed by the physical port and the opposite port.

[0050] The jitter time range is the jitter time range of multiple messages corresponding to each physical port, that is, the difference between the maximum jitter time and the minimum jitter time between multiple messages corresponding to each physical port.

[0051] Among them, Figure 2 As shown, in step S3, the physical ports are arranged in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port:

[0052] S31, arranging the multiple messages corresponding to each physical port in ascending order according to the average jitter time;

[0053] S32: When the average jitter times are consistent, the packets corresponding to the physical ports are arranged in ascending order according to the extreme differences of the jitter times.

[0054] In step S3, the number of active interfaces may be selected based on an active interface threshold, that is, a physical port with a corresponding ranking is selected based on the number of active interfaces.

[0055] Among them, Figure 3 As shown, the technical solution of the present invention also provides a method for determining and optimizing an active interface, which also includes:

[0056] S4, according to a preset detection period, updating the average jitter time and the range of the jitter time of all physical ports in the link aggregation to replace the existing active interface.

[0057] Among them, Figure 4 As shown, in step S4, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface. Specifically:

[0058] S41, updating the average jitter time and the range of the jitter time of all physical ports in the link aggregation;

[0059] S42, determining whether the average jitter time of the inactive interface is less than the average jitter time of the existing active interface, if the determination result is yes, executing step S43; if the determination result is no, executing step S44;

[0060] S43, replacing the existing active interface with the inactive interface whose average jitter time is smaller than that of the existing active interface;

[0061] S44: Keep the current active interface unchanged.

[0062] Furthermore, if Figure 5 As shown, in step S4, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface, and also includes:

[0063] S45; when the average jitter time of the inactive interface is equal to the average jitter time of the existing active interface, determine whether the jitter time range of the inactive interface is less than the jitter time range of the existing active interface. If the judgment result is yes, execute step S46; if the judgment result is no, execute step S44;

[0064] S46, replacing the existing active interface with the inactive interface whose jitter time extreme difference is smaller than that of the existing active interface.

[0065] Wherein, in step S4, the active interface is the interface for forwarding data, and the inactive interface is the interface for not forwarding data. After the active interface in the link aggregation is determined, a preset detection period (default 30s) is set, and the main purpose of the preset detection period is to regularly calculate the average jitter time and the extreme difference of the jitter time of all links composed of all physical ports in the link aggregation, so that the poor link in the active link can be replaced (replacing the existing active interface). That is, when there is business traffic passing through the interface and load sharing is generated, since all active links (links composed of active interfaces and opposite end interfaces) have business traffic, the jitter time of the link composed of all interfaces in the link aggregation is calculated every 30s, so that all links (active end physical ports) are sorted in ascending order according to the newly obtained average jitter time and jitter time extreme difference, such as there is a poor link in the active link, that is, the active interface is ranked lower than the inactive interface, and the top-ranked interface in the inactive interface will be used to replace the active interface at this time, so that the active interface participating in business forwarding jitters less, which has a better impact on business. When the portchannel interface has no business, it will still check the jitter time at every preset detection period, and replace the link with larger jitter in the active interface by sorting the links in ascending order based on the average jitter time of each link (the average jitter time of multiple messages sent by the active physical port of the link to the opposite port) and the jitter time extreme difference.

[0066] In the present invention, each physical port sends multiple messages to the opposite port, calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and selects the top-ranked physical ports as active interfaces, so that the selection of active interfaces is more reasonable, effectively solves the problem of low reliability in determining active interfaces due to the prior art, and effectively improves the reliability of determining active interfaces.

[0067] In the technical solution of the present invention, multiple messages corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, they are arranged in ascending order according to the range of the jitter time of the messages corresponding to the physical port. Not only the average jitter time of the multiple messages corresponding to the physical port is considered, but also, when the average jitter time is consistent, the range of the jitter time of the multiple messages corresponding to the physical port is comprehensively considered, thereby further improving the reliability of determining the active interface.

[0068] In the technical solution of the present invention, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated according to the preset detection cycle to replace the existing active interface, so that the active interface involved in business forwarding has smaller jitter and less impact on the business, so that all active interfaces have lower jitter when forwarding business traffic.

[0069] In the technical solution of the present invention, if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly; if the jitter time extreme difference of the inactive interface is smaller than the jitter time extreme difference of the existing active interface, the inactive interface whose jitter time extreme difference is smaller than the existing active interface will replace the existing active interface accordingly, further ensuring that the jitter of the active interface participating in service forwarding is smaller.

[0070] Embodiment 2

[0071] like Figure 6 As shown, the technical solution of the present invention also provides a device for determining and optimizing an active interface, comprising:

[0072] Establishing module 101, establishing link aggregation, wherein the link aggregation includes multiple physical ports;

[0073] A calculation module 102, each physical port sends multiple messages to the opposite end port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port;

[0074] The selection module 103 arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of multiple messages corresponding to each physical port, and selects the top-ranked physical port as the active interface.

[0075] Among them, in the calculation module 102, the jitter time is the difference between the receiving time interval and the sending time interval of two adjacent messages. That is, the receiving time interval of two adjacent messages minus the sending time interval of these two messages. The message type can be a UDP (User Datagram Protocol) message, and the number of messages sent by each physical port to the opposite port can be 20, or it can be other types of messages or other numbers of messages, and the present invention does not limit this. Each physical port and the opposite port form a link, and the jitter time corresponding to the message sent by each physical port to the opposite port is the jitter time of the link formed by the physical port and the opposite port.

[0076] The jitter time range is the jitter time range of multiple messages corresponding to each physical port, that is, the difference between the maximum jitter time and the minimum jitter time between multiple messages corresponding to each physical port.

[0077] Among them, the selection module 103 arranges the physical ports in ascending order according to the average jitter time of multiple messages corresponding to each physical port and the range of jitter time: arranges them in ascending order according to the average jitter time of multiple messages corresponding to each physical port; when the average jitter time is consistent, arranges them in ascending order according to the range of jitter time of the messages corresponding to the physical ports.

[0078] The number of active interfaces can be selected based on the active interface threshold, that is, the physical port with the corresponding ranking is selected based on the number of active interfaces.

[0079] Among them, Figure 7 As shown, the technical solution of the present invention also provides a device for determining and optimizing an active interface, further comprising:

[0080] The updating module 104 updates the average jitter time and the range of the jitter time of all physical ports in the link aggregation according to a preset detection period to replace the existing active interface.

[0081] In the updating module 104, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface. Specifically, the updating module 104 updates the average jitter time and the range of the jitter time of all physical ports in the link aggregation to replace the existing active interface.

[0082] The average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated; if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly;

[0083] When the average jitter time of the inactive interface is equal to the average jitter time of the existing active interface, if the jitter time range difference of the inactive interface is smaller than the jitter time range difference of the existing active interface, the inactive interface whose jitter time range difference is smaller than that of the existing active interface will replace the existing active interface accordingly.

[0084] Among them, the active interface is the interface for forwarding data, and the inactive interface is the interface for not forwarding data. When the active interface in the link aggregation is determined, a preset detection period (default 30s) is set. The main purpose of the preset detection period is to regularly calculate the average jitter time and the extreme difference of the jitter time of all links composed of all physical ports in the link aggregation, so that the poorer links in the active links can be replaced (replace the existing active interfaces). That is, when there is business traffic passing through the interface and load sharing occurs, since all active links (links composed of active interfaces and opposite end interfaces) have business traffic, the jitter time of the links composed of all interfaces in the link aggregation is calculated every 30s, so that all links (active end physical ports) are sorted in ascending order according to the newly obtained average jitter time and jitter time extreme difference. If there is a poor link in the active link, that is, the active interface is ranked lower than the inactive interface, the top-ranked interface in the inactive interface will be used to replace the active interface, so that the active interface participating in business forwarding has smaller jitter and better impact on the business. When the portchannel interface has no business, it will still check the jitter time at every preset detection period, and replace the link with larger jitter in the active interface by sorting the links in ascending order based on the average jitter time of each link (the average jitter time of multiple messages sent by the active physical port of the link to the opposite port) and the jitter time extreme difference.

[0085] In the present invention, each physical port sends multiple messages to the opposite port, calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and selects the top-ranked physical ports as active interfaces, so that the selection of active interfaces is more reasonable, effectively solves the problem of low reliability in determining active interfaces due to the prior art, and effectively improves the reliability of determining active interfaces.

[0086] In the technical solution of the present invention, multiple messages corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, they are arranged in ascending order according to the range of the jitter time of the messages corresponding to the physical port. Not only the average jitter time of the multiple messages corresponding to the physical port is considered, but also, when the average jitter time is consistent, the range of the jitter time of the multiple messages corresponding to the physical port is comprehensively considered, thereby further improving the reliability of determining the active interface.

[0087] In the technical solution of the present invention, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated according to the preset detection cycle to replace the existing active interface, so that the active interface involved in business forwarding has smaller jitter and less impact on the business, so that all active interfaces have lower jitter when forwarding business traffic.

[0088] In the technical solution of the present invention, if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly; if the jitter time extreme difference of the inactive interface is smaller than the jitter time extreme difference of the existing active interface, the inactive interface whose jitter time extreme difference is smaller than the existing active interface will replace the existing active interface accordingly, further ensuring that the jitter of the active interface participating in service forwarding is smaller.

[0089] Embodiment 3

[0090] like Figure 8 As shown, the technical solution of the present invention also provides an electronic device, including: a memory 201 for storing a computer program; a processor 202 for implementing the steps of a method for determining and optimizing an active interface as in Embodiment 1 when executing the computer program.

[0091] The memory 201 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device. Examples of these data include: any computer program for operating on the electronic device. It can be understood that the memory 201 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a read-only optical disc (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache.By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), direct memory bus random access memory (DRRAM). The memory 201 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.

[0092] The method disclosed in the above embodiment of the present application can be applied to the processor 202, or implemented by the processor 202. The processor 202 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 202 or the instruction in the form of software. The above processor 202 may be a general-purpose processor, a DSP (Digital Signal Processing, that is, a chip capable of implementing digital signal processing technology), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 202 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 201, and the processor 202 reads the program in the memory 201 and completes the steps of the above method in combination with its hardware. When the processor 202 executes the program, the corresponding processes in the various methods of the embodiments of the present application are implemented, which will not be described here for the sake of brevity.

[0093] In the present invention, each physical port sends multiple messages to the opposite port, calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and selects the top-ranked physical ports as active interfaces, so that the selection of active interfaces is more reasonable, effectively solves the problem of low reliability in determining active interfaces due to the prior art, and effectively improves the reliability of determining active interfaces.

[0094] In the technical solution of the present invention, multiple messages corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, they are arranged in ascending order according to the range of the jitter time of the messages corresponding to the physical port. Not only the average jitter time of the multiple messages corresponding to the physical port is considered, but also, when the average jitter time is consistent, the range of the jitter time of the multiple messages corresponding to the physical port is comprehensively considered, thereby further improving the reliability of determining the active interface.

[0095] In the technical solution of the present invention, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated according to the preset detection cycle to replace the existing active interface, so that the active interface involved in business forwarding has smaller jitter and less impact on the business, so that all active interfaces have lower jitter when forwarding business traffic.

[0096] In the technical solution of the present invention, if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly; if the jitter time extreme difference of the inactive interface is smaller than the jitter time extreme difference of the existing active interface, the inactive interface whose jitter time extreme difference is smaller than the existing active interface will replace the existing active interface accordingly, further ensuring that the jitter of the active interface participating in service forwarding is smaller.

[0097] Embodiment 4

[0098] The technical solution of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a method for determining and optimizing an active interface as described in Example 1 are implemented.

[0099] For example, it includes a memory 201 storing a computer program, and the computer program can be executed by a processor 202 to complete the steps of the aforementioned method. The computer readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, FlashMemory, magnetic surface storage, optical disk, or CD-ROM.

[0100] It can be understood by those skilled in the art that all or part of the steps of the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiment are executed; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks. Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. And the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, disks or optical disks.

[0101] In the present invention, each physical port sends multiple messages to the opposite port, calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port, and selects the top-ranked physical ports as active interfaces, so that the selection of active interfaces is more reasonable, effectively solves the problem of low reliability in determining active interfaces due to the prior art, and effectively improves the reliability of determining active interfaces.

[0102] In the technical solution of the present invention, multiple messages corresponding to each physical port are arranged in ascending order according to their average jitter time; when the average jitter time is consistent, they are arranged in ascending order according to the range of the jitter time of the messages corresponding to the physical port. Not only the average jitter time of the multiple messages corresponding to the physical port is considered, but also, when the average jitter time is consistent, the range of the jitter time of the multiple messages corresponding to the physical port is comprehensively considered, thereby further improving the reliability of determining the active interface.

[0103] In the technical solution of the present invention, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated according to the preset detection cycle to replace the existing active interface, so that the active interface involved in business forwarding has smaller jitter and less impact on the business, so that all active interfaces have lower jitter when forwarding business traffic.

[0104] In the technical solution of the present invention, if the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than the existing active interface will replace the existing active interface accordingly; if the jitter time extreme difference of the inactive interface is smaller than the jitter time extreme difference of the existing active interface, the inactive interface whose jitter time extreme difference is smaller than the existing active interface will replace the existing active interface accordingly, further ensuring that the jitter of the active interface participating in service forwarding is smaller.

[0105] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for determining and optimizing an active interface, characterized in that: include: Establishing a link aggregation, wherein the link aggregation includes multiple physical ports; Each physical port sends multiple messages to the opposite port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port; According to the average jitter time and the range of jitter time of multiple messages corresponding to each physical port, the physical ports are arranged in ascending order, and the top-ranked physical ports are selected as active interfaces; wherein, according to the average jitter time and the range of jitter time of multiple messages corresponding to each physical port, the physical ports are arranged in ascending order specifically as follows: Arrange in ascending order according to the average jitter time of multiple messages corresponding to each physical port; if the average jitter time is consistent, arrange in ascending order according to the range of jitter time corresponding to the physical port; According to a preset detection period, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface.

2. The method for determining and optimizing an active interface according to claim 1, characterized in that: The jitter time is the difference between the receiving time interval and the sending time interval of two adjacent messages.

3. The method for determining and optimizing an active interface according to claim 1, characterized in that: The updating of the average jitter time and the range of jitter time of all physical ports in the link aggregation to replace the existing active interface is specifically: Update the average jitter time and the range of jitter time of all physical ports in the link aggregation; If the average jitter time of the inactive interface is smaller than the average jitter time of the existing active interface, the inactive interface whose average jitter time is smaller than that of the existing active interface will replace the existing active interface accordingly.

4. The method for determining and optimizing an active interface according to claim 3, characterized in that: include: When the average jitter time of the inactive interface is equal to the average jitter time of the existing active interface, if the jitter time range difference of the inactive interface is smaller than the jitter time range difference of the existing active interface, the inactive interface whose jitter time range difference is smaller than that of the existing active interface will replace the existing active interface accordingly.

5. A method for determining and optimizing an active interface according to claim 3 or 4, characterized in that: The active interface is an interface that forwards data, and the inactive interface is an interface that does not forward data.

6. A device for determining and optimizing an active interface, characterized in that: include: Establishing a module to establish a link aggregation, wherein the link aggregation includes a plurality of physical ports; A calculation module, each physical port sends multiple messages to the opposite port, and calculates the average jitter time and the range of the jitter time of the multiple messages corresponding to each physical port; The selection module arranges the physical ports in ascending order according to the average jitter time and the range of the jitter time of multiple messages corresponding to each physical port, and selects the top-ranked physical port as the active interface; wherein, the physical ports are arranged in ascending order according to the average jitter time and the range of the jitter time of multiple messages corresponding to each physical port are specifically: Arrange in ascending order according to the average jitter time of multiple messages corresponding to each physical port; if the average jitter time is consistent, arrange in ascending order according to the range of jitter time corresponding to the physical port; According to a preset detection period, the average jitter time and the range of the jitter time of all physical ports in the link aggregation are updated to replace the existing active interface.

7. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of a method for determining and optimizing an active interface as described in any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for determining and optimizing an active interface according to any one of claims 1 to 5 are implemented.