Switch energy consumption monitoring method and system

By constructing a switch energy consumption prediction model and utilizing the real-time transmission rate and energy consumption data of the ports, the problem of insufficient reflection of port energy consumption differences in switch energy consumption monitoring is solved, realizing accurate monitoring and prediction of port energy consumption, and supporting energy efficiency management and fault location.

CN122372452APending Publication Date: 2026-07-10GUANGZHOU MINGCHUANG NETWORK TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU MINGCHUANG NETWORK TECH CO LTD
Filing Date
2026-02-27
Publication Date
2026-07-10

Smart Images

  • Figure CN122372452A_ABST
    Figure CN122372452A_ABST
Patent Text Reader

Abstract

This invention relates to the field of energy consumption monitoring technology, and particularly to a method and system for monitoring the energy consumption of a switch. The method includes: acquiring the switch's configuration information; collecting the real-time transmission rate of the ports; using a power consumption detection module connected to the interface to acquire energy consumption data for each interface and defining it as the true value; establishing a correspondence between the real-time transmission rate and the energy consumption data; configuring the influencing factors of the energy consumption data, wherein the influencing factors include at least: overall load and ambient temperature. This invention, by setting a corresponding deviation factor for each port and correcting the predicted values ​​of fluctuating ports, can adjust the error in the prediction results, further improving prediction accuracy. This provides an important basis for fault warning, performance evaluation, and maintenance decisions, achieving accurate perception and real-time evaluation of the energy consumption status of switch ports, enabling timely detection of energy consumption anomalies and ensuring the stable and continuous operation of network services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of energy consumption monitoring technology, and in particular to a method and system for monitoring the energy consumption of a power switch. Background Technology

[0002] Switch energy consumption monitoring refers to the process of periodically monitoring the electrical energy consumed by network switching equipment during operation. Its main purpose is to understand the overall energy consumption of the switch and its individual components, so as to carry out energy efficiency management, fault diagnosis and energy saving optimization.

[0003] In existing technologies, energy consumption monitoring of switches typically remains at the system-wide level, assessing energy efficiency by monitoring the overall power consumption of the switch. However, this approach has significant limitations. System-wide energy consumption monitoring cannot reflect the actual energy consumption differences of individual ports. In network transmission, the workload, transmission rate, and connected device types of different ports often vary significantly. This means that the system-wide energy consumption figure cannot accurately reflect the power consumption of individual ports, making it difficult to support refined energy efficiency management and optimization strategies. Furthermore, the inability to obtain port-level energy consumption information makes it impossible to quickly locate problematic ports when energy consumption anomalies occur.

[0004] Therefore, "how to obtain real-time energy consumption data for each port in a switch" is the technical problem that this invention aims to solve. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for monitoring the energy consumption of a switch, so as to solve the problem of "how to obtain real-time energy consumption data of each port in a switch" mentioned in the background art.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A method for monitoring the power consumption of a switch, the method comprising:

[0008] Obtain the switch's configuration information, collect the port's real-time transmission rate, use the power consumption detection module connected to the interface to obtain the energy consumption data of each interface, define it as the real value, and establish the correspondence between the real-time transmission rate and the energy consumption data.

[0009] The factors affecting energy consumption data are configured, including at least the overall load and ambient temperature. All corresponding relationships are integrated to generate a training set, and the factors are labeled into the training set to create an energy consumption prediction model. The model is trained using the training set, and model parameters are extracted from the trained energy consumption prediction model, where each port corresponds to a set of model parameters.

[0010] The model parameters corresponding to the port are written into the initialized energy consumption prediction model to generate a local model corresponding to each port. The real-time transmission rate is input into the local model, and the predicted value is output. The actual value and the predicted value are compared to generate several deviation factors. The fluctuation range of the deviation factor for each port is constructed, and the ports are clustered into stable ports and fluctuating ports.

[0011] The predicted energy consumption is obtained by superimposing the predicted values ​​of all ports of the switch. The actual energy consumption of the switch is collected, and the actual energy consumption is compared with the predicted energy consumption to obtain the global deviation. Using the global deviation, the deviation factor of the fluctuating port is adjusted, the predicted value is updated, the predicted value and actual energy consumption of all ports are written into a preset template, a monitoring report is generated, and sent to a preset terminal.

