Photovoltaic storage battery charging and discharging controller and control method

By designing the photovoltaic battery charge and discharge controller, using parameter acquisition, model construction and charge and discharge control components, the problem of low intelligent charging and discharge process control of the photovoltaic battery system in the existing technology is solved, and the intelligentization of the photovoltaic battery system is realized. Management, adapting to the ever-changing demand for photovoltaic power generation and loads, improves the intelligence of energy management.

CN119482789APending Publication Date: 2025-02-18HUIZE HUADIAN DAOCHENG CLEAN ENERGY DEV CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411100214.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, the charging and discharging process control of photovoltaic battery systems is relatively intelligent and cannot be automatically adjusted to cope with the ever-changing photovoltaic power generation and load requirements.

Method used

A photovoltaic battery charge and discharge controller is designed, including parameter acquisition components, model construction components and charge and discharge control components. The parameter acquisition component obtains photovoltaic power generation data and load data in real time. The model construction component builds a power consumption prediction model based on historical data. The charging and discharging control component automatically adjusts the charging and discharging state based on the prediction results.

Benefits of technology

It realizes intelligent management of photovoltaic battery systems, can automatically adjust the charging and discharge state, adapt to the changing demands of photovoltaic power generation and load, improves the intelligence of energy management, reduces energy waste, and extends the service life of the battery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119482789A_ABST
    Figure CN119482789A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of photovoltaic power generation control, and discloses a photovoltaic storage battery charging and discharging controller and method, and the controller comprises a parameter obtaining assembly, a model building assembly, and a charging and discharging control assembly. The method comprises the following steps: acquiring the total power generation power of a photovoltaic cell panel and the power of a load connected with an inverter, calculating to obtain the total power generation power, and meanwhile, according to the historical electric quantity used by the load, obtaining the predicted used electric quantity; according to the historical total power generation power and the electric quantity, power consumption values in the charging and discharging processes of the photovoltaic storage battery are obtained for multiple times, and a power consumption prediction model is constructed; inputting the total power generation power and the predicted used power consumption into a power consumption prediction model to obtain a power consumption prediction result; the storage battery is continuously in a discharging state when the power consumption prediction result and the actual power consumption of the actual load do not exceed the standard threshold value, and the storage battery is charged in a boost mode when the power consumption prediction result and the actual power consumption exceed the standard threshold value. According to the invention, accurate data acquisition, effective model construction and flexible charging and discharging control are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of photovoltaic power generation control, and in particular to a photovoltaic battery charge and discharge controller and a control method. Background Art

[0002] Photovoltaic batteries are batteries used to store electricity generated from photovoltaic (PV) systems, usually in combination with solar panels. PV systems can collect sunlight through solar PV panels during the day and convert it into electricity, but when there is insufficient sunlight or too much electricity generated by solar energy, the electricity stored in PV batteries can be used to supply power when needed. PV batteries are an important part of PV power generation systems, and their charge and discharge control plays a key role in improving battery life, system efficiency, and optimizing power management. With the widespread application and development of renewable energy, PV battery systems will play an increasingly important role in achieving green energy supply and sustainable development goals.

[0003] Prior art 1, Chinese patent, application number: 201710107530.X discloses an adaptive photovoltaic-mains complementary battery charge and discharge controller, which connects the photovoltaic power supply and the mains power supply through a logic control circuit, and sets the sampling ratio of the first voltage-dividing branch and the ratio of R1 and R2, so that the upper threshold voltage and the lower threshold voltage of the first voltage hysteresis comparator correspond to the overcharge shutdown voltage and the charge shutdown recovery voltage of the battery respectively, and sets the sampling ratio of the second voltage-dividing branch and the ratio of R3 and R4, so that the lower threshold voltage and the upper threshold voltage of the second voltage hysteresis comparator correspond to the over-discharge shutdown voltage and the discharge shutdown recovery voltage of the battery respectively. Although the battery state can be automatically detected, and automatic charge and discharge and shutdown control, as well as shutdown recovery control, are performed, and the reference voltage is conveniently provided. However, the control function of the charge and discharge process is relatively single, and the load and battery cannot be well adapted.

[0004] Prior art 2, Chinese patent, application number: 201410459440.3 discloses a photovoltaic power supply, which also includes a battery, a charge and discharge controller, an inverter, and a distribution box. The photovoltaic module and the battery are connected to the input end of the charge and discharge controller. The output end of the charge and discharge controller includes at least three DC output ends. The first DC output end of the charge and discharge controller is connected to the input end of the inverter, the second DC output end is connected to the distribution box, the third DC output end is connected to the battery, and the output end of the inverter is connected to the distribution box. The charge and discharge controller is used to control the electrical connection relationship between the photovoltaic module, the battery, the inverter, and the distribution box according to the output power of the photovoltaic module, the storage power of the battery, and the load power of the distribution box. Although it can effectively solve the power consumption problem in areas without electricity and inconvenient places for the use of municipal electricity, it can provide DC power and AC power at the same time, and it is a green and environmentally friendly photovoltaic power supply. However, it lacks the control means of charge and discharge, resulting in a short service life of the battery.

[0005] Prior art three, Chinese patent, application number: 201910908301.7 discloses a heliostat system for tower-type solar thermal power generation that combines heliostats and photovoltaic panels, including: a heliostat field with several rows of heliostats, a heliostat control subsystem for controlling the azimuth and horizontal angle of the heliostat, and a photovoltaic power generation subsystem for powering the heliostat control subsystem; the heliostat includes a heliostat mirror body and a heliostat support; the photovoltaic power generation subsystem includes a photovoltaic panel, a battery pack, and a charge and discharge controller; the photovoltaic panel is arranged on the back of the heliostat mirror body; the photovoltaic panel on the back of the front row of heliostat mirror body is used to receive sunlight reflected from the front of the rear row of heliostat mirror body that is blocked by the back of the front row of heliostat mirror body. Although it can effectively reduce the shading efficiency loss of the heliostat field, improve the power generation efficiency of the solar thermal power station, and effectively reduce the power generation cost. However, the lack of load and battery allocation results in the inability to use the stored energy with maximum efficiency.

[0006] At present, the existing technologies 1, 2 and 3 have the problem that the intelligent control degree of the charging and discharging process is low and they cannot automatically adjust to cope with the changing photovoltaic power generation and load requirements. Therefore, the present invention provides a photovoltaic battery charging and discharging controller and control method, which forms a complete photovoltaic battery management system through the combination of various components, can effectively control the charging and discharging process, and automatically adjust the system to cope with the changing photovoltaic power generation and load requirements. Summary of the invention

[0007] The main purpose of the present invention is to provide a photovoltaic battery charge and discharge controller and control method to solve the problem that the charge and discharge process control in the prior art has a low degree of intelligence and cannot automatically adjust to cope with the changing photovoltaic power generation and load requirements.

[0008] To achieve the above object, the present invention provides the following technical solutions:

[0009] A photovoltaic battery charge and discharge controller, the photovoltaic battery charge and discharge controller comprising:

[0010] The parameter acquisition component is used to obtain the total power generated by the photovoltaic panels and the load power connected to the inverter. The total power generated is calculated based on the sunshine time in the power generation area in a certain week, month or quarter. At the same time, the predicted power usage in a certain week, month or quarter is obtained based on the power usage of the historical load.

[0011] The model building component is used to obtain the power consumption values ​​of the photovoltaic battery during multiple charging and discharging processes based on the historical total power generation and power consumption, and build a power consumption prediction model; then the total power generation and predicted power consumption of a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result;

[0012] The charge and discharge control component is used to calculate the power consumption prediction result and the actual load power consumption. If the actual power consumption does not exceed the standard threshold, the battery continues to be in a discharge state. If it exceeds the standard threshold, the battery is boosted and charged.

[0013] As a further improvement of the present invention, the parameter acquisition component includes:

[0014] The time calculation module is used to obtain the location information of the power generation area, parse the meridian information from the location information through the geographic information system, and determine the time coefficient of the corresponding week, month or quarter using the type of meridian information; calculate the noon time corresponding to the photovoltaic panel according to the time coefficient and the meridian information, and determine the illumination time of the photovoltaic panel based on the current date and noon time;

[0015] The power generation calculation module is used to obtain the total power generation energy of the photovoltaic panel according to the illumination time and the power generation power of the photovoltaic panel;

