A strategy adjustment method and device
By detecting the online status and number of service units in the control unit of the network equipment and adjusting the flow control strategy, the problem of not meeting the speed limit requirements of the entire machine in the prior art is solved, and dynamic control and policy matching of the entire machine traffic is achieved.
Patent Information
- Application Number
- CN202211028870.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-08-26
AI Technical Summary
In the distributed architecture network equipment, the traffic control strategy cannot meet the user's requirements for the speed limit of the entire machine, and as the business units increase or decrease, the speed limit strategy needs to be dynamically adjusted to meet user needs.
By implementing a policy adjustment method in the control unit of the network device, the online status of the service unit is detected, the number of online units is determined, the flow control policy configured by the user is obtained, and the adjusted strategy is issued to the service unit according to the speed limit target and the number of online units.
It realizes effective speed limit for the entire network equipment, ensures that the flow control strategy matches user needs, and dynamically adjusts the strategy when the number of business units changes to meet the speed limit requirements of the entire machine.
Smart Images

Figure CN115277559B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a policy adjustment method and device. Background Art
[0002] For the business traffic control of network devices with distributed architecture, the current mainstream mode is to uniformly configure the traffic control strategy through the control unit, and then send the traffic control strategy to each business unit, and implement traffic control through the token bucket or leaky bucket current limiting algorithm of each business unit.
[0003] This approach will have the following problems: First, the traffic control strategy does not meet the customer's expectation of the speed limit of the entire machine. Under the current speed limit mechanism, each service unit has an independent token bucket, resulting in the final speed limit effect being based on the service unit. For example, the speed limit policy configured by the traffic control policy is to control the flow rate of the entire machine within 300M. When the limit policy is sent to multiple service units based on this mode (such as there are 4 service units in the network device), the final speed limit effect is actually 300M per service unit, resulting in the actual speed limit effect of the entire machine being 300M*4 (number of service cards) = 1200M. In other words, the current speed limit method does not meet the requirement of 300M speed limit of the entire network device. Secondly, as the user's business is adjusted, the network device may increase or decrease service units. In this way, if the traffic control strategy is not adjusted, the actual traffic limit will be inconsistent with the user's requirements.
[0004] Therefore, how to perform speed limit processing on the service units in the network device to meet the user's speed limit requirements for the entire network device is one of the technical issues worth considering. Summary of the invention
[0005] In view of this, the present application provides a policy adjustment method and apparatus for performing speed limit processing on service units in a network device to meet the user's speed limit requirements for the entire network device.
[0006] Specifically, the present application is implemented through the following technical solutions:
[0007] According to a first aspect of the present application, a policy adjustment method is provided, which is applied to a control unit in a network device, wherein the network device further includes a service unit, and the method includes:
[0008] Detecting the online status of the service unit in the network device;
[0009] According to the detection result of the online status of the business unit, determine the number of online units of the current online business unit;
[0010] Acquire a flow control policy configured by a user, wherein the flow control policy includes a speed limit target of the network device;
[0011] Adjusting the flow control strategy according to the speed limit target and the number of online units;
[0012] The adjusted traffic control policy is sent to the online business units.
[0013] Optionally, detecting the online status of the service unit in the network device includes:
[0014] Upon receiving the detection command, detecting the online status of the service unit in the network device; or,
[0015] When a triggering event is detected, the online status of the service unit in the network device is detected.
[0016] Optionally, detecting the online status of the service unit in the network device includes:
[0017] Sending a query instruction to the service unit in the network device through a control line between the control unit and the service unit or a back unit;
[0018] The online status of the service unit is determined according to whether a response result to the query instruction is received.
[0019] Optionally, detecting the online status of the service unit in the network device includes:
[0020] Determine whether online information actively reported by the business unit is received;
[0021] Based on the judgment result, the online status of the business unit is determined.
[0022] Optionally, adjusting the flow control strategy according to the speed limit target and the number of online units includes:
[0023] Get the number of business units in global records;
[0024] If the number of business units is consistent with the number of online units, the current flow control strategy remains unchanged;
[0025] If the number of business units is inconsistent with the number of online units, determining the ratio between the speed limit target and the number of online units to obtain a new speed limit target; and updating the number of business units using the number of online units;
[0026] The new speed limit target replaces the speed limit target in the flow control strategy to obtain an adjusted flow control strategy.
[0027] According to a second aspect of the present application, a policy adjustment device is provided, which is arranged in a control unit in a network device, wherein the network device further includes a service unit, and the device includes:
[0028] A detection module, used to detect the online status of the service unit in the network device;
[0029] A determination module, used to determine the number of online units of the current online business unit according to the detection result of the online state of the business unit;
[0030] An acquisition module, used to acquire a flow control policy configured by a user, wherein the flow control policy includes a speed limit target of the network device;
[0031] An adjustment module, used for adjusting the flow control strategy according to the speed limit target and the number of online units;
[0032] The sending module is used to send the adjusted traffic control strategy to the online business units.
[0033] Optionally, the detection module is specifically used to detect the online status of the service unit in the network device when a detection command is received; or, when a trigger event is monitored, detect the online status of the service unit in the network device.
[0034] Optionally, the detection module is specifically used to send a query instruction to the business unit in the network device through the control line between the control unit and the business unit or the back unit; and determine the online status of the business unit based on whether a response result to the query instruction is received.
[0035] Optionally, the detection module is specifically used to determine whether online information actively reported by the business unit is received; and determine the online status of the business unit according to the determination result.
[0036] Optionally, the adjustment module is specifically used to obtain the number of business units recorded globally; if the number of business units is consistent with the number of online units, the current flow control strategy is kept unchanged; if the number of business units is inconsistent with the number of online units, the ratio between the speed limit target and the number of online units is determined to obtain a new speed limit target; and the number of online units is used to update the number of business units; the new speed limit target is used to replace the speed limit target in the flow control strategy to obtain an adjusted flow control strategy.
[0037] According to the third aspect of the present application, a network device is provided, including a control unit, a service unit and a machine-readable storage medium, the machine-readable storage medium storing a computer program that can be executed by the control unit, and the control unit is prompted by the computer program to execute the method provided in the first aspect of the embodiment of the present application.
[0038] According to the fourth aspect of the present application, a machine-readable storage medium is provided, which stores a computer program. When called and executed by a control unit, the computer program prompts the control unit to execute the method provided in the first aspect of the embodiment of the present application.
[0039] Beneficial effects of the embodiments of the present application:
[0040] The policy adjustment method provided in the embodiment of the present application is as follows: the control unit first detects the online status of the service unit in the network device; then determines the number of online units of the current online service unit based on the detection result of the online status of the service unit; obtains the flow control policy configured by the user, and the flow control policy includes the speed limit target of the network device; adjusts the flow control policy according to the speed limit target and the number of online units; and sends the adjusted flow control policy to the online service unit. Using the above method, by determining the number of online service units in the current network device, and then readjusting the flow control policy according to the number of online units and the speed limit target in the flow control policy, and sending the adjusted flow control policy to the online service unit, the service unit can perform the corresponding flow control according to the adjusted flow control policy, so that the flow control performed by each online service unit generally meets the flow control requirements actually expected to be achieved by the flow control policy configured by the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flow chart of a strategy adjustment method provided in an embodiment of the present application;
[0042] Figure 2 It is a structural schematic diagram of a strategy adjustment device provided in an embodiment of the present application;
[0043] Figure 3 It is a schematic diagram of the hardware structure of a network device for implementing a policy adjustment method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.
[0045] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.
[0046] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0047] The strategy adjustment method provided in this application is described in detail below.
[0048] See also Figure 1 , Figure 1 This is a flow chart of a policy adjustment method provided by the present application. The method can be applied to a control unit in a network device. The network device also includes a service unit. When the control unit implements the method, the following steps may be included:
[0049] S101: Detect the online status of a service unit in the network device.
[0050] In this step, in order to enable the business unit to perform corresponding traffic control according to the user's traffic strategy for the entire network device and meet actual needs, in this application, the network device will detect the online status of each business unit therein.
[0051] It should be noted that when a business unit is offline, the offline business unit will not control the business traffic. That is, only online business units can implement traffic control according to the traffic control strategy. Therefore, in order to meet the user's overall machine traffic control requirements, it is necessary to first determine the online business units in the network device.
[0052] S102: Determine the number of online units of the current online business units according to the detection result of the business unit online status.
[0053] In this step, after obtaining the detection result of the online status of each service unit in the network device based on step S101, the number of online service units currently online can be determined according to the detection result. Specifically, the control unit can monitor the heartbeat status of the service unit to determine whether each service unit is online.
[0054] S103: Acquire a flow control policy configured by a user, where the flow control policy includes a speed limit target of the network device.
[0055] In this step, in order to meet the user's traffic control policy requirements, the control unit will first obtain the user's currently configured traffic control policy, which generally includes the speed limit target that the user expects the network device as a whole to achieve.
[0056] It should be noted that this step can be implemented before steps S101 and S102, or can be implemented simultaneously with steps S101 or S102. Figure 1 This is only an example and does not limit the execution order of S101 or S102 and S103.
[0057] S104: Adjust the flow control strategy according to the speed limit target and the number of online units.
[0058] In this step, after the flow control strategy is obtained, the speed limit target can be obtained from the flow control strategy, and then the flow control strategy is adjusted according to the speed limit target and the number of online units.
[0059] S105: Send the adjusted traffic control policy to the online business unit.
[0060] Specifically, after the adjusted traffic control policy is issued to the online business units, the traffic bandwidth (speed limit target) configured by the user can be evenly distributed to each online business unit, and then each online business unit sets its token bucket based on the adjusted traffic control policy, thereby achieving the purpose of traffic bandwidth control. Since the traffic bandwidth configured by the user is evenly distributed to each online business unit, the traffic control finally implemented by each business unit can meet the user's traffic control needs.
[0061] It should be noted that when the service unit performs flow control according to the received flow control policy, it may adopt, but is not limited to, a token bucket algorithm and / or a leaky bucket algorithm, etc.
[0062] By implementing the policy adjustment method provided by the present application, the control unit first detects the online status of the service unit in the network device; then, according to the detection result of the online status of the service unit, determines the number of online units of the current online service unit; obtains the flow control policy configured by the user, and the flow control policy includes the speed limit target of the network device; adjusts the flow control policy according to the speed limit target and the number of online units; and sends the adjusted flow control policy to the online service unit. By adopting the above method, by determining the number of online units of the current online service unit in the network device, and then readjusting the flow control policy according to the number of online units and the speed limit target in the flow control policy, and sending the adjusted flow control policy to the online service unit, the service unit can perform the corresponding flow control according to the adjusted flow control policy, so that the flow control performed by each online service unit generally meets the flow control requirements actually expected to be achieved by the flow control policy configured by the user.
[0063] Optionally, based on the above embodiments, in this embodiment, step S101 can be executed according to the following process: when a detection command is received, the online status of the service unit in the network device is detected; or when a trigger event is detected, the online status of the service unit in the network device is detected.
[0064] Specifically, the detection command may be, but is not limited to, a detection command typed by a user, etc. For example, after a user configures a flow control policy in a network device, the user may trigger a policy adjustment method, i.e., send a detection command to the control unit, so that the control unit may detect the online status of the service unit in the network device after receiving the detection command.
[0065] In addition, the above-mentioned trigger event can be triggered by internal timing, that is, a time trigger is set in the network device. The time trigger mainly provides time rules and parameter settings. When the set rules are met, a trigger event will be generated. The trigger event will drive the "policy adjustment traffic, that is, traffic policy reconfiguration", that is, the control unit detects the online status of the service unit in the network device when receiving the trigger event.
[0066] It should be noted that multiple triggering rules can be set for a time trigger, including but not limited to the following and any combination thereof:
[0067] (1) Fixed time, such as 12:00 p.m. on May 1, 2022, or 12:00 p.m. on June 1, 2022, etc.;
[0068] (2) Fixed dates, such as every Monday at 12:00 p.m., the 1st day of every month at 12:00 p.m., etc.;
[0069] (3) Interval time, such as 1 hour interval, 24 hours interval, etc.;
[0070] (4) When the device is restarted, etc.
[0071] Optionally, based on any of the above embodiments, in one embodiment, step S101 can be executed according to the following process: a query instruction is sent to the business unit in the network device through the control line or back unit between the control unit and the business unit; and the online status of the business unit is determined based on whether a response result to the query instruction is received.
[0072] Specifically, when the control unit detects the online status of the business unit in the network device, it can use the control line or back unit between the control unit and the business unit to confirm the online status of the business unit by actively sending query instructions. That is, after sending the query command to each business unit, it can be confirmed whether the response result of each business unit can be received. If the response result of any business unit is received, it is determined that the business unit is in an online state. If the response result of the business unit is not received, it is confirmed that the business unit is in an offline state.
[0073] Optionally, in another embodiment, step S101 may be performed according to the following process: determining whether online information actively reported by the service unit is received; and determining the online status of the service unit according to the determination result.
[0074] Specifically, the business unit can also actively report its online information regularly to allow the control unit to confirm whether the business unit is online. Based on this, if the online information of any business unit is received during this reporting cycle, it is confirmed that the business unit is online, otherwise it is confirmed that the business unit is offline.
[0075] Therefore, any of the above detection methods can be used to confirm whether the business unit is online, so as to improve the accuracy of confirming the online business unit, and then adjust the traffic control strategy later, so that the adjusted traffic control strategy can better meet the user's traffic control needs for the entire network device.
[0076] Optionally, in addition to the speed limit target, the above traffic control strategy may also include the time period for which traffic restriction is required, the service priority, the policy priority, etc. In addition, the speed limit target may be the total traffic speed limit.
[0077] It should be noted that the above traffic control strategy can be configured from the user service perspective, reflecting the overall service requirements of the network device. In practical applications, the traffic control strategy can be expressed in the form of a strategy group, that is, composed of multiple traffic control strategies.
[0078] Optionally, based on any of the above embodiments, in this embodiment, step S104 can be performed according to the following method: obtain the number of business units recorded globally; if the number of business units is consistent with the number of online units, keep the current flow control strategy unchanged; if the number of business units is inconsistent with the number of online units, determine the ratio between the speed limit target and the number of online units to obtain a new speed limit target; and use the number of online units to update the number of business units; replace the speed limit target in the flow control policy with the new speed limit target to obtain an adjusted flow control strategy.
[0079] Specifically, this embodiment will pre-configure a global variable, which is recorded as the number of business units mentioned above. The number of business units is the number of online business units when the policy was adjusted last time. After each adjustment of the flow control policy, the number of business units will be dynamically updated according to the adjustment result. Based on this, when adjusting the flow control policy this time, when determining the number of online units of the online business units in the current network device, the number of business units recorded in the global record will be read, and it will be determined whether the number of online units is consistent with the number of business units. When it is confirmed to be consistent, it indicates that the number of online business units has not changed. If the flow control policy configured by the user has not changed at this time, that is, it is not a newly configured flow control policy, then the previously issued flow control policy is kept unchanged at this time, that is, the current policy adjustment process is terminated; if the currently acquired flow control policy is a newly configured policy, then the policy adjustment still needs to be performed at this time, that is, the ratio between the speed limit target and the number of online units in the flow control policy is determined, and then it is used as the adjusted speed limit target, and the flow control policy is updated, and then the adjusted flow control policy is issued to the online business units. If the confirmation is inconsistent, it means that the number of currently online business units has changed. For example, a new business unit is online or a business unit is offline. In this case, the flow control strategy needs to be adjusted, that is, the ratio between the speed limit target and the number of online units in the flow control strategy is determined, and then it is used as the adjusted speed limit target, and the flow control strategy is updated, and then the adjusted flow control strategy is sent to the online business units.
[0080] After adjusting the flow control policy, the value of the number of business units is updated using the value of the number of online units.
[0081] So far, in the method of adaptive flow control of the whole machine of the network equipment with multiple business units under the distributed architecture, the number of online business units is confirmed by dynamically monitoring the online status of the business units; then, when it is confirmed that the number of online business units of the current online business units is inconsistent with the number of business units recorded globally, the flow bandwidth control range of each business unit is recalculated, and then the flow configuration strategy of the business unit is changed, so that the flow control bandwidth of the whole machine is evenly distributed to each online business unit. In this way, the adaptive problem of the flow control strategy configured by the user in the network equipment with complex distributed architecture including large-volume business, multiple interfaces, multiple business units, etc. is effectively handled, and when the business unit performs flow control based on the received flow control strategy, the flow control performed by each business unit based on the flow control strategy is ensured to match the flow control strategy configured by the user, that is, the flow control of the whole machine of the network equipment is accurate.
[0082] Based on the same inventive concept, the present application also provides a policy adjustment device corresponding to the above policy adjustment method. The implementation of the policy adjustment device can refer to the above description of the policy adjustment method, which will not be discussed here one by one.
[0083] See also Figure 2 , Figure 2 A policy adjustment device is provided in an exemplary embodiment of the present application, and is arranged in a control unit in a network device, wherein the network device further includes a service unit, and the device includes:
[0084] A detection module 201, used to detect the online status of the service unit in the network device;
[0085] A determination module 202, configured to determine the number of online units of the currently online business units according to the detection result of the online status of the business units;
[0086] An acquisition module 203 is used to acquire a flow control policy configured by a user, wherein the flow control policy includes a speed limit target of the network device;
[0087] An adjustment module 204, configured to adjust the flow control strategy according to the speed limit target and the number of online units;
[0088] The sending module 205 is used to send the adjusted flow control policy to the online service unit.
[0089] Optionally, based on the above embodiments, in this embodiment, the above detection module 201 is specifically used to detect the online status of the business unit in the network device when a detection command is received; or, when a trigger event is monitored, detect the online status of the business unit in the network device.
[0090] Optionally, based on any of the above embodiments, in this embodiment, the above-mentioned detection module 201 is specifically used to send a query instruction to the business unit in the network device through the control line or back unit between the control unit and the business unit; and determine the online status of the business unit based on whether a response result to the query instruction is received.
[0091] Optionally, based on any of the above embodiments, in this embodiment, the detection module 201 is specifically used to determine whether online information actively reported by the business unit is received; and determine the online status of the business unit according to the determination result.
[0092] Optionally, based on any of the above embodiments, in this embodiment, the above adjustment module 204 is specifically used to obtain the number of business units recorded globally; if the number of business units is consistent with the number of online units, the current flow control strategy is kept unchanged; if the number of business units is inconsistent with the number of online units, the ratio between the speed limit target and the number of online units is determined to obtain a new speed limit target; and the number of online units is used to update the number of business units; the new speed limit target is used to replace the speed limit target in the flow control policy to obtain an adjusted flow control strategy.
[0093] By providing the above-mentioned strategy adjustment device, in the method of adaptive flow control of the whole machine of the network equipment with multiple business units under the distributed architecture, the number of online business units is confirmed by dynamically monitoring the online status of the business units; then, when it is confirmed that the number of online business units of the current online business units is inconsistent with the number of business units recorded globally, the flow bandwidth control range of each business unit is recalculated, and then the flow configuration strategy of the business unit is changed, so that the flow control bandwidth of the whole machine is evenly distributed to each online business unit. In this way, the adaptive problem of the flow control strategy configured by the user in the network equipment with complex distributed architecture including large-flow business, multiple interfaces, multiple business units, etc. is effectively handled, and when the business unit performs flow control based on the received flow control strategy, the flow control performed by each business unit based on the flow control strategy is ensured to match the flow control strategy configured by the user, that is, the accurate flow control of the whole machine of the network equipment is achieved.
[0094] Based on the same inventive concept, the embodiment of the present application provides a network device, such as Figure 3As shown, the network device includes a control unit 300, a service unit 301 and a machine-readable storage medium 302, wherein the machine-readable storage medium 302 stores a computer program that can be executed by the control unit 300, and the control unit 300 is prompted by the computer program to execute the policy adjustment method provided by any embodiment of the present application. In addition, the network device also includes a communication interface 303 and a communication bus 304, wherein the control unit 300, the communication interface 303, and the machine-readable storage medium 302 communicate with each other through the communication bus 304.
[0095] The communication bus mentioned in the above network device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0096] The communication interface is used for communication between the above network devices and other devices.
[0097] The machine-readable storage medium 302 may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.
[0098] The above-mentioned control unit 300 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0099] As for the network device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0100] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0101] The implementation process of the functions and effects of each unit / module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0102] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.
[0103] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A strategy adjustment method, It is characterized in that Applied to a control unit in a network device, the network device further comprising a service unit, the method comprising: Detecting the online status of the service unit in the network device; According to the detection result of the online status of the business unit, determine the number of online units of the current online business unit; Acquire a flow control policy configured by a user, wherein the flow control policy includes a speed limit target of the network device; Adjusting the flow control strategy according to the speed limit target and the number of online units; Send the adjusted traffic control policy to the online business units; The adjusting the flow control strategy according to the speed limit target and the number of online units includes: Get the number of business units in global records; If the number of business units is inconsistent with the number of online units, determining the ratio between the speed limit target and the number of online units to obtain a new speed limit target; and updating the number of business units using the number of online units; The new speed limit target replaces the speed limit target in the flow control strategy to obtain an adjusted flow control strategy.
2. The method according to claim 1, It is characterized in that Detecting the online status of the service unit in the network device includes: Upon receiving the detection command, detecting the online status of the service unit in the network device; or, When a triggering event is detected, the online status of the service unit in the network device is detected.
3. The method according to claim 1, It is characterized in that Detecting the online status of the service unit in the network device includes: Sending a query instruction to the service unit in the network device through a control line between the control unit and the service unit or a back unit; The online status of the service unit is determined according to whether a response result to the query instruction is received.
4. The method according to claim 1, It is characterized in that Detecting the online status of the service unit in the network device includes: Determine whether online information actively reported by the business unit is received; Based on the judgment result, the online status of the business unit is determined.
5. The method according to claim 1, It is characterized in that The flow control strategy is adjusted according to the speed limit target and the number of online units, further comprising: If the number of service units is consistent with the number of online units, the current flow control strategy remains unchanged.
6. A strategy adjustment device, It is characterized in that The device is arranged in a control unit in a network device, wherein the network device further comprises a service unit, and the device comprises: A detection module, used to detect the online status of the service unit in the network device; A determination module, used to determine the number of online units of the current online business unit according to the detection result of the online state of the business unit; An acquisition module, used to acquire a flow control policy configured by a user, wherein the flow control policy includes a speed limit target of the network device; An adjustment module, used for adjusting the flow control strategy according to the speed limit target and the number of online units; A sending module is used to send the adjusted traffic control strategy to the online business units; The adjustment module is specifically used to obtain the number of business units recorded globally; if the number of business units is inconsistent with the number of online units, determine the ratio between the speed limit target and the number of online units to obtain a new speed limit target; and use the number of online units to update the number of business units; replace the speed limit target in the flow control strategy with the new speed limit target to obtain an adjusted flow control strategy.
7. The device according to claim 6, It is characterized in that The detection module is specifically used to detect the online status of the service unit in the network device when a detection command is received; or to detect the online status of the service unit in the network device when a trigger event is detected.
8. The device according to claim 6, It is characterized in that The detection module is specifically used to send a query instruction to the business unit in the network device through the control line between the control unit and the business unit or the back unit; and determine the online status of the business unit according to whether a response result to the query instruction is received.
9. The device according to claim 6, It is characterized in that The detection module is specifically used to determine whether the online information actively reported by the business unit is received; and determine the online status of the business unit according to the determination result.
10. The device according to claim 6, It is characterized in that include: The adjustment module is further configured to keep the current flow control strategy unchanged if the number of the service units is consistent with the number of online units.
Citation Information
Patent Citations
Network speed limiting method and device and electronic equipment
CN115733802A