CN111404839B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN111404839B
CN111404839B CN202010201844.8A CN202010201844A CN111404839B CN 111404839 B CN111404839 B CN 111404839B CN 202010201844 A CN202010201844 A CN 202010201844A CN 111404839 B CN111404839 B CN 111404839B
Authority
CN
China
Prior art keywords
message
important flow
cache queue
length
port
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
CN202010201844.8A
Other languages
Chinese (zh)
Other versions
CN111404839A (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.)
National Computer Network and Information Security Management Center
Hangzhou DPtech Information Technology Co Ltd
Original Assignee
National Computer Network and Information Security Management Center
Hangzhou DPtech Information Technology 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 National Computer Network and Information Security Management Center, Hangzhou DPtech Information Technology Co Ltd filed Critical National Computer Network and Information Security Management Center
Priority to CN202010201844.8A priority Critical patent/CN111404839B/en
Publication of CN111404839A publication Critical patent/CN111404839A/en
Application granted granted Critical
Publication of CN111404839B publication Critical patent/CN111404839B/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
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/522Dynamic queue service slot or variable bandwidth allocation
    • 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/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/527Quantum based scheduling, e.g. credit or deficit based scheduling or token bank
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The application provides a message processing method and device, which are applied to network equipment, wherein the method comprises the following steps: determining the actual bandwidth required by the important flow cache queue according to each message included in a preset important flow cache queue; selecting a designated member port from the aggregation ports of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment; and forwarding each message contained in the important flow cache queue through the appointed member port. By applying the embodiment of the application, each message contained in the important flow cache queue can be ensured to be normally sent, and the packet loss rate of the message contained in the important flow cache queue is reduced.

Description