[0016] The load processing module is used to obtain a list of power supply requirements contained in the load according to the information of the load connected to the inverter, and determine the power consumption corresponding to each load unit; according to the power consumption, determine the power supply requirements of the load connected to the inverter, classify different loads, and determine the power coefficient corresponding to the priority of the load.

[0017] As a further improvement of the present invention, the model building component includes:

[0018] The data partitioning module is used to obtain the total power and electricity generated at the same historical time according to the time series, and to establish a sample data set containing the total power and electricity generated according to the type of the total power and electricity generated as an identifier; the sample data set is divided according to the total number of samples in different identifiers in the ratio of 7:2:1 among the training set, the test set and the validation set to obtain the training set, the test set and the validation set;

[0019] The model training module is used to train the power consumption prediction model using the training set, and after the training, the performance indicators of the trained power consumption prediction model are tested using the test set, and the reliability of the trained power consumption prediction model is evaluated using the validation set. If it meets the preset standards, it is qualified. If it does not meet the preset standards, the historical total power and electricity of another time series are obtained to retrain the power consumption prediction model;

[0020] The model prediction module is used to input the real-time total power generation and predicted power usage of a certain week, month or quarter into the trained power consumption prediction model, and obtain the corresponding power consumption prediction result of a certain week, month or quarter from the power consumption prediction model.

[0021] As a further improvement of the present invention, the model training module includes:

[0022] A training request submodule, used to receive a training request for a power consumption prediction model initiated by a controller, decompose the training request into multiple power consumption prediction model training tasks, add corresponding security protection logic to the power consumption prediction model training task, and then insert the power consumption prediction model training task into the task queue;

[0023] The data input submodule is used to input the training set in batches, and sequentially input the power relationship matrix of the total power generation and the priority of the loads into the pre-trained power consumption prediction model for training, so as to obtain a trained power consumption prediction model; wherein the power relationship matrix includes: constructing an identification confusion matrix of each load based on the power consumption corresponding to each load, when the power consumption of two loads is the same, the power relationship of the two loads is set to 1, otherwise it is 0; the label confusion matrix is ​​used as the power relationship matrix;

[0024] The initial training submodule is used to perform the first training on the pre-trained power consumption prediction model to obtain the first training quality data, obtain the accuracy and recall of the power consumption prediction model through the test set for the first training quality data, and calculate the F1 value of the power consumption prediction model; use the validation set to evaluate the reliability of the trained power consumption prediction model.

[0025] As a further improvement of the present invention, the training request submodule includes:

[0026] The logic judgment unit is used to generate the training behavior of the training request. If the training behavior has a target process, it must first pass the security protection logic check; the current training behavior is allowed to continue to execute the training request after passing the security protection logic review. If it fails to pass the security protection logic review, the current training behavior is a harmful behavior and will be prohibited from execution; the security protection logic is used to monitor all suspicious behaviors of the training request to prevent bad operations on other training requests and to prevent damage or malicious occupation of the controller;

[0027] An execution and delivery unit, used to generate an access control list delivery instruction according to the input address of the training behavior that cannot pass the security protection logic audit, and send the access control list delivery instruction to the network control end of the controller; the network control end is used to uniformly manage the power prediction model training tasks, and is also used to receive the access control list delivery instruction, and send the access control list rules to the network control end according to the access control list delivery instruction;

[0028] The isolation interception unit is used to call the access control list rules issued by the network control terminal to intercept and isolate the training behavior of all training requests associated with the input address.

[0029] As a further improvement of the present invention, the data input submodule specifically includes:

[0030] The data extraction unit is used to extract a training task to be processed from the task queue to obtain the training set to be used; determine the amount of data in each batch, and extract the data of this batch from the training set according to the current batch index;

[0031] The matrix construction unit is used to record the corresponding power consumption of each load and create a matrix in which rows and columns correspond to these loads, and the element values ​​in the matrix are assigned according to whether the load powers are the same or not; if the powers of two loads are the same, the value of the corresponding position in the matrix is ​​set to 1; if the powers are different, they are set to 0; use the load identification confusion matrix as a label and integrate it into a power relationship matrix; combine the total power generation and load priority information to create a new matrix, which includes the total power generation, as well as the category and priority of the current load;

[0032] The data transmission unit is used to input the constructed power relationship matrix into the pre-trained power consumption prediction model in batches, prepare the input data format for each batch, call the training method of the power consumption prediction model, and pass the current batch data into the power consumption prediction model; after the power consumption prediction model receives the input data, it performs forward propagation, calculates the loss function, and then updates the weight and bias of the power consumption prediction model through back propagation.

[0033] As a further improvement of the present invention, the initial training submodule includes:

[0034] The validation definition unit is used to process the validation set in batches according to the set batch size. For each batch of data, it is fed into the model, forward propagation is performed, and the prediction results are output. At the same time, the calculation evaluation indicators are set, including accuracy, recall rate and F1 value.

[0035] The indicator calculation unit is used to calculate the evaluation indicator based on the prediction results of the model and the true labels in the validation set;

[0036] The report generation unit is used to summarize the above calculation results and generate a model evaluation report, including the specific values ​​of different evaluation indicators and the data trends over time.

[0037] As a further improvement of the present invention, the model training module also includes:

[0038] The standard comparison submodule is used to receive the specific values ​​of different evaluation indicators of the power consumption prediction model after initial training, and compare them with the corresponding preset standards respectively;

[0039] The comprehensive scoring submodule is used to score the reliability of the power consumption prediction model after the initial training according to the preset weights of various evaluation indicators and the corresponding preset standards. When the scoring result meets the expectations, the power consumption prediction model after the initial training is used as the power consumption prediction model; if the scoring result does not meet the expectations, the successful training is performed;

[0040] The data re-acquisition submodule is used to re-acquire the historical total power and power of another time series and re-train the power consumption prediction model.

[0041] As a further improvement of the present invention, the charge and discharge control component includes:

[0042] The threshold setting submodule is used to set the threshold for power consumption and compare the power consumption prediction result with the actual power consumption of the actual load; when the power consumption prediction result does not exceed the threshold compared with the actual power consumption of the actual load, no data is sent to the charging and discharging electronic module; when it exceeds the standard threshold, a charging instruction is sent to the charging and discharging electronic module;

[0043] The charging and discharging electronic module is used to control the charging and discharging state of the battery. When the power consumption prediction result does not exceed the standard threshold compared with the actual power consumption of the actual load, the battery continues to be in the discharging state. When the comparison exceeds the standard threshold, the charging instruction from the threshold setting submodule is received, and the battery is boosted and charged.

[0044] To achieve the above object, the present invention also provides the following technical solutions:

[0045] A photovoltaic battery charge and discharge control method, which is applied to the photovoltaic battery charge and discharge controller, and the photovoltaic battery charge and discharge control method comprises:

[0046] Obtain the total power generated by the photovoltaic panels and the load power connected to the inverter. Calculate the total power generated based on the sunshine time in the power generation area in a certain week, month or quarter. At the same time, obtain the predicted power usage in a certain week, month or quarter based on the historical load power usage.

[0047] According to the historical total power generation and electricity, the power consumption values ​​during the charging and discharging process of the photovoltaic battery are obtained multiple times to build a power consumption prediction model; then the total power generation and predicted power usage of a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result;

[0048] If the power consumption prediction result and the actual power consumption of the actual load do not exceed the standard threshold, the battery continues to be in a discharge state. When it exceeds the standard threshold, the battery is boosted and charged.

[0049] The parameter acquisition component of the present invention accurately obtains photovoltaic power generation data and load data, provides real-time information input, can perform illumination analysis and load prediction, and enhance the adaptability of the system; it provides a necessary and reliable data basis for subsequent decision-making of the photovoltaic system, and realizes intelligent energy management. The model building component generates an available power consumption prediction model, which can effectively identify patterns and trends in historical data, update the model in real time, and optimize the accuracy of the prediction; through accurate power consumption prediction, it can identify possible energy shortages in advance, facilitate the formulation of corresponding charging and discharging strategies, and improve the intelligence of energy management. The charging and discharging control component realizes flexible charging and discharging state control, ensures the effective use of the battery, and does not cause over-discharge or over-charging; ensures the stability of the system and maintains the continuity of power supply; through intelligent control mechanisms, it optimizes the efficiency of photovoltaic energy use, improves the economy and sustainability of the system, and enhances the practicality of photovoltaic power generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of the functional modules of the photovoltaic battery charge and discharge controller of the present invention;

