Photovoltaic smart home cooperative control method and device

By acquiring and integrating data from photovoltaic energy systems and smart home devices, and utilizing inverse reinforcement learning model generation strategies, collaborative control of photovoltaic energy systems and smart home devices was achieved. This solved the balance problem between efficient utilization of photovoltaic energy and intelligent control of home devices in the energy management system, thereby improving energy utilization efficiency and user experience.

CN121763793APending Publication Date: 2026-03-31GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing energy management systems struggle to find the optimal balance between efficient use of photovoltaic energy and intelligent control of home appliances, making it difficult to achieve dynamic and optimal allocation of electricity.

Method used

By acquiring data from photovoltaic energy systems and smart home devices, feature extraction and fusion are performed to generate joint feature vectors. Inverse reinforcement learning models are then used to generate energy storage charging and discharging strategies and device control strategies, thereby achieving coordinated control of photovoltaic energy systems and smart home devices.

Benefits of technology

It has increased the self-consumption rate of photovoltaic power generation by 15%-20%, improved the charging and discharging efficiency of energy storage equipment by 10%-15%, reduced the dependence of the household power grid by more than 20%, improved the coordination and matching between home appliances and photovoltaic power generation by 25%-30%, reduced the frequency of manual intervention by users by more than 40%, and significantly improved the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121763793A_ABST
    Figure CN121763793A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic smart home cooperative control method and device. The method comprises the steps of obtaining photovoltaic energy data of a photovoltaic energy system and equipment data of smart home equipment, and obtaining environment data of an area where the smart home equipment is located; performing feature extraction on the three kinds of data to obtain multi-dimensional working condition feature data; predicting photovoltaic prediction data of a predetermined future time window based on the historical photovoltaic data in the predetermined historical time window; fusing the multi-dimensional working condition feature data with the photovoltaic prediction data to obtain a joint feature vector; generating an energy storage charging and discharging strategy and an equipment control strategy according to the joint feature vector; and performing cooperative control on the photovoltaic energy system and the smart home equipment according to the energy storage charging and discharging strategy and the equipment control strategy. According to the invention, a technical problem that dynamic optimal distribution of electric energy cannot be realized because an energy management system is difficult to find an optimal balance point between efficient utilization of photovoltaic energy and intelligent control of household equipment in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power management technology, and more specifically, to a photovoltaic smart home collaborative control method and device. Background Technology

[0002] Currently, with the escalating global energy crisis and increased environmental awareness, photovoltaic (PV) energy, as a crucial component of renewable energy, is being increasingly widely used in home energy systems. PV systems convert sunlight into electricity, providing homes with a clean and sustainable energy source. However, PV energy output is affected by sunlight intensity and weather conditions, exhibiting fluctuations and intermittency, which presents new challenges for home energy management. Simultaneously, the widespread adoption of smart home devices has led to more diversified and personalized home energy needs, making it difficult for traditional energy management systems to find the optimal balance between efficient PV energy utilization and intelligent control of home devices.

[0003] Existing technological solutions primarily rely on two approaches to address the aforementioned challenges. One approach employs traditional PID control algorithms, adjusting the charging and discharging states of energy storage devices to achieve energy allocation by monitoring real-time photovoltaic power generation and household electricity load. The other approach introduces basic reinforcement learning algorithms, such as Q-learning, to optimize the matching of photovoltaic energy with home appliances by learning behavioral strategies in dynamic environments, thereby reducing household electricity costs. However, both of these technological solutions have inherent limitations.

[0004] While energy management systems employing PID control can dynamically adjust the charging and discharging states of energy storage devices based on real-time monitoring data, the fixed-parameter model of PID control struggles to adapt to the volatility of photovoltaic energy when dealing with nonlinear and highly dynamic energy supply and demand scenarios. For example, in cases of sudden increases or decreases in sunlight intensity or sudden changes in household electricity load, traditional PID control often fails to respond quickly, leading to wasted photovoltaic power or over-reliance on grid power, thus reducing energy utilization efficiency and economy.

[0005] For energy optimization methods incorporating basic reinforcement learning, Q-learning-based approaches attempt to construct a state space that matches photovoltaic energy output and household electricity demand, training an agent to output better device control strategies to achieve energy savings. However, basic Q-learning algorithms suffer from low state space dimensionality and weak generalization ability. When faced with complex and ever-changing household electricity environments, the agent may struggle to learn and adapt quickly, especially when considering individual user habits (such as low daytime load and high evening load for working families) and specific household scenario needs (such as the coordinated control of appliances during movie watching and cooking). Therefore, these methods often fail to provide effective solutions for personalized, scenario-based energy control.

[0006] There is currently no effective solution to the above problems. Summary of the Invention

[0007] This invention provides a photovoltaic smart home collaborative control method and device to at least solve the technical problem in related technologies that energy management systems are unable to find the optimal balance between efficient utilization of photovoltaic energy and intelligent control of home devices, thus failing to achieve dynamic optimal allocation of electrical energy.

[0008] According to one aspect of the present invention, a photovoltaic smart home collaborative control method is provided, comprising: acquiring photovoltaic energy data of a photovoltaic energy system and device data of a smart home device, and acquiring environmental data of the area where the smart home device is located, wherein the photovoltaic energy system is used to provide operating power for the smart home device; performing feature extraction on the photovoltaic energy data, the device data, and the environmental data to obtain multi-dimensional operating condition feature data; predicting photovoltaic forecast data for a predetermined future time window based on historical photovoltaic data within a predetermined historical time window; fusing the multi-dimensional operating condition feature data with the photovoltaic forecast data to obtain a joint feature vector; generating an energy storage charging and discharging strategy for the photovoltaic energy system and a device control strategy for the smart home device according to the joint feature vector; and performing collaborative control of the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0009] Optionally, acquiring photovoltaic energy data from the photovoltaic energy system and device data from the smart home device includes: monitoring the power generation information of the photovoltaic panel through a first sensor installed around the photovoltaic panel of the photovoltaic energy system to obtain the power generation capacity; monitoring the charging and discharging status of the energy storage device through a second sensor built into the energy storage device of the photovoltaic energy system to obtain the charging and discharging data of the energy storage device; and collecting device status data and power consumption data of the smart home device through a third sensor installed in the smart home device.

[0010] Optionally, feature extraction is performed on the photovoltaic energy data, the equipment data, and the environmental data to obtain multi-dimensional operating condition feature data, including: selecting highly correlated data from the photovoltaic energy data, the equipment data, and the environmental data whose correlation with the expected data is higher than a correlation threshold, wherein the expected data is the target data to be achieved in advance for the photovoltaic energy system and the smart home device; extracting the dependency and trend information of the highly correlated data through a long short-term memory network; and fusing the highly correlated data based on the dependency and trend information to obtain the multi-dimensional operating condition feature data.

[0011] Optionally, the historical photovoltaic data is input into a photovoltaic prediction model to process the historical photovoltaic data using the photovoltaic prediction model to obtain the photovoltaic prediction data. The photovoltaic prediction model is a model trained by machine learning using multiple sets of training data. Each set of training data includes: sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data.

[0012] Optionally, the multidimensional operating condition feature data and the photovoltaic prediction data are fused to obtain a joint feature vector, including: superimposing the multidimensional operating condition feature data and the photovoltaic prediction data to obtain superimposed data; performing feature fusion on the superimposed data through a fully connected layer to obtain an initial joint feature vector; acquiring electricity consumption preference data and lifestyle habit data; and embedding the electricity consumption preference data and the lifestyle habit data into the initial joint feature vector to obtain the joint feature vector.

[0013] Optionally, generating the energy storage charging and discharging strategy of the photovoltaic energy system and the device control strategy of the smart home device based on the joint feature vector includes: obtaining the current operating state reflected in the joint feature vector; setting a multi-objective reward function; and outputting the energy storage charging and discharging strategy and the device control strategy based on the current operating state and the multi-objective reward function.

