Power load prediction method and device based on local area network behavior characteristics, equipment and medium
Patent Information
- Application Number
- CN202611104911.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-16
AI Technical Summary
[0002]电力负荷预测是智能电网运行、电力市场交易、需求侧管理以及能源调度的核心基础技术,其中短期负荷预测对电网的实时调度和日前电力市场交易具有最直接的应用价值;现有的短期负荷预测方法中,基于统计学的时间序列方法仅依赖历史负荷的自相关性进行外推,无法纳入外部影响因素,基于传统机器学习的方法虽引入了时间特征、气象特征和历史负荷滞后项作为输入,上述方法所依赖的输入特征本质上均为人类用电行为的间接、宏观、模糊的投影,而非对驱动用电变化的底层人类活动本身的直接观测
[0015]The beneficial effects of this application are as follows: This application collects the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; through a scale-invariant feature engine, based on the ratio of the number of active devices in the current moment in the device connection status to the size of the historical cumulative device pool of the local area network, an overall occupancy rate representing the degree of personnel presence in the target power consumption unit is generated; based on the category of each network terminal device in the active device set, a device type composition ratio vector representing the type of personnel activity is generated; and based on the network traffic statistics and... The ratio of the number of active devices generates the per capita flow intensity, which characterizes the intensity of human activity. The overall occupancy rate, the device type composition ratio vector, and the per capita flow intensity are concatenated to obtain scale-invariant features independent of the size of the electricity consumption unit. Based on the scale-invariant features, external auxiliary features are fused to construct the current scene feature vector. The external auxiliary features include time-coded features, current meteorological features, and historical power load features. The current scene feature vector and future meteorological features are input into the target prediction model, and the power load prediction results for multiple future time periods are output. The training set of the target prediction model is the training samples in the historical scene feature vector.Therefore, this application obtains two types of raw network metadata—device connection status and network traffic statistics—by bypassing the network access device. This eliminates the need to deploy dedicated hardware such as sensors within the target power consumption unit to obtain observational inputs about human activity, thus reducing deployment costs without increasing the amount of dedicated sensing hardware. Furthermore, the collected metadata is only device-level and does not involve specific communication content, resulting in low privacy intrusion. The scale-invariant feature engine generates overall occupancy based on the ratio of the number of active devices to the historical cumulative device pool size, generates a device type composition ratio vector based on the active device category, and generates per capita traffic intensity based on the ratio of network traffic to the number of active devices. These three features directly observe human activities driving changes in electricity consumption from three dimensions: whether there are people and how many people are there, what type of activity they are engaging in, and the intensity of their activity. Compared to binary signals that only reflect whether people are present, this approach can further distinguish scenarios where the number of people present is the same but their electricity consumption characteristics differ significantly, thereby improving the accuracy of the load forecasting model in predicting load peaks and trends determined by real-time human activity. Due to the above three types of features... All values are expressed as ratios or proportions, and their semantics remain unchanged regardless of the total number of devices or the physical scale of the local area network within the target power unit. This allows the target prediction model trained based on these features to be transferred and reused between power units of different sizes, eliminating the need to re-collect large amounts of data and train the model from scratch for each newly connected power unit. This reduces the cost of large-scale deployment of this method across different power units. By concatenating scale-invariant features with time-coded features, current meteorological features, and historical power load features to form a current scene feature vector, which is then input into the target prediction model, the model is supplemented with direct observation features reflecting the degree of human presence, activity type, and activity intensity, in addition to the original indirect features such as time, meteorology, and historical load. This helps improve the accuracy of power load prediction results across multiple time periods. Furthermore, since the training samples of the target prediction model are historical scene feature vectors, the training process only relies on historical power load data and historical local area network metadata to construct training samples. There is no need for manual annotation of human activities or equipment usage, thus reducing the amount of data preparation work before model training.
Smart Images