[0051] Figure 2 A schematic diagram of the steps of an embodiment of a photovoltaic battery charge and discharge control method of the present invention;

[0052] Figure 3 A schematic flow chart of steps for obtaining the total power generated by a photovoltaic panel and the load power connected to an inverter in one embodiment of a photovoltaic battery charge and discharge control method of the present invention;

[0053] Figure 4A schematic flow chart of the steps of constructing a power consumption prediction model for an embodiment of a photovoltaic battery charge and discharge control method of the present invention;

[0054] Figure 5 A schematic flow chart of the steps of setting and comparing threshold values ​​in one embodiment of a photovoltaic battery charge and discharge control method of the present invention;

[0055] Figure 6 It is a structural schematic diagram of an embodiment of an electronic device of the present invention;

[0056] Figure 7 It is a schematic structural diagram of an embodiment of the storage medium of the present invention. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] The terms "first", "second" and "third" in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first", "second" and "third" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. All directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship, movement, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication also changes accordingly. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.

[0059] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0060] like Figure 1 As shown, this embodiment provides an embodiment of a photovoltaic battery charge and discharge controller. In this embodiment, the photovoltaic battery charge and discharge controller specifically includes: a parameter acquisition component 1, a model building component 2, and a charge and discharge control component 3;

[0061] Among them, the parameter acquisition component 1 is used to obtain the total power generation of the photovoltaic panel and the load power connected to the inverter, and calculate the total power generation according to the illumination time in a certain week, month or quarter in the power generation area. At the same time, according to the power used by the historical load, the predicted power usage in a certain week, month or quarter is obtained; the model construction component 2 is used to obtain the power consumption values ​​of the photovoltaic battery during the charging and discharging process for multiple times according to the historical total power generation and power, and construct a power consumption prediction model; then the total power generation and predicted power usage in a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result; the charge and discharge control component 3 is used to calculate the power consumption prediction result and the actual load actual power consumption. If the actual power consumption does not exceed the standard threshold, the battery continues to be in a discharge state. If it exceeds the standard threshold, the battery is boosted and charged;

[0062] Preferably, the working principle of the photovoltaic battery charge and discharge controller of this embodiment is as follows: the parameter acquisition component 1 calculates the total power generation by monitoring the total power generation of the photovoltaic panel and the load power connected to the inverter, combined with the illumination time of a specific period (a week, a month or a quarter). At the same time, it also uses historical load data to predict the power usage demand within this time period. The model building component 2 establishes a power consumption prediction model based on the historical power and the power consumption during the previous charging and discharging processes. Subsequently, the newly obtained total power generation and the predicted power usage are input into the model to obtain the power consumption prediction results for a certain time period in the future. The charge and discharge control component 3 compares the power consumption predicted by the model with the actual load power consumption. If the predicted power consumption is within the standard threshold range, the battery continues to maintain the discharge state; if it exceeds the threshold, boost charging is performed to ensure that the system can operate stably.

[0063] The parameter acquisition component 1 of this embodiment accurately acquires photovoltaic power generation data and load data, provides real-time information input, can perform illumination analysis and load prediction, and enhance the adaptability of the system; it provides the necessary and reliable data basis for the subsequent decision-making of the photovoltaic system, and realizes intelligent energy management. The model building component 2 generates an available power consumption prediction model, which can effectively identify patterns and trends in historical data, update the model in real time, and optimize the accuracy of the prediction; through accurate power consumption prediction, it can identify possible energy shortages in advance, facilitate the formulation of corresponding charging and discharging strategies, and improve the intelligence of energy management. The charging and discharging control component 3 realizes flexible charging and discharging state control, ensures the effective use of the battery, and does not cause over-discharge or over-charging; ensures the stability of the system and maintains the continuity of power supply; through intelligent control mechanisms, it optimizes the efficiency of photovoltaic energy use, improves the economy and sustainability of the system, and enhances the practicality of photovoltaic power generation.

[0064] In summary, the combination of the components of this embodiment forms a complete photovoltaic battery management system, which can effectively control the charging and discharging process and automatically adjust the system to cope with the ever-changing photovoltaic power generation and load requirements; through intelligent management, it reduces energy waste, increases the self-use rate of electricity, and thus improves economic benefits; it promotes the efficient use of photovoltaic energy, reduces dependence on traditional energy, and helps to promote and apply renewable energy, and supports environmental protection and sustainable development. The photovoltaic battery charge and discharge controller implements a complete set of intelligent management mechanisms, which ensures the efficiency and reliability of the photovoltaic system through accurate data acquisition, effective model construction, and flexible charge and discharge control.

[0065] Furthermore, the parameter acquisition component 1 specifically includes:

[0066] The time calculation module is used to obtain the location information of the power generation area, parse the meridian information from the location information through the geographic information system, and determine the time coefficient of the corresponding week, month or quarter using the type of meridian information; calculate the noon time corresponding to the photovoltaic panel according to the time coefficient and the meridian information, and determine the illumination time of the photovoltaic panel based on the current date and noon time;

[0067] The power generation calculation module is used to obtain the total power generation energy of the photovoltaic panel according to the illumination time and the power generation power of the photovoltaic panel;

[0068] The load processing module is used to obtain a list of power supply requirements contained in the loads according to the information of the loads connected to the inverter, and determine the power consumption corresponding to each load unit; according to the power consumption, determine the power supply requirements of the loads connected to the inverter, classify different loads, and determine the power coefficient corresponding to the priority of the loads;

[0069] Preferably, the working principle of this embodiment is as follows: the time calculation module analyzes the meridians to obtain the time coefficient, such as the change in light intensity in different time periods; the noon and light time calculated are used to dynamically adjust the estimation of power generation capacity. The power generation calculation module inputs the light time and outputs the generated power value of the photovoltaic panel for subsequent energy scheduling and management. The load processing module obtains the power demand of each load and classifies it (such as important load, secondary load); sets the power supply priority and corresponding power coefficient of different loads.

[0070] The time calculation module of this embodiment obtains accurate sunshine time in real time according to data such as geographic location and meridian information, thereby affecting the analysis of power generation efficiency; it provides time-based power generation prediction and provides a scientific basis for power scheduling. The intelligent operation of the photovoltaic system is realized, and the accurate prediction and calculation of power generation are improved. The power generation calculation module accurately calculates the power output of the photovoltaic system in a specific period of time to facilitate subsequent load management; accurate power generation data helps to optimize power distribution and use, and improve the overall efficiency and economy of the system. The load processing module realizes dynamic management and scheduling of loads by analyzing and classifying load priorities; it guarantees the power supply needs of important loads when power is insufficient, and improves the reliability of the system. Dynamic load management enhances the flexibility and adaptability of the entire power system, maximizes the advantages of renewable energy, and can effectively allocate resources under unstable power generation conditions.

[0071] In summary, this embodiment achieves automatic system adjustment through dynamic adjustment and real-time monitoring, combined with time and load information; improves the utilization efficiency of photovoltaic power generation, reduces energy waste, and optimizes the system working state; provides an accurate data basis, supports intelligent decision-making, increases the importance of renewable energy in the overall energy structure, and promotes energy diversification and sustainable development.

[0072] Furthermore, the model building component 2 specifically includes:

[0073] The data partitioning module is used to obtain the total power and electricity generated at the same historical time according to the time series, and to establish a sample data set containing the total power and electricity generated according to the type of the total power and electricity generated as an identifier; the sample data set is divided according to the total number of samples in different identifiers in the ratio of 7:2:1 among the training set, the test set and the validation set to obtain the training set, the test set and the validation set;

[0074] The model training module is used to train the power consumption prediction model using the training set, and after the training, the performance indicators of the trained power consumption prediction model are tested using the test set, and the reliability of the trained power consumption prediction model is evaluated using the validation set. If it meets the preset standards, it is qualified. If it does not meet the preset standards, the historical total power and electricity of another time series are obtained to retrain the power consumption prediction model;

[0075] The model prediction module is used to input the real-time total power generation and predicted power usage of a certain week, month or quarter into the trained power consumption prediction model, and obtain the corresponding power consumption prediction result of a certain week, month or quarter from the power consumption prediction model.