Message processing method and device
Technical Field
The application relates to the technical field of network communication, in particular to a message processing method and device.
Background
With the rapid development of network technology, the number of users is increased, and the number of messages sent by users through terminals and received by network equipment is increased. In general, after analyzing and processing a message from a terminal, a network device needs to send a response message to the terminal, if a large number of burst messages need to be responded on the network, the response message may be far greater than the received message, and if the bandwidth of an interface is insufficient to meet the requirement of service on bandwidth, packet loss will occur, so that a user sending the message cannot obtain the response message.
Some of the services can tolerate packet loss, while some of the services can cause service interruption, which cannot be tolerated. Therefore, how to reduce the packet loss rate in the message processing process is a problem to be solved.
Disclosure of Invention
In view of this, the present application provides a method and apparatus for processing a packet, so as to reduce the packet loss rate in the processing process of the packet.
Specifically, the application is realized by the following technical scheme:
a method for processing a message, applied to a network device, the method comprising:
determining the actual bandwidth required by the important flow cache queue according to each message included in a preset important flow cache queue;
selecting a designated member port from the aggregation ports of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment;
and forwarding each message contained in the important flow cache queue through the appointed member port.
A message processing apparatus, applied to a network device, the apparatus comprising:
the determining module is used for determining the actual bandwidth required by the important flow cache queue according to each message included in the preset important flow cache queue;
a selecting module, configured to select a designated member port from an aggregation port of the network device according to a total bandwidth and the actual bandwidth of the network device;
and the forwarding module is used for forwarding each message contained in the important flow cache queue through the appointed member port.
An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method when executing the program stored in the memory.
A computer readable storage medium having stored therein a computer program which when executed by a processor performs the above-described method steps.
According to the technical scheme provided by the application, the actual bandwidth required by the important flow cache queue can be determined according to each message contained in the preset important flow cache queue, then the appointed member port is selected from the aggregation port of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, and each message contained in the important flow cache queue is forwarded through the appointed member port.
Drawings
FIG. 1 is a flow chart of a message processing method shown in the present application;
FIG. 2 is a schematic diagram of a message processing apparatus shown in the present application;
fig. 3 is a schematic structural diagram of an electronic device shown in the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
In order to solve the above problems, an embodiment of the present invention provides a method for processing a packet, so as to reduce a packet loss rate in a packet processing process. Referring to fig. 1, fig. 1 is a flowchart of a message processing method shown in the present application, which is applied to a network device.
S11: and determining the actual bandwidth required by the important flow cache queue according to each message included in the preset important flow cache queue.
An important traffic buffer queue can be preset, and as the name implies, the message of the important traffic to be sent can be stored in the important traffic buffer queue. When the messages are processed, the important flow cache queue is changed in real time, so that the actual bandwidth required by the important flow cache queue can be determined in real time according to each message included in the preset important flow cache queue.
S12: and selecting a designated member port from the aggregation ports of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment.
The multiple ports on the network device for forwarding the message may form an aggregate port, and in general, not all member ports of the aggregate port are required to participate in forwarding the message, so a part of member ports may be selected from the aggregate ports of the network device according to the total bandwidth and the actual bandwidth of the network device, and the part of member ports may be defined as designated member ports.
S13: and forwarding each message contained in the important traffic buffer queue through the designated member port.
According to the technical scheme provided by the application, the actual bandwidth required by the important flow cache queue can be determined according to each message contained in the preset important flow cache queue, then the appointed member port is selected from the aggregation port of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, and each message contained in the important flow cache queue is forwarded through the appointed member port.
Specifically, in S11, determining an actual bandwidth required by the important traffic buffer queue according to each packet included in the preset important traffic buffer queue, and the implementation process specifically includes:
counting the total message length and the message number of all messages included in the important flow cache queue;
dividing the total length of the messages by the number of the messages to obtain the average length of the messages of the important flow cache queue;
determining a first average value of the maximum message length and the minimum message length in the message lengths of all messages included in the important flow cache queue;
determining whether the average length of the message is smaller than a first average value;
if the average length of the message is equal to or greater than the first average value, determining the total length of the message as the actual bandwidth required by the important flow cache queue;
if the average message length is smaller than the first average value, determining a second average value of the minimum message length and the first average value, determining whether the average message length is smaller than the second average value, and if the average message length is smaller than the second average value, determining a first set multiple of the total message length as an actual bandwidth required by the important flow cache queue; if the average length of the message is greater than or equal to the second average value, determining a second set multiple of the total length of the message as an actual bandwidth required by the important flow cache queue.
Since additional information such as a preamble is required when a message is transmitted, the bandwidth required when the message is transmitted is greater than the length of the message itself, and the smaller the message is, the larger the additional information is. Thus, the smaller the average length of the messages in the critical traffic buffer queues, the more additional bandwidth is required. In order to prevent the problem of congestion during packet sending caused by too small reserved bandwidth, more bandwidth needs to be allocated to the messages of the important traffic buffer queue. Wherein, the first set multiple may be, but is not limited to, 120%, and the second set multiple may be, but is not limited to, 110%.
Specifically, in S12, the implementation process specifically includes selecting a designated member port from the aggregation ports of the network device according to the total bandwidth and the actual bandwidth of the network device:
selecting a member port with an opened state from all member ports of an aggregation port of the network equipment to obtain a candidate member port set;
calculating the difference between the total bandwidth and the actual bandwidth of the network device;
and selecting the member ports with the sum of bandwidths not exceeding and closest to the difference value from the candidate member port set according to a preset algorithm to obtain the designated member port.
The states of the member ports of the aggregation port of the network device may be on or off, and here, the member ports with the on states need to be selected from the states, and the member ports form a candidate member port set A; if the total bandwidth of the network device is B0, the actual bandwidth required by the important traffic buffer queue is B, the difference between B0 and B may be calculated, a member port set A1 with the sum of bandwidths not exceeding and closest to the difference is selected from the candidate member port sets according to a preset algorithm, and is used for forwarding the message of the non-important traffic buffer queue, and the remaining member port sets (a-A1) are designated member ports for forwarding the important traffic buffer queue. The preset algorithm can be various, two algorithms are listed below for explanation, and one algorithm is an algorithm of 0/1 knapsack problem; another algorithm is to sequentially order the bandwidths of the member ports of the aggregate port from small to large, then remove the port with the smallest bandwidth from the aggregate port until the sum of the bandwidths of all the removed port sets A1 does not exceed and is closest to the difference value, and the rest member port set (a-A1) is the required designated member port.
In an alternative embodiment, the method further comprises:
receiving a first message sent by a terminal or other network equipment;
acquiring first quintuple information of a first message, wherein the first quintuple information comprises a first source internet protocol (Internet Protocol, IP) address, a first destination IP address, a first source port, a first destination port and a protocol;
searching first quintuple information in a preset access control list;
if the first quintuple information is found in the access control list, the second quintuple information comprising the second source IP address of the first destination IP address, the second destination IP address of the first destination port, the second source port of the second destination port and the protocol is found in the important flow information table, and if the second quintuple information is not found in the important flow information table, the second quintuple information is built in the important flow information table.
The terminal or other network device sends messages to the network device, where the messages may be defined as first messages, quintuple information carried by the first messages may be defined as first quintuple information, and then it is determined whether the first quintuple information needs to be stored in an important traffic information table according to an access control list on the network device. If the first quintuple information is found in the preset access control list, the flow to which the first message belongs is indicated to be important flow, so that the second quintuple information including the first destination IP address as the second source IP address, the first source IP address as the second destination IP address, the first destination port as the second source port, the second source port as the second destination port and the protocol can be found in the important flow information list, if the second quintuple information is not found in the important flow information list, the second quintuple information is established in the important flow information list, the first quintuple information and the second quintuple information can be found by comparing, and the second quintuple information is that the source destination IP address in the first quintuple information is exchanged and the original destination port is exchanged; if the first quintuple information is not found in the preset access control list, the flow to which the first message belongs is indicated to be unimportant flow, and the second quintuple information is not required to be found in the important flow information list.
In an alternative embodiment, the method further comprises:
acquiring a generated second message;
searching third quintuple information of the second message in the important flow information table;
if the third quintuple information is found in the important flow information table, adding the second message into an important flow cache queue;
and if the third quintuple information is not found in the important flow information table, adding the second message into the unimportant flow cache queue.
Two buffer queues may be provided for important traffic and non-important traffic, one for important traffic and one for non-important traffic. The network device generally responds to the received messages, the messages can be defined as second messages, which queue the second messages are added to can be determined according to an important flow information table, if the quintuple information of the second messages is defined as third quintuple information, the third quintuple information can be searched in the important flow information table, if the third quintuple information is searched in the important flow information table, the flow to which the second messages belong is indicated as important flow, and the second messages are added to an important flow cache queue; if the third quintuple information is not found in the important flow information table, which indicates that the flow to which the second message belongs is unimportant flow, the second message is added into the unimportant flow cache queue.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a message processing apparatus shown in the present application, and the apparatus is applied to a network device, and includes:
a determining module 21, configured to determine an actual bandwidth required by the important traffic buffer queue according to each packet included in the preset important traffic buffer queue;
a selecting module 22, configured to select a designated member port from the aggregation ports of the network device according to the total bandwidth and the actual bandwidth of the network device;
and the forwarding module 23 is configured to forward each packet included in the important traffic buffer queue through the designated member port.
According to the technical scheme provided by the application, the actual bandwidth required by the important flow cache queue can be determined according to each message contained in the preset important flow cache queue, then the appointed member port is selected from the aggregation port of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, and each message contained in the important flow cache queue is forwarded through the appointed member port.
Specifically, the determining module 21 is configured to determine, according to each packet included in the preset important traffic buffer queue, an actual bandwidth required by the important traffic buffer queue, and specifically is configured to:
counting the total message length and the message number of all messages included in the important flow cache queue;
dividing the total length of the messages by the number of the messages to obtain the average length of the messages of the important flow cache queue;
determining a first average value of the maximum message length and the minimum message length in the message lengths of all messages included in the important flow cache queue;
determining whether the average length of the message is smaller than a first average value;
if the average length of the message is equal to or greater than the first average value, determining the total length of the message as the actual bandwidth required by the important flow cache queue;
if the average message length is smaller than the first average value, determining a second average value of the minimum message length and the first average value, determining whether the average message length is smaller than the second average value, and if the average message length is smaller than the second average value, determining a first set multiple of the total message length as an actual bandwidth required by the important flow cache queue; if the average length of the message is greater than or equal to the second average value, determining a second set multiple of the total length of the message as an actual bandwidth required by the important flow cache queue.
Specifically, the selecting module 22 is configured to select, from the aggregate ports of the network device, a designated member port according to the total bandwidth and the actual bandwidth of the network device, specifically configured to:
selecting a member port with an opened state from all member ports of an aggregation port of the network equipment to obtain a candidate member port set;
calculating the difference between the total bandwidth and the actual bandwidth of the network device;
and selecting the member ports with the sum of bandwidths not exceeding and closest to the difference value from the candidate member port set according to a preset algorithm to obtain the designated member port.
In an alternative embodiment, the apparatus further comprises:
the receiving module is used for receiving a first message sent by the terminal or other network equipment;
the first acquisition module is used for acquiring first quintuple information of a first message, wherein the first quintuple information comprises a first source IP address, a first destination IP address, a first source port, a first destination port and a protocol;
the first searching module is used for searching the first quintuple information in a preset access control list;
the establishing module is configured to, if the first quintuple information is found in the access control list, find second quintuple information including the first destination IP address being the second source IP address, the first source IP address being the second destination IP address, the first destination port being the second source port, the second source port being the second destination port, and the protocol in the important traffic information table, and if the second quintuple information is not found in the important traffic information table, establish the second quintuple information in the important traffic information table.
In an alternative embodiment, the apparatus further comprises:
the second acquisition module is used for acquiring the generated second message;
the second searching module is used for searching the third quintuple information of the second message in the important flow information table;
the adding module is used for adding the second message into the important flow cache queue if the third quintuple information is found in the important flow information table; and if the third quintuple information is not found in the important flow information table, adding the second message into the unimportant flow cache queue.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The embodiment of the application further provides an electronic device, please refer to fig. 3, which includes a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 complete communication with each other through the communication bus 340.
A memory 330 for storing a computer program;
the processor 310 is configured to implement the message processing method according to any of the above embodiments when executing the program stored in the memory 330.
The communication interface 320 is used for communication between the electronic device and other devices.
The Memory may include random access Memory (Random Access Memory, RAM) or may include Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
According to the technical scheme provided by the application, the actual bandwidth required by the important flow cache queue can be determined according to each message contained in the preset important flow cache queue, then the appointed member port is selected from the aggregation port of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, and each message contained in the important flow cache queue is forwarded through the appointed member port.
Accordingly, embodiments of the present application further provide a computer readable storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method for processing a message according to any of the foregoing embodiments.
According to the technical scheme provided by the application, the actual bandwidth required by the important flow cache queue can be determined according to each message contained in the preset important flow cache queue, then the appointed member port is selected from the aggregation port of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, and each message contained in the important flow cache queue is forwarded through the appointed member port.
The foregoing description of the preferred embodiments of the present invention is not intended to limit the invention to the precise form disclosed, and any modifications, equivalents, improvements and alternatives falling within the spirit and principles of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A method for processing a message, applied to a network device, the method comprising:
determining the actual bandwidth required by the important flow cache queue according to each message included in a preset important flow cache queue;
selecting a designated member port from the aggregation ports of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment;
forwarding each message contained in the important flow cache queue through the designated member port;
selecting a designated member port from the aggregation ports of the network equipment according to the total bandwidth and the actual bandwidth of the network equipment, wherein the method specifically comprises the following steps:
selecting a member port with an opened state from all member ports of an aggregation port of the network equipment to obtain a candidate member port set;
calculating a difference between a total bandwidth of the network device and the actual bandwidth;
and selecting the member ports with the sum of bandwidths not exceeding and closest to the difference value from the candidate member port set according to a preset algorithm, and determining the rest member ports as designated member ports.
2. The method according to claim 1, wherein determining the actual bandwidth required by the critical traffic buffer queue according to each message included in the critical traffic buffer queue comprises:
counting the total message length and the message number of all messages included in the important flow cache queue;
dividing the total length of the messages by the number of the messages to obtain the average length of the messages of the important flow cache queue;
determining a first average value of a maximum message length and a minimum message length in message lengths of all messages included in the important flow cache queue;
determining whether the average length of the message is smaller than the first average value;
if the average length of the message is equal to or greater than the first average value, determining the total length of the message as the actual bandwidth required by the important flow cache queue;
if the average message length is smaller than the first average value, determining a second average value of the minimum message length and the first average value, determining whether the average message length is smaller than the second average value, and if the average message length is smaller than the second average value, determining a first set multiple of the total message length as an actual bandwidth required by the important flow cache queue; and if the average length of the message is determined to be greater than or equal to the second average value, determining a second set multiple of the total length of the message as an actual bandwidth required by the important flow cache queue.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving a first message sent by a terminal or other network equipment;
acquiring first quintuple information of the first message, wherein the first quintuple information comprises a first source Internet Protocol (IP) address, a first destination IP address, a first source port, a first destination port and a protocol;
searching the first quintuple information in a preset access control list;
if the first quintuple information is found in the access control list, second quintuple information including the first destination IP address being a second source IP address, the first source IP address being a second destination IP address, the first destination port being a second source port, the second source port being a second destination port and the protocol is found in an important flow information table, and if the second quintuple information is not found in the important flow information table, the second quintuple information is built in the important flow information table.
4. A method according to claim 3, characterized in that the method further comprises:
acquiring a generated second message;
searching third quintuple information of the second message in the important flow information table;
if the third quintuple information is found in the important flow information table, adding the second message into the important flow cache queue;
and if the third quintuple information is not found in the important flow information table, adding the second message into a non-important flow cache queue.
5. A message processing apparatus, applied to a network device, the apparatus comprising:
the determining module is used for determining the actual bandwidth required by the important flow cache queue according to each message included in the preset important flow cache queue;
the selecting module is used for selecting a member port with an opened state from all member ports of the aggregation port of the network equipment to obtain a candidate member port set; calculating a difference between a total bandwidth of the network device and the actual bandwidth; selecting a member port with the sum of bandwidths not exceeding and closest to the difference value from the candidate member port set according to a preset algorithm, and determining the rest member ports as designated member ports;
and the forwarding module is used for forwarding each message contained in the important flow cache queue through the appointed member port.
6. The apparatus of claim 5, wherein the determining module is configured to determine an actual bandwidth required by the critical traffic buffer queue according to each packet included in a preset critical traffic buffer queue, and is specifically configured to:
counting the total message length and the message number of all messages included in the important flow cache queue;
dividing the total length of the messages by the number of the messages to obtain the average length of the messages of the important flow cache queue;
determining a first average value of a maximum message length and a minimum message length in message lengths of all messages included in the important flow cache queue;
determining whether the average length of the message is smaller than the first average value;
if the average length of the message is equal to or greater than the first average value, determining the total length of the message as the actual bandwidth required by the important flow cache queue;
if the average message length is smaller than the first average value, determining a second average value of the minimum message length and the first average value, determining whether the average message length is smaller than the second average value, and if the average message length is smaller than the second average value, determining a first set multiple of the total message length as an actual bandwidth required by the important flow cache queue; and if the average length of the message is determined to be greater than or equal to the second average value, determining a second set multiple of the total length of the message as an actual bandwidth required by the important flow cache queue.
7. The apparatus according to claim 5 or 6, characterized in that the apparatus further comprises:
the receiving module is used for receiving a first message sent by the terminal or other network equipment;
the first acquisition module is used for acquiring first quintuple information of the first message, wherein the first quintuple information comprises a first source IP address, a first destination IP address, a first source port, a first destination port and a protocol;
the first searching module is used for searching the first quintuple information in a preset access control list;
and the establishing module is used for searching second quintuple information including the first destination IP address being a second source IP address, the first source IP address being a second destination IP address, the first destination port being a second source port, the second source port being a second destination port and the protocol in an important flow information table if the first quintuple information is found in the access control list, and establishing the second quintuple information in the important flow information table if the second quintuple information is not found in the important flow information table.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the second acquisition module is used for acquiring the generated second message;
the second searching module is used for searching the third quintuple information of the second message in the important flow information table;
the adding module is used for adding the second message into the important flow cache queue if the third quintuple information is found in the important flow information table; and if the third quintuple information is not found in the important flow information table, adding the second message into a non-important flow cache queue.
9. An electronic device, characterized in that the electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are in communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-4 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-4.
CN202010201844.8A 2020-03-20 2020-03-20 Message processing method and device Active CN111404839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010201844.8A CN111404839B (en) 2020-03-20 2020-03-20 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010201844.8A CN111404839B (en) 2020-03-20 2020-03-20 Message processing method and device