[0014] Optionally, the photovoltaic energy system and the smart home device are coordinated and controlled according to the energy storage charging and discharging strategy and the device control strategy, including: sending the energy storage charging and discharging strategy and the device control strategy to the execution layer of the smart home system where the smart home device is located, so as to utilize the execution layer to coordinate and control the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0015] Optionally, after coordinating the control of the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic smart home coordinating control method further includes: obtaining the execution results of the photovoltaic energy system and the smart home device; and optimizing the multi-objective reward function based on the execution results.

[0016] According to another aspect of the present invention, a photovoltaic smart home collaborative control device is also provided, comprising: a first acquisition unit, configured to acquire photovoltaic energy data of a photovoltaic energy system and device data of a smart home device, and acquire environmental data of the area where the smart home device is located, wherein the photovoltaic energy system is used to provide operating power for the smart home device; a feature extraction unit, configured to extract features from the photovoltaic energy data, the device data, and the environmental data to obtain multi-dimensional operating condition feature data; a prediction unit, configured to predict photovoltaic prediction data for a predetermined future time window based on historical photovoltaic data within a predetermined historical time window; a fusion unit, configured to fuse the multi-dimensional operating condition feature data with the photovoltaic prediction data to obtain a joint feature vector; a strategy generation unit, configured to generate an energy storage charging and discharging strategy for the photovoltaic energy system and a device control strategy for the smart home device based on the joint feature vector; and a control unit, configured to perform collaborative control of the photovoltaic energy system and the smart home device based on the energy storage charging and discharging strategy and the device control strategy.

[0017] Optionally, the first acquisition unit includes: a first acquisition module, used to monitor the power generation information of the photovoltaic panel through a first sensor installed around the photovoltaic panel of the photovoltaic energy system, and obtain the power generation power; a monitoring module, used to monitor the charging and discharging status of the energy storage device through a second sensor built into the energy storage device of the photovoltaic energy system, and obtain the charging and discharging data of the energy storage device; and a collection module, used to collect the device status data and power consumption data of the smart home device through a third sensor installed in the smart home device.

[0018] Optionally, the feature extraction unit includes: a selection module, used to select highly relevant data from the photovoltaic energy data, the equipment data, and the environmental data, wherein the relevant data to the desired data is a target data to be achieved in advance for the photovoltaic energy system and the smart home device; an extraction module, used to extract the dependency and trend information of the highly relevant data through a long short-term memory network; and a fusion processing module, used to perform fusion processing on the highly relevant data based on the dependency and trend information to obtain the multidimensional operating condition feature data.

[0019] Optionally, the prediction unit includes: an input module for inputting the historical photovoltaic data into a photovoltaic prediction model, so as to process the historical photovoltaic data using the photovoltaic prediction model to obtain the photovoltaic prediction data, wherein the photovoltaic prediction model is a model trained by machine learning using multiple sets of training data, and each set of multiple sets of training data includes: sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data.

[0020] Optionally, the fusion unit includes: an overlay module for overlaying the multi-dimensional operating condition feature data and the photovoltaic prediction data to obtain overlay data; a feature fusion module for performing feature fusion on the overlay data through a fully connected layer to obtain an initial joint feature vector; acquiring electricity consumption preference data and lifestyle habit data; and a second acquisition module for embedding the electricity consumption preference data and lifestyle habit data into the initial joint feature vector to obtain the joint feature vector.

[0021] Optionally, the strategy generation unit includes: a third acquisition module, used to acquire the current operating condition reflected in the joint feature vector; a function setting module, used to set a multi-objective reward function; and an output module, used to output the energy storage charging and discharging strategy and the equipment control strategy according to the current operating condition and the multi-objective reward function.

[0022] Optionally, the control unit includes a sending module, configured to send the energy storage charging and discharging strategy and the device control strategy to the execution layer of the smart home system where the smart home device is located, so that the execution layer can coordinately control the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0023] Optionally, the photovoltaic smart home collaborative control device further includes: a second acquisition unit, configured to acquire the execution results of the photovoltaic energy system and the smart home device after performing collaborative control of the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy; and an optimization unit, configured to optimize the multi-objective reward function according to the execution results.

[0024] According to one aspect of the present invention, a smart home system is provided, wherein the smart home system uses the photovoltaic smart home collaborative control method described in any one of the above embodiments.

[0025] According to one aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the photovoltaic smart home collaborative control method described in any one of the above embodiments.

[0026] According to one aspect of the present invention, a processor is provided for running a program, wherein the program executes the photovoltaic smart home collaborative control method described in any one of the above embodiments.

[0027] According to one aspect of the present invention, a computer program product is provided, including computer instructions, which, when executed by a processor, perform the photovoltaic smart home collaborative control method described in any one of the above embodiments.

[0028] In this embodiment of the invention, photovoltaic energy data from a photovoltaic energy system and device data from smart home devices are acquired, along with environmental data from the area where the smart home devices are located. The photovoltaic energy system provides power to the smart home devices. Feature extraction is performed on the photovoltaic energy data, device data, and environmental data to obtain multi-dimensional operating condition feature data. Photovoltaic prediction data for a predetermined future time window is predicted based on historical photovoltaic data within a predetermined historical time window. The multi-dimensional operating condition feature data and the photovoltaic prediction data are fused to obtain a joint feature vector. An energy storage charging / discharging strategy for the photovoltaic energy system and a device control strategy for the smart home devices are generated based on the joint feature vector. The photovoltaic energy system and smart home devices are then coordinated and controlled according to the energy storage charging / discharging strategy and the device control strategy. Through the above technical solutions, an inverse reinforcement learning model integrating photovoltaic power generation prediction and load perception is constructed. This model includes an inverse learning module and a reinforcement learning agent to achieve dynamic energy allocation. A user habit perception submodule and an inverse reinforcement learning collaborative control submodule are designed. By training a preference recognition model and combining it with photovoltaic power generation prediction results, personalized linkage control between home appliances and photovoltaic energy is achieved. This results in a 15%-20% increase in photovoltaic self-consumption rate, a 10%-15% increase in the charging and discharging efficiency of energy storage devices, a reduction of more than 20% in household grid dependence, a 25%-30% improvement in the coordination and matching degree between home appliances and photovoltaic power generation rhythm, and a reduction of more than 40% in the frequency of user manual intervention. This significantly improves the user experience and solves the technical problem in related technologies where energy management systems struggle to find the optimal balance between efficient photovoltaic energy utilization and intelligent control of home appliances, thus failing to achieve dynamic optimal allocation of electricity. Attached Figure Description

[0029] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0030] Figure 1 This is a hardware structure block diagram of a mobile terminal for a photovoltaic smart home collaborative control method according to an embodiment of the present invention.

[0031] Figure 2This is a flowchart of a photovoltaic smart home collaborative control method according to an embodiment of the present invention;

[0032] Figure 3 This is a flowchart of an optional photovoltaic smart home collaborative control method according to an embodiment of the present invention;

[0033] Figure 4 This is a schematic diagram of a photovoltaic smart home collaborative control device according to an embodiment of the present invention.

[0034] The above figures include the following reference numerals:

[0035] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. Detailed Implementation

[0036] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0038] As described in the background section, related energy management systems often struggle to find the optimal balance between efficient photovoltaic energy utilization and intelligent control of home appliances, thus failing to achieve dynamic and optimal power allocation. This invention provides a control method and apparatus for a mobile robot, a mobile robot, a computer-readable storage medium, and a processor.

[0039] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0040] The methods and embodiments provided in this invention can be executed on a mobile terminal, a computer terminal, or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure block diagram of a mobile terminal for a photovoltaic smart home collaborative control method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The mobile terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0041] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the photovoltaic smart home collaborative control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The transmission device 106 is used to receive or send data via a network. Specific examples of the aforementioned networks may include wireless networks provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0042] Example 1

[0043] According to an embodiment of the present invention, a method embodiment of a photovoltaic smart home collaborative control method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0044] Figure 2 This is a flowchart of a photovoltaic smart home collaborative control method according to an embodiment of the present invention, such as... Figure 2 As shown, the method includes the following steps:

[0045] Step S202: Obtain photovoltaic energy data from the photovoltaic energy system and device data from the smart home devices, and obtain environmental data of the area where the smart home devices are located. The photovoltaic energy system is used to provide power for the smart home devices.