[0076] Preferably, the data partitioning module of this embodiment inputs historical power generation records, extracts total power generation and electricity data; forms an identifier according to the time series and power type, and constructs a standardized data set; divides the data according to the ratio of 70% for training, 20% for testing, and 10% for verification; the model training module inputs the training set data, and uses machine learning or deep learning algorithms to train the model; and uses the test set to analyze performance indicators, such as mean square error (MSE), coefficient of determination (R 2 ) etc.; if the model performance does not meet the standard, obtain other time series data for re-training; the model prediction module inputs the real-time power generation data of a certain week, month or quarter into the trained model and outputs the corresponding power consumption prediction result.

[0077] The data partitioning module of this embodiment generates a high-quality sample data set to ensure that the basic data for model training is authentic and valid; by reasonably dividing the training, test and validation sets, a multi-stage model evaluation mechanism is provided to ensure the generalization ability of the model; accurate data partitioning can reduce the risk of overfitting or underfitting and optimize the subsequent model training process. The model training module improves the prediction performance through a scientific model training method, and ensures the stability and reliability of the model in the verification stage. The iterative process ensures that the model can adapt to changes in different time series; it improves the accuracy and credibility of the model, provides a more robust prediction preparation for practical applications, and improves the model's adaptability. The model prediction module realizes real-time data input and effectively outputs the prediction results of power consumption; it can flexibly provide targeted energy consumption forecasts for different time periods (weeks, months, quarters) to meet diverse needs; it improves the efficiency of power management, helps to reasonably schedule and plan power resources, and reduces the risk of excessive consumption or alarms.

[0078] In summary, the model building component of this embodiment provides data-based support and information for decision makers through accurate power consumption prediction, and provides an intelligent solution for the scheduling of power production and distribution; accurate prediction results can effectively guide power scheduling and optimize energy configuration, thereby reducing costs and improving energy utilization; through real-time monitoring, training and feedback mechanisms, it can achieve rapid response to power demand, reduce system volatility, and improve the stability of power supply; it provides support for the use of renewable energy, promotes the widespread application of clean energy, and contributes to the goals of environmental protection and sustainable development. Model building component 2 provides important technical support for the optimization of power management systems through systematic data processing and prediction capabilities, and promotes the development and application of smart grids.

[0079] Furthermore, the model training module specifically includes:

[0080] A training request submodule, used to receive a training request for a power consumption prediction model initiated by a controller, decompose the training request into multiple power consumption prediction model training tasks, add corresponding security protection logic to the power consumption prediction model training task, and then insert the power consumption prediction model training task into the task queue;

[0081] The data input submodule is used to input the training set in batches, and sequentially input the power relationship matrix of the total power generation and the priority of the loads into the pre-trained power consumption prediction model for training, so as to obtain a trained power consumption prediction model; wherein the power relationship matrix includes: constructing an identification confusion matrix of each load based on the power consumption corresponding to each load, when the power consumption of two loads is the same, the power relationship of the two loads is set to 1, otherwise it is 0; the label confusion matrix is ​​used as the power relationship matrix;

[0082] The initial training submodule is used to perform the first training on the pre-trained power consumption prediction model to obtain the first training quality data, obtain the accuracy and recall of the power consumption prediction model through the test set for the first training quality data, and calculate the F1 value of the power consumption prediction model; use the validation set to evaluate the reliability of the trained power consumption prediction model;

[0083] Preferably, the working principle of this embodiment is as follows: the training request submodule, the controller initiates the training request, the training request submodule parses the request content, and decomposes several specific training tasks; performs security checks on each training task to verify the security of the data source and the model; manages the concurrent execution of multiple tasks through the task queue to ensure the efficiency and controllability of the training process. The data input submodule constructs the identification confusion matrix of each load, determines the relationship between the two by comparing the power values ​​of different loads (the same is 1, and the different is 0), and forms an electric quantity relationship matrix; the electric quantity relationship matrix and other necessary input data are flowed into the model in batches for training, thereby updating the model parameters to improve the prediction effect. After the initial training submodule completes the first training, the accuracy and recall rate of the model on the prediction task are calculated using the data of the test set; the F1 value (the harmonic mean of the accuracy and recall rate) is calculated as an important indicator for model evaluation; finally, the reliability of the trained model is evaluated using the validation set to ensure its effectiveness in practical applications.

[0084] The training request submodule of this embodiment realizes the dynamic acceptance and processing of training requests, and improves the flexibility of training; through the security protection mechanism, it effectively reduces the potential risk of data leakage or model attack; ensures the security and reliability of the training process, and provides a solid foundation for subsequent model training. The data input submodule enhances the structuring and standardization of training data by batch inputting the power relationship matrix, making model training more efficient; clarifies the power relationship between loads, and provides the model with richer contextual information; ensures the information integrity of the model during the learning process, and promotes the accuracy of the model's prediction of power consumption. The initial training submodule evaluates the performance of the model through multi-dimensional indicators such as accuracy, recall rate and F1 value to ensure the quality of model training; provides a feedback mechanism to adjust the model training strategy in real time according to the training results; embedded performance evaluation ensures the efficiency and reliability of the model, so that the final prediction results can have a high degree of credibility in practical applications.

[0085] In summary, the design and implementation of the model training module of this embodiment has a far-reaching impact on the effectiveness and availability of the entire power consumption prediction system; it can automatically adjust the training tasks according to real-time requests to ensure that the model is always in the optimal training state and adapt to the needs of different application scenarios; by introducing security protection logic, it ensures the security of data and models during the training process, reducing unnecessary risks; using structured data input, the model can obtain more accurate contextual information during the training process and enhance its prediction ability; by evaluating the model performance through quantitative indicators, timely adjustments can be made to ensure continuous improvement of model performance and adapt to changing electricity demand. The model training module effectively improves the training quality and reliability of the power consumption prediction model through scientific methods and mechanisms, and promotes the realization of intelligent power management.

[0086] Furthermore, the training request submodule specifically includes:

[0087] The logic judgment unit is used to generate the training behavior of the training request. If the training behavior has a target process, it must first pass the security protection logic check; the current training behavior is allowed to continue to execute the training request after passing the security protection logic review. If it fails to pass the security protection logic review, the current training behavior is a harmful behavior and will be prohibited from execution; the security protection logic is used to monitor all suspicious behaviors of the training request to prevent bad operations on other training requests and to prevent damage or malicious occupation of the controller;

[0088] An execution and delivery unit, used to generate an access control list delivery instruction according to the input address of the training behavior that cannot pass the security protection logic audit, and send the access control list delivery instruction to the network control end of the controller; the network control end is used to uniformly manage the power prediction model training tasks, and is also used to receive the access control list delivery instruction, and send the access control list rules to the network control end according to the access control list delivery instruction;

[0089] The isolation interception unit is used to call the access control list rules issued by the network control terminal to intercept and isolate the training behavior of all training requests associated with the input address.

[0090] Preferably, the working principle of this embodiment is as follows: when a training request is generated, the logic judgment unit first determines whether the request is associated with a running training process; if there is a target process, the training request is then subjected to a security protection check; if the security protection logic audit passes, the training request is allowed to execute; if not, the request is marked as a harmful behavior and execution is prohibited. The execution and delivery unit collects the input address and related information for the training request that has not passed the audit, generates an access control list containing control rules for denying access to the address; and delivers the list to the network control end of the controller to implement access restrictions. The network control end receives the access control list instruction from the execution and delivery unit; according to the received instruction, the access control list rules are implemented in the corresponding network request to maintain network security and the normal operation of the training request. The isolation interception unit calls the access control list provided by the network control end to monitor and analyze the occurrence of training requests in real time; intercepts and isolates the training request associated with the input address to prevent unauthorized or malicious training behavior from affecting the overall operation of the system.

[0091] The logic judgment unit of this embodiment improves the self-checking capability of the training request and can strictly verify the security before execution; it can effectively distinguish between normal and harmful training requests and reduce potential security risks; it ensures that the system will not be disturbed by malicious behavior during training, and improves the overall stability and reliability of the system. The execution and distribution unit automatically generates and distributes the access control list, centrally manages the prohibited access requests, simplifies the process of handling unsafe behaviors, and improves the response speed; through real-time control and management, the interference and impact of unauthorized training requests on the system are minimized, ensuring the security of the power prediction model training process; unified management of various training tasks, and implementation of corresponding access control strategies; enhanced the system's monitoring and management capabilities for training requests; ensure that any abnormal situation in the training process can be identified and processed in time, maintain the reasonable order of training tasks and the effective use of resources. The isolation interception unit realizes rapid response and processing of malicious requests, and enhances the self-healing ability of the system; through interception and isolation, it ensures that other training requests are not affected, and improves the overall operation efficiency of the training tasks; while ensuring the security of the system, it maintains the validity of normal training requests, laying a solid foundation for the accurate training of subsequent models.

[0092] In summary, the training request submodule of this embodiment forms a safe and efficient training request processing system through diversified unit division of labor and collaboration, which pioneered the importance of security protection in the training process. It has the following far-reaching significance: through a comprehensive security monitoring and access control mechanism, it effectively reduces the system risk caused by malicious behavior and ensures the safety and stability of the power prediction model training; the various functional units work together to improve the processing speed and efficiency of training requests, so that resources are fully utilized and a smoother environment is created for model training; the design is flexible, easy to adjust and expand, and can adapt to potential new needs and challenges in the future, and continuously ensure the operating efficiency of the system in an increasingly complex environment; it effectively prevents interference from harmful behaviors, ensures the stable operation of the system, and improves the training quality and reliability of the prediction model. Through these measures, the training request submodule lays a solid foundation for the robustness, compliance and sustainability of the entire power prediction system, and provides important guarantees for practical applications.

[0093] Furthermore, the data input submodule specifically includes:

[0094] The data extraction unit is used to extract a training task to be processed from the task queue to obtain the training set to be used; determine the amount of data in each batch, and extract the data of this batch from the training set according to the current batch index;

[0095] The matrix construction unit is used to record the corresponding power consumption of each load and create a matrix in which rows and columns correspond to these loads, and the element values ​​in the matrix are assigned according to whether the load powers are the same or not; if the powers of two loads are the same, the value of the corresponding position in the matrix is ​​set to 1; if the powers are different, they are set to 0; use the load identification confusion matrix as a label and integrate it into a power relationship matrix; combine the total power generation and load priority information to create a new matrix, which includes the total power generation, as well as the category and priority of the current load;

[0096] The data transmission unit is used to input the constructed power relationship matrix into the pre-trained power consumption prediction model in batches, prepare the input data format for each batch, call the training method of the power consumption prediction model, and pass the current batch data into the power consumption prediction model; after the power consumption prediction model receives the input data, it performs forward propagation, calculates the loss function, and then updates the weight and bias of the power consumption prediction model through back propagation.

[0097] Preferably, the data extraction unit of this embodiment selects the training task to be processed from the task queue and obtains the relevant training set data; determines the amount of data for each batch (for example, 64 samples), and extracts the corresponding data from the training set in sequence according to the current batch index. Optimize memory usage: reduce the pressure on system memory by loading data in batches instead of loading the entire training set at one time; improve efficiency: make the model training process more efficient, because the amount of data in each batch can be flexibly adjusted according to hardware resources. The significance achieved is to achieve efficient use of resources, ensure that the training task can be smoothly executed in an environment with limited resources, and improve the scalability of model training. The matrix construction unit records the load in each training sample and its corresponding power consumption, and constructs a load identification confusion matrix; generates a load identification confusion matrix according to the assignment of the same or not of the load power, and then integrates it as a label into a power relationship matrix, while combining the total power generation and load priority information. Clear relationship representation: the similarity and functional relationship between loads are displayed through a matrix structure, so that the model can recognize and learn these relationships; information integration: integrate the total power generation and load priority, improve the input dimension of model learning, and provide more context information. Significance achieved: The model can accurately learn the load characteristics and their interrelationships, which helps to improve the prediction accuracy of the model and effectively support the subsequent training process. The data transmission unit inputs the constructed power relationship matrix into the pre-trained power consumption prediction model in batches and prepares the appropriate data format; after the model receives the input, it performs forward propagation to calculate the output, and then updates the model weights and biases through back propagation according to the calculated loss value. Efficient model training: Batch input makes the training process efficient because multiple data samples can be processed in parallel to increase the training speed; dynamic learning: through the back propagation mechanism, the model can continuously learn from the data and gradually improve its accuracy and recall rate. Significance achieved: Improve the learning efficiency and accuracy of the model to ensure that the final prediction results are more reliable. The efficient training process also helps to quickly deploy and feedback in practical applications.

[0098] In summary, the data input submodule of this embodiment achieves the following important significances through efficient data extraction, clear matrix relationship construction and effective data input processing: Improve resource utilization: avoid memory bottlenecks through batch processing and adapt to the processing requirements of data of different scales; enhance model expression capabilities: through the construction of matrix information, the model can capture more complex feature relationships, which is helpful for in-depth learning of the behavior patterns of different loads; optimize model training efficiency: the integration of clear data input processes improves training speed and accuracy, and further improves the practical application value of the prediction model; these measures jointly promote the construction and optimization of power consumption prediction models, and provide strong support for practical applications such as sustainable energy management and load scheduling.

[0099] Furthermore, the initial training submodule specifically includes:

[0100] The validation definition unit is used to process the validation set in batches according to the set batch size. For each batch of data, it is fed into the model, forward propagation is performed, and the prediction results are output. At the same time, the calculation evaluation indicators are set, including accuracy, recall rate, and F1 value.

[0101] The indicator calculation unit is used to calculate the evaluation indicator based on the prediction results of the model and the true labels in the validation set. The specific method is as follows:

[0102] Confusion matrix: Construct a confusion matrix and compare the true labels with the predicted labels to get the number of TP (true positive), FP (false positive), TN (true negative) and FN (false negative);

[0103] Accuracy calculation:

[0104] Recall calculation:

[0105] F1 value calculation:

[0106] Among them, the precision is calculated by the following method:

[0107] The report generation unit is used to summarize the above calculation results and generate a model evaluation report, including the specific values ​​of different evaluation indicators, data trends over time, etc.

[0108] Preferably, the verification definition unit of this embodiment processes the verification set data in batches according to a preset batch size; by batching, memory usage can be effectively managed, and the model can process data step by step; for each batch of input data, the model performs forward propagation and outputs prediction results; the evaluation index setting specifies the evaluation indicators that need to be calculated, including accuracy, recall rate, and F1 value, etc., to facilitate the calculation of subsequent indicators. Efficient processing: improves the efficiency of processing the verification set data, especially when the verification set is large, batch processing can make memory management more flexible; model output: the prediction results generated in this process provide basic data for subsequent analysis. Significance achieved: ensures that the performance evaluation of the model on the verification set data is systematic and batched, provides orderly and structured data for subsequent analysis, and enhances the rigor of model evaluation. Indicator calculation unit Confusion matrix construction: Based on the real labels of the validation set and the prediction results of the model, a confusion matrix is ​​constructed to extract key values ​​such as TP (true positive), FP (false positive), TN (true negative) and FN (false negative); Calculate evaluation indicators: According to the values ​​in the confusion matrix, calculate the accuracy, recall, precision and F1 value respectively; Comprehensively evaluate model performance: Through the confusion matrix and various evaluation indicators, it can provide multi-dimensional analysis of model performance and help identify the strengths and weaknesses of the model; Accurate feedback: Provide accurate quantitative feedback to facilitate the technical team to make corresponding adjustments and optimizations; Significance achieved: Enhance the comprehensiveness and scientificity of model evaluation, provide a solid data foundation for performance analysis, help identify any data deviations and model limitations, and then promote technical improvements and model optimization. The report generation unit summarizes all calculation results (such as accuracy, recall, F1 value, etc.) and generates a model evaluation report in a structured manner, including the specific values ​​of different evaluation indicators and data trends over time. Clear information communication: The generated report makes the results of the model evaluation clear at a glance, which is convenient for communication with team members and stakeholders; Decision support: The report provides evidence-based information to help the team make subsequent decisions, such as changing model parameters, collecting more training data, or adjusting algorithm strategies. Significance achieved: It can not only provide data support for model improvement, but also provide a transparent information flow for the project's management and development team, helping to communicate and make decisions effectively in different development cycles.

[0109] In summary, the initial training submodule of this embodiment evaluates and reports model performance through a systematic workflow, which has the following specific significances: improving the scientific nature of model evaluation: ensuring the reliability and effectiveness of the evaluation process through clear indicators and quantitative analysis; feedback and improvement mechanism: establishing a feedback-loop so that the model can be improved through continuous evaluation and learning, enhancing its generalization ability; supporting decision making: the generated evaluation report provides a digital basis for business decisions, ensuring a close connection between technology development and business needs; this whole process greatly promotes the sustainability and success rate of machine learning projects.

[0110] Furthermore, the model training module also includes:

[0111] The standard comparison submodule is used to receive the specific values ​​of different evaluation indicators of the power consumption prediction model after initial training, and compare them with the corresponding preset standards respectively;

[0112] The comprehensive scoring submodule is used to score the reliability of the power consumption prediction model after the initial training according to the preset weights of various evaluation indicators and the corresponding preset standards. When the scoring result meets the expectations, the power consumption prediction model after the initial training is used as the power consumption prediction model; if the scoring result does not meet the expectations, the successful training is performed;

[0113] The data re-acquisition submodule is used to re-acquire the historical total power and electricity of another time series and re-train the power consumption prediction model;

[0114] Preferably, the working principle of this embodiment is: by evaluating and scoring the power consumption prediction model obtained through preliminary training, the reliability of the model is judged, and it is decided whether to put the model into practical application. If the performance of the model does not meet the expected standards, the data is re-acquired and the model is retrained to ensure that the model is always in the best state and can effectively meet the needs.

[0115] The standard comparison submodule of this embodiment strictly examines the various indicators of the model through the set standards to identify whether the performance of the model meets the predefined performance requirements. The significance achieved: ensure that the model meets a certain standard before it is put into actual use, thereby improving the reliability and effectiveness of the model in practical applications; through a standardized evaluation process, potential risks that may be caused by the model in actual operation can be avoided. The comprehensive scoring submodule scores and weights each evaluation indicator. The comprehensive scoring submodule can provide a concise quantitative view of the overall performance of the model, reflecting the global performance of the model while also showing the relative importance of each indicator. The significance achieved: the overall quality of the model can be quickly grasped and provided as a reference for subsequent decision-making; if the score does not meet expectations, measures can be taken quickly to adjust and optimize the model to ensure that the final delivered model is available and efficient. The data re-acquisition submodule introduces new data sources, and the data re-acquisition submodule provides more information for model training, especially when facing data drift, seasonal changes, etc. Significance achieved: Ensure that the model always has the latest data support during the training process, enhance the model's adaptability and generalization ability. By continuously updating the training data, the model's prediction effect will continue to improve, ultimately enhancing its practicality and reliability in real-world scenarios.

[0116] In summary, this embodiment constitutes a cyclic feedback and optimization mechanism, the specific significance of which includes: enhancing the reliability of the model: through standard comparison and comprehensive scoring, it can be ensured that the model is strictly reviewed before actual application, thereby reducing the risk of model failure; improving efficiency: quickly identifying poorly performing models and performing rapid iterative training through data re-acquisition to enhance development efficiency; promoting continuous improvement: real-time monitoring of model performance and data update based on the score to ensure the continuous adaptability of model performance to the environment and improve the long-term effectiveness of the model; supporting decision-making: clear scoring and status feedback provide a basis for team management and decision-making, allowing the technical team to arrange subsequent work more scientifically; through such a structure and process design, the model training module can not only effectively improve the performance of a single model, but also ensure that the entire system maintains a good operating state in a complex environment.

[0117] Furthermore, the charge and discharge control component 3 specifically includes:

[0118] The threshold setting submodule is used to set the threshold for power consumption and compare the power consumption prediction result with the actual power consumption of the actual load; when the power consumption prediction result does not exceed the threshold compared with the actual power consumption of the actual load, no data is sent to the charging and discharging electronic module; when it exceeds the standard threshold, a charging instruction is sent to the charging and discharging electronic module;

[0119] The charging and discharging electronic module is used to control the charging and discharging state of the battery. When the power consumption prediction result does not exceed the standard threshold compared with the actual power consumption of the actual load, the battery continues to be in the discharging state. When the comparison exceeds the standard threshold, the charging instruction from the threshold setting submodule is received, and the battery is boosted and charged.

[0120] Preferably, the working principle of this embodiment is: by setting a threshold for power consumption, and comparing the power consumption prediction result with the actual power consumption of the actual load; when the power consumption prediction result is compared with the actual power consumption of the actual load and does not exceed the threshold, the battery continues to be in a discharge state, and when it exceeds the standard threshold, a charging instruction is sent to the charging and discharging electronic module to boost charging the battery.

[0121] To summarize, the threshold setting submodule can predict power consumption based on historical data and real-time data, and compare the predicted results with the actual load power consumption. According to the comparison results, it can intelligently decide whether to send charging instructions to the charging and discharging module, and avoid unnecessary charging operations by precisely controlling the charging timing, thus reducing energy waste, extending the service life of the equipment, and ensuring that sufficient power support can be provided in time when needed, thereby improving resource utilization. The charging and discharging electronic module can precisely control the charging and discharging of the battery according to the instructions of the threshold setting submodule, thereby shortening the charging time and improving the charging efficiency, reducing damage to the battery, and extending the battery service life.

[0122] Furthermore, the threshold setting submodule specifically includes:

[0123] A threshold setting unit is used to set and manage the threshold. According to system requirements, the threshold is set to 20% of the battery capacity and stored in a storage medium so that the data comparison unit can access it at any time. The threshold is updated and set according to the system operation status, device performance changes or user feedback.

[0124] The data comparison unit is responsible for comparing the power consumption prediction result with the actual power consumption of the actual load, and deciding whether to send a charging instruction to the charging and discharging electronic module based on the comparison result. If the threshold is not exceeded, no operation is performed. If the threshold is exceeded, a charging instruction is generated and sent to the charging and discharging electronic module.

[0125] Preferably, the working principle of this embodiment is as follows: the threshold setting unit preliminarily sets the threshold to 20% of the battery capacity according to system requirements, and stores the set threshold in the storage medium of the system. The threshold setting can be adjusted as needed according to the system operating status, device performance or user feedback; after collecting the data, the data comparison unit compares the power consumption prediction result with the actual power consumption of the actual load, and decides whether to send a charging instruction to the charging and discharging electronic module based on the comparison result. If the threshold is not exceeded, no operation is performed. If the threshold is exceeded, a charging instruction is generated and sent to the charging and discharging electronic module.

[0126] In summary, through flexible configuration and dynamic adjustment of thresholds, the system can more accurately control the charging timing, optimize power management, and enhance the adaptability and stability of the system; by accurately controlling the charging timing, unnecessary charging operations are avoided, thereby reducing energy consumption and carbon emissions, preventing equipment from being damaged due to power exhaustion, extending the service life of the equipment, and improving the stability and reliability of the system.

[0127] like Figure 2 As shown, this embodiment also provides an embodiment of a photovoltaic battery charge and discharge control method. In this embodiment, the photovoltaic battery charge and discharge control method is applied to the photovoltaic battery charge and discharge controller in the above embodiment. The photovoltaic battery charge and discharge control method specifically includes the following steps:

[0128] Step S1: Obtain the total power generated by the photovoltaic panels and the load power connected to the inverter, calculate the total power generated according to the sunshine time in the power generation area in a certain week, month or quarter, and obtain the predicted power usage in a certain week, month or quarter according to the power usage of the historical load;

[0129] Step S2: According to the historical total power generation and electricity, the power consumption values ​​of the photovoltaic battery during the charging and discharging process are obtained multiple times to build a power consumption prediction model; then the total power generation and predicted power usage of a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result;

[0130] Step S3: If the power consumption prediction result and the actual power consumption of the actual load do not exceed the standard threshold, the battery continues to be in a discharge state. If it exceeds the standard threshold, the battery is boosted and charged;

[0131] Preferably, the technical effect of step S1 of this embodiment is: by accurately obtaining the total power generated by the photovoltaic panels and the load power connected to the inverter, the data basis for subsequent analysis is guaranteed; according to the illumination time and historical load power usage at different time scales (week, month, quarter), the power generation and power usage are predicted, making the analysis more comprehensive and flexible;

[0132] The technical effect of step S2 of this embodiment is as follows: based on the historical total power generation and power data, a power consumption prediction model is constructed by statistical learning or machine learning methods, thereby improving the accuracy of the prediction; the total power generation and predicted power usage in the current time period are input into the model to obtain the power consumption prediction result, which provides a scientific basis for charging decisions, realizes intelligent management of battery power, and reduces errors in human judgment;