Publications (2)

Publication Number Publication Date
CN111404839A CN111404839A (en) 2020-07-10
CN111404839B true CN111404839B (en) 2023-05-26

Family

ID=71413452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010201844.8A Active CN111404839B (en) 2020-03-20 2020-03-20 Message processing method and device

Country Status (1)

Country Link
CN (1) CN111404839B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542148A (en) * 2021-07-15 2021-10-22 恒安嘉新(北京)科技股份公司 Message aggregation method and device, network card and readable storage medium
CN114143247A (en) * 2021-11-03 2022-03-04 中盈优创资讯科技有限公司 IP relay circuit flow emigration and emigration method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480411A (en) * 2010-11-23 2012-05-30 中兴通讯股份有限公司 Reservation method and system for protected bandwidth resources
CN103763208A (en) * 2014-01-29 2014-04-30 华为技术有限公司 Data flow limiting method and device
CN108600100A (en) * 2018-07-13 2018-09-28 新华三技术有限公司合肥分公司 Member port choosing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480411A (en) * 2010-11-23 2012-05-30 中兴通讯股份有限公司 Reservation method and system for protected bandwidth resources
CN103763208A (en) * 2014-01-29 2014-04-30 华为技术有限公司 Data flow limiting method and device
CN108600100A (en) * 2018-07-13 2018-09-28 新华三技术有限公司合肥分公司 Member port choosing method and device

