Network congestion handling method, model update method, and related apparatus
A network congestion handling method includes obtaining network status information; determining, based on the network status information and an Explicit Congestion Notification (ECN) optimization model, a reference probability corresponding to recommended ECN configuration information; determining destination ECN configuration information based on the reference probability; and performing ECN marking on a packet by using the destination ECN configuration information.
1. A method, comprising:
obtaining network status information comprising:
network traffic information indicating traffic of a network device; and
network congestion information indicating a congestion status of the network device; and
performing, using destination Explicit Congestion Notification (ECN) configuration information, marking on a packet,
wherein the destination ECN configuration information is based on a reference probability corresponding to recommended ECN configuration information, and
wherein the reference probability is based on the network status information and an ECN optimization model.
2. The method of claim 1 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is not trustworthy, wherein the reference probability comprises M probability values, wherein M is a positive integer greater than or equal to 2, wherein a target probability value is a maximum value in the M probability values, wherein the recommended ECN configuration information is trustworthy when the target probability value is greater than or equal to a first preset threshold, and wherein the recommended ECN configuration information is not trustworthy when the target probability value is less than the first preset threshold.
3. The method of claim 2 , wherein the reference ECN configuration information is based on the network status information.
4. The method of claim 3 , further comprising:
sending, to a network analysis device, the network status information and the reference ECN configuration information;
receiving, from the network analysis device, model update information; and
updating, based on the model update information, the ECN optimization model.
5. The method of claim 1 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration is not trustworthy, wherein the recommended ECN configuration information is trustworthy when a fluctuation coefficient of a maximum N probability values in M probability values is greater than or equal to a second preset threshold, wherein the recommended ECN configuration information is not trustworthy when the fluctuation coefficient is less than the second preset threshold, wherein the reference probability comprises the M probability values, wherein N is a positive integer greater than or equal to 2 and less than M, wherein M is a positive integer greater than N, wherein the fluctuation coefficient is based on a formula, wherein the formula is:
P
N
=
s
t
d
(
P
t
o
p
N
)
mean
(
P
t
o
p
N
)
,
wherein P N indicates the fluctuation coefficient, wherein P topN indicates the N probability values, wherein mean indicates a mean function, and wherein std indicates a standard deviation function.
6. A device, comprising:
a processor; and
a memory coupled to the processor and configured to store instructions that when executed by the processor, cause the device to:
obtain network status information comprising:
network traffic information indicating traffic of a network device; and
network congestion information indicating a congestion status of the network device;
perform, using destination Explicit Congestion Notification (ECN) configuration information, marking on a packet, wherein the destination ECN configuration information is based on a reference probability corresponding to recommended ECN configuration information, and wherein the reference probability is based on the network status information and an ECN optimization model; and
send the packet.
7. The device of claim 6 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is not trustworthy, wherein the reference probability comprises M probability values, wherein M is a positive integer greater than or equal to 2, wherein a target probability value is a maximum value in the M probability values, wherein the recommended ECN configuration information is trustworthy when the target probability value is greater than or equal to a first preset threshold, and wherein the recommended ECN configuration information is not trustworthy when the target probability value is less than the first preset threshold.
8. The device of claim 7 , wherein the reference ECN configuration information is based on the network status information.
9. The device of claim 8 , wherein when executed by the processor, the instructions further cause the device to:
send, to a network analysis device, the network status information and the reference ECN configuration information;
receive, from the network analysis device, model update information; and
update, based on the model update information, the ECN optimization model.
10. The device of claim 6 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration is not trustworthy, wherein the recommended ECN configuration information is trustworthy when a fluctuation coefficient of a maximum N probability values in M probability values is greater than or equal to a second preset threshold, wherein the recommended ECN configuration information is not trustworthy when the fluctuation coefficient is less than the second preset threshold, wherein the reference probability comprises the M probability values, wherein N is a positive integer greater than or equal to 2 and less than M, wherein M is a positive integer greater than N, wherein the fluctuation coefficient of the N probability values is based on a formula, wherein the formula is:
P
N
=
s
t
d
(
P
t
o
p
N
)
mean
(
P
t
o
p
N
)
,
wherein P N indicates the fluctuation coefficient, wherein P topN indicates the N probability values, wherein mean indicates a mean function, and wherein std indicates a standard deviation function.
11. A chip system comprising:
a logic circuit coupled to an input/output interface and configured to:
obtain network status information comprising:
network traffic information indicating traffic of a network device; and
network congestion information indicating a congestion status of the network device;
perform, using destination Explicit Congestion Notification (ECN) configuration information, marking on a packet, wherein the destination ECN configuration information is based on a reference probability corresponding to recommended ECN configuration information, and wherein the reference probability is based on the network status information and an ECN optimization model; and
send the packet.
12. The chip system of claim 11 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is not trustworthy, wherein the reference probability comprises M probability values, wherein M is a positive integer greater than or equal to 2, wherein a target probability value is a maximum value in the M probability values, wherein the recommended ECN configuration information is trustworthy when the target probability value is greater than or equal to a first preset threshold, and wherein the recommended ECN configuration information is not trustworthy when the target probability value is less than the first preset threshold.
13. The chip system of claim 12 , wherein the reference ECN configuration information is based on the network status information.
14. The chip system of claim 13 , wherein the logic circuit is further configured to:
send, to a network analysis device, the network status information and the reference ECN configuration information;
receive, from the network analysis device, model update information; and
update, based on the model update information, the ECN optimization model.
15. The chip system of claim 11 , wherein the recommended ECN configuration information is the destination ECN configuration information when the recommended ECN configuration information is trustworthy, wherein reference ECN configuration information is the destination ECN configuration information when the recommended ECN configuration is not trustworthy, wherein the recommended ECN configuration information is trustworthy when a fluctuation coefficient of a maximum N probability values in M probability values is greater than or equal to a second preset threshold, wherein the recommended ECN configuration information is not trustworthy when the fluctuation coefficient is less than the second preset threshold, wherein the reference probability comprises the M probability values, wherein N is a positive integer greater than or equal to 2 and less than M, wherein M is a positive integer greater than N, wherein the fluctuation coefficient is based on a formula, wherein the formula is:
P
N
=
s
t
d
(
P
t
o
p
N
)
mean
(
P
t
o
p
N
)
,
wherein P N indicates the fluctuation coefficient of the N probability values, wherein P topN indicates the N probability values, wherein mean indicates a mean function, and wherein std indicates a standard deviation function.
16. The method of claim 1 , wherein performing the marking on the packet comprises adding an ECN mark to an Internet Protocol (IP) header of the packet.
17. The method of claim 1 , wherein the packet is configured to instruct the network device to reduce a packet sending rate.
18. The device of claim 6 , wherein performing the marking on the packet comprises adding an ECN mark to an Internet Protocol (IP) header of the packet.
19. The device of claim 6 , wherein the packet is configured to instruct the network device to reduce a packet sending rate.
20. The chip system of claim 11 , wherein performing the marking on the packet comprises adding an ECN mark to an Internet Protocol (IP) header of the packet, and wherein the packet is configured to instruct the network device to reduce a packet sending rate.