Cache adjustment method, related device, storage medium and computer program product
By analyzing and processing packet loss traffic information sent by network equipment, intelligently adjusting the port cache of network equipment along the way, solving the problem that cache cannot cope with sudden traffic in the existing technology, and achieving more efficient network quality assurance.
Patent Information
- Application Number
- CN202411823974.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-11
AI Technical Summary
Existing switch caches cannot effectively deal with emergencies in service traffic, resulting in cache packet loss and affecting network quality.
The control device receives messages sent by the network device, analyzes packet loss traffic information, determines the forwarding path, and adjusts the port cache information of the network devices along the way based on this information to achieve intelligent cache adjustment.
Quickly adapt to emergencies in business traffic, reduce packet loss, improve network quality, and realize automated cache adjustment.
Smart Images

Figure CN119814707A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a cache adjustment method, related equipment, storage medium and computer program product. Background Art
[0002] The switch cache generally exists inside the switch. After the message enters the switch from the switch entrance, it is stored in the switch cache and queued at the switch egress port. If the number of cached messages queued at the egress port reaches a certain number, the newly added message to the egress port queue will be directly discarded. Under normal circumstances, the switch needs to refer to the total switch cache and the number of ports when allocating cache to the egress port queue. When the switch is initialized, the cache amount is allocated to the egress port queue. After the initialization is completed, this cache amount will not change.
[0003] However, if a large number of messages are generated by the service passing through this port, it will cause cache packet loss, which will affect the service and reduce the quality of the network. Therefore, it is urgent to propose a cache method to deal with the sudden situation of service traffic. Summary of the invention
[0004] The embodiments of the present application provide a cache adjustment method, related equipment, storage medium and computer program product, which can realize intelligent cache adjustment, thereby quickly adapting to traffic bursts of the business and improving network quality.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a cache adjustment method, which is applied to a control device, and the method includes:
[0007] Receiving one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device;
[0008] Determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices;
[0009] Based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the port cache information based on the first adjustment data.
[0010] Adjust the current port cache information.
[0011] In a second aspect, an embodiment of the present application provides a cache adjustment method, which is applied to a first network device, and the method includes:
[0012] In the case where it is determined that there is a message loss, encapsulating the first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes the packet loss flow information of the first network device port;
[0013] The one or more first messages are sent to a control device so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on a forwarding path of the one or more first messages.
[0014] In a third aspect, an embodiment of the present application provides a control device, the control device comprising: a receiving unit, a determining unit, an analyzing unit, and a first sending unit; wherein,
[0015] The receiving unit is configured to receive one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device;
[0016] The determining unit is used to determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices;
[0017] The analyzing unit is configured to analyze and process the port cache information of the one or more second network devices based on the first information to obtain first adjustment data;
[0018] The first sending unit is used to send the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0019] In a fourth aspect, an embodiment of the present application provides a control device, the control device comprising: a first processor and a first memory; wherein,
[0020] The first memory is used to store a computer program that can be run on the processor;
[0021] The first processor is used to execute the cache adjustment method described above when running the computer program.
[0022] In a fifth aspect, an embodiment of the present application provides a first network device, the first network device comprising: an encapsulation unit and a second sending unit; wherein:
[0023] The encapsulation unit is used to encapsulate the first information corresponding to one or more third messages to obtain one or more first messages when it is determined that there is message loss; wherein the first information includes packet loss flow information of the first network device port;
[0024] The second sending unit is used to send the one or more first messages to the control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on the forwarding path of the one or more first messages.
[0025] In a sixth aspect, an embodiment of the present application provides a first network device, the first network device comprising: a second processor and a second memory; wherein:
[0026] The second memory is used to store a computer program that can be run on the processor;
[0027] The second processor is used to execute the cache adjustment method described above when running the computer program.
[0028] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program code is stored. When the computer program code is executed by a computer, the cache adjustment method as described above is implemented.
[0029] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the cache adjustment method as described above.
[0030] The embodiment of the present application provides a cache adjustment method, related equipment, storage medium and computer program product, wherein a control device receives one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; determines a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data; when the first network device determines that there is a message loss, the first information corresponding to the one or more third messages is encapsulated and processed to obtain one or more first messages; and the one or more first messages are sent to the control device. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 1 ;
[0032] Figure 2 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 2 ;
[0033] Figure 3 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 3 ;
[0034] Figure 4 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 4 ;
[0035] Figure 5 Schematic diagram of the structure of the control device proposed in the embodiment of the present application Figure 1 ;
[0036] Figure 6 Schematic diagram of the structure of the control device proposed in the embodiment of the present application Figure 2 ;
[0037] Figure 7 Schematic diagram of the composition structure of the first network device proposed in the embodiment of the present application Figure 1 ;
[0038] Figure 8 Schematic diagram of the composition structure of the first network device proposed in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0039] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for ease of description, only the parts related to the related applications are shown in the accompanying drawings.
[0040] The switch cache is usually inside the switch. After the message enters the switch, it is stored in the switch cache and queued at the switch egress port. If the number of cached messages queued at the egress port reaches a certain number, the new message added to the egress port queue will be directly discarded. Under normal circumstances, the switch needs to refer to the total switch cache and the number of ports when allocating cache for the egress port queue. When the switch is initialized, the cache amount allocated to the egress port queue will not change after the initialization is completed.
[0041] However, if a large number of messages are generated by the service passing through this port, it will cause cache packet loss, affecting the service and thus reducing the quality of the network. However, when the number of caches set for the egress port during initialization is large, the total number of remaining caches on the switch will be limited, affecting other service processing and increasing the cost of the switch. Moreover, under normal forwarding of messages, there is no need to configure a large amount of cache in the egress port. The need for a large amount of cache in the egress port generally only exists in a short period of time when the service message bursts. And from the perspective of the entire network, which switch the specific traffic burst occurs on and which switch performs cache adjustment are also very important choices. Therefore, the comprehensiveness and intelligence of switch cache adjustment, as well as the automation of cache adjustment, are the current shortcomings of related technologies.
[0042] In order to solve the problem that the current caching method cannot adapt to the traffic burst of the business, resulting in the deterioration of network quality, the embodiment of the present application provides a cache adjustment method, related equipment, storage medium and computer program product, wherein a control device receives one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss traffic information of the port of the first network device; determines a forwarding path of one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, the port cache information of one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data; when the first network device determines that there is a message loss, the first information corresponding to one or more third messages is encapsulated and processed to obtain one or more first messages; and the one or more first messages are sent to the control device. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality.
[0043] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0044] The embodiment of the present application provides a cache adjustment method, which is applied to a control device. Figure 1 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 1 ,like Figure 1 As shown, the cache adjustment method may include the following steps:
[0045] Step 101: Receive one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device.
[0046] In an embodiment of the present application, the control device may receive one or more first messages sent by the first network device.
[0047] It should be noted that in the embodiments of the present application, the control device may be a software defined network (SDN) controller, a network management station, a computing network brain, and other full network control devices. The present application does not specifically limit the type of control device.
[0048] It should be noted that, in the embodiments of the present application, the first information may include packet loss flow information of the first network device port, and may also include other information. The present application does not specifically limit the amount and type of information included in the first information.
[0049] It should be noted that, in the embodiments of the present application, the first network device may be an ingress network device, and the network device may be a switch device. The present application does not specifically limit the type of the first network device.
[0050] It should be noted that, in the embodiments of the present application, the first network device port may include an egress port of the first network device, and the present application does not specifically limit the type of the first network device port.
[0051] It should be noted that in an embodiment of the present application, the packet loss traffic information may include packet loss traffic data, for example, the packet loss traffic data of the outbound port of the first network device is 1000 packets per second. The present application does not specifically limit the data type and data quantity included in the packet loss traffic information.
[0052] Step 102: Determine a forwarding path for one or more first messages; wherein the forwarding path includes one or more second network devices.
[0053] In an embodiment of the present application, after receiving one or more first messages sent by the first network device, the control device may determine a forwarding path of the one or more first messages.
[0054] It should be noted that, in an embodiment of the present application, when determining the forwarding path of one or more first messages, the control device can receive network path information sent by the first network device; wherein the network path information includes the forwarding path of one or more second messages, and the second message includes the first message; then, the forwarding path of one or more first messages can be queried and processed based on the network path information, so as to obtain the forwarding path of one or more first messages.
[0055] It should be noted that in an embodiment of the present application, the network path information may include forwarding paths of one or more second messages, that is, the control device can obtain the forwarding paths of multiple messages from the first network device, so that the forwarding paths of one or more first messages can be queried and processed to determine the forwarding paths of one or more first messages. The present application does not specifically limit the type of information included in the network path information.
[0056] It should be noted that, in the embodiment of the present application, after determining the forwarding path of one or more first messages, the control device can obtain all relevant network devices of the first message on the corresponding forwarding path, that is, one or more second network devices.
[0057] It should be noted that, in the embodiments of the present application, the second network device may be a switch device, and the present application does not specifically limit the number and type of the second network device.
[0058] Exemplarily, in an embodiment of the present application, the control device can obtain all relevant network devices on the corresponding forwarding path of the first message, namely, one or more second network devices. Assuming that the first message can flow through access switch A, core switch B, and access switch C, it can be determined that all relevant network devices on the forwarding path of the first message include core switch B, access switch C, etc.
[0059] Step 103: Analyze and process the port cache information of one or more second network devices based on the first information to obtain first adjustment data, and send the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0060] In an embodiment of the present application, after determining the forwarding path of one or more first messages, the control device can analyze and process the port cache information of one or more second network devices based on the first information to obtain first adjustment data, and send the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0061] It should be noted that, in the embodiment of the present application, the port cache information of the second network device may include the current egress port cache of the second network device. The present application does not specifically limit the type and quantity of information included in the port cache information of the second network device.
[0062] It should be noted that, in the embodiments of the present application, the first adjustment data may be used to adjust the current egress port cache of the second network device, and the present application does not specifically limit the type of the first adjustment data.
[0063] It should be noted that, in an embodiment of the present application, when the control device analyzes and processes the port cache information of one or more second network devices based on the first information to obtain the first adjustment data, it can first determine whether the port cache information of one or more second network devices satisfies the packet loss traffic information; when the port cache information of the third network device does not satisfy the packet loss traffic information, the first adjustment data for adjusting the port cache information of the third network device can be generated; wherein the third network device includes some network devices in the second network device.
[0064] Exemplarily, in an embodiment of the present application, the control device may first determine whether the port cache information of one or the second network device satisfies the packet loss traffic information. Assuming that the current egress port cache of some network devices in the second network device (i.e., the third network device) is insufficient, and the packet loss traffic data reaches a threshold that needs to be adjusted for the egress port cache of the third network device, i.e., the port cache information of the third network device does not satisfy the packet loss traffic information, first adjustment data may be generated to adjust the port cache information of the third network device.
[0065] It should be noted that, in the embodiment of the present application, when the port cache information of one or the second network device satisfies the packet loss flow information, the first adjustment data is not generated.
[0066] Exemplarily, in an embodiment of the present application, assuming that the current egress port cache of the second network device is sufficient and the packet loss traffic data has not reached the threshold at which the egress port cache of the second network device needs to be adjusted, it can be determined that the port cache information of one or the second network device satisfies the packet loss traffic information, then the current egress port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data.
[0067] That is to say, in an embodiment of the present application, the control device can first determine whether the port cache information of one or the second network device satisfies the packet loss traffic information. If the current egress port cache of some network devices in the second network device (i.e., the third network device) is insufficient, and the packet loss traffic data reaches the threshold value that needs to be adjusted for the egress port cache of the third network device, then first adjustment data for adjusting the port cache information of the third network device can be generated; if the current egress port cache of the second network device is sufficient, and the packet loss traffic data does not reach the threshold value that needs to be adjusted for the egress port cache of the second network device, then the current egress port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data, that is, the control device in the embodiment of the present application can analyze the port cache information of the network devices on the first message forwarding path, and then can generate corresponding adjustment data in a targeted manner based on the analysis results.
[0068] Furthermore, in an embodiment of the present application, after the control device analyzes and processes the port cache information of one or more second network devices based on the first information to obtain the first adjustment data, the first adjustment data can be sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data, thereby realizing intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal caching effect.
[0069] To summarize, the control device can receive network path information sent by the first network device, and the network path information includes the forwarding path of one or more second messages. Then, the forwarding path of the received one or more first messages can be queried and processed based on the network path information, so as to obtain the forwarding path of one or more first messages, and then all relevant network devices of the first message on the corresponding forwarding path, that is, one or more second network devices, can be obtained. Then, it can be determined whether the port cache information of one or the second network device meets the packet loss flow information. If the current outbound port cache of some network devices in the second network device (that is, the third network device) is insufficient, and the packet loss flow data reaches the threshold value that needs to be adjusted for the outbound port cache of the third network device, first adjustment data for adjusting the port cache information of the third network device can be generated; if the second network device If the current egress port cache is sufficient and the packet loss traffic data does not reach the threshold value that needs to be adjusted for the egress port cache of the second network device, then the current egress port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data. That is, the control device in the embodiment of the present application can analyze the port cache information of the network device on the first message forwarding path, and then can generate corresponding adjustment data in a targeted manner based on the analysis results, and finally can send the adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the adjustment data, thereby realizing intelligent adjustment of the cache information of each network device on the path where the burst business traffic occurs, and finally making the business traffic as little affected by packet loss as possible, and the whole process can be completed automatically without human participation.
[0070] An embodiment of the present application provides a cache adjustment method, which is applied to a control device, wherein the control device receives one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; determines a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality.
[0071] Based on the above embodiment, another embodiment of the present application provides a cache adjustment method, which is applied to a first network device. Figure 2 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 2 ,like Figure 2 As shown, the cache adjustment method may include the following steps:
[0072] Step 201: When it is determined that there is message loss, encapsulate the first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes packet loss flow information of the first network device port.
[0073] In an embodiment of the present application, when determining that there is message loss, the first network device may encapsulate the first information corresponding to one or more third messages to obtain one or more first messages.
[0074] It should be noted that, in the embodiments of the present application, the first network device may be an ingress network device, and the network device may be a switch device. The present application does not specifically limit the type of the first network device.
[0075] It should be noted that, in an embodiment of the present application, the first information may include packet loss flow information of the first network device port, and may also include other information. The present application does not specifically limit the amount and type of information included in the first information.
[0076] It should be noted that in an embodiment of the present application, the packet loss traffic information may include the packet loss traffic data of the first network device port, for example, the packet loss traffic data of the output port of the first network device is 1000 packets / second. The present application does not specifically limit the data type and data quantity included in the packet loss traffic information.
[0077] It should be noted that, in the embodiments of the present application, the third message may include lost messages, and the present application does not specifically limit the number and type of the third message.
[0078] It should be noted that, in the embodiments of the present application, the type of the first message may be a Simple Network Management Protocol (SNMP) message or other types of messages, and the present application does not specifically limit the type of the first message.
[0079] It should be noted that, in an embodiment of the present application, assuming that the first network device has insufficient pre-allocated egress cache at the egress port, resulting in packet loss, for example, the packet loss rate reaches 1000 packets per second, the first network device can determine the current first port cache information based on a preset correspondence and packet loss traffic information; wherein the preset correspondence is used to characterize the correspondence between the packet loss traffic information and the port cache information of the first network device; or, determine the first port cache information based on a preset adjustment range and packet loss traffic information.
[0080] It should be noted that, in the embodiment of the present application, the first port cache information may include the cache quantity of the first network device egress port, and the present application does not specifically limit the information quantity and information type included in the first port cache information.
[0081] It should be noted that in an embodiment of the present application, the preset correspondence is used to characterize the correspondence between packet loss traffic information and the port cache information of the first network device. For example, it may be the correspondence between multiple packet loss traffic data and the number of outbound port caches of the first network device. The present application does not specifically limit the type of the preset correspondence.
[0082] It should be noted that in an embodiment of the present application, when the first network device determines the current first port cache information based on a preset correspondence and packet loss traffic information, it can first query the second port cache information corresponding to the packet loss traffic information based on the preset correspondence, and then adjust the current port cache information based on the second port cache information to obtain the first port cache information.
[0083] Exemplarily, in an embodiment of the present application, assuming that the first network device queries the second port cache information corresponding to the packet loss traffic information based on a preset correspondence relationship and the second port cache information is 1M, the current outbound port cache can be adjusted based on the second port cache information, for example, by increasing 1M, so that the first port cache information can be obtained.
[0084] It should be noted that, in the embodiment of the present application, the first network device may also determine the first port cache information based on a preset adjustment range and packet loss flow information.
[0085] It should be noted that in an embodiment of the present application, when the first network device determines the first port cache information based on the preset adjustment range and packet loss flow information, it can adjust the current port cache information to the corresponding first port cache information based on the preset adjustment range and packet loss flow information; wherein the first port cache information at least includes the adjusted port cache data.
[0086] Exemplarily, in an embodiment of the present application, the first network device can determine an adjustment value corresponding to the current port cache of the first network device based on a preset adjustment range and packet loss traffic information, and then can adjust the current port cache information to the corresponding first port cache information based on the adjustment value.
[0087] That is to say, in an embodiment of the present application, when the first network device determines that there is packet loss, it can determine the current cache quantity of the first network device's egress port based on a preset correspondence and packet loss traffic information; wherein the preset correspondence is used to characterize the correspondence between the packet loss traffic information and the port cache information of the first network device; or, determine the cache quantity of the first network device's egress port based on a preset adjustment range and packet loss traffic information, that is, the first network device can make corresponding adjustments to its own egress port cache.
[0088] Step 202: Send one or more first messages to a control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on a forwarding path of one or more first messages.
[0089] In an embodiment of the present application, when the first network device determines that there is a message loss, it encapsulates the first information corresponding to one or more third messages, and after obtaining one or more first messages, it can send the one or more first messages to the control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on the forwarding path of one or more first messages.
[0090] It should be noted that in an embodiment of the present application, when the first network device determines that there is packet loss, it can make corresponding adjustments to its own outbound port cache, and can also send one or more first messages to the control device, so that the control device can adjust the port cache information of one or more second network devices based on the first information, that is, the cache information of each network device on the first message forwarding path can be intelligently adjusted, so that when a traffic burst of business traffic arrives at the first network device, other network devices in the related network that need to be adjusted accordingly can all intelligently and automatically complete the corresponding cache automatic adjustment, ultimately making the business traffic as little affected by packet loss as possible, and the entire process can be completed automatically without human participation.
[0091] To sum up, when it is determined that there is message loss, the first network device can determine the current cache quantity of the first network device's egress port based on the preset corresponding relationship and the packet loss traffic information; wherein the preset corresponding relationship is used to characterize the corresponding relationship between the packet loss traffic information and the port cache information of the first network device; or, based on the preset adjustment range and the packet loss traffic information, determine the cache quantity of the first network device's egress port, that is, the first network device can make corresponding adjustments to its own egress port cache, and can also encapsulate the first information corresponding to one or more third messages to obtain one or more first messages, and send the one or more first messages to the control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information, that is, the cache information of each network device on the first message forwarding path can be intelligently adjusted, so that when a traffic burst service flow reaches the first network device, other network devices in the related network that need to be adjusted accordingly can all intelligently and automatically complete the corresponding cache automatic adjustment, and ultimately make the service flow as little affected by packet loss as possible, thereby improving the network quality.
[0092] The embodiment of the present application provides a cache adjustment method, which is applied to a first network device. When the first network device determines that there is a message loss, the first information corresponding to one or more third messages is encapsulated and processed to obtain one or more first messages; wherein the first information includes the packet loss flow information of the port of the first network device; the one or more first messages are sent to the control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes one or more network devices on the forwarding path of the first message. It can be seen that when the first network device determines that there is a message loss, the first information corresponding to one or more third messages can be encapsulated and processed, and the encapsulated one or more first messages are sent to the control device, so that the control device adjusts the port cache information of one or more second network devices on the forwarding path of the first message based on the first information, so as to realize intelligent adjustment of cache information, thereby achieving the best cache effect.
[0093] Based on the above embodiment, another embodiment of the present application provides a cache adjustment method, which is applied to a control device and a first network device. Figure 3 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 3 ,like Figure 3 As shown, the cache adjustment method may include the following steps:
[0094] Step 301: When determining that there is message loss, the first network device encapsulates first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes packet loss flow information of the first network device port.
[0095] It should be noted that, in the embodiments of the present application, the first network device may be an ingress network device, and the network device may be a switch device. The present application does not specifically limit the type of the first network device.
[0096] It should be noted that, in an embodiment of the present application, the first information may include packet loss flow information of the first network device port, and may also include other information. The present application does not specifically limit the amount and type of information included in the first information.
[0097] It should be noted that in an embodiment of the present application, the packet loss traffic information may include the packet loss traffic data of the first network device port, for example, the packet loss traffic data of the output port of the first network device is 1000 packets / second. The present application does not specifically limit the data type and data quantity included in the packet loss traffic information.
[0098] It should be noted that, in the embodiments of the present application, the third message may include lost messages, and the present application does not specifically limit the number and type of the third message.
[0099] It should be noted that, in the embodiments of the present application, the type of the first message may be an SNMP message or other types of messages, and the present application does not specifically limit the type of the first message.
[0100] It should be noted that, in an embodiment of the present application, assuming that the first network device has insufficient pre-allocated egress cache at the egress port, resulting in packet loss, for example, the packet loss rate reaches 1000 packets per second, the first network device can determine the current first port cache information based on a preset correspondence and packet loss traffic information; wherein the preset correspondence is used to characterize the correspondence between the packet loss traffic information and the port cache information of the first network device; or, determine the first port cache information based on a preset adjustment range and packet loss traffic information.
[0101] It should be noted that, in the embodiment of the present application, the first port cache information may include the cache quantity of the first network device egress port, and the present application does not specifically limit the information quantity and information type included in the first port cache information.
[0102] It should be noted that in an embodiment of the present application, the preset correspondence is used to characterize the correspondence between packet loss traffic information and the port cache information of the first network device. For example, it may be the correspondence between multiple packet loss traffic data and the number of outbound port caches of the first network device. The present application does not specifically limit the type of the preset correspondence.
[0103] It should be noted that in an embodiment of the present application, when the first network device determines the current first port cache information based on a preset correspondence and packet loss traffic information, it can first query the second port cache information corresponding to the packet loss traffic information based on the preset correspondence, and then adjust the current port cache information based on the second port cache information to obtain the first port cache information.
[0104] Exemplarily, in an embodiment of the present application, assuming that the first network device queries the second port cache information corresponding to the packet loss traffic information based on a preset correspondence relationship and the second port cache information is 1M, the current outbound port cache can be adjusted based on the second port cache information, for example, by increasing 1M, so that the first port cache information can be obtained.
[0105] It should be noted that, in the embodiment of the present application, the first network device may also determine the first port cache information based on a preset adjustment range and packet loss flow information.
[0106] It should be noted that in an embodiment of the present application, when the first network device determines the first port cache information based on the preset adjustment range and packet loss flow information, it can adjust the current port cache information to the corresponding first port cache information based on the preset adjustment range and packet loss flow information; wherein the first port cache information at least includes the adjusted port cache data.
[0107] Exemplarily, in an embodiment of the present application, the first network device can determine an adjustment value corresponding to the current port cache of the first network device based on a preset adjustment range and packet loss traffic information, and then can adjust the current port cache information to the corresponding first port cache information based on the adjustment value.
[0108] That is to say, in an embodiment of the present application, when the first network device determines that there is packet loss, it can determine the current cache quantity of the first network device's egress port based on a preset correspondence and packet loss traffic information; wherein the preset correspondence is used to characterize the correspondence between the packet loss traffic information and the port cache information of the first network device; or, determine the cache quantity of the first network device's egress port based on a preset adjustment range and packet loss traffic information, that is, the first network device can make corresponding adjustments to its own egress port cache.
[0109] Step 302: The first network device sends one or more first messages to the control device.
[0110] It should be noted that in an embodiment of the present application, when the first network device determines that there is packet loss, it can make corresponding adjustments to its own outbound port cache, and can also send one or more first messages to the control device, so that the control device can adjust the port cache information of one or more second network devices based on the first information, that is, the cache information of each network device on the first message forwarding path can be intelligently adjusted, so that when a traffic burst of business traffic arrives at the first network device, other network devices in the related network that need to be adjusted accordingly can all intelligently and automatically complete the corresponding cache automatic adjustment, ultimately making the business traffic as little affected by packet loss as possible, and the entire process can be completed automatically without human participation.
[0111] Step 303: The control device determines a forwarding path for one or more first messages; wherein the forwarding path includes one or more second network devices.
[0112] It should be noted that, in an embodiment of the present application, when determining the forwarding path of one or more first messages, the control device can receive network path information sent by the first network device; wherein the network path information includes the forwarding path of one or more second messages, and the second message includes the first message; then, the forwarding path of one or more first messages can be queried and processed based on the network path information, so as to obtain the forwarding path of one or more first messages.
[0113] It should be noted that in an embodiment of the present application, the network path information may include forwarding paths of one or more second messages, that is, the control device can obtain the forwarding paths of multiple messages from the first network device, so that the forwarding paths of one or more first messages can be queried and processed to determine the forwarding paths of one or more first messages. The present application does not specifically limit the type of information included in the network path information.
[0114] It should be noted that, in the embodiment of the present application, after determining the forwarding path of one or more first messages, the control device can obtain all relevant network devices of the first message on the corresponding forwarding path, that is, one or more second network devices.
[0115] It should be noted that, in the embodiments of the present application, the second network device may be a switch device, and the present application does not specifically limit the number and type of the second network device.
[0116] Exemplarily, in an embodiment of the present application, the control device can obtain all relevant network devices on the corresponding forwarding path of the first message, namely, one or more second network devices. Assuming that the first message can flow through access switch A, core switch B, and access switch C, it can be determined that all relevant network devices on the forwarding path of the first message include core switch B, access switch C, etc.
[0117] Step 304: The control device analyzes and processes the port cache information of one or more second network devices based on the first information to obtain first adjustment data, and sends the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0118] It should be noted that, in the embodiment of the present application, the port cache information of the second network device may include the current egress port cache of the second network device. The present application does not specifically limit the type and quantity of information included in the port cache information of the second network device.
[0119] It should be noted that, in the embodiments of the present application, the first adjustment data may be used to adjust the current egress port cache of the second network device, and the present application does not specifically limit the type of the first adjustment data.
[0120] It should be noted that, in an embodiment of the present application, when the control device analyzes and processes the port cache information of one or more second network devices based on the first information to obtain the first adjustment data, it can first determine whether the port cache information of one or more second network devices satisfies the packet loss traffic information; when the port cache information of the third network device does not satisfy the packet loss traffic information, the first adjustment data for adjusting the port cache information of the third network device can be generated; wherein the third network device includes some network devices in the second network device.
[0121] Exemplarily, in an embodiment of the present application, the control device may first determine whether the port cache information of one or the second network device satisfies the packet loss traffic information. Assuming that the current egress port cache of some network devices in the second network device (i.e., the third network device) is insufficient, and the packet loss traffic data reaches a threshold that needs to be adjusted for the egress port cache of the third network device, i.e., the port cache information of the third network device does not satisfy the packet loss traffic information, first adjustment data may be generated to adjust the port cache information of the third network device.
[0122] It should be noted that, in the embodiment of the present application, when the port cache information of one or the second network device satisfies the packet loss flow information, the first adjustment data is not generated.
[0123] Exemplarily, in an embodiment of the present application, assuming that the current egress port cache of the second network device is sufficient and the packet loss traffic data has not reached the threshold at which the egress port cache of the second network device needs to be adjusted, it can be determined that the port cache information of one or the second network device satisfies the packet loss traffic information, then the current egress port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data.
[0124] That is to say, in an embodiment of the present application, the control device can first determine whether the port cache information of one or the second network device satisfies the packet loss traffic information. If the current egress port cache of some network devices in the second network device (i.e., the third network device) is insufficient, and the packet loss traffic data reaches the threshold value that needs to be adjusted for the egress port cache of the third network device, then first adjustment data for adjusting the port cache information of the third network device can be generated; if the current egress port cache of the second network device is sufficient, and the packet loss traffic data does not reach the threshold value that needs to be adjusted for the egress port cache of the second network device, then the current egress port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data, that is, the control device in the embodiment of the present application can analyze the port cache information of the network devices on the first message forwarding path, and then can generate corresponding adjustment data in a targeted manner based on the analysis results.
[0125] Furthermore, in an embodiment of the present application, after the control device analyzes and processes the port cache information of one or more second network devices based on the first information to obtain the first adjustment data, the first adjustment data can be sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data, thereby realizing intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal caching effect.
[0126] In summary, the first network device can determine the current cache quantity of the first network device egress port based on the preset corresponding relationship and the packet loss flow information when it is determined that there is a message loss; wherein the preset corresponding relationship is used to characterize the corresponding relationship between the packet loss flow information and the port cache information of the first network device; or, determine the cache quantity of the first network device egress port based on the preset adjustment range and the packet loss flow information, that is, the first network device can make corresponding adjustments to its own egress port cache, and can also encapsulate and process the first information corresponding to one or more third messages to obtain one or more first messages, and send the one or more first messages to the control device, the control device can receive the network path information sent by the first network device, the network path information includes the forwarding path of one or more second messages, and then query and process the forwarding path of the received one or more first messages based on the network path information, so as to obtain the forwarding path of one or more first messages, and then obtain all the relevant network devices of the first message on the corresponding forwarding path, that is, one or more second network devices, and then first determine whether the port cache information of one or more second network devices is To meet the packet loss traffic information, if the current egress port cache of some network devices in the second network device (i.e., the third network device) is insufficient, and the packet loss traffic data reaches the threshold value that needs to be adjusted for the egress port cache of the third network device, then first adjustment data for adjusting the port cache information of the third network device can be generated; if the current egress port cache of the second network device is sufficient, and the packet loss traffic data does not reach the threshold value that needs to be adjusted for the egress port cache of the second network device, then the current egress port cache of the second network device can be adjusted without generating corresponding adjustment data, that is, the control device in the embodiment of the present application can analyze the port cache information of the network device on the first message forwarding path, and then can generate corresponding adjustment data in a targeted manner based on the analysis results, and finally can send the adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the adjustment data, thereby realizing intelligent adjustment processing of the cache information of each network device on the path where the sudden business traffic occurs, and finally making the business traffic as little affected by the packet loss as possible, and the whole process can be completed automatically without human participation.
[0127] An embodiment of the present application provides a cache adjustment method, which is applied to a control device and a first network device, the control device receives one or more first messages sent by the first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; determines a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data; when the first network device determines that there is a message loss, the first information corresponding to the one or more third messages is encapsulated and processed to obtain one or more first messages; and the one or more first messages are sent to the control device. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality.
[0128] Based on the above embodiments, another embodiment of the present application provides a cache adjustment method, which can not only adjust the switch (i.e., the first network device) where the burst service traffic occurs, but also intelligently adjust the cache of the switch device (i.e., the second network device) on its related service path. In order to achieve the effect of dynamic adaptation of the switch cache to the service on the relevant devices of the whole network, the quality of the network can be improved, the maintainability of the network can be improved, and the degree of automation and intelligence of the network can be improved. The main idea of the method is to increase the processing of the discarded traffic capture and analysis of the path of the burst traffic on the switch, and report it to the whole network control device (i.e., control device) such as the SDN controller, the network management station, and the computing power network brain, and obtain the flow path (i.e., forwarding path) of the service on the whole network control device, and according to the burst traffic packet loss situation, immediately perform relevant cache adjustment processing to achieve automatic cache adjustment to adapt to the burst traffic of this service. The cache adjustment method proposed in the embodiment of the present application is described in detail below.
[0129] It should be noted that, in the embodiment of the present application, first, when the traffic burst reaches a switch in the network, the cache of this switch (i.e., the first network device) must not be able to meet the demand of the traffic flow, resulting in burst packet loss. At this time, the device captures the message of the traffic burst packet loss, and at the same time counts the specific burst value of the current traffic burst, and sends the captured traffic message to the central processing unit (CPU) of the switch device. The switch (i.e., the first network device) that currently receives the traffic burst of the business first adjusts the cache of the current device switch according to the outbound port queue situation of the traffic burst that generates packet loss, and the number of packet losses (i.e., packet loss traffic information) for the traffic burst counted by the device. The adjustment method can be adjusted according to the preset value corresponding to the number of packet losses, and the port cache is appropriately enlarged. However, at this time, since the traffic will also flow through the switch in the next network, if the cache of the first switch (i.e., the first network device) is adjusted only according to the situation of the traffic burst, it is not enough to make the entire business pass through the network normally. Therefore, the first switch will assemble the data just obtained, including the traffic message and the specific value of the traffic burst packet loss, into a message (i.e., the first or multiple first messages) and send it to the SDN controller, network management station, computing network brain and other network control devices (i.e., control devices); among which, the message assembly format can be organized according to the form of the control protocol message of the network control device and the switch.
[0130] It should be noted that in the embodiments of the present application, when the network control device receives the service message (i.e., the first message) that generates the burst and the burst traffic packet loss data (i.e., the first information), it can obtain the network path situation related to the service message on the path table item (i.e., the network path information) of the network control device, and generate corresponding cache adjustment data (i.e., the first adjustment data) on the network control device according to the burst packet loss traffic (i.e., the first information). The network control device (i.e., the control device) makes corresponding cache data adjustments to the relevant ports of all relevant devices on the path, and the adjustment range can be processed accordingly on the network control device according to the model and type of the network device. For example, it can be determined that the port cache of some core switches is sufficient, and no adjustment is required, while the cache of some access switches is insufficient, and corresponding processing is required. The adjustment rules can process the corresponding preset cache values according to the traffic size of the burst packet loss.
[0131] It should be noted that in the embodiment of the present application, after being processed by the above method, when a traffic burst of business traffic reaches the first switch device (i.e., the first network device), other network devices in the related network that need to be adjusted accordingly can all intelligently and automatically complete the corresponding cache automatic adjustment, so that the business traffic can be affected as little as possible by packet loss, and the entire process can be completed automatically without human participation.
[0132] For example, in the embodiments of the present application, Figure 4 The cache adjustment method proposed in the embodiment of the present application is shown in FIG. Figure 4 ,like Figure 4 As shown, when there is a service flow that needs to be transmitted through the network, and this flow has a burst, its service path passes through the access switch A, the core switch B, and the access switch C. There is a network management station (i.e., a control device) to control the entire network, which may specifically include the following steps:
[0133] 1. There is a burst of business traffic passing through the access switch A (i.e., the first network device). At the egress of switch A, the pre-allocated egress buffer is insufficient, resulting in insufficient buffer packet loss, for example, packet loss reaches 1000 packets per second; 2. The cache packet loss data is reported to the CPU (optional. If the chip supports this step, it can be completed directly through the chip, or through a preset access control list (Access Control List)). 1. The CPU of access switch A (i.e., the first network device) analyzes that the local port has a service cache packet loss of 1000 packets per second, and correspondingly increases the port cache by 1M (the corresponding relationship between the port cache adjustment data and the number of packet losses can be pre-set according to the user's needs or the performance of the device, and the adjustment range and threshold are pre-set); 2. The CPU of access switch A encapsulates the packet loss data and the packet loss flow data of 1000 packets per second (i.e., the first information) into an SNMP message (i.e., the first message), and transmits it to the network management station (i.e., the control station) according to the SNMP transmission protocol with the network management station. 5. The network management station analyzes the relevant service flow path information according to the service message data (i.e., the first message) sent by the access switch A, and obtains that the service message will flow through the access switch A, the core switch B, and the access switch C; 6. The network management station (i.e., the control device) sets the corresponding adjustment data (i.e., the first adjustment data) according to the packet loss flow data (i.e., the first information) and the switch type on the corresponding path. The access switch A has completed the adjustment (because it is the data reported by the access switch A, so the access switch A does not need to process it); 1000 / second does not reach the threshold value that the port cache of the core switch B needs to be adjusted, and no processing is required; the corresponding egress cache of the access switch C can be adjusted to increase by 1M; 7. The network management station initiates adjustment for all related devices that need to be adjusted on this service path, and sends the adjustment result that the egress cache of the access switch C increases by 1M. The above completes all adjustments for the burst of this service in the entire network. After such adjustment, this service automatically obtains better port cache adaptation in the entire network, and minimizes the packet loss of this service when passing through the network.
[0134] To sum up, the control device can query and process the forwarding path of one or more received first messages based on the network path information, so as to obtain the forwarding path of one or more first messages, and then obtain all relevant network devices of the first message on the corresponding forwarding path, that is, one or more second network devices, and then first determine whether the port cache information of one or the second network device meets the packet loss flow information. If the current outbound port cache of some network devices in the second network device (that is, the third network device) is insufficient, and the packet loss flow data reaches the threshold value that needs to be adjusted for the outbound port cache of the third network device, then first adjustment data for adjusting the port cache information of the third network device can be generated; if the current outbound port cache of the second network device is sufficient, and the packet loss flow data does not reach the threshold value that needs to be adjusted for the outbound port cache of the second network device If the threshold value of the outbound port cache of the network device needs to be adjusted, the current outbound port cache of the second network device does not need to be adjusted, and there is no need to generate corresponding adjustment data. That is, the control device in the embodiment of the present application can analyze the port cache information of the network device on the first message forwarding path, and then can generate corresponding adjustment data in a targeted manner based on the analysis result, and finally can send the adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the adjustment data, so as to realize intelligent adjustment processing of the cache information of each network device on the path where the burst business traffic occurs, and finally make the business traffic as little affected by packet loss as possible, and the whole process can be completed automatically without human participation.
[0135] An embodiment of the present application provides a cache adjustment method, which is applied to a control device and a first network device, the control device receives one or more first messages sent by the first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; determines a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data; when the first network device determines that there is a message loss, the first information corresponding to the one or more third messages is encapsulated and processed to obtain one or more first messages; and the one or more first messages are sent to the control device. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality.
[0136] Based on the above embodiments, the present application provides a control device. Figure 5 Schematic diagram of the control device structure Figure 1 ,like Figure 5 As shown, the control device 10 includes: a receiving unit 11, a determining unit 12, an analyzing unit 13 and a first sending unit 14; wherein,
[0137] The receiving unit 11 is used to receive one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of the first network device port;
[0138] The determining unit 12 is used to determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices;
[0139] The analyzing unit 13 is used to analyze and process the port cache information of the one or more second network devices based on the first information to obtain first adjustment data;
[0140] The first sending unit 14 is configured to send the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0141] In the embodiments of the present application, further, Figure 6 Schematic diagram of the control device structure Figure 2 ,like Figure 6 As shown, the control device 10 proposed in the embodiment of the present application may also include a first processor 15, a first memory 16 storing executable instructions of the first processor 15, and further, the control device 10 may also include a first communication interface 17, and a first bus 18 for connecting the first processor 15, the first memory 16 and the first communication interface 17.
[0142] In the embodiment of the present application, the first processor 15 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiment of the present application is not specifically limited. The control device 10 can also include a first memory 16, which can be connected to the first processor 15, wherein the first memory 16 is used to store executable program code, the program code includes computer operation instructions, and the first memory 16 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.
[0143] In the embodiment of the present application, the first bus 18 is used to connect the first communication interface 17, the first processor 15 and the first memory 16, and the mutual communication between these devices.
[0144] In the embodiment of the present application, the first memory 16 is used to store instructions and data.
[0145] Further, in an embodiment of the present application, the above-mentioned first processor 15 is used to receive one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss traffic information of the port of the first network device; determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
[0146] In practical applications, the first memory 16 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the first processor 15.
[0147] An embodiment of the present application provides a control device, which receives one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; determines a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; based on the first information, analyzes and processes port cache information of the one or more second network devices to obtain first adjustment data, and sends the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust and process the current port cache information based on the first adjustment data. It can be seen that after receiving one or more first messages sent by the first network device, the control device can determine the forwarding path of one or more first messages, and then analyze and process the port cache information of one or more second network devices on the forwarding path based on the first information in the first message to obtain first adjustment data, and then send the first adjustment data to one or more second network devices, so that one or more second network devices adjust the current port cache information based on the first adjustment data, that is, the control device in the embodiment of the present application can send the adjustment data to the network device on the message forwarding path, so that the corresponding network device adjusts the current port cache information based on the adjustment data; that is, the embodiment of the present application can realize intelligent adjustment and processing of the cache information of each network device on the path where the burst business traffic occurs, so as to achieve the optimal cache effect, thereby improving the network quality.
[0148] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the cache adjustment method as described above is implemented.
[0149] Specifically, a program instruction corresponding to a cache adjustment method in this embodiment may be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instruction corresponding to a cache adjustment method in the storage medium is read or executed by an electronic device, the following steps are included:
[0150] Receiving one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device;
[0151] Determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices;
[0152] Based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the port cache information based on the first adjustment data.
[0153] Adjust the current port cache information.
[0154] The embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the first processor 15 of the control device 10 to complete the steps of any of the aforementioned methods.
[0155] In the embodiments of the present application, further, Figure 7 The structure diagram of the first network device is shown in FIG. Figure 1 ,like Figure 7 As shown, the first network device 20 includes: an encapsulation unit 21, a second sending unit 22; wherein,
[0156] The encapsulation unit 21 is used to encapsulate the first information corresponding to one or more third messages to obtain one or more first messages when it is determined that there is message loss; wherein the first information includes packet loss flow information of the first network device port;
[0157] The second sending unit 22 is used to send the one or more first messages to the control device so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on the forwarding path of the one or more first messages.
[0158] In the embodiments of the present application, further, Figure 8 The structure diagram of the first network device is shown in FIG. Figure 2 ,like Figure 8 As shown, the first network device 20 proposed in the embodiment of the present application may also include a second processor 23 and a second memory 24 storing executable instructions of the second processor 23. Further, the first network device 20 may also include a second communication interface 25 and a second bus 26 for connecting the second processor 23, the second memory 24 and the second communication interface 25.
[0159] In an embodiment of the present application, the second processor 23 may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that for different devices, the electronic device used to implement the above-mentioned processor function may also be other, and the embodiment of the present application is not specifically limited. The first network device 20 may also include a second memory 24, which may be connected to the second processor 23, wherein the second memory 24 is used to store executable program code, the program code includes computer operation instructions, and the second memory 24 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.
[0160] In the embodiment of the present application, the second bus 26 is used to connect the second communication interface 25, the second processor 23 and the second memory 24, and the mutual communication between these devices.
[0161] In the embodiment of the present application, the second memory 24 is used to store instructions and data.
[0162] Furthermore, in an embodiment of the present application, the above-mentioned second processor 23 is used to encapsulate and process the first information corresponding to one or more third messages to obtain one or more first messages when it is determined that there is message loss; wherein the first information includes packet loss traffic information of the port of the first network device; and send the one or more first messages to the control device, so that the control device adjusts and processes the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on the forwarding path of the one or more first messages.
[0163] In practical applications, the second memory 24 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the second processor 23.
[0164] The embodiment of the present application provides a first network device, which, when determining that there is a message loss, encapsulates and processes the first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes the packet loss flow information of the port of the first network device; sends the one or more first messages to the control device, so that the control device adjusts and processes the port cache information of one or more second network devices based on the first information; wherein the second network device includes one or more network devices on the forwarding path of the first message. It can be seen that, when determining that there is a message loss, the first network device can encapsulate and process the first information corresponding to one or more third messages, and send the encapsulated one or more first messages to the control device, so that the control device adjusts and processes the port cache information of one or more second network devices on the forwarding path of the first message based on the first information, so as to realize the intelligent adjustment of the cache information, thereby achieving the best cache effect.
[0165] An embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the cache adjustment method as described above is implemented.
[0166] Specifically, a program instruction corresponding to a cache adjustment method in this embodiment may be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the program instruction corresponding to a cache adjustment method in the storage medium is read or executed by an electronic device, the following steps are included:
[0167] In the case where it is determined that there is a message loss, encapsulating the first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes the packet loss flow information of the first network device port;
[0168] The one or more first messages are sent to a control device so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on a forwarding path of the one or more first messages.
[0169] The embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the second processor 23 of the first network device 20 to complete the steps of any of the aforementioned methods.
[0170] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0171] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0172] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing the steps in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0174] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A cache adjustment method, characterized in that: The method is applied to a control device, and the method comprises: Receiving one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; Determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; Based on the first information, the port cache information of the one or more second network devices is analyzed and processed to obtain first adjustment data, and the first adjustment data is sent to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
2. The method according to claim 1, characterized in that The determining a forwarding path of the one or more first messages includes: Receiving network path information sent by the first network device; wherein the network path information includes a forwarding path of one or more second messages, and the second message includes the first message; The forwarding paths of the one or more first messages are queried based on the network path information to obtain the forwarding paths of the one or more first messages.
3. The method according to claim 1, characterized in that The analyzing and processing the port cache information of the one or more second network devices based on the first information to obtain first adjustment data includes: Determining whether the port cache information of the one or second network device satisfies the packet loss flow information; When the port cache information of the third network device does not satisfy the packet loss flow information, first adjustment data for adjusting the port cache information of the third network device is generated; wherein the third network device includes some network devices in the second network device.
4. The method according to claim 3, characterized in that The method further comprises: In the case where the port cache information of the one or second network device satisfies the packet loss flow information, the first adjustment data is not generated.
5. A cache adjustment method, characterized in that: The method is applied to a first network device, and the method includes: In the case where it is determined that there is a message loss, encapsulating the first information corresponding to one or more third messages to obtain one or more first messages; wherein the first information includes the packet loss flow information of the first network device port; The one or more first messages are sent to a control device so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on a forwarding path of the one or more first messages.
6. The method according to claim 5, characterized in that The method further comprises: Determine the current first port cache information based on the preset corresponding relationship and the packet loss flow information; wherein the preset corresponding relationship is used to characterize the corresponding relationship between the packet loss flow information and the port cache information of the first network device; or, The first port cache information is determined based on a preset adjustment range and the packet loss flow information.
7. The method according to claim 6, characterized in that The determining the current first port cache information based on the preset corresponding relationship and the packet loss flow information includes: Based on the preset corresponding relationship, query the second port cache information corresponding to the packet loss flow information, The current port cache information is adjusted based on the second port cache information to obtain the first port cache information.
8. The method according to claim 6, characterized in that The determining the first port cache information based on the preset adjustment range and the packet loss flow information includes: Based on the preset adjustment range and the packet loss flow information, the current port cache information is adjusted to the corresponding first port cache information; wherein the first port cache information at least includes the adjusted port cache data.
9. A control device, characterized in that: The control device comprises: a receiving unit, a determining unit, an analyzing unit and a first sending unit; wherein, The receiving unit is configured to receive one or more first messages sent by a first network device; wherein the first message includes first information, and the first information includes packet loss flow information of a port of the first network device; The determining unit is used to determine a forwarding path of the one or more first messages; wherein the forwarding path includes one or more second network devices; The analyzing unit is configured to analyze and process the port cache information of the one or more second network devices based on the first information to obtain first adjustment data; The first sending unit is used to send the first adjustment data to the one or more second network devices, so that the one or more second network devices adjust the current port cache information based on the first adjustment data.
10. A control device, characterized in that: The control device comprises: a first processor and a first memory; wherein, The first memory is used to store a computer program that can be run on the processor; The first processor is configured to execute the method according to any one of claims 1 to 4 when running the computer program.
11. A first network device, characterized in that: The first network device comprises: an encapsulation unit and a second sending unit; wherein, The encapsulation unit is used to encapsulate the first information corresponding to one or more third messages to obtain one or more first messages when it is determined that there is message loss; wherein the first information includes packet loss flow information of the first network device port; The second sending unit is used to send the one or more first messages to the control device, so that the control device adjusts the port cache information of one or more second network devices based on the first information; wherein the second network device includes a network device on the forwarding path of the one or more first messages.
12. A first network device, characterized in that: The first network device comprises: a second processor and a second memory; wherein, The second memory is used to store a computer program that can be run on the processor; The second processor is configured to execute the method according to any one of claims 5 to 8 when running the computer program.
13. A computer-readable storage medium, characterized in that: The storage medium stores computer program codes, which, when executed by a computer, execute the method described in any one of claims 1 to 4 or 5 to 8.
14. A computer program product comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1-4 or 5-8 when executed by a processor.