[go: up one dir, main page]

CN115002032A - Network flow control method and device, processor and electronic equipment - Google Patents

Network flow control method and device, processor and electronic equipment Download PDF

Info

Publication number
CN115002032A
CN115002032A CN202210521045.8A CN202210521045A CN115002032A CN 115002032 A CN115002032 A CN 115002032A CN 202210521045 A CN202210521045 A CN 202210521045A CN 115002032 A CN115002032 A CN 115002032A
Authority
CN
China
Prior art keywords
flow
traffic
network
port
threshold value
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.)
Pending
Application number
CN202210521045.8A
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210521045.8A priority Critical patent/CN115002032A/en
Publication of CN115002032A publication Critical patent/CN115002032A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/29Flow control; Congestion control using a combination of thresholds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a network flow control method, a network flow control device, a processor and electronic equipment. Relating to the field of financial science and technology, the method comprises the following steps: acquiring at least one flow characteristic of network flow of a port of network equipment; inputting at least one flow characteristic into a target classification model for processing to obtain a target flow label of the network flow, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical flow characteristic and a flow label corresponding to the at least one historical flow characteristic; determining a traffic threshold value of a port of the network equipment according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port; and configuring the traffic threshold value into a port of the network equipment. By the method and the device, the problems that in the related technology, the control of network flow needs to be manually adjusted, and the requirement for high throughput and low network delay when the switch processes data cannot be guaranteed in various network scenes are solved.

Description