[0046] In this embodiment, the monitoring and control terminal collects 12-dimensional data, including photovoltaic power, energy storage SOC and temperature, appliance status and power, light / ambient temperature, and user operation records. This data is uploaded to the controller in JSON format via WiFi / RS485 and cached in an SQLite database (retained for 7 days). The transmission latency is ≤100ms, ensuring data real-time performance. The controller loads a pre-trained inverse reinforcement learning and LSTM prediction model, receives and preprocesses historical data from the past 7 days, uses the 3σ criterion to remove outliers, linear interpolation to fill in missing values, and Min-Max normalization to the [0,1] interval. The model pre-training data consists of 100,000 samples, including PVLib photovoltaic data and behavioral data from 200 households.

[0047] This method utilizes advanced Internet of Things (IoT) technology, monitoring key indicators such as light intensity, temperature, photovoltaic output power, and state of energy storage (SOC) through sensors installed on photovoltaic panels and energy storage devices. Simultaneously, it collects data on appliance operating status and power consumption, as well as external conditions such as light and temperature, from sensors within the smart home system. This data is collected in real-time and transmitted to a central controller via communication protocols such as Wi-Fi and RS485, and stored in an SQLite database, ensuring data real-time performance and integrity.

[0048] By implementing this control method, the system's response speed and control accuracy were significantly improved, with data upload latency strictly controlled within 100ms, ensuring the timeliness and effectiveness of decision-making. More importantly, the rich data dimensions and high accuracy enabled the system to analyze household energy usage patterns and environmental change trends in greater detail, providing high-quality information input for subsequent feature extraction, predictive modeling, and intelligent decision-making. This allows for refined management of photovoltaic energy and efficient collaborative control of smart home devices. Based on this, the system's photovoltaic self-consumption rate was significantly improved, grid dependence was effectively reduced, and user satisfaction was greatly enhanced, demonstrating the core role and practical benefits of data acquisition in the overall technical solution.

[0049] Step S204: Extract features from photovoltaic energy data, equipment data, and environmental data to obtain multi-dimensional operating condition feature data.

[0050] In this embodiment, the inverse module extracts 32-dimensional working condition features through a two-layer fully connected network (64→32 neurons, ReLU activation).

[0051] This method employs a feature extraction mechanism from inverse relation reinforcement learning. The core of this mechanism is the inverse relation learning module, which utilizes a deep neural network structure (such as a two-layer fully connected network) to transform raw historical photovoltaic power generation data, real-time sunlight / temperature data, energy storage SOC status, and real-time household electricity load into a more abstract and compact feature vector through non-linear mapping. Through this method, the system can capture deep correlations and latent patterns in the data, effectively extracting features representative of the current operating conditions even in complex and ever-changing real-world environments.

[0052] By implementing this control method and utilizing the inverse learning module, the system can overcome the problem of excessively large state spaces in traditional reinforcement learning to a certain extent, improving the algorithm's generalization ability and adaptability, especially performing better in nonlinear and dynamic scenarios. Secondly, integrating LSTM prediction results with current operating condition features generates a joint "operating condition-trend" feature vector, providing more comprehensive information support for subsequent decision-making, enabling the reinforcement learning agent to make more reasonable and effective control strategies. This process significantly improves the system's intelligence level, particularly in the efficiency of photovoltaic energy utilization and the precision of coordinated control of household devices, resulting in a qualitative leap.

[0053] Step S206: Based on historical photovoltaic data within a predetermined historical time window, predict photovoltaic forecast data for a predetermined future time window.

[0054] In this embodiment, the LSTM model uses power data from the past hour as input to predict the power curve for the next hour (step size 5 minutes, accuracy ≥85%).

[0055] The core of this method is to utilize a Long Short-Term Memory (LSTM) network to analyze historical photovoltaic (PV) data to predict PV output over a future period. LSTM is a special type of Recurrent Neural Network (RNN) designed specifically for processing long-sequence data. It possesses "memory" and "forget" gate mechanisms, enabling it to effectively learn long-term dependencies, making it particularly suitable for time-series problems such as PV power prediction. In this step, the LSTM model takes PV power data from a past period (e.g., the past hour) as input. Through its internal state transfer mechanism, it captures the dynamic changes in PV power generation, including the influence of environmental factors such as sunlight intensity and temperature, and then outputs a PV power prediction curve every 5 minutes for a future period (e.g., the next hour, 3 hours, or 6 hours). To improve prediction accuracy, the model training process considers historical data of the PV system, including the correspondence between environmental conditions such as sunlight and temperature and actual power generation. Through learning from a large number of samples, the model can make more accurate predictions under different sunlight and weather conditions.

[0056] By implementing this control method, the system's intelligence level has been significantly improved. Even in complex environments with varying sunlight intensity and fluctuating weather conditions, the system can still make reasonable decisions, avoiding waste of photovoltaic energy and excessive reliance on the grid. For example, when weaker sunlight is predicted, the system can pre-emptively charge energy storage devices to ensure sufficient backup energy. Conversely, when sunlight is abundant, photovoltaic energy can be prioritized to meet household loads, reducing energy purchases from the grid. Improved prediction accuracy directly promotes increased self-consumption of photovoltaic power and reduced grid dependence, ultimately achieving the goals of optimizing household energy usage patterns, reducing energy costs, and enhancing user experience.

[0057] Step S208: The multi-dimensional operating condition feature data and photovoltaic prediction data are fused to obtain a joint feature vector.

[0058] In this embodiment, the inverse network extracts 32-dimensional working condition features, which are then concatenated with the LSTM prediction results to form a joint feature vector of "working condition-trend". This vector is then input into the DQN decision-making process to provide data support for decision-making.

[0059] This method combines real-time operating conditions (such as current light intensity, temperature, energy storage status, and the power consumption and operating status of household appliances) with predicted photovoltaic power output trends. Utilizing the inverse matrix learning framework, it extracts key features that characterize the current operating status of the photovoltaic-home system and its future development trends. Inverse matrix learning is a learning method that infers inputs from outputs; here, it is used to analyze the intrinsic relationship between photovoltaic power generation and household electricity consumption, thereby capturing an abstract representation of these relationships in the joint feature vector.

[0060] By implementing this control method, the system can generate a highly condensed and information-rich joint feature vector. This vector not only reflects the current photovoltaic energy output and household electricity demand but also predicts future trends in photovoltaic power generation. This fusion significantly enhances the system's foresight and accuracy in decision-making. Based on this joint feature vector, reinforcement learning algorithms can formulate smarter and more efficient energy allocation strategies and control plans for household appliances, understanding and predicting the system's operating state. This comprehensive consideration of current and future energy supply and demand significantly improves energy management and utilization efficiency, while also enhancing the system's flexibility and adaptability to dynamic environments.

[0061] Step S210: Generate the energy storage charging and discharging strategy of the photovoltaic energy system and the device control strategy of the smart home device based on the joint feature vector.

[0062] In this embodiment, DQN selects the optimal action based on a multi-objective reward function (self-use rate 40% + SOC 30% + user matching 20% ​​+ stability 10%), and outputs energy storage charging and discharging (0.1kW step size) and home appliance control (start / stop, parameters). After the instructions are validated (power range, hardware compatibility), they are sent to the measurement and control terminal via TCP / IP protocol, with an execution delay of ≤200ms.

[0063] In this method, DQN constructs a state-action value function Q and approximates it using a deep neural network (DNN) to find actions that maximize long-term rewards in a given state. Here, the state is defined as a joint feature vector, and actions include adjusting the charging and discharging power of energy storage devices and the start-up, shutdown, and operating parameter adjustments of smart home appliances. The reinforcement learning agent continuously learns and optimizes its strategy through interaction with the environment to achieve optimal energy allocation and device control, maximizing the utilization of photovoltaic energy while meeting users' needs for home comfort and intelligence.

