Power management method for demand side response based on electric power horcrux architecture
By collecting and analyzing electricity consumption data under the HarmonyOS power architecture, feature vectors of electricity users are constructed, dynamic electricity pricing strategies and response rules are generated, solving the problem that traditional power dispatching methods are difficult to accurately match electricity demand, and realizing accurate prediction of electricity consumption behavior of electricity users and efficient balance of grid load.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUHAI POWER SUPPLY BUREAU GUANGDONG POWER GIRD CO
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional power dispatching methods struggle to accurately match changes in electricity demand, leading to resource waste and grid instability. In particular, the diversity and randomness of electricity consumption behavior under extreme weather conditions result in unstable demand forecasting accuracy and response speed. Existing demand-side management platforms lack intelligent capabilities and are unable to analyze massive amounts of data in real time for efficient regulation.
The demand-side response power management method based on the HarmonyOS power architecture collects multi-source power consumption data, combines it with environmental data to construct feature vectors of power consumption subjects, uses clustering algorithms to group power consumption subjects, generates dynamic electricity pricing strategies and response rules, monitors load in real time and optimizes grid load distribution, and dynamically updates power consumption behavior models and response strategies.
It enables accurate prediction and rapid response to the electricity consumption behavior of electricity users, effectively balances the grid load, improves electricity efficiency, and achieves intelligent demand-side management.
Smart Images