[0012] Furthermore, the steps of obtaining the switch configuration information and collecting the real-time transmission rate of the port include:

[0013] The real-time transmission rate is updated according to a preset frequency;

[0014] Plot a trend graph with time on the horizontal axis and the real-time transmission rate at the corresponding moment on the vertical axis.

[0015] Furthermore, the step of extracting model parameters from the trained energy consumption prediction model includes:

[0016] The model parameters of all ports are weighted and averaged to obtain global coefficients, which are then written into the initialized energy consumption prediction model to generate a global model.

[0017] The total transmission rate of the switch is input into the global model, the predicted energy consumption is output, and the global coefficients are corrected using the actual energy consumption.

[0018] Furthermore, the step of constructing the fluctuation range of the deviation factor for each port and clustering the ports into stationary ports and fluctuating ports includes:

[0019] Select several test times and calculate the deviation factor at each test time;

[0020] The fluctuation range is constructed using the interquartile range algorithm.

[0021] Furthermore, the step of adjusting the deviation factor of the fluctuation port and updating the predicted value using the global deviation includes:

[0022] Based on the predicted value, a steady-state range is set for each port. When the predicted value exceeds the steady-state range, the power consumption detection module's detection task is activated.

[0023] The system acquires the detection results, generates detection events, and uploads them to a preset terminal for storage.

[0024] Furthermore, the method also includes:

[0025] The risk level of each port is configured based on the fluctuation range, wherein the risk level includes at least: high, medium and low;

[0026] Labels generated by risk levels are inserted into the monitoring task, and emergency response rules corresponding to each risk level are established.

[0027] Furthermore, the system includes:

[0028] The acquisition module is used to acquire the switch's configuration information, collect the real-time transmission rate of the port, and use the power consumption detection module connected to the interface to acquire the energy consumption data of each interface and define it as the real value, and establish the correspondence between the real-time transmission rate and the energy consumption data.

[0029] The configuration module is used to configure the influencing factors of energy consumption data, wherein the influencing factors include at least: overall load and ambient temperature, integrate all the corresponding relationships, generate a training set, and label the influencing factors into the training set, create an energy consumption prediction model, train the model using the training set, and extract model parameters from the trained energy consumption prediction model, wherein each port corresponds to a set of model parameters.

[0030] The clustering module is used to write the model parameters corresponding to the port into the initialized energy consumption prediction model, generate a local model corresponding to each port, input the real-time transmission rate into the local model, output the predicted value, compare the actual value and the predicted value, generate several deviation factors, construct the fluctuation range of the deviation factor for each port, and cluster the ports into stable ports and fluctuating ports.

[0031] The writing module is used to overlay the predicted values ​​of all ports of the switch to obtain the predicted energy consumption, collect the actual energy consumption of the switch, compare the actual energy consumption with the predicted energy consumption to obtain the global deviation, use the global deviation to adjust the deviation factor of the fluctuating port, update the predicted value, write the predicted value and actual energy consumption of all ports into a preset template, generate a monitoring report, and send it to a preset terminal.

[0032] Furthermore, the acquisition module includes:

[0033] An update unit is used to update the real-time transmission rate according to a preset frequency;

[0034] The plotting unit is used to draw a trend graph with time as the horizontal axis and the real-time transmission rate at the corresponding moment as the vertical axis.

[0035] Furthermore, the configuration module includes:

[0036] The unit is used to perform a weighted average of the model parameters of all ports to obtain global coefficients, and the global coefficients are written into the initialized energy consumption prediction model to generate a global model.

[0037] The correction unit is used to input the total transmission rate of the switch into the global model, output the predicted energy consumption, and use the actual energy consumption to correct the global coefficients.

[0038] Furthermore, the clustering module includes:

[0039] The calculation unit is used to select several test times and calculate the deviation factor at each test time.

[0040] The building block is used to construct the fluctuation range using the interquartile range algorithm.

[0041] Compared with the prior art, the beneficial effects of the present invention are:

[0042] By collecting real-time transmission rate and energy consumption data for each port, a data foundation can be provided for energy consumption prediction of each port. This allows for precise analysis of port energy consumption trends based on historical operating status and real-time service load changes. By constructing an energy consumption prediction model, the accuracy of energy consumption prediction can be greatly improved. By generating a set of corresponding model parameters for each port, the differences in hardware performance, service type, and usage frequency of different ports can be fully reflected, making the prediction results more consistent with the actual operating status. By setting a corresponding deviation factor for each port and correcting the prediction values ​​of fluctuating ports, the error in the prediction results can be adjusted, further improving the prediction accuracy. This provides an important basis for fault early warning, performance evaluation, and maintenance decisions, enabling precise perception and real-time evaluation of the energy consumption status of switch ports, so as to promptly detect energy consumption anomalies and ensure the stable and continuous operation of network services. Attached Figure Description

[0043] Figure 1 A flowchart illustrating the power consumption monitoring method for switches provided in an embodiment of the present invention;

[0044] Figure 2 This is a first sub-flowchart of the switch power consumption monitoring method provided in an embodiment of the present invention;

[0045] Figure 3 This is a second sub-flowchart of the switch power consumption monitoring method provided in an embodiment of the present invention;

[0046] Figure 4 This is a third sub-flowchart of the switch power consumption monitoring method provided in an embodiment of the present invention;

[0047] Figure 5 This is a fourth sub-flowchart of the switch power consumption monitoring method provided in an embodiment of the present invention;

[0048] Figure 6 This is a block diagram of the power consumption monitoring system for switches provided in an embodiment of the present invention;

[0049] Figure 7 This is a block diagram of the acquisition module in the switch energy consumption monitoring system provided in an embodiment of the present invention;

[0050] Figure 8 This is a block diagram of the configuration module in the switch energy consumption monitoring system provided in an embodiment of the present invention;

[0051] Figure 9 A block diagram of the clustering module in the switch energy consumption monitoring system provided in this embodiment of the invention;

[0052] Figure 10 This is a block diagram of the writing module in the switch energy consumption monitoring system provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0054] In Example 1, Figure 1 The implementation flow of the switch power consumption monitoring method provided in this embodiment of the invention is illustrated below, and is described in detail below:

[0055] S100: Obtains the switch's configuration information, collects the real-time transmission rate of the port, uses the power consumption detection module connected to the interface to obtain the energy consumption data of each interface, defines it as the real value, and establishes the correspondence between the real-time transmission rate and the energy consumption data.

[0056] The system acquires the switch's configuration information, including port type, maximum speed, operating mode, and activation status. It continuously monitors the real-time operating status of each port, periodically collecting its real-time transmission rate. Simultaneously, it connects a power consumption detection module to each interface, linking it to the connection between the port and external devices. This module monitors voltage, current, and power changes during switch operation, determining the power consumption data for each port. The power consumption detection module is only used during the data preparation phase (before determining the deviation factor); it is not connected to the communication link during routine monitoring. The system defines the energy consumption data for each port as the actual value, establishing a correspondence between the port, real-time transmission rate, and energy consumption data.

[0057] S200: Configure the influencing factors of energy consumption data, wherein the influencing factors include at least: overall load and ambient temperature, integrate all the corresponding relationships, generate a training set, and label the influencing factors into the training set, create an energy consumption prediction model, train the model using the training set, and extract the model parameters from the trained energy consumption prediction model, wherein each port corresponds to a set of model parameters.

[0058] Identify the factors that may affect the switch load, i.e., influencing factors. These factors include port usage data and operating modes. Write the port number, type, real-time transmission rate, and energy consumption data into the same form, and label the influencing factors at the corresponding time of the real-time transmission rate in the form. Integrate all the forms to generate a training set. Each sample in the training set should not only contain energy consumption values ​​but also include the corresponding influencing factor features. This ensures that the model can identify the correlation between each influencing factor and energy consumption during the training process, thereby providing a reliable data foundation for subsequent energy consumption prediction, optimization, or anomaly detection.

[0059] A deep learning algorithm is used to build an energy consumption prediction model, which is then trained using a training set. After training, model parameters are extracted from the energy consumption prediction model, including weight coefficients and bias values. Each port's training set will generate a set of model parameters after training.