[0064] By implementing this control method, the system can intelligently adjust the charging and discharging state of the energy storage device according to changes in sunlight intensity, temperature, and electrical load. This ensures maximum storage of photovoltaic energy during periods of sufficient sunlight, while efficiently releasing the stored energy to supplement insufficient photovoltaic power supply during periods of insufficient sunlight or peak electricity consumption. Simultaneously, for smart home devices, the system can automatically adjust device operating time, parameter settings, and priorities based on user habits and personalized needs, achieving seamless coordination between device operation and photovoltaic energy output. This reduces unnecessary energy waste, lowers household dependence on the grid, and improves users' quality of life and energy efficiency.

[0065] Step S212: Perform coordinated control of the photovoltaic energy system and smart home devices according to the energy storage charging and discharging strategy and the equipment control strategy.

[0066] In this embodiment, the reward function weights can be customized, allowing users to adjust the proportions of each objective according to their needs (e.g., in the "maximum utilization of photovoltaics" scenario, the photovoltaic self-consumption rate weight can be adjusted to 60%, and in the "energy storage priority backup" scenario, the energy storage SOC weight can be adjusted to 50%). A new home appliance control mode selection is added, providing four modes: "fully automatic control, semi-manual control, energy-saving priority control, and comfort priority control." In semi-manual mode, users can lock the start / stop permissions of core home appliances (such as baby incubators), and the system only optimizes non-locked devices. For electric vehicle charging scenarios, a new V2H (vehicle-to-home) interactive control logic is added, incorporating electric vehicles into energy storage resource management. The system considers the vehicle's remaining battery power and estimated travel time simultaneously during decision-making, outputting the optimal charging and discharging strategy.

[0067] This method, based on closed-loop control theory, transforms the policy commands output by the intelligent agent into direct control of the photovoltaic energy system and smart home devices through monitoring and control terminals. Specifically, the system uses an inverse reinforcement learning strategy and the TCP / IP protocol to send energy storage charging and discharging commands and home appliance operating parameter adjustment commands, such as start / stop or priority settings, to the corresponding monitoring and control terminals. These terminals are responsible for executing these commands, dynamically adjusting the charging and discharging power of the energy storage device according to the policy commands, and intelligently controlling the on / off status and operating mode of the home appliances to ensure that the energy utilization of the entire home system meets the policy requirements.

[0068] By implementing this control method, the system can perform precise energy allocation and equipment control based on the current and predicted operating conditions reflected by the joint feature vector. This not only significantly improves the self-consumption rate of photovoltaic energy and reduces dependence on the grid, but also ensures that the operation of smart home devices better meets users' living habits and comfort needs. For example, when there is sufficient sunlight, the system will automatically increase the charging power of energy storage devices, while during periods of reduced sunlight or peak electricity consumption, the system will intelligently schedule the release of stored energy, prioritizing power supply to important home appliances. For smart home appliances, the system can automatically adjust the operating mode of the devices according to user preferences, such as turning off unnecessary devices during low-load days and prioritizing the start of air conditioners, refrigerators, etc., during high-load nights, reducing the need for manual intervention by users and improving overall energy efficiency and user satisfaction.

[0069] As described above, in this embodiment, photovoltaic energy data from the photovoltaic energy system and device data from the smart home devices are acquired, along with environmental data from the area where the smart home devices are located. The photovoltaic energy system provides power to the smart home devices. Feature extraction is performed on the photovoltaic energy data, device data, and environmental data to obtain multi-dimensional operating condition feature data. Photovoltaic prediction data for a predetermined future time window is predicted based on historical photovoltaic data within a predetermined historical time window. The multi-dimensional operating condition feature data is fused with the photovoltaic prediction data to obtain a joint feature vector. An energy storage charging / discharging strategy for the photovoltaic energy system and a device control strategy for the smart home devices are generated based on the joint feature vector. The photovoltaic energy system and smart home devices are then controlled according to the energy storage charging / discharging strategy and the device control strategy. The collaborative control of smart home devices achieves the construction of an inverse reinforcement learning model that integrates photovoltaic power generation prediction and load perception. This model includes an inverse learning module and a reinforcement learning agent to realize dynamic energy allocation. It also designs a user habit perception submodule and an inverse reinforcement learning collaborative control submodule. By training a preference recognition model and combining it with photovoltaic power generation prediction results, it achieves personalized linkage control between home devices and photovoltaic energy. This results in a 15%-20% increase in photovoltaic self-consumption rate, a 10%-15% increase in the charging and discharging efficiency of energy storage devices, a reduction of more than 20% in household grid dependence, a 25%-30% improvement in the coordination and matching degree between home devices and photovoltaic power generation rhythm, and a reduction of more than 40% in the frequency of user manual intervention, significantly improving the technical effect of user experience.

[0070] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art that energy management systems are unable to find the best balance between efficient utilization of photovoltaic energy and intelligent control of home devices, thus failing to achieve dynamic optimal allocation of electrical energy.

[0071] According to the above embodiments of the present invention, obtaining photovoltaic energy data of a photovoltaic energy system and device data of a smart home device includes: monitoring the power generation information of the photovoltaic panel by a first sensor installed around the photovoltaic panel of the photovoltaic energy system to obtain the power generation; monitoring the charging and discharging status of the energy storage device by a second sensor built into the energy storage device of the photovoltaic energy system to obtain the charging and discharging data of the energy storage device; and collecting device status data and power consumption data of the smart home device by a third sensor installed in the smart home device.

[0072] In this embodiment, a new data acquisition redundancy design is added. Core data (photovoltaic power, energy storage SOC, and core home appliance status) are simultaneously uploaded via both WiFi and LoRa links. When WiFi communication is interfered with, it automatically switches to the LoRa link to ensure that critical data is not lost. It supports the access of third-party smart devices and obtains additional device data (such as smart curtain status and human body sensor data) through the MQTT protocol, enriching the dimensions of operating condition judgment. The database supports external mobile hard drive expansion, and users can manually set the data retention period (up to 1 year) to facilitate subsequent energy consumption analysis and fault tracing.

[0073] This method utilizes a series of sensors and technologies to monitor and extract real-time operational status and performance data from various devices and systems. First, the first sensor, typically including a light sensor and a temperature sensor, is deployed around the photovoltaic panel to monitor light intensity and ambient temperature in real time; these two parameters directly affect the photovoltaic panel's power generation efficiency. Second, the second sensor is integrated inside the energy storage device to monitor its charge and discharge status, including the battery's SOC (State of Charge), a key indicator for assessing the device's current available energy. Finally, the third sensor is installed on various smart home devices to collect their operational status (e.g., power-on, standby, operating mode) and power consumption data, crucial for understanding home energy consumption patterns. All this data is uploaded to a central controller via communication protocols such as Wi-Fi or RS485, forming a database that provides real-time and comprehensive operational information for subsequent data analysis, prediction, and decision-making.

[0074] By implementing this control method, real-time light intensity and temperature data help improve the accuracy of subsequent photovoltaic power prediction, as the LSTM model needs this data to learn how photovoltaic panel power generation changes with external conditions. Real-time energy storage SOC data and device power consumption information allow the system to respond immediately to changes in operating conditions, adjusting the charging and discharging strategies of energy storage devices and the operating modes of smart devices, thus achieving dynamic energy balance and optimal allocation.

[0075] According to the above embodiments of the present invention, feature extraction is performed on photovoltaic energy data, equipment data, and environmental data to obtain multi-dimensional operating condition feature data, including: selecting highly correlated data from photovoltaic energy data, equipment data, and environmental data whose correlation with expected data is higher than a correlation threshold, wherein the expected data is the target data to be achieved in advance for photovoltaic energy system and smart home device; extracting the dependency and trend information of highly correlated data through long short-term memory network; and fusing the highly correlated data based on dependency and trend information to obtain multi-dimensional operating condition feature data.

[0076] In this embodiment, the controller simultaneously completes two core calculations: the inverse module extracts 32-dimensional operating condition features through a two-layer fully connected network (64→32 neurons, ReLU activation); the LSTM model uses power data from the past hour as input to predict the power curve for the next hour (5-minute step, accuracy ≥85%).

