Disclosure of Invention
The embodiment of the application provides a message processing method to improve the transmission delay of a message.
In a first aspect, an embodiment of the present application provides a message processing method, which may be applied to network devices such as a router and a switch. In particular, for a message flow which is not a small flow, the requirement for transmission delay can be reflected on the characteristic parameters of the message flow. Therefore, in this embodiment of the present application, the network device acquires the first packet, may determine a packet flow to which the first packet belongs, and when the number of consecutively acquired packets belonging to the packet flow is greater than or equal to the first threshold, that is, when the packet flow is not a streamlet, may further determine the characteristic parameter of the packet flow according to the acquired first packet. And the time interval of adjacent messages in the continuously acquired messages belonging to the message stream is less than or equal to a first time threshold. Because the characteristic parameter of the message flow can reflect the requirement of the message flow on the transmission delay, after the characteristic parameter of the message flow is determined, the priority of the first message can be determined according to the characteristic parameter of the message flow. For example, if the characteristic parameter of the packet flow indicates that the packet flow requires a lower transmission delay, it may be determined that the priority of the first packet is a higher priority; for another example, if the characteristic parameter of the packet flow indicates that the packet flow has a relatively high allowable transmission delay, the priority of the first packet may be determined to be a low priority, and the like. Therefore, with the scheme of the embodiment of the present application, for the first packet of which the packet flow is not a streamlet, the priority of the first packet is determined not as the low priority as in the conventional technology, but by combining the characteristic parameters of the packet flow to which the first packet belongs, so that the determined priority can meet the requirement of the first packet on transmission delay.
In one implementation, for message flows that are not streamlets, the message flows may be divided into categories based on their transmission delay requirements. When classifying the packet streams, the packet streams having substantially the same level of requirements for transmission delay may be classified into one category. Thus, the priority of the packet can be determined according to the categories of the packet stream, wherein one category may correspond to one priority. It can be understood that the message flows with the same category have basically the same requirement level for transmission delay, and the characteristic parameters of the message flows can reflect the requirement of the message flows for transmission delay. Thus, for one or more packet flows belonging to a class, the characteristic parameters of the one or more packet flows may be considered to be within a certain parameter range. In view of this situation, in another implementation manner of the embodiment of the present application, the network device may determine, for example, a mapping relationship between a characteristic parameter range and a packet priority in advance, where the characteristic parameter range may represent a category of a packet flow. Therefore, after the network device determines the characteristic parameter of the message flow, the first parameter range to which the characteristic parameter of the message flow belongs can be further determined, and then the network device determines the message priority corresponding to the first parameter range as the priority of the first message according to the mapping relation between the predetermined characteristic parameter range and the message priority.
In an implementation manner, when the time interval between adjacent packets is greater than a first time threshold, the network device may zero the number of the continuously acquired packets belonging to the packet stream. In addition, the network device can also clear the characteristic parameters of the message flow according to the aging period corresponding to the characteristic parameters. For the message flow to which the first message belongs, if the number of the continuously acquired messages belonging to the message flow is cleared before the first message is acquired, the number of the continuously acquired messages belonging to the message flow is counted again from 1 after the first message is acquired, which may affect a result of determining whether the message flow is a streamlet or not, and correspondingly, may affect a result of determining the priority of the first message. In addition, if the characteristic parameter of the packet stream is cleared before the first packet is acquired, the characteristic parameter of the packet stream may be recalculated after the first packet is acquired, which may also affect the result of determining the priority of the first packet. It can be understood that if the priority of the first packet is determined incorrectly, the packet flow to which the first packet belongs may be out of order. The message flow disorder refers to a sequence in which the network device forwards the messages, and is inconsistent with a sequence in which the network device obtains the messages. To improve this situation, in the embodiment of the present application, a first parameter may be stored in the network device, and a value of the first parameter is used to indicate the priority of the second packet. Accordingly, the network device may determine the priority of the first packet according to the value of the first parameter and the characteristic parameter of the packet flow.
In an implementation manner, after determining the priority of the first packet, the network device may further modify the value of the first parameter, so that the modified value of the first parameter indicates the priority of the first packet. After the value of the first parameter is modified, if the network device acquires other messages belonging to the message flow again, the priority of the other messages can be determined by combining the modified value of the first parameter, so that the disorder of the message flow is reduced.
In one implementation, the first packet may include a first field therein indicating a priority of the first packet. The value of the first field included in the first packet acquired by the network device may not be consistent with the priority of the first packet determined according to the characteristic parameter of the packet flow. Therefore, in this embodiment of the present application, if the priority of the first packet determined by the network device is not consistent with the packet priority indicated by the value of the first field in the first packet, the network device may modify the first field, so that the modified value of the first field indicates the priority of the first packet determined according to the characteristic parameter of the packet flow.
In one implementation, after the network device determines the priority of the first packet, the network device may forward the first packet according to the priority of the first packet.
In one implementation, after determining the characteristic parameter of the packet flow, the network device may determine the priority of the first packet according to the characteristic parameter, and may send the characteristic parameter of the packet flow to the display device, where the display device displays the received characteristic parameter. In this way, the user can analyze the message stream through the content displayed by the display device.
In an implementation manner, the characteristic parameter range may be issued to the network device by the controller, and in order to make the determined priority of the packet more accurate and real-time adjustment, in an implementation manner of the embodiment of the present application, the controller may further adjust the characteristic parameter range of the packet flow according to the characteristic parameter of the packet flow. Specifically, after determining the characteristic parameters of the packet flow, the network device may send the characteristic parameters to the controller. It will be appreciated that the controller may receive characteristic parameters for a plurality of message streams, as the network device may send the characteristic parameters to the controller each time it determines a characteristic parameter for a message stream. The controller may classify according to the obtained characteristic parameters of the plurality of packet flows. The network device may then adjust the aforementioned characteristic parameter range according to the classification result. After the network device obtains the adjusted feature parameter, if the network device continues to obtain the third packet belonging to the packet flow, the priority of the third packet may be determined according to the adjusted feature parameter range.
In one implementation manner, on the one hand, the aforementioned characteristic parameter range and the preset time period may affect a result of determining the priority of the first packet, so that the forwarding delay of the first packet cannot meet the requirement of the first packet on the transmission delay. On the other hand, if the result of determining the priority of the message by the network device is more accurate, the actual time delay of each queue in the network device is less than or equal to the time delay upper limit corresponding to each queue. If the queue with the actual time delay larger than the corresponding time delay upper limit exists in the network equipment, the value of the characteristic parameter range or the preset time period is unreasonable. Therefore, in this embodiment of the present application, the network device may further send the actual delay of the target queue to the controller, and the controller adjusts the target parameter according to the delay of the target queue and the delay upper limit of the target queue, so that the actual delay of the target queue may be smaller than the delay upper limit of the target queue according to the message priority determined according to the adjusted target parameter. Specifically, the controller may adjust the target parameter when the actual delay of the target queue is greater than the upper delay limit. The target parameter mentioned herein may include any one or more of a characteristic parameter range and a preset time period of the message flow. After the controller adjusts the target parameter, the adjusted target parameter may be sent to the network device, so that if the network device continues to obtain the third packet belonging to the packet flow, the priority of the third packet may be determined according to the adjusted target parameter.
In one implementation, the characteristic parameter of the message flow may be one or more parameters that can reflect the transmission delay requirement of the message flow. In order to reduce the cost of a Central Processing Unit (CPU) required for processing the data traffic, a server for processing the traffic often sends a large number of messages in batch at a periodic time, which results in a large burst of a message stream corresponding to the traffic and a large maximum message time interval. The message time interval referred to herein refers to the time interval of adjacent messages. For some services requiring smaller transmission delay, such as video conference services, the generated traffic is smaller than that of services such as video downloading, so that the corresponding burst is smaller. In addition, because these services have a high requirement on real-time performance, a server processing the services often sends messages continuously in real time, which results in a small maximum message time interval of the message stream corresponding to the service. The number of the packets included in the burst of the packet stream and the maximum packet time interval may both reflect the requirement of the service corresponding to the packet stream for the transmission delay, and therefore, the characteristic parameter of the packet stream may include the number of the packets included in the burst of the packet stream. The characteristic parameters of the message flow may also include a maximum message time interval. In addition, the rate of the packet stream with a relatively low transmission delay is generally required to be relatively stable, and the rate of the packet stream with a relatively high transmission delay is allowed to fluctuate relatively greatly. Thus, the characteristic parameter of the message flow may also include a rate fluctuation coefficient of the message flow. In addition, the maximum instantaneous rate of a packet stream requiring a relatively low transmission delay is generally not very high, while the maximum instantaneous rate of a packet stream allowing a relatively high transmission delay may be very high. The transmission delay requirements of the message flow may also be determined in conjunction with the instantaneous rate of the message flow. Thus, the characteristic parameter of the message flow may also comprise the maximum instantaneous rate of the message flow.
In a second aspect, an embodiment of the present application provides a packet processing apparatus, where the apparatus includes: the device comprises an acquisition unit, a first determination unit, a second determination unit and a third determination unit. The acquisition unit is used for acquiring a first message; the first determining unit is used for determining the message flow to which the first message belongs; the second determining unit is configured to determine a characteristic parameter of the packet flow according to the first packet when the number of consecutively acquired packets belonging to the packet flow is greater than or equal to a first threshold, where a time interval between adjacent packets in the consecutively acquired packets belonging to the packet flow is less than or equal to a first time threshold; the third determining unit is configured to determine the priority of the first packet according to the characteristic parameter of the packet flow.
In an implementation manner, the third determining unit is specifically configured to: when the characteristic parameter of the message flow is within a first parameter range, determining the message priority corresponding to the first parameter range as the priority of the first message according to a mapping relation between a predetermined characteristic parameter range and the message priority, wherein the mapping relation between the characteristic parameter range and the message priority comprises: and the first parameter range and the mapping relation of the message priority corresponding to the first parameter range.
In an implementation manner, the third determining unit is specifically configured to obtain a value of a first parameter, where the value of the first parameter is used to indicate a priority of a second packet, the second packet and the first packet belong to a same packet flow, and the second packet is a previous packet of the first packet; and determining the priority of the first message according to the value of the first parameter and the characteristic parameter of the message flow.
In an implementation manner, the apparatus further includes a first modifying unit, where the first modifying unit is configured to modify a value of the first parameter, and the modified value of the first parameter is used to indicate a priority of the first packet.
In an implementation manner, the apparatus further includes a second modifying unit, where the second modifying unit is configured to modify a value of a first field in the first packet, and the modified value of the first field indicates a priority of the first packet.
And the device also comprises a forwarding unit, wherein the forwarding unit is used for forwarding the first message according to the priority of the first message.
In an implementation manner, the apparatus further includes a first sending unit, where the first sending unit is configured to send the characteristic parameter of the packet flow to a display device for displaying.
In one implementation, the apparatus further includes a second sending unit and an adjusting unit. The second sending unit is used for sending the characteristic parameters of the message flow to the controller; the adjusting unit is configured to adjust a feature parameter range corresponding to the packet stream according to a classification result of feature parameters of the plurality of packet streams, which is obtained from the controller, and the adjusted feature parameter range corresponding to the packet stream is used to determine a priority of a third packet, where the third packet is obtained after the obtaining unit obtains the first packet, and the third packet belongs to the packet stream.
In one implementation, the apparatus further includes a third transmitting unit. The third sending unit is configured to send the actual time delay of the target queue to the controller, so that the controller adjusts a target parameter when the actual time delay of the target queue is greater than the upper time delay limit of the target queue, where the adjusted target parameter is used to determine a priority of a third packet, where the third packet is a packet acquired after the network device acquires the first packet, and the third packet belongs to the packet flow; wherein: the target queue is a queue used for storing messages to be forwarded in the network equipment; the target parameters include any one or more of: the message flow corresponding to the message flow and the corresponding preset time threshold of each feature parameter are respectively, the first feature parameter is any one of the feature parameters, and the preset time threshold corresponding to the first feature parameter is used for indicating the network device to clear the first feature parameter when the time interval of the adjacent messages is greater than the preset time threshold.
In one implementation, the characteristic parameters of the packet stream include any one or more of the following: the burst of the message flow comprises the number of messages and the maximum message time interval of the message flow, wherein the message time interval is the time interval of adjacent messages, the rate fluctuation coefficient of the message flow and the maximum instantaneous rate of the message flow.
In a third aspect, an embodiment of the present application provides an apparatus. The apparatus includes a processor and a memory. The memory is used to store instructions or computer programs. The processor is configured to execute the instructions or computer program in the memory to perform the method of any of the above first aspects.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium comprising instructions or a computer program, which when run on a computer, cause the computer to perform the method of any of the above first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions or a computer program, which when run on a computer, cause the computer to perform the method of any of the first aspects above.
Detailed Description
The embodiment of the application provides a message processing method, which is used for improving the transmission delay of a message.
For convenience of understanding, a possible application scenario of the embodiment of the present application is first described. Referring to fig. 1, an exemplary application scenario is illustrated. Before describing the scenario shown in fig. 1, the concept of "message flow" related to the following embodiments is first described.
In the transmission process of the message, the message may carry information related to message transmission, and the information may be a binary group, a quintuple group, or a heptatuple group. Wherein the binary group includes a source Internet Protocol (IP) address and a destination IP address. The five-tuple includes a source IP address, a source port number, a destination IP address, a destination port number, and a transport layer protocol number. The seven-tuple includes a source Media Access Control (MAC) address, a destination MAC address, a source IP address, a destination IP address, a protocol number, a source port number, and a destination port number. If a plurality of messages continuously transmitted between two nodes carry the same information, the continuous messages may also be referred to as a message stream. Thus, the message flow to which the message belongs may be determined by information carried by the message, such as a binary, quintuple, heptatuple, or other information that may be used to distinguish message flows.
The scenario shown in fig. 1 is described next.
In the scenario shown in fig. 1, device 101 may obtain a packet from device 102 and forward the packet to device 103. The embodiments of the present application do not specifically limit the specific forms of the devices 101, 102, and 103. As an example, the device 101 may be a network device such as a router or a switch. The device 102 may be a network device such as a router or a switch, or may be a device such as a server or a terminal device. The device 103 may be a network device such as a router or a switch, or may be a device such as a server or a terminal device. The number of messages acquired by the device 101 is large, and the message forwarding capability of the device 101 is limited, that is, the number of messages forwarded by the device 101 at the same time is limited, and for the messages to be forwarded by the device 101, the device 101 may determine the priority of each message and forward the messages according to the priority of each message.
It should be noted that fig. 1 is only shown for convenience of understanding an application scenario of the embodiment of the present application, and does not limit the embodiment of the present application.
The message acquired by the device 101 may correspond to a plurality of services, such as a video-on-demand service or a voice service. The Flow Completion Time (FCT) requirements are different for different services, for example, voice call service requires a short message flow completion time, while video on demand service allows a long flow completion time. The flow completion time of the message flow can be represented by the transmission delay of the messages included in the message flow. The messages of different services have different requirements on transmission delay, for example, voice call service requires relatively low transmission delay, and video on demand service allows relatively high transmission delay. Moreover, the packet stream corresponding to the service requiring a relatively low transmission delay is generally a small stream. A streamlet is a stream of messages with a relatively low rate or a stream of messages comprising a relatively small number of messages. Therefore, in the conventional technology, the method for determining the priority of the message is simple, that is: if the message flow to which the message belongs is a small flow, the priority of the message is high priority, and if the message flow to which the message belongs is not a small flow, the priority of the message is low priority.
However, for some services, although the corresponding message flow is not a small flow, the service also requires a relatively low transmission delay. For example, for video conference services and Virtual Reality (VR) services, although the corresponding message streams are not streamlets, such services also require relatively low transmission delay. However, by adopting the scheme of determining the priority of the packet in the conventional technology, the priority of the packet of the service is determined to be low, so that the determined priority cannot meet the requirement of the packet on transmission delay, and further, the quality of service (QOS) of the service is affected.
In view of this, an embodiment of the present application provides a message processing method, where the method is used to determine a priority of a message, and the determined priority of the message may meet a requirement of the message on transmission delay. Specifically, with the adoption of the scheme of the embodiment of the application, when the message flow to which the first message to be forwarded belongs is not a small flow, the determined priority of the first message can meet the requirement of the first message on the transmission delay. The following describes a message processing method provided in an embodiment of the present application with reference to the accompanying drawings.
Referring to fig. 2, this figure is a schematic flowchart of a message processing method according to an embodiment of the present application. The message processing method shown in fig. 2 can be implemented, for example, by the following steps S101 to S103. The embodiment takes a network device as an execution subject as an example.
S101: the network equipment acquires a first message and determines a message flow to which the first message belongs.
In this embodiment, the network device may be an intermediate node that forwards the first packet. The network device may receive the first packet from the other device, and after acquiring the first packet, the network device may forward the first packet to the other device. The network device mentioned in the embodiments of the present application may be, for example, the device 101 shown in fig. 1.
As described above, different services have different requirements for the flow completion time, and correspondingly, messages of different services have different requirements for the transmission delay. Therefore, in this embodiment of the application, after acquiring the first packet, the network device may further determine a packet flow to which the first packet belongs, and determine the priority of the first packet according to the packet flow to which the first packet belongs. Specifically, the network device may determine the packet flow to which the first packet belongs according to a binary group, a quintuple group, or a seven-tuple group of the first packet.
S102: when the number of the continuously acquired messages belonging to the message flow is larger than or equal to a first threshold value, the network equipment determines the characteristic parameters of the message flow according to the first message, and the time interval of adjacent messages in the continuously acquired messages belonging to the message flow is smaller than or equal to a first time threshold value.
S103: and the network equipment determines the priority of the first message according to the characteristic parameters of the message flow.
In this embodiment, if the time interval between adjacent messages in the message stream to which the first message belongs is relatively small and the number of the messages is relatively large, it may be determined that the message stream to which the first message belongs is not a streamlet. Specifically, after determining the message flow to which the first message belongs, the network device may further determine whether the number of continuously acquired messages belonging to the message flow is less than or equal to a first threshold, so as to determine whether the message flow to which the first message belongs is a trickle, where in the continuously acquired messages belonging to the message flow, a time interval between adjacent messages is less than or equal to a first time threshold. The specific value of the first time threshold may be determined according to actual conditions, and the first time threshold may be, for example, 500 milliseconds.
In this embodiment, if the number of packets included in the packet flow to which the first packet belongs is smaller than the first threshold, it indicates that the packet flow to which the first packet belongs is a small flow, and for this case, the priority of the first packet may be directly determined to be a high priority.
If the number of the messages included in the message flow to which the first message belongs is greater than or equal to a first threshold value, it indicates that the message flow to which the first message belongs is not a trickle. In this embodiment, if the packet flow is not a streamlet, the priority of the first packet is further determined according to a requirement of the packet flow on transmission delay. Specifically, the characteristic parameter of the packet flow may reflect a requirement of the packet flow for transmission delay, so that the characteristic parameter of the packet flow may be further determined, thereby further determining the priority of the first packet.
Regarding the characteristic parameter of the message flow, the embodiment of the present application is not particularly limited, and the characteristic parameter of the message flow may be one or more parameters capable of reflecting the requirement of the message flow on the transmission delay. In order to reduce the cost of a Central Processing Unit (CPU) required for processing the data traffic, a server for processing the traffic often sends a large number of messages in batch at a periodic time, which results in a large burst (burst) of a message stream corresponding to the traffic and a large maximum message time interval. The message time interval referred to herein refers to the time interval of adjacent messages. For some services requiring smaller transmission delay, such as video conference services, the generated traffic is smaller than that of services such as video downloading, so that the corresponding burst is smaller. In addition, because these services have a high requirement on real-time performance, a server processing the services often sends messages continuously in real time, which results in a small maximum message time interval of the message stream corresponding to the service.
With respect to bursts of message streams, it should be noted that a message stream can be divided into one or more bursts. If the time interval between adjacent messages is less than or equal to T, the two messages belong to the same burst. Reference herein to T may be understood as an aging period corresponding to the number of messages comprised by a burst. As shown in fig. 3, fig. 3 is a schematic diagram of a method for determining a burst of a message flow according to an embodiment of the present application. As shown in fig. 3, the horizontal axis represents the time for acquiring the packet, and the vertical axis represents the number of packets included in the burst, i.e., the burst size. The small squares below the horizontal axis represent messages, and according to the sequence from left to right, the time intervals of adjacent messages in the first four messages are all smaller than T, and the time interval of the fourth message and the fifth message is larger than T, so that the number of messages included in a burst is determined to be 4, that is, the counter is 4. Accordingly, from the fifth message to the 10 th message, the time interval between adjacent messages is less than T, and therefore, it can be determined that the counter is 6. The above mentioned that the burst is larger means that the burst includes a larger number of messages, and the burst is smaller means that the burst includes a smaller number of messages.
As can be seen from the above description, both the number of packets included in a burst of a packet stream and the maximum packet time interval may reflect the requirement of the service corresponding to the packet stream for transmission delay, and therefore, in an implementation manner of the embodiment of the present application, the characteristic parameter of the packet stream may include the number of packets included in the burst of the packet stream. In another implementation manner of the embodiment of the present application, the characteristic parameter of the packet flow may further include a maximum packet time interval.
Regarding the determination method of the maximum message time interval, it should be noted that, assuming that g represents the maximum message time interval of one message flow, when the network device acquires a new message of the message flow, if the time of the new message is greater than t1 with the time interval of the previous message, g is cleared, otherwise, the value of g is updated to g ═ max { g, [ delta ] t }, where [ delta ] t is the time interval between the new message and the previous message. Reference herein to t1 may be understood as an aging period corresponding to a maximum message time interval.
Generally, the rate of a packet stream with a relatively low transmission delay is required to be relatively stable, and the rate of a packet stream with a relatively high transmission delay is allowed to fluctuate relatively greatly. Therefore, in another implementation manner of the embodiment of the present application, the characteristic parameter of the packet flow may further include a rate fluctuation coefficient of the packet flow, where the rate fluctuation coefficient may be, for example, a variance of the rate of the packet flow, or, for example, a standard deviation of the rate of the packet flow, or, for example, a ratio of the standard deviation of the packet flow to an average rate of the packet flow. In addition, the maximum instantaneous rate of a packet stream requiring a relatively low transmission delay is generally not very high, while the maximum instantaneous rate of a packet stream allowing a relatively high transmission delay may be very high. The transmission delay requirements of the message flow may also be determined in conjunction with the instantaneous rate of the message flow. Therefore, in another implementation manner of the embodiment of the present application, the characteristic parameter of the message flow may further include a maximum instantaneous rate of the message flow.
The rate of the message flow can be determined by the following method: determining the byte number of the message included in the message flow in the time period T1, and dividing the byte number by T1 to obtain the rate of the message flow, it can be understood that if the value of T1 is small, the instantaneous rate of the message flow can be calculated, and if T1 is large, the average rate of the message flow can be calculated. After the rate of the message flow is obtained by calculation, the maximum instantaneous rate of the message flow and the rate fluctuation coefficient of the message flow can be further obtained.
In some embodiments, for S103, the mapping relationship between the characteristic parameter and the message priority may be stored in the network device in advance. The network equipment determines the characteristic parameters of the message flow to which the first message belongs, and determines the priority of the first message according to the pre-stored mapping relation. The mapping relationship at least includes the mapping relationship between the characteristic parameters determined in S102 and the priority of the first packet determined in S103.
In addition, for message flows that are not streamlets, the message flows may be divided into categories based on their transmission delay requirements. When classifying the packet streams, the packet streams having substantially the same level of requirements for transmission delay may be classified into one category. Thus, the priority of the packet can be determined according to the categories of the packet stream, wherein one category may correspond to one priority. The message flows with the same category have basically the same requirement level for transmission delay, and the characteristic parameters of the message flows can reflect the requirement of the message flows for the transmission delay. Thus, for one or more packet flows belonging to a class, the characteristic parameters of the one or more packet flows may be considered to be within a certain parameter range. In view of this situation, in another implementation manner of the embodiment of the present application, the network device may determine, for example, a mapping relationship between a characteristic parameter range and a packet priority in advance, where the characteristic parameter range may represent a category of a packet flow. Therefore, after the network device determines the characteristic parameter of the message flow, the first parameter range to which the characteristic parameter of the message flow belongs can be further determined, and then the network device determines the message priority corresponding to the first parameter range as the priority of the first message according to the mapping relation between the predetermined characteristic parameter range and the message priority.
Regarding the category of the message flow, for example, the category of the message flow may be a delay sensitive category, which indicates that the service corresponding to the message flow is sensitive to delay, that is, the message flow requires a lower transmission delay; the type of the packet flow may also be a delay insensitive type, which means that the service corresponding to the packet flow is not sensitive to delay, that is, the allowed transmission delay of the packet flow is relatively high. Certainly, according to the sensitivity degree of the service corresponding to the packet flow to the transmission delay, the delay sensitivity class may be further subdivided into a delay high sensitivity class, a delay medium sensitivity class, a delay low sensitivity class, and the like, which is not described in detail herein.
The correspondence between the categories of the packet flows and the characteristic parameter ranges can be understood in conjunction with table 1 below. The mapping relationship between the characteristic parameter range and the packet priority can be understood by referring to table 2 below.
It should be noted that tables 1 and 2 are shown only for convenience of understanding and do not limit the embodiments of the present application. The characteristic parameters of the message stream may include both the number of messages included in the burst and the maximum message time interval, and may also include the rate fluctuation factor and the maximum instantaneous rate mentioned above. In addition, the packet flow class may include other classes, for example, a delay insensitive class and the like, in addition to the delay sensitive class, the delay sensitive class and the delay insensitive class shown in table 1, which are not described in detail herein. The scope of the characteristic parameters is not limited to that shown in table 2, and the message priority may be high, medium, low, or the like, in addition to the higher, medium, or low priority shown in table 2. In addition, table 1 is only shown for explaining the physical meaning represented by the characteristic parameter range, and the network device may not actually determine the type of the packet flow according to the mapping relationship shown in table 1. The network device may determine the priority of the first packet directly according to the mapping relationship shown in table 2.
TABLE 1
Range of characteristic parameter
|
Categories
|
The number of messages included in the burst is less than or equal to 8
|
Class of high sensitivity to delay
|
The burst comprises a number of messages greater than 8 and less than or equal to 39
|
Sensitive class in delay
|
The burst comprises a number of messages greater than 39
|
Class of delay insensitivity
|
Maximum message time interval greater than or equal to 500 microseconds
|
Class of delay insensitivity
|
Maximum message time interval less than 500 microseconds
|
Sensitive class in delay |
TABLE 2
Range of characteristic parameter
|
Priority of message
|
The number of messages included in the burst is less than or equal to 8
|
Is higher than
|
The burst comprises a number of messages greater than 8 and less than or equal to 39
|
In
|
The burst comprises a number of messages greater than 39
|
Is low in |
Regarding a specific implementation manner of determining whether the number of continuously acquired messages belonging to the message flow is greater than or equal to a first threshold, it should be noted that, in an implementation of the embodiment of the present application, a network device may include a first flow table (flow table) for storing the number of the messages. In some embodiments, the packet flow to which the first packet belongs may include multiple packets, and the first packet may be a first packet of the packet flow or may not be the first packet of the packet flow, and when the first packet is the first packet of the packet flow, after acquiring the first packet, the network device may determine that the packet number is 1, and store the packet number in the first flow table. If the first packet is not the first packet of the packet flow, the number of packets corresponding to the network device before the network device acquires the first packet may have been stored in the first flow table, and if the number of packets stored in the first flow table is N, after the first packet is acquired, the network device may determine whether a time interval between the acquisition of the first packet and the acquisition of the second packet is greater than a first time threshold, if so, the network device may clear the number of packets stored in the first flow table, and if not, the network device may determine that the number of packets is N + 1. The first time threshold mentioned here may also be referred to as an aging period of the number of messages. The second packet mentioned here is a previous packet of the first packet, and the second packet and the first packet belong to the same packet flow.
It should be noted that, in this embodiment of the application, when the network device stores the number of packets in the first flow table, for example, the hash operation may be performed on a binary group, a quintuple group, or a heptatuple group of the first packet to obtain a corresponding packet number storage address, and then a value of the number of packets stored in the address is obtained, and 1 is added on the basis of the value, or the value is cleared. Specifically, determining the number of packets stored in the first flow table may be determined using a classic sketch (sketch) technique in specific implementation. For example, the determination may be made by using a count min sketch (CM sketch) technique among sketch techniques.
In addition, in the embodiment of the present application, for a message flow that is not a small flow, the network device may have a second flow table for storing characteristic parameters of the message flow. Specifically, the second flow table may store an identifier of the packet flow and a characteristic parameter of the packet flow. The identifier of the message stream mentioned in the embodiment of the present application may be, for example, a binary group, a quintuple group, or a heptatuple group of the message stream. Therefore, in an implementation manner of the embodiment of the present application, after determining the packet flow to which the first packet belongs, the network device may further determine whether a characteristic parameter corresponding to the aforementioned binary group, quintuple group, or heptatuple exists in the second flow table. If the message flow exists, the network device may also directly determine that the message flow is not a streamlet.
In this embodiment of the present application, after acquiring the first packet, the network device may first determine whether a second flow table has a characteristic parameter of a packet flow to which the first packet belongs, and if so, the network device may directly determine that the packet flow to which the first packet belongs is not a streamlet. For this case, the packet stream to which the first packet belongs has been determined not to be a streamlet before the first packet is acquired. The continuously acquired messages belonging to the message stream are the messages acquired before the first message is acquired. If the second flow table does not have the characteristic parameter of the message flow to which the first message belongs, the network device may further query the first flow table, determine the number N of messages included in the message flow before the first message is acquired, then, if the time interval between the network device acquiring the first message and the network device acquiring the second message is less than or equal to the first time threshold, the network device may add 1 on the basis of the number N, and further determine whether N +1 is greater than or equal to the first threshold, and if N +1 is greater than or equal to the first threshold, the network device may determine that the message flow to which the first message belongs is not a trickle. If N +1 is smaller than the first threshold, the network device may determine that the packet flow to which the first packet belongs is a streamlet. If the time interval between the network equipment acquiring the first message and the second message is larger than the first time threshold, the network equipment clears the number N in the first flow table, and determines that the message flow to which the first message belongs is a small flow. For this case, before the first packet is acquired, the packet stream to which the first packet belongs is not determined to be a streamlet, and the continuously acquired packets belonging to the packet stream include the first packet.
The characteristic parameters for storing the message stream occupy part of the storage space of the network device, so that the network device can clear the characteristic parameters of the message stream. Specifically, if the characteristic parameter of the packet stream includes a plurality of characteristic parameters, each of the characteristic parameters may correspond to a preset time interval. For convenience of description, any one of the characteristic parameters is referred to as a first characteristic parameter, and then a preset time interval corresponding to the first characteristic parameter is used for indicating to clear the first characteristic parameter of the packet stream, specifically, when the time interval between adjacent packets of the packet stream is greater than the preset time interval, the first characteristic parameter of the packet stream is cleared. In this embodiment of the present application, the preset time interval may be obtained by the network device through the human-computer interaction interface, or may be sent to the network device by the controller, which is not specifically limited in this embodiment of the present application. The specific value of the preset time threshold is not specifically limited in the embodiment of the application, and may be determined according to an actual situation, for example, the specific value of the preset time threshold may be 200 microseconds. The predetermined time interval corresponding to the first characteristic parameter mentioned herein may also be referred to as an aging period of the first characteristic parameter.
In this embodiment of the present application, the first threshold and the characteristic parameter range may be issued to the network device by the controller, or may be obtained by the network device through a human-computer interaction interface.
As can be seen from the above description, with the solution of the embodiment of the present application, for a first packet whose packet flow is not a streamlet, the priority of the first packet is not directly determined as a low priority as in the conventional technology, but is determined by combining the characteristic parameters of the packet flow to which the first packet belongs, so that the determined priority can meet the requirement of the first packet on transmission delay.
In some embodiments, a first field may be included in the first packet that indicates a priority of the first packet. The value of the first field included in the first packet acquired by the network device may not be consistent with the priority of the first packet determined in S103. For example, the method for determining the priority of the message by the device sending the first message to the network device is the same as the conventional technique, so that the determined priority of the first message is low priority. Therefore, in this embodiment of the present application, after the network device determines the priority of the first packet, if the determined priority of the first packet is not consistent with the packet priority indicated by the value of the first field in the first packet, the network device may modify the first field, so that the modified value of the first field indicates the priority of the first packet determined in S103. The first field is not particularly limited in this embodiment of the application, and the first field may be, for example, a Differentiated Services Code Point (DSCP) field.
In addition, after determining the priority of the first packet, the network device may forward the first packet according to the determined priority. Specifically, the network device may add the first packet to a queue corresponding to the priority of the first packet, thereby achieving the purpose of forwarding the first packet according to the priority of the first packet.
In some embodiments, if the value of the first field in the first packet indicates the priority of the first packet determined in S103, after the network device forwards the first packet, if the network device that receives the first packet can correctly analyze the value of the first field, the network device that receives the first packet may determine the priority of the first packet according to the value of the first field, and further forward the first packet based on the priority of the first packet, so that in the process of forwarding the first packet, the priority of the first packet may all meet the requirement of the packet flow of the first packet on the transmission delay.
As described above, in this embodiment of the present application, when the time interval between adjacent packets is greater than the first time threshold, the network device may zero the number of the packets belonging to the packet stream that are continuously obtained. In addition, the network device can also clear the characteristic parameters of the message flow according to the aging period corresponding to the characteristic parameters. For the message flow to which the first message belongs, if the number of the messages is cleared before the first message is acquired, the number of the messages is counted again from 1 after the first message is acquired, which may affect a result of determining whether the message flow is a streamlet or not, and correspondingly, may affect a result of determining the priority of the first message. In addition, if the characteristic parameter of the packet stream is cleared before the first packet is acquired, the characteristic parameter of the packet stream may be recalculated after the first packet is acquired, which may also affect the result of determining the priority of the first packet.
If the priority of the first packet is determined to be wrong, the packet flow to which the first packet belongs may be out of order. The message flow disorder refers to a sequence in which the network device forwards the messages, and is inconsistent with a sequence in which the network device obtains the messages.
The problem of message flow misordering due to an error in determining the priority of the first message will now be described. The previous message of the first message is a second message, and the second message and the first message belong to the same message flow. Before the first message is acquired, the characteristic parameters of the message flow to which the first message belongs are cleared. Assuming that the class corresponding to the packet stream is a delay insensitive class before the first packet is obtained, correspondingly, the priority of the second packet is determined as a low priority. After the first message is acquired, since the characteristic parameter of the message stream to which the first message belongs is cleared, the characteristic parameter of the message stream to which the first message belongs is recalculated, and if the priority of the first message determined according to the recalculated characteristic parameter is higher. This results in the network device forwarding the first packet earlier than between forwarding the second packets, resulting in out-of-order packet flow.
To improve this situation, in the embodiment of the present application, a first parameter may be stored in the network device, and a value of the first parameter is used to indicate the priority of the second packet. Accordingly, the network device may determine the priority of the first packet according to the value of the first parameter and the characteristic parameter of the packet flow. Specifically, the first priority may be determined according to a value of the first parameter, the second priority may be determined according to a characteristic parameter of the packet flow, and a lower priority of the first priority and the second priority may be determined as a priority of the first packet. By adopting the method, the priority of the first message is not higher than that of the second message, so that the disorder of message flow can be avoided. For example: the value of the first parameter indicates that the priority of the second message is low, that is, before the first message is acquired, the class of the message flow is a delay insensitive class, and the first priority determined according to the value of the first parameter is low. The second priority determined according to the characteristic parameters of the message flow is a higher priority, so that the priority of the first message can be determined to be a low priority. The second priority is a higher priority, possibly because the characteristic parameters of the packet stream have been cleared before the first packet is acquired. For another example: the value of the first parameter indicates that the priority of the second message is higher priority, that is, before the first message is acquired, the class of the message flow is a delay sensitive class, and the first priority determined according to the value of the first parameter is higher priority. The second priority determined according to the characteristic parameters of the message flow is low priority, so that the priority of the first message can be determined to be low priority. Because the class of the packet flow cannot be determined to be the delay insensitive class according to the characteristic parameters before the first packet is acquired, the class of the packet flow can be determined to be the delay insensitive class according to the characteristic parameters calculated according to the first packet after the first packet is acquired. For example, the number of the packets included in the burst before the first packet is obtained is 39, so that the class of the packet flow is determined to be the delay-sensitive class, and the number of the packets included in the burst after the first packet is obtained is 40, so that the class of the packet flow can be determined to be the delay-insensitive class.
Correspondingly, the network device may further modify the value of the first parameter, so that the modified value of the first parameter indicates the priority of the first packet. It can be understood that after the value of the first parameter is modified, if the network device acquires another packet belonging to the packet flow again, the priority of the another packet may be determined by combining the modified value of the first parameter, so as to avoid packet flow disorder.
It should be noted that, in this embodiment of the application, a value of the first parameter may be stored in the aforementioned second flow table, for example, specifically, a mapping relationship between an identifier of a packet flow to which the first packet belongs and the value of the first parameter may be stored in the second flow table. The identifier of the message stream may be a binary group, a quintuple group, or a seven-tuple group of the message stream.
Of course, in the embodiment of the present application, in order to save the space for storing the first parameter, the network device may also clear the value of the first parameter according to a certain period, for example, the first period, and correspondingly release the memory space for storing the value of the first parameter. When the first parameter is cleared, the identifier of the message stream can be correspondingly deleted. The specific value of the second period is not specifically limited in this embodiment, and the value of the first period may be, for example, a value that ensures that the packet flows are not out of order, and for example, the value of the first period may be 2 milliseconds.
In an implementation manner of the embodiment of the present application, after determining the characteristic parameter of the packet flow, the network device may determine, according to the characteristic parameter, a priority of the first packet, and may send the characteristic parameter of the packet flow to the display device, where the display device displays the received characteristic parameter. Specifically, the display device may display the aforementioned characteristic parameters in a graphic form such as a bar chart, a line chart, or the like, for example. It will be appreciated that the user may analyze the message stream through the content displayed by the display device. In particular, when the characteristic parameter of the message stream includes the number of messages included in a burst, the network device may obtain the number of messages included in each burst of the message stream, and send the number of messages included in each burst to the display device for display. In addition, when the characteristic parameter of the message stream includes the number of messages included in the burst, the content displayed by the display device may be the total number of bytes of the messages included in the burst, in addition to the number of messages included in the burst. The total byte number of the messages included in the burst can be obtained by multiplying the average byte number of each message by the number of the messages included in the burst. In this way, the user can determine the burst distribution of the message through the content displayed by the display device. The display device is not particularly limited in the embodiments of the present application, and the display device may be a device having a display function, for example, the display device may be a terminal device.
As described above, the characteristic parameter range may be issued by the controller to the network device, and in order to make the determined priority of the packet more accurate for this situation, in an implementation manner of the embodiment of the present application, the controller may further adjust the characteristic parameter range of the packet flow according to the characteristic parameter of the packet flow. Specifically, after determining the characteristic parameters of the packet flow, the network device may send the characteristic parameters to the controller. It will be appreciated that the controller may receive characteristic parameters for a plurality of message streams, as the network device may send the characteristic parameters to the controller each time it determines a characteristic parameter for a message stream. The controller may classify according to the obtained characteristic parameters of the plurality of packet flows. The network device may then adjust the aforementioned characteristic parameter range according to the classification result. The embodiment of the present application does not specifically limit the classification algorithm used by the controller to classify the feature parameters, and the classification algorithm may be, for example, a classic Support Vector Machine (SVM) algorithm. Now, taking an example that the characteristic parameters of the packet flows include the number of packets included in a burst, the controller divides the number of packets included in the burst of the plurality of packet flows into three categories, where the number of packets included in the burst corresponding to the first category is less than or equal to 9, the number of packets included in the burst corresponding to the second category is greater than 9 and less than or equal to 40, and the number of packets included in the burst corresponding to the third category is greater than 40. The adjusted feature parameter range can be understood by referring to the mapping relationship between the feature parameter range and the category of the packet stream shown in table 3.
TABLE 3
Range of characteristic parameter
|
Categories
|
The number of messages included in the burst is less than or equal to 9
|
Class of high sensitivity to delay
|
The burst comprises a number of messages greater than 9 and less than or equal to 40
|
Sensitive class in delay
|
The burst comprises a number of messages greater than 40
|
Class of delay insensitivity |
It can be understood that there are two implementation ways for the network device to adjust the feature parameter range according to the classification result. As an example, the characteristic parameter range may be adjusted by the controller, and after the controller adjusts the characteristic parameter range, the adjusted characteristic parameter range may be sent to the network device. As yet another example, the controller may send the foregoing classification result to the network device, and the network device adjusts the characteristic parameter according to the classification result. After the network device obtains the adjusted feature parameter, if the network device continues to obtain the third packet belonging to the packet flow, the priority of the third packet may be determined according to the adjusted feature parameter range.
In some scenarios, the aforementioned characteristic parameter range and the preset time period may both affect the result of determining the priority of the first packet, so that the forwarding delay of the first packet cannot meet the requirement of the first packet on the transmission delay. On the other hand, if the result of determining the priority of the message by the network device is more accurate, the actual time delay of each queue in the network device is less than or equal to the time delay upper limit corresponding to each queue. If the queue with the actual time delay larger than the corresponding time delay upper limit exists in the network equipment, the value of the characteristic parameter range or the preset time period is unreasonable. Therefore, in this embodiment of the present application, the network device may further send the actual delay of the target queue to the controller, and the controller adjusts the target parameter according to the delay of the target queue and the delay upper limit of the target queue, so that the actual delay of the target queue may be smaller than the delay upper limit of the target queue according to the message priority determined according to the adjusted target parameter. Specifically, the controller may adjust the target parameter when the actual delay of the target queue is greater than the upper delay limit. The target parameters mentioned herein may include any one or more of the aforementioned characteristic parameter ranges and preset time periods.
With respect to the target queue, it should be noted that the target queue may include one or more queues in the network device, for example, the target queue may include any one or more of the aforementioned queue a, queue b, and queue c. The upper delay limit of the target queue may be predetermined, and the upper delay limit may be an empirical value, or may be obtained by the controller through statistics on historical delay data of the target queue in the network device. The actual delay of the target queue may be calculated by the network device, and the network device may determine the instantaneous queue delay of the target queue as the actual delay of the target queue. Specifically, the network device may obtain the packet depth of the target queue, that is, the total number of packet bytes included in the target queue, obtain the instantaneous rate of the target queue, and obtain the instantaneous queue delay of the target queue by dividing the packet depth of the target queue by the instantaneous rate of the target queue.
In this embodiment, after the controller adjusts the target parameter, the controller may send the adjusted target parameter to the network device, so that if the network device continues to acquire the third packet belonging to the packet flow, the priority of the third packet may be determined according to the adjusted target parameter.
The manner in which the controller adjusts the target parameter is now exemplified. The target queue is the aforementioned queue b, and the type of the packet stream corresponding to the queue b is a delay sensitive type. The actual time delay of the target queue is 2.3 milliseconds, the upper time delay limit of the target queue is 2.0 milliseconds, and the actual time delay is larger than the upper time delay limit, which indicates that the number of the messages queued in the queue b is too large. The reason for the excessive number of messages queued in the queue b may be that the class of the message stream corresponding to the partial message in the queue b is a non-delay sensitive class. Therefore, for this situation, the controller may adjust the preset time period corresponding to the number of bursts, that is, adjust the aging period of the number of packet flows included in the bursts, for example, increase the aging period, so that the number of packet flows included in the bursts of packet flows can fall within the parameter range corresponding to the delay insensitive class, for example, the number of bursts included in the packet flows can be greater than 40 shown in table 3, so that a part of packets in the queue b can be divided into the queue c again, thereby slowing down the number of packets queued in the queue b, and further optimizing the result of determining the packet priority. The class of the packet stream corresponding to the queue c mentioned here is a delay insensitive class. In addition, the controller may also adjust the characteristic parameter range corresponding to the non-delay-sensitive class, for example, adjust the characteristic parameter range corresponding to the non-delay-sensitive class from greater than 40 to greater than 38, so that part of the messages in the queue b can be re-divided into the queue c, the number of the messages queued in the queue b is reduced, and the result of determining the priority of the messages is further optimized.
Based on the message processing method provided by the above embodiment, the embodiment of the present application further provides a corresponding apparatus, which is described below with reference to the accompanying drawings.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present disclosure. The time packet processing apparatus 400 shown in fig. 4 may be used to execute the packet processing method shown in fig. 2. Specifically, the message processing apparatus 400 may include an obtaining unit 401, a first determining unit 402, a second determining unit 403, and a third determining unit 404.
An obtaining unit 401, configured to obtain a first message; a first determining unit 402, configured to determine a packet flow to which the first packet belongs; a second determining unit 403, configured to determine, according to the first packet, a characteristic parameter of the packet stream when the number of consecutively acquired packets belonging to the packet stream is greater than or equal to a first threshold, where a time interval between adjacent packets in the consecutively acquired packets belonging to the packet stream is less than or equal to the first time threshold; a third determining unit 404, configured to determine a priority of the first packet according to the characteristic parameter of the packet flow.
In an implementation manner, the third determining unit 404 is specifically configured to: when the characteristic parameter of the message flow is within a first parameter range, determining the message priority corresponding to the first parameter range as the priority of the first message according to a mapping relation between a predetermined characteristic parameter range and the message priority, wherein the mapping relation between the characteristic parameter range and the message priority comprises: and the first parameter range and the mapping relation of the message priority corresponding to the first parameter range.
In an implementation manner, the third determining unit 404 is specifically configured to obtain a value of a first parameter, where the value of the first parameter is used to indicate a priority of a second packet, the second packet and the first packet belong to the same packet flow, and the second packet is a previous packet of the first packet; and determining the priority of the first message according to the value of the first parameter and the characteristic parameter of the message flow.
In an implementation manner, the apparatus 400 further includes a first modifying unit, where the first modifying unit is configured to modify a value of the first parameter, and the modified value of the first parameter is used to indicate a priority of the first packet.
In an implementation manner, the apparatus 400 further includes a second modifying unit, configured to modify a value of a first field in the first packet, where the modified value of the first field indicates a priority of the first packet.
In one implementation, the apparatus 400 further includes: and the forwarding unit is used for forwarding the first message according to the priority of the first message.
In one implementation, the apparatus 400 further includes: and the first sending unit is used for sending the characteristic parameters of the message flow to display equipment for displaying.
In one implementation, the apparatus 400 further includes: the second sending unit is used for sending the characteristic parameters of the message flow to the controller; the adjusting unit is configured to adjust a feature parameter range corresponding to the packet stream according to a classification result of feature parameters of the plurality of packet streams, which is obtained from the controller, where the adjusted feature parameter range is used to determine a priority of a third packet, the third packet is obtained after the obtaining unit obtains the first packet, and the third packet belongs to the packet stream.
In one implementation, the apparatus 400 further includes: a third sending unit, configured to send an actual time delay of a target queue to a controller, so that the controller adjusts a target parameter when the actual time delay of the target queue is greater than an upper time delay limit of the target queue, where the adjusted target parameter is used to determine a priority of a third packet, where the third packet is a packet acquired after the network device acquires the first packet, and the third packet belongs to the packet stream; wherein: the target queue is a queue used for storing messages to be forwarded in the network equipment; the target parameters include any one or more of: the message flow corresponding to the message flow and the corresponding preset time threshold of each feature parameter are respectively, the first feature parameter is any one of the feature parameters, and the preset time threshold corresponding to the first feature parameter is used for indicating the network device to clear the first feature parameter when the time interval of the adjacent messages is greater than the preset time threshold.
In one implementation, the characteristic parameters of the packet stream include any one or more of the following: the burst of the message flow comprises the number of messages and the maximum message time interval of the message flow, wherein the message time interval is the time interval of adjacent messages, the rate fluctuation coefficient of the message flow and the maximum instantaneous rate of the message flow.
Since the apparatus 400 is a device corresponding to the message processing method corresponding to fig. 2 described in the above embodiment, and the specific implementation of each unit of the apparatus 400 is the same concept as the above method embodiment, for the specific implementation of each unit of the apparatus 400, reference may be made to the description part of the message processing method corresponding to fig. 2 in the above method embodiment, and details are not repeated here.
It should be noted that the hardware structure of the aforementioned message processing apparatus 400 may be as shown in fig. 5, and fig. 5 is a schematic structural diagram of a message processing device according to an embodiment of the present application.
Referring to fig. 5, the message processing apparatus 500 includes: a processor 510, a communication interface 520, and a memory 530. Wherein the number of the processors 510 in the device 500 may be one or more, and one processor is taken as an example in fig. 5. In the embodiment of the present application, the processor 510, the communication interface 520, and the memory 530 may be connected by a bus system or other means, wherein fig. 5 is exemplified by the connection via the bus system 540.
Processor 510 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. The processor 510 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Memory 530 may include volatile memory (RAM), such as random-access memory (RAM); the memory 530 may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (HDD) or a solid-state drive (SSD); memory 530 may also comprise a combination of memories of the sort described above. The memory 530 may store, for example, the aforementioned first flow table and second flow table.
Optionally, memory 530 stores an operating system and programs, executable modules or data structures, or subsets thereof, or extensions thereof, wherein the programs may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic services and for handling hardware-based tasks. The processor 510 can read a program in the memory 530 to implement the time synchronization method or the message processing method for time synchronization provided by the embodiment of the present application.
The bus system 540 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus system 540 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 5, but this is not intended to represent only one bus or type of bus.
The embodiments of the present application also provide a computer-readable storage medium, which includes instructions or a computer program, and when the computer-readable storage medium runs on a computer, the computer is caused to execute the message processing method provided in the foregoing embodiments.
Embodiments of the present application further provide a computer program product containing instructions or a computer program, which when run on a computer, causes the computer to execute the message processing method provided in the foregoing embodiments.
The apparatus or device mentioned in the present application may be a network device, such as a switch or a router, or a server, or may be a part of a network device or a server. In some embodiments, the apparatus or device of the present application may also be a functional module deployed in a device or a network.
The technical scheme of the application is suitable for the fields of wide area networks, campus networks and data centers at present, and the method can be used for chips.
As can be understood with reference to fig. 6a and 6b, fig. 6a is a schematic diagram of a network architecture provided in the embodiment of the present application. Fig. 6b is a schematic network architecture diagram of a data center network according to an embodiment of the present disclosure.
The network architecture diagram shown in figure 6a is applicable to both wide area networks and campus networks. As shown in fig. 6a, a client 607 may interact with a remote server 601, a data center server 602, and a near-end server 603 through an edge network device 606, an aggregation layer network device 605, and a backbone layer network device 604. The technical scheme provided by the embodiment of the application can be applied to the edge network device 606, the aggregation layer network device 605 and the backbone layer network device 604. In the network architecture shown in fig. 6a, the data traffic may include upstream traffic and downstream traffic. Upstream traffic refers to data traffic communicated by the edge network device 606 to the backbone network device 604 via the aggregation network device 605. Downstream traffic refers to data traffic communicated by the backbone network device 604 through the aggregation network device 605 to the edge network device 606. For the uplink traffic, if the edge network device 606 applies the technical solution provided in the embodiment of the present application, and the aggregation layer network device 605 and the backbone layer network device 604 can correctly receive the message priority determined by the edge network device 606, the aggregation layer network device 605 and the backbone layer network device 604 may not necessarily apply the solution provided in the embodiment of the present application. For example, after the edge network device 606 determines the priority of the first packet, the aggregation layer network device 605 and the backbone layer network device 604 may determine the priority of the first packet directly according to the value of the DSCP field, corresponding to the value of the DSCP field of the first packet being modified. For downlink traffic, if the backbone network device 604 applies the technical solution provided in the embodiment of the present application, and the aggregation layer network device 605 and the edge network device 606 can correctly receive the packet priority determined by the backbone network device 604, the aggregation layer network device 605 and the edge network device 606 may not apply the solution provided in the embodiment of the present application. For example, after the backbone network device 604 determines the priority of the first packet, the aggregation layer network device 605 and the edge network device 606 may determine the priority of the first packet directly according to the value of the DSCP field of the first packet, which is modified correspondingly.
As shown in fig. 6b, the data center network may include a core layer 610, an aggregation layer 620, and an access layer 630, and each of the core layer 610, the aggregation layer 620, and the access layer 630 may include a plurality of switches. Wherein one or more switches in the aggregation layer 620 and one or more switches in the access layer may form a packet, such as packet 640 and packet 650 shown in fig. 6 b. Data exchange of the data center network occurs between the various switches of the data center network. The technical solution provided in the embodiment of the present application may be applied to each switch shown in fig. 6 b. Similarly, if the switch of the access layer 630 applies the technical solution provided in the embodiment of the present application, and the switch of the aggregation layer 620 and the switch of the core layer 610 can correctly receive the message priority determined by the switch of the access layer 630, the switch of the aggregation layer 620 and the switch of the core layer 610 do not need to apply the solution provided in the embodiment of the present application.
The technical scheme of the application, as a flow identification and classification technology, can act in front of a flow management module on the inlet side of the equipment. For example, as can be understood with reference to fig. 7a and 7b, fig. 7a and 7b provide a schematic diagram of an exemplary application scenario for an embodiment of the present application. As shown in fig. 7a, the flow identification and classification techniques provided herein may be embedded in other modules 702 prior to the flow management module 701. As shown in fig. 7b, the flow identification and classification technique provided by the present application is applied to a separate flow classification module 703, and the separate flow classification module 703 is located between the traffic management module 701 and the other modules 702. The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is only a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, each service unit in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a hardware form, and can also be realized in a software service unit form.
The integrated unit, if implemented in the form of a software business unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those skilled in the art will recognize that, in one or more of the examples described above, the services described in this disclosure may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the services may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above embodiments are intended to explain the objects, aspects and advantages of the present invention in further detail, and it should be understood that the above embodiments are merely illustrative of the present invention.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.