[0060] S300: Write the model parameters corresponding to the port into the initialized energy consumption prediction model, generate a local model corresponding to each port, input the real-time transmission rate into the local model, output the predicted value, compare the actual value and the predicted value, generate several deviation factors, construct the fluctuation range of the deviation factor for each port, and cluster the ports into stable ports and fluctuating ports.

[0061] In the daily monitoring of switch energy consumption, the ports requiring monitoring are identified, and the model parameters corresponding to these ports are written into the energy consumption prediction model to generate local models. Each port corresponds to a local model, which accurately reflects the energy consumption characteristics of that port. The real-time transmission rate of the port to be monitored is input into the corresponding local model. The local model calculates based on the input real-time transmission rate value, combined with its internal weights, biases, and other parameters, and outputs a predicted value. The predicted value is the estimated energy consumption of the port based on its current real-time transmission rate and calculated by the model. The advantage of this method is that each port can obtain an independent and dynamic energy consumption prediction result, enabling refined monitoring and analysis of the energy consumption of each port of the switch, thereby providing accurate data support for energy consumption optimization, power allocation, and port management.

[0062] S400: Superimpose the predicted values ​​of all ports of the switch to obtain the predicted energy consumption, collect the actual energy consumption of the switch, compare the actual energy consumption with the predicted energy consumption to obtain the global deviation, use the global deviation to adjust the deviation factor of the fluctuating port, update the predicted value, write the predicted value and actual energy consumption of all ports into the preset template, generate a monitoring report, and send it to the preset terminal.

[0063] Each port corresponds to a predicted value. The predicted energy consumption is obtained by superimposing the predicted values ​​for all ports. Using smart meters or other power consumption sensors, the actual energy consumption of the entire switch is collected to obtain the true energy consumption. The superimposed result of the energy consumption predictions output by the local models of each port is compared with the collected true energy consumption of the entire switch. By calculating the difference between the two, a difference value is generated, which is the global deviation. The global deviation reflects the overall prediction error level of the model. Based on the global deviation, targeted adjustments are made to ports with large fluctuations. By modifying the deviation factor of the fluctuating ports, the output results of their prediction models are corrected, and the energy consumption prediction values ​​of each port are updated to be closer to the actual energy consumption. The updated predicted values ​​of the ports to be monitored and the actual energy consumption of the entire switch are written into a preset template to generate a monitoring report, which is then sent to a preset terminal, which refers to the terminal of the switch maintenance personnel.

[0064] In Example 2, Figure 2 The first sub-flowchart of the switch energy consumption monitoring method provided in this embodiment of the invention is shown. The steps of obtaining the switch configuration information and collecting the real-time transmission rate of the port are described in detail below:

[0065] S101: Update the real-time transmission rate according to the preset frequency.

[0066] The real-time transmission rate of each port is updated according to a preset frequency, which can be once per minute.

[0067] S102: Plot a trend graph with time on the horizontal axis and the real-time transmission rate at the corresponding moment on the vertical axis.

[0068] Plot a trend graph with time on the horizontal axis and the real-time transmission rate at that time on the vertical axis. The trend graph can intuitively reflect the load fluctuation of the port in different time periods.

[0069] In Example 3, Figure 3 The second sub-flowchart of the switch energy consumption monitoring method provided in this embodiment of the invention is shown. The following is a detailed description of the step of extracting model parameters from the trained energy consumption prediction model:

[0070] S201: Perform a weighted average of the model parameters for all ports to obtain global coefficients, and write the global coefficients into the initialized energy consumption prediction model to generate a global model.

[0071] A corresponding weight value is set for each port, and the model parameters are weighted and averaged. The resulting average value is defined as the global coefficient. The global coefficient is written into the initialized energy consumption prediction model to obtain the global model, which can reflect the operating characteristics of all ports.

[0072] S202: Input the total transmission rate of the switch into the global model, output the predicted energy consumption, and use the actual energy consumption to correct the global coefficients.