[0077] This method employs data analysis to select datasets highly correlated with the desired data (i.e., the system's energy management objectives, such as maximizing photovoltaic self-consumption or minimizing grid dependence); this data is termed highly correlated data. Next, these highly correlated data are processed using a Long Short-Term Memory (LSTM) network. LSTM effectively captures long-term dependencies in time-series data, thereby extracting correlations and trend information between data points. Finally, the system integrates these dependencies and trend information, processing them through a feature fusion algorithm to generate multi-dimensional operating condition feature data that includes real-time status of the current operating condition and future trend predictions.

[0078] By implementing this control method, the system can prepare energy storage strategies in advance based on the trend of sunlight intensity, predict changes in equipment usage demand, and thus dynamically adjust energy allocation. Using LSTM to extract trend information improves the accuracy of predicting how environmental factors such as sunlight and temperature affect photovoltaic energy output and household energy consumption compared to simple statistical prediction methods. This is crucial for maintaining system stability under conditions of changing sunlight intensity and sudden weather changes.

[0079] According to the above embodiments of the present invention, historical photovoltaic data is input into a photovoltaic prediction model to process the historical photovoltaic data using the photovoltaic prediction model to obtain photovoltaic prediction data. The photovoltaic prediction model is a model trained by machine learning using multiple sets of training data. Each set of training data includes: sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data.

[0080] In this embodiment, model pre-training is conducted in two stages using 100,000 samples (PVLib photovoltaic data + 200 household behavioral data): 500 unsupervised training iterations of the inverse feature layer (loss ≤ 0.01), followed by 2,000 joint training iterations with the DQN decision layer (accuracy ≥ 90%). Finally, 3 days of transfer learning using actual data are used to adapt to the scenario, shortening the deployment cycle. The system supports rapid switching between multiple apartment type model templates, with preset parameter packages for three typical apartment types: "single apartment," "family of three," and "three-generation family." Users can directly select the matching apartment type through the human-computer interaction terminal without additional waiting for transfer learning. For large apartment scenarios such as villas and duplexes, a model extension interface is provided, allowing access to additional photovoltaic array partition data and hierarchical load monitoring data to meet the control requirements of complex spaces. The new feature allows users to select the forecast period. Users can set three forecast dimensions via the terminal: "1 hour (fine mode), 3 hours (balanced mode), and 6 hours (global mode)". Fine mode prioritizes control accuracy in the short term, while global mode is suitable for scenarios that require advance planning, such as long-distance travel. For complex weather such as rain and cloudy weather, a weather warning data interface is embedded to obtain local rainfall probability and cloud coverage data for the next 2 hours. This data is used to correct the parameters of the LSTM prediction model, improving the prediction accuracy under complex weather conditions by 5%-8%.

[0081] This method is based on time series forecasting techniques, specifically employing Long Short-Term Memory (LSTM) networks from deep learning as the photovoltaic (PV) forecasting model. The LSTM model learns the complex relationships between the power generation patterns of PV energy systems and environmental factors such as sunlight and temperature through training, capturing long-term dependencies and seasonal variations in the data. During the training phase, multiple sets of historical PV data and their known future changes (sample PV forecast data) are input into the model. The model minimizes the prediction error by adjusting its internal parameters, learning the patterns of PV power generation changes over time.

[0082] By implementing this control method, future photovoltaic (PV) energy output can be predicted more accurately than predictions based on single historical data or simple statistical methods, reducing energy waste or supply shortages caused by inaccurate forecasts. PV forecast data helps the system plan energy allocation in advance. For example, if sufficient sunlight is predicted, the system can prioritize charging energy storage devices and schedule high-power devices for use before sunlight weakens, ensuring maximum self-consumption of PV energy. PV forecasting is the foundation of the system's intelligent decision-making, enabling the system to intelligently adjust the operating strategies of energy storage and devices based on future sunlight conditions, achieving dynamic energy balance and efficient utilization while reducing the need for manual intervention by users.

[0083] According to the above embodiments of the present invention, the fusion of multi-dimensional operating condition feature data and photovoltaic prediction data to obtain a joint feature vector includes: superimposing multi-dimensional operating condition feature data and photovoltaic prediction data to obtain superimposed data; performing feature fusion on the superimposed data through a fully connected layer to obtain an initial joint feature vector; acquiring electricity consumption preference data and lifestyle habit data; and embedding the electricity consumption preference data and lifestyle habit data into the initial joint feature vector to obtain a joint feature vector.

[0084] In this embodiment, the 32-dimensional operating condition features extracted by the inverse matrix module and the power curve predicted by the LSTM model for the next hour are fused to generate a joint feature vector of "operating condition-trend" to provide data support for decision-making.

[0085] This method overlays multi-dimensional operating condition feature data and photovoltaic prediction data to form overlaid data. This step directly links the current environmental state with future photovoltaic energy predictions, providing an immediate and predictive view of system operation. Subsequently, deep feature fusion is performed through a fully connected layer (FC layer). The FC layer utilizes a multi-layer neural network structure to further extract and integrate hidden features from the overlaid data, generating an initial joint feature vector. This vector contains comprehensive information about the system's current state and future trends. Finally, by acquiring users' electricity consumption preference data and lifestyle data, such as device usage patterns and preferred temperature settings during specific time periods, this personalized information is directly embedded into the initial joint feature vector. This results in a joint feature vector that includes environmental state, future predictions, and personal preferences, providing comprehensive and personalized input for agent decision-making.

[0086] By implementing this control method, the joint feature vector integrates multi-dimensional operating condition feature data with photovoltaic prediction data, enabling the agent to make decisions based on more comprehensive and forward-looking information. This not only considers the immediate energy supply and demand balance but also incorporates future predictions and personalized user needs, significantly improving the intelligence and relevance of the decisions. By combining future photovoltaic power generation predictions with current operating condition characteristics, the system can more accurately plan the charging and discharging strategies of energy storage devices and the operating modes of smart home appliances, reducing energy waste, increasing self-consumption rates and energy storage efficiency, and reducing household dependence on the power grid.

[0087] According to the above embodiments of the present invention, generating an energy storage charging and discharging strategy for a photovoltaic energy system and a device control strategy for a smart home device based on a joint feature vector includes: obtaining the current operating state reflected in the joint feature vector; setting a multi-objective reward function; and outputting the energy storage charging and discharging strategy and the device control strategy based on the current operating state and the multi-objective reward function.

[0088] In this embodiment, the reward function weights can be customized, allowing users to adjust the proportions of each objective according to their needs (e.g., in the "maximum utilization of photovoltaics" scenario, the photovoltaic self-consumption rate weight can be adjusted to 60%, and in the "energy storage priority backup" scenario, the energy storage SOC weight can be adjusted to 50%). A new home appliance control mode selection is added, providing four modes: "fully automatic control, semi-manual control, energy-saving priority control, and comfort priority control." In semi-manual mode, users can lock the start / stop permissions of core home appliances (such as baby incubators), and the system only optimizes non-locked devices. For electric vehicle charging scenarios, a new V2H (vehicle-to-home) interactive control logic is added, incorporating electric vehicles into energy storage resource management. The system considers the vehicle's remaining battery power and estimated travel time simultaneously during decision-making, outputting the optimal charging and discharging strategy.

[0089] This method involves understanding the current operating conditions, setting a multi-objective reward function, and outputting optimized energy storage charging and discharging strategies and smart home device control strategies accordingly. First, the system parses real-time data reflecting the current operating conditions from the joint feature vector, including but not limited to current photovoltaic energy output, energy storage status, household electricity demand, user preferences, and lifestyle habits. Then, based on this operating condition information, the system determines a multi-objective reward function that comprehensively considers multiple objectives such as photovoltaic self-consumption rate, energy storage device charging and discharging efficiency, user comfort, and grid dependence. Each objective is assigned a weight based on its importance in the overall system. Finally, the inverse reinforcement learning agent, based on the current operating conditions and the set multi-objective reward function, searches for the optimal strategy combination through trial and error, outputting specific energy storage charging and discharging strategies (such as charging / discharging quantity adjustment and charging / discharging rate control) and device control strategies (such as turning devices on / off, adjusting device operating modes, and prioritization) to maximize the overall reward, i.e., improving energy efficiency and reducing dependence on the external power grid while meeting user needs.

[0090] By implementing this control method, the decisions made by the inverse reinforcement learning agent based on joint feature vectors are more flexible and efficient than those made by a single objective or static rules. It can quickly adapt to environmental changes and user needs, and achieve optimal resource allocation under dynamic equilibrium.

[0091] According to the above embodiments of the present invention, the coordinated control of a photovoltaic energy system and a smart home device based on an energy storage charging and discharging strategy and a device control strategy includes: sending the energy storage charging and discharging strategy and the device control strategy to the execution layer of the smart home system where the smart home device is located, so as to utilize the execution layer to coordinate the control of the photovoltaic energy system and the smart home device based on the energy storage charging and discharging strategy and the device control strategy.

[0092] In this embodiment, after executing instructions, the monitoring and control terminal collects operational data, calculates the actual reward value, and uploads it. When sudden operating conditions such as a sudden drop in illumination (≥50% within 5 minutes) or SOC ≤20% are detected, the emergency strategy library is invoked to protect the core load (cutting off non-essential equipment and starting energy storage discharge), and the human-machine interface terminal triggers an audible and visual alarm. When communication is interrupted, the monitoring and control terminal executes a backup strategy (energy storage maintains 30% SOC as a backup), and returns to the normal process after the fault is cleared. Custom settings for the core load are supported, and users can select "equipment that must be protected" (such as medical equipment, refrigerators, and routers) through the terminal. In case of a system emergency, the selected equipment will be prioritized for power supply. A new emergency power supply duration prediction function has been added, and "the current remaining energy storage capacity can protect the core load for X hours" is displayed simultaneously when an audible and visual alarm is triggered, assisting users in decision-making (such as whether to start the backup generator). A local manual control interface has been added when communication is interrupted, and users can temporarily adjust the charging and discharging of energy storage and the start and stop of equipment through physical buttons on the monitoring and control terminal to avoid complete loss of control. After the fault is cleared, an emergency event report is automatically generated, recording the fault type, duration, handling process, and energy consumption impact, which is convenient for subsequent maintenance.

[0093] Typical scenario verification: For working families on weekdays, the system identifies the characteristic of "low load during the day and high load at night." In the morning when sunlight is abundant, the inverse matrix model extracts the characteristic of "sufficient sunlight - low load," instructing the energy storage to charge at full capacity. At 4 PM, predicting the weakening of sunlight in the evening, it preemptively schedules high-power devices such as washing machines to operate using direct photovoltaic power. During the evening peak load, the energy storage discharges to supplement insufficient photovoltaic power, prioritizing the operation of air conditioners and refrigerators. This increases the photovoltaic self-consumption rate by 18%, reduces grid dependence by 22%, and decreases the frequency of user manual intervention by 45%, verifying the effectiveness of the solution. In the case of photovoltaic surplus (sunny weekends with no one at home): the system identifies the characteristic of "sufficient sunlight - extremely low load," prioritizing full charging of the energy storage. After the energy storage is fully charged, it automatically dispatches charging piles to charge electric vehicles (if already connected). The remaining electricity is fed back to the grid via the V2G (vehicle-to-grid) interface (requires the user to activate grid interaction permissions), generating additional grid-connected revenue, increasing photovoltaic utilization to over 95%. In scenarios with insufficient solar power (continuous cloudy and rainy workdays): The LSTM model predicts insufficient sunlight in the next 24 hours. The decision-maker prioritizes controlling energy storage to maintain 40% SOC as a backup. Non-core equipment (such as humidifiers and air purifiers) is scheduled in an "intermittent operation" mode. Core equipment (such as air conditioners) automatically adjusts its parameters (raising the temperature by 1-2℃ in summer and lowering it by 1-2℃ in winter). The grid dependence is reduced by 15% compared to conventional control, while ensuring basic user comfort.

[0094] This method involves transmitting these strategies from the decision-making layer to the execution layer of the smart home system, i.e., the direct control layer of the devices. In principle, the strategies optimized by the agents are first encoded into a set of instructions. These instructions are sent from the central controller to the execution layer where each smart home device resides via TCP / IP or a similar communication protocol. Upon receiving the instructions, the execution layer adjusts the charging and discharging state of the energy storage devices and controls the operating modes of the smart home devices, such as starting, stopping, parameter adjustment, and priority ranking, based on the specific content of the strategy.

[0095] By implementing this control method, the immediate issuance of commands enables the rapid execution of energy storage charging and discharging strategies and equipment control strategies, reducing the delay between decision-making and execution, improving system response speed and efficiency, and ensuring maximum energy utilization and timely adjustment of equipment operation. The precise execution of energy storage charging and discharging strategies ensures a high level of self-consumption of photovoltaic energy. By dynamically adjusting the operating status of energy storage equipment, excess waste of photovoltaic energy is avoided, while also reducing dependence on the commercial power grid.

[0096] According to the above embodiments of the present invention, after the photovoltaic energy system and smart home devices are controlled collaboratively according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic smart home collaborative control method further includes: obtaining the execution results of the photovoltaic energy system and smart home devices; and optimizing the multi-objective reward function based on the execution results.

[0097] In this embodiment, when the experience replay pool (capacity 10,000 data points) reaches 1,000 data points, the stochastic gradient descent method is used to update the model parameters. 32 data points are randomly selected from the replay pool, and the DQN network parameters are fine-tuned using SGD (learning rate 0.001) to achieve continuous online optimization. A new model update mode is available, offering three options: real-time update, scheduled update, and manual update. Real-time updates ensure control accuracy but consume a small amount of computing power; scheduled updates (default 2 AM daily) avoid computing power conflicts during peak electricity consumption periods; and manual updates allow users to lock in optimal parameters when operating conditions are stable. An optimization effect visualization function is added, with the human-computer interaction terminal displaying real-time curves of photovoltaic self-consumption rate and grid dependence before and after the model update, allowing users to intuitively perceive the optimization effect. The experience replay pool supports data labeling, allowing manual labeling of special scenario data such as "extreme weather" and "special electricity consumption (e.g., family gatherings)" for priority use in model training, improving adaptability to special scenarios.

[0098] This method first collects actual operational data from the photovoltaic energy system and smart home devices at the execution layer, including but not limited to the actual charging and discharging status of energy storage devices, the actual output and consumption of photovoltaic energy, the actual operation of smart devices, and user satisfaction with device control. This execution result data is transmitted back to the central controller via a communication network as feedback signals to the inverse reinforcement learning algorithm. Subsequently, the algorithm evaluates the effectiveness of the current multi-objective reward function based on the deviation between the actual results and the expected goals. If a gap is found between the reward function and the actual performance, the algorithm automatically adjusts the weight parameters in the reward function to more accurately reflect the relative importance of each objective under specific operating conditions, guiding the agent to output a more optimized strategy.

[0099] By implementing this control method, and through continuous feedback of execution results and optimization of the reward function, the system can achieve self-iteration and improvement, continuously enhancing the accuracy and effectiveness of decision-making, and ensuring that the collaborative control strategy always closely aligns with actual needs and environmental changes. The dynamic adjustment of the reward function enables the agent to better adapt to various operating conditions; whether it's fluctuations in light intensity or changes in user habits, it can adjust strategies in a timely manner, improving energy efficiency and the level of intelligence in equipment operation.

[0100] Figure 3 This is a flowchart of an optional photovoltaic smart home collaborative control method according to an embodiment of the present invention, such as... Figure 3 As shown, the system first completes initial deployment. If a self-test anomaly is detected, a system alarm is triggered. After a normal self-test, the system enters the real-time data acquisition phase, simultaneously loading the model and preprocessing the data. If a sudden operating condition is detected during the acquisition phase, emergency handling is initiated (ensuring core load and triggering an alarm). Once the operating condition recovers, the system returns to data acquisition. If no sudden operating condition is detected, the system collects and uploads 12-dimensional data. After feature extraction and power prediction, a joint feature vector is generated. Then, through reinforcement learning, control commands for energy storage and home appliances are output. Both the emergency handling command and the control command enter the execution and feedback phase. After executing the command and collecting feedback data, the process returns to the real-time data acquisition phase, forming a closed-loop operation. This system ensures that the system can dynamically adjust its strategy under various complex operating conditions, achieving efficient energy utilization and intelligent equipment control. It also ensures stable system operation and the user's quality of life. It is a highly integrated and intelligent control method with broad application prospects.

[0101] As described above, the technical solution provided by the embodiments of the present invention constructs an inverse reinforcement learning energy allocation model that integrates photovoltaic power generation prediction and load perception. The model input includes historical photovoltaic power generation data, real-time light / temperature data, energy storage SOC (State of Charge) status, and real-time household electricity load. The inverse learning module extracts common features under different operating conditions, and the reinforcement learning agent outputs energy storage charging and discharging power adjustment commands and appliance priority control strategies based on these features. A user habit perception submodule and an inverse reinforcement learning collaborative control submodule are designed. A preference recognition model is trained using user behavior data (such as appliance usage time and parameter adjustment records). Combined with photovoltaic power generation prediction results, the inverse reinforcement learning agent outputs multi-device linkage strategies. The self-consumption rate of photovoltaic power generation increases by 15%-20%, the charging and discharging efficiency of energy storage equipment increases by 10%-15%, and the dependence of the household power grid decreases by more than 20%, significantly improving energy utilization efficiency. The coordination and matching degree between home equipment and photovoltaic power generation rhythm increases by 25%-30%, and the frequency of manual intervention by users decreases by more than 40%, realizing personalized and scenario-based coordination of "photovoltaic power generation - user needs - equipment operation", greatly improving the user experience.

[0102] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0104] Example 2

[0105] According to embodiments of the present invention, a photovoltaic smart home collaborative control device for implementing the above-described photovoltaic smart home collaborative control method is also provided. Figure 4 This is a schematic diagram of a photovoltaic smart home collaborative control device according to an embodiment of the present invention, such as... Figure 4As shown, the device includes: a first acquisition unit 401, a feature extraction unit 403, a prediction unit 405, a fusion unit 407, a strategy generation unit 409, and a control unit 411. The device will now be described in detail.

[0106] The first acquisition unit 401 is used to acquire photovoltaic energy data of the photovoltaic energy system and device data of the smart home device, and to acquire environmental data of the area where the smart home device is located. The photovoltaic energy system is used to provide power for the smart home device.

[0107] The feature extraction unit 403 is used to extract features from photovoltaic energy data, equipment data and environmental data to obtain multi-dimensional operating condition feature data.

[0108] The prediction unit 405 is used to predict photovoltaic forecast data for a predetermined future time window based on historical photovoltaic data within a predetermined historical time window.

[0109] The fusion unit 407 is used to fuse multi-dimensional operating condition feature data with photovoltaic prediction data to obtain a joint feature vector.

[0110] The strategy generation unit 409 is used to generate energy storage charging and discharging strategies for photovoltaic energy systems and device control strategies for smart home devices based on joint feature vectors.

[0111] The control unit 411 is used to coordinate the control of the photovoltaic energy system and smart home devices according to the energy storage charging and discharging strategy and the device control strategy.

[0112] It should be noted that the first acquisition unit 401, feature extraction unit 403, prediction unit 405, fusion unit 407, strategy generation unit 409 and control unit 411 mentioned above correspond to steps S202 to S212 in the above embodiments. The six units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiments.

[0113] As can be seen from the above, in the scheme described in the above embodiments of the present invention, a first acquisition unit is used to acquire photovoltaic energy data of the photovoltaic energy system and device data of the smart home device, and to acquire environmental data of the area where the smart home device is located, wherein the photovoltaic energy system is used to provide working power for the smart home device; a feature extraction unit is used to extract features from the photovoltaic energy data, device data, and environmental data to obtain multi-dimensional operating condition feature data; a prediction unit is used to predict photovoltaic prediction data for a predetermined future time window based on historical photovoltaic data within a predetermined historical time window; a fusion unit is used to fuse the multi-dimensional operating condition feature data with the photovoltaic prediction data to obtain a joint feature vector; and a strategy generation unit is used to generate an energy storage charging and discharging strategy for the photovoltaic energy system and a device control strategy for the smart home device based on the joint feature vector. The system utilizes a control unit to coordinate the control of photovoltaic energy systems and smart home devices based on energy storage charging and discharging strategies and equipment control strategies. This achieves the construction of an inverse reinforcement learning model that integrates photovoltaic power generation prediction and load perception, including an inverse learning module and a reinforcement learning agent. This enables dynamic energy allocation. A user habit perception submodule and an inverse reinforcement learning collaborative control submodule are designed. By training a preference recognition model and combining it with photovoltaic power generation prediction results, personalized linkage control between home devices and photovoltaic energy is achieved. This results in a 15%-20% increase in photovoltaic self-consumption rate, a 10%-15% increase in energy storage device charging and discharging efficiency, a more than 20% reduction in household grid dependence, a 25%-30% improvement in the coordination and matching degree between home devices and photovoltaic power generation rhythms, and a more than 40% reduction in user manual intervention frequency, significantly enhancing the user experience.

[0114] Therefore, the technical solution provided by the above embodiments of the present invention solves the technical problem in the related art that energy management systems are unable to find the best balance between efficient utilization of photovoltaic energy and intelligent control of home devices, thus failing to achieve dynamic optimal allocation of electrical energy.

[0115] Optionally, the first acquisition unit includes: a first acquisition module, used to monitor the power generation information of the photovoltaic panel through a first sensor installed around the photovoltaic panel of the photovoltaic energy system, and obtain the power generation; a monitoring module, used to monitor the charging and discharging status of the energy storage device through a second sensor built into the energy storage device of the photovoltaic energy system, and obtain the charging and discharging data of the energy storage device; and a collection module, used to collect the device status data and power consumption data of the smart home device through a third sensor installed in the smart home device.

[0116] Optionally, the feature extraction unit includes: a selection module for selecting highly relevant data from photovoltaic energy data, equipment data, and environmental data, where the correlation with the expected data is higher than a correlation threshold, wherein the expected data is the target data to be achieved in advance for the photovoltaic energy system and smart home devices; an extraction module for extracting the dependency and trend information of the highly relevant data through a long short-term memory network; and a fusion processing module for fusing the highly relevant data based on the dependency and trend information to obtain multi-dimensional operating condition feature data.

[0117] Optionally, the prediction unit includes: an input module for inputting historical photovoltaic data into a photovoltaic prediction model, so as to process the historical photovoltaic data using the photovoltaic prediction model to obtain photovoltaic prediction data, wherein the photovoltaic prediction model is a model trained by machine learning using multiple sets of training data, and each set of multiple sets of training data includes: sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data.

[0118] Optionally, the fusion unit includes: an overlay module for overlaying multi-dimensional operating condition feature data and photovoltaic prediction data to obtain overlay data; a feature fusion module for performing feature fusion on the overlay data through a fully connected layer to obtain an initial joint feature vector; and a second acquisition module for embedding the electricity preference data and lifestyle data into the initial joint feature vector to obtain a joint feature vector.

[0119] Optionally, the strategy generation unit includes: a third acquisition module for acquiring the current operating condition reflected in the joint feature vector; a function setting module for setting a multi-objective reward function; and an output module for outputting an energy storage charging and discharging strategy and an equipment control strategy based on the current operating condition and the multi-objective reward function.

[0120] Optionally, the control unit includes a transmitting module for transmitting the energy storage charging and discharging strategy and the device control strategy to the execution layer of the smart home system where the smart home device is located, so that the execution layer can coordinately control the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0121] Optionally, the photovoltaic smart home collaborative control device further includes: a second acquisition unit, used to acquire the execution results of the photovoltaic energy system and smart home devices after collaboratively controlling the photovoltaic energy system and smart home devices according to the energy storage charging and discharging strategy and the device control strategy; and an optimization unit, used to optimize the multi-objective reward function according to the execution results.

[0122] According to one aspect of the present invention, a smart home system is provided, wherein the smart home system uses the photovoltaic smart home collaborative control method described above.

[0123] According to one aspect of the present invention, a processor is provided for running a program, wherein the program executes the photovoltaic smart home collaborative control method described above.

[0124] According to one aspect of the present invention, a computer program product is provided, including computer instructions, which, when executed by a processor, perform any of the above-described photovoltaic smart home collaborative control methods.

[0125] According to one aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the photovoltaic smart home collaborative control method described above.

[0126] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any communication device in a group of communication devices.

[0127] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: acquiring photovoltaic energy data of the photovoltaic energy system and device data of the smart home device, and acquiring environmental data of the area where the smart home device is located, wherein the photovoltaic energy system is used to provide power for the smart home device; extracting features from the photovoltaic energy data, device data, and environmental data to obtain multi-dimensional operating condition feature data; predicting photovoltaic forecast data for a predetermined future time window based on historical photovoltaic data within a predetermined historical time window; fusing the multi-dimensional operating condition feature data with the photovoltaic forecast data to obtain a joint feature vector; generating an energy storage charging and discharging strategy for the photovoltaic energy system and a device control strategy for the smart home device based on the joint feature vector; and coordinating the control of the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0128] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: monitoring the power generation information of the photovoltaic panel by a first sensor installed around the photovoltaic panel of the photovoltaic energy system to obtain the power generation; monitoring the charging and discharging status of the energy storage device by a second sensor built into the energy storage device of the photovoltaic energy system to obtain the charging and discharging data of the energy storage device; and collecting device status data and power consumption data of the smart home device by a third sensor installed in the smart home device.

[0129] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: selecting highly relevant data from photovoltaic energy data, equipment data, and environmental data whose correlation with desired data is higher than a correlation threshold, wherein the desired data is target data to be achieved in advance for the photovoltaic energy system and smart home devices; extracting dependency and trend information of the highly relevant data through a long short-term memory network; and performing fusion processing on the highly relevant data based on dependency and trend information to obtain multi-dimensional operating condition feature data.

[0130] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data.

[0131] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: superimposing multidimensional operating condition feature data and photovoltaic prediction data to obtain superimposed data; performing feature fusion on the superimposed data through a fully connected layer to obtain an initial joint feature vector; acquiring electricity consumption preference data and lifestyle habit data; and embedding the electricity consumption preference data and lifestyle habit data into the initial joint feature vector to obtain a joint feature vector.

[0132] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining the current operating condition reflected in the joint feature vector; setting a multi-objective reward function; and outputting an energy storage charging and discharging strategy and a device control strategy based on the current operating condition and the multi-objective reward function.

[0133] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: sending the energy storage charging and discharging strategy and the device control strategy to the execution layer of the smart home system where the smart home device is located, so as to utilize the execution layer to perform coordinated control of the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy.

[0134] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining the execution results of the photovoltaic energy system and smart home devices; and optimizing the multi-objective reward function based on the execution results.

[0135] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0136] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

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

[0138] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0139] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0140] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0141] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A photovoltaic smart home cooperative control method, characterized in that, The method comprises the following steps: acquiring photovoltaic energy data of a photovoltaic energy system and device data of a smart home device, and acquiring environmental data of an area where the smart home device is located, wherein the photovoltaic energy system is used to provide working power for the smart home device; extracting features from the photovoltaic energy data, the device data, and the environmental data to obtain multi-dimensional working condition feature data; predicting photovoltaic prediction data in a predetermined future time window based on historical photovoltaic data in a predetermined historical time window; fusing the multi-dimensional working condition feature data and the photovoltaic prediction data to obtain a joint feature vector; generating an energy storage charging and discharging strategy of the photovoltaic energy system and a device control strategy of the smart home device according to the joint feature vector; performing collaborative control on the photovoltaic energy system and the smart home device according to the energy storage charging and discharging strategy and the device control strategy. 2.The photovoltaic smart home cooperative control method according to claim 1, characterized in that, The method comprises the following steps: acquiring photovoltaic energy data of a photovoltaic energy system and device data of a smart home device, comprising: monitoring power generation information of a photovoltaic panel through a first sensor installed around the photovoltaic panel to obtain power generation power; monitoring charging and discharging states of an energy storage device through a second sensor built in the energy storage device to obtain charging and discharging data of the energy storage device; 3.The photovoltaic smart home collaborative control method according to claim 1, characterized in that, collecting device state data and power consumption data of the smart home device through a third sensor installed on the smart home device. The method comprises the following steps: extracting features from the photovoltaic energy data, the device data, and the environmental data to obtain multi-dimensional working condition feature data, comprising: selecting high-correlation data with a correlation higher than a correlation threshold from the photovoltaic energy data, the device data, and the environmental data, wherein the expected data is a target data expected to be achieved for the photovoltaic energy system and the smart home device in advance; 4.The photovoltaic smart home collaborative control method according to claim 1, characterized in that, extracting dependency relationships and trend information of the high-correlation data through a long short-term memory network; fusing the high-correlation data based on the dependency relationships and the trend information to obtain the multi-dimensional working condition feature data. 5.The photovoltaic smart home collaborative control method according to claim 1, characterized in that, The method comprises the following steps: predicting photovoltaic prediction data in a predetermined future time window based on historical photovoltaic data in a predetermined historical time window, comprising: inputting the historical photovoltaic data into a photovoltaic prediction model to process the historical photovoltaic data by using the photovoltaic prediction model to obtain the photovoltaic prediction data, wherein the photovoltaic prediction model is a model trained by machine learning using a plurality of sets of training data, and each set of the plurality of sets of training data comprises sample historical photovoltaic data and sample photovoltaic prediction data corresponding to the sample historical photovoltaic data. The method comprises the following steps: fusing the multi-dimensional working condition feature data and the photovoltaic prediction data to obtain a joint feature vector, comprising: stacking the multi-dimensional working condition feature data and the photovoltaic prediction data to obtain stacked data; performing feature fusion on the stacked data through a fully connected layer to obtain an initial joint feature vector; acquiring power consumption preference data and living habit data; embed the power utilization preference data and the living habit data into the initial joint feature vector to obtain the joint feature vector. 6.The photovoltaic smart home collaborative control method according to claim 1, characterized in that, generate, according to the joint feature vector, an energy storage charging and discharging strategy of the photovoltaic energy system and a device control strategy of the smart home device, including: obtaining a current working condition state reflected in the joint feature vector; setting a multi-objective reward function; outputting the energy storage charging and discharging strategy and the device control strategy according to the current working condition state and the multi-objective reward function. 7.The photovoltaic smart home cooperative control method according to any one of claims 1 to 6, characterized in that, coordinately controlling, according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic energy system and the smart home device, including: sending the energy storage charging and discharging strategy and the device control strategy to an execution layer of a smart home system where the smart home device is located, so as to coordinately control, according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic energy system and the smart home device by using the execution layer. 8.The photovoltaic smart home cooperative control method according to claim 6, characterized in that, After coordinately controlling, according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic energy system and the smart home device, the photovoltaic smart home coordination control method further includes: obtaining an execution result of the photovoltaic energy system and the smart home device; optimizing the multi-objective reward function according to the execution result.

9. A photovoltaic smart home cooperative control device, characterized in that, including: a first obtaining unit, configured to obtain photovoltaic energy data of a photovoltaic energy system and device data of a smart home device, and obtain environmental data of an area where the smart home device is located, wherein the photovoltaic energy system is configured to provide working power supply for the smart home device; a feature extraction unit, configured to perform feature extraction on the photovoltaic energy data, the device data and the environmental data to obtain multi-dimensional working condition feature data; a prediction unit, configured to predict photovoltaic prediction data in a predetermined future time window based on historical photovoltaic data in a predetermined historical time window; a fusion unit, configured to fuse the multi-dimensional working condition feature data and the photovoltaic prediction data to obtain a joint feature vector; a strategy generation unit, configured to generate, according to the joint feature vector, an energy storage charging and discharging strategy of the photovoltaic energy system and a device control strategy of the smart home device; a control unit, configured to coordinately control, according to the energy storage charging and discharging strategy and the device control strategy, the photovoltaic energy system and the smart home device.

10. A smart home system, characterized by, The smart home system uses the photovoltaic smart home coordination control method in any one of claims 1 to 8.