[0133] The technical effect of step S3 of this embodiment is as follows: the charging state of the battery is determined in real time based on the comparison between the power consumption prediction result and the actual power consumption of the actual load, thereby ensuring timely replenishment of power. By setting the standard threshold, accurate control of the battery power is achieved, thereby avoiding power waste and battery damage.

[0134] In summary, this embodiment provides detailed data support for subsequent power consumption prediction and charging decisions through data collection and prediction, which helps to manage battery power more accurately. By predicting the power demand in different time periods, preparations can be made in advance to reduce the risk of power outages due to insufficient power. The construction and application of the power consumption prediction model realizes the intelligent management of battery power and reduces the error of human judgment. By accurately predicting power consumption, charging and discharging can be arranged more reasonably to avoid damage to the battery caused by overcharging or discharging, while improving the utilization efficiency of resources. By adjusting the charging state of the battery in real time, it ensures that the system can provide a stable power supply at any time period, thereby improving the reliability and stability of the system.

[0135] Furthermore, if Figure 3 As shown, in step S1, the total power generated by the photovoltaic panel and the load power connected to the inverter are obtained, and the specific steps include:

[0136] Step S11: The time calculation module obtains the location information of the power generation area, parses the meridian information from the location information through the geographic information system, and determines the time coefficient of a corresponding week, month or quarter using the type of the meridian information; calculates the noon time corresponding to the photovoltaic panel according to the time coefficient and the meridian information, and determines the illumination time of the photovoltaic panel based on the current date and the noon time;

[0137] Step S12: the power generation calculation module obtains the total power generation energy of the photovoltaic panel according to the illumination time and the power generation power of the photovoltaic panel;

[0138] Step S13: The load processing module obtains a list of power supply requirements contained in the loads according to the information of the loads connected to the inverter, and determines the power consumption corresponding to each load unit; according to the power consumption, determines the power supply requirements of the loads connected to the inverter, classifies different loads, and determines the power coefficient corresponding to the priority of the loads;

[0139] Preferably, by accurately calculating the illumination time of photovoltaic panels, their power generation can be predicted more accurately, which is helpful for the scheduling and planning of power systems. Understanding the illumination conditions in different time periods helps to optimize the layout and installation angle of photovoltaic panels to maximize the use of solar energy resources. Through power generation data, the economic benefits of photovoltaic power generation systems can be further analyzed to provide a scientific basis for investment decisions. Through load classification and priority determination, it can ensure that when the power supply is tight, the power supply needs of key loads are met first, improve power supply reliability, and reasonably allocate power resources according to the priority and power consumption of the loads to avoid power waste and improve energy efficiency.

[0140] Furthermore, if Figure 4 As shown, in step S2, a power consumption prediction model is constructed, and the specific steps include:

[0141] Step S21: The data partitioning module obtains the total power and electricity generated at the same historical time according to the time series, and establishes a sample data set containing the total power and electricity generated according to the type of the total power and electricity generated as an identifier; the sample data set is divided according to the total number of samples in different identifiers in a ratio of 7:2:1 among the training set, the test set and the validation set to obtain the training set, the test set and the validation set;

[0142] Step S22: Use the training set to train the power consumption prediction model, use the test set to test the performance indicators of the trained power consumption prediction model after training, and then use the validation set to evaluate the reliability of the trained power consumption prediction model. If it meets the preset standard, it is qualified. If it does not meet the preset standard, obtain the historical total power and electricity of another time series and retrain the power consumption prediction model;

[0143] Step S23: The model prediction module inputs the real-time total power generation and predicted power usage of a certain week, month or quarter into the trained power consumption prediction model, and obtains the corresponding power consumption prediction result of a certain week, month or quarter from the power consumption prediction model.

[0144] Preferably, this embodiment provides sufficient and well-structured data support for the training of the power consumption prediction model. By dividing the training set, test set and validation set, the performance of the model can be comprehensively evaluated, providing a basis for the optimization and improvement of the model. Through the cycle of training, testing and verification, the model performance is continuously optimized so that it can better adapt to actual application scenarios, ensure the reliability and stability of the model in actual applications, and reduce the risk of errors. The model has the ability of real-time prediction, which is helpful for real-time scheduling and decision-making of the power system, and helps to formulate more scientific and reasonable scheduling plans and energy management strategies.

[0145] Furthermore, if Figure 5As shown, in step S3, the threshold is set and compared, and the specific steps include:

[0146] Step S31: according to system requirements, the threshold is set to 20% of the battery capacity and stored in a storage medium so that the data comparison unit can access it at any time, and the threshold is updated and set according to the system operation status, device performance changes or user feedback;

[0147] Step S32: Compare the power consumption prediction result with the actual power consumption of the actual load, and decide whether to send a charging instruction to the charging and discharging electronic module based on the comparison result. If it does not exceed the threshold, no operation is performed. If it exceeds the threshold, a charging instruction is generated and sent to the charging and discharging electronic module.

[0148] Step S33: When the power consumption prediction result is compared with the actual power consumption of the actual load and does not exceed the standard threshold, the battery continues to be in a discharge state. When the comparison exceeds the standard threshold and a charging instruction is received from the threshold setting submodule, the battery is boosted and charged.

[0149] Preferably, this embodiment provides a unified standard for the system's charging decisions by setting clear thresholds, which helps to achieve standardized management of the system, ensure that the system can maintain optimal performance under different operating conditions, and improve the reliability and stability of the system; through precise data comparison and intelligent decision-making, accurate control of the charging process is achieved, energy waste is avoided, the energy saving and efficiency of the system are improved, and the service life of the equipment is extended; the battery is maintained in a discharged state when charging is not required, ensuring the stability of load power supply, and charging operations are performed in time when charging is required, avoiding power supply interruptions caused by insufficient power, and optimizing management of the entire system by intelligently controlling the charging and discharging process of the battery, thereby improving the overall performance and efficiency of the system.

[0150] like Figure 6 As shown, this embodiment provides an embodiment of an electronic device. In this embodiment, the electronic device 4 includes a processor 41 and a memory 42 coupled to the processor 41.

[0151] The memory 42 stores program instructions for implementing the photovoltaic battery charge and discharge control method of any of the above embodiments.

[0152] The processor 41 is used to execute program instructions stored in the memory 42 to control the charging and discharging of the photovoltaic battery.

[0153] The processor 41 may also be referred to as a CPU (Central Processing Unit). The processor 41 may be an integrated circuit chip having signal processing capabilities. The processor 41 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0154] Further, Figure 7 The schematic diagram of the structure of the storage medium of an embodiment of the present application is that the storage medium 5 of the embodiment of the present application stores program instructions 51 that can implement all the above methods, wherein the program instructions 51 can be stored in the above storage medium in the form of a software product, including several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or terminal devices such as a computer, a server, a mobile phone, and a tablet.

[0155] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0156] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. The above is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, is also included in the patent protection scope of the present invention.

[0157] The specific implementation methods of the invention are described in detail above, but they are only examples, and the invention is not limited to the specific implementation methods described above. For those skilled in the art, any equivalent modification or substitution of the invention is also within the scope of the invention, therefore, the equalization, modification, improvement, etc. made without departing from the spirit and principle of the invention should be included in the scope of the invention.

Claims

1. A photovoltaic battery charge and discharge controller, characterized in that: The photovoltaic battery charge and discharge controller comprises: The parameter acquisition component is used to obtain the total power generated by the photovoltaic panels and the load power connected to the inverter. The total power generated is calculated based on the sunshine time in the power generation area in a certain week, month or quarter. At the same time, the predicted power usage in a certain week, month or quarter is obtained based on the power usage of the historical load. The model building component is used to obtain the power consumption values ​​of the photovoltaic battery during multiple charging and discharging processes based on the historical total power generation and power consumption, and build a power consumption prediction model; then the total power generation and predicted power consumption of a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result; The charge and discharge control component is used to calculate the power consumption prediction result and the actual load power consumption. If the actual power consumption does not exceed the standard threshold, the battery continues to be in a discharge state. If it exceeds the standard threshold, the battery is boosted and charged.

2. The photovoltaic battery charge and discharge controller according to claim 1, characterized in that: Parameter acquisition components, including: The time calculation module is used to obtain the location information of the power generation area, parse the meridian information from the location information through the geographic information system, and determine the time coefficient of the corresponding week, month or quarter using the type of meridian information; calculate the noon time corresponding to the photovoltaic panel according to the time coefficient and the meridian information, and determine the illumination time of the photovoltaic panel based on the current date and noon time; The power generation calculation module is used to obtain the total power generation energy of the photovoltaic panel according to the illumination time and the power generation power of the photovoltaic panel; The load processing module is used to obtain a list of power supply requirements contained in the load according to the information of the load connected to the inverter, and determine the power consumption corresponding to each load unit; according to the power consumption, determine the power supply requirements of the load connected to the inverter, classify different loads, and determine the power coefficient corresponding to the priority of the load.

3. The photovoltaic battery charge and discharge controller according to claim 1, characterized in that: Model building components, including: The data partitioning module is used to obtain the total power and electricity generated at the same historical time according to the time series, and to establish a sample data set containing the total power and electricity generated according to the type of the total power and electricity generated as an identifier; the sample data set is divided according to the total number of samples in different identifiers in the ratio of 7:2:1 among the training set, the test set and the validation set to obtain the training set, the test set and the validation set; The model training module is used to train the power consumption prediction model using the training set, and after the training, the performance indicators of the trained power consumption prediction model are tested using the test set, and the reliability of the trained power consumption prediction model is evaluated using the validation set. If it meets the preset standards, it is qualified. If it does not meet the preset standards, the historical total power and electricity of another time series are obtained to retrain the power consumption prediction model; The model prediction module is used to input the real-time total power generation and predicted power usage of a certain week, month or quarter into the trained power consumption prediction model, and obtain the corresponding power consumption prediction result of a certain week, month or quarter from the power consumption prediction model.

4. The photovoltaic battery charge and discharge controller according to claim 3, characterized in that: Model training module, including: A training request submodule, used to receive a training request for a power consumption prediction model initiated by a controller, decompose the training request into multiple power consumption prediction model training tasks, add corresponding security protection logic to the power consumption prediction model training task, and then insert the power consumption prediction model training task into the task queue; The data input submodule is used to input the training set in batches, and sequentially input the power relationship matrix of the total power generation and the priority of the loads into the pre-trained power consumption prediction model for training, so as to obtain a trained power consumption prediction model; wherein the power relationship matrix includes: constructing an identification confusion matrix of each load based on the power consumption corresponding to each load, when the power consumption of two loads is the same, the power relationship of the two loads is set to 1, otherwise it is 0; the label confusion matrix is ​​used as the power relationship matrix; The initial training submodule is used to perform the first training on the pre-trained power consumption prediction model to obtain the first training quality data, obtain the accuracy and recall of the power consumption prediction model through the test set for the first training quality data, and calculate the F1 value of the power consumption prediction model; use the validation set to evaluate the reliability of the trained power consumption prediction model.

5. The photovoltaic battery charge and discharge controller according to claim 4, characterized in that: Training request submodule, including: The logic judgment unit is used to generate the training behavior of the training request. If the training behavior has a target process, it must first pass the security protection logic check; the current training behavior is allowed to continue to execute the training request after passing the security protection logic review. If it fails to pass the security protection logic review, the current training behavior is a harmful behavior and will be prohibited from execution; the security protection logic is used to monitor all suspicious behaviors of the training request to prevent bad operations on other training requests and to prevent damage or malicious occupation of the controller; An execution and delivery unit, used to generate an access control list delivery instruction according to the input address of the training behavior that cannot pass the security protection logic audit, and send the access control list delivery instruction to the network control end of the controller; the network control end is used to uniformly manage the power prediction model training tasks, and is also used to receive the access control list delivery instruction, and send the access control list rules to the network control end according to the access control list delivery instruction; The isolation interception unit is used to call the access control list rules issued by the network control terminal to intercept and isolate the training behavior of all training requests associated with the input address.

6. The photovoltaic battery charge and discharge controller according to claim 4, characterized in that: The data input submodule specifically includes: The data extraction unit is used to extract a training task to be processed from the task queue to obtain the training set to be used; determine the amount of data in each batch, and extract the data of this batch from the training set according to the current batch index; The matrix construction unit is used to record the corresponding power consumption of each load and create a matrix in which the rows and columns correspond to these loads, and the element values ​​in the matrix are assigned according to whether the load powers are the same or not; if the powers of two loads are the same, the value of the corresponding position in the matrix is ​​set to 1; if the powers are different, they are set to 0; use the load identification confusion matrix as a label and integrate it into a power relationship matrix; combine the total power generation and load priority information to create a new matrix, which includes the total power generation, as well as the category and priority information of the current load; The data transmission unit is used to input the constructed power relationship matrix into the pre-trained power consumption prediction model in batches, prepare the input data format for each batch, call the training method of the power consumption prediction model, and pass the current batch data into the power consumption prediction model; after the power consumption prediction model receives the input data, it performs forward propagation, calculates the loss function, and then updates the weight and bias of the power consumption prediction model through back propagation.

7. The photovoltaic battery charge and discharge controller according to claim 4, characterized in that: Initial training submodule, including: The validation definition unit is used to process the validation set in batches according to the set batch size. For each batch of data, it is fed into the model, forward propagation is performed, and the prediction results are output. At the same time, the calculation evaluation indicators are set, including accuracy, recall rate and F1 value. The indicator calculation unit is used to calculate the evaluation indicator based on the prediction results of the model and the true labels in the validation set; The report generation unit is used to summarize the above calculation results and generate a model evaluation report, including the specific values ​​of different evaluation indicators and the data trends over time.

8. The photovoltaic battery charge and discharge controller according to claim 3, characterized in that: The model training module also includes: The standard comparison submodule is used to receive the specific values ​​of different evaluation indicators of the power consumption prediction model after initial training, and compare them with the corresponding preset standards respectively; The comprehensive scoring submodule is used to score the reliability of the power consumption prediction model after the initial training according to the preset weights of various evaluation indicators and the corresponding preset standards. When the scoring result meets the expectations, the power consumption prediction model after the initial training is used as the power consumption prediction model; if the scoring result does not meet the expectations, the successful training is performed; The data re-acquisition submodule is used to re-acquire the historical total power and power of another time series and re-train the power consumption prediction model.

9. The photovoltaic battery charge and discharge controller according to claim 1, characterized in that: Charge and discharge control components, including: The threshold setting submodule is used to set the threshold for power consumption and compare the power consumption prediction result with the actual power consumption of the actual load; when the power consumption prediction result does not exceed the threshold compared with the actual power consumption of the actual load, no data is sent to the charging and discharging electronic module; when it exceeds the standard threshold, a charging instruction is sent to the charging and discharging electronic module; The charging and discharging electronic module is used to control the charging and discharging state of the battery. When the power consumption prediction result does not exceed the standard threshold compared with the actual power consumption of the actual load, the battery continues to be in the discharging state. When the comparison exceeds the standard threshold, the charging instruction from the threshold setting submodule is received, and the battery is boosted and charged.

10. A photovoltaic battery charge and discharge control method, applied to the photovoltaic battery charge and discharge controller as claimed in any one of claims 1 to 9, characterized in that: The photovoltaic battery charge and discharge control method comprises: Obtain the total power generated by the photovoltaic panels and the load power connected to the inverter. Calculate the total power generated based on the sunshine time in the power generation area in a certain week, month or quarter. At the same time, obtain the predicted power usage in a certain week, month or quarter based on the historical load power usage. According to the historical total power generation and electricity, the power consumption values ​​during the charging and discharging process of the photovoltaic battery are obtained multiple times to build a power consumption prediction model; then the total power generation and predicted power usage of a certain week, month or quarter are input into the power consumption prediction model to obtain the power consumption prediction result; If the power consumption prediction result and the actual power consumption of the actual load do not exceed the standard threshold, the battery continues to be in a discharge state. When it exceeds the standard threshold, the battery is boosted and charged.

Citation Information

Patent Citations

  • Photovoltaic power source

    CN104201975A

  • Self-adaptive photovoltaic mains supply complementary charge-discharge controller of storage battery

    CN106953378A

  • Heliostat and photovoltaic panel combined heliostat system for tower-type photothermal power generation

    CN110609575A