Power consumption monitoring method, control device and storage medium
By dynamically adjusting the ASPM power consumption mode based on the traffic monitoring mechanism in the PCIe link, the problem of high power consumption or large data transmission latency in low power management of the PCIe link is solved, realizing efficient energy consumption management and low latency data transmission under different traffic conditions.
Patent Information
- Application Number
- CN202511783650.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-02-27
AI Technical Summary
In existing technologies, PCIe links suffer from high power consumption or large data transmission latency in low-power management, especially when using ASPM L1 state, making it difficult to balance power consumption and bandwidth requirements.
By continuously acquiring traffic data of the target link based on a traffic monitoring mechanism, the ASPM power consumption mode is dynamically adjusted to match bandwidth requirements. This includes setting traffic thresholds using an adaptive dynamic threshold method to ensure that the link has the lowest power consumption and the lowest data transmission latency under different conditions.
It enables dynamic adjustment of power consumption mode under different traffic conditions, which ensures low power consumption and reduces data transmission latency, thereby improving the energy efficiency and performance of PCIe links.
Smart Images

Figure CN121579307A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer technology, and specifically relates to a power consumption monitoring method, control device, and storage medium. Background Technology
[0002] The Peripheral Component Interconnect Express (PCIe) standard, a high-speed serial computer expansion bus, is widely used in data transmission for various servers and computers due to its advantages such as high reliability, high performance, high bandwidth, and high scalability. With technological advancements, PCIe application speeds have gradually increased from 2.5GT / s in Gen1 to 64GT / s in Gen6. However, high speeds are accompanied by high power consumption, making low-power design a persistent challenge and key focus in PCIe applications. Active State Power Management (ASPM) is a common low-power method in PCIe. Its principle is that when ASPM is enabled, if there is no data transmission at either end of the link, the link automatically enters a lower-power state; when data is transmitted at either end, it exits the low-power state and returns to normal operation, thus reducing power consumption.
[0003] However, ASPM L1 states offer significant power savings, while ASPM L0s offer very limited savings and are prone to data transmission errors due to overly frequent link state switching. In related technologies, after entering ASPM L1, the link can further reduce power consumption by entering the lower-power PHY state p2. However, using only the lower-power PHY state ASPM L1P2 can cause significant latency in data transmission during periods of high data traffic, impacting the link's bandwidth requirements. Summary of the Invention
[0004] The purpose of this application is to provide a power consumption monitoring method, control device, and storage medium, which aims to achieve dynamic power consumption monitoring based on a flow monitoring mechanism.
[0005] According to a first aspect of this application, a power consumption monitoring method is provided, the power consumption monitoring method comprising: continuously acquiring traffic data of a target link based on a preset time interval, and determining the bandwidth requirement of the target link based on the continuously acquired traffic data, wherein the target link is any interconnection link for communication between a CPU and a peripheral device; determining whether the ASPM power consumption mode of the target link matches the determined bandwidth requirement; and if the ASPM power consumption mode does not match the bandwidth requirement, adjusting the ASPM power consumption mode according to the bandwidth requirement.
[0006] In an optional implementation, before continuously acquiring traffic data of the target link, the power consumption monitoring method further includes: determining whether the devices at both ends of the target link support enabling the L1 low power mode in the ASPM power consumption mode; if they support enabling the L1 low power mode in the ASPM power consumption mode, then the step of continuously acquiring traffic data of the target link is executed.
[0007] In an optional implementation, before continuously acquiring traffic data of the target link, the power consumption monitoring method further includes: reading register information of the CPU and peripheral devices, and recording the full bandwidth traffic data of the target link.
[0008] In an optional implementation, determining the bandwidth requirement of the target link based on continuously acquired traffic data includes: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is greater than the traffic data acquired in the previous acquisition, then the bandwidth requirement of the target link is determined to be an increased bandwidth requirement state, where n is a natural number greater than 1.
[0009] In an optional implementation, if the ASPM power consumption mode does not match the bandwidth requirement, the ASPM power consumption mode is adjusted according to the bandwidth requirement, including: if the ASPM power consumption mode does not match the bandwidth requirement state, then the ASPM power consumption mode is adjusted to working mode L0.
[0010] In an optional implementation, determining the bandwidth requirement of the target link based on continuously acquired traffic data includes: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is greater than a first threshold, then the bandwidth requirement of the target link is determined to be the full bandwidth requirement, where n is a natural number greater than 1.
[0011] In an optional implementation, if the ASPM power consumption mode does not match the bandwidth requirement, the ASPM power consumption mode is adjusted according to the bandwidth requirement, including: if the ASPM power consumption mode does not match the full bandwidth requirement state, then the ASPM power consumption mode is adjusted to working mode L0.
[0012] In an optional implementation, determining the current bandwidth requirement of the target link based on continuously acquired traffic data includes: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than or equal to a first threshold and greater than or equal to a second threshold, then the bandwidth requirement of the target link is determined to be a first low bandwidth requirement, where n is a natural number greater than 1.
[0013] In an optional implementation, if the ASPM power consumption mode does not match the bandwidth requirement, the ASPM power consumption mode is adjusted according to the bandwidth requirement, including: if the ASPM power consumption mode does not match the first low bandwidth requirement state, the ASPM power consumption mode is adjusted to a low power consumption mode L1, and the state of the target link electrical layer is adjusted to a low power consumption state P1.
[0014] In an optional implementation, determining the current bandwidth requirement of the target link based on continuously acquired traffic data includes: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than a second threshold, then the bandwidth requirement of the target link is determined to be a second low bandwidth requirement, where n is a natural number greater than 1.
[0015] In an optional implementation, if the ASPM power consumption mode does not match the bandwidth requirement, the ASPM power consumption mode is adjusted according to the bandwidth requirement, including: if the ASPM power consumption mode does not match the second low bandwidth requirement state, the ASPM power consumption mode is adjusted to low power consumption mode L1, and the state of the target link electrical layer is adjusted to low power consumption state P2.
[0016] In an optional implementation, before continuously determining the traffic status of the target link based on the acquired traffic data, the power consumption monitoring method further includes: dynamically setting a first threshold and a second threshold using an adaptive dynamic threshold method.
[0017] In an optional implementation, the step of dynamically setting the first threshold and the second threshold using the adaptive dynamic threshold method includes: calculating a first feature value MA_short and a second feature value SD_short to characterize short-term mobile traffic based on the acquired traffic data, and calculating a third feature value MA_long to characterize long-term mobile traffic; and dynamically setting the first threshold and the second threshold based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long.
[0018] In an optional implementation, dynamically setting the first threshold and the second threshold based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long includes: setting the larger value among (MA_long * K1) and (MA_short - SD_short * K2) as the first threshold; and setting the smaller value among (Full_Bandwidth * Safe_Margin) and (MA_short + SD_short * K3) as the second threshold. Here, Safe_Margin represents the safety margin, Full_Bandwidth represents the full bandwidth traffic data, and K1, K2, and K3 represent adjustment parameters.
[0019] According to a second aspect of this application, a control device is provided, the control device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the power consumption monitoring method described above.
[0020] According to a third aspect of this application, a machine-readable storage medium is provided, on which instructions are stored, causing a machine to perform the power consumption monitoring method described above.
[0021] The power consumption monitoring method provided in this application, through the above technical solution, includes: continuously acquiring traffic data of a target link based on a preset time interval, and determining the bandwidth requirement of the target link based on the continuously acquired traffic data; determining whether the ASPM power consumption mode of the target link matches the determined bandwidth requirement; if the ASPM power consumption mode does not match the bandwidth requirement, adjusting the ASPM power consumption mode according to the bandwidth requirement. This application's power consumption monitoring method, based on the PCIe protocol and traffic monitoring mechanism, determines the current bandwidth requirement (i.e., traffic status) based on the monitored data traffic; and adjusts the power consumption mode in a timely manner according to the current bandwidth requirement to further save power in each state. When the link has performance requirements, it dynamically exits the power consumption mode to ensure low data transmission latency; when the link traffic decreases, it readjusts the link to the corresponding low-power mode according to the current link bandwidth requirement, maximizing power savings while ensuring the link's bandwidth requirements.
[0022] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures and processes shown in the description and the accompanying drawings. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating the power consumption monitoring method provided in an exemplary embodiment of this application.
[0025] Figure 2 This is a schematic diagram of the process for determining the traffic status of a target link as provided in an exemplary embodiment of this application.
[0026] Figure 3 This is an example flowchart illustrating the power consumption monitoring method provided in an exemplary embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] In related technologies, power management for the Peripheral Component Interconnect Express (PCIe) standard either fails to further reduce power consumption, or uses methods such as reducing link width and speed to reduce power consumption, which may affect the accuracy of PCIe data transmission; or it involves power reduction processing for the entire CPU, which is subject to many limitations. Therefore, this application provides a power monitoring method based on the PCIe protocol and traffic monitoring mechanism.
[0029] Figure 1 This is a flowchart illustrating a power consumption monitoring method provided in an exemplary embodiment of this application. The power consumption monitoring method may include the following steps: Step S110: Based on a preset time interval, continuously acquire traffic data of the target link, and determine the bandwidth requirement of the target link based on the continuously acquired traffic data.
[0030] The target link is any interconnection link between the CPU and peripheral devices.
[0031] In a preferred embodiment of this application, before step S110, the power consumption monitoring method may further include: determining whether the devices at both ends of the target link support enabling the L1 low power mode in the ASPM power consumption mode; if they support enabling the L1 low power mode in the ASPM power consumption mode, then performing the step of continuously acquiring traffic data of the target link.
[0032] For example, during data transmission, it is determined whether the devices at both ends of the link support enabling the L1 function in the Peripheral Component Interconnect Express (APSM) power management mode. If not, the current link exits dynamic power management mode. ASPM's low-power function is divided into L0s and L1. That is, the normal operating state is L0, the ASPM power mode with slightly lower power consumption than L0 is L0s, and the ASPM power mode with even lower power consumption than L0s is L1. It can be understood that in ASPM power modes, L1 is the state with the lowest power consumption, i.e., the lowest power mode L1. If supported, the traffic data of the target link is obtained to determine the bandwidth requirements of the target link.
[0033] In a preferred embodiment of this application, before step S110, the power consumption monitoring method may further include: reading register information of the CPU and peripheral devices, and recording the full bandwidth traffic data of the target link.
[0034] In a preferred embodiment of this application, determining the bandwidth requirement of the target link based on continuously acquired traffic data may include: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is greater than the traffic data acquired in the previous acquisition, then the bandwidth requirement of the target link is determined to be an increased bandwidth requirement state. Here, n is a natural number greater than 1.
[0035] In a preferred embodiment of this application, determining the bandwidth requirement of the target link based on continuously acquired traffic data may include: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is greater than a first threshold, then the bandwidth requirement of the target link is determined to be the full bandwidth requirement.
[0036] In a preferred embodiment of this application, determining the bandwidth requirement of the target link based on continuously acquired traffic data may include: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than or equal to a first threshold and greater than or equal to a second threshold, then the bandwidth requirement of the target link is determined to be a first low bandwidth requirement.
[0037] In a preferred embodiment of this application, determining the bandwidth requirement of the target link based on continuously acquired traffic data may include: for n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than a second threshold, then the bandwidth requirement of the target link is determined to be a second low bandwidth requirement.
[0038] Please refer to Figure 2 For example, during link traffic monitoring, CPU and device register information is read to record full-bandwidth traffic data. Based on a preset time interval (e.g., every 5 seconds), traffic data for the target link is acquired. For n consecutive acquisitions (e.g., 3 times), if each acquired data is greater than the previous data, it is determined that the link has a bandwidth increase requirement (i.e., bandwidth demand is in the increase-bandwidth demand state). If each acquired data is equal to the previous data, the current link traffic data can be further compared with the full-bandwidth traffic data. If the ratio of the current traffic data to the full-bandwidth traffic data is greater than a first threshold T1, it is determined that the current link has a full-bandwidth requirement (i.e., bandwidth demand is full-bandwidth demand). If the ratio of the current traffic data to the full-bandwidth traffic data is between the first threshold T1 and the second threshold T2, it is determined that the current link is in a busy state (i.e., bandwidth demand is the first low-bandwidth demand). If the ratio of the current traffic data to the full-bandwidth traffic data is lower than the second threshold T2, it is determined that the current link is in an idle state (i.e., bandwidth demand is the second low-bandwidth demand). The first threshold T1 and the second threshold T2 can be set according to requirements.
[0039] In a preferred embodiment of this application, before determining the traffic status of the target link based on continuously acquired traffic data, the power consumption monitoring method may further include: dynamically setting a first threshold and a second threshold using an adaptive dynamic threshold method.
[0040] Network traffic exhibits periodicity (daily, weekly) and burstiness; therefore, static thresholds are ineffective in determining changes in traffic status. In this embodiment, an adaptive dynamic threshold method can be used to dynamically set a first threshold T1 and a second threshold T2.
[0041] A further preferred embodiment utilizes an adaptive dynamic thresholding method to dynamically set the first and second thresholds, which may include: calculating a first feature value MA_short and a second feature value SD_short to characterize short-term mobile traffic based on the acquired traffic data, and calculating a third feature value MA_long to characterize long-term mobile traffic; and dynamically setting the first and second thresholds based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long.
[0042] In this embodiment, the first characteristic value used to characterize short-term mobile traffic can be the short-term moving average (MA_short), for example, the average traffic over a preset time period (e.g., 15-30 minutes); the second characteristic value used to characterize short-term mobile traffic can be the short-term moving standard deviation (SD_short), reflecting recent traffic fluctuations, for example, the average traffic over a preset time period (e.g., 15-30 minutes); the third characteristic value used to characterize long-term mobile traffic can be the long-term moving average (MA_long), for example, the average traffic over the same period over a preset time period (e.g., 24 hours or one week). The first threshold T1 and the second threshold T2 can be dynamically set based on MA_short, SD_short, and MA_long.
[0043] In a preferred embodiment of this application, dynamically setting the first threshold and the second threshold based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long can include: setting the larger value among (MA_long * K1) and (MA_short - SD_short * K2) as the first threshold; and setting the smaller value among (Full_Bandwidth * Safe_Margin) and (MA_short + SD_short * K3) as the second threshold. Here, Safe_Margin represents the safety margin, Full_Bandwidth represents the full bandwidth traffic data, and K1, K2, and K3 represent adjustment parameters.
[0044] For example, the first threshold T1 can be set to max(MA_long * K1, MA_short - SD_short * K2), that is, the larger of (MA_long * K1) and (MA_short - SD_short * K2). Here, the adjustment parameter K1 (e.g., 0.5-0.7) is used to ensure it is low relative to the long-term trend, and the adjustment parameter K2 (e.g., 1.5-2) is used to ensure it is below the short-term mean minus a certain fluctuation range, thus identifying true idleness. The second threshold T2 can be set to min(Full_Bandwidth * Safe_Margin, MA_short + SD_short * K3), that is, the smaller of (Full_Bandwidth * Safe_Margin) and (MA_short + SD_short * K3). Here, Safe_Margin represents the safety margin, Full_Bandwidth represents the traffic data at full bandwidth, and adjusting parameter K3 (e.g., 2-3) is used to ensure that it is higher than the short-term average plus a significant range of fluctuations, close to the saturation point.
[0045] This application's embodiments utilize an adaptive dynamic threshold method, dynamically setting a first threshold T1 and a second threshold T2, which can better adapt to changes in business operations, periodic fluctuations, and sudden traffic surges. It can also significantly improve the accuracy of determining traffic states such as "idle," "busy," and "full bandwidth."
[0046] Step S120: Determine whether the ASPM power consumption mode of the target link matches the determined bandwidth requirements.
[0047] In this embodiment, if the traffic status of the target link is full bandwidth demand or broadband upgrade demand, the corresponding ASPM power consumption mode is working mode L0; if the traffic status of the target link is busy, the corresponding ASPM power consumption mode is the lowest power consumption mode L1, and the phy state is P1 low power consumption state; if the traffic status of the target link is idle, the corresponding ASPM power consumption mode is the lowest power consumption mode L1, and the phy state is P2 low power consumption state.
[0048] The phy state (physical state) refers to the state of the PCIe electrical layer. The normal operating state is P0, while P0s, P1, and P2 are low-power states. In ASPM power mode L0s, the corresponding phy state is P0s. When L1 is enabled, it's possible to choose between P1 and P2 states; P2 consumes less power than P1.
[0049] Please refer to Figure 3 For example, during data transmission, it is determined whether the devices at both ends of the link support enabling the APSM L1 function. If not, the current link exits the dynamic power management mode. If it supports, the traffic status of the target link is determined according to step S110. If the target link is in a full bandwidth demand state or a bandwidth upgrade demand state, the corresponding ASPM power mode should be working mode L0. If the target link is in a busy state, the corresponding ASPM power mode should be ASPM L1, and the PHY state should be P1. If the target link is in an idle state, the corresponding ASPM power mode should be ASPM L1, and the PHY state should be P2. In this embodiment, the ASPM power mode of the target link is monitored to determine whether the ASPM power mode of the target link matches the determined bandwidth demand.
[0050] Step S130: If the ASPM power consumption mode does not match the bandwidth requirement, adjust the ASPM power consumption mode according to the bandwidth requirement.
[0051] In a preferred embodiment of this application, step S130 may include: if the ASPM power consumption mode does not match the up-bandwidth requirement state, then the ASPM power consumption mode is adjusted to the working mode L0.
[0052] In a preferred embodiment of this application, step S130 may include: if the ASPM power consumption mode does not match the full bandwidth requirement state, then the ASPM power consumption mode is adjusted to working mode L0.
[0053] In a preferred embodiment of this application, step S130 may include: if the ASPM power consumption mode does not match the first low bandwidth requirement state, then the ASPM power consumption mode is adjusted to low power consumption mode L1, and the state of the target link electrical layer is adjusted to low power consumption state P1.
[0054] In a preferred embodiment of this application, step S130 may include: if the ASPM power consumption mode does not match the second low bandwidth requirement state, then the ASPM power consumption mode is adjusted to low power consumption mode L1, and the state of the target link electrical layer is adjusted to low power consumption state P2.
[0055] Please refer to Figure 3 Continuing from the previous example, when the ASPM power consumption mode does not match the bandwidth requirement, the low-power mode is adjusted accordingly. If the target link is idle (i.e., the ASPM power consumption mode does not match the second low bandwidth requirement state), the ASPM power consumption mode is adjusted to low-power mode L1, and the phy state is enabled to P2 low-power state (i.e., the low-power mode is set to ASPM L1P2) to save power as much as possible. If the target link is busy (i.e., the ASPM power consumption mode does not match the first low bandwidth requirement state), the ASPM power consumption mode is adjusted to the lowest power consumption mode L1, and the phy state is enabled to P1 low-power state (i.e., the low-power mode is set to ASPM L1P1); if the target link's traffic state is full bandwidth requirement state or full bandwidth requirement state, the ASPM state is turned off.
[0056] Accordingly, the power consumption monitoring method provided in this application includes: continuously acquiring traffic data of a target link based on a preset time interval, and determining the bandwidth requirement of the target link based on the continuously acquired traffic data; determining whether the ASPM power consumption mode of the target link matches the determined bandwidth requirement; if the ASPM power consumption mode does not match the bandwidth requirement, adjusting the ASPM power consumption mode according to the bandwidth requirement. This power consumption monitoring method based on the PCIe protocol and traffic monitoring mechanism determines the current bandwidth requirement (i.e., traffic status) based on the monitored data traffic; and adjusts the power consumption mode in a timely manner according to the current bandwidth requirement to further save power in each state. When the link has performance requirements, it dynamically exits the power consumption mode to ensure low data transmission latency; when the link traffic decreases, it readjusts the link to the corresponding low-power mode according to the current link bandwidth requirement, maximizing power savings while ensuring the link's bandwidth requirements.
[0057] Furthermore, this embodiment of the application changes the power consumption mode of the link in real time according to the traffic status of the link. This can further save power consumption when the link is idle, while ensuring low latency in data transmission when data needs to be transmitted. This embodiment of the application does not require reducing the speed or bandwidth of the link, and the data transmission of the PCIe link is minimally affected.
[0058] Furthermore, in this embodiment, when there is a data transmission requirement on the link, the phy state of ASPM L1 is adjusted to P1 to ensure data transmission while saving power. Simultaneously, when the link has full bandwidth requirements, ASPM is directly shut down to ensure data transmission. Once the data traffic on the link decreases, ASPM L1 is reopened and the corresponding phy state is configured. Settings can also be configured according to the conditions of each port, with fewer restrictions on other modules.
[0059] This application also provides a control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the power consumption monitoring method described above.
[0060] This application also provides a machine-readable storage medium storing instructions that cause a machine to execute the power consumption monitoring method described above.
[0061] It should be noted that the control device and machine-readable storage medium described above can implement the power consumption monitoring method provided in the above embodiments. For specific implementation methods, please refer to the description of the power consumption monitoring method in the above embodiments, which will not be repeated here.
[0062] It is understood that the circuit structures, names, and parameters described in the above embodiments are merely examples. Those skilled in the art can also make readily conceived combinations and adjustments to the structural features of the above embodiments according to their needs, and the concept of this application should not be limited to the specific details of the above examples.
[0063] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A power consumption monitoring method, characterized in that, The power consumption monitoring method includes: Based on a preset time interval, traffic data of the target link is continuously acquired, and the bandwidth requirement of the target link is determined according to the continuously acquired traffic data. The target link is any interconnection link between the CPU and peripheral devices. Determine whether the ASPM power consumption mode of the target link matches the determined bandwidth requirement; If the ASPM power consumption mode does not match the bandwidth requirement, the ASPM power consumption mode is adjusted according to the bandwidth requirement.
2. The power consumption monitoring method according to claim 1, characterized in that, Before continuously acquiring traffic data from the target link, the power consumption monitoring method further includes: Determine whether the devices at both ends of the target link support enabling L1 low-power mode in ASPM power consumption mode; If the L1 low-power mode in ASPM power mode is enabled, then the step of continuously acquiring traffic data of the target link will be performed.
3. The power consumption monitoring method according to claim 1, characterized in that, Before continuously acquiring traffic data from the target link, the power consumption monitoring method further includes: Read the register information of the CPU and peripheral devices, and record the full bandwidth traffic data of the target link.
4. The power consumption monitoring method according to claim 1, characterized in that, Determining the bandwidth requirement of the target link based on continuously acquired traffic data includes: For n consecutive acquisitions of traffic data, if the traffic data acquired each time is greater than the traffic data acquired in the previous acquisition, then the bandwidth requirement of the target link is determined to be an increased bandwidth requirement state, where n is a natural number greater than 1.
5. The power consumption monitoring method according to claim 1 or 4, characterized in that, If the ASPM power consumption mode does not match the bandwidth requirement, adjust the ASPM power consumption mode according to the bandwidth requirement, including: If the ASPM power consumption mode does not match the bandwidth requirement state, then the ASPM power consumption mode is adjusted to working mode L0.
6. The power consumption monitoring method according to claim 1, characterized in that, Determining the bandwidth requirement of the target link based on continuously acquired traffic data includes: For n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is greater than a first threshold, then the bandwidth requirement of the target link is determined to be the full bandwidth requirement, where n is a natural number greater than 1.
7. The power consumption monitoring method according to claim 1 or 6, characterized in that, If the ASPM power consumption mode does not match the bandwidth requirement, adjust the ASPM power consumption mode according to the bandwidth requirement, including: If the ASPM power consumption mode does not match the full bandwidth requirement state, then the ASPM power consumption mode is adjusted to working mode L0.
8. The power consumption monitoring method according to claim 1, characterized in that, Determining the current bandwidth requirement of the target link based on continuously acquired traffic data includes: For traffic data acquired n times consecutively, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than or equal to a first threshold and greater than or equal to a second threshold, then the bandwidth requirement of the target link is determined to be the first low bandwidth requirement, where n is a natural number greater than 1.
9. The power consumption monitoring method according to claim 1 or 8, characterized in that, If the ASPM power consumption mode does not match the bandwidth requirement, adjust the ASPM power consumption mode according to the bandwidth requirement, including: If the ASPM power consumption mode does not match the first low bandwidth requirement state, then the ASPM power consumption mode is adjusted to low power consumption mode L1, and the state of the target link electrical layer is adjusted to low power consumption state P1.
10. The power consumption monitoring method according to claim 1, characterized in that, Determining the current bandwidth requirement of the target link based on continuously acquired traffic data includes: For n consecutive acquisitions of traffic data, if the traffic data acquired each time is equal to the traffic data acquired the previous time, and the ratio of the traffic data acquired each time to the full bandwidth traffic data is less than the second threshold, then the bandwidth requirement of the target link is determined to be the second low bandwidth requirement, where n is a natural number greater than 1.
11. The power consumption monitoring method according to claim 1 or 10, characterized in that, If the ASPM power consumption mode does not match the bandwidth requirement, adjust the ASPM power consumption mode according to the bandwidth requirement, including: If the ASPM power consumption mode does not match the second low bandwidth requirement state, then the ASPM power consumption mode is adjusted to low power consumption mode L1, and the state of the target link electrical layer is adjusted to low power consumption state P2.
12. The power consumption monitoring method according to claim 1, characterized in that, Before continuously determining the traffic status of the target link based on the acquired traffic data, the power consumption monitoring method further includes: The first and second thresholds are dynamically set using an adaptive dynamic thresholding method.
13. The power consumption monitoring method according to claim 12, characterized in that, The method of dynamically setting the first and second thresholds using an adaptive dynamic thresholding approach includes: Based on the acquired traffic data, calculate the first characteristic value MA_short and the second characteristic value SD_short to characterize short-term mobile traffic, and calculate the third characteristic value MA_long to characterize long-term mobile traffic; and The first threshold and the second threshold are dynamically set based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long.
14. The power consumption monitoring method according to claim 13, characterized in that, The step of dynamically setting the first threshold and the second threshold based on the first feature value MA_short, the second feature value SD_short, and the third feature value MA_long includes: Set the larger of (MA_long * K1) and (MA_short - SD_short * K2) to the first threshold; and Set the smaller value between (Full_Bandwidth * Safe_Margin) and (MA_short + SD_short * K3) as the second threshold. Here, Safe_Margin represents the safety margin, Full_Bandwidth represents the traffic data at full bandwidth, and K1, K2, and K3 represent adjustment parameters.
15. A control device, characterized in that, The control device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the power consumption monitoring method according to any one of claims 1-14.
16. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions that cause the machine to perform the power consumption monitoring method according to any one of claims 1-14.