Figure CN121566533B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to a demand-side response power management method based on the HarmonyOS power architecture. Background Technology
[0002] In power systems, the surge in electricity demand during peak hours is a long-standing problem. With accelerating urbanization and continuous growth in industrial electricity consumption, the power grid faces immense supply pressure during specific periods. Traditional power dispatching methods primarily rely on supply-side resource allocation, such as increasing generator output or calling in backup power. However, such unilateral adjustments often fail to accurately match demand changes and may lead to resource waste or grid instability. Especially under extreme weather conditions, electricity demand fluctuations are more pronounced, rendering traditional dispatching methods inadequate. Demand-side management (DSM), as an emerging regulatory tool, aims to alleviate grid pressure by regulating the electricity consumption behavior of power users. However, current DSM technologies face multiple challenges in practical applications. First, the diversity and randomness of power user behavior make accurate demand forecasting difficult to guarantee. Second, the willingness and response speed of power users to participate in DSM vary, leading to unstable regulatory effects. Furthermore, existing DSM platforms often lack intelligent capabilities, failing to analyze massive amounts of data in real time and make accurate decisions, thus hindering efficient resource allocation. To address these issues, existing technologies propose an intelligent management method based on the HarmonyOS power architecture. The Power Harmony Architecture specifically refers to a distributed intelligent communication framework for new power systems, characterized by: (1) a distributed intelligent computing unit (Power Harmony edge node) with core functions of data acquisition, edge computing, and secure collaboration; (2) a full-scenario power protocol framework (Power Harmony protocol stack) supporting a long short-term memory network anomaly detection module, a dynamic reputation value assessment module, a heterogeneous accelerator, and a Power Harmony device management protocol; and (3) a secure computing enclave based on hardware isolation, providing a three-in-one security environment for core power businesses (such as load forecasting and electricity price strategy generation) that integrates data privacy protection, code integrity verification, and physical attack prevention (Power Harmony trusted execution environment). The core of this method lies in using advanced data analysis and machine learning technologies to monitor and analyze the electricity consumption behavior of electricity users in real time and dynamically adjust demand-side response strategies. However, how to achieve accurate prediction and rapid response in complex and ever-changing electricity consumption scenarios is a technical problem that urgently needs to be solved. In particular, in terms of the fusion and processing of multi-source heterogeneous data, how to ensure the real-time performance and accuracy of data, and how to achieve efficient regulation while ensuring the electricity user experience, all require in-depth research and innovation. Summary of the Invention
[0003] This invention provides a demand-side response power management method based on the HarmonyOS power architecture, which mainly includes:
[0004] Collect electricity consumption data from multiple sources, clean and integrate the data, combine it with environmental data, extract electricity consumption, load values and power factor characteristics, and obtain classification results for three types of electricity users: industrial, commercial and residential through clustering.
[0005] The classification results are encrypted and transmitted to a secure execution environment. By integrating environmental data with the electricity consumption characteristics of different types of electricity consumers, electricity consumption behavior models are constructed.
[0006] Based on the model output, peak electricity demand is determined, and dynamic electricity pricing strategies and automatic response rules are generated to adapt to different types of electricity consumers, taking into account both electricity demand and control objectives.
[0007] Push dynamic electricity pricing strategies to electricity-consuming terminals, collect terminal response data, and optimize strategies by associating them with electricity pricing information;
[0008] Real-time monitoring of regional load; if load is abnormal, a regional demand-side response strategy is generated by combining the classification results of electricity users with environmental data, and further optimized based on feedback from electricity users.
[0009] Based on the adjusted comprehensive strategy, the power grid load distribution is recalculated, the balance is judged, the final management command is generated and issued for execution, the load optimization effect data is obtained, the impact of environmental factors is analyzed, and the electricity consumption behavior model and response strategy are dynamically updated.
[0010] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0011] This invention discloses a demand-side response power management method based on the HarmonyOS power architecture. The method collects and processes power consumption data, constructs feature vectors for power users by combining environmental factors, and uses a clustering algorithm to classify power users into three categories: industrial, commercial, and residential. Based on the classification results and external factors, it constructs power consumption behavior models for different types of power users and dynamically adjusts the electricity pricing strategy according to the prediction results. When the load exceeds a threshold, this invention generates a demand-side response strategy and optimizes it based on the response of power users. Finally, this invention issues management commands through an intelligent management platform to achieve load optimization. Through real-time monitoring and analysis, it dynamically updates the power consumption behavior models and response strategies for different types of power users, effectively balancing the grid load, improving power efficiency, and achieving intelligent demand-side management. Attached Figure Description
[0012] Figure 1 This is a flowchart of the demand-side response power management method based on the HarmonyOS power architecture of the present invention. Detailed Implementation
[0013] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0014] like Figure 1 The demand-side response power management method based on the HarmonyOS power architecture in this embodiment may specifically include:
[0015] Step S101: Collect multi-source electricity consumption data, clean and integrate it, combine it with environmental data, extract electricity consumption, load value and power factor feature value, and obtain the classification results of three types of electricity consumption entities: industrial, commercial and residential through clustering.
[0016] Raw electricity consumption data is collected by power edge computing nodes deployed in substations. These nodes are then used to clean the raw data. Each power edge computing node is equipped with a computer and auxiliary equipment repair adaptation module, supporting real-time hardware fault diagnosis and remote repair, ensuring the continuity of data acquisition and processing. If outliers or missing values are found, the built-in long short-term memory network anomaly detection module of the power edge computing node identifies and replaces the outliers. Missing values are repaired through data complementarity from adjacent power edge computing nodes, resulting in a cleaned data table. Environmental values, including temperature, humidity, and air pressure, are then combined with Z-score standardization to obtain a standard value table. During standardization, intelligent operation and maintenance algorithms associated with computer and auxiliary equipment repair monitor the operational status of the data processing equipment in real time, ensuring the accuracy and efficiency of the standardization calculations. Electricity consumption and load values are extracted from the standard value table. Power values and power factor characteristic values are calculated using the formulas P=UI and power factor characteristic value = active power / apparent power, where P is electrical power, U is voltage, and I is current. K-means clustering algorithm is used to classify electricity consumption and load values, and to segment electricity consumption patterns. During the clustering process, the heterogeneous computing resource scheduling mechanism of the computer and auxiliary equipment repair system is utilized to optimize algorithm efficiency. A linear regression algorithm is used to analyze the relationship between power values and power factor characteristic values to establish a power factor prediction model. During model training, the calculation parameters are dynamically adjusted to adapt to the hardware operating status using the equipment status assessment module related to the computer and auxiliary equipment repair system. The electricity consumption patterns are combined with the power factor prediction model to generate power factor characteristic values. After the characteristic values are generated, their validity is verified through the data verification mechanism associated with the computer and auxiliary equipment repair system, ensuring the data reliability for subsequent user classification and model construction.
[0017] For example, raw electricity consumption data is collected by power HarmonyOS edge computing nodes deployed in substations. Drawing on the microkernel distributed design of the HarmonyOS system, a decentralized power dispatch network is constructed. Each smart meter, energy storage unit, and photovoltaic inverter can serve as a power HarmonyOS edge computing node, enabling local millisecond-level load decisions. The raw electricity consumption data is cleaned using the Long Short-Term Memory (LSTM) anomaly detection module built into the power HarmonyOS edge computing node and data from adjacent power HarmonyOS nodes. The raw electricity consumption data often includes voltage fluctuations and current sampling values. For instance, if the voltage value collected by a power HarmonyOS edge computing node suddenly drops from the normal 380 volts to zero volts during a certain period, the LSTM anomaly detection module, based on the previous 24 hours of time-series data, predicts a normal range (220-420kW), automatically marks the anomaly point, and replaces it with the predicted value of 380kW from an adjacent node. Missing values are repaired by complementing data from adjacent HarmonyOS power nodes. For example, when the load data of a substation node is missing at 15:30, the system uses the HarmonyOS protocol stack to obtain encrypted data segments from the same time slice of three adjacent nodes in real time (e.g., node A data 120kW, 0.92pf, node B 118kW, 0.91pf, node C 123kW, 0.90pf). Under the federated learning framework, a weighted average (weight = 1 / node distance²) is used to generate a repair value. The calculation process is as follows: Repair value = Σ(adjacent node data value × 1 / node distance²) / Σ(1 / node distance²). Assuming that the distances of nodes A / B / C from the missing node are 1km / 0.8km / 1.2km respectively, then the load repair value = (120×1 / 1² + 118×1 / 0.8² + 123×1 / 1.2²) / (1 / 1² + 1 / 0.8² + 1 / 1.2²) =120.5kW, the power factor is similarly 0.91pf. The entire transmission is encrypted using SM4 and the original data is not exposed. Here, pf is an abbreviation for power factor, which represents the ratio of active power (the power actually done) to apparent power (the product of voltage and current) (pf=cos ,in (This refers to the phase difference between voltage and current); SM4 is a commercial symmetric encryption algorithm released by the State Cryptography Administration of China. It uses a 128-bit block length and key length, and is specifically designed for data encryption protection. It is widely used in secure communications in government, finance, and the Internet of Things (such as encrypted transmission and privacy computing in the HarmonyOS power architecture). Regarding environmental data, a substation collected data on outdoor temperature of 35 degrees Celsius, relative humidity of 85%, and air pressure of 1012 hPa during the summer. Z-score standardization can eliminate the influence of different dimensions. Taking electricity consumption as an example, the original electricity consumption is subtracted from the average value and then divided by the standard deviation to obtain the standardized value. This allows for effective comparison of electricity consumption by different time periods and different scales of electricity users. In power calculation, when the voltage of a certain electricity user is 380 volts and the current is 100 amperes, the active power is 38,000 kilowatts, while the apparent power may reach 42,000 volt-amperes. Therefore, the power factor is calculated to be approximately 0.9. When classifying electricity consumption patterns, electricity users can be divided into different types according to the characteristics of their electricity consumption and load values. For example, cluster analysis in an industrial park revealed three typical electricity consumption patterns: continuous day-night consumption, high-day-low-night consumption, and intermittent fluctuation. Continuous day-night consumption, exemplified by steel mills, is characterized by relatively constant electricity usage; high-day-low-night consumption, seen in ordinary factories, is significantly higher during the day than at night; and intermittent fluctuation, exemplified by laboratories, exhibits large fluctuations in electricity consumption depending on equipment operating conditions. Power factor prediction models identify patterns by analyzing historical data. For instance, a factory's power factor showed a negative correlation with the number of equipment start-ups and shutdowns, but a positive correlation with production load rate. The prediction model established based on this correlation can guide the switching operation of reactive power compensation equipment. The generation of power factor characteristic values needs to consider the characteristics of the electricity consumption pattern. For example, for continuous day-night consumption, the power factor characteristic value is relatively stable; while for intermittent fluctuation consumption, the power factor characteristic value needs to be calculated in different time periods. In-depth data analysis can uncover the inherent patterns in electricity consumption behavior. For example, a chemical plant's power factor drops significantly during production process switching; a prediction model can be used to prepare for reactive power compensation in advance. For example, cluster analysis can reveal overlapping peak electricity consumption patterns among multiple electricity users within a region, allowing for optimization of the power distribution network operation. Ultimately, these analytical results all serve the goal of improving power supply reliability and economy.
[0018] The power consumption, load, and power factor feature values of each Power Harmony edge computing node are obtained. Based on these values, a feature vector of the power user entity is constructed. Using the Euclidean distance formula, combined with the feature vectors and the reputation weight factor introduced by the dynamic reputation evaluation module in the Power Harmony architecture, the similarity between the feature vectors of the power users is calculated, resulting in a similarity matrix. For the similarity matrix, principal component analysis is used to obtain the feature distribution. Based on this distribution, K-means clustering is performed using the heterogeneous accelerator of the Power Harmony protocol stack to group the power users and obtain silhouette coefficients. If the silhouette coefficient is less than or equal to a preset silhouette coefficient threshold, the clustering effect is invalid, and the similarity and silhouette coefficient are recalculated. If the silhouette coefficient is greater than the preset threshold, the clustering effect is considered valid. The Davies-Bouldin index is used to further verify the clustering quality, generating the final clustering results. Based on the clustering results, the electricity users were divided into three categories—industrial, commercial, and residential—through t-SNE (t-Distributed Stochastic Neighbor Embedding) dimensionality reduction visualization analysis, resulting in the electricity user classification results.
[0019] For example, the power consumption, load values, and power factor characteristics of each HarmonyOS edge computing node are obtained. These characteristics constitute the basic features of the electricity consumption behavior of the main electricity users. By constructing a feature vector, the electricity consumption patterns of the main users can be comprehensively reflected. For a certain community, its average daily power consumption is 1,000 kWh, its peak load is 80 kW, its power consumption curve shows a double-peak characteristic in the morning and evening, and its power factor is 0.85. These data constitute the feature vector of the main electricity users in this community. Euclidean distance calculation can measure the degree of similarity in electricity consumption among different main users. Traditional Euclidean distance calculations may not consider device reputation weights. However, the HarmonyOS architecture includes a dynamic reputation value assessment module, which can introduce a reputation weight factor into the distance calculation, making the similarity calculation more accurate. For example, in an industrial park, company A's feature vector is [200kW, 150kVA, 0.92pf] (reputation value 0.95), and company B's is [180kW, 140kVA, 0.85pf] (reputation value 0.85). Using a weight factor w... k = (0.95 + 0.85) / 2 = 0.9, therefore the weighted Euclidean distance is calculated as follows: The final similarity matrix contains a value of 1 / (1+d). ABThe similarity coefficient (0.041) reflects the similarity of electricity consumption behavior among electricity users in a reputation-weighted manner, indicating significant differences in electricity consumption patterns. The similarity matrix records the distance relationships between all electricity users. Principal component analysis can extract the main distribution patterns of electricity consumption characteristics. Taking a commercial area as an example, analysis revealed that business hours and air conditioning load are the main factors affecting electricity consumption characteristics, which can be used to optimize clustering results. Using heterogeneous accelerators on the HarmonyOS protocol stack, K-means clustering was performed to group similar electricity users together. The HarmonyOS protocol stack scheduled heterogeneous accelerators such as the Ascend NPU (Neural Processing Unit, used to accelerate matrix operations) and FPGA (Field-Programmable Gate Array, used to optimize distance calculations) to perform K-means clustering in parallel, completing industrial / commercial / residential grouping within 0.8 seconds (traditional CPU takes 12 seconds). For each sample, its silhouette coefficient... , where a i b is the average distance from a sample to other samples in the same cluster. i The global silhouette coefficient is the average distance from a sample to the nearest heterogeneous sample, and the distance from the sample to the sample is s. i The mean value of the data was used to obtain the silhouette coefficient, which reached 0.62. The silhouette coefficient is used to evaluate the clustering effect. When the silhouette coefficient is 0.62, which is greater than the preset silhouette coefficient threshold of 0.6, it indicates that the clustering results are reliable. The Davies-Bouldin index further verifies the clustering quality. Taking the clustering of electricity users in a certain area as an example, the index is 0.8, which is lower than the reference value of 1.0, confirming that the clustering results are reasonable. Through dimensionality reduction visualization, the distribution characteristics of different types of electricity users are clearly displayed. Industrial electricity users show concentrated and regular electricity consumption patterns, commercial electricity users have obvious business hours characteristics, and residential electricity users show periodic changes in peak and off-peak periods. For application scenarios of electricity consumption characteristic analysis, such as power supply companies optimizing distribution network planning, this can be used. Through analysis, an industrial park found that enterprises with similar electricity consumption characteristics are concentrated in a specific area, which helps to rationally allocate transformer capacity. The electricity consumption clustering results in commercial areas show that shopping malls and restaurants have similar electricity consumption patterns, and a unified demand response strategy can be adopted. The clustering of electricity users in residential areas found that there are significant differences in the electricity consumption characteristics of different types of housing, which helps to formulate differentiated electricity pricing policies. This classification method provides data support for power supply services, making electricity management more accurate and efficient.
[0020] Step S102: The classification results are encrypted and transmitted to a secure execution environment, and environmental data and the electricity consumption characteristics of the electricity users are integrated to construct electricity consumption behavior models for different types of electricity users.
[0021] The classification results of electricity-consuming entities are encrypted and transmitted to the HarmonyOS for Power trusted execution environment via the HarmonyOS for Power protocol stack. The HarmonyOS for Power protocol stack integrates a secure communication operation and maintenance module adapted for computer and auxiliary equipment repair, which can monitor the operating status of devices in the transmission link in real time, quickly locate communication faults and remotely repair them. The classification results of electricity-consuming entities are decrypted within the HarmonyOS for Power trusted execution environment to obtain the load values of the industrial, commercial, and residential electricity-consuming entities in the classification results of electricity-consuming entities. The load values of the three types of electricity-consuming entities are compared and analyzed, and the peak-valley ratio and load rate characteristics of the load values of the three types of electricity-consuming entities are extracted. The correlation between the peak-valley ratio and load rate characteristics and the temperature and humidity values in the weather forecast data is analyzed. During the analysis process, relying on the computing power device status diagnosis module supporting computer and auxiliary equipment repair, the operating stability of the computing hardware is verified in real time to avoid analysis deviation caused by equipment failures and determine the influence degree of temperature and humidity values on the load values. Environmental impact factors are extracted from holiday arrangements and emergency information and quantified into numerical forms. During the quantification process, the hardware adaptation parameters of the quantification model are dynamically optimized through the data processing device operation and maintenance algorithm associated with computer and auxiliary equipment repair to improve the quantification accuracy. The peak-valley ratio, load rate, temperature value, humidity value, and environmental impact factors are used as input variables to construct the electricity consumption behavior models of different types of electricity-consuming entities. The computing nodes on which the model construction depends are equipped with intelligent operation and maintenance components for computer and auxiliary equipment repair, which support real-time monitoring and abnormal repair of hardware resources during the model training process. If the error value of the electricity consumption behavior model of different types of electricity-consuming entities exceeds the preset error threshold, the grid search method is used to adjust the parameters of the electricity consumption behavior model of different types of electricity-consuming entities and retrain the model; if the error value is within the preset error threshold, the model is determined to be available. The electricity load change trend within the next 24 hours is calculated through the electricity consumption behavior models of different types of electricity-consuming entities to generate the load prediction results.
[0022] For example, when analyzing the load values of three types of electricity users—industrial, commercial, and residential—it is assumed that a regional power grid classifies 5,000 electricity users. The results are encrypted using the SM4 protocol stack of the Power HarmonyOS and transmitted to the Power HarmonyOS Trusted Execution Environment (TEE). Within the Power HarmonyOS TEE, the following results are obtained after decryption: Industrial electricity users (1,200 users): daily average peak load 850MW, valley load 320MW (peak-valley ratio = (850-320) / 535 = 0.99), load factor = 535 / 850 = 63%; Commercial electricity users (2,000 users): peak load 420MW, valley load 180MW (peak-valley ratio = 0.57), load factor = 300 / 420 = 71%; Residential electricity users (1,800 users): peak load 680MW, valley load 150MW (peak-valley ratio = 0.78), load factor = 415 / 680 = 61%. Temperature and humidity significantly impact electricity load, especially during hot summer months when increased cooling load leads to a surge in electricity consumption. Data shows that when the temperature exceeds 30 degrees Celsius, for every 1-degree increase, commercial electricity consumption increases by approximately 5%, while residential electricity consumption increases by approximately 8%. When humidity exceeds 70%, electricity consumption increases by an additional 2% to 3%, primarily due to the operation of dehumidifiers. Regarding environmental factors, the electricity consumption characteristics of commercial and residential users change significantly during holidays. For example, during the Spring Festival, commercial electricity consumption decreases by approximately 40%, while residential electricity consumption increases by approximately 30%. Unexpected events such as large-scale sporting events and exhibitions can cause a surge in electricity load in localized areas, requiring close monitoring. When quantifying these influencing factors, a 0-1 standardization approach can be used, with normal working hours recorded as 1, holidays as 0, and the impact of unexpected events quantified using a range of 0.1-0.9. Using peak-to-valley ratio, load factor characteristics, temperature and humidity values, and environmental factors as input variables, electricity consumption behavior models for different types of electricity users are constructed. These models can be ARIMA (Auto Regressive Integrated Moving Average) models. When predicting electricity consumption behavior, methods such as differencing and moving averages are used to handle the periodicity and trend of the data. In the model parameters, the differencing order is typically 1 or 2, while the autoregressive and moving average orders are selected between 3 and 5 based on the data characteristics. A model is considered usable if the prediction error is controlled within 5%; otherwise, the parameters need to be optimized through grid search. For example, in the prediction of industrial electricity users, the original model error was 7%, which was reduced to 4.5% after parameter optimization, meeting the prediction requirements. For 24-hour load forecasting, the combined effects of weather, holidays, and other factors need to be considered. The prediction results can display the load levels and trends at different times, providing a basis for power grid dispatching decisions.Forecast data can also be used for peak electricity demand early warning. When the predicted load exceeds a threshold, a timely warning is issued to assist electricity users in staggering their electricity consumption during off-peak hours. This forecasting method can effectively improve the efficiency of power grid operation and reduce power supply costs.
[0023] Step S103: Determine peak electricity demand based on model output, and generate dynamic electricity pricing strategies and automatic response rules that are adapted to different types of electricity consumers, taking into account both electricity demand and control objectives.
[0024] Load forecast results from electricity consumption behavior models of different types of electricity users are compared with preset peak values. If the predicted load exceeds the peak value, a peak electricity consumption period is identified. Based on the peak consumption determination, electricity pricing strategies for different time periods are generated according to preset dynamic electricity price adjustment rules. Electricity price information for each time period is extracted from the pricing strategies, and combined with the electricity user type, preset automatic response rules for electricity users are applied to generate a dataset of electricity user response behaviors. The dataset of electricity user response behaviors is preprocessed, including data cleaning and feature extraction, to generate a feature set that can be used for model training. A random forest-based classification model is trained using the feature set to predict the electricity user behavior under dynamic electricity pricing, resulting in predicted electricity user behavior data. Based on the predicted electricity user behavior data, the electricity pricing strategy is adjusted, and the dynamic electricity price adjustment mechanism is optimized. Through the optimized dynamic electricity price adjustment mechanism, an adjusted dynamic electricity price strategy is generated, and the automatic response rules for electricity users are updated.
[0025] For example, dynamic electricity price adjustments need to be based on load forecasting. The peak electricity demand is determined by comparing the predicted load with the peak load, based on the load forecast results output by the electricity consumption behavior models of different types of electricity users. A specific example is an industrial park where the predicted load during the summer heat is 8000 kW, while the preset peak value is 7000 kW. In this case, the system will determine that a peak electricity demand exists. Electricity pricing strategies involve differentiated pricing across multiple time periods. Taking a city as an example, a day is divided into off-peak, flat, and peak periods. Based on load forecast results, the electricity price is set at 0.5 yuan per kWh during off-peak periods, 0.8 yuan per kWh during flat periods, and 1.2 yuan per kWh during peak periods. This tiered pricing effectively guides electricity consumption behavior. The formulation of automatic response rules for electricity users needs to consider the electricity consumption characteristics of different types of electricity users. Commercial electricity users typically consume electricity concentratedly during business hours. Automatic temperature adjustment rules for air conditioning can be set so that when the electricity price reaches 1 yuan per kWh, the air conditioning temperature setting automatically increases by 1 degree. Industrial electricity users can flexibly adjust their production plans, reducing the use of high-energy-consuming equipment during peak periods. Preprocessing of electricity user response behavior data is crucial for model training. Taking a shopping mall as an example, the collected raw data includes information such as electricity consumption, response time, and electricity price levels. Data cleaning removes outliers, such as abnormal peak electricity consumption between midnight and 5 AM. Feature extraction focuses on the sensitivity of electricity users to different electricity price ranges; for example, for every 0.1 yuan increase in electricity price, electricity consumption decreases by an average of 0.5 yuan. Training a classification model based on random forests requires appropriately setting feature weights. The weight of temperature can be set to 0.3, time to 0.25, historical response to 0.2, and other features to a combined 0.25. After model training, it can predict the electricity consumption choices of electricity users under different electricity prices. For example, a factory has an 80% probability of reducing production capacity when the electricity price reaches 1.5 yuan per kilowatt-hour. Optimizing electricity pricing strategies requires balancing electricity demand with grid capacity. If the prediction model shows that peak-hour electricity consumption still exceeds expectations after implementing a certain electricity pricing strategy, then the electricity price for that period needs to be increased or the high-price range extended. For example, the originally planned peak-hour electricity price range from 2 PM to 4 PM could be extended to 5 PM, or the original electricity price could be increased by 10%. The optimized dynamic electricity pricing mechanism should have adaptive capabilities. The system continuously updates the prediction model parameters based on actual electricity consumption data. If it finds that the sensitivity of electricity consumers to price adjustments has decreased, the electricity price change range will be adjusted accordingly. At the same time, the automatic response rules for electricity consumers also need to be dynamically updated to adapt to the constantly changing electricity consumption environment and the habits of electricity consumers.
[0026] Step S104: Push the dynamic electricity pricing strategy to the electricity user's terminal, collect the terminal response data, and optimize the strategy by associating it with the electricity pricing information.
[0027] The system acquires adjusted dynamic electricity pricing strategies for different time periods. This data is then encrypted and broadcast using the HarmonyOS device management protocol to the electricity-consuming terminals. Upon receiving the data, the terminals decrypt and verify its integrity and strategy signature within the HarmonyOS trusted execution environment. During decryption and verification, the system uses a computer and auxiliary equipment to monitor the terminal's hardware status and verify the operational stability of its computing and storage modules in real time. Based on the dynamic electricity pricing strategy data from the terminals, pre-established rules determine whether the electricity price exceeds a preset threshold. If the threshold is exceeded, a command is triggered to shut down or delay the startup of high-power appliances. The system then correlates the electricity price information with the terminal's response behavior to generate a response behavior dataset. During the analysis, a data analysis equipment status optimization algorithm is used to dynamically adjust the analysis equipment's operational parameters. A decision tree algorithm is used to train a predictive model for the electricity-consuming response behavior. Finally, the trained predictive model is applied to new electricity pricing strategy data to generate predicted results for the electricity-consuming response behavior. Based on the predicted response behavior of electricity users, an optimization algorithm is used to adjust the preset electricity price threshold and push mechanism in the dynamic electricity pricing strategy, thereby optimizing the response rules of electricity user terminals. The adjusted electricity pricing strategy is then re-pushed to the electricity user terminals via a message queue, completing the closed-loop optimization.
[0028] For example, the adjusted dynamic electricity pricing strategy for different time periods is obtained, and the adjusted dynamic electricity pricing strategy data is pushed in real time through encrypted broadcasting via the Power Harmony OS device management protocol. When the terminal receives the data, it needs to decrypt and verify the data integrity (SM3 hash check) and strategy signature (national cryptographic SM9 signature) within the Power Harmony OS trusted execution environment. For example, when the electricity pricing strategy is adjusted to a peak electricity price of 1.5 yuan / kWh (originally 1.0 yuan), the encrypted strategy (SM4 encrypted payload: "15:00-18:00, 1.5 yuan" + SM9 signature) is broadcast to the industrial electricity user terminal through the Power Harmony OS protocol stack. The terminal decrypts and verifies the signature within the TEE and then triggers the preset rules. The electricity user terminal then responds intelligently based on the preset rules. For example, if an electricity user sets an electricity price threshold of 1.2 yuan per kWh, when it receives electricity price information higher than this threshold, the terminal will automatically implement energy-saving measures. Taking air conditioners as an example, when encountering peak electricity prices, the terminal can automatically adjust the air conditioner temperature setting or delay the start-up based on the indoor temperature and the electricity user's preferences. If the room temperature is 26 degrees Celsius and the user prefers a temperature of 24 degrees Celsius, the air conditioner temperature can be set to 25 degrees Celsius during peak hours to ensure comfort while saving energy. Similarly, washing machines can be delayed until off-peak hours, and charging devices can be set to operate during periods of lower electricity prices. Data analysis of user response behavior can incorporate multiple dimensions such as time, temperature, and electricity price. For example, on a summer weekday, if the outdoor temperature exceeds 30 degrees Celsius and the peak electricity price is 1.5 yuan per kilowatt-hour, there is an 80% probability that a user will accept a suggestion to raise the air conditioner temperature by 1 degree Celsius. Using Python's Scikit-learn library to implement a decision tree algorithm, this data can be used to train a decision tree model to predict the user's response willingness in different scenarios. The output of the predictive model is used to dynamically adjust the electricity pricing strategy. If it is found that the user's response to a certain price level is low, the price for that period can be adjusted appropriately, or the advance notification time can be extended. For example, if the warning information is originally pushed 15 minutes before the start of peak hours, it can be adjusted to 30 minutes based on the user's habits, giving them more time to prepare for the response. The closed-loop optimization mechanism ensures continuous improvement of the entire system. By analyzing the actual response of electricity users, it continuously optimizes the electricity price threshold, push timing, and energy-saving suggestions. For example, if electricity users in a certain community generally report that the peak-valley price difference is too large, the peak-valley price difference can be adjusted from 1 yuan to 0.8 yuan, maintaining the guiding effect while improving the acceptance of electricity users. The encrypted broadcasting and electricity user response mechanism of the HarmonyOS device management protocol ultimately realize the scientific allocation of electricity load and the continuous optimization of electricity users' electricity consumption habits.
[0029] Step S105: Monitor the regional load in real time. If the load is abnormal, generate a regional demand-side response strategy by combining the classification results of electricity users and environmental data, and further optimize it based on feedback from electricity users.
[0030] Load data for encrypted areas is acquired in real time from each edge node of the Power HarmonyOS system. After decryption within the Power HarmonyOS trusted execution environment, the encrypted load data is compared with a preset load threshold to determine whether the current load in the area exceeds the preset load threshold. If the load exceeds the preset load threshold, a demand-side response strategy adjustment plan is generated using a decision tree algorithm based on environmental data and pre-established electricity user classification results. For electricity price adjustments, the range of price changes and adjustment cycle are calculated using a linear regression model based on the degree of load exceeding limits and historical electricity price data. For electricity restriction, the adjustment is based on the time period of load exceeding limits and pre-acquired electricity consumption data. Based on the electricity consumption habits of the main users, determine the specific time and power range for restricting electricity consumption; push the electricity price change range, adjustment cycle, and restricted electricity consumption time and power range to at least one electricity user terminal; based on the response data of the demand-side response strategy adjustment scheme obtained from each electricity user terminal, use the K-means clustering algorithm to update the electricity consumption behavior model of the different types of electricity users, and obtain the updated electricity consumption behavior model of the different types of electricity users; based on the updated electricity consumption behavior model of the different types of electricity users, re-evaluate and optimize the next demand-side response strategy, and obtain the adjusted demand-side response strategy.
[0031] For example, acquiring regional load data is the foundation for formulating demand-side response strategies. Encrypted regional load data is acquired in real-time from various Power Harmony edge nodes and decrypted within the Power Harmony Trusted Execution Environment (TEE) to obtain the encrypted regional load data. For instance, SM4-encrypted regional load data (ciphertext: A7F3C2...) at 15:00 is acquired from a Power Harmony edge node in an industrial area of Hangzhou. After decryption within the TEE, the plaintext load value of 1300kW is obtained. Comparing the acquired load data with a preset threshold is crucial for determining whether demand-side response is necessary. Assuming a preset load threshold of 100MW for a certain area, when the acquired load data shows that the regional load reaches 105MW, the system will automatically trigger the demand-side response mechanism. Environmental data and the classification results of electricity users are important bases for generating response strategies. Environmental data may include factors such as temperature, humidity, and sunlight, which affect electricity demand. The classification results of electricity users divide them into residential, commercial, and industrial electricity users, each with different electricity consumption characteristics and response capabilities. Decision tree algorithms can quickly generate targeted response strategies based on these input variables. Electricity price adjustments are a common demand-side response method. Linear regression models can analyze the relationship between historical load data and electricity price data to predict the impact of different electricity price levels on load. For example, the model might predict that increasing electricity prices by 10% could reduce electricity load by 5%. Based on this prediction, the system can formulate a reasonable electricity price adjustment plan. Electricity restriction is another effective demand-side response measure. By analyzing historical electricity consumption data of various electricity users, peak consumption periods and major electrical equipment for each type of user can be identified. For example, for industrial users, stricter power rationing measures might be implemented during off-peak seasons or non-working hours; while for commercial users, lowering air conditioning temperatures or turning off some lighting might be required during peak hours. Pushing the formulated response strategy to the user's terminal is a key step in achieving demand-side response. This can be achieved through smart home systems, industrial energy management systems, or mobile applications. Users can receive information such as electricity price change alerts and power rationing notices and respond accordingly. The actual response data of users is an important basis for evaluating and optimizing strategies. The K-means clustering algorithm can help identify different user response patterns. For example, it might be discovered that some electricity consumers are highly sensitive to changes in electricity prices, while others are more inclined to accept direct power restrictions. These insights can be used to update the electricity consumption behavior models for different types of consumers, thereby developing more targeted response strategies. Through continuous iterative optimization, demand-side response strategies can become increasingly precise and effective. For instance, the system might find that increasing electricity prices by 15% and limiting industrial electricity consumption to no more than 80% of rated power between 2 PM and 4 PM on weekdays can most effectively reduce the total regional load.This refined strategy can ensure the safety of the power grid while minimizing the impact on the normal lives and production of electricity users.
[0032] Load data from all edge nodes of the power ecosystem within the region is acquired and input into the adjusted demand-side response strategy. The strategy employs a load allocation algorithm to recalculate the grid load distribution. The recalculated load distribution is then input into a load balance judgment model to determine whether the load of each node is within a preset balance range. If the load distribution is balanced, a final demand-side management instruction, including electricity price adjustments, restricted electricity usage time and power range, is generated based on the recalculated load distribution. If the load distribution is unbalanced, a genetic algorithm is used to optimize the load allocation. The optimized load distribution is then input into the electricity user classification results and electricity usage habit model to determine the updated specific time and power range for restricted electricity usage. For electricity price adjustments, a linear regression model is used to recalculate the price change range and adjustment cycle. The calculation results are combined with the updated restricted electricity usage time and power range to generate an updated final demand-side management instruction.
[0033] For example, load allocation algorithms monitor the electricity load of various power edge nodes within a region in real time. For instance, during peak summer electricity consumption in a residential area, load data from multiple building complexes shows that commercial buildings reach 85% of their rated capacity during the day, while adjacent residential areas only reach 50%. In this case, the demand-side response strategy adjusts according to the load distribution. The load balancing judgment model evaluates based on a preset load balancing range, such as controlling the load of each node between 60% and 70% of its rated capacity. When the electricity load in the commercial area is too high, the model triggers a load balancing mechanism, guiding electricity consumption behavior by adjusting electricity usage periods and prices. Genetic algorithms, during load optimization, iteratively optimize the load allocation scheme by simulating the principle of natural selection. For example, in an industrial park, the operating times of high-energy-consuming equipment in large manufacturing enterprises are staggered to avoid peak electricity consumption periods, while also considering the electricity usage priorities and cost sensitivity of different electricity users. The electricity user classification results and electricity usage habit models can identify the electricity usage characteristics of different types of electricity users. For commercial electricity users, the model analyzes their business hours and air conditioning usage patterns; for residential electricity users, it focuses on peak-hour electricity consumption. This data supports more precise demand-side management decisions. Electricity price adjustments use a linear regression model to predict the degree of response of electricity users to price changes. For example, when electricity prices increase by 20%, the electricity consumption of a certain type of electricity user is expected to decrease by 15%. Through time-of-use pricing policies, electricity users are guided to shift some of their electricity demand to off-peak periods, thereby achieving peak shaving and valley filling. The final demand-side management instructions comprehensively consider multiple factors: in terms of electricity prices, prices may be increased during the peak consumption period from 2 pm to 5 pm; in terms of electricity restrictions, some non-essential loads are required to reduce their power to 70% of their rated value during specific periods. These measures work together to ensure the overall balance of grid load distribution. Through this multi-level demand-side response strategy, the safe and stable operation of the grid is guaranteed, while the electricity demand of different electricity users is met to the greatest extent. The entire process forms a closed-loop feedback mechanism, continuously optimizing load allocation schemes and improving grid operating efficiency.
[0034] Step S106: Recalculate the power grid load distribution based on the adjusted integrated strategy, determine the balance, generate the final management instruction and issue it for execution, obtain load optimization effect data, analyze the impact of environmental factors, and dynamically update the electricity consumption behavior model and response strategy.
[0035] The final demand-side management instructions are issued to each electricity-consuming entity's terminal. Each electricity-consuming entity's terminal receives the final demand-side management instructions and executes load optimization operations. During the terminal execution process, the associated terminal hardware operation and maintenance components are repaired via computers and auxiliary equipment, and the operational stability of the terminal execution unit and control module is verified in real time. For the load optimization operation, a genetic algorithm is used to optimize load allocation. The specific implementation process includes initializing the population, calculating fitness, selection, crossover, and mutation to obtain the optimized load distribution. The optimized load distribution is input into the load balancing judgment model. The load balancing judgment model determines whether the load is within the preset load balancing range based on a preset load balancing threshold. If the load distribution is unbalanced, a linear regression model is used to calculate the range of electricity price changes and the adjustment cycle. The specific implementation process includes data collection, model training, and prediction. The server on which the model training depends is equipped with a remote operation and maintenance plugin for computers and auxiliary equipment repair, which can monitor the operating indicators of the server's storage and computing modules in real time and quickly locate and repair hardware anomalies. Based on the range of electricity price changes and the adjustment cycle, combined with the restricted electricity consumption time and power range, the final demand-side management instructions are updated. The updated final demand-side management instructions are transmitted to the terminals of each electricity user, and the load optimization operation is re-executed to obtain load optimization effect data.
[0036] For example, final demand-side management instructions are issued to each electricity-consuming entity's terminal. These instructions include specific electricity consumption strategies and optimization suggestions. For instance, for a large shopping mall, the platform might send instructions requiring the air conditioning temperature to be raised by 2 degrees Celsius and lighting consumption to be reduced by 30% during the peak electricity consumption period from 2 PM to 5 PM. Upon receiving these instructions, each electricity-consuming entity's terminal automatically executes the corresponding load optimization operations. In the load optimization process, a genetic algorithm plays a crucial role. This algorithm simulates the process of biological evolution, iteratively searching for the optimal solution. In the initial population phase, the system may generate 100 different load allocation schemes. When calculating fitness, each scheme is assigned a score based on its impact on grid stability and electricity-consuming entity satisfaction. The selection phase retains the best-performing schemes, such as the top 50%. The crossover operation combines the characteristics of these excellent schemes to generate new schemes. The mutation operation introduces randomness to avoid getting trapped in local optima. After multiple rounds of iteration, an optimized load distribution scheme that ensures grid stability while maximizing the satisfaction of electricity-consuming entities' needs is finally obtained. The load balancing assessment model plays a crucial role in ensuring the rationality of load distribution. This model makes judgments based on preset load balancing thresholds, such as requiring that the load in each area not exceed 80% of its rated capacity, and that the load difference between adjacent areas not exceed 20%. If an industrial park is found to be at 90% of its rated capacity, while the surrounding residential areas are at only 60%, the model will determine that the current load distribution is unbalanced and requires further adjustment. When the load distribution is unbalanced, a linear regression model is used to calculate the range of electricity price changes and the adjustment cycle. This model establishes the relationship between electricity consumption and electricity price by analyzing historical data. For example, by collecting electricity price and consumption data from the past year, the model may conclude that for every 1% increase in electricity price, electricity consumption decreases by an average of 0.8%. Based on this relationship, the platform can predict that a 10% increase in electricity price during peak hours may lead to an 8% decrease in electricity consumption, thereby achieving load balancing. Updated demand-side management instructions not only include electricity price adjustments but also involve electricity usage time and power restrictions. For example, for a large factory, the new instructions may require it to reduce the power consumption of non-critical production lines to 70% of normal levels between 8 pm and 4 am the following day. This multi-dimensional adjustment strategy enables more effective load optimization. Each electricity consumer executes the updated instructions and feeds back the optimization results to the intelligent platform. This data includes information such as actual load changes and consumer responsiveness, providing a foundation for continuous platform optimization. Through this closed-loop feedback mechanism, the demand-side management system can continuously improve its accuracy and effectiveness, ultimately achieving dynamic balance and efficient utilization of the power grid load.
[0037] Based on grid load data and load optimization effect data, the grid load data and load optimization effect data are input into a pre-established load monitoring model to obtain processed data output by the load monitoring model. Time series analysis is then applied to the processed data to identify holiday effects and temperature sensitivity, and electricity consumption data of different types of electricity users is extracted from the time series analysis results. This electricity consumption data is then input into a behavior model training module, where gradient descent is used to update and train the updated electricity consumption behavior models for different types of electricity users, resulting in the latest electricity consumption behavior models for different types of electricity users. These latest electricity consumption behavior models are then input into a strategy generation module, where, in conjunction with the adjusted demand-side response strategy, a decision tree algorithm is used to optimize and update the demand-side management strategy.
[0038] For example, load monitoring models acquire real-time grid load data and optimization effect data. For instance, during peak summer electricity consumption in an industrial park, the load peak on weekdays reaches 85% of rated capacity, while the optimized load shows the peak reduced to 70%. This processed data reflects the changing trends and optimization effects of electricity load. Time series analysis methods can identify holiday effects and temperature sensitivity. For example, during the Spring Festival, the electricity load of a residential community will significantly decrease, while air conditioning load will significantly increase during hot weather. Data analysis of a commercial area shows that weekend electricity load increases by 20% compared to weekdays, and for every degree Celsius increase in temperature, air conditioning load increases by 5%. This analysis helps extract more accurate electricity consumption data for different types of users. Electricity consumption behavior models for different types of users are trained using gradient descent. By analyzing historical electricity consumption data, the electricity demand of users at different times can be predicted. For example, an electricity consumption behavior model for an office building shows that the peak electricity consumption period is from 9:00 AM to 11:00 AM, during which air conditioning and lighting loads account for 60% of the total load. During model training, parameter weights are continuously adjusted to make the predicted results closer to actual electricity consumption. The strategy generation module uses decision tree algorithms to optimize demand-side management strategies, enabling the development of differentiated response plans based on different scenarios. For example, during peak electricity consumption periods, for industrial users with a large number of interruptible loads, a time-of-use pricing strategy can be adopted to shift some production tasks to off-peak periods. For commercial users, electricity prices are increased during peak hours to guide them to stagger their electricity consumption. This strategy can achieve stable grid load operation. To improve model accuracy, the electricity consumption characteristics and response intentions of users also need to be considered. For example, a factory's production equipment has strong continuity requirements and is not suitable for frequent start-ups and shutdowns; therefore, the start-up and shutdown costs of equipment must be included in the decision-making process when formulating management strategies. By establishing a complete data analysis and decision-making chain, refined management of electricity load can be achieved, improving grid operating efficiency. In practical applications, model updates and optimizations are an ongoing process. By comparing load values before and after optimization, the effectiveness of the management strategy can be evaluated. For example, after implementing a demand-side response strategy in a certain region, peak-hour load decreased by 15%, electricity costs for electricity users decreased by 10%, and the grid's peak-shaving capacity was improved. This data can be used to guide the improvement and optimization of subsequent strategies.
[0039] The above description of the embodiments is only for the purpose of helping to understand the technical solutions and core ideas of this application; those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A demand-side response power management method based on the HarmonyOS power architecture, characterized in that: The method includes: Collect electricity consumption data from multiple sources, clean and integrate the data, combine it with environmental data, extract electricity consumption, load values and power factor characteristics, and obtain classification results for three types of electricity users: industrial, commercial and residential through clustering. The classification results are encrypted and transmitted to a secure execution environment. By integrating environmental data with the electricity consumption characteristics of different types of electricity consumers, electricity consumption behavior models are constructed. Based on the model output, peak electricity demand is determined, and dynamic electricity pricing strategies and automatic response rules are generated to adapt to different types of electricity consumers, taking into account both electricity demand and control objectives. Push dynamic electricity pricing strategies to electricity-consuming terminals, collect terminal response data, and optimize strategies by associating them with electricity pricing information; Real-time monitoring of regional load; if load is abnormal, a regional demand-side response strategy is generated by combining the classification results of electricity users with environmental data, and further optimized based on feedback from electricity users. Based on the adjusted comprehensive strategy, the power grid load distribution is recalculated, the balance is judged, the final management command is generated and issued for execution, load optimization effect data is obtained, the impact of environmental factors is analyzed, and the electricity consumption behavior model and response strategy are dynamically updated. The collected multi-source electricity consumption data, after cleaning and integration, combined with environmental data, extracts electricity consumption, load values, and power factor characteristic values, including: Raw electricity consumption data is collected by the Power Harmony edge computing nodes deployed in substations. The Power Harmony edge computing nodes are used to clean the raw electricity consumption data. If outliers or missing values are found, the long short-term memory network anomaly detection module built into the Power Harmony edge computing nodes is used to identify and replace the outliers. Missing values are repaired by data complementarity between adjacent Power Harmony nodes, resulting in a cleaned data table. By combining environmental values including temperature, humidity and air pressure, the cleaned data table is Z-score standardized to obtain a standard value table. Extract the electricity consumption and load values from the standard value table, and calculate the power value and power factor characteristic value according to the formula P=UI and power factor characteristic value=active power / apparent power, where P is electric power, U is voltage, and I is current; The K-means clustering algorithm is used to classify electricity consumption and load values, and to divide electricity consumption patterns. The relationship between power values and power factor characteristic values is analyzed using a linear regression algorithm to establish a power factor prediction model; By combining electricity consumption patterns with a power factor prediction model, power factor characteristic values are generated.
2. The method according to claim 1, characterized in that, The collected multi-source electricity consumption data, after cleaning and integration, combined with environmental data, extracts electricity consumption, load values, and power factor characteristic values. Through clustering, it obtains classification results for three categories of electricity consumers: industrial, commercial, and residential. Obtain the electricity consumption, load value, and power factor characteristic value of each Power Harmony edge computing node. Construct the power consumption subject feature vector based on the electricity consumption, load value, and power factor characteristic value. Calculate the similarity between the power consumption subject feature vectors based on the Euclidean distance formula, combined with the power consumption subject feature vectors and the reputation weight factor introduced by the dynamic reputation value evaluation module in the Power Harmony architecture, and obtain the similarity matrix. For the similarity matrix, principal component analysis is used to obtain the feature distribution. Based on the feature distribution, K-means clustering algorithm is used to calculate the K-means clustering algorithm using the heterogeneous accelerator of the HarmonyOS protocol stack to group the electricity users and obtain the profile coefficient. If the silhouette coefficient is less than or equal to the preset silhouette coefficient threshold, the clustering effect is invalid, and the similarity and silhouette coefficient are recalculated. If the silhouette coefficient is greater than the preset silhouette coefficient threshold, the clustering effect is determined to be valid, and the Davies-Bouldin index is used to further verify the clustering quality and generate clustering results. Based on the clustering results, the electricity users were divided into three categories—industrial, commercial, and residential—through t-SNE dimensionality reduction visualization analysis, resulting in the electricity user classification results.
3. The method according to claim 1, characterized in that, The process involves encrypting and transmitting the classification results to a secure execution environment, integrating environmental data with the electricity consumption characteristics of different types of electricity users, and constructing electricity consumption behavior models for these users. The classification results of electricity users are encrypted and transmitted to the Power Harmony protocol stack and then transmitted to the Power Harmony trusted execution environment. The classification results are decrypted within the Power Harmony trusted execution environment to obtain the load values of the three types of electricity users: industrial, commercial, and residential. The load values of the three types of electricity users are analyzed to extract the peak-to-valley ratio and load factor of the load values of the three types of electricity users. Correlation analysis was conducted between peak-to-valley ratio and load factor and temperature and humidity values in weather forecast data to determine the degree of influence of temperature and humidity values on load values. Environmental impact factors are extracted from holiday schedules and emergency information, and quantified into numerical form. Using peak-to-valley ratio, load factor characteristics, temperature and humidity values, and environmental influencing factors as input variables, a model of electricity consumption behavior for different types of electricity users is constructed. If the error value of the electricity consumption behavior model of different types of electricity users exceeds the preset error threshold, the grid search method is used to adjust the parameters of the electricity consumption behavior model of different types of electricity users and retrain the model. If the error value is within the preset error threshold, the model is deemed usable. The electricity load change trend in the next 24 hours is calculated by using electricity consumption behavior models of different types of electricity users, and load forecast results are generated.
4. The method according to claim 1, characterized in that, The process of determining peak electricity demand based on model output and generating dynamic electricity pricing strategies and automatic response rules adapted to different types of electricity consumers, taking into account both electricity demand and control objectives, includes: The load forecast results output by the power consumption behavior model of different types of power users are compared with the preset peak values. If the load value predicted by the load forecast results exceeds the peak value, it is determined that there is a peak in power consumption. Based on the determination of peak electricity consumption, and based on the preset dynamic electricity price adjustment rules, electricity price strategies for different time periods are generated. Electricity price information for each time period is extracted from the electricity pricing strategy, and combined with the type of electricity user, a dataset of the response behavior of the electricity user is generated by applying the preset automatic response rules of the electricity user. The dataset of electricity user response behavior is preprocessed, including data cleaning and feature extraction, to generate a feature set that can be used for model training; A random forest-based classification model is trained using feature sets to predict the electricity consumption behavior of electricity users under dynamic electricity prices, thus obtaining predicted electricity consumption behavior data of electricity users. Based on the predicted electricity consumption behavior data of major electricity users, adjust the electricity pricing strategy and optimize the dynamic electricity pricing adjustment mechanism; The optimized dynamic electricity price adjustment mechanism generates an adjusted dynamic electricity price strategy and updates the automatic response rules for electricity users.
5. The method according to claim 1, characterized in that, The process of pushing dynamic electricity pricing strategies to electricity-consuming terminals, collecting terminal response data, and associating it with electricity pricing information to optimize strategies includes: The system obtains the adjusted dynamic electricity pricing strategy for different time periods, encrypts and broadcasts the obtained adjusted dynamic electricity pricing strategy data using the Power Harmony device management protocol, and sends it to the electricity user terminal. When the electricity user terminal receives the data, it needs to decrypt and verify the data integrity and strategy signature within the Power Harmony trusted execution environment. Based on the dynamic electricity pricing strategy data obtained from the electricity user's terminal, the system uses pre-established rules to determine whether the electricity price information exceeds the preset electricity price threshold. If the electricity price exceeds the preset electricity price threshold, an instruction will be triggered to shut down high-power appliances or delay the start-up of high-power appliances; The electricity price information is correlated with the terminal response behavior of electricity users to generate a response behavior dataset. A decision tree algorithm was used to train a predictive model of the response behavior of electricity users. The trained prediction model is applied to new electricity pricing strategy data to generate prediction results of the response behavior of electricity users. Based on the predicted response behavior of electricity users, optimization algorithms are used to adjust the preset electricity price threshold and push mechanism in the dynamic electricity price strategy, thereby optimizing the terminal response rules of electricity users. The adjusted electricity pricing strategy will be pushed back to the electricity users to complete the closed-loop optimization.
6. The method according to claim 2, characterized in that, The real-time monitoring of regional load, if abnormal load is detected, will generate a regional demand-side response strategy by combining the classification results of electricity users with environmental data, and further optimize it based on feedback from electricity users, including: The encrypted area load data is obtained in real time from each Power Harmony edge node. After being decrypted in the Power Harmony trusted execution environment, the encrypted area load data is compared with a preset load threshold to determine whether the current area load exceeds the preset load threshold. If the load in the area exceeds the preset load threshold, a demand-side response strategy adjustment plan is generated based on environmental data and the classification results of electricity users. Regarding electricity price adjustments, a linear regression model is used to calculate the range of price changes and the adjustment cycle based on the degree of overload and historical electricity price data. In response to electricity restrictions, the specific time and power range for electricity restrictions are determined based on the time period of excessive load and the electricity consumption habits of the main users obtained in advance. The electricity price change range, adjustment cycle, restricted electricity time and power range are pushed to at least one electricity user terminal. Based on the response data of the response strategy adjustment scheme obtained from the terminals of each electricity user, the electricity consumption behavior model of different types of electricity users is updated using the K-means clustering algorithm to obtain the updated electricity consumption behavior model of different types of electricity users. Based on the updated electricity consumption behavior model of different types of electricity users, the demand-side response strategy for the next time is re-evaluated and optimized to obtain the adjusted demand-side response strategy.
7. The method according to claim 1, characterized in that, The real-time monitoring of regional load, if abnormal load is detected, generates a regional demand-side response strategy by combining the classification results of electricity users with environmental data, and further optimizes it based on feedback from electricity users. This also includes: Obtain load data of all power Harmony edge nodes in the region, input the load data of all power Harmony edge nodes into the adjusted demand-side response strategy, and recalculate the power grid load distribution in the strategy using a load allocation algorithm; The recalculated load distribution is input into the preset load balance judgment model, and the model determines whether the load of each node is within the preset load balance range. If the load distribution is balanced, then the final demand-side management instructions, including electricity price adjustments, restrictions on electricity usage time and power range, are generated based on the recalculated load distribution. If the load distribution is uneven, a genetic algorithm is used to optimize the load allocation. The optimized load distribution is then input into a preset electricity consumption habit model to determine the specific time and power range for the updated electricity restriction. In response to electricity price adjustments, a linear regression model is used to recalculate the range of electricity price changes and the adjustment cycle. The calculation results are then combined with the updated restricted electricity consumption time and power range to generate updated final demand-side management instructions.
8. The method according to claim 1, characterized in that, The process of recalculating the power grid load distribution based on the adjusted comprehensive strategy, determining the balance, generating final management instructions, issuing and executing them, and obtaining load optimization effect data includes: The final demand-side management instructions are issued to the terminals of each electricity user. Each electricity user terminal receives the final demand-side management instructions and executes load optimization operations; For load optimization operations, a genetic algorithm is used to optimize load allocation. The specific implementation process includes initializing the population, calculating fitness, selection, crossover, and mutation to obtain the optimized load distribution. The optimized load distribution is input into the load balancing judgment model, which determines whether the load is within the preset load balancing range based on the preset load balancing threshold. If the load distribution is uneven, a linear regression model is used to calculate the range of electricity price changes and the adjustment cycle. The specific implementation process includes data collection, model training and prediction. Based on the range and adjustment cycle of electricity price changes, and in conjunction with the time and power restrictions on electricity consumption, update the final demand-side management instructions; The updated final demand-side management instructions are transmitted to the terminals of each electricity user, and the load optimization operation is re-executed to obtain load optimization effect data.
9. The method according to claim 1, characterized in that, The process involves recalculating the power grid load distribution based on the adjusted integrated strategy, determining the balance, generating and issuing final management instructions, obtaining load optimization effect data, analyzing the impact of environmental factors, and dynamically updating the electricity consumption behavior model and response strategy, including: Based on the power grid load data and the load optimization effect data, the power grid load data and the load optimization effect data are input into a pre-established load monitoring model to obtain the processed data output by the load monitoring model. The processed data is then processed using time series analysis methods to identify holiday effects and temperature sensitivity in the processed data, and electricity consumption data of different types of electricity users are extracted from the time series analysis results. The electricity consumption data of the electricity users are input into the behavior model training module. In the behavior model training module, the gradient descent method is used to update and train the updated electricity consumption behavior model of different types of electricity users to obtain the latest electricity consumption behavior model of different types of electricity users. The latest electricity consumption behavior models of different types of electricity users are input into a preset strategy generation module. In the strategy generation module, the adjusted demand-side response strategy is combined with a decision tree algorithm to optimize and update the demand-side management strategy.