Network flow control method and device, processor and electronic equipment
Technical Field
The application relates to the field of financial science and technology, in particular to a network flow control method, a network flow control device, a network flow control processor and electronic equipment.
Background
The RoCE network is a connectionless transport layer Protocol based on UDP (User Datagram Protocol), the reliability is poor, and the RoCE is extremely sensitive to packet loss, and one-tenth of a packet loss can cause rapid reduction of transmission performance, so that the deployment of the RoCE network cannot be separated from an effective flow control mechanism to ensure high-speed and reliable transmission.
In the related art, a PFC (Priority-based Flow Control) technique is used in a RoCE network to ensure lossless forwarding. The PFC technique is that when a elephant flow or incast network traffic occurs in a network, a packet is backlogged in a buffer of a port due to a forwarding rate limitation of the port, and when the size of the backlogged packet exceeds a buffer threshold upper limit XOFF set by the PFC, an upstream device suspends transmitting data, thereby preventing the packet loss of the port due to the fact that the backlogged packet continuously exceeds the port buffer size, and the upstream device continues transmitting data after the data forwarding amount in the port buffer is reduced to the buffer threshold lower limit XON set by the PFC. However, the current data center network service flow models have more mixed scenes, when the PFC threshold is set too small, the high throughput service flow still has the possibility of packet loss, and if the PFC threshold is set too large, the network delay is increased, so that the static PFC parameter setting cannot simultaneously meet the service requirements of high throughput and low delay.
Aiming at the problem that the switch cannot meet the requirements of high throughput and low network delay when processing data in various network scenes in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a processor and an electronic device for controlling network traffic, so as to solve the problem in the related art that high throughput and low network latency cannot be satisfied when a switch processes data in multiple network scenarios.
In order to achieve the above object, according to an aspect of the present application, a method for controlling network traffic is provided. The method comprises the following steps: acquiring at least one flow characteristic of network flow of a port of network equipment; inputting at least one traffic characteristic into a target classification model for processing to obtain a target traffic label of network traffic, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic; determining a traffic threshold value of a port of the network equipment according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port; and configuring the traffic threshold value into a port of the network equipment.
Optionally, before inputting at least one traffic characteristic into the target classification model for processing, and obtaining a traffic label of the network traffic, the method further includes: acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining a flow label corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; determining each group of historical flow characteristics and a flow label corresponding to each group of historical flow characteristics as sample data to obtain a plurality of sample data; and training a preset classification model according to a plurality of sample data to obtain a target classification model.
Optionally, before determining the traffic threshold value of the port of the network device according to the target traffic label, the method further includes: determining various flow scenes, determining a flow label for each flow scene, and establishing a mapping relation between the flow label of the flow scene and a flow threshold value corresponding to the flow scene to obtain a mapping relation table; determining a traffic threshold value of a port of a network device according to a target traffic label includes: and acquiring a traffic threshold corresponding to the target traffic label according to the mapping relation table, and determining the acquired traffic threshold as the traffic threshold of the port of the network equipment.
Optionally, before establishing a mapping relationship between a traffic label of a traffic scenario and a traffic threshold corresponding to the traffic scenario to obtain a mapping relationship table, the method further includes: acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; and determining a flow opening threshold value and a flow closing threshold value according to flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, and determining the flow opening threshold value and the flow closing threshold value as the flow threshold values corresponding to the flow scenes.
Optionally, after configuring the traffic threshold value into a port of the network device, the method further includes: acquiring the capacity of network traffic cached by a port of the network equipment, and judging whether the capacity is positioned between a traffic opening threshold value and a traffic closing threshold value; sending a first instruction to upstream equipment of the network equipment under the condition that the capacity is larger than a flow closing threshold value, wherein the first instruction is used for indicating the upstream equipment to stop sending data; and sending a second instruction to the upstream equipment under the condition that the capacity is smaller than the flow closing threshold value, wherein the second instruction is used for instructing the upstream equipment to resume sending data.
Optionally, the flow characteristics include at least one of: the buffer queue of the port occupies the memory size of the network device and the throughput of the port.
Optionally, the plurality of traffic scenarios comprises: elephant flow scenario, rat flow scenario, and a hybrid scenario of elephant flow and rat flow.
In order to achieve the above object, according to another aspect of the present application, a control apparatus for network traffic is provided. The device comprises: an obtaining unit, configured to obtain at least one traffic characteristic of network traffic of a port of a network device; the processing unit is used for inputting at least one flow characteristic into the target classification model for processing to obtain a target flow label of the network flow, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical flow characteristic and a flow label corresponding to the at least one historical flow characteristic; a determining unit, configured to determine a traffic threshold of a port of a network device according to a target traffic label, where the traffic threshold is used to control network traffic passing through the port; and the configuration unit is used for configuring the traffic threshold value into a port of the network equipment.
Through the application, the following steps are adopted: acquiring at least one flow characteristic of network flow of a port of network equipment; inputting at least one traffic characteristic into a target classification model for processing to obtain a target traffic label of network traffic, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic; determining a traffic threshold value of a port of the network equipment according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port; the flow threshold value is configured to the port of the network equipment, so that the problems that the high throughput and the low network delay can not be met when the exchanger processes data in various network scenes in the related technology are solved. A classification model aiming at different network scenes is trained through historical test experience of network flow, and flow threshold values aiming at different network scenes are set, so that the switch can adjust the flow threshold values in real time in various network scenes, and the effect of stable and efficient transmission effect of the network flow is guaranteed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a method for controlling network traffic according to an embodiment of the present application;
fig. 2 is a schematic diagram of a control device for network traffic provided according to an embodiment of the present application;
fig. 3 is a schematic diagram of an electronic device provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, 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 only partial embodiments of the present application, but not all embodiments. 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 the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data that are authorized by the user or sufficiently authorized by various parties. For example, an interface is provided between the system and the relevant user or institution, and before obtaining the relevant information, an obtaining request needs to be sent to the user or institution through the interface, and after receiving the consent information fed back by the user or institution, the relevant information needs to be obtained.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
PFC: priority-based Flow Control, Priority-based Flow Control;
SVM: support Vector Machine.
The present invention is described below with reference to preferred implementation steps, and fig. 1 is a flowchart of a method for controlling network traffic according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, at least one flow characteristic of the network flow of the port of the network equipment is obtained.
Specifically, the network device may be a switch, the port may be a port of the switch, the switch is a data transmission node in the network, each switch transmits data in the network in real time, and the traffic characteristic may be a characteristic when the switch transmits data, for example, a characteristic that a data packet occupies a memory of the switch, the number of data packets transmitted in unit time, and the like.
And S102, inputting at least one flow characteristic into a target classification model for processing to obtain a target flow label of the network flow, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical flow characteristic and a flow label corresponding to the at least one historical flow characteristic.
Specifically, the target classification Model may be an SVM classification Model, that is, a Model, each tag corresponds to a service scenario among an elephant flow, a rat flow, and a mixed flow, the target traffic tag may be Y, in a real-time service scenario, the network device acquires data packets at a port of the switch, occupies a memory of the switch, and obtains traffic tag Y of the real-time service scenario, that is, data packet quantity characteristic information transmitted in unit time, as an input sample TX of the SVM classification Model, the input sample TX is also a traffic characteristic, and classifies the acquired sample information TX by the acquired SVM classification Model, so as to obtain the traffic tag Y of the real-time service scenario, that is:
Y=Model(TX)
step S103, determining a traffic threshold value of a port of the network device according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port.
Specifically, the flow threshold value may be a PFC threshold value, which includes a PFC threshold upper limit value XOFF and a PFC threshold lower limit value XON, and a corresponding flow threshold value is determined according to the label Y.
For example, when the target traffic label Y is Y1, that is, when the current service scenario is elephant flow, it is determined that the traffic threshold values of the switch ports are the PFC threshold upper limit value XOFF1 and the PFC threshold lower limit value XON1, when the target traffic label Y is Y2, that is, when the current service scenario is rat flow, it is determined that the traffic threshold values of the switch ports are the PFC threshold upper limit value XOFF2 and the PFC threshold lower limit value XON2, and when the target traffic label Y is Y3, that is, when the current service scenario is mixed flow, it is determined that the traffic threshold values of the switch ports are the PFC threshold upper limit value XOFF3 and the PFC threshold lower limit value XON 3.
Step S104, configuring the traffic threshold value to a port of the network device.
Specifically, the obtained PFC threshold value is issued to a corresponding switch port to complete configuration, the PFC threshold upper limit value XOFF is used to issue an instruction to stop the upstream link from sending the data packet when the backlog of the data packet at the port buffer reaches an upper limit, and the PFC threshold lower limit value XON is used to issue an instruction to resume the upstream link from sending the data packet when the buffer occupancy of the data packet at the port is low. Different labels correspond to different network scenes in the SVM classification model, and also correspond to the PFC threshold upper limit value XOFF and the PFC threshold lower limit value XON in different network scenes.
The method for controlling the network traffic provided by the embodiment of the application obtains at least one traffic characteristic of the network traffic of a port of the network equipment; inputting at least one traffic characteristic into a target classification model for processing to obtain a target traffic label of network traffic, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic; determining a traffic threshold value of a port of the network equipment according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port; the flow threshold value is configured to the port of the network equipment, so that the problems that the high throughput and the low network delay can not be met when the exchanger processes data in various network scenes in the related technology are solved. A classification model aiming at different network scenes is trained through historical test experience of network flow, and flow threshold values aiming at different network scenes are set, so that the switch can adjust the flow threshold values in real time in various network scenes, and the effects of stable and efficient transmission effect of the network flow are guaranteed.
Optionally, in the method for controlling network traffic provided in the embodiment of the present application, the traffic characteristics at least include one of: the buffer queue of the port occupies the memory size of the network device and the throughput of the port.
Specifically, the size of the memory of the network device occupied by the buffer queue of the port may be that the memory of the switch is occupied by the packet, and the throughput of the port may be the number of packets transmitted in unit time.
Optionally, in the method for controlling network traffic provided in the embodiment of the present application, the multiple traffic scenarios include: elephant flow scenario, rat flow scenario, and a hybrid scenario of elephant flow and rat flow.
Specifically, the elephant flow field scene is a scene when the transmission amount of data packets in a network is very large and a switch port backlogs more data packets, and the mouse flow field scene is a scene when the transmission amount of data packets in the network is relatively small but the delay of transmitting the data packets is relatively high.
Before controlling network traffic, it is necessary to train classification models that deal with different network scenarios, and optionally, in the method for controlling network traffic provided in the embodiment of the present application, before inputting at least one traffic feature into a target classification model for processing to obtain a traffic tag of network traffic, the method further includes: acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining a flow label corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; determining each group of historical flow characteristics and a flow label corresponding to each group of historical flow characteristics as sample data to obtain a plurality of sample data; and training a preset classification model according to a plurality of sample data to obtain a target classification model.
Specifically, the group of historical traffic characteristics includes two characteristics, that is, the data packets occupy the memory of the switch, the number of data packets transmitted in unit time, and the traffic scene may include an elephant flow, a mouse flow, and a mixed flow, where the mixed flow refers to a traffic scene including both the elephant flow and the mouse flow, and the sample data may be PX. By training the classification model of the SVM, the label can be determined for the real-time network scene, so that the corresponding flow threshold value is selected to configure the port, the port does not need to be configured manually, and the operation and maintenance difficulty is reduced.
For example, information such as memory (B1, B2, B3) occupied by packets in the elephant flow Y1, the mouse flow Y2, and the mixed flow scene Y3 in the test environment, the number of packets transmitted per unit time (W1, W2, W3), and the like are collected as training samples X1, X2, X3 of the SVM Model, and a classification Model of the SVM is trained. Namely:
elephant flow: the label is Y1, and n sample data is PX11 ═ B11, W11, · PX1n ═ B1n, W1 n;
mouse flow: the label is Y2, and n sample data are PX21 ═ B21, W21., PX2n ═ B2n, W2 n;
mixing flow: the label is Y3, and n sample data is PX31 ═ B31, W31, · PX3n ═ B3n, W3 n;
setting: y — Y1, Y2, Y3;
PX=PX11,...,PX1n;PX21,...,PX2n;PX21,...,PX2n;
the model obtained by training with the SVM method is: model ═ SVM (Y, PX).
Optionally, in the method for controlling network traffic provided in this embodiment of the present application, before determining the traffic threshold of the port of the network device according to the target traffic label, the method further includes: determining various flow scenes, determining a flow label for each flow scene, and establishing a mapping relation between the flow label of the flow scene and a flow threshold value corresponding to the flow scene to obtain a mapping relation table; determining a traffic threshold value of a port of a network device according to a target traffic label includes: and acquiring a traffic threshold corresponding to the target traffic label according to the mapping relation table, and determining the acquired traffic threshold as a traffic threshold of a port of the network equipment.
Specifically, the label of the elephant flow may be Y1, the label of the rat flow may be Y2, the label of the mixed flow may be Y3, the flow threshold value corresponding to Y1 may be an upper PFC threshold value XOFF1 and a lower PFC threshold value XON1, the flow threshold value corresponding to Y2 may be an upper PFC threshold value XOFF2 and a lower PFC threshold value XON2, the flow threshold value corresponding to Y3 may be an upper PFC threshold value XOFF3 and a lower PFC threshold value XON3, and the mapping relationship table is as shown in table 1.
TABLE 1
Label (R) PFC threshold value
Y1 XOFF1,XON1
Y2 XOFF2,XON2
Y3 XOFF3,XON3
The flow threshold value corresponding to the target flow label is determined through table 1, so that the flow threshold value required to be configured for the port in the current network scene can be quickly found.
Optionally, in the method for controlling network traffic provided in this embodiment of the present application, before establishing a mapping relationship between a traffic label of a traffic scene and a traffic threshold corresponding to the traffic scene to obtain a mapping relationship table, the method further includes: acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; and determining a flow opening threshold value and a flow closing threshold value according to flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, and determining the flow opening threshold value and the flow closing threshold value as the flow threshold values corresponding to the flow scenes.
Specifically, the historical traffic characteristic range may be a traffic characteristic range determined in data transmission experience of historical network traffic, and the traffic opening threshold value is a PFC threshold lower limit value XON and the traffic closing threshold value is a PFC threshold upper limit value XOFF. The traffic labels and the traffic scenes can be in one-to-one correspondence by determining the mapping relationship between the traffic labels and the traffic threshold values corresponding to the traffic scenes according to the historical traffic characteristics.
For example, in the experience of data transmission of historical network traffic, when the value of the memory of the switch occupied by the data packet is between the minimum value a and the maximum value B in the case of a network scene of a elephant flow, the transmission delay of the data packet is low, and the throughput is high, a is determined as the lower PFC threshold limit value XON1 corresponding to the elephant flow, B is determined as the upper PFC threshold limit value XOFF1 corresponding to the elephant flow, when the value of the memory of the switch occupied by the data packet is between the minimum value C and the maximum value D in the case of a network scene of a rat flow, the transmission delay of the data packet is low, and the throughput is high, C is determined as the lower PFC threshold limit value XON2 corresponding to the rat flow, D is determined as the upper PFC threshold limit value XOFF2 corresponding to the rat flow, and when the value of the memory of the switch occupied by the data packet is between the minimum value E and the maximum value F in the case of a network scene of a mixed flow, the transmission delay of the data packet is low, and if the throughput is high, determining E as the lower PFC threshold limit value XON3 corresponding to the mixed flow, and determining F as the upper PFC threshold limit value XOFF3 corresponding to the mixed flow.
Optionally, in the method for controlling network traffic provided in the embodiment of the present application, after configuring the traffic threshold value to a port of a network device, the method further includes: acquiring the capacity of network flow cached by a port of network equipment, and judging whether the capacity is positioned between a flow opening threshold value and a flow closing threshold value; sending a first instruction to upstream equipment of the network equipment under the condition that the capacity is larger than a flow closing threshold value, wherein the first instruction is used for indicating the upstream equipment to stop sending data; and sending a second instruction to the upstream equipment under the condition that the capacity is smaller than the flow closing threshold value, wherein the second instruction is used for instructing the upstream equipment to resume sending data.
Specifically, the capacity may be a cache capacity of a port of the switch, that is, a capacity of storing a packet, when a packet backlogged by the port of the switch exceeds an upper limit value XOFF of a PFC threshold, if the upstream device continues to transmit the packet, a packet loss may occur, so the switch needs to send a PAUSE frame to the device of the upstream link, that is, a first instruction, to instruct the device of the upstream link to stop sending the packet, when the packet backlogged by the port of the switch is lower than the lower limit value XON of the PFC threshold, it is described that the port of the switch may process more packets, at this time, the switch stops sending the PAUSE frame to the device of the upstream link, that is, a second instruction, to instruct the device of the upstream link to resume sending the packet. According to the comparison condition of the capacity and the flow threshold value, a corresponding instruction is sent to the equipment of the upstream link, so that the phenomenon of packet loss is avoided.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than here.
It should be noted that the network traffic control apparatus in the embodiment of the present application may be used to execute the method for controlling network traffic provided in the embodiment of the present application. The following describes a control device for network traffic according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a control device for network traffic according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
an obtaining unit 201, configured to obtain at least one traffic characteristic of network traffic of a port of a network device.
The processing unit 202 is configured to input at least one traffic characteristic into a target classification model and perform processing to obtain a target traffic label of network traffic, where the model is obtained by training a plurality of sample data, and each sample data includes at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic.
A determining unit 203, configured to determine a traffic threshold of a port of the network device according to the target traffic label, where the traffic threshold is used to control network traffic passing through the port.
The configuring unit 204 is configured to configure the traffic threshold value to a port of the network device.
In the control apparatus for network traffic provided in the embodiment of the present application, at least one traffic characteristic of network traffic of a port of a network device is obtained by an obtaining unit 201; the processing unit 202 is configured to input at least one traffic characteristic into a target classification model and perform processing to obtain a target traffic label of network traffic, where the model is obtained by training a plurality of sample data, and each sample data includes at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic; a determining unit 203, configured to determine a traffic threshold of a port of the network device according to the target traffic label, where the traffic threshold is used to control network traffic passing through the port; the configuration unit 204 configures the traffic threshold value to a port of a network device, thereby solving the problem in the related art that the switch cannot be guaranteed to meet high throughput and low network delay when processing data in multiple network scenarios. A classification model aiming at different network scenes is trained through historical test experience of network flow, and flow threshold values aiming at different network scenes are set, so that the switch can adjust the flow threshold values in real time in various network scenes, and the effect of stable and efficient transmission effect of the network flow is guaranteed.
Optionally, in the control device of network traffic provided in this embodiment of the present application, the device further includes: the historical flow characteristic acquisition unit is used for acquiring a plurality of groups of historical flow characteristics under various flow scenes and determining a flow label corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; the sample determining unit is used for determining each group of historical flow characteristics and the flow label corresponding to each group of historical flow characteristics as one sample data to obtain a plurality of sample data; and the training unit is used for training a preset classification model according to a plurality of sample data to obtain a target classification model.
Optionally, in the apparatus for controlling network traffic provided in the embodiment of the present application, the apparatus further includes: the label determining unit is used for determining various flow scenes, determining a flow label for each flow scene, and establishing a mapping relation between the flow label of the flow scene and a flow threshold value corresponding to the flow scene to obtain a mapping relation table; the determination unit 203 includes: and the obtaining module is used for obtaining a traffic threshold corresponding to the target traffic label according to the mapping relation table and determining the obtained traffic threshold as the traffic threshold of the port of the network equipment.
Optionally, in the control device of network traffic provided in this embodiment of the present application, the device further includes: the flow characteristic range determining unit is used for acquiring multiple groups of historical flow characteristics under various flow scenes and determining flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic; and the threshold value determining unit is used for determining a flow opening threshold value and a flow closing threshold value according to the flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, and determining the flow opening threshold value and the flow closing threshold value as the flow threshold values corresponding to the flow scenes.
Optionally, in the control device of network traffic provided in this embodiment of the present application, the device further includes: the system comprises a capacity acquisition unit, a traffic switching unit and a traffic switching unit, wherein the capacity acquisition unit is used for acquiring the capacity of network traffic cached by a port of network equipment and judging whether the capacity is positioned between a traffic switching threshold and a traffic switching threshold; the first instruction sending unit is used for sending a first instruction to the upstream equipment of the network equipment under the condition that the capacity is larger than a flow closing threshold value, wherein the first instruction is used for indicating the upstream equipment to stop sending data; and the second instruction sending unit is used for sending a second instruction to the upstream equipment under the condition that the capacity is smaller than the flow closing threshold value, wherein the second instruction is used for indicating the upstream equipment to restore the data sending.
Optionally, in the control device of network traffic provided in the embodiment of the present application, the traffic characteristics include at least one of: the buffer queue of the port occupies the memory size of the network device and the throughput of the port.
Optionally, in the control device of network traffic provided in this embodiment of the present application, the multiple traffic scenarios include: elephant flow scenario, rat flow scenario, and a hybrid scenario of elephant flow and rat flow.
The control device of the network traffic comprises a processor and a memory, the units and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the stable and efficient transmission effect of the network flow is guaranteed by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium on which a program is stored, the program implementing the method for controlling network traffic when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes a control method of network flow when running.
As shown in fig. 3, an electronic device 301 includes a processor, a memory, and a program stored in the memory and executable on the processor, where the processor executes the program to implement the following steps: processing of state data based on block chains. The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application also provides a computer program product adapted to execute a program of the control method of initializing network traffic when executed on a data processing device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (10)

1. A method for controlling network traffic, comprising:
acquiring at least one flow characteristic of network flow of a port of network equipment;
inputting the at least one traffic characteristic into a target classification model for processing to obtain a target traffic label of the network traffic, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic;
determining a traffic threshold value of a port of the network device according to the target traffic label, wherein the traffic threshold value is used for controlling network traffic passing through the port;
and configuring the traffic threshold value to a port of network equipment.
2. The method of claim 1, wherein prior to inputting the at least one traffic characteristic into a target classification model for processing to obtain a traffic label for the network traffic, the method further comprises:
acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining a flow label corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic;
determining each group of the historical flow characteristics and the flow label corresponding to each group of the historical flow characteristics as sample data to obtain a plurality of sample data;
and training a preset classification model according to a plurality of sample data to obtain the target classification model.
3. The method of claim 1, wherein prior to determining the traffic threshold value for the port of the network device based on the target traffic label, the method further comprises:
determining a plurality of flow scenes, determining a flow label for each flow scene, and establishing a mapping relation between the flow label of the flow scene and a flow threshold value corresponding to the flow scene to obtain a mapping relation table;
determining a traffic threshold value of a port of the network device according to the target traffic label includes:
and acquiring a traffic threshold corresponding to the target traffic label according to the mapping relation table, and determining the acquired traffic threshold as the traffic threshold of the port of the network equipment.
4. The method according to claim 3, wherein before establishing a mapping relationship between the traffic label of the traffic scenario and the traffic threshold corresponding to the traffic scenario to obtain a mapping relationship table, the method further comprises:
acquiring multiple groups of historical flow characteristics under multiple flow scenes, and determining flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, wherein each group of historical flow characteristics comprises at least one historical flow characteristic;
and determining a flow opening threshold value and a flow closing threshold value according to flow characteristic ranges corresponding to various historical flow characteristics corresponding to each flow scene, and determining the flow opening threshold value and the flow closing threshold value as the flow threshold values corresponding to the flow scenes.
5. The method of claim 4, wherein after configuring the traffic threshold value into a port of a network device, the method further comprises:
acquiring the capacity of the network flow cached by a port of the network equipment, and judging whether the capacity is positioned between the flow opening threshold value and the flow closing threshold value;
sending a first instruction to an upstream device of the network device when the capacity is greater than the traffic shutoff threshold value, wherein the first instruction is used for instructing the upstream device to stop sending data;
and sending a second instruction to the upstream device when the capacity is smaller than the flow closing threshold value, wherein the second instruction is used for instructing the upstream device to resume sending data.
6. The method of claim 1, wherein the flow characteristics include at least one of: the buffer queue of the port occupies the memory size of the network device and the throughput of the port.
7. The method of claim 2, wherein the plurality of traffic scenarios comprises: elephant flow scenario, rat flow scenario, and a hybrid scenario of elephant flow and rat flow.
8. A device for controlling network traffic, comprising:
an obtaining unit, configured to obtain at least one traffic characteristic of network traffic of a port of a network device;
the processing unit is used for inputting the at least one traffic characteristic into a target classification model for processing to obtain a target traffic label of the network traffic, wherein the model is obtained by training a plurality of sample data, and each sample data comprises at least one historical traffic characteristic and a traffic label corresponding to the at least one historical traffic characteristic;
a determining unit, configured to determine a traffic threshold of a port of the network device according to the target traffic label, where the traffic threshold is used to control network traffic passing through the port;
and the configuration unit is used for configuring the flow threshold value to a port of network equipment.
9. A processor configured to run a program, wherein the program is configured to execute the method for controlling network traffic according to any one of claims 1 to 7 when the program is run.
10. An electronic device comprising one or more processors and memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of controlling network traffic of any of claims 1-7.
CN202210521045.8A 2022-05-13 2022-05-13 Network flow control method and device, processor and electronic equipment Pending CN115002032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210521045.8A CN115002032A (en) 2022-05-13 2022-05-13 Network flow control method and device, processor and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210521045.8A CN115002032A (en) 2022-05-13 2022-05-13 Network flow control method and device, processor and electronic equipment

Publications (1)

Publication Number Publication Date
CN115002032A true CN115002032A (en) 2022-09-02

Family

ID=83027771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210521045.8A Pending CN115002032A (en) 2022-05-13 2022-05-13 Network flow control method and device, processor and electronic equipment

Country Status (1)

Country Link
CN (1) CN115002032A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634223A (en) * 2013-12-03 2014-03-12 北京东土科技股份有限公司 Network service flow based dynamic control transmission method and device
CN109726744A (en) * 2018-12-14 2019-05-07 深圳先进技术研究院 A network traffic classification method
CN112511325A (en) * 2019-09-16 2021-03-16 华为技术有限公司 Network congestion control method, node, system and storage medium
CN113348645A (en) * 2018-11-27 2021-09-03 萨瑟尔公司 System and method for data stream classification
CN114372536A (en) * 2022-01-13 2022-04-19 中国人民解放军国防科技大学 Unknown network traffic data identification method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634223A (en) * 2013-12-03 2014-03-12 北京东土科技股份有限公司 Network service flow based dynamic control transmission method and device
CN113348645A (en) * 2018-11-27 2021-09-03 萨瑟尔公司 System and method for data stream classification
CN109726744A (en) * 2018-12-14 2019-05-07 深圳先进技术研究院 A network traffic classification method
CN112511325A (en) * 2019-09-16 2021-03-16 华为技术有限公司 Network congestion control method, node, system and storage medium
CN114372536A (en) * 2022-01-13 2022-04-19 中国人民解放军国防科技大学 Unknown network traffic data identification method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110022269B (en) Communication data processing method, device and equipment
US10122645B2 (en) Output queue latency behavior for input queue based device
CN114007225A (en) BWP allocation method, apparatus, electronic device and computer readable storage medium
CN102195875A (en) Combined hardware/software forwarding mechanism and method
CN106664290A (en) Data transmission method and device for photoelectric hybrid network
CN107613528B (en) Method and system for controlling service flow
CN109615022B (en) Model online configuration method and device
Bentaleb et al. Common media client data (cmcd) initial findings
CN114095956B (en) Network optimization method, device and storage medium
CN112751781A (en) Method, device and equipment for processing flow data and computer storage medium
CN113328953A (en) Method, device and storage medium for network congestion adjustment
US20190042294A1 (en) System and method for implementing virtualized network functions with a shared memory pool
KR20170059465A (en) Network classification for applications
Montazerolghaem Softwarization and virtualization of VoIP networks
WO2022253194A1 (en) Packet forwarding method and apparatus, and communication network
CN115002032A (en) Network flow control method and device, processor and electronic equipment
CN113973052A (en) Cloud network system, data transmission method, computing node and storage medium
CN111786887A (en) Data forwarding method, apparatus, computing device, and medium executed by control device
WO2022253190A1 (en) Service flow performance testing method and apparatus, and communication network
US11895531B2 (en) Method and device for regulating flow of data transmission in a wireless network
CN109391663B (en) Access request processing method and device
US11012378B2 (en) Methods and apparatus for shared buffer allocation in a transport node
CN115865684A (en) Host scheduling method, system, equipment and computer readable storage medium
CN115102898A (en) Communication method, device and storage medium
CN115344350A (en) Node equipment of cloud service system and resource processing method

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