CN117176662A - Message transmission method and device - Google Patents

Message transmission method and device Download PDF

Info

Publication number
CN117176662A
CN117176662A CN202210595089.5A CN202210595089A CN117176662A CN 117176662 A CN117176662 A CN 117176662A CN 202210595089 A CN202210595089 A CN 202210595089A CN 117176662 A CN117176662 A CN 117176662A
Authority
CN
China
Prior art keywords
message
flow
sla
statistical
network device
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
CN202210595089.5A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202210595089.5A priority Critical patent/CN117176662A/en
Publication of CN117176662A publication Critical patent/CN117176662A/en
Pending legal-status Critical Current

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a message transmission method and device, and belongs to the technical field of networks. The network device determines that the received first message belongs to a first flow in the statistical flow table. The statistical flow table records SLA levels corresponding to one or more flows. The network device forwards the first message by adopting the first queue. The forwarding priority of the first queue is matched with a first SLA level corresponding to a first flow recorded in the statistical flow table. Because the SLA level corresponding to one or more streams recorded in the statistical stream table is obtained based on the stream characteristics of the streams and the stream characteristics of the services with different time delay sensitivities are different, the network equipment sets different SLA levels for the streams with different time delay sensitivities in the statistical stream table, so that the network equipment has different forwarding priorities for the messages of the services with different time delay sensitivities, the messages of the time delay sensitivity are forwarded preferentially, and the transmission reliability of the time delay sensitivity services is ensured.

Description