[0073] The total transmission rate is imported as an input variable into the constructed global model. The global model then calculates and outputs the overall predicted energy consumption at the corresponding time point, i.e., the predicted energy consumption, which refers to the energy consumption extrapolated based on the total transmission rate. The actual energy consumption data of the switch at that time point is collected as a reference benchmark. The deviation between the predicted and actual energy consumption is compared and analyzed. Based on the magnitude and trend of the deviation, the global coefficients in the global model are dynamically corrected to continuously approximate the actual operating state. This effectively eliminates the cumulative errors generated during long-term operation and improves the accuracy and stability of the global model.

[0074] In Example 4, Figure 4 The third sub-process flowchart of the switch energy consumption monitoring method provided in this embodiment of the invention is shown. The steps of constructing the fluctuation range of the deviation factor for each port and clustering the ports into stable ports and fluctuating ports are described in detail below:

[0075] S301: Select several test times and calculate the deviation factor at each test time.

[0076] Within a preset time period, select several test times, collect the corresponding predicted and actual values ​​at each test time, and set a deviation factor based on the difference between the two. Then, summarize the deviation factors in chronological order.

[0077] S302: The fluctuation range is constructed using the interquartile range algorithm.

[0078] The deviation factors are sorted in ascending order. By calculating the first quartile, the third quartile, and the difference between them, the concentration range and dispersion of the deviation factors are determined. Based on this, the fluctuation range is constructed. The fluctuation range can be understood as the reasonable deviation between the port prediction value and the actual value under normal operating conditions and stable operation.

[0079] In Example 5, Figure 5 The fourth sub-flowchart of the switch energy consumption monitoring method provided in this embodiment of the invention is shown. The following details the steps of adjusting the deviation factor of the fluctuating port and updating the predicted value using the global deviation:

[0080] S401: Based on the predicted value, set the steady-state range for each port. When the predicted value exceeds the steady-state range, activate the detection task of the power consumption detection module.

[0081] Determine the central range of the predicted values ​​for each port and construct a steady-state range. If the predicted value exceeds the steady-state range, it indicates that the energy consumption of the port exceeds the normal range, and then activate the detection task. The detection task refers to collecting real energy consumption data by connecting a power consumption detection module to the interface and verifying the predicted value.

[0082] S402: Obtain the detection results, generate a detection event, and upload it to the preset terminal for storage.

[0083] The results of the detection task are determined, recorded, and a detection event is generated and uploaded to a preset terminal for storage.

[0084] In Example 6, unlike Example 1, the method further includes:

[0085] The risk level of each port is configured based on the fluctuation range, wherein the risk level includes at least: high, medium and low;

[0086] Labels generated by risk levels are inserted into the monitoring task, and emergency response rules corresponding to each risk level are established.

[0087] Based on the fluctuation range corresponding to each port, the ports are divided into three risk levels: high, medium, and low. After determining the monitoring task, a tag generated by the risk level is inserted into it. The tag can be in the form of a link or a note. A corresponding emergency response rule is set for each risk level. For example, the emergency response rule corresponding to the high risk level can be to limit the port speed to avoid port overheating.

[0088] Figure 6 This diagram illustrates the structural block diagram of a switch energy consumption monitoring system provided in an embodiment of the present invention. The switch energy consumption monitoring system 1 includes:

[0089] The acquisition module 11 is used to acquire the configuration information of the switch, collect the real-time transmission rate of the port, and use the power consumption detection module connected to the interface to acquire the energy consumption data of each interface and define it as the real value, and establish the correspondence between the real-time transmission rate and the energy consumption data.

[0090] Configuration module 12 is used to configure the influencing factors of energy consumption data, wherein the influencing factors include at least: overall load and ambient temperature, integrate all the corresponding relationships, generate a training set, and label the influencing factors into the training set, create an energy consumption prediction model, train the model using the training set, and extract model parameters from the trained energy consumption prediction model, wherein each port corresponds to a set of model parameters;

[0091] Clustering module 13 is used to write the model parameters corresponding to the port into the initialized energy consumption prediction model, generate a local model corresponding to each port, input the real-time transmission rate into the local model, output the predicted value, compare the actual value and the predicted value, generate several deviation factors, construct the fluctuation range of the deviation factor of each port, and cluster the ports into stable ports and fluctuating ports.

[0092] The writing module 14 is used to overlay the predicted values ​​of all ports of the switch to obtain the predicted energy consumption, collect the actual energy consumption of the switch, compare the actual energy consumption with the predicted energy consumption to obtain the global deviation, use the global deviation to adjust the deviation factor of the fluctuating port, update the predicted value, write the predicted value and actual energy consumption of all ports into the preset template, generate a monitoring report, and send it to the preset terminal.

[0093] Figure 7 This diagram illustrates the composition of the acquisition module 11 in the switch energy consumption monitoring system provided in an embodiment of the present invention. The acquisition module 11 includes:

[0094] The update unit 111 is used to update the real-time transmission rate according to a preset frequency;

[0095] The plotting unit 112 is used to plot a trend graph with time as the horizontal axis and the real-time transmission rate at the corresponding moment as the vertical axis.

[0096] Figure 8 This diagram illustrates the structural composition of the configuration module 12 in the switch energy consumption monitoring system provided in an embodiment of the present invention. The configuration module 12 includes:

[0097] Unit 121 is obtained, which is used to perform a weighted average of the model parameters of all ports to obtain global coefficients, and write the global coefficients into the initialized energy consumption prediction model to generate a global model.

[0098] The correction unit 122 is used to input the total transmission rate of the switch into the global model, output the predicted energy consumption, and use the actual energy consumption to correct the global coefficients.

[0099] Figure 9 This diagram illustrates the structural composition of clustering module 13 in the switch energy consumption monitoring system provided in this embodiment of the invention. Clustering module 13 includes:

[0100] The calculation unit 131 is used to select several test times and calculate the deviation factor at each test time.

[0101] Construction unit 132 is used to construct the fluctuation range using the interquartile range algorithm.

[0102] Figure 10 This diagram illustrates the structural composition of the writing module 14 in the switch energy consumption monitoring system provided by an embodiment of the present invention. The writing module 14 includes:

[0103] Activation unit 141 is used to set a steady-state range for each port based on the predicted value, and to activate the detection task of the power consumption detection module when the predicted value exceeds the steady-state range.

[0104] Storage unit 142 is used to acquire detection results, generate detection events, and upload them to a preset terminal for storage.

[0105] The acquisition module 11 is used to complete step S100, the configuration module 12 is used to complete step S200, the clustering module 13 is used to complete step S300, and the writing module 14 is used to complete step S400.

[0106] The update unit 111 is used to complete step S101, and the drawing unit 112 is used to complete step S102;

[0107] The obtaining unit 121 is used to complete step S201, and the correction unit 122 is used to complete step S202;

[0108] The calculation unit 131 is used to complete step S301, and the construction unit 132 is used to complete step S302;

[0109] The activation unit 141 is used to complete step S401, and the storage unit 142 is used to complete step S402.

[0110] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0111] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for monitoring the energy consumption of a switch, characterized in that, The method includes: Obtain the switch's configuration information, collect the port's real-time transmission rate, use the power consumption detection module connected to the interface to obtain the energy consumption data of each interface, define it as the real value, and establish the correspondence between the real-time transmission rate and the energy consumption data. The factors affecting energy consumption data are configured, including at least the overall load and ambient temperature. All corresponding relationships are integrated to generate a training set, and the factors are labeled into the training set to create an energy consumption prediction model. The model is trained using the training set, and model parameters are extracted from the trained energy consumption prediction model, where each port corresponds to a set of model parameters. The model parameters corresponding to the port are written into the initialized energy consumption prediction model to generate a local model corresponding to each port. The real-time transmission rate is input into the local model, and the predicted value is output. The actual value and the predicted value are compared to generate several deviation factors. The fluctuation range of the deviation factor for each port is constructed, and the ports are clustered into stable ports and fluctuating ports. The predicted energy consumption is obtained by superimposing the predicted values ​​of all ports of the switch. The actual energy consumption of the switch is collected, and the actual energy consumption is compared with the predicted energy consumption to obtain the global deviation. Using the global deviation, the deviation factor of the fluctuating port is adjusted, the predicted value is updated, the predicted value and actual energy consumption of all ports are written into a preset template, a monitoring report is generated, and sent to a preset terminal.

2. The switch energy consumption monitoring method according to claim 1, characterized in that, The steps of obtaining the switch configuration information and collecting the real-time transmission rate of the port include: The real-time transmission rate is updated according to a preset frequency; Plot a trend graph with time on the horizontal axis and the real-time transmission rate at the corresponding moment on the vertical axis.

3. The switch energy consumption monitoring method according to claim 1, characterized in that, The step of extracting model parameters from the trained energy consumption prediction model includes: The model parameters of all ports are weighted and averaged to obtain global coefficients, which are then written into the initialized energy consumption prediction model to generate a global model. The total transmission rate of the switch is input into the global model, the predicted energy consumption is output, and the global coefficients are corrected using the actual energy consumption.

4. The switch energy consumption monitoring method according to claim 1, characterized in that, The step of constructing the fluctuation range of the deviation factor for each port and clustering the ports into stationary ports and fluctuating ports includes: Select several test times and calculate the deviation factor at each test time; The fluctuation range is constructed using the interquartile range algorithm.

5. The switch energy consumption monitoring method according to claim 4, characterized in that, The step of adjusting the deviation factor of the fluctuation port and updating the predicted value using the global deviation includes: Based on the predicted value, a steady-state range is set for each port. When the predicted value exceeds the steady-state range, the power consumption detection module's detection task is activated. The system acquires the detection results, generates detection events, and uploads them to a preset terminal for storage.

6. The switch energy consumption monitoring method according to claim 4, characterized in that, The method further includes: The risk level of each port is configured based on the fluctuation range, wherein the risk level includes at least: high, medium and low; Labels generated by risk levels are inserted into the monitoring task, and emergency response rules corresponding to each risk level are established.

7. A power consumption monitoring system for a switch, characterized in that, The system includes: The acquisition module is used to acquire the switch's configuration information, collect the real-time transmission rate of the port, and use the power consumption detection module connected to the interface to acquire the energy consumption data of each interface and define it as the real value, and establish the correspondence between the real-time transmission rate and the energy consumption data. The configuration module is used to configure the influencing factors of energy consumption data, wherein the influencing factors include at least: overall load and ambient temperature, integrate all the corresponding relationships, generate a training set, and label the influencing factors into the training set, create an energy consumption prediction model, train the model using the training set, and extract model parameters from the trained energy consumption prediction model, wherein each port corresponds to a set of model parameters. The clustering module is used to write the model parameters corresponding to the port into the initialized energy consumption prediction model, generate a local model corresponding to each port, input the real-time transmission rate into the local model, output the predicted value, compare the actual value and the predicted value, generate several deviation factors, construct the fluctuation range of the deviation factor for each port, and cluster the ports into stable ports and fluctuating ports. The writing module is used to overlay the predicted values ​​of all ports of the switch to obtain the predicted energy consumption, collect the actual energy consumption of the switch, compare the actual energy consumption with the predicted energy consumption to obtain the global deviation, use the global deviation to adjust the deviation factor of the fluctuating port, update the predicted value, write the predicted value and actual energy consumption of all ports into a preset template, generate a monitoring report, and send it to a preset terminal.

8. The switch energy consumption monitoring system according to claim 7, characterized in that, The acquisition module includes: An update unit is used to update the real-time transmission rate according to a preset frequency; The plotting unit is used to draw a trend graph with time as the horizontal axis and the real-time transmission rate at the corresponding moment as the vertical axis.

9. The switch energy consumption monitoring system according to claim 7, characterized in that, The configuration module includes: The unit is used to perform a weighted average of the model parameters of all ports to obtain global coefficients, and the global coefficients are written into the initialized energy consumption prediction model to generate a global model. The correction unit is used to input the total transmission rate of the switch into the global model, output the predicted energy consumption, and use the actual energy consumption to correct the global coefficients.

10. The switch energy consumption monitoring system according to claim 7, characterized in that, The clustering module includes: The calculation unit is used to select several test times and calculate the deviation factor at each test time. The building block is used to construct the fluctuation range using the interquartile range algorithm.