Figure CN122931678A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power load forecasting and smart grid technology, and particularly to power load forecasting methods, devices, equipment and media based on local area network behavior characteristics. Background Technology
[0002] Electricity load forecasting is a core foundational technology for smart grid operation, electricity market trading, demand-side management, and energy dispatch. Among these, short-term load forecasting has the most direct application value for real-time grid dispatching and day-ahead electricity market trading. Existing short-term load forecasting methods, such as statistical time series methods, rely solely on the autocorrelation of historical loads for extrapolation and cannot incorporate external influencing factors. While traditional machine learning methods introduce time features, meteorological features, and historical load lag terms as inputs, the input features relied upon by these methods are essentially indirect, macroscopic, and fuzzy projections of human electricity consumption behavior, rather than direct observations of the underlying human activities that drive changes in electricity consumption.
[0003] Currently, dedicated hardware such as infrared human body sensors and CO2 concentration sensors are deployed in target buildings to collect personnel presence signals and use them as additional features to be input into prediction models from traditional feature sets. However, the presence signals provided by this type of dedicated sensor solution can only answer whether there are people in the target power consumption unit, but cannot answer how many people are there, what type of activity they are engaged in, or the intensity of the activity. For example, this solution cannot distinguish between two scenarios where the number of people present is different but the presence signals and power consumption characteristics are completely different, such as a person reading quietly and multiple people having a video conference at the same time. This causes the prediction model to show a significant decrease in prediction accuracy when faced with power consumption behavior determined by real-time personnel activities. At the same time, dedicated sensor solutions also have the problem of high deployment costs. At least one sensor needs to be deployed in each room, and multi-story buildings often require hundreds of sensors. Infrared sensors have limited coverage, are easily affected by obstructions, and need to be densely deployed. Long-term use of sensors also leads to aging and drift issues, resulting in continuously increasing maintenance costs. In residential and other scenarios, users have a low acceptance of this type of dedicated monitoring equipment.
[0004] In summary, how to directly observe human activities without deploying dedicated sensing hardware to make more accurate power load forecasts is a problem that needs to be solved in this field. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for power load forecasting based on local area network (LAN) behavioral characteristics, enabling more accurate power load forecasting by directly observing human activity without deploying dedicated sensing hardware. The specific solution is as follows: In a first aspect, this application discloses a power load forecasting method based on local area network (LAN) behavioral characteristics, comprising: The network raw metadata of the local area network corresponding to the target power consumption unit is collected through the network access device in the target power consumption unit; wherein, the network raw metadata includes the device connection status and network traffic statistics within the target power consumption unit; Using a scale-invariant feature engine, an overall occupancy rate representing the presence of people in the target power consumption unit is generated based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network. A device type composition ratio vector representing the type of personnel activity is generated based on the category of each network terminal device in the active device set. An average traffic intensity representing the intensity of personnel activity is generated based on the ratio of the network traffic statistics to the number of active devices. The overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity are concatenated to obtain scale-invariant features that are independent of the size of the power consumption unit. The current scene feature vector is constructed by fusing external auxiliary features with the scale-invariant features; wherein, the external auxiliary features include time-coded features, current meteorological features, and historical power load features; The current scene feature vector and future meteorological features are input into the target prediction model, and the power load prediction results for multiple future time periods are output; wherein, the training set of the target prediction model is the training samples in the historical scene feature vector.
[0006] Optionally, the step of collecting the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit includes: The DHCP lease table and ARP cache table of the network access device in the target power unit are periodically monitored to obtain the original record of the connection status of each network terminal device in the local area network. The original connection status records are processed by extracting device identifiers and deduplicating them to obtain a historical cumulative device pool. The historical cumulative device pool is used to record the device identifiers and device categories, first access times, and last active times of each network terminal device that has previously accessed the local area network. The active status is screened based on the active entries in the ARP cache table and / or the unexpired lease records in the DHCP lease table at the current moment to obtain the set of active devices at the current moment, and the historical cumulative device pool and the set of active devices at the current moment are determined as the device connection status; All networked terminal devices within the local area network are classified using a multi-dimensional local area network device type identification method to obtain a set of device categories; wherein, the multi-dimensional local area network device type identification method includes any one or more of the following methods: identifier rule matching method, traffic behavior machine learning identification method, local area network broadcast information parsing method, and multi-source data fusion discrimination method; The SNMP interface counter of the network access device is read and / or the NetFlow or sFlow traffic data passing through the network access device is collected to obtain the raw traffic count value of the WAN interface of the network access device. The original traffic count value is differentially statistically analyzed according to a preset collection period to obtain the total uplink traffic and total downlink traffic in each collection period, and the total uplink traffic and the total downlink traffic are determined as the network traffic statistics data.
[0007] Optionally, the step of generating a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set, and generating an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices, includes: Based on the set of device categories, each network terminal device in the active device set is divided into an active device subset under each device category, and a target ratio between the number of each active device subset and the number of the active device set is obtained. The vector formed based on each target ratio is determined as the device type composition ratio vector representing the type of personnel activity. The sum of the total uplink traffic and the total downlink traffic is obtained, and the ratio between the sum of the traffic and the number of active devices is determined as the per capita traffic intensity, which characterizes the intensity of human activity.
[0008] Optionally, the power load forecasting method based on local area network behavior characteristics further includes: For the network access device with deep packet inspection or TLS handshake parsing capabilities, extract the SNI identifier in the TLS handshake message or query the ASN database based on the traffic destination IP to obtain each network destination; Calculate the traffic percentage corresponding to each of the network destinations to obtain traffic destination distribution data; Accordingly, the step of concatenating the overall occupancy rate, the ratio vector of the equipment type, and the per capita flow intensity to obtain scale-invariant features independent of the size of the electricity-consuming unit includes: The network activity entropy is obtained based on the traffic destination distribution data and the information entropy formula; wherein, the network activity entropy is used to characterize the degree of dispersion of local area network traffic access destinations; The overall occupancy rate, the device type composition ratio vector, the per capita traffic intensity, and the network activity entropy are concatenated to obtain scale-invariant features that are independent of the size of the power consumption unit.
[0009] Optionally, the step of collecting the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit includes: By using firmware or plugins deployed on the network access device in the target power unit, or by deploying a data acquisition program on an edge probe device connected to the network access device, the original network metadata of the local area network corresponding to the target power unit is collected in a bypass monitoring manner. Alternatively, by calling the application programming interface (API) provided by the network access device in the target power consumption unit, the system can actively query the network access device to collect the original network metadata of the local area network corresponding to the target power consumption unit; wherein, the API includes the system bus interface or the representational state transition interface provided by the router operating system; Alternatively, the network access devices in the target power consumption unit can be periodically polled via the SNMP protocol to collect the original network metadata of the local area network corresponding to the target power consumption unit. Alternatively, the network metadata of the local area network corresponding to the target power consumption unit can be actively collected through an agent program deployed on the network access device in the target power consumption unit.
[0010] Optionally, the step of constructing the current scene feature vector based on the scale-invariant features and external auxiliary features includes: A preset review window is set, and sliding window operations are performed on each of the scale-invariant features to obtain sliding window statistics; wherein, the sliding window statistics include mean, standard deviation, maximum value, and minimum value; The difference between adjacent time steps is calculated for each scale-invariant feature to obtain the corresponding temporal gradient, and the sliding window statistics are combined with the temporal gradient to generate dynamic derived features; The external auxiliary features are normalized or standardized to obtain the external auxiliary features after dimension elimination. The scale-invariant features, the dynamically derived features, and the external auxiliary features after dimension elimination are fused to construct the current scene feature vector.
[0011] Optionally, the power load forecasting method based on local area network behavior characteristics further includes: The test samples in the historical scene feature vector are determined as the test set of the target prediction model, and the SHAP value corresponding to each feature in each test sample is obtained based on the contribution of each feature in the test set to the power load prediction result. The absolute values of the SHAP values of the test samples under the same feature are averaged to obtain the importance of each feature. The importance is then sorted in descending order of numerical value to obtain the global feature importance ranking. The global feature importance ranking is used to characterize the overall contribution of each feature to the power load prediction results under different scenario dimensions. The power load prediction result output by the target prediction model each time is decomposed into the sum of the baseline prediction value and the SHAP value of each feature to obtain the local attribution result of each power load prediction result; wherein, the baseline prediction value is the average prediction value of the target prediction model on the training samples. Based on the global feature importance ranking and / or the local attribution results, a causal explanation report is generated to characterize the scenario factors driving the power load prediction results, and a differentiated equipment linkage control strategy is generated based on the causal explanation report.
[0012] Secondly, this application discloses a power load forecasting device based on local area network behavior characteristics, comprising: The metadata acquisition module is used to acquire the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; The feature generation module is used to generate an overall occupancy rate representing the presence of people in the target power consumption unit based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network, using a scale-invariant feature engine; generate a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set; and generate an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices. The feature splicing module is used to splice the overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity to obtain scale-invariant features that are independent of the size of the power consumption unit. The vector construction module is used to construct a current scene feature vector based on the scale-invariant features and external auxiliary features; wherein, the external auxiliary features include time-encoding features, current weather features, and historical power load features; The load forecasting module is used to input the current scene feature vector and future meteorological features into the target forecasting model and output the power load forecast results for multiple future time periods; wherein, the training set of the target forecasting model is the training samples in the historical scene feature vector.
[0013] Thirdly, this application discloses an electronic device, comprising: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the aforementioned disclosed power load forecasting method based on local area network behavioral characteristics.
[0014] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed power load forecasting method based on local area network behavior characteristics.
[0015] The beneficial effects of this application are as follows: This application collects the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; through a scale-invariant feature engine, based on the ratio of the number of active devices in the current moment in the device connection status to the size of the historical cumulative device pool of the local area network, an overall occupancy rate representing the degree of personnel presence in the target power consumption unit is generated; based on the category of each network terminal device in the active device set, a device type composition ratio vector representing the type of personnel activity is generated; and based on the network traffic statistics and... The ratio of the number of active devices generates the per capita flow intensity, which characterizes the intensity of human activity. The overall occupancy rate, the device type composition ratio vector, and the per capita flow intensity are concatenated to obtain scale-invariant features independent of the size of the electricity consumption unit. Based on the scale-invariant features, external auxiliary features are fused to construct the current scene feature vector. The external auxiliary features include time-coded features, current meteorological features, and historical power load features. The current scene feature vector and future meteorological features are input into the target prediction model, and the power load prediction results for multiple future time periods are output. The training set of the target prediction model is the training samples in the historical scene feature vector.Therefore, this application obtains two types of raw network metadata—device connection status and network traffic statistics—by bypassing the network access device. This eliminates the need to deploy dedicated hardware such as sensors within the target power consumption unit to obtain observational inputs about human activity, thus reducing deployment costs without increasing the amount of dedicated sensing hardware. Furthermore, the collected metadata is only device-level and does not involve specific communication content, resulting in low privacy intrusion. The scale-invariant feature engine generates overall occupancy based on the ratio of the number of active devices to the historical cumulative device pool size, generates a device type composition ratio vector based on the active device category, and generates per capita traffic intensity based on the ratio of network traffic to the number of active devices. These three features directly observe human activities driving changes in electricity consumption from three dimensions: whether there are people and how many people are there, what type of activity they are engaging in, and the intensity of their activity. Compared to binary signals that only reflect whether people are present, this approach can further distinguish scenarios where the number of people present is the same but their electricity consumption characteristics differ significantly, thereby improving the accuracy of the load forecasting model in predicting load peaks and trends determined by real-time human activity. Due to the above three types of features... All values are expressed as ratios or proportions, and their semantics remain unchanged regardless of the total number of devices or the physical scale of the local area network within the target power unit. This allows the target prediction model trained based on these features to be transferred and reused between power units of different sizes, eliminating the need to re-collect large amounts of data and train the model from scratch for each newly connected power unit. This reduces the cost of large-scale deployment of this method across different power units. By concatenating scale-invariant features with time-coded features, current meteorological features, and historical power load features to form a current scene feature vector, which is then input into the target prediction model, the model is supplemented with direct observation features reflecting the degree of human presence, activity type, and activity intensity, in addition to the original indirect features such as time, meteorology, and historical load. This helps improve the accuracy of power load prediction results across multiple time periods. Furthermore, since the training samples of the target prediction model are historical scene feature vectors, the training process only relies on historical power load data and historical local area network metadata to construct training samples. There is no need for manual annotation of human activities or equipment usage, thus reducing the amount of data preparation work before model training. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a flowchart of a power load forecasting method based on local area network behavior characteristics disclosed in this application; Figure 2 This is a specific data acquisition timing diagram disclosed in this application; Figure 3 This is a flowchart of a specific power load forecasting method disclosed in this application; Figure 4 This application discloses a specific SHAP attribution analysis flowchart; Figure 5 This application discloses a specific system architecture diagram; Figure 6 This is a schematic diagram of the structure of a power load forecasting device based on local area network behavior characteristics disclosed in this application; Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0018] 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 the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] Electricity load forecasting is a core foundational technology for smart grid operation, electricity market trading, demand-side management, and energy dispatch. Among these, short-term load forecasting has the most direct application value for real-time grid dispatching and day-ahead electricity market trading. Existing short-term load forecasting methods, such as statistical time series methods, rely solely on the autocorrelation of historical loads for extrapolation and cannot incorporate external influencing factors. While traditional machine learning methods introduce time features, meteorological features, and historical load lag terms as inputs, the input features relied upon by these methods are essentially indirect, macroscopic, and fuzzy projections of human electricity consumption behavior, rather than direct observations of the underlying human activities that drive changes in electricity consumption.
[0020] Currently, dedicated hardware such as infrared human body sensors and CO2 concentration sensors are deployed in target buildings to collect personnel presence signals and use them as additional features to be input into prediction models from traditional feature sets. However, the presence signals provided by this type of dedicated sensor solution can only answer whether there are people in the target power consumption unit, but cannot answer how many people are there, what type of activity they are engaged in, or the intensity of the activity. For example, this solution cannot distinguish between two scenarios where the number of people present is different but the presence signals and power consumption characteristics are completely different, such as a person reading quietly and multiple people having a video conference at the same time. This causes the prediction model to show a significant decrease in prediction accuracy when faced with power consumption behavior determined by real-time personnel activities. At the same time, dedicated sensor solutions also have the problem of high deployment costs. At least one sensor needs to be deployed in each room, and multi-story buildings often require hundreds of sensors. Infrared sensors have limited coverage, are easily affected by obstructions, and need to be densely deployed. Long-term use of sensors also leads to aging and drift issues, resulting in continuously increasing maintenance costs. In residential and other scenarios, users have a low acceptance of this type of dedicated monitoring equipment.
[0021] Therefore, this application provides a power load forecasting scheme based on local area network behavior characteristics, which directly observes personnel activities to make more accurate power load forecasts without deploying dedicated sensing hardware.
[0022] See Figure 1 As shown in the figure, this application discloses a power load forecasting method based on local area network behavior characteristics, including: Step S11: Collect the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit.
[0023] The power load forecasting system includes a data acquisition module, which collects the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; the network access device can be a local area network router.
[0024] In this embodiment, the step of collecting the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit includes: collecting the original network metadata of the local area network corresponding to the target power consumption unit through firmware or plugins deployed on the network access device in the target power consumption unit, or through a data acquisition program deployed on an edge probe device connected to the network access device, in a bypass monitoring manner; or, actively querying the network access device by calling the application programming interface provided by the network access device in the target power consumption unit to collect the original network metadata of the local area network corresponding to the target power consumption unit; wherein, the application programming interface includes a system bus interface or a representational state transition interface provided by the router operating system; or, periodically polling the network access device in the target power consumption unit through the SNMP protocol to collect the original network metadata of the local area network corresponding to the target power consumption unit; or, actively collecting the original network metadata of the local area network corresponding to the target power consumption unit through an agent program deployed on the network access device in the target power consumption unit.
[0025] In a specific embodiment of the first data collection method, the data collection module can be deployed within the customized firmware or plugins of the network access device, or as a supporting independent lightweight edge probe device. It uses a bypass monitoring mode to collect raw network metadata. This collection process does not modify, intercept, or interfere with the original normal network communication of the local area network, and it performs collection operations periodically at a customizable fixed time interval Δt, with a recommended sampling interval of 1 to 15 minutes. The collection process only parses the OSI (Open Systems Interconnection) layer 2 to 4 network packet headers and the publicly exposed SNI (Server Name Indication) identifier in the TLS (Transport Layer Security) handshake, filtering and discarding application layer service payloads. MAC (Media Access Control) and IP (Internet Protocol) addresses are de-identified by one-way hashing at the edge, ensuring that user privacy and communication plaintext are not obtained throughout the entire process.
[0026] In a specific embodiment of the second data acquisition method, the data acquisition module can actively pull raw network metadata by calling the program interface opened by the network access device. The compatible interfaces include the ubus system bus interface built into routing systems such as OpenWrt and the general REST (Representational State Transfer) interface. The device will actively initiate a state query request to the router through interface commands to obtain the required raw network metadata. This method does not require continuous bypass listening to network traffic and is compatible with the deployment environment of the router firmware's open interface.
[0027] In the third specific embodiment of data collection, the data collection module can also use the SNMP (Simple Network Management Protocol) to complete periodic polling collection. The device sends SNMP query commands to the network access device according to the set period to read the router's built-in traffic and device connection counter data, thereby summarizing the original network metadata. This solution is based on a general network management protocol and is compatible with commercial and home router devices that support SNMP network management functions.
[0028] In the fourth specific implementation of the data collection method, a terminal agent reporting scheme can be selected in enterprise scenarios. Lightweight agent software is installed on each network terminal in the local area network. The terminal agent actively collects relevant data of the local network and reports it in a unified manner. The data is then aggregated to form the original metadata of the entire local area network and given to the data collection module. This collection path replaces the unified collection on the gateway side with active reporting by the terminal, which is suitable for enterprise office local area networks with a large number of terminal devices and limited computing power of the gateway.
[0029] In this embodiment, the step of collecting the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit includes: periodically monitoring the DHCP lease table and ARP cache table of the network access device in the target power consumption unit to obtain the original connection status records of each network terminal device in the local area network; extracting and deduplicating the device identifiers from the original connection status records to obtain a historical cumulative device pool; wherein, the historical cumulative device pool is used to record the device identifiers and device categories, first access time, and last active time of each network terminal device that has previously accessed the local area network; screening the active status based on the active entries in the ARP cache table and / or the unexpired lease records in the DHCP lease table at the current moment to obtain the set of active devices at the current moment; and combining the historical cumulative device pool with the active devices at the current moment. The set is determined as the device connection status; all networked terminal devices in the local area network are classified using a multi-dimensional LAN device type identification method to obtain a device category set; wherein, the multi-dimensional LAN device type identification method includes any one or more of the following methods: identifier rule matching method, traffic behavior machine learning identification method, LAN broadcast information parsing method, and multi-source data fusion discrimination method; the SNMP interface counter of the network access device is read and / or the NetFlow or sFlow traffic data passing through the network access device is collected to obtain the raw traffic count value of the WAN interface of the network access device; the raw traffic count value is differentially statistically analyzed according to a preset collection period to obtain the total uplink traffic and total downlink traffic in each collection period, and the total uplink traffic and the total downlink traffic are determined as the network traffic statistics data.
[0030] When collecting raw metadata about device connection status, the data acquisition module periodically monitors the DHCP (Dynamic Host Configuration Protocol) lease table and ARP (Address Resolution Protocol) cache table of the network access device to obtain the raw connection records of the terminal device. It then extracts the device identifier, removes duplicates, and updates the record, building a historical cumulative device pool that stores the device identifier, device type, first access time, and last active time. The size of the equipment pool is denoted as .
[0031] Then, by screening active ARP cache entries and unexpired DHCP leases, the set of currently active devices is extracted. and their quantity The historical cumulative device pool and its size, and the current active device set and its quantity together constitute the device connection status.
[0032] A multi-dimensional LAN device type identification method is used to classify all networked terminal devices within the LAN to obtain a set of device categories. The device categories include mobile phones, computers, tablets, TVs, game consoles, IoT devices, and other categories.
[0033] When collecting raw metadata for network traffic statistics, the router's SNMP interface counter is read, or NetFlow and sFlow flow data are collected to obtain the raw WAN traffic count value. The traffic count value is differentially calculated according to a fixed collection period to calculate the total uplink traffic of the WAN port within each period. Total downlink traffic The two types of traffic data will be used as the final network traffic statistics.
[0034] It's important to note that device category sets can be obtained through four different dimensions. The system employs multi-dimensional identification methods to classify all connected terminals on the local area network and generate standardized device category sets. The first method is identifier rule matching, specifically based on heuristic rules using MAC address OUI (Organizationally Unique Identifier) prefixes and DHCP hostname keywords to determine devices and categorize them into a predefined device category set. The second method is traffic behavior machine learning identification, which trains a supervised classifier by extracting behavioral features such as packet size, transmission / reception intervals, and flow duration, and uses the trained classifier to identify the device type of each device, thus categorizing them into a predefined device category set. This effectively handles scenarios with randomized MAC addresses. The third method is local area network broadcast information parsing, which uses captured mDNS and SSDP (Simple Service Provider Interface) data. The Discovery Protocol (Simple Service Discovery Protocol) broadcasts device service information to identify device models and types; the fourth method is a multi-source data fusion judgment method, which uses weighted voting to fuse the aforementioned OUI identifiers, traffic behavior, and broadcast information multiple identification results to output the judgment result. In actual deployment, any identification method can be selected individually, or multiple methods can be combined and used to ultimately classify a complete set of device categories including mobile phones, computers, tablets, TVs, game consoles, IoT devices and other devices.
[0035] Furthermore, this embodiment also includes: for the network access device with deep packet inspection or TLS handshake parsing capabilities, extracting the SNI identifier in the TLS handshake message or querying the ASN database based on the traffic target IP to obtain each network destination; calculating the traffic proportion corresponding to each network destination to obtain traffic destination distribution data.
[0036] For network access devices equipped with deep packet inspection capabilities or supporting TLS (Transport Layer Security) handshake parsing, the system expands the collection of traffic destination distribution auxiliary data during the raw network metadata collection phase. During this process, the TLS handshake messages transmitted by the device are first parsed to extract the SNI identifier contained within the messages. Alternatively, the ASN (Autonomous System Number) database can be retrieved based on the traffic destination IP address corresponding to the data packet. Using both methods, M network destinations are identified. Then, the traffic volume flowing to each network destination is statistically analyzed, and the proportion of traffic to each destination in the total traffic is calculated. The total traffic percentage satisfies the constraint that the sum is 1 and each individual value is greater than or equal to 0. That is, the constraint is... , This process aggregates the traffic percentage results for all destinations to form complete traffic destination distribution data. This type of data can serve as the basis for calculating the entropy of extended feature network activities. Routers that do not have the corresponding parsing capabilities can omit this collection process without affecting the normal operation of the system's core functions.
[0037] For example Figure 2 As shown, within each collection cycle, the above-mentioned network raw metadata collection operations are executed in parallel. The results are timestamped and written to local storage, and can be selectively uploaded to the cloud in real time.
[0038] It should be noted that the data acquisition module in this embodiment only extracts packet header state metadata and the publicly available SNI identifier during the TLS handshake phase from OSI layers 2 to 4 of the network protocol, strictly filtering and discarding the application layer (Layer 7) payload content. Simultaneously, the collected MAC addresses and IP addresses undergo one-way hash de-identification processing on the edge device side before entering SIFE (Scale Invariant Feature Engine) feature calculation. The entire system and method do not involve or access any user's personal privacy information or specific communication content.
[0039] Step S12: Using a scale-invariant feature engine, generate an overall occupancy rate representing the presence of people in the target power consumption unit based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network. Generate a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set. Generate an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices.
[0040] The system also includes a Scale Invariant Feature Engine (SIFE). The raw network metadata output by the data acquisition module is raw, absolute data. The SIFE transforms this raw metadata into Scale Invariant Features (SIFs) that are independent of the physical scale of the power consumption units. Scale invariance means that the feature values and semantics do not change with the physical scale of the power consumption units, regardless of... Whether it's 10 (homes) or 1000 (offices), an occupancy rate of 0.8 means "approximately 80% of devices are active," with completely consistent semantics. This fundamentally solves the scale trap, allowing a model trained in one scene to be directly transferred to scenes of different scales.
[0041] The overall occupancy rate, representing the presence of people in the target power consumption unit, is generated based on the ratio of the number of active devices in the current device connection status to the size of the historical cumulative device pool of the local area network. The specific formula is as follows: ; In the formula, Indicates time Current number of active devices Indicates the historical cumulative size of the equipment pool. Indicates the overall occupancy rate, with values ranging from [value missing]. , dimensionless.
[0042] This feature reflects the current occupancy level of cyberspace. Since each person has at least one networked device in modern life, the network device occupancy rate is highly positively correlated with the person's presence rate, and is the most direct causal factor driving changes in electricity load.
[0043] It is understandable that the boundary condition is: hour .when When a new device appears for the first time but the device pool has not yet been updated, the new device is synchronously added to the device pool and updated. ,make sure During the initialization phase of system deployment (e.g., the previous week, when the historical device pool has not yet fully converged), preset scenario scale prior parameters (such as estimated building workstations and household resident population) are used as the initial parameters. Alternatively, the maximum number of active devices within a sliding time window (such as the past 24 hours) can be used as the denominator, and as time goes by and data accumulates, the number can be smoothly transitioned to the actual cumulative device pool size, thereby ensuring the robustness of feature calculation in the cold start phase.
[0044] In this embodiment, the step of generating a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set, and generating an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices, includes: dividing each network terminal device in the active device set into active device subsets under each device category based on the device category set, obtaining a target ratio between the number of each active device subset and the number of active devices, and determining the vector formed based on each target ratio as the device type composition ratio vector representing the type of personnel activity; obtaining the total uplink traffic and the total downlink traffic, and determining the ratio between the total traffic and the number of active devices as the average traffic intensity representing the intensity of personnel activity.
[0045] Based on the already defined set of device categories, all network terminals within the current active device set are categorized and split to obtain active device subsets belonging to mobile phones, computers, tablets, TVs, game consoles, IoT devices, and other categories. The target ratio of the number of active device subsets in each category to the total number of all active devices is calculated. The target ratios corresponding to all categories are then combined sequentially to form a device type ratio vector, as shown in the following formula: ; In the formula, yes dimensional vector, when When the sum of all elements is 1, the value is... Dimensionless. This feature describes the functional composition of currently active devices and infers the type of activity: a high PC percentage suggests office activities (corresponding to high-power office equipment); a high TV / game_console percentage suggests entertainment activities; and a high phone percentage suggests light activity or rest. When all elements of the vector are set to 0, the vector can intuitively represent the activity type of the person in the local area network. When there is no active device, all elements of the vector are set to zero.
[0046] Simultaneously, the total uplink and downlink traffic of the router within the collection period are extracted and added together to obtain the total traffic. This total traffic is then divided by the number of devices in the current active device set to calculate the average traffic intensity per person. The specific formula is as follows: ; In the formula, This is the average traffic intensity per user, expressed in bytes per device, and is a non-negative real number. This feature reflects the average network data exchange intensity per active device. High average traffic per user corresponds to high-intensity digital activities (video conferencing, high-definition streaming media, file downloads, etc.), which consume power and also indicate high-power operation of associated devices. The original total traffic is an absolute quantity strongly correlated with the number of devices; dividing it by the number of active devices eliminates the influence of scale, making it a standardized indicator independent of the scale of the scenario. hour .
[0047] Step S13: Concatenate the overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity to obtain scale-invariant features that are independent of the size of the power consumption unit.
[0048] Understandably, if destination distribution data for traffic is not available, then the overall occupancy rate, the ratio vector of device types, and the average traffic intensity per person are concatenated to obtain scale-invariant features independent of the size of the electricity consumption unit. The specific formula is as follows: ; Core Feature Dimensions .
[0049] In this embodiment, the step of concatenating the overall occupancy rate, the device type composition ratio vector, and the average traffic intensity per person to obtain scale-invariant features independent of the size of the power consumption unit includes: obtaining network activity entropy based on the traffic destination distribution data and the information entropy formula; wherein, the network activity entropy is used to characterize the dispersion of local area network traffic access destinations; and concatenating the overall occupancy rate, the device type composition ratio vector, the average traffic intensity per person, and the network activity entropy to obtain scale-invariant features independent of the size of the power consumption unit.
[0050] If traffic destination distribution data is obtained, then network activity entropy is obtained based on the traffic destination distribution data and the information entropy formula. Then, the overall occupancy rate, the ratio vector of equipment types, the average traffic intensity per person, and the network activity entropy are concatenated to obtain scale-invariant features that are independent of the size of the power consumption unit.
[0051] The formula for information entropy is: ; in, For the flow to the first The proportion of traffic to a single destination in the total traffic. A high entropy value indicates highly dispersed and diverse network activities (such as multiple people performing different tasks simultaneously in an office), while a low entropy value indicates concentrated and singular activities (such as the whole family watching the same video together).
[0052] Network activity entropy is based on the relative distribution of traffic rather than absolute values. After its inclusion, the SIFE output dimension increases from... Increase to This feature can enhance the theoretical performance ceiling and interpretive depth of the model. However, this feature depends on the reliability of SNI extraction or ASN mapping, and may be unreliable in routers that do not support DPI or in scenarios where encrypted SNI is widely deployed in future TLS protocols. In embodiments that do not meet the above conditions, this feature can be omitted, and the system can still operate normally based on the three core features.
[0053] Step S14: Construct the current scene feature vector by fusing external auxiliary features with the scale-invariant features; wherein, the external auxiliary features include time-coded features, current meteorological features, and historical power load features.
[0054] In this embodiment, the step of constructing the current scene feature vector based on the fusion of scale-invariant features and external auxiliary features includes: setting a preset review window; performing sliding window operations on each of the scale-invariant features to obtain sliding window statistics; wherein the sliding window statistics include mean, standard deviation, maximum value, and minimum value; calculating the difference between adjacent time points for each of the scale-invariant features to obtain the corresponding temporal gradient, and combining each of the sliding window statistics with the temporal gradient to generate dynamic derived features; normalizing or standardizing the external auxiliary features to obtain dimensionless external auxiliary features; and fusing the scale-invariant features, the dynamic derived features, and the dimensionless external auxiliary features to construct the current scene feature vector.
[0055] When constructing the current scene feature vector within the dynamic scene encoder, a fixed preset playback window is first set. For each scale-invariant feature, a sliding window operation is performed to obtain four types of sliding window statistics: mean, standard deviation, maximum, and minimum. Then, the difference between the current time step and the previous time step for each scale-invariant feature is calculated as the corresponding time gradient. This method integrates all sliding window statistics with time gradients to generate dynamic derived features, thereby capturing the dynamic trends of electricity consumption scenarios over time. The sliding window mean smooths short-term fluctuations and reflects recent average levels, while the standard deviation reflects the degree of fluctuation. The time gradient reflects the growth or decline trend of the feature and is crucial for predicting future load trends. A positive gradient in occupancy rate indicates an increase in load, while a negative gradient in per capita flow rate indicates a decrease in load. The window size W is a preset hyperparameter that can be selected based on the dynamic characteristics of the electricity load.
[0056] Subsequently, external auxiliary features such as time codes, meteorological data, and historical load data are extracted. Time code features include hourly cyclic codes (sine / cosine), day-of-the-week unique thermal codes, and holiday identifiers. Current meteorological features include current temperature and humidity. Historical power load features include the total load at the previous moment, the historical load sliding window mean, and the historical load for the same day and time period. These external auxiliary features are then normalized or standardized to obtain dimensionless external auxiliary features. Specifically, the time codes, meteorological features, and absolute values of historical loads are normalized or standardized to ensure all input features are at the same dimensional level, avoiding interference from numerical magnitude differences in model calculations.
[0057] Finally, the original scale-invariant features, the generated dynamic derived features, and the external auxiliary features after dimensional unification are all concatenated and fused, as shown in the following formula: ; In this way, the features are combined to form a complete feature vector of the current scene, providing standardized input data for subsequent multi-objective load prediction models. In other words, all input features are at the same level of scale, which accelerates model convergence and prevents some features with excessively large absolute values from overshadowing the scale-invariant features.
[0058] Step S15: Input the current scene feature vector and future meteorological features into the target prediction model, and output the power load prediction results for multiple future time periods; wherein, the training set of the target prediction model is the training samples in the historical scene feature vector.
[0059] This embodiment employs a machine learning model that supports multi-objective outputs as the target prediction model. The LightGBM multi-objective regression model is preferred, but XGBoost, Random Forest, deep neural networks (MLP, LSTM, TCN, Transformer encoder), and extended versions of support vector regression with multi-objective objectives can also be used. Multi-objective outputs can be achieved by training N independent single-objective models or by using a custom multi-output objective function. The choice of model depends on computational resource constraints, data volume, and accuracy requirements.
[0060] The current scene feature vector and future The target prediction model takes meteorological characteristics as input, and outputs the power load forecast results for multiple future time periods, i.e., the future... Step total load forecast vector The prediction step size N can be selected based on the prediction time span.
[0061] It's important to note that model training does not require any manually labeled sub-load data or behavioral tags; only historical total load data, historical local area network panoramic data, and historical meteorological data are needed. For each time point in the training set... Construct training samples: Input features: ; Output tags: ; like Figure 3 As shown, the online model update mechanism performs incremental training or sliding window retraining on the model according to a preset period (such as weekly or monthly); retraining is automatically triggered when the prediction error exceeds a preset threshold.
[0062] In this embodiment, the method further includes: determining the test samples in the historical scene feature vector as the test set of the target prediction model, and obtaining the SHAP value corresponding to each feature in each test sample based on the contribution of each feature in the test set to the power load prediction result; averaging the absolute values of the SHAP values of each test sample under the same feature to obtain the importance of each feature, and sorting the importance in descending order of numerical value to obtain the global feature importance ranking; wherein, the global feature importance ranking is used to characterize the overall contribution of each feature to the power load prediction result under different scene dimensions; decomposing the power load prediction result output by the target prediction model each time into the sum of the baseline prediction value and the SHAP value of each feature to obtain the local attribution result of each power load prediction result; wherein, the baseline prediction value is the average prediction value of the target prediction model on the training samples; generating a causal explanation report to characterize the scene factors driving the power load prediction result based on the global feature importance ranking and / or the local attribution result, and generating differentiated equipment linkage control strategies based on the causal explanation report.
[0063] like Figure 4 As shown, one of the greatest added values of introducing panoramic LAN data is that it endows load forecasting with unprecedented interpretability. This embodiment utilizes SHAP (SHapley Additive exPlanations) technology to translate the decision-making process of the forecasting model into a causal explanation supported by real network behavior.
[0064] Next, a global attribution analysis is performed. Historical scenario feature vectors are divided into test samples as the test set for the target prediction model. The SHAP values of all features are calculated across the entire test set, and these are sorted in descending order of the average absolute value of the SHAP values for each feature to obtain a global feature importance ranking. Global attribution reveals which scenario dimensions contribute most to the overall load forecast. For example, the highest occupancy rate ranking indicates that "personnel presence ratio" is the most important factor driving load changes. In other words, based on the test samples, the contribution of each feature to the power load forecast results is calculated. The SHAP values for all features within each test sample are obtained, and then the absolute SHAP values of all test samples for the same feature are aggregated and averaged to obtain the importance value for each feature. All features are then sorted from highest to lowest importance to generate a global feature importance ranking. This ranking intuitively reflects the overall contribution strength of various scenario features to power load forecasting. In addition, local attribution analysis is performed. Simultaneously, a local attribution decomposition is conducted on the power load prediction value output by the model in a single prediction. The prediction result is decomposed into the sum of the baseline prediction value (composed of the average prediction value of the training samples) and the SHAP values of all features, yielding the local attribution result for a single prediction. The specific formula is shown below: ; in, This is the baseline predicted value (training set mean), meaning the baseline predicted value is the mean of the model's output based on all training samples. Features SHAP value (positive value indicates upswing in forecast, negative value indicates downswing in forecast, unit: kW).
[0065] The system can combine any one or two of the global feature importance ranking and the local attribution results of a single prediction to generate a causal explanation report. The report clearly lists the various local area network scenarios that affect the load prediction results. It can also match and output differentiated equipment linkage control strategies based on the report content. For example, when the load peak is dominated by high equipment occupancy and PC, the system will prioritize increasing the supply of fresh air from the air conditioner. When the weather is dominated by high temperature and the equipment occupancy is low, the system will switch to the energy-saving operation mode of the equipment.
[0066] Assume the model predicts the peak load of an office building at 14:00. SHAP local attribution may give the following: ; Further breakdown of contributions from LAN scenarios: (High occupancy rate): Contribution ; (High average traffic per person): Contribution ; High PC ratio in China: Contribution ; (Medium entropy): Contribution ; The system can generate a causal explanation report: The predicted load peak at 14:00 (580kW) is mainly due to: (1) network data shows that the vast majority of employees are at their workstations (high occupancy rate, +80kW); (2) employees are in a highly active computer office state (high average traffic per person +30kW, high PC ratio +25kW); (3) the diversity of network activities is moderate (medium entropy +15kW). Meteorological factors contribute an additional +80kW.
[0067] The local attribution results from the SHAP attribution explanation module are not only used to generate reports, but also to generate differentiated equipment linkage control strategies. For example, when the local attribution results show that 'high equipment occupancy' and 'high PC usage' are the main positive contributing characteristics of the load peak, the control system prioritizes increasing the fresh air volume and air conditioning cooling capacity in that area to cope with the heat load generated by dense population. When the attribution results show that 'meteorological factors (high temperature)' are the main contributor, while the 'overall occupancy' is at a low point (i.e., vacant on weekends but hot weather), the control system activates the energy-saving mode, keeping only the basic equipment running.
[0068] The energy management system receives load forecasts for the next N steps and automatically executes corresponding power dispatch control operations based on these forecasts and / or causal explanation reports. These operations include adjusting the set temperature and start / stop status of the HVAC system in the target building, controlling the charging and discharging strategies of energy storage devices (such as discharging in advance before the predicted load peak), or automatically issuing demand-side response (DR) commands to restrict non-critical electrical equipment.
[0069] The beneficial effects of this application are as follows: This application collects the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; through a scale-invariant feature engine, based on the ratio of the number of active devices in the current moment in the device connection status to the size of the historical cumulative device pool of the local area network, an overall occupancy rate representing the degree of personnel presence in the target power consumption unit is generated; based on the category of each network terminal device in the active device set, a device type composition ratio vector representing the type of personnel activity is generated; and based on the network traffic statistics and... The ratio of the number of active devices generates the per capita flow intensity, which characterizes the intensity of human activity. The overall occupancy rate, the device type composition ratio vector, and the per capita flow intensity are concatenated to obtain scale-invariant features independent of the size of the electricity consumption unit. Based on the scale-invariant features, external auxiliary features are fused to construct the current scene feature vector. The external auxiliary features include time-coded features, current meteorological features, and historical power load features. The current scene feature vector and future meteorological features are input into the target prediction model, and the power load prediction results for multiple future time periods are output. The training set of the target prediction model is the training samples in the historical scene feature vector.Therefore, this application obtains two types of raw network metadata—device connection status and network traffic statistics—by bypassing the network access device. This eliminates the need to deploy dedicated hardware such as sensors within the target power consumption unit to obtain observational inputs about human activity, thus reducing deployment costs without increasing the amount of dedicated sensing hardware. Furthermore, the collected metadata is only device-level and does not involve specific communication content, resulting in low privacy intrusion. The scale-invariant feature engine generates overall occupancy based on the ratio of the number of active devices to the historical cumulative device pool size, generates a device type composition ratio vector based on the active device category, and generates per capita traffic intensity based on the ratio of network traffic to the number of active devices. These three features directly observe human activities driving changes in electricity consumption from three dimensions: whether there are people and how many people are there, what type of activity they are engaging in, and the intensity of their activity. Compared to binary signals that only reflect whether people are present, this approach can further distinguish scenarios where the number of people present is the same but their electricity consumption characteristics differ significantly, thereby improving the accuracy of the load forecasting model in predicting load peaks and trends determined by real-time human activity. Due to the above three types of features... All values are expressed as ratios or proportions, and their semantics remain unchanged regardless of the total number of devices or the physical scale of the local area network within the target power unit. This allows the target prediction model trained based on these features to be transferred and reused between power units of different sizes, eliminating the need to re-collect large amounts of data and train the model from scratch for each newly connected power unit. This reduces the cost of large-scale deployment of this method across different power units. By concatenating scale-invariant features with time-coded features, current meteorological features, and historical power load features to form a current scene feature vector, which is then input into the target prediction model, the model is supplemented with direct observation features reflecting the degree of human presence, activity type, and activity intensity, in addition to the original indirect features such as time, meteorology, and historical load. This helps improve the accuracy of power load prediction results across multiple time periods. Furthermore, since the training samples of the target prediction model are historical scene feature vectors, the training process only relies on historical power load data and historical local area network metadata to construct training samples. There is no need for manual annotation of human activities or equipment usage, thus reducing the amount of data preparation work before model training.
[0070] like Figure 5 As shown, the system (D-SAF) consists of five core modules, including a data acquisition module, a scale-invariant feature engine, a dynamic scene encoder, a multi-objective prediction model, and a SHAP attribution interpretation module.
[0071] The top layer is a local area network environment consisting of terminal devices including mobile phones, personal computers, smart TVs, IoT devices, and game consoles. Data from all terminal devices is aggregated to the router / switch, then bypassed to obtain raw network data, which is then sent to the data acquisition module in module one.
[0072] The data acquisition module synchronously obtains three types of raw data: device connection status through DHCP / ARP protocol, uplink and downlink traffic based on SNMP / NetFlow, and traffic destination distribution by parsing the SNI and ASN databases based on TLS.
[0073] The raw data input module uses a two-scale invariant feature engine (SIFE, deployed at the edge) to calculate three types of scale invariant features: overall occupancy rate, equipment type composition ratio, and per capita flow intensity. It also connects to external data sources such as meteorological data and historical load data provided by smart meters, and integrates and outputs scale invariant feature vectors.
[0074] The scale-invariant feature vector is fed into the Dynamic Scene Encoder (DSE, deployed in the cloud) in module three. The scale-invariant features are statistically analyzed using a sliding window and the time gradient is calculated to generate dynamic derived features. These features are then concatenated with external features such as meteorology, time, and historical load to obtain the dynamic scene vector.
[0075] The dynamic scene vector input module uses a multi-objective prediction model (LightGBM multi-objective regression model, executed in the cloud) to calculate and output the load prediction vector for the next N steps, which is the prediction result.
[0076] The prediction results and corresponding feature data are sent to the SHAP attribution and interpretation module, which performs feature importance ranking for global attribution, local attribution for single prediction decomposition, and generates a causal interpretation report containing behavioral stories. Finally, the load prediction curve and causal interpretation are sent to output terminals such as the energy management system and user interface. The entire process can be matched with three architectures: full edge, full cloud, and hybrid deployment. The data acquisition stage also supports multiple acquisition methods such as router API query, SNMP polling, and terminal agent reporting.
[0077] This system offers three alternative deployment architectures. The first is a full-edge solution, where modules one through five are all deployed and run within the router or edge gateway hardware, suitable only for application scenarios with ample local computing and storage resources on edge devices. The second is a full-cloud solution, where only the router handles the raw network data acquisition and upload tasks, while all feature engineering and model computation processes, including scale-invariant feature extraction, dynamic scene encoding, load prediction inference, and SHAP attribution interpretation, are completed on the cloud server. The third, the preferred hybrid deployment solution, deploys the data acquisition module and scale-invariant feature engine (SIFE) locally on the edge to reduce data transmission volume and cloud bandwidth pressure, while the dynamic scene encoder (DSE), multi-objective prediction model, and SHAP attribution interpretation module are uniformly deployed to the cloud to perform complex time-series computations and model inference.
[0078] This application is adaptable to various power consumption scenarios, including residential and commercial office buildings. Furthermore, relying on a scale-invariant feature engine, it possesses cross-scenario model transfer capabilities. Specific application scenarios are as follows: Scenario 1 is residential load forecasting. It relies on home routers to collect local area network data and uses a scale-invariant feature engine to calculate household occupancy rate, device type composition, and per capita traffic-related characteristics to predict the total household power load for the next few hours. With the help of SHAP attribution, the causes of load changes can be interpreted intuitively. For example, it can output an explanation such as "The load peak is predicted to occur at 20:00. The reason is that all people in the house are at home, the overall device occupancy rate is high, and the active device is mainly a smart TV, which is dominated by video entertainment-related electricity consumption."
[0079] Scenario 2 is load forecasting for commercial office buildings. Network probes are deployed at the main route of the building to collect network data. The scale-invariant feature engine can calculate the overall occupancy rate, the composition of device types with personal computers as the core, and the per capita traffic intensity for hundreds to thousands of terminal devices in the building. Based on the obtained features, the power load of the entire building in the next few days is predicted. The output results can be directly used for central air conditioning scheduling and power grid demand response business support.
[0080] Scenario 3 is a cross-scenario model transfer application. Thanks to the scale-invariant feature engine's output features being unaffected by the scale of the scene's equipment, a prediction model trained in a certain type of power consumption scenario can be directly transferred to other power consumption scenarios with different scales and usage attributes. Only a small amount of data from the target scenario over 1 to 2 weeks is needed to fine-tune the model, which can quickly achieve high load prediction accuracy.
[0081] See Figure 6 As shown in the figure, this application discloses a power load forecasting device based on local area network behavior characteristics, including: The metadata acquisition module 11 is used to acquire the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; The feature generation module 12 is used to generate an overall occupancy rate representing the presence of people in the target power consumption unit based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network, using a scale-invariant feature engine; generate a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set; and generate an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices. The feature splicing module 13 is used to splice the overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity to obtain scale-invariant features that are independent of the size of the power consumption unit. The vector construction module 14 is used to construct a current scene feature vector based on the scale-invariant features and external auxiliary features; wherein, the external auxiliary features include time-coded features, current weather features, and historical power load features; The load forecasting module 15 is used to input the current scene feature vector and future meteorological features into the target forecasting model and output the power load forecasting results for multiple future time periods; wherein, the training set of the target forecasting model is the training samples in the historical scene feature vector.
[0082] This application can fill the gap in causal information in traditional load forecasting, effectively improve the accuracy of load forecasting, collect complete local area network data, and directly capture the three core types of information that cause power consumption fluctuations: human activities. It solves the problem that traditional models cannot observe the root causes of power consumption behavior. When forecasting power consumption peaks and load change intervals caused by human activities, the effect is significantly better than basic forecasting models that rely solely on time, weather, and historical load data.
[0083] The scale-invariant feature engine can standardize and transform the raw LAN data, decouple the binding relationship between feature values and the scale of power-consuming units, and make the model adaptable to different scale power consumption scenarios. Compared with the method of directly using the raw LAN data for modeling, the prediction accuracy of the model decreases less after changing the usage scenario. Only one to two weeks of data collection in the target scenario are needed to fine-tune the model to restore the ideal prediction effect, reducing the data collection and model training costs required for batch deployment.
[0084] This application relies on the routers already equipped in each power-consuming unit to complete data sensing, without the need to install additional dedicated data collection hardware. Deployment can be completed simply by installing the matching software module in the existing router, resulting in lower hardware investment costs. Data collection relies on mature and common network protocols such as ARP, DHCP, and SNMP, ensuring long-term stable operation and simple maintenance. The collected content only includes basic device information such as the number of devices, device type, and traffic summary statistics, without capturing the business content transmitted by users, thus minimizing the impact on user privacy.
[0085] This application uses the SHAP attribution algorithm to match the corresponding network activity information for each load forecast result, generating a clear explanation of the cause. Operation and maintenance personnel can clearly understand the actual usage scenario corresponding to the load forecast value, and formulate an appropriate equipment control plan accordingly. Traditional forecast models only output load values and cannot explain the reasons for the formation of the forecast results. The explanatory power of this application can improve the reliability of control decisions.
[0086] The entire model training process does not require manual labeling of personnel behavior or true values of individual power loads. It relies on the correspondence between historical total load data and data collected from the local area network to learn the correspondence between scenarios and power loads autonomously, saving a lot of manual work in organizing and labeling data. As long as the power unit is equipped with a smart meter and router, the entire prediction system can be directly put online and used.
[0087] Furthermore, embodiments of this application also provide an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0088] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the power load forecasting method based on local area network behavioral characteristics disclosed in any of the foregoing embodiments.
[0089] In this embodiment, the power supply 23 is used to provide operating voltage for various hardware devices on the electronic device; the communication interface 24 can create a data transmission channel between the electronic device and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0090] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0091] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.
[0092] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the power load forecasting method based on local area network behavior characteristics disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.
[0093] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned power load forecasting method based on local area network behavioral characteristics. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0094] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0095] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software module may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), register, hard disk, removable disk, CD-ROM (Compact Disc Read-Only Memory), or any other form of storage medium known in the art.
[0096] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0097] The above provides a detailed description of the power load forecasting method, apparatus, equipment, and medium based on local area network behavior characteristics provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A power load forecasting method based on local area network (LAN) behavioral characteristics, characterized in that, include: The network raw metadata of the local area network corresponding to the target power consumption unit is collected through the network access device in the target power consumption unit; wherein, the network raw metadata includes the device connection status and network traffic statistics within the target power consumption unit; Using a scale-invariant feature engine, an overall occupancy rate representing the presence of people in the target power consumption unit is generated based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network. A device type composition ratio vector representing the type of personnel activity is generated based on the category of each network terminal device in the active device set. An average traffic intensity representing the intensity of personnel activity is generated based on the ratio of the network traffic statistics to the number of active devices. The overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity are concatenated to obtain scale-invariant features that are independent of the size of the power consumption unit. The current scene feature vector is constructed by fusing external auxiliary features with the scale-invariant features; wherein, the external auxiliary features include time-coded features, current meteorological features, and historical power load features; The current scene feature vector and future meteorological features are input into the target prediction model, and the power load prediction results for multiple future time periods are output; wherein, the training set of the target prediction model is the training samples in the historical scene feature vector.
2. The power load forecasting method based on local area network behavior characteristics according to claim 1, characterized in that, The process of collecting raw network metadata of the local area network corresponding to the target power unit through the network access device in the target power unit includes: The DHCP lease table and ARP cache table of the network access device in the target power unit are periodically monitored to obtain the original record of the connection status of each network terminal device in the local area network. The original connection status records are processed by extracting device identifiers and deduplicating them to obtain a historical cumulative device pool. The historical cumulative device pool is used to record the device identifiers and device categories, first access times, and last active times of each network terminal device that has previously accessed the local area network. The active status is screened based on the active entries in the ARP cache table and / or the unexpired lease records in the DHCP lease table at the current moment to obtain the set of active devices at the current moment, and the historical cumulative device pool and the set of active devices at the current moment are determined as the device connection status; All networked terminal devices within the local area network are classified using a multi-dimensional local area network device type identification method to obtain a set of device categories; wherein, the multi-dimensional local area network device type identification method includes any one or more of the following methods: identifier rule matching method, traffic behavior machine learning identification method, local area network broadcast information parsing method, and multi-source data fusion discrimination method; The SNMP interface counter of the network access device is read and / or the NetFlow or sFlow traffic data passing through the network access device is collected to obtain the raw traffic count value of the WAN interface of the network access device. The original traffic count value is differentially statistically analyzed according to a preset collection period to obtain the total uplink traffic and total downlink traffic in each collection period, and the total uplink traffic and the total downlink traffic are determined as the network traffic statistics data.
3. The power load forecasting method based on local area network behavior characteristics according to claim 2, characterized in that, The step of generating a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set, and generating an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices, includes: Based on the set of device categories, each network terminal device in the active device set is divided into an active device subset under each device category, and a target ratio between the number of each active device subset and the number of the active device set is obtained. The vector formed based on each target ratio is determined as the device type composition ratio vector representing the type of personnel activity. The sum of the total uplink traffic and the total downlink traffic is obtained, and the ratio between the sum of the traffic and the number of active devices is determined as the per capita traffic intensity, which characterizes the intensity of human activity.
4. The power load forecasting method based on local area network behavior characteristics according to claim 3, characterized in that, Also includes: For the network access device with deep packet inspection or TLS handshake parsing capabilities, extract the SNI identifier in the TLS handshake message or query the ASN database based on the traffic destination IP to obtain each network destination; Calculate the traffic percentage corresponding to each of the network destinations to obtain traffic destination distribution data; Accordingly, the step of concatenating the overall occupancy rate, the ratio vector of the equipment type, and the per capita flow intensity to obtain scale-invariant features independent of the size of the electricity-consuming unit includes: The network activity entropy is obtained based on the traffic destination distribution data and the information entropy formula; wherein, the network activity entropy is used to characterize the degree of dispersion of local area network traffic access destinations; The overall occupancy rate, the device type composition ratio vector, the per capita traffic intensity, and the network activity entropy are concatenated to obtain scale-invariant features that are independent of the size of the power consumption unit.
5. The power load forecasting method based on local area network behavior characteristics according to claim 1, characterized in that, The process of collecting raw network metadata of the local area network corresponding to the target power unit through the network access device in the target power unit includes: By using firmware or plugins deployed on the network access device in the target power unit, or by deploying a data acquisition program on an edge probe device connected to the network access device, the original network metadata of the local area network corresponding to the target power unit is collected in a bypass monitoring manner. Alternatively, by calling the application programming interface (API) provided by the network access device in the target power consumption unit, the system can actively query the network access device to collect the original network metadata of the local area network corresponding to the target power consumption unit; wherein, the API includes the system bus interface or the representational state transition interface provided by the router operating system; Alternatively, the network access devices in the target power consumption unit can be periodically polled using the SNMP protocol to collect the original network metadata of the local area network corresponding to the target power consumption unit. Alternatively, the network metadata of the local area network corresponding to the target power consumption unit can be actively collected through an agent program deployed on the network access device in the target power consumption unit.
6. The power load forecasting method based on local area network behavioral characteristics according to claim 1, characterized in that, The process of constructing the current scene feature vector based on the scale-invariant features and external auxiliary features includes: A preset review window is set, and sliding window operations are performed on each of the scale-invariant features to obtain sliding window statistics; wherein, the sliding window statistics include mean, standard deviation, maximum value, and minimum value; The difference between adjacent time steps is calculated for each scale-invariant feature to obtain the corresponding temporal gradient, and the sliding window statistics are combined with the temporal gradient to generate dynamic derived features; The external auxiliary features are normalized or standardized to obtain the external auxiliary features after dimension elimination. The scale-invariant features, the dynamically derived features, and the external auxiliary features after dimension elimination are fused to construct the current scene feature vector.
7. The power load forecasting method based on local area network behavioral characteristics according to any one of claims 1 to 6, characterized in that, Also includes: The test samples in the historical scene feature vector are determined as the test set of the target prediction model, and the SHAP value corresponding to each feature in each test sample is obtained based on the contribution of each feature in the test set to the power load prediction result. The absolute values of the SHAP values of the test samples under the same feature are averaged to obtain the importance of each feature. The importance is then sorted in descending order of numerical value to obtain the global feature importance ranking. The global feature importance ranking is used to characterize the overall contribution of each feature to the power load prediction results under different scenario dimensions. The power load prediction result output by the target prediction model each time is decomposed into the sum of the baseline prediction value and the SHAP value of each feature to obtain the local attribution result of each power load prediction result; wherein, the baseline prediction value is the average prediction value of the target prediction model on the training samples. Based on the global feature importance ranking and / or the local attribution results, a causal explanation report is generated to characterize the scenario factors driving the power load prediction results, and a differentiated equipment linkage control strategy is generated based on the causal explanation report.
8. A power load forecasting device based on local area network behavior characteristics, characterized in that, include: The metadata acquisition module is used to acquire the original network metadata of the local area network corresponding to the target power consumption unit through the network access device in the target power consumption unit; wherein, the original network metadata includes the device connection status and network traffic statistics within the target power consumption unit; The feature generation module is used to generate an overall occupancy rate representing the presence of people in the target power consumption unit based on the ratio of the number of active devices in the current device connection state to the size of the historical cumulative device pool of the local area network, using a scale-invariant feature engine; generate a device type composition ratio vector representing the type of personnel activity based on the category of each network terminal device in the active device set; and generate an average traffic intensity representing the intensity of personnel activity based on the ratio of the network traffic statistics to the number of active devices. The feature splicing module is used to splice the overall occupancy rate, the equipment type composition ratio vector, and the per capita flow intensity to obtain scale-invariant features that are independent of the size of the power consumption unit. The vector construction module is used to construct a current scene feature vector based on the scale-invariant features and external auxiliary features; wherein, the external auxiliary features include time-encoding features, current weather features, and historical power load features; The load forecasting module is used to input the current scene feature vector and future meteorological features into the target forecasting model and output the power load forecast results for multiple future time periods; wherein, the training set of the target forecasting model is the training samples in the historical scene feature vector.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the power load forecasting method based on local area network behavior characteristics as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the power load forecasting method based on local area network behavior characteristics as described in any one of claims 1 to 7.