Message transmission method and device
Technical Field
The present application relates to the field of network technologies, and in particular, to a method and an apparatus for transmitting a message.
Background
With the continuous expansion of the network scale, the types of traffic carried in the network are gradually increased, so that the traffic data in the network is exploded. There is a large difference in the latency requirements of different services. When a network device forwards a message, how to realize differential transmission of different services so as to improve the transmission reliability of delay sensitive services is a problem to be solved at present.
Disclosure of Invention
The application provides a message transmission method and a message transmission device, which can improve the transmission reliability of delay sensitive services.
In a first aspect, a method for transmitting a message is provided. The network device receives the first message and determines that the first message belongs to a first flow in the statistical flow table. The statistical flow table records service level agreements (service level agreement, SLA) levels for one or more flows. The SLA level corresponding to the one or more flows is derived based on flow characteristics of the one or more flows. The network device forwards the first message by adopting the first queue. The forwarding priority of the first queue is matched with a first SLA level corresponding to a first flow recorded in the statistical flow table.
In the application, because the SLA level corresponding to the flow recorded in the statistical flow table is obtained based on the flow characteristics and the flow characteristics of the services with different time delay sensitivities are different, different SLA levels can be set for the flows with different time delay sensitivities in the statistical flow table, so that the network equipment has different forwarding priorities for the messages of the services with different time delay sensitivities, the messages of the time delay sensitivity services are forwarded preferentially, and the transmission reliability of the time delay sensitivity services is ensured.
Optionally, the network device acquires N streams with the largest transmission rate from all streams recorded in the statistical stream table, where N is a positive integer. For any one of the N streams, the network equipment determines an SLA level corresponding to the any one stream according to the stream characteristics of the any one stream so as to obtain an updated statistical stream table.
The amount of transmission data for the N streams with the greatest transmission rate is also greatest, i.e. the N streams are the largest streams passing through the network device. The N streams are subdivided according to the stream characteristics, so that the fine scheduling of the large streams can be realized, and the differentiated transmission of different large streams can be realized. In addition, in the present application, the network device may set the SLA level corresponding to the other flows except the N flows in the statistical flow table as the highest SLA level set in the statistical flow table.
Optionally, the network device determines an implementation manner of an SLA level corresponding to any one flow according to a flow characteristic of the any one flow, including: the network device inputs the flow characteristics of the flow to the classification model to obtain the SLA level corresponding to the flow output by the classification model. The classification model is trained based on stream features of the plurality of sample streams. Each sample stream is tagged with an SLA level tag. The plurality of sample streams includes a plurality of sample streams labeled with different SLA level labels.
The present application will be described by taking a classification model as an example of a machine learning model. In practice, the classification model may also be obtained by a data statistical analysis technique or by configuring parameters according to expert experience.
In one implementation, the classification model is a binary tree model or a random forest model. The classification rules used by the classification model include correspondence of feature thresholds of the flow features to SLA levels.
Optionally, the network device may also receive a rule change instruction. The rule change instruction is used for indicating to change the flow characteristics in the classification rule and/or changing the characteristic threshold value of the flow characteristics corresponding to the SLA level in the classification rule. The network device adjusts the classification rules based on the rule change instruction to obtain an updated classification model.
In the application, after the network equipment acquires the classification model, the classification rule used by the classification model can be output. For example, the network device may display the classification rules, or the network device may send the classification rules to other devices with display capabilities for display by the device. Thus, a man-machine interaction interface can be provided for operation and maintenance personnel to intuitively check and adjust the classification rules.
In another implementation, the classification model is a neural network model. For example, the classification model may be a convolutional neural network model, a long-short-term memory network model, or a deep neural network model, etc.
Optionally, the flow characteristics include one or more of transmission rate, flow bi-directionality, maximum burstiness, maximum message interval, maximum message duration, average message length, or message length variance.
Optionally, the network device receives the second message and determines that the second message does not belong to any one of the flows in the statistical flow table. The network equipment adds the corresponding relation between the second flow to which the second message belongs and the second SLA level in the statistical flow table, and forwards the second message by adopting the second queue. The second SLA level is the highest SLA level set in the statistical flow table. The forwarding priority of the second queue matches the second SLA level.
In the application, after the network equipment receives the message which does not belong to the stream in the statistical stream table, the corresponding relation between the stream to which the message belongs and the SLA level is added in the statistical stream table, and the SLA level corresponding to the newly added stream is set as the highest SLA level set in the statistical stream table, so as to realize the fine scheduling of the stream passing through the network equipment.
Optionally, an implementation manner of adding, by the network device, an SLA level corresponding to the second flow to which the second packet belongs in the statistical flow table includes: when the byte number of the second message is greater than or equal to the byte threshold value, the network equipment adds the corresponding relation between the second stream and the second SLA level in the statistical stream table.
Because the number of bytes of a single message in a small flow is usually small, through preliminary screening of unknown messages based on the number of bytes, when the number of bytes of the message is greater than or equal to a byte threshold value, the network device determines that the flow to which the message belongs is likely to be a large flow, and at this time, the network device adds the corresponding relation between the flow to which the message belongs and the SLA level in a statistical flow table. When the byte number of the message is smaller than the byte threshold value, the network equipment judges that the message possibly belongs to a small flow, and the network equipment does not record the corresponding relation between the flow to which the message belongs and the SLA level in the statistical flow table at the moment so as to reduce the memory occupied by the statistical flow table. In addition, the small flow is usually a delay sensitive flow, so the network equipment can directly forward the message belonging to the small flow by adopting the queue with high forwarding priority, and the SLA level corresponding to the small flow is not required to be distinguished. This makes the statistical flow table mainly used for recording the SLA level corresponding to the large flow. On the one hand, the number of streams required to be recorded by the statistical stream table can be reduced, so that the memory occupied by the statistical stream table is reduced, and the storage resources of network equipment are saved. On the other hand, the SLA level corresponding to the small flow does not need to be judged, so that the processing resources of the network equipment are saved. The unknown message herein refers to a message that does not belong to a flow in the statistical flow table. In an actual network scenario, the number of bytes of the first few messages of some large flows may be smaller, so that when the network device receives the first few messages belonging to the flow, the corresponding relationship between the flow and the SLA level is not added in the statistical flow table. When the network device receives the message with more bytes belonging to the stream, the network device adds the corresponding relation between the stream and the SLA level in the statistical stream table, so that the missing identification of the large stream can be avoided as much as possible.
Optionally, when the byte number of the second packet is smaller than the byte threshold, the network device forwards the second packet using the third queue. The forwarding priority of the third queue is higher than or equal to the forwarding priority of the second queue.
Optionally, for any one of the flows in the statistical flow table, when the duration of the network device not receiving the message belonging to the flow reaches the duration threshold, the network device deletes the corresponding relationship between the flow and the SLA level recorded in the statistical flow table.
The application can clean the storage space occupied by the stream which is not transmitted by the network equipment for a long time in the statistic stream table in time by setting the aging mechanism of the statistic stream table, thereby improving the effective utilization rate of the storage resource of the network equipment.
Optionally, the network device outputs one or more of the route traffic statistics, the flow characteristics of the flows recorded in the statistical flow table, the route information of the flows recorded in the statistical flow table, and the mapping relationship between the forwarding priority of the queues of the egress ports of the network device and the SLA level.
Optionally, the network device adds a first indication in the first message, and sends the first message carrying the first indication by adopting the first queue. The first indication is used for indicating that the first message corresponds to a first SLA level.
In the application, the network equipment carries the indication of the SLA level in the message, so that the network equipment which subsequently receives the message can directly select the queue with the forwarding priority matched with the SLA level indicated by the message to forward the message, and the message forwarding efficiency can be improved.
Optionally, the network device receives the third message. The third message carries a second indication. The second indication is used for indicating that the third message corresponds to a third SLA level. And the network equipment forwards the third message by adopting the fourth queue. The forwarding priority of the fourth queue matches the third SLA level.
In the application, the network equipment directly selects the queue with the forwarding priority matched with the SLA level to forward the message based on the indication of the SLA level carried by the received message, thereby improving the message forwarding efficiency.
Optionally, after receiving the third message, the network device adds a corresponding relationship between the third flow to which the third message belongs and the third SLA level in the statistical flow table.
In the application, after receiving the message carrying the indication of the SLA level, the network equipment extracts and stores the corresponding relation between the flow to which the message belongs and the SLA level so as to forward the subsequent message belonging to the flow. Thus, the network device does not need to count the flow characteristics of the flow, but can maintain the corresponding table entry in the statistical flow table according to the indication of the SLA level carried by the received message belonging to the flow, and can reduce the calculation overhead of the network device.
In a second aspect, a network device is provided. The network device comprises a plurality of functional modules that interact to implement the method of the first aspect and embodiments thereof. The plurality of functional modules may be implemented based on software, hardware, or a combination of software and hardware, and the plurality of functional modules may be arbitrarily combined or divided based on the specific implementation.
In a third aspect, a network device is provided, comprising: a processor and a memory;
the memory is used for storing a computer program, and the computer program comprises program instructions;
the processor is configured to invoke the computer program to implement the method in the first aspect and embodiments thereof.
In a fourth aspect, a computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the method of the first aspect and embodiments thereof described above.
In a fifth aspect, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method of the first aspect and embodiments thereof described above.
In a sixth aspect, a chip is provided, the chip comprising programmable logic circuits and/or program instructions, which when the chip is run, implement the method of the first aspect and embodiments thereof described above.
Drawings
Fig. 1 is a schematic diagram of an application scenario involved in a message transmission method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a binary tree model according to an embodiment of the present application;
fig. 3 is a schematic functional block diagram of a network device according to an embodiment of the present application;
fig. 4 is a flow chart of a message transmission method according to an embodiment of the present application;
fig. 5 is a flow chart of another message transmission method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another network device according to an embodiment of the present application;
fig. 8 is a schematic hardware structure of a network device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
With the continuous expansion of the network scale, the types of traffic carried in the network are gradually increased, so that the traffic data in the network is exploded. For various network scenarios such as a data center network (data center network, DCN), an industrial network, a wide area network or a campus network, a plurality of services can be simultaneously carried in each network scenario, and the requirements of different services on SLA indexes such as delay, jitter and packet loss (hereinafter referred to as SLA requirements) are very different.
For example, in a wide area network or a campus network, the types of services carried mainly include Video On Demand (VOD), web access, games, downloads, video conferencing, voice, virtual Reality (VR), augmented reality (augmented reality, AR), social media, mail, and the like. The requirements of these services for delay and packet loss vary considerably. Some services have high requirements on time delay and packet loss. For example, video conferencing and gaming require network end-to-end delays of 50 to 100 milliseconds, VR and AR require network end-to-end delays of less than 10 milliseconds, while these services require packet losses of less than 10 e-6. And some services have lower requirements on time delay and packet loss. Such as downloading, video-on-demand, and mail, can tolerate delays of 300 milliseconds or more.
Also for example, in industrial networks, intelligent manufacturing requires less than 10 milliseconds, virtual-to-virtual (virtual to virtual, V2V) communications require less than 5 milliseconds, and these services all require 0 packet loss.
Also for example, in DCNs, there are large data traffic, high performance computing traffic, distributed storage traffic, etc., with different traffic data streams having different sensitivity to time delay. Such as in distributed storage services, including online transaction (online transaction processing, OLTP) and online analytics (online analytical processing, OLAP) data streams. OLTP is responsible for performing fast data queries and processing, and network latency has a significant impact on OLTP performance, so OLTP data streaming is sensitive to latency. OLAP is responsible for reading a large amount of data and analyzing and processing, the OLAP data volume is large, but network delay has little influence on throughput performance, so that OLAP data flow is insensitive to delay.
Whether industrial, wide area, campus or DCN, networks experience relatively severe congestion during peak hours, which is transient but often times in the range of milliseconds to hundreds of milliseconds. In addition, network detours may also introduce additional unnecessary time delays. The large delays caused by these reasons can severely impact the performance of delay sensitive traffic.
In order to ensure the performance of network transmission and improve the service experience of users, the service traffic transmitted in the network needs to be analyzed, the SLA requirement of the service transmitted in the network is defined, and the service traffic is scheduled according to the SLA requirement of the service. Differentiated quality of service (quality of service, qoS) transport services are provided for traffic with different SLA requirements in the network by analysis and scheduling of traffic flows. For example, such that delay sensitive traffic is forwarded preferentially, while forwarding priority of delay insensitive traffic is reduced.
The application provides a technical scheme for guaranteeing the transmission reliability of delay sensitive services. In the technical scheme, a statistical flow table is configured in the network equipment, and the statistical flow table is used for recording the SLA level corresponding to the flow passing through the network equipment. The SLA level corresponding to the flow recorded in the statistical flow table is obtained based on the flow characteristics of the flow passing through the network equipment. When the message received by the network equipment belongs to the known flow in the statistical flow table, the network equipment forwards the message by adopting a queue with forwarding priority matched with the SLA level corresponding to the flow recorded by the statistical flow table. Because the SLA levels corresponding to the flows recorded in the statistical flow table are obtained based on the flow characteristics, and the flow characteristics of the services with different time delay sensitivities are different, different SLA levels can be set for the flows with different time delay sensitivities in the statistical flow table, so that the network equipment has different forwarding priorities for the messages of the services with different time delay sensitivities, the messages of the time delay sensitivity services are forwarded preferentially, and the transmission reliability of the time delay sensitivity services is ensured.
Wherein a single stream typically includes multiple messages with the same five-tuple. The five-tuple includes a source internet protocol (Internet Protocol, IP) address, a destination IP address, a source port, a destination port, and a transport layer protocol.
The following describes the technical scheme of the present application in detail from various angles such as application scenario, method flow, software device, hardware device, etc.
The message transmission method provided by the embodiment of the application can be applied to network equipment in a plurality of network scenes such as DCN, industrial network, wide area network, park network or wireless local area network (wireless local area network, WLAN) and the like. The embodiment of the application does not limit the application scene.
Optionally, network devices include, but are not limited to, routers, switches, firewalls, and wireless access devices (e.g., access Points (APs)). For example, the method for transmitting the message provided by the embodiment of the application can be applied to routers in a metropolitan area network or a wide area network, switches in a campus area network or a DCN, wireless access equipment in a WLAN, and the like.
For example, fig. 1 is a schematic diagram of an application scenario involved in a message transmission method according to an embodiment of the present application. As shown in fig. 1, the application scenario includes a plurality of network devices 101A-101C (collectively referred to as network devices 101). The number of network devices in the application scenario is used as an exemplary illustration only, and is not intended to limit the application scenario according to the embodiments of the present application.
The output port of the network device 101 is provided with a plurality of queues, and forwarding priorities of different queues are different. For a certain egress port of the network device 101, when forwarding a packet through the egress port, the higher the forwarding priority of the queue used, the more preferentially the packet will be forwarded from the egress port.
In the embodiment of the present application, the mapping relationship between the forwarding priority of the queue of the egress port and the SLA level is set in the network device 101. The SLA level is used to quantify the SLA requirements of the traffic flow. The more sensitive the traffic flow is to latency, the higher the corresponding SLA level of the traffic flow. For example, the queues of the egress ports of the network device 101 are divided into 8 forwarding priorities 0-7, where forwarding priority 0 is the highest forwarding priority and forwarding priority 7 is the lowest forwarding priority. The SLA requirements of the traffic flow are quantified as 4 SLA levels 0-3, with SLA level 0 being the highest SLA level and SLA level 3 being the lowest SLA level. Table 1 shows the mapping relationship between the forwarding priority of the queue of the egress port of the network device and the SLA level.
TABLE 1
Forwarding priority of outgoing port queues SLA level
0-1 0
2-3 1
4-5 2
6-7 3
Referring to table 1, it can be seen that a service flow with SLA level 0 may be forwarded using a queue forwarding an egress port with priority 0 or 1. Traffic with SLA level 1 may be forwarded using queues forwarding egress ports with priority 2 or 3. Traffic with SLA level 2 may be forwarded using queues forwarding egress ports with priority 4 or 5. Traffic with SLA level 3 may be forwarded using queues forwarding egress ports with priority 6 or 7. The embodiment of the application numbers the forwarding priority of the queue for convenience of description. In practical applications, the forwarding priority of the queue may be expressed in other ways. For example, 8 forwarding priorities classified based on differential service code points (differentiated services code point, DSCP) include Class Selector (CS) 7, CS6, expedited forwarding (expedited forwarding, EF), assured forwarding (assured forwarding, AF) 4, AF3, AF2, AF1, and Best Effort (BE) in order from high to low.
Alternatively, the mapping relationship between the forwarding priority of the queues of the egress ports of the network device 101 and the SLA level may be manually set or modified. For example, the network device 101 may display a mapping relationship of forwarding priority of queues of ports and SLA levels. Alternatively, the network device 101 may send, to a device with a display function, a mapping relationship between the forwarding priority of the queue of the egress port and the SLA level, so as to display the mapping relationship by the device, and further provide a man-machine interaction interface so as to manually set or modify the mapping relationship.
In the embodiment of the present application, the network device 101 is provided with a statistical flow table. The statistical flow table is used to record SLA levels corresponding to flows passing through the network device 101. For example, the statistical flow table may record a correspondence of a flow Identifier (ID) to SLA levels. Wherein the flow identification may be represented in five tuples. For example, table 2 shows a statistical flow table.
TABLE 2
Flow identification SLA level
Stream ID1 1
Stream ID2 2
Stream ID3 3
In combination with tables 1 and 2, after receiving a packet belonging to a flow in the statistical flow table, the network device 101 can map the packet to a queue of an output port with a corresponding forwarding priority according to an SLA level corresponding to the flow to which the packet belongs, and further forward the packet by adopting a queue with a forwarding priority matched with the SLA level corresponding to the flow to which the packet belongs. Thus, not only can the SLA requirement of the service be met, but also higher message forwarding efficiency can be realized.
Optionally, the network device 101 is responsible for maintaining a statistical flow table, including in particular creating, updating and aging (aging) statistical flow tables. After the network device 101 is powered up, an empty statistical flow table may be created during the initial phase of operation.
The following describes an implementation of updating the statistical flow table by the network device 101.
When the network device 101 receives a packet that does not belong to a flow in the statistical flow table, the network device 101 may add an entry in the statistical flow table to record the correspondence between the flow to which the packet belongs and the SLA level. The SLA level in the newly added entry is the highest SLA level set in the statistical flow table. That is, the network device 101 sets the SLA level corresponding to the new flow added to the statistical flow table for the first time to the highest SLA level set in the statistical flow table. The highest SLA level set in the statistical flow table may be the highest SLA level quantifying the SLA requirements of the traffic flow, or may be lower than the highest SLA level quantifying the SLA requirements of the traffic flow, for example the next highest SLA level quantifying the SLA requirements of the traffic flow. For example, the SLA requirements of the service flow are quantified as 4 SLA levels 0-3, where SLA level 0 is the highest SLA level, and the highest SLA level set in the statistical flow table may be SLA level 0, or may also be SLA level 1, or may even be SLA level 2, which is not limited in this embodiment of the present application, and at least the number of SLA levels settable in the statistical flow table is guaranteed to be not less than 2.
Optionally, the statistical flow table in the embodiment of the present application is used to record SLA levels corresponding to large flows. Usually, the small flow is a delay sensitive flow, so the network device can directly forward the message belonging to the small flow by adopting the queue with high forwarding priority, and the SLA level corresponding to the small flow is not required to be distinguished. Therefore, on one hand, the number of streams required to be recorded by the statistical stream table can be reduced, the memory occupied by the statistical stream table is further reduced, and the storage resources of the network equipment are saved. On the other hand, the SLA level corresponding to the small flow does not need to be judged, so that the processing resources of the network equipment are saved. The small flow and large flow described in the embodiments of the present application are relative, and the small flow is less than the large flow. Traffic flows such as games and voice belong to the streamlet. The traffic flows of video on demand and files belong to the large flows.
In one implementation, after the network device 101 receives a packet that does not belong to a flow in the statistical flow table, the byte count of the packet may be obtained first. When the byte number of the message is greater than or equal to the byte threshold, the network device 101 adds the corresponding relationship between the flow to which the message belongs and the SLA level in the statistical flow table. Since the number of bytes of a single packet in a small flow is usually small, by performing a preliminary screening based on the number of bytes on an unknown packet, when the number of bytes of the packet is greater than or equal to a byte threshold, the network device 101 determines that the flow to which the packet belongs is likely to be a large flow, and at this time, the network device 101 adds the correspondence between the flow to which the packet belongs and the SLA level in the statistical flow table. When the byte number of the message is smaller than the byte threshold, the network device 101 determines that the message may belong to a small flow, and at this time, the network device 101 does not record the corresponding relationship between the flow to which the message belongs and the SLA level in the statistical flow table, so as to reduce the memory occupied by the statistical flow table. The unknown message herein refers to a message that does not belong to a flow in the statistical flow table. In an actual network scenario, the number of bytes of the first few messages of some large flows may be smaller, so that when the network device receives the first few messages belonging to the flow, the corresponding relationship between the flow and the SLA level is not added in the statistical flow table. When the network device receives the message with more bytes belonging to the stream, the network device adds the corresponding relation between the stream and the SLA level in the statistical stream table, so that the missing identification of the large stream can be avoided as much as possible.
In this implementation, when the number of bytes of the packet received by the network device 101 is less than the byte threshold, the network device 101 may directly forward the packet using a queue with high forwarding priority. The forwarding priority of the queue with high forwarding priority is higher than or equal to the highest forwarding priority available to the statistical flow table. For example, the highest SLA level set in the statistical flow table is lower than the highest SLA level quantified for the SLA demand of the traffic flow, and accordingly, the highest forwarding priority that the statistical flow table can use is lower than the highest forwarding priority of the queue of the egress port of the network device 101. For example, the highest forwarding priority that the statistical flow table may use is AF4.
In the embodiment of the present application, the statistical flow table in the network device 101 may be updated periodically. Alternatively, the statistical flow table in the network device 101 may be manually triggered to update. For example, when the network device 101 receives a statistical flow table update instruction, the network device 101 updates the stored statistical flow table. The statistical flow table update instruction may be generated by the device and sent to the network device 101 after the user performs a trigger operation on the other device. Or when the network device 101 detects a preset trigger operation, the network device 101 determines that a statistical flow table update instruction is received. The following embodiments of the present application will be described by taking the periodic update of the statistical flow table by the network device 101 as an example.
Optionally, the network device 101 updates the statistical flow table according to the flow characteristics of the flows recorded in the statistical flow table. Optionally, the flow characteristics include one or more of transmission rate, flow bi-directionality, maximum burstiness, maximum message interval, maximum message duration, average message length, or message length variance.
In the stream characteristics counted by the network device 101, the transmission rate of one stream may be the transmission rate of the stream in the current counting period, or may be obtained based on the transmission rate of the stream in a plurality of counting periods. For example, if the transmission rate of a stream in the current statistical period is v1 and the transmission rate of the stream in the stream feature counted after the last statistical period is v2, the transmission rate v of the stream in the stream feature counted after the current statistical period is over may be: v=v1, or v=a×v1+b×v2. Wherein a and b are both constants. The transmission rate may refer to the number of messages or bytes per unit time.
Stream bi-directionality is used to reflect whether a stream has a reverse stream. If a reverse flow exists in one flow, this indicates that the flow is bidirectional. If a stream does not have a reverse stream, it means that the stream does not have bi-directionality. The following are satisfied between one stream and the reverse stream of the stream: the source IP address and the destination IP address are opposite, the source port and the destination port are opposite, and the transmission layer protocol is the same.
For a group of continuous messages of a stream, if the time interval between any two adjacent messages is smaller than a time interval threshold, the group of continuous messages is regarded as a burst of the stream, and the data volume of the group of continuous messages is a burst degree of the stream. When the time interval between two adjacent messages in one stream is greater than or equal to the time interval threshold, determining that the two adjacent messages do not belong to one burst. And then, continuously counting the burst degree of the stream by taking the next message in the two adjacent messages as the initial message. And when the burst degree obtained by the new statistics is larger than the recorded maximum burst degree, updating the recorded maximum burst degree by using the maximum burst degree obtained by the new statistics. The value of the time interval threshold has great influence on the measurement result of the burst degree, and can be set according to the actual network scene and the requirement. For example, in a wide area network, the time interval threshold may range from 10 milliseconds to 50 milliseconds. In DCN, the time interval threshold may range from 500 microseconds to 2 milliseconds.
The maximum message interval refers to the maximum time interval between two adjacent messages in a stream.
The maximum message duration refers to the maximum duration of continuous messages in a stream. The time interval between two adjacent messages in a stream is smaller than a time interval threshold, and the two adjacent messages are regarded as continuous messages. When the time interval between two adjacent messages in a stream is greater than or equal to the time interval threshold, the fact that the next message in the two adjacent messages is discontinuous with the previous message is judged. And then, continuously counting the maximum duration of the continuous messages in the stream by taking the next message in the two adjacent messages as the initial message. And when the maximum duration obtained by the new statistics is longer than the recorded maximum duration, updating the recorded maximum duration by using the maximum duration obtained by the new statistics. The value of the time interval threshold can be set according to the actual network scene and the requirements. For example, the time interval threshold may take on a value of 0.1 seconds.
Optionally, the network device 101 may also output flow characteristics of the flows recorded by the statistical flow table. For example, network device 101 may display the flow characteristics, or network device 101 may send the flow characteristics to other devices with display capabilities for display by the device. This may provide a human-machine interaction interface for an operator to visually view the flow characteristics of multiple flows through network device 101. Flow characteristics counted by the network device 101 may also be stored in the counted flow table.
The process of one update of the statistical flow table by the network device 101 is as follows: the network device 101 acquires N streams with the maximum transmission rate among all streams recorded in the statistical stream table, where N is a positive integer; for any one of the N flows, the network device 101 determines, according to the flow characteristics of the any one flow, an SLA level corresponding to the any one flow, so as to obtain an updated statistical flow table. For example, in the updated statistical flow table, flow 1 of the N flows corresponds to SLA level 1, flow 2 corresponds to SLA level 3, flow 3 corresponds to SLA level 2, and so on.
Since the transmission data amount of the N streams having the largest transmission rate is also the largest, i.e., the N streams are the largest streams passing through the network device 101. By subdividing the SLA levels of the N streams, the refined scheduling of the large streams can be realized, and the differentiated transmission of different large streams can be realized.
Optionally, the SLA level corresponding to a flow and the flow characteristics of the flow satisfy the following qualitative relationship: the SLA level for a stream is inversely related to the transmission rate of the stream, i.e. the greater the transmission rate of a stream, the lower the SLA level for the stream may be. The SLA level corresponding to a stream with bi-directionality is more likely to be higher than the SLA level corresponding to a stream without bi-directionality. The SLA level for a flow is inversely related to the maximum burst of the flow, i.e. the higher the maximum burst of a flow, the lower the SLA level for the flow may be. The SLA level corresponding to a flow is inversely related to the maximum message interval of the flow, i.e. the greater the maximum message interval of a flow, the lower the SLA level corresponding to the flow may be. The SLA level corresponding to a flow is positively correlated with the maximum message duration of the flow, i.e., the longer the maximum message duration of a flow, the higher the SLA level corresponding to the flow may be. The SLA level corresponding to a flow is inversely related to the average message length of the flow, i.e. the greater the average message length of a flow, the lower the SLA level corresponding to the flow may be. The SLA level corresponding to a flow is positively correlated with the message length variance of the flow, i.e., the greater the message length variance of a flow, the higher the SLA level corresponding to the flow may be. The qualitative relationship of the SLA level to the flow characteristics for the flow defined herein is not absolute, only indicating the possibility that this is a large probability. In practical application, the influence of some flow characteristics on the SLA level may be influenced by other flow characteristics, and the qualitative relationship between the SLA level and each flow characteristic may also be adjusted according to the service type actually carried in the network, and the embodiment of the present application does not strictly limit the qualitative relationship.
Optionally, in the updated statistical flow table, SLA levels corresponding to the other flows except the N flows with the maximum transmission rate are all the highest SLA levels set in the statistical flow table. That is, in the embodiment of the present application, the network device 101 may set SLA levels corresponding to the other flows in the statistical flow table except for the N flows with the maximum transmission rate as the highest SLA level set in the statistical flow table.
It should be noted that, the updated statistical flow table refers to a statistical flow table recorded with the SLA level corresponding to each flow that is newly determined. The updated statistical flow table may be the same as the statistical flow table before updating or may be different from the statistical flow table before updating.
Optionally, according to the flow characteristics of each of the N flows, the network device 101 determines an implementation manner of the SLA level corresponding to each flow, where the implementation manner includes: for each of the N flows, the network device 101 inputs the flow characteristics of the flow to the classification model to obtain the SLA level corresponding to the flow output by the classification model. The classification model is trained based on stream features of a plurality of sample streams. Each sample stream is tagged with an SLA level tag. The plurality of sample streams includes a plurality of sample streams labeled with different SLA level labels. For example, a voice stream, a video conference stream, a VR game stream, a VOD stream, a file stream, and the like may be selected as the sample stream. Wherein the voice stream is tagged with SLA level 0, the video conference stream and the VR game stream are tagged with SLA level 1, the VOD stream is tagged with SLA level 2, and the file stream is tagged with SLA level 3.
Optionally, the classification model is a machine learning model. The classification model may be self-trained by the network device 101. Or may be trained by other devices and then sent to the network device 101. The training process of the classification model comprises the following steps: and inputting the flow characteristics of the sample flow into the created classification model to acquire the SLA level output by the classification model, and comparing whether the output result of the classification model is consistent with the SLA level label marked by the sample flow. And continuously adjusting model parameters and repeating the training process to ensure that the accuracy of the output result of the classification model reaches a preset threshold value, and stopping training to obtain a final classification model.
The flow characteristics selected in the embodiment of the application can be set according to expert experience or can be obtained by automatic learning through a machine learning model. For example, in a wide area network or campus network scenario, transmission rate, stream bi-directionality, maximum burstiness, and maximum packet spacing may be selected as stream characteristics. Also for example, in DCN, the maximum burst may be chosen as the flow characteristic.
In one possible implementation manner, the classification model is a binary tree model or a random forest model. The classification rules used by the classification model include correspondence of feature thresholds of the flow features to SLA levels.
For example, fig. 2 is a schematic structural diagram of a binary tree model according to an embodiment of the present application. As shown in fig. 2, the flow characteristics used by the binary tree model include transmission rate, message length variance, average message length, maximum message interval, and maximum burstiness. Wherein V1-V4 are characteristic thresholds of the transmission rate. S1-S5 are characteristic thresholds of message length variance. L1-L4 are characteristic thresholds of average message length. I1-I5 are characteristic thresholds of the maximum message interval. B is the characteristic threshold for maximum burst. "Y" means "Yes". "N" means "NO". Based on the path taken by the dashed arrow in fig. 2, one classification rule used by the binary tree model is: if the transmission rate of a stream is greater than V1, the average message length is less than or equal to L3, and the variance of the message length is greater than S4, the SLA level corresponding to the stream is 3."
In this implementation, the network device 101 may also receive a rule change instruction. The rule change instruction is used for indicating to change the flow characteristics in the classification rule and/or changing the characteristic threshold value of the flow characteristics corresponding to the SLA level in the classification rule. The network device 101 adjusts the classification rules based on the rule change instruction to obtain an updated classification model.
In the application, after the network equipment acquires the classification model, the classification rule used by the classification model can be output. For example, the network device 101 may display the classification rules, or the network device 101 may send the classification rules to other devices having display capabilities for display by the device. Thus, a man-machine interaction interface can be provided for operation and maintenance personnel to intuitively check and adjust the classification rules.
In another possible implementation manner, the classification model is a neural network model. The neural network model may be trained by a supervised learning algorithm. For example, the classification model may be a convolutional neural network (convolutional neural network, CNN) model, a long-short-term memory network (long short term memory network, LSTM) model, or a deep neural network model, among others.
Alternatively, the classification model in the embodiment of the present application may also be obtained through a data statistical analysis technique or configured according to expert experience. For example, table 3 shows a classification rule applied in a wide area network or a campus network, and table 4 shows a classification rule applied in a DCN.
TABLE 3 Table 3
TABLE 4 Table 4
Wherein, the stream bidirectional value is "1", which means that the stream has bidirectional. The stream bidirectional value is "0", indicating that the stream does not have bidirectional. In table 3, for example, when the maximum packet interval of a flow is greater than 400ms and the flow has bidirectional flow, the SLA level of the flow is 2 regardless of the transmission rate and the value of the maximum burst. "ms" means milliseconds. "s" means seconds. "KB" means kilobytes. "Mbps" means megabits per second. "Inf" means getting infinity upward.
The implementation of the network device 101 aging statistics flow table is described below.
For any one of the flows in the statistical flow table, when the duration of the packet belonging to the flow is not received by the network device 101 reaches the duration threshold, the network device 101 deletes the corresponding relationship between the flow and the SLA level recorded in the statistical flow table.
According to the embodiment of the application, by setting the aging mechanism of the statistical flow table, the storage space occupied by the flow which is not transmitted by the network equipment 101 for a long time in the statistical flow table can be cleaned in time, so that the effective utilization rate of the storage resources of the network equipment 101 is improved.
Optionally, the network device 101 implements the technical solution of the present application through interaction of a data plane and a control plane. The functions of the data plane may be implemented by a forwarding chip. The functions of the control plane may be implemented by a processor. For example, fig. 3 is a schematic diagram of a functional module of a network device according to an embodiment of the present application. As shown in fig. 3, the control plane of the network device 101 includes a flow classification module, a port priority mapping module, and a man-machine interaction management module. The data plane of the network device 101 includes a flow screening and flow feature statistics module and a forwarding module.
The flow screening and flow characteristic statistics module is responsible for maintaining a statistical flow table. The entry fields of the statistical flow table may include flow identification, flow characteristics, and SLA levels. When the network device 101 receives a packet, the flow screening and flow feature statistics module may detect whether the packet belongs to a flow in the statistical flow table. If the message belongs to the service level, determining the SLA level corresponding to the message according to the statistical flow table. If the message does not belong to the SLA class, the SLA class corresponding to the message can be determined to be the highest SLA class set in the statistical flow table, and the corresponding relation between the flow to which the message belongs and the SLA class can be further added in the statistical flow table. The flow screening and flow characteristic statistics module can update flow characteristics of flows in the statistical flow table according to the received message, and periodically report the flow characteristics of a plurality of flows recorded in the statistical flow table to the flow classification module. The flow screening and flow characteristic statistics module can also interact with the man-machine interaction management module to update the statistical flow table.
The forwarding module can select the corresponding queue of the output port to forward the message according to the SLA level corresponding to the message determined by the flow screening and flow characteristic statistics module and the mapping relation between the forwarding priority of the queue of the output port and the SLA level.
The flow classification module is responsible for determining SLA levels corresponding to a plurality of flows according to the flow characteristics of the flows provided by the flow screening and flow characteristic statistics module. The flow classification module can respectively provide SLA levels corresponding to a plurality of flows for the flow screening and flow characteristic statistics module and the port priority mapping module. The flow classification module can also interact with the man-machine interaction management module to update classification rules.
The port priority mapping module is responsible for inquiring the corresponding forwarding table according to the SLA levels corresponding to the multiple streams provided by the stream classification module so as to determine the outlet port of the next hop corresponding to each stream. Such as querying a low latency forwarding table for flows with high SLA levels. The port priority mapping module can also interact with the man-machine interaction management module to update the mapping relation between the forwarding priority of the outgoing port queue and the SLA level, and provide the latest mapping relation between the forwarding priority of the outgoing port queue and the SLA level for the forwarding module. In fig. 3, the mapping relationship between the forwarding priority of the outbound queue and the SLA level is simply referred to as a mapping relationship. The port priority mapping module may also send the route information of the flow recorded in the statistical flow table to the man-machine interaction management module.
The man-machine interaction management module is responsible for configuring the mapping relation between the forwarding priority of the queue of the output port and the SLA level. The man-machine interaction management module can also output the classification rules used by the flow classification module and receive a change instruction for the classification rules so as to update the classification rules used by the flow classification module. The man-machine interaction management module can also output one or more of the route flow statistic information, the flow characteristics of the flows recorded by the statistic flow table, the route information of the flows recorded by the statistic flow table and the mapping relation between the forwarding priority of the queue of the output port and the SLA level, so that operation and maintenance personnel can check or adjust related contents. Wherein the routing traffic statistics comprise, for example, the number or the duty cycle of flows passing through the individual SLA levels of the network device, etc. The routing information includes, for example, the next hop or the egress port through which the forwarding passes, etc.
The following two embodiments of the present application respectively describe a transmission flow in which a packet (a first packet) received by a network device belongs to a flow in a statistical flow table (see fig. 4), and a transmission flow in which a packet (a second packet) received by the network device does not belong to a flow in a statistical flow table (see fig. 5).
Fig. 4 is a flow chart of a message transmission method according to an embodiment of the present application. The method may be applied to the network device 101 in the application scenario as shown in fig. 1 or the network device 101 as shown in fig. 3. As shown in fig. 4, the method includes:
Step 401, the network device receives a first message.
Step 402, the network device determines that the first packet belongs to a first flow in the statistical flow table.
The statistical flow table records the SLA level corresponding to one or more flows. The SLA level corresponding to the one or more flows is derived based on flow characteristics of the one or more flows. Alternatively, the corresponding SLA level for each flow may be derived based on the flow characteristics of that flow. The SLA level corresponding to one flow may also be affected by the flow characteristics of the other flows. For example, the network device performs the subdivision of the SLA level only for the N streams with the largest transmission rate in the statistical stream table, and sets the SLA levels corresponding to the other streams except for the N streams in the statistical stream table as the highest SLA level set in the statistical stream table, so that the SLA levels corresponding to the other streams except for the N streams are actually affected by the transmission rates of the N streams.
Optionally, the five-tuple is used as a flow identifier in the statistical flow table. After the network device receives the first message, extracting the five-tuple of the first message, and determining that the first message belongs to the first flow in the statistical flow table according to the five-tuple of the first message.
Step 403, the network device forwards the first message by using a first queue, where the forwarding priority of the first queue is matched with a first SLA level corresponding to the first flow recorded in the statistical flow table.
The first queue is a queue of an egress port of the network device.
In the embodiment of the application, because the SLA levels corresponding to the flows recorded in the statistical flow table are obtained based on the flow characteristics and the flow characteristics of the services with different time delay sensitivities are different, different SLA levels can be set for the flows with different time delay sensitivities in the statistical flow table, so that the network equipment has different forwarding priorities for the messages of the services with different time delay sensitivities, the messages of the time delay sensitive services are forwarded preferentially, and the transmission reliability of the time delay sensitive services is ensured.
Optionally, an implementation manner of forwarding the first message by the network device using the first queue includes: the network equipment adds a first indication in the first message and adopts a first queue to send the first message carrying the first indication. The first indication is used for indicating that the first message corresponds to a first SLA level.
In the embodiment of the application, the network equipment carries the indication of the SLA level in the message, so that the network equipment which subsequently receives the message can directly select the queue with the forwarding priority matched with the SLA level indicated by the message to forward the message, and the message forwarding efficiency can be improved.
Optionally, the network device receives the third message. The third message carries a second indication. The second indication is used for indicating that the third message corresponds to a third SLA level. And the network equipment forwards the third message by adopting the fourth queue. The forwarding priority of the fourth queue matches the third SLA level. Optionally, after the network device receives the third packet, a corresponding relationship between a third flow to which the third packet belongs and a third SLA level may be further added to the statistical flow table.
Optionally, if the network device is an edge node, the network device may add an indication of the SLA level in the message. Of course, the intermediate node may also add an indication of the SLA level in the message. Alternatively, the network device may add an indication of the SLA level in the header. For example, in internet protocol version four (Internet Protocol version, IPv 4), the network device may add an indication of the SLA level in a type of service (ToS) field of the IPv4 header. Also for example, in internet protocol version six (Internet Protocol version, IPv 6), the network device may add an indication of the SLA level in the Traffic Class (TC) field of the IPv6 header. The edge node may be an access side device of the communication network, and is configured to access a workstation such as a terminal and a server to the communication network. Edge nodes include, but are not limited to, routers, switches, firewalls, and APs.
In one possible implementation, the edge node adds an indication of the SLA level in each message sent. Therefore, the latter network equipment does not need to set a statistical flow table, and only needs to set the mapping relation between the forwarding priority of the queue of the output port and the SLA level. The latter network device can directly select the queue with the priority matched with the SLA level indicated in the message to forward the message, which can improve the message forwarding efficiency and save the storage space.
In another possible implementation manner, the edge node adds an indication of the SLA level to the received first message of a flow or the first message belonging to the flow after the SLA level corresponding to the flow is changed. And after receiving the message carrying the indication of the SLA level, the latter network equipment extracts and stores the corresponding relation between the flow to which the message belongs and the SLA level so as to forward the subsequent message belonging to the flow. Thus, the latter network equipment can maintain the self-stored statistic flow table according to the indication of SLA level carried by the received message without counting the flow characteristics of the flow passing through the latter network equipment, and the calculation cost can be reduced.
Fig. 5 is a flow chart of another message transmission method according to an embodiment of the present application. The method may be applied to the network device 101 in the application scenario as shown in fig. 1 or the network device 101 as shown in fig. 3. As shown in fig. 5, the method includes:
Step 501, the network device receives the second message.
Step 502, the network device determines that the second packet does not belong to any flow in the statistical flow table.
The statistical flow table records the SLA level corresponding to one or more flows. The SLA level corresponding to the one or more flows is derived based on flow characteristics of the one or more flows.
Optionally, the five-tuple is used as a flow identifier in the statistical flow table. And after the network equipment receives the second message, extracting the quintuple of the second message, and determining that the flow to which the second message belongs is not recorded in the statistical flow table according to the quintuple of the second message.
In step 503, the network device adds a corresponding relationship between the second flow to which the second message belongs and a second SLA level in the statistical flow table, where the second SLA level is the highest SLA level set in the statistical flow table.
Optionally, when the byte number of the second packet is greater than or equal to the byte threshold, the network device adds a correspondence between the second flow and the second SLA level in the statistical flow table. Or, when the byte count of the second packet is less than the byte threshold, the network device forwards the second packet using the third queue, and step 504 is not required to be executed. The forwarding priority of the third queue is higher than or equal to the forwarding priority of the second queue.
Because the number of bytes of a single message in a small flow is usually small, through preliminary screening of unknown messages based on the number of bytes, when the number of bytes of the message is greater than or equal to a byte threshold value, the network device determines that the flow to which the message belongs is likely to be a large flow, and at this time, the network device adds the corresponding relation between the flow to which the message belongs and the SLA level in a statistical flow table. When the byte number of the message is smaller than the byte threshold value, the network equipment judges that the message possibly belongs to a small flow, and the network equipment does not record the corresponding relation between the flow to which the message belongs and the SLA level in the statistical flow table at the moment so as to reduce the memory occupied by the statistical flow table. In addition, the small flow is usually a delay sensitive flow, so the network equipment can directly forward the message belonging to the small flow by adopting the queue with high forwarding priority, and the SLA level corresponding to the small flow is not required to be distinguished. This makes the statistical flow table mainly used for recording the SLA level corresponding to the large flow. On the one hand, the number of streams required to be recorded by the statistical stream table can be reduced, so that the memory occupied by the statistical stream table is reduced, and the storage resources of network equipment are saved. On the other hand, the SLA level corresponding to the small flow does not need to be judged, so that the processing resources of the network equipment are saved.
And step 504, the network equipment forwards the second message by adopting a second queue, and the forwarding priority of the second queue is matched with the second SLA level.
The second queue is a queue of an egress port of the network device. The implementation of this step 504 may refer to the implementation of step 403, and the embodiments of the present application are not described herein.
In the embodiment of the application, after the network equipment receives the message which does not belong to the stream in the statistical stream table, the corresponding relation between the stream to which the message belongs and the SLA level is added in the statistical stream table, the corresponding SLA level of the newly added stream is set as the highest SLA level set in the statistical stream table, and then the SLA level corresponding to the stream recorded in the statistical stream table is updated to realize the fine scheduling of the stream passing through the network equipment.
The sequence of the steps of the message transmission method provided by the embodiment of the application can be properly adjusted, and the steps can be correspondingly increased or decreased according to the situation. Any method of modification within the scope of the present disclosure will be readily apparent to those skilled in the art, and are intended to be encompassed within the scope of the present disclosure.
Fig. 6 is a schematic structural diagram of a network device according to an embodiment of the present application. The network device may be a network device 101 in an application scenario as shown in fig. 1 or a network device 101 as shown in fig. 3. As shown in fig. 6, the network device 600 includes: a first receiving module 601, a processing module 602 and a transmitting module 603.
The first receiving module 601 is configured to receive a first packet.
A processing module 602 is configured to determine that the first packet belongs to a first flow in the statistical flow table. The statistical flow table records the service level agreement SLA level corresponding to one or more flows. The SLA level corresponding to the one or more flows is derived based on flow characteristics of the one or more flows.
A sending module 603, configured to forward the first message using the first queue. The forwarding priority of the first queue is matched with a first SLA level corresponding to a first flow recorded in the statistical flow table.
Optionally, the processing module 602 is further configured to: and obtaining N streams with the maximum transmission rate from all streams recorded in the statistical stream table, wherein N is a positive integer. And determining the SLA level corresponding to any one of the N streams according to the stream characteristics of the any one stream so as to obtain an updated statistical stream table.
Optionally, the processing module 602 is configured to: and inputting the flow characteristics of any flow into the classification model to acquire the SLA level corresponding to the any flow output by the classification model. The classification model is trained based on stream characteristics of a plurality of sample streams, each sample stream being tagged with an SLA level tag, the plurality of sample streams comprising a plurality of sample streams tagged with different SLA level tags.
Alternatively, the classification model is a binary tree model or a random forest model. The classification rules used by the classification model include correspondence of feature thresholds of the flow features to SLA levels.
Optionally, as shown in fig. 7, the network device 600 further includes a second receiving module 604. The second receiving module 604 is configured to receive a rule changing instruction. The rule change instruction is used for indicating to change the flow characteristics in the classification rule and/or changing the characteristic threshold value of the flow characteristics corresponding to the SLA level in the classification rule. The processing module 605 is further configured to adjust the classification rule based on the rule change instruction to obtain an updated classification model.
Optionally, the flow characteristics include one or more of transmission rate, flow bi-directionality, maximum burstiness, maximum message interval, maximum message duration, average message length, or message length variance.
Optionally, the first receiving module 601 is further configured to receive a second packet. The processing module 602 is further configured to determine that the second packet does not belong to any flow in the statistical flow table. The processing module 602 is further configured to add, in the statistical flow table, a correspondence between a second flow to which the second packet belongs and a second SLA level, where the second SLA level is a highest SLA level set in the statistical flow table. The sending module 603 is further configured to forward the second message using a second queue, where a forwarding priority of the second queue matches the second SLA level.
Optionally, the processing module 602 is configured to: and when the byte number of the second message is greater than or equal to the byte threshold value, adding the corresponding relation between the second stream and the second SLA level in the statistical stream table.
Optionally, the sending module 603 is further configured to: and when the byte number of the second message is smaller than the byte threshold value, the network equipment forwards the second message by adopting the third queue. The forwarding priority of the third queue is higher than or equal to the forwarding priority of the second queue.
Optionally, the sending module 603 is configured to: and adding a first instruction in the first message, and sending the first message carrying the first instruction by adopting a first queue, wherein the first instruction is used for indicating that the first message corresponds to a first SLA level.
Optionally, the first receiving module 601 is further configured to receive a third packet. The third message carries a second indication. The second indication is used for indicating that the third message corresponds to a third SLA level. The sending module 603 is further configured to forward the third message using a fourth queue, where a forwarding priority of the fourth queue matches the third SLA level.
Optionally, the processing module 602 is further configured to add, in the statistical flow table, a correspondence between a third flow to which the third packet belongs and a third SLA level.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 8 is a schematic hardware structure of a network device according to an embodiment of the present application. As shown in fig. 8, the network device 800 includes a processor 801 and a memory 802, and the processor 801 and the memory 802 are connected through a bus 803. Fig. 8 illustrates the processor 801 and the memory 802 independently of each other. Optionally, the processor 801 and the memory 802 are integrated.
The memory 802 is used to store, among other things, a computer program that includes an operating system and program code. The memory 802 is a variety of types of storage media, such as read-only memory (ROM), random-access memory (random access memory, RAM), electrically erasable programmable read-only memory (EEPROM), compact-disk-read-only memory (compact disc read-only memory), flash memory, optical memory, registers, optical disk storage, magnetic disk, or other magnetic storage device.
Wherein the processor 801 is a general purpose processor or a special purpose processor. Processor 801 may be a single-core processor or a multi-core processor. The processor 801 comprises at least one circuit to perform the actions performed by the network device in the above-described method embodiments provided by the embodiments of the present application.
Optionally, the network device 800 further comprises a network interface 804, the network interface 804 being connected to the processor 801 and the memory 802 by a bus 803. The network interface 804 enables the network device 800 to communicate with other network devices. The processor 801 is capable of receiving messages, transmitting messages to other network devices, etc., through the network interface 804.
Optionally, the network device 800 further comprises an input/output (I/O) interface 805, the I/O interface 805 being connected to the processor 801 and the memory 802 by a bus 803. The processor 801 can receive input commands or data, etc., through the I/O interface 805. The I/O interface 805 is used for the network device 800 to connect input devices such as a keyboard, mouse, etc. Optionally, in some possible scenarios, the above-described network interface 804 and I/O interface 805 are collectively referred to as a communication interface.
Optionally, the network device 800 further comprises a display 806, the display 806 being connected to the processor 801 and the memory 802 by means of the bus 803. The display 806 can be used to display intermediate and/or final results, etc., generated by the processor 801 performing the methods described above, such as display classification rules used by the classification model, flow characteristics of the network device 800 statistics, etc. In one possible implementation, the display 806 is a touch-sensitive display screen to provide a human-machine interaction interface.
Bus 803 is any type of communication bus used to interconnect the internal devices of network device 800. Such as a system bus. The embodiment of the present application is described by taking the interconnection of the devices inside the network device 800 through the bus 803 as an example, alternatively, the devices inside the network device 800 may be communicatively connected to each other by a connection means other than the bus 803, for example, the devices inside the network device 800 are interconnected through a logic interface inside the network device 800.
The above devices may be provided on separate chips, or may be provided at least partially or entirely on the same chip. Whether the individual devices are independently disposed on different chips or integrally disposed on one or more chips is often dependent on the needs of the product design. The embodiment of the application does not limit the specific implementation form of the device.
The network device 800 shown in fig. 8 is merely exemplary, and in implementation, the network device 800 includes other components, which are not listed here. The network device 800 shown in fig. 8 may implement data transmission by performing all or part of the steps of the method provided by the above-described embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disk (digital versatile disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In embodiments of the present application, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
The term "and/or" in the present application is merely an association relation describing the association object, and indicates that three kinds of relations may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
It should be noted that, the information (including but not limited to user equipment information, user personal information, etc.), data (including but not limited to data for analysis, stored data, presented data, etc.), and signals related to the present application are all authorized by the user or are fully authorized by the parties, and the collection, use, and processing of the related data is required to comply with the relevant laws and regulations and standards of the relevant countries and regions. For example, the flow characteristics of the messages and flows involved in the present application are obtained under the condition of sufficient authorization.
The foregoing description of the preferred embodiments of the present application is not intended to limit the application, but is intended to cover any modifications, equivalents, alternatives, and improvements within the spirit and principles of the application.

Claims (27)

1. A method for transmitting a message, the method comprising:
the network equipment receives a first message;
the network equipment determines that the first message belongs to a first flow in a statistical flow table, wherein the statistical flow table records Service Level Agreement (SLA) levels corresponding to one or more flows, and the SLA levels corresponding to the one or more flows are obtained based on flow characteristics of the one or more flows;
and the network equipment forwards the first message by adopting a first queue, and the forwarding priority of the first queue is matched with a first SLA level corresponding to the first flow recorded by the statistical flow table.
2. The method according to claim 1, wherein the method further comprises:
the network equipment acquires N streams with the maximum transmission rate from all streams recorded in the statistical stream table, wherein N is a positive integer;
and for any one of the N streams, the network equipment determines an SLA level corresponding to the any one stream according to the stream characteristics of the any one stream so as to obtain an updated statistical stream table.
3. The method according to claim 2, wherein the network device determining the SLA level corresponding to the arbitrary stream according to the flow characteristics of the arbitrary stream comprises:
the network equipment inputs the flow characteristics of any stream to a classification model so as to acquire the SLA level corresponding to the any stream output by the classification model, the classification model is obtained based on the flow characteristic training of a plurality of sample streams, each sample stream is marked with an SLA level label, and the plurality of sample streams comprise a plurality of sample streams marked with different SLA level labels.
4. A method according to claim 3, wherein the classification model is a binary tree model or a random forest model, and the classification rules used by the classification model include correspondence between feature thresholds of flow features and SLA levels.
5. The method according to claim 4, wherein the method further comprises:
the network equipment receives a rule changing instruction, wherein the rule changing instruction is used for indicating to change the flow characteristics in the classification rule and/or change the characteristic threshold value of the flow characteristics corresponding to the SLA level in the classification rule;
and the network equipment adjusts the classification rule based on the rule change instruction to obtain an updated classification model.
6. The method of any of claims 1 to 5, wherein the flow characteristics include one or more of transmission rate, flow bi-directionality, maximum burstiness, maximum message interval, maximum message duration, average message length, or message length variance.
7. The method according to any one of claims 1 to 6, further comprising:
the network equipment receives a second message;
the network device determines that the second message does not belong to any flow in the statistical flow table;
the network equipment adds the corresponding relation between the second flow to which the second message belongs and a second SLA level in the statistical flow table, wherein the second SLA level is the highest SLA level set in the statistical flow table;
and the network equipment forwards the second message by adopting a second queue, and the forwarding priority of the second queue is matched with the second SLA level.
8. The method of claim 7, wherein the network device adding, in the statistical flow table, an SLA level corresponding to a second flow to which the second packet belongs, comprises:
and when the byte number of the second message is greater than or equal to a byte threshold value, the network equipment adds the corresponding relation between the second stream and the second SLA level in the statistical stream table.
9. The method of claim 8, wherein the method further comprises:
and when the byte number of the second message is smaller than the byte threshold value, the network equipment forwards the second message by adopting a third queue, wherein the forwarding priority of the third queue is higher than or equal to that of the second queue.
10. The method according to any one of claims 1 to 9, wherein the network device forwarding the first message using a first queue comprises:
and the network equipment adds a first instruction in the first message, and adopts the first queue to send a first message carrying the first instruction, wherein the first instruction is used for indicating that the first message corresponds to the first SLA level.
11. The method according to any one of claims 1 to 10, further comprising:
the network equipment receives a third message, wherein the third message carries a second instruction, and the second instruction is used for indicating that the third message corresponds to a third SLA level;
and the network equipment forwards the third message by adopting a fourth queue, and the forwarding priority of the fourth queue is matched with the third SLA level.
12. The method of claim 11, wherein after the network device receives the third message, the method further comprises:
and the network equipment adds the corresponding relation between the third flow to which the third message belongs and the third SLA level in the statistical flow table.
13. A network device, the network device comprising:
the first receiving module is used for receiving a first message;
the processing module is used for determining that the first message belongs to a first flow in a statistical flow table, wherein the statistical flow table records Service Level Agreement (SLA) levels corresponding to one or more flows, and the SLA levels corresponding to the one or more flows are obtained based on flow characteristics of the one or more flows;
and the sending module is used for forwarding the first message by adopting a first queue, and the forwarding priority of the first queue is matched with a first SLA level corresponding to the first flow recorded by the statistical flow table.
14. The network device of claim 13, wherein the processing module is further configured to:
acquiring N streams with the maximum transmission rate in all streams recorded by the statistical stream table, wherein N is a positive integer;
and determining the SLA level corresponding to any one of the N streams according to the stream characteristics of the any one stream so as to obtain an updated statistical stream table.
15. The network device of claim 14, wherein the processing module is configured to:
and inputting the flow characteristics of any stream to a classification model so as to acquire the SLA level corresponding to the any stream output by the classification model, wherein the classification model is obtained based on the flow characteristic training of a plurality of sample streams, each sample stream is marked with an SLA level label, and the plurality of sample streams comprise a plurality of sample streams marked with different SLA level labels.
16. The network device of claim 15, wherein the classification model is a binary tree model or a random forest model, and the classification rules used by the classification model include correspondence between feature thresholds of flow features and SLA levels.
17. The network device of claim 16, wherein the network device further comprises a second receiving module;
the second receiving module is used for receiving a rule changing instruction, wherein the rule changing instruction is used for indicating to change the flow characteristics in the classification rule and/or change the characteristic threshold value of the flow characteristics corresponding to the SLA level in the classification rule;
the processing module is further configured to adjust the classification rule based on the rule change instruction to obtain an updated classification model.
18. The network device of any one of claims 13 to 17, wherein the flow characteristics include one or more of transmission rate, flow bi-directionality, maximum burstiness, maximum message interval, maximum message duration, average message length, or message length variance.
19. The network device according to any one of claims 13 to 18, wherein,
the first receiving module is further configured to receive a second message;
the processing module is further configured to determine that the second packet does not belong to any flow in the statistical flow table;
the processing module is further configured to add, in the statistical flow table, a correspondence between a second flow to which the second packet belongs and a second SLA level, where the second SLA level is a highest SLA level set in the statistical flow table;
and the sending module is further configured to forward the second message by using a second queue, where a forwarding priority of the second queue is matched with the second SLA level.
20. The network device of claim 19, wherein the processing module is configured to:
and when the byte number of the second message is greater than or equal to a byte threshold value, adding the corresponding relation between the second stream and the second SLA level in the statistical stream table.
21. The network device of claim 20, wherein the transmitting module is further configured to:
and when the byte number of the second message is smaller than the byte threshold value, forwarding the second message by adopting a third queue, wherein the forwarding priority of the third queue is higher than or equal to that of the second queue.
22. The network device according to any of claims 13 to 21, wherein the sending module is configured to:
and adding a first instruction in the first message, and adopting the first queue to send the first message carrying the first instruction, wherein the first instruction is used for indicating that the first message corresponds to the first SLA level.
23. The network device according to any one of claims 13 to 22, wherein,
the first receiving module is further configured to receive a third packet, where the third packet carries a second indication, and the second indication is used to indicate that the third packet corresponds to a third SLA level;
and the sending module is further configured to forward the third message by using a fourth queue, where a forwarding priority of the fourth queue is matched with the third SLA level.
24. The network device of claim 23, wherein the network device,
And the processing module is further configured to add a corresponding relationship between a third flow to which the third packet belongs and the third SLA level to the statistical flow table.
25. A network device, comprising: a processor and a memory;
the memory is used for storing a computer program, and the computer program comprises program instructions;
the processor is configured to invoke the computer program to implement the message transmission method according to any of claims 1 to 12.
26. A computer readable storage medium having instructions stored thereon which, when executed by a processor, implement the message transmission method of any of claims 1 to 12.
27. A computer program product comprising a computer program which, when executed by a processor, implements the method of message transmission of any of claims 1 to 12.
CN202210595089.5A 2022-05-28 2022-05-28 Message transmission method and device Pending CN117176662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210595089.5A CN117176662A (en) 2022-05-28 2022-05-28 Message transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210595089.5A CN117176662A (en) 2022-05-28 2022-05-28 Message transmission method and device

Publications (1)

Publication Number Publication Date
CN117176662A true CN117176662A (en) 2023-12-05

Family

ID=88945608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210595089.5A Pending CN117176662A (en) 2022-05-28 2022-05-28 Message transmission method and device

Country Status (1)

Country Link
CN (1) CN117176662A (en)

Similar Documents

Publication Publication Date Title
US20220103477A1 (en) Packet processing method for implementing qos guarantee, device, and system
CN103765839B (en) Variable-based forwarding path construction for packet processing within a network device
US8619793B2 (en) Dynamic assignment of traffic classes to a priority queue in a packet forwarding device
KR100608904B1 (en) System and method for providing quality of service in ip network
US7602783B2 (en) Packet switch and switching method for switching variable length packets
US8797869B2 (en) Flow-based rate limiting
US8151339B2 (en) Method and apparatus for implementing filter rules in a network element
CN1359218A (en) Data structure and storage medium for realizing multi-protocol habel exchange system engineering
JP2006254134A (en) Communication statistic collection apparatus
US11165716B2 (en) Data flow processing method and device
CN113225253B (en) Message forwarding method and device
CN101547159A (en) Method and device for preventing network congestion
JP2006506845A (en) How to select a logical link for a packet in a router
US20210306267A1 (en) Optimized network latency using in-band telemetry
CN116582493A (en) Data center network link selection method and device and electronic equipment
US20230155947A1 (en) Method for identifying flow, and apparatus
CN115242892B (en) Stream identifier acquisition method, device, equipment and medium
CN114745322B (en) Video flow routing method based on genetic algorithm in SDN environment
CN117176662A (en) Message transmission method and device
CN113422699B (en) Data stream processing method and device, computer readable storage medium and electronic equipment
CN112492643B (en) Multilink-based data forwarding method and device and terminal equipment
US20210360050A1 (en) Poor-qoe assessment method and related device
JP4871775B2 (en) Statistical information collection device
CN112822107A (en) Wide area network optimization method based on artificial intelligence
TWI822066B (en) Communication equipment and adaptive quality of service setting method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication