Detailed Description
Fig. 1 is a flowchart of a method of determining the number of network devices entering a power saving mode according to a first embodiment of the present invention. As shown in fig. 1, a first embodiment of the present invention provides a method for determining the number of network devices entering a power saving mode, the method including the steps of:
step 101: information related to energy saving is acquired. Wherein the information related to power saving includes a sum of current loads of the N network devices, a number of network devices in an operation mode among the N network devices, and a load capacity of each network device, wherein the load capacity of each network device is the same.
Step 102: determining the number of network devices needing to enter the energy-saving mode according to the following formula:
x=N-m-ceil(sum(w)×(1+u)/W), (1)
wherein, x is the number of network devices that need to enter the energy-saving mode among the N network devices, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowed load fluctuation coefficient u ∈ [0,1] under the energy-saving mode, ceil is an operator taking an integer, and m is the number of network devices that are allowed to simultaneously fail among the remaining N-x network devices after the x network devices enter the energy-saving mode. Among them, a preferable value of u is 20%.
It is noted that the network devices referred to throughout the present invention include gateway devices, boards belonging to the same gateway device, or ports belonging to the same board. The network device of the invention can be set as specific to the gateway equipment, the single board belonging to the same gateway equipment or the port belonging to the same single board for processing according to the requirement.
In this embodiment, steps 101 and 102 may be executed by the same control device, or may be executed by different control devices. The control device may be integrated in the gateway apparatus or may be independent from the gateway apparatus.
Referring to fig. 2, fig. 2 is a schematic system structure diagram of a gateway device according to a first embodiment of the present invention, and as shown in fig. 2, a gateway device 50 includes a plurality of boards 502, where each board 502 is provided with a plurality of ports 501, and the ports 501 are for network cable insertion connection. The network apparatus of the present invention may be configured to specifically perform processing for the gateway device 50, the board 502 belonging to the same gateway device 50, or the port 501 belonging to the same board 502, as required.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a control device according to a first embodiment of the present invention. As shown in fig. 3, the control device includes an information acquisition module 201 and a number calculation module 202.
The information obtaining module 201 is configured to obtain information related to energy saving, where the information related to energy saving includes a sum of current loads of the N network devices, a number of network devices in an operating mode among the N network devices, and a load capacity of each network device, where the load capacities of each network device are the same; the number calculating module 202 is configured to determine the number of network devices that need to enter the energy saving mode according to the following formula: x = N-m-ceil (sum (W) x (1+ u)/W) (1).
Wherein, x is the number of network devices that need to enter the energy-saving mode among the N network devices, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowed load fluctuation coefficient u ∈ [0,1] under the energy-saving mode, ceil is an operator taking an integer, and m is the number of network devices that are allowed to simultaneously fail among the remaining N-x network devices after the x network devices enter the energy-saving mode. Among them, a preferable value of u is 20%.
For example:
assuming sum (W) =80, W =100, u =0.2, N =4, m =1, according to equation (1), then x =2, and at this time, the number of network devices required to enter the power saving mode is calculated to be 2, or:
assuming sum (W) =150, W =100, u =0.2, N =4, and m =1, according to equation (1), x is 1, and at this time, the number of network devices required to enter the energy saving mode is calculated to be 1.
Therefore, the first embodiment of the present invention may obtain the number of network devices that can enter the energy saving mode according to the energy saving related information, and determine that the number of network devices that can enter the energy saving mode is greater than the number of network devices that have no load at all, thereby achieving more efficient power control and achieving the purpose of energy saving.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for determining the number of network devices entering the energy saving mode according to a second embodiment of the present invention, and as shown in fig. 4, the method for determining the number of network devices entering the energy saving mode according to the second embodiment of the present invention includes the following steps:
step 301: information related to energy saving is acquired. Wherein the information related to power saving includes a sum of current loads of the N network devices, a number of network devices in an operation mode among the N network devices, and a load capacity of each network device, wherein the load capacity of each network device is the same.
Step 302: and judging whether a first preset condition is met, if so, executing step 303, otherwise, jumping to step 301. Wherein the first preset condition includes any one or any combination of sum (W) ≦ (N-2). times. W, sum (W) ≦ h, sum (W) ≦ WxI, and a current time within the first predetermined time period, specifically sum (W) is a sum of current loads of the N network devices, W is a load capacity of each network device, h is a preset total load threshold, and I is a preset percentage value.
For example, assuming that a total of N =4 loads of gateway devices and sum (W) =150, the load capacity W of each network device = 100. Therefore, if it is calculated that the determination condition sum (w) =150< (4-2) × 100=200 is satisfied, step 303 is executed.
Step 303: determining the number of network devices needing to enter the energy-saving mode according to the following formula:
x=N-m-ceil(sum(w)×(1+u)/W), (1)
wherein, x is the number of network devices which need to enter the energy-saving mode in the N network devices, u is the allowable load fluctuation coefficient u [0,1] under the energy-saving mode, ceil is an integer operator, and m is the number of network devices which are allowed to simultaneously fail in the remaining N-x network devices after the x network devices enter the energy-saving mode.
Referring to fig. 5, wherein fig. 5 is a schematic diagram of a device structure of a control device according to a second embodiment of the present invention, as shown in fig. 4, the control device according to the second embodiment of the present invention includes an information obtaining module 401, a first determining module 402, and a quantity calculating module 403.
The information obtaining module 401 is configured to obtain information related to energy saving, where the information related to energy saving includes a sum of current loads of the N network devices, a number of network devices in an operating mode in the N network devices, and a load capacity of each network device, where the load capacity of each network device is the same.
The first determining module 402 is configured to determine whether the number of network devices that need to enter the energy saving mode meets a first preset condition, if so, the number calculating module determines the number of network devices that need to enter the energy saving mode, and if not, the number calculating module does not perform a calculating action. Wherein the first preset condition comprises any one or any combination of sum (W) ≦ (N-2) × W, sum (W) ≦ h, sum (W) ≦ WxI, and the current time being within the first predetermined time period, specifically sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, h is the preset total load threshold, and I is the preset percentage value.
The number calculating module 403 is configured to determine the number of network devices that need to enter the energy saving mode according to the following formula: x = N-m-ceil (sum (W) x (1+ u)/W), where x is the number of network devices of the N network devices that need to enter the energy saving mode, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowable load fluctuation coefficient u e [0,1] in the energy saving mode, ceil is an operator that takes an integer, and m is the number of network devices that are allowed to simultaneously fail in the remaining N-x network devices after x network devices enter the energy saving mode. Among them, a preferable value of u is 20%.
In a second embodiment of the present invention, it is determined whether the number of network devices that need to enter the energy saving mode satisfies a first preset condition by setting a determining step, where the first preset condition is specifically defined as comparing the total sum (w) of the current loads with a predetermined threshold, or triggering at regular time. And the number of the network devices which need to enter the energy-saving mode is calculated when the first preset condition is judged to be met, so that unnecessary operation can be reduced, and the overall operation speed is increased.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for determining the number of network devices entering the energy saving mode according to a third embodiment of the present invention, where as shown in fig. 6, the method for determining the number of network devices entering the energy saving mode according to the third embodiment of the present invention includes the following steps:
step 501: acquiring information related to energy saving, the information related to energy saving including a sum of current loads of the N network devices, a number of network devices in an operation mode among the N network devices, and a load capacity of each network device, wherein the load capacity of each network device is the same.
Step 502: and judging whether a first preset condition is met, if so, executing a step 503, otherwise, jumping to the step 501. The first preset condition includes any one or any combination of sum (W) ≦ (N-2) × W, sum (W) ≦ h, sum (W) ≦ wxi, and the current time being within the first predetermined time period, specifically sum (W) being the sum of the current loads of the N network devices, W being the load capacity of each network device, h being a preset total load threshold, and I being a preset percentage value.
Step 503: determining the number of network devices needing to enter the energy-saving mode according to the following formula: x = N-m-ceil (sum (W) x (1+ u)/W), where x is the number of network devices of the N network devices that need to enter the energy saving mode, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowable load fluctuation coefficient u e [0,1] in the energy saving mode, ceil is an operator that takes an integer, and m is the number of network devices that are allowed to simultaneously fail in the remaining N-x network devices after x network devices enter the energy saving mode.
Step 504: x source network devices are determined at the N network devices and y target network devices are determined.
Step 505: load in the x source network devices is migrated to the y target network devices. Specifically, in this step, taking a network device as an example of a gateway device, the load migration may specifically be performed in a manner as shown in fig. 7, where fig. 7 is a device interaction flow diagram of performing load migration between a source gateway device and a target gateway device in a third embodiment of the present invention. As shown in fig. 7, on the source gateway device side, the following steps may be performed: sending a load migration request to target gateway equipment, wherein the load migration request comprises information of a user to be migrated or the svlan; after the target gateway equipment makes a response capable of receiving the load migration, deactivating a user to be migrated or the svlan; after the target gateway device activates the user to be migrated or the svlan, the switch CR is notified to withdraw the route of the user to be migrated or the svlan. On the side of the target gateway device, the following steps can be executed: receiving a load migration request, and responding after judging that the load migration can be accepted; after the source gateway equipment deactivates the user to be migrated or the svlan, activating the user to be migrated or the svlan; issuing a gratuitous ARP to a switch LSW; issuing a user group sVlan route to a switch CR; carrying out DHCP process with user equipment; performing an ARP process with the user equipment; taking over User Traffic of the User equipment; and (3) handing User Traffic of the User equipment to the switch CR, wherein the normal network flow of the User equipment enters and exits the network through the target gateway equipment, and the User is successfully online.
Step 506: placing x source network devices in an energy-saving mode. Reference may be made in conjunction with fig. 2: when the gateway device 50 needs to enter the energy saving mode, a shutdown command may be issued by the main control board (which is one of the boards 502) to shut down the board/port that satisfies the following conditions:
(1) and the single board is not guaranteed to be logically and fully connected.
(2) And the ports which are connected with the uplink aggregation router but are not guaranteed to be logically and fully connected are arranged on the single board.
The above-mentioned single board and port with guaranteed logical full connection may be used to switch the source gateway device from the power saving mode to the working mode, and therefore, it needs to be kept on, so that the subsequent wake-up step can be performed (as will be described in detail below).
In addition, a load of a first source network device of the x source network devices is equal to a load of a first target network device of the y target network devices, and an energy consumption coefficient of the first source network device is greater than an energy consumption coefficient of the first target network device, or a load of the first source network device of the x source network devices is less than a load of the first target network device of the y target network devices, or a load of any one of the x source network devices is less than a load of any one of the y target network devices.
Step 507: and judging whether a second preset condition is met, if so, executing the step 507 again, and if not, executing the step 508. Wherein the second preset condition comprises: sum (W) ≧ pxx (N-x-m) xW or the current time is in a second predetermined time period, p ∈ (0, 1).
Step 508: waking up one or more network devices in a power saving mode.
Referring to fig. 8, fig. 8 is a schematic diagram of an apparatus structure of a control apparatus according to a third embodiment of the present invention, as shown in fig. 8, the control apparatus according to the third embodiment of the present invention includes an information obtaining module 601, a first determining module 602, a quantity calculating module 603, a load shifting module 604, a second determining module 605, and a waking module 606.
The information obtaining module 601 is configured to obtain information related to energy saving, where the information related to energy saving includes a sum of current loads of the N network devices, a number of network devices in an operating mode in the N network devices, and a load capacity of each network device, where the load capacity of each network device is the same.
The first determining module 602 is configured to determine whether the number of network devices that need to enter the energy saving mode meets a first preset condition, if so, the number calculating module 603 determines the number of network devices that need to enter the energy saving mode, and if not, the number calculating module 603 does not perform a calculating operation. Wherein the first preset condition comprises any one or any combination of sum (W) ≦ (N-2) × W, sum (W) ≦ h, sum (W) ≦ WxI, and the current time being within the first predetermined time period, specifically sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, h is the preset total load threshold, and I is the preset percentage value.
The number calculating module 603 is configured to determine the number of network devices that need to enter the energy saving mode according to the following formula: x = N-m-ceil (sum (W) x (1+ u)/W), where x is the number of network devices of the N network devices that need to enter the energy saving mode, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowable load fluctuation coefficient u e [0,1] in the energy saving mode, ceil is an operator that takes an integer, and m is the number of network devices that are allowed to simultaneously fail in the remaining N-x network devices after x network devices enter the energy saving mode.
The load migration module 604 is configured to: determining x source network devices and y target network devices at the N network devices; migrating a load among the x source network devices to the y target network devices; placing x source network devices in an energy-saving mode.
The second determining module 605 is configured to: whether the second preset condition is met is judged, if not, the second judging module 605 continues to judge whether the second preset condition is met (in practical application, the judgment is performed after a preset time delay), and if so, the awakening module 606 awakens one or more network devices in the energy-saving mode. Wherein the second preset condition comprises: sum (W) ≧ pxx (N-x-m) xw or the current time is in a second predetermined time period, p e (0, 1), where p is preferably 80%.
In the third embodiment of the present invention, after the number of network devices that need to enter the energy saving mode is obtained, the source network device and the target network device are determined according to the number, the load in the source network device is migrated to the target network device, and the source network device is set to the energy saving mode, so that the network devices that need to enter the energy saving mode are centrally processed and set to the energy saving mode.
In addition, in the third embodiment of the present invention, the network device in the energy saving mode is further awakened by determining whether the second preset condition is met, that is, the network device in the energy saving mode is placed in the working mode, so that the working state of the network device can be dynamically adjusted on the premise that the second preset condition is met, that is, when the network traffic increases or a predetermined time period (such as a network peak time period from six to twelve hours at night), that is, when the total load sum (W) is ≧ px (N-x-m) × W or the current time is in the second predetermined time period, the network device in the energy saving mode is awakened to be in the working state, thereby ensuring the smoothness of the network.
Embodiments of the present invention will be further described with reference to fig. 9 to 11 in conjunction with more specific application scenarios. In this application scenario, the network device specifically selects a gateway device.
Referring first to fig. 9, fig. 9 is a basic schematic diagram of an application scenario in which the present invention is applied. As shown in fig. 8, in this application scenario, loads of multiple gateway devices are dynamically scheduled to achieve green energy saving. It is contemplated that multiple gateway devices 301, 302, 303, 304 located at the same site or at nearby sites may be POOL30, and network traffic required by a user may be concentrated on one or more gateway devices (e.g., gateway device 301) to enable other gateway devices 303, 304 to enter an energy saving mode for energy saving purposes. Therefore, the implementation manner of the present invention applied to this application scenario may be specifically referred to as load sharing in POOL.
Referring to fig. 10, fig. 10 is a schematic diagram of a system structure of a network system formed by a POOL and a conventional device, and as shown in fig. 10, the POOL30 includes a plurality of gateway devices such as a gateway device 302, a gateway device 303, and a gateway device 304. The subscriber devices are accessed (if there are multiple convergence switches with fully interconnected links) through one or more convergence switches (LAN Switch) 315. the convergence Switch 315 is connected downstream to a plurality of digital subscriber loop access Devices (DSLAMs) 316, 317, 318, each DSLAM accessing a plurality of subscriber devices (UPE). The network sides of the gateway device 302, the gateway device 303, and the gateway device 304 are all connected to an IP (Internet Protocol) network, generally speaking, a Core Router.
Acquiring information related to energy saving on each gateway apparatus, when the information related to energy saving shows that the load in POOL30 satisfies the first preset condition as disclosed in the second and third embodiments, such as the number of users decreases at night, determining the number of network devices to enter the energy saving mode according to the formula (1) disclosed in the first, second and third embodiments, further, performing load migration between gateway apparatuses according to the manner disclosed in the third embodiment, and setting the network devices to enter the energy saving mode to the energy saving mode.
The basic principle of the invention applied to another application scenario will be further described below with reference to fig. 11. Fig. 11 is a basic schematic diagram of another application scenario to which the present invention is applied, and as shown in fig. 11, BNG1, BNG2, BNG3, and BNG4 respectively show 4 different gateway devices in a POOL, where BNG1, BNG2, BNG3, and BNG4 start timing at the same time to determine a time reference and maintain synchronization time, and each gateway device exchanges energy saving information with each other and calculates a load according to the energy saving information to determine whether load migration is to be performed, in fig. 11, it is described by taking an example that BNG4 satisfies a load migration condition, and BNG4 determines that it satisfies the load migration condition, specifies a load migration policy, performs load migration to BNG2, BNG3, and BNG4, and enters an energy saving state after the load migration is completed.
Therefore, in this application scenario, since the BNG4 enters the energy saving state, the number of gateway devices operating in the POOL is changed from 4 to 3 after the method of the embodiment of the present invention is performed, thereby effectively reducing the energy consumption.
The device-level energy-saving scheme utilizes the current load condition of each gateway device to be transmitted, each gateway device calculates the load quantity to be transferred through the distributed algorithm, the requirement of an operator on many-to-many energy-saving scenes is met, in addition, the distributed algorithm reduces the communication overhead, and various awakening methods are supported, so the device-level energy-saving scheme has a very wide practical prospect.
As described above, the present application specifically introduces the method and apparatus at the device level, but the idea of the present invention is not limited thereto, and the present invention can be further extended to the board/port level inside the device: that is, when the online users at each port on the gateway device are low, if the load of each board/port in the device meets the condition of entering the energy-saving mode, part of the ports or boards can be closed to achieve the purpose of saving energy.
Referring to fig. 12, fig. 12 is a schematic diagram of a hardware structure of a control device according to a fourth embodiment of the present invention, the control device includes an interface 901, a program memory 902, an operator 903, and a bus 904, wherein the program memory 902, the interface 901, and the operator 903 are respectively coupled to the bus 904;
the program memory 902 stores:
the control interface 901 obtains a first instruction of energy saving-related information, which includes a sum of current loads of N network devices, the number of network devices in an operating mode among the N network devices, and a load capacity of each network device, where the load capacities of each network device are the same;
the control operator 903 determines a second instruction of the number of network devices that need to enter the energy saving mode according to the following formula: x = N-m-ceil (sum (W) x (1+ u)/W), where x is the number of network devices of the N network devices that need to enter the energy saving mode, sum (W) is the sum of the current loads of the N network devices, W is the load capacity of each network device, u is the allowable load fluctuation coefficient u e [0,1] in the energy saving mode, ceil is an operator that takes an integer, and m is the number of network devices that are allowed to simultaneously fail in the remaining N-x network devices after x network devices enter the energy saving mode.
Additionally, the program memory 902 may further store: the control arithmetic unit 903 judges whether the number of the network devices which need to enter the energy-saving mode meets a first preset condition, if so, the control arithmetic unit 903 determines a third instruction of the number of the network devices which need to enter the energy-saving mode; wherein the first preset condition comprises any one or any combination of sum (W) ≦ (N-2). times. W, sum (W) ≦ h, sum (W) ≦ WxI, and the current time within the first predetermined time period, wherein h is the preset total load threshold and I is the preset percentage value.
In addition, the program memory 902 further stores: a fourth instruction for the control arithmetic unit 903 to determine x source network devices in the N network devices, and determine y target network devices, for the control interface 901 to transfer the load in the x source network devices to the y target network devices, and for the control arithmetic unit 903 to set the x source network devices in the energy saving mode;
wherein,
a load of a first source network device of the x source network devices is equal to a load of a first target network device of the y target network devices, and an energy consumption factor of the first source network device is greater than an energy consumption factor of the first target network device,
or,
a load of a first source network device of the x source network devices is less than a load of a first target network device of the y target network devices,
or,
the load of any one of the x source network devices is less than the load of any one of the y target network devices.
In addition, the program memory 902 further stores:
the control arithmetic unit 903 determines whether a second preset condition is met, and when the second preset condition is met, the wake-up module is configured to wake up a fifth instruction of one or more network devices in the energy saving mode, where the second preset condition includes:
sum (W) ≧ pxx (N-x-m) xW or the current time is in a second predetermined time period, p ∈ (0, 1).
It is worth noting that the N network devices are N gateway devices, N single boards belonging to the same gateway device, or N ports belonging to the same single board.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the implementation scheme of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.