Also Published As

Publication number Publication date
CN111404839A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US9185047B2 (en) Hierarchical profiled scheduling and shaping
CN106998302B (en) Service flow distribution method and device
EP2928136B1 (en) Host network accelerator for data center overlay network
WO2017025021A1 (en) Method and device for processing flow table
JP2020017806A (en) Network control arrangement and network control method
JP7313480B2 (en) Congestion Avoidance in Slice-Based Networks
CN111404839B (en) Message processing method and device
US20180302329A1 (en) Output rates for virtual output queues
CN114079638A (en) Data transmission method, device and storage medium of multi-protocol hybrid network
CN111193756A (en) VXLAN tunnel load balancing method and related equipment
CN112104564A (en) Load sharing method and equipment
CN117395167A (en) Service level configuration method and device
CN112737940A (en) Data transmission method and device
WO2020249128A1 (en) Service routing method and apparatus
CN111262792B (en) Message forwarding method, device, network equipment and storage medium
US8660001B2 (en) Method and apparatus for providing per-subscriber-aware-flow QoS
US10594631B1 (en) Methods and apparatus for memory resource management in a network device
US10050897B2 (en) Control method and topology network structure for transmitting packet
CN110336759B (en) RDMA (remote direct memory Access) -based protocol message forwarding method and device
EP3494676A1 (en) Methods and apparatus for shared buffer allocation in a transport node
CN112311678B (en) Method and device for realizing message distribution
CN111953598B (en) Distributed traffic forwarding method, device and system
CN113765796B (en) Flow forwarding control method and device
CN116032852B (en) Flow control method, device, system, equipment and storage medium based on session
CN117978739A (en) Message sending method and device, storage medium and electronic device

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