CN108234615B - Table item processing method, mainboard and main network equipment - Google Patents

Table item processing method, mainboard and main network equipment Download PDF

Info

Publication number
CN108234615B
CN108234615B CN201711422900.5A CN201711422900A CN108234615B CN 108234615 B CN108234615 B CN 108234615B CN 201711422900 A CN201711422900 A CN 201711422900A CN 108234615 B CN108234615 B CN 108234615B
Authority
CN
China
Prior art keywords
entry
session
main
backup
entries
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711422900.5A
Other languages
Chinese (zh)
Other versions
CN108234615A (en
Inventor
李倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201711422900.5A priority Critical patent/CN108234615B/en
Publication of CN108234615A publication Critical patent/CN108234615A/en
Application granted granted Critical
Publication of CN108234615B publication Critical patent/CN108234615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/148Migration or transfer of sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a table item processing method, a main board and a main network device, wherein the method is applied to the main board belonging to at least one backup group, each backup group comprises a main board and a standby board, the main board comprises a main session table item, and the standby board is used for backing up the main session table item in the corresponding main board. The method comprises the following steps: acquiring the list item information of the main session list item corresponding to each backup group; distributing a corresponding number of tokens for processing the table items for each main session table item according to the table item information of each main session table item; and processing each main session table entry according to the distributed token, and updating the session table entries backed up by the corresponding backup group standby board based on the processed main session table entries. The method has strong processing timeliness, can perform balanced processing on the session table entries corresponding to each backup group, and improves the operation stability of the network equipment.

Description

Table item processing method, mainboard and main network equipment
Technical Field
The present application relates to the field of data communication technologies, and in particular, to a table entry processing method, a motherboard, and a main network device.
Background
At present, a network device (for example, a router or other electronic devices with a routing function) is commonly used in the communication industry to configure a plurality of backup groups, each backup group configures a main board and a backup board, and a manner of correspondingly adjusting a backup session entry in the corresponding backup board according to a session entry change condition in each main board ensures that the network device can continuously and stably operate and existing connection information is not lost due to link switching. The processing of the session entries by each backup group is completed in a soft interrupt when the timer is overtime, if the number of the backup groups corresponding to the same main board is too large, a situation that a plurality of backup groups may be in the overtime state of the timer at the same time exists, the main board can merge the overtime state of the timers of the plurality of backup groups, the task amount of the main board for processing the session entries must be increased, that is, the session entries corresponding to the backup groups are completely processed and the interruption time allowed by the main board is exceeded. In order to ensure that the network device can normally operate, the processing time of the whole network device in the session entry corresponding to the timeout of the timer cannot be too long, the network device may only process the session entries corresponding to a part of backup groups, the session entries corresponding to other backup groups need to be processed until the next timeout of the timer, and the session entries corresponding to each backup group cannot be processed in time, which affects the stability of the operation of the network device.
Disclosure of Invention
In order to overcome the above disadvantages in the prior art, an object of the present application is to provide a table entry processing method, a motherboard, and a main network device, where the table entry processing method has strong processing timeliness, and can perform balanced processing on session table entries corresponding to each backup group, thereby improving the operation stability of the network device.
In terms of the method, a preferred embodiment of the present application provides an entry processing method, which is applied to a motherboard, where the motherboard belongs to at least one backup group, where each backup group includes a motherboard and a standby board, the motherboard includes a main session entry, and the standby board is used to backup the main session entry in the corresponding motherboard, and the method includes:
acquiring table item information of a main session table item corresponding to each backup group of the mainboard;
distributing a corresponding number of tokens for processing the table items for each main session table item according to the table item information of each main session table item;
and processing each main session table entry according to the distributed token, and updating the session table entries backed up in the corresponding backup group standby board based on each processed main session table entry.
In terms of the method, a table entry processing method is further provided in a preferred embodiment of the present application, where the table entry processing method is applied to a primary network device, the primary network device belongs to at least one backup group, each backup group includes a primary network device and a standby network device, the primary network device includes a primary session table entry, and the standby network device is configured to backup a primary session table entry in a corresponding primary network device, and the method includes:
acquiring list item information of a main session list item corresponding to each backup group of the main network equipment;
distributing a corresponding number of tokens for processing the table items for each main session table item according to the table item information of each main session table item;
and processing each main session table entry according to the distributed token, and updating the session table entries backed up in the corresponding backup equipment network equipment based on each processed main session table entry.
In terms of a motherboard, a preferred embodiment of the present application provides a motherboard, which includes a processor and a nonvolatile memory storing a plurality of computer instructions, and when the computer instructions are executed by the processor, the motherboard executes the above-mentioned table item processing method.
In terms of the master network device, the preferred embodiment of the present application provides a master network device, which includes a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the master network device performs the above-mentioned table entry processing method.
Compared with the prior art, the entry processing method, the motherboard and the main network device provided by the preferred embodiment of the present application have the following beneficial effects: the entry processing method is strong in processing timeliness, and can perform balanced processing on the session entries corresponding to each backup group, so that the operation stability of corresponding network equipment is improved. The method is applied to a main board, wherein the main board belongs to at least one backup group, each backup group comprises a main board and a standby board, the main board comprises a main session table entry, and the standby board is used for backing up the main session table entry in the corresponding main board. Firstly, acquiring the list item information of a main session list item corresponding to each backup group; secondly, distributing a corresponding number of tokens for processing the table items for the main session table items corresponding to each backup group correspondingly according to the table item information of each main session table item; and finally, updating the session entries backed up by the standby boards in the corresponding backup groups based on the processed master session entries, thereby carrying out balance processing on the master session entries of each backup group in the corresponding master board in time, synchronously adjusting the session entries of the corresponding backup on each standby board, ensuring that the standby boards in each backup group can provide the backed-up session entries matched with the current data flow when the corresponding master board is damaged, enabling the network equipment comprising at least one backup group to carry out stable data communication based on the backed-up session entries, and improving the operation stability of the network equipment.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments are briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of the claims of the present application, and it is obvious for those skilled in the art that other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a block diagram of a network device according to a preferred embodiment of the present invention.
Fig. 2 is another block diagram of a network device according to a preferred embodiment of the present invention.
Fig. 3 is a flowchart illustrating an entry processing method according to a preferred embodiment of the present application.
Fig. 4 is a flowchart illustrating the sub-steps included in step S320 shown in fig. 3.
Fig. 5 is another flow chart illustrating the sub-steps included in step S320 shown in fig. 3.
Fig. 6 is a flowchart illustrating the sub-steps included in step S330 shown in fig. 3.
Fig. 7 is another flowchart illustrating the sub-steps included in step S330 shown in fig. 3.
Fig. 8 is a block diagram of a motherboard according to a preferred embodiment of the present invention.
Fig. 9 is a schematic view of an application scenario of a master network device according to a preferred embodiment of the present application.
Fig. 10 is a schematic view of another application scenario of a master network device according to a preferred embodiment of the present application.
Fig. 11 is a flowchart illustrating an entry processing method according to a preferred embodiment of the present application.
Fig. 12 is a block diagram of a master network device according to a preferred embodiment of the present invention.
Icon: 10-a network device; 13-backup group; 131-a main board; 132-preparing a plate; 110 — a primary network device; 120-standby network devices; 101-a first memory; 102-a first processor; 111-a second memory; 112-second processor.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 1 is a block diagram of a network device 10 according to a preferred embodiment of the present invention. In this embodiment, the network device 10 is configured to perform data communication, and the network device 10 includes a plurality of backup groups 13, where each backup group 13 includes a main board 131 and a backup board 132. The main board 131 includes a main session entry, and the standby board 132 is configured to backup the main session entry in the corresponding main board 131.
In this embodiment, the main board 131 may individually correspond to one standby board 132, so as to form one backup group 13 by combining with the standby board 132, in which case all the main session entries on the main board 131 are main session entries corresponding to the backup group 13; the main board 131 in the network device 10 may also correspond to a plurality of standby boards 132, and combine with each standby board 132 to form a backup group 13, in this case, the main session entries corresponding to the main board 131 in the backup groups 13 including the same main board 131 may be different. For example, the network device 10 shown in fig. 1 includes three backup groups 13, which are backup group a1 consisting of motherboard a and backup board a1, backup group a2 consisting of motherboard a and backup board a2, and backup group B consisting of motherboard B and backup board B. The standby board B is used for backing up the main session table entry in the main board B, the standby board a1 is used for backing up the main session table entry corresponding to the backup group a1 in the main board a, and the standby board a2 is used for backing up the main session table entry corresponding to the backup group a2 in the main board a.
In this embodiment, the network device 10 may forward, based on the session entry corresponding to each backup group 13 in the main board 131 or the standby board 132, the packet traffic correspondingly matched with the session entry, so as to implement the data communication function of the network device 10. When each data flow passes through the network device 10 for the first time, the network device 10 creates a main session entry matched with the data flow in the main board 131 corresponding to the corresponding backup group 13 according to the traffic information of the data flow. If the subsequent message traffic flowing into the network device 10 matches the master session entry, the network device 10 may directly forward the message traffic based on the master session entry, where the master session entry is a session entry created on the motherboard 131. The network device 10 may send the main session entry on each main board 131 to the standby board 132 corresponding to the backup group 13 for storage and backup, so as to ensure that the standby board 132 in each backup group 13 can provide the session entry matching with the current data traffic when the corresponding main board 131 is damaged, thereby ensuring that the existing connection information in the network device 10 is not lost due to link switching, and ensuring that the network device 10 can continuously and stably operate.
Fig. 2 is a block diagram of another network device 10 according to the preferred embodiment of the present invention. In this embodiment of the present application, after the main board 131 creates a main session entry matched with the corresponding backup group 13, the main session entry is stored, where a storage form of the main session entry in the main board 131 may be, but is not limited to, a linked list, a table, a list, or the like. In order to more clearly illustrate the technical solution of the embodiment of the present application, a table entry chain table is taken as an example of a storage form of the main session table entry, and a detailed description is given to an implementation manner of the embodiment of the present application.
It should be understood that the form of storing the list table entry is only one embodiment of the present application, and should not be construed as a limitation to the scope of the present application. Optionally, the main board 131 may store the created main session entries in a form of an entry chain table, where the main session entries are sequentially stored in the corresponding entry chain table according to the creation time sequence, and if the main board 131 is shared by a plurality of backup groups 13, the number of the entry chain tables in the main board 131 is the same as the total number of the corresponding backup groups 13, and each entry chain table individually corresponds to one backup group 13, so that the main session entries of the corresponding backup groups 13 are stored by each entry chain table. For example, as shown in fig. 2, a backup group a1 formed by a main board a and a backup board a1, a backup group a2 formed by a main board a and a backup board a2, where the main board a is a main board 131 shared by the backup group a1 and the backup group a2, two table entry chain tables exist in the main board a, one is a table entry chain table a1 corresponding to the backup group a1, and the other is a table entry chain table a2 corresponding to the backup group a2, the main board a stores a main session table entry corresponding to the backup group a1 through the table entry chain table a1, and the main board a stores a main session table entry corresponding to the backup group a2 through the table entry chain table a 2. The standby board A1 comprises an item linked list a-1, wherein the item linked list a-1 is used for backing up a main session item in the item linked list a 1; backup board A2 includes an entry chain table a-2, where entry chain table a-2 is used to backup the primary session entry in entry chain table a 2.
Optionally, please refer to fig. 3, which is a flowchart illustrating an entry processing method according to a preferred embodiment of the present application. In this embodiment of the present application, the entry processing method is applied to the main board 131 shown in fig. 1, where the main board 131 belongs to at least one backup group 13, and the main board 131 may perform equalization processing on session entries corresponding to each backup group 13 including the main board 131 in time by using the entry processing method, so as to improve the operation stability of the network device 10. The detailed flow and steps of the table entry processing method shown in fig. 3 are described in detail below.
In an embodiment of the present application, the entry processing method includes the following steps:
step S310, obtain the entry information of the main session entry corresponding to each backup group 13 of the motherboard 131.
In this embodiment, the main board 131 obtains the entry information of the main session entry on the main board 131 by monitoring the change condition of the main session entry in each entry linked list in the time period between two times of timeout of the timer, that is, the entry information of the main session entry corresponding to each backup group 13 of the main board 131 on the main board 131. Wherein the change condition comprises: the number of main session entries deleted when the last timer corresponding to each entry linked list in the motherboard 131 times out, the number of main session entries newly built before the timeout of the current timer corresponding to each entry linked list in the motherboard 131, the number of session entries which are not backed up when the current timer corresponding to each entry linked list in the motherboard 131 times out, and the like.
Step S320, according to the entry information of each main session entry, allocating a corresponding number of tokens for processing the entry to each main session entry.
In this embodiment, the motherboard 131 may periodically place a certain number of tokens into a token bucket included in the motherboard 131 to ensure that the number of available tokens in the token bucket remains constant. After obtaining the entry information of the master session entry in the corresponding entry linked list corresponding to the backup group 13, the main board 131 may allocate tokens, the number of which is matched with that of the corresponding entry information, to the master session entries on the main board 131 of each backup group 13 from the token bucket, and process the master session entries matched on the main board 131 through the allocated tokens.
In this embodiment, the greater the number of entries of the main session entry corresponding to each backup group 13 on the main board 131, the greater the number of entries that need to be processed by the corresponding backup group 13. In different backup groups 13 sharing the same motherboard 131, some of the session entries corresponding to the backup groups 13 are in a state of being continuously created and deleted, and some of the backup groups 13 have a larger number of session entries, but most of the session entries are in a stable state, in which case the backup group 13 with a high entry change activity level should acquire more tokens. Therefore, when the timer expires to allocate a token to the main session entry corresponding to each backup group 13, the main board 131 needs to comprehensively consider the above factors, so as to ensure that the main board 131 can perform balanced processing on the session entries corresponding to each backup group 13, and improve the operation stability of the corresponding network device 10.
Optionally, please refer to fig. 4, which is a flowchart illustrating the sub-steps included in step S320 shown in fig. 3. In an implementation manner of the embodiment of the present application, the entry information includes an entry number and an entry change activity of each master session entry when the current timer is overtime, where the entry number refers to a number of each master session entry retained in a corresponding entry linked list of the corresponding motherboard 131, and the entry change activity refers to a number change amplitude of each master session entry in a time period between two adjacent times of timer overtime of the corresponding motherboard 131. Wherein the specific value of the entry change activity is the sum of the number of entries deleted by the last timer when the corresponding main session entry is overtime and the number of entries newly added before the current timer is overtime, then step S320 may include substep S321 and substep S322, where substep S321 and substep S322 are as follows.
And a substep S321, obtaining the table item ratio of the table item number corresponding to the main session table item in the total table item number of all main session table items and the activity ratio of the table item change activity of the corresponding main session table item in the total table item change activity number of all main session table items according to the table item number and the table item change activity of each main session table item.
In this embodiment, the main board 131 may perform a summation operation on the number of entries of the main session entry in each entry linked list of the main board 131 to obtain the total number of entries of all main session entries of the main board 131 in the current timer, and the main board 131 calculates the entry proportion of the number of entries of each main session entry in the total number of entries of all main session entries on the main board 131 based on the total number of entries and the number of entries of the main session entry in the corresponding entry linked list.
The main board 131 may perform summation operation on the table entry change activity of the main session table entry in each table entry chain table of the main board 131 to obtain a total table entry change activity of all session table entries of the main board 131 when the current timer is overtime, and the main board 131 calculates an activity ratio of the table entry change activity of each main session table entry in the total table entry change activity of all main session table entries on the main board 131 based on the total table entry change activity and the table entry change activity of the main session table entry in the corresponding table entry chain table.
And a substep S322, distributing a corresponding amount of aging deletion tokens for each main session table entry according to the table entry proportion and the activity proportion of each main session table entry.
In this embodiment, the main board 131 may allocate aging deletion tokens, which are used for performing aging deletion and have a number matching with that of the main session entries, from the aging deletion token bucket according to the entry proportion and the activity proportion of the main session entries in the main board 131 corresponding to the backup group 13. The number of the aging deletion tokens correspondingly distributed to each main session entry is distributed according to a token distribution proportion, and the token distribution proportion is obtained by calculating the entry proportion, the activity proportion and the distribution proportion between the entry proportion and the activity proportion of each main session entry. Specifically, the allocation percentage includes a first percentage corresponding to the entry percentage and a second percentage corresponding to the activity percentage, where a sum of the first percentage and the second percentage is 100%, and specific values of the first percentage and the second percentage may be configured differently according to a balance state between the number of entries and the entry change activity level of each main session entry in the motherboard 131 when the main session entry is aged and deleted.
In this embodiment, first, the main board 131 obtains a first ratio by multiplying the table entry proportion corresponding to the main session table entry by the first ratio, then obtains a second ratio by multiplying the activity proportion of the main session table entry by the second ratio, and finally obtains a token allocation proportion corresponding to the main session table entry by adding the first ratio and the second ratio.
In this embodiment, after obtaining the token allocation proportion corresponding to the main session entry stored in the own entry linked list, the main board 131 performs multiplication operation on the total number of available tokens in the aging deletion token bucket and the token allocation proportion corresponding to the main session entry, correspondingly obtains the number of assignable tokens for the corresponding main session entry in the aging deletion token allocation process, and assigns the aging deletion token for the main session entry of the corresponding backup group 13 from the aging deletion token bucket according to the number of assignable tokens for the corresponding main session entry.
Fig. 5 is a schematic view of another flow chart of the sub-steps included in step S320 shown in fig. 3. In another implementation manner of the embodiment of the present application, the entry information includes a number of unrepaired entries of each main session entry in a timeout of the current timer, where the number of unrepaired entries refers to a number of entries, which are not backed up by the corresponding standby board 132, of each main session entry retained in the corresponding entry linked list of the corresponding main board 131, then step S320 may include substep S323 and substep S324, where substep S323 and substep S324 are shown as follows.
And a substep S323, obtaining the non-backup ratio of the number of the non-backup table entries of the corresponding main session table entries in the total number of the non-backup table entries of all the main session table entries according to the number of the non-backup table entries of each main session table entry.
In this embodiment, the main board 131 may perform a summation operation on the number of unrepaired entries of the master session entries in each entry linked list of the main board 131 to obtain the total number of unrepaired entries of all master session entries of the main board 131 when the current timer is overtime, and the main board 131 calculates, based on the total number of the unrepaired entries and the number of unrepaired entries of each master session entry on the main board 131, an unrepaired occupancy of the number of unrepaired entries of each master session entry on the main board 131 in the total number of the unrepaired entries of all master session entries.
And a substep S324, allocating a corresponding number of backup tokens to each main session entry according to the non-backup percentage of each main session entry.
In this embodiment, after obtaining the non-backup percentage of the master session entry stored in each entry chain table of the master board 131, the master board 131 may allocate backup tokens for the backup entries, the number of which is matched with that of the corresponding master session entries, from the backup token bucket according to the non-backup percentage of each master session entry of the master board 131. The main board 131 obtains the number of allocable tokens of the corresponding main session entry in the process of allocating the backup tokens by multiplying the total number of the available tokens in the backup token bucket by the non-backup percentage of each main session entry, and allocates the backup tokens to the main session entries of the corresponding backup group 13 from the backup token bucket according to the number of the allocable tokens of each main session entry, where the backup tokens are used to backup the session entries.
In this embodiment of the present application, the motherboard 131 may allocate a corresponding number of aging deletion tokens to the corresponding main session entry according to the token allocation manner of the above sub-step S321 and sub-step S322 when the current timer is overtime, and allocate a corresponding number of backup tokens to the corresponding main session entry according to the token allocation manner of the above sub-step S323 and sub-step S324 when the next timer is overtime; or distributing a corresponding number of backup tokens to the corresponding main session entry when the current timer is overtime according to the token distribution mode of the substep S323 and the substep S324, and distributing a corresponding number of aging deletion tokens to the corresponding main session entry when the next timer is overtime according to the token distribution mode of the substep S321 and the substep S322; when the current timer is overtime, the corresponding backup tokens and the aged deletion tokens can be allocated to the corresponding main session entry according to the token allocation mode of the substep S323 and the substep S324 and then according to the token allocation mode of the substep S321 and the substep S322. Wherein, the specific token allocation scheme can be configured according to actual requirements.
Referring to fig. 3 again, in step S330, each main session entry is processed according to the allocated token, and the session entries backed up in the standby board 132 of the corresponding backup group 13 are updated based on each processed main session entry.
In this embodiment of the present application, after the main board 131 allocates the corresponding token for the corresponding main session entry, different session entry processing schemes may be executed according to different token allocation manners, and balanced aging deletion and/or balanced backup may be uniformly performed on the main session entries of at least one backup group 13 corresponding to the main board 131, so that the session entries that need to be aged and deleted in each main session entry of the main board 131 may be aged and deleted in time, so as to ensure that the rate of aging and deleting the session entries of the main board 131 is faster; the session entries to be backed up in each main session entry of the motherboard 131 can be backed up in time, so as to ensure that the backup rate of the session entries of the motherboard 131 is high, and thus the session entries to be processed in each main session entry of the motherboard 131 are processed in time, and the operation stability of the network device 10 is improved.
Optionally, please refer to fig. 6, which is a flowchart illustrating the sub-steps included in step S330 shown in fig. 3. In this embodiment of the application, if the way that the main board 131 allocates the token to each main session entry is the way that the sub-step S321 and the sub-step S322 shown in fig. 4 correspond to, the token allocated to each main session entry is an aging deletion token, the step S330 may include the sub-step S331 and the sub-step S332, and the sub-step S331 and the sub-step S332 are as follows.
And a substep S331, performing aging detection on each main session entry, and deleting the session entries needing to be aged in the corresponding main session entries according to the corresponding allocated aging deletion tokens.
In an implementation manner of this embodiment, the main board 131 may perform aging detection on the main session entry in the corresponding entry linked list in a manner of allocating an aging detection token to each entry linked list included in the main board 131, where each aging detection token is used to detect one session entry. Specifically, the motherboard 131 may allocate, by performing steps similar to the sub-step S321 and the sub-step S322, a corresponding number of aging detection tokens for aging detection from an aging detection token bucket to each main session entry in the motherboard 131, where a total number of tokens in the aging detection token bucket is not less than a total number of tokens in the aging deletion token bucket.
In another implementation manner in this embodiment, the main board 131 may perform aging detection on the master session entry in the corresponding entry linked list by polling each entry linked list, and stop the corresponding aging detection when the aging deletion token allocated to the corresponding master session entry is used up.
In this embodiment, the step of performing aging detection on each main session entry respectively includes:
and respectively detecting the data traffic condition corresponding to each main session table entry, and judging that the main session table entry without traffic needs to be aged in a preset time period when detecting that the main session table entry without traffic in the preset time period.
After performing aging detection on the master session entries of the corresponding backup group 13, the motherboard 131 deletes the session entries that need to be aged in the master session entries of the motherboard 131 according to the aging deletion tokens allocated to the master session entries, where each aging deletion token is used to delete one session entry that needs to be aged.
In the substep S332, a deletion message is sent to the standby board 132 of the backup group 13 corresponding to each main session entry, so as to instruct the standby board 132 to delete the deleted session entry in the main session entry of the corresponding backup group 13.
In this embodiment, after deleting the main session entry to be deleted corresponding to the backup group 13, the main board 131 in each backup group 13 sends deletion information including the deleted session entry in the corresponding main session entry to the standby board 132 in the backup group 13, so that the standby board 132 deletes the backed-up session entry that is the same as the deleted session entry in the main session entry according to the deletion information, thereby completing the corresponding session entry processing flow.
Fig. 7 is a schematic diagram illustrating another flow of the sub-steps included in step S330 shown in fig. 3. In this embodiment of the application, if the way that the motherboard 131 allocates the token to each master session entry is the way that the substep S323 and the substep S324 shown in fig. 5 correspond to, the token allocated to each master session entry is a backup token, the step S330 may include the substep S333 and the substep S334, and the substep S333 and the substep S334 are shown as follows.
And a substep S333, obtaining the non-backed up session table entry corresponding to each main session table entry according to the backup token distributed by each main session table entry.
In this embodiment, each backup token is used to backup one session entry, and the main board 131 may sequentially obtain the master session entries that are not backed up in the corresponding entry chain table according to the backup token to which the master session entry stored in each entry chain table of the main board 131 is allocated, until the backup token is consumed completely.
In sub-step S334, a backup message is sent to the standby board 132 of the backup group 13 corresponding to each main session entry, so as to indicate the standby board 132 to backup the session entries that are not backed up in the main session entries of the corresponding backup group 13.
In this embodiment, after the main board 131 in each backup group 13 acquires the main session entry to be backed up corresponding to the backup group 13, the main board 131 sends backup information including the session entries that are not backed up in the corresponding main session entry to the standby board 132 in the backup group 13, so that the standby board 132 sequentially backs up the non-backed up session entries in the backup information according to the backup information. The standby board 132 may also perform backup storage on the received session entry in the form of an entry linked list. For example, as shown in fig. 2, a standby board a1 in the backup group a1 includes an entry chain table a-1, and the standby board a1 backs up the session entry to be backed up in the entry chain table a1 of the corresponding motherboard a through the entry chain table a-1; a standby board a2 in the backup group a2 includes an entry chain table a-2, and the standby board a2 backs up the session entry to be backed up in the entry chain table a2 of the corresponding motherboard a through the entry chain table a-2; and the standby board B in the backup group B comprises a list item linked list B-0, and the standby board B backs up the session list item needing to be backed up in the list item linked list B of the corresponding main board B through the list item linked list B-0.
In this embodiment, the main board 131 may perform deletion processing and backup processing on the main session entry corresponding to the same backup group 13 in one timer timeout soft interrupt, or may perform deletion processing or backup processing on the main session entry corresponding to the same backup group 13 in different timer timeout soft interrupts.
Fig. 8 is a block diagram of a motherboard 131 according to a preferred embodiment of the present application. In this embodiment of the present application, the main board 131 is a board card capable of executing the above entry processing method, and the main board 131 may be applied to the above network device 10. The motherboard 131 includes a first memory 101 and a first processor 102, the first memory 101 may be used to store a main session entry created by the motherboard 131, and the first processor 102 may be used to execute a software program and a function module. Wherein the first memory 101 stores computer instructions, and when the computer instructions are executed by the first processor 102, the main board 131 executes the table entry processing method shown in fig. 3-7. Alternatively, the first memory 101 may be a nonvolatile memory or a storage medium.
Referring to fig. 9 and fig. 10, fig. 9 is a schematic view of an application scenario of a main network device 110 according to a preferred embodiment of the present application, and fig. 10 is a schematic view of another application scenario of the main network device 110 according to the preferred embodiment of the present application. In the embodiment of the present application, a primary network device 110 is further provided in the preferred embodiment of the present application, where the primary network device 110 belongs to at least one backup group 13, the backup group 13 includes a primary network device 110 and a backup network device 120, where the primary network device 110 is a network device 10 in the backup group 13 for data communication, the primary network device 110 includes a primary session entry, and the backup network device 120 is used for backing up the primary session entry in the corresponding primary network device 110.
Similar to the main board 131 in the above embodiment, the main network device 110 may individually correspond to a standby network device 120, so as to form a backup group 13 in combination with the standby board 132; the primary network device 110 may also correspond to a plurality of standby network devices 120, and combine with each standby network device 120 to form a backup group 13, in which case the corresponding session entries of the backup groups 13 including the primary network device 110 on the primary network device 110 may not be the same.
Optionally, please refer to fig. 11, which is a schematic flow chart illustrating an entry processing method according to a preferred embodiment of the present application. In this embodiment, the entry processing method is applied to the primary network device 110, and is different from the entry processing method provided in the above embodiment in that the entry processing method describes, from the primary network device 110 side, a processing procedure of a master session entry corresponding to each backup group 13 including the primary network device 110. It should be understood that, the following description of the flow and steps corresponding to the entry processing method has been described in the foregoing embodiment, and specific details of the execution process of the steps may refer to the description of the foregoing embodiment, and only the steps of the entry processing method are briefly described below:
step S410, obtain the entry information including the master session entry corresponding to each backup group 13 of the master network device 110.
Step S420, distributing a corresponding number of tokens for processing the table entry for each main session table entry according to the table entry information of each main session table entry.
Step S430, processing each master session entry according to the allocated token, and updating the session entries backed up in the backup network device 120 corresponding to the backup group 13 based on each processed master session entry.
In an implementation manner of this embodiment, the entry information includes the number of entries of each main session entry overtime in the current timer and the entry change activity, then step S420 includes:
according to the table entry number and the table entry change activity of each main session table entry, obtaining a table entry ratio of the table entry number corresponding to the main session table entry in the total table entry number of all main session table entries and an activity ratio of the table entry change activity of the corresponding main session table entry in the total table entry change activity number of all main session table entries;
and distributing a corresponding amount of aging deletion tokens to each main session table entry according to the table entry proportion and the activity proportion of each main session table entry.
At this time, the step S430 includes:
respectively carrying out aging detection on each main session table entry, and deleting the session table entries needing to be aged in the corresponding main session table entries according to the correspondingly distributed aging deletion tokens, wherein each aging deletion token is used for deleting one session table entry needing to be aged;
and sending a deletion message to the standby network device 120 of the backup group 13 corresponding to each main session entry to instruct the standby network device 120 to delete the deleted session entries in the main session entries of the corresponding backup group 13, wherein the deletion message includes the deleted session entries in the main session entries.
In another implementation manner of this embodiment, the entry information includes the number of unrepaired entries of each main session entry in the timeout of the current timer, then step S420 includes:
obtaining the non-backup ratio of the number of non-backup table entries of the corresponding main session table entry in the total number of the non-backup table entries of all the main session table entries according to the number of the non-backup table entries of each main session table entry;
and distributing a corresponding number of backup tokens to each main session table entry according to the non-backup percentage of each main session table entry.
At this time, the step S430 includes:
acquiring the non-backed up session table entries corresponding to the master session table entries according to the backup tokens distributed to the master session table entries, wherein each backup token is used for backing up one session table entry;
and sending a backup message to the standby network device 120 of the backup group 13 corresponding to each main session entry to instruct the standby network device 120 to backup the session entries that are not backed up in the main session entries of the corresponding backup group 13, where the backup message includes the session entries that are not backed up in the main session entries.
In this embodiment, similar to the table entry processing method applied to the main board 131, the table entry processing method applied to the main network device 110 may also uniformly perform balanced aging deletion and/or balanced backup on main session table entries corresponding to at least one backup group 13 including the main network device 110, so that session table entries needing to be aged and deleted in each main session table entry of the main network device 110 may be aged and deleted in time, so as to ensure that the rate of aging and deleting the session table entries of the main network device 110 is faster; the session entries to be backed up in each master session entry of master network device 110 may be backed up in time to ensure that the backup rate of the session entries of master network device 110 is high, so as to process the session entries to be processed in each master session entry of master network device 110 in time, thereby improving the operation stability of master network device 110.
Fig. 12 is a block diagram of a master network device 110 according to a preferred embodiment of the present application. In the embodiment of the present application, the master network device 110 includes a second memory 111 and a second processor 112, the second memory 111 may be used to store a master session entry created by the master network device 110, and the second processor 112 may be used to execute a software program and a function module. Wherein the second memory 111 stores computer instructions, and when the computer instructions are executed by the second processor 112, the master network device 110 executes the table entry processing method provided by the corresponding embodiment of fig. 11. Alternatively, the second memory 111 may be a nonvolatile memory or a storage medium.
In summary, in the entry processing method, the motherboard, and the primary network device provided in the preferred embodiment of the present application, the entry processing method is strong in processing timeliness, and can perform balanced processing on the session entries corresponding to each backup group, thereby improving the operation stability of the corresponding network device. The method is applied to a main board, wherein the main board belongs to at least one backup group, each backup group comprises a main board and a standby board, the main board comprises a main session table entry, and the standby board is used for backing up the main session table entry in the corresponding main board. Firstly, acquiring the list item information of a main session list item corresponding to each backup group; secondly, distributing a corresponding number of tokens for processing the table items for the main session table items corresponding to each backup group correspondingly according to the table item information of each main session table item; and finally, updating the session entries backed up by the standby boards in the corresponding backup groups based on the processed master session entries, thereby carrying out balance processing on the master session entries of each backup group in the corresponding master board in time, synchronously adjusting the session entries of the corresponding backup on each standby board, ensuring that the standby boards in each backup group can provide the backed-up session entries matched with the current data flow when the corresponding master board is damaged, enabling the network equipment comprising at least one backup group to carry out stable data communication based on the backed-up session entries, and improving the operation stability of the network equipment.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A table entry processing method is applied to a main board, the main board belongs to at least one backup group, each backup group comprises a main board and a standby board, the main board comprises a main session table entry, and the standby board is used for backing up the main session table entry in the corresponding main board, and the method comprises the following steps:
acquiring table item information of a main session table item corresponding to each backup group of the mainboard;
distributing a corresponding number of tokens for processing the table items for each main session table item according to the table item information of each main session table item;
and processing each main session table entry according to the distributed token, and updating the session table entries backed up in the corresponding backup group standby board based on each processed main session table entry, wherein the processing mode of the main session table entries comprises deleting the matched main session table entries according to the aging deletion token and/or backing up the matched main session table entries according to the backup token.
2. The method of claim 1, wherein if an operation of deleting the matched master session entries according to the aged deletion token is performed, the entry information includes the number of entries and the entry change activity of each master session entry overtime in the current timer, and a corresponding number of tokens for entry processing are allocated to each master session entry according to the entry information of each master session entry, including:
according to the table entry number and the table entry change activity of each main session table entry, obtaining a table entry ratio of the table entry number corresponding to the main session table entry in the total table entry number of all main session table entries and an activity ratio of the table entry change activity of the corresponding main session table entry in the total table entry change activity number of all main session table entries;
and distributing a corresponding amount of aging deletion tokens to each main session table entry according to the table entry proportion and the activity proportion of each main session table entry.
3. The method of claim 2, wherein the processing each master session entry according to the allocated token and updating the session entries backed up in the corresponding backup group standby board based on each processed master session entry comprises:
respectively carrying out aging detection on each main session table entry, and deleting the session table entries needing to be aged in the corresponding main session table entries according to the correspondingly distributed aging deletion tokens, wherein each aging deletion token is used for deleting one session table entry needing to be aged;
and sending a deletion message to the standby board of the backup group corresponding to each main session table entry to indicate the standby board to delete the deleted session table entries in the main session table entries of the corresponding backup group, wherein the deletion message comprises the deleted session table entries in the main session table entries.
4. The method of claim 3, wherein the performing aging detection on each main session entry comprises:
and respectively detecting the data traffic condition corresponding to each main session table entry, and judging that the main session table entry without traffic needs to be aged in a preset time period when detecting that the main session table entry without traffic in the preset time period.
5. The method of claim 1, wherein if an operation of performing backup processing on the matched master session entries according to the backup token is performed, the entry information includes the number of non-backup entries of each master session entry overtime in the current timer, and the allocating a corresponding number of tokens for entry processing to each master session entry according to the entry information of each master session entry includes:
obtaining the non-backup ratio of the number of non-backup table entries of the corresponding main session table entry in the total number of the non-backup table entries of all the main session table entries according to the number of the non-backup table entries of each main session table entry;
and distributing a corresponding number of backup tokens to each main session table entry according to the non-backup percentage of each main session table entry.
6. The method of claim 5, wherein the processing each master session entry according to the allocated token and updating the session entries backed up in the corresponding backup group standby board based on each processed master session entry comprises:
acquiring the non-backed up session table entries corresponding to the master session table entries according to the backup tokens distributed to the master session table entries, wherein each backup token is used for backing up one session table entry;
and sending a backup message to the standby board of the backup group corresponding to each main session entry to indicate the standby board to backup the non-backed session entries in the main session entries of the corresponding backup group, wherein the backup message comprises the non-backed session entries in the main session entries.
7. An entry processing method is applied to a primary network device, where the primary network device belongs to at least one backup group, where each backup group includes a primary network device and a backup network device, the primary network device includes a primary session entry, and the backup network device is configured to backup a primary session entry in a corresponding primary network device, where the method includes:
acquiring list item information of a main session list item corresponding to each backup group of the main network equipment;
distributing a corresponding number of tokens for processing the table items for each main session table item according to the table item information of each main session table item;
and processing each main session table entry according to the distributed token, and updating the session table entries backed up in the corresponding backup equipment network device based on each processed main session table entry, wherein the processing mode of the main session table entries comprises deleting the matched main session table entries according to the aging deletion token and/or backing up the matched main session table entries according to the backup token.
8. The method of claim 7, wherein if an operation of deleting the matched master session entries according to the aged deletion token is performed, the entry information includes the number of entries and the entry change activity of each master session entry overtime in the current timer, and a corresponding number of tokens for entry processing are allocated to each master session entry according to the entry information of each master session entry, including:
according to the table entry number and the table entry change activity of each main session table entry, obtaining a table entry ratio of the table entry number corresponding to the main session table entry in the total table entry number of all main session table entries and an activity ratio of the table entry change activity of the corresponding main session table entry in the total table entry change activity number of all main session table entries;
and distributing a corresponding amount of aging deletion tokens to each main session table entry according to the table entry proportion and the activity proportion of each main session table entry.
9. The method of claim 8, wherein the processing each master session entry according to the allocated token, and updating the session entries backed up in the corresponding backup device network device based on each processed master session entry comprises:
respectively carrying out aging detection on each main session table entry, and deleting the session table entries needing to be aged in the corresponding main session table entries according to the correspondingly distributed aging deletion tokens, wherein each aging deletion token is used for deleting one session table entry needing to be aged;
and sending a deletion message to the standby network equipment of the backup group corresponding to each main session table entry to indicate the standby network equipment to delete the deleted session table entries in the main session table entries of the corresponding backup group, wherein the deletion message comprises the deleted session table entries in the main session table entries.
10. The method of claim 7, wherein if the operation of performing backup processing on the matched master session entries according to the backup token is performed, the entry information includes the number of non-backup entries of each master session entry overtime in the current timer, and the allocating a corresponding number of tokens for entry processing to each master session entry according to the entry information of each master session entry includes:
obtaining the non-backup ratio of the number of non-backup table entries of the corresponding main session table entry in the total number of the non-backup table entries of all the main session table entries according to the number of the non-backup table entries of each main session table entry;
and distributing a corresponding number of backup tokens to each main session table entry according to the non-backup percentage of each main session table entry.
11. The method of claim 10, wherein the processing each master session entry according to the allocated token, and updating the session entries backed up in the corresponding backup device network device based on each processed master session entry comprises:
acquiring the non-backed up session table entries corresponding to the master session table entries according to the backup tokens distributed to the master session table entries, wherein each backup token is used for backing up one session table entry;
and sending a backup message to the standby network equipment of the backup group corresponding to each main session entry to indicate the standby network equipment to backup the non-backed session entries in the main session entries of the corresponding backup group, wherein the backup message comprises the non-backed session entries in the main session entries.
12. A motherboard comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the motherboard executes the table entry processing method according to any one of claims 1 to 6.
13. A primary network device comprising a processor and a non-volatile memory having stored thereon computer instructions, wherein when executed by the processor, the primary network device performs the entry processing method of any of claims 7-11.
CN201711422900.5A 2017-12-25 2017-12-25 Table item processing method, mainboard and main network equipment Active CN108234615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711422900.5A CN108234615B (en) 2017-12-25 2017-12-25 Table item processing method, mainboard and main network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711422900.5A CN108234615B (en) 2017-12-25 2017-12-25 Table item processing method, mainboard and main network equipment

Publications (2)

Publication Number Publication Date
CN108234615A CN108234615A (en) 2018-06-29
CN108234615B true CN108234615B (en) 2021-05-07

Family

ID=62648609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711422900.5A Active CN108234615B (en) 2017-12-25 2017-12-25 Table item processing method, mainboard and main network equipment

Country Status (1)

Country Link
CN (1) CN108234615B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131066B (en) * 2018-10-31 2022-08-19 深圳市中兴微电子技术有限公司 Traffic shaping method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852144A (en) * 2005-09-06 2006-10-25 华为技术有限公司 Main/standby board back-up in access-in apparatus and rearranging method therefor
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN101557317A (en) * 2009-05-26 2009-10-14 杭州华三通信技术有限公司 Active dialogue backup system, equipment and method in dual-server hot-backup network
CN102023345A (en) * 2009-09-10 2011-04-20 华为技术有限公司 Optical module, equipment main board and passive optical network equipment
CN103516662A (en) * 2011-12-31 2014-01-15 华为数字技术(成都)有限公司 Session backup method, device and system
CN103618631A (en) * 2013-12-06 2014-03-05 上海亿云信息技术有限公司 Remote processing method and device for alarm of backup system
CN104660439A (en) * 2013-11-25 2015-05-27 华为技术有限公司 Method and device for setting aging time of dialogue table item
CN105991464A (en) * 2015-04-20 2016-10-05 杭州迪普科技有限公司 Network traffic shunting method, main control board, interface board and gateway device
CN106878051A (en) * 2016-12-16 2017-06-20 新华三技术有限公司 A kind of multi-computer back-up implementation method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100558057C (en) * 2007-07-20 2009-11-04 华为技术有限公司 A kind of processing method of two-way converting inspection session and device
US8543676B2 (en) * 2009-06-16 2013-09-24 International Business Machines Corporation Delegated resource use in a content based routing environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1852144A (en) * 2005-09-06 2006-10-25 华为技术有限公司 Main/standby board back-up in access-in apparatus and rearranging method therefor
CN101170517A (en) * 2007-12-06 2008-04-30 杭州华三通信技术有限公司 Method and device for aging of control session table
CN101557317A (en) * 2009-05-26 2009-10-14 杭州华三通信技术有限公司 Active dialogue backup system, equipment and method in dual-server hot-backup network
CN102023345A (en) * 2009-09-10 2011-04-20 华为技术有限公司 Optical module, equipment main board and passive optical network equipment
CN103516662A (en) * 2011-12-31 2014-01-15 华为数字技术(成都)有限公司 Session backup method, device and system
CN104660439A (en) * 2013-11-25 2015-05-27 华为技术有限公司 Method and device for setting aging time of dialogue table item
CN103618631A (en) * 2013-12-06 2014-03-05 上海亿云信息技术有限公司 Remote processing method and device for alarm of backup system
CN105991464A (en) * 2015-04-20 2016-10-05 杭州迪普科技有限公司 Network traffic shunting method, main control board, interface board and gateway device
CN106878051A (en) * 2016-12-16 2017-06-20 新华三技术有限公司 A kind of multi-computer back-up implementation method and device

Also Published As

Publication number Publication date
CN108234615A (en) 2018-06-29

Similar Documents

Publication Publication Date Title
EP3375171A1 (en) Load balanced network file accesses
CN104317749B (en) Information write-in method and device
CN111694646A (en) Resource scheduling method and device, electronic equipment and computer readable storage medium
CN110784515B (en) Data storage method based on distributed cluster and related equipment thereof
CN105740063A (en) Data processing method and apparatus
CN108933829A (en) A kind of load-balancing method and device
JP2017530453A (en) Equal sharing of system resources in workflow execution
CN108833205B (en) Information processing method, information processing device, electronic equipment and storage medium
CN104598316A (en) Storage resource distribution method and device
CN104793982A (en) Method and device for establishing virtual machine
CN108234615B (en) Table item processing method, mainboard and main network equipment
CN107896196B (en) Method and device for distributing messages
CN112769829B (en) Deployment method of cloud physical machine, related equipment and readable storage medium
CN113885794A (en) Data access method and device based on multi-cloud storage, computer equipment and medium
CN109120680A (en) A kind of control system, method and relevant device
CN111400241B (en) Data reconstruction method and device
CN111866210A (en) Virtual IP balance distribution method, system, terminal and storage medium
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
CN112003730A (en) Method, system, terminal and storage medium for rapid cluster deployment
CN102868594B (en) Method and device for message processing
CN113747423B (en) Cloud mobile phone state synchronization method, device, equipment, storage medium and program product
CN114936106A (en) Method, device and medium for processing host fault
CN108989461B (en) Multi-control storage balancing method, device, terminal and storage medium
CN113050978B (en) Gray release control method, device and equipment for application and computer storage medium
CN110990039B (en) Application program updating method, device and system and computer readable storage medium

Legal Events

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