Photovoltaic power generation fire risk prediction method and system based on machine learning, computer equipment and storage medium
Through the machine learning-based photovoltaic power generation fire risk prediction method, using historical data and multiple prediction models, the problem of predicting fire risk in photovoltaic power generation systems is solved, and high accuracy and practical fire risk prediction is achieved.
Patent Information
- Application Number
- CN202411700698.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
There is a fire risk in photovoltaic power generation systems, and it is difficult for the existing technology to effectively predict and prevent fires.
Using a machine learning-based photovoltaic power generation fire risk prediction method, we collect and clean historical data, extract feature data related to fire, train multiple prediction models, and generate the final fire risk prediction results through the integration module.
Early prediction of fire risk in photovoltaic power generation systems is achieved, the accuracy and robustness of prediction are improved, the risk of prediction errors in a single model is reduced, and it is highly practical and applicable.
Smart Images

Figure CN119647669A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fire warning, and specifically relates to a photovoltaic power generation fire risk prediction method, system, computer equipment and storage medium based on machine learning. Background Art
[0002] Photovoltaic power generation is a technology that uses solar energy to produce electricity. In recent years, it has been widely used due to its environmentally friendly and renewable characteristics. However, with the increase in the number and scale of photovoltaic power stations, the safety issues of photovoltaic power generation systems, especially fire risks, have gradually attracted people's attention. Fires can not only cause equipment damage and economic losses, but also threaten personnel safety. Therefore, it is of great practical significance to study how to prevent and predict fire risks in photovoltaic power generation systems. Summary of the invention
[0003] Purpose of the invention: To solve the fire risk existing in photovoltaic power generation systems, the present invention proposes a photovoltaic power generation fire risk prediction method, system, computer equipment and storage medium based on machine learning. By analyzing historical data, potential patterns and trends of fire occurrence are discovered, thereby predicting fire risks at an early stage.
[0004] Technical solution: A photovoltaic power generation fire risk prediction method based on machine learning, comprising the following steps:
[0005] Step 1: Collect basic data when photovoltaic power generation fire occurs, collect geographical data when photovoltaic power generation fire occurs, and collect meteorological data when photovoltaic power generation fire occurs;
[0006] Step 2: Clean and preprocess the data collected in step 1;
[0007] Step 3: Extract feature data related to fire occurrence from the cleaned and preprocessed data;
[0008] Step 4: Use the feature data to train multiple prediction models to obtain multiple pre-trained prediction models;
[0009] Step 5: Collect current data related to the occurrence of photovoltaic power generation fires in real time, input the current data into multiple pre-trained prediction models, and obtain multiple prediction results;
[0010] Step 6: Integrate multiple prediction results to obtain a final prediction result, which includes: the probability of a photovoltaic power generation fire and the corresponding geographical location.
[0011] Furthermore, the basic data includes: the time point of fire extinguishing intervention, the location of the fire area, the type of fire source and the scale of the fire; the geographical data includes: the topography, landform and vegetation coverage of the fire site; the meteorological data includes: temperature, humidity, wind speed and wind direction.
[0012] Furthermore, in step 2, the data collected in step 1 is cleaned and preprocessed, and the specific operations include:
[0013] Based on the geographic data when the photovoltaic power generation fire occurs, a plurality of unit blocks are defined, and each unit block stores static information and dynamic information; the static information includes geographic data and meteorological data;
[0014] Analyze the basic data when a photovoltaic power generation fire occurs, and send the location of the fire area, the type of fire source, and the scale of the fire as dynamic information to the corresponding unit block;
[0015] The time point of fire extinguishing intervention is obtained from the basic data when the photovoltaic power generation fire occurs, and the dynamic information of the unit block is divided into the development stage and the fire extinguishing stage according to the time point of fire extinguishing intervention.
[0016] Furthermore, in step 3, the feature data related to the occurrence of the fire is extracted from the cleaned and pre-processed data, and the specific operations include:
[0017] By using correlation analysis, characteristic data related to the occurrence of fire is screened out from multiple unit blocks, which is the first characteristic data;
[0018] By analyzing the importance of each first feature data to the prediction result in multiple pre-trained prediction models, the first feature data are sorted, and the first feature data with the highest importance are taken as the final feature data.
[0019] Furthermore, the multiple prediction models include a prediction model based on Logistic regression with LASSO penalty, a prediction model based on random forest, a prediction model based on XGBoost, a prediction model based on LightGBM, and a prediction model based on CatBoost.
[0020] Furthermore, the method of training multiple prediction models using feature data to obtain multiple pre-trained prediction models specifically includes:
[0021] Using transfer learning technology, the knowledge of existing fire prediction models in other fields is transferred to multiple prediction models, and then the feature data is used to fine-tune multiple prediction models;
[0022] In the fine-tuning process, an active learning mechanism is introduced;
[0023] The Bayesian optimization method is used to tune the hyperparameters of the prediction model to obtain multiple pre-trained prediction models.
[0024] Furthermore, in step 6, the integration of multiple prediction results specifically includes:
[0025] A stacking-based ensemble learning strategy is adopted to dynamically weight and integrate the output results of each pre-trained prediction model by training an upper-layer model.
[0026] The present invention discloses a photovoltaic power generation fire risk prediction system based on machine learning, comprising:
[0027] Multiple pre-trained prediction models are used to take the real-time collected current data related to the occurrence of photovoltaic power generation fires as input to obtain multiple prediction results;
[0028] An integration module is used to integrate multiple prediction results to obtain a final prediction result; the final prediction result includes: the probability of fire occurrence and the corresponding geographical location;
[0029] Visualization module, used to visualize the final prediction results;
[0030] The multiple pre-trained prediction models are obtained according to the following steps:
[0031] Step 1: Collect basic data when photovoltaic power generation fire occurs, collect geographical data when photovoltaic power generation fire occurs, and collect meteorological data when photovoltaic power generation fire occurs;
[0032] Step 2: Clean and preprocess the data collected in step 1;
[0033] Step 3: Extract feature data related to fire occurrence from the cleaned and preprocessed data;
[0034] Step 4: Use the feature data to train multiple prediction models to obtain multiple pre-trained prediction models.
[0035] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for predicting photovoltaic power generation fire risks based on machine learning are implemented.
[0036] The present invention also discloses a storage medium, which stores a photovoltaic power generation fire risk prediction program. When the photovoltaic power generation fire risk prediction program is executed by at least one processor, the steps of a photovoltaic power generation fire risk prediction method based on machine learning are implemented.
[0037] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0038] (1) The photovoltaic power generation fire risk prediction model based on machine learning in the method of the present invention ensures the accuracy and reliability of the data by collecting basic data, geographic data and weather data of actual fires, and performing data cleaning and preprocessing, which provides a solid foundation for subsequent fire risk prediction; secondly, feature engineering is used to construct features for the merged data, which can deeply mine the potential information in the data and improve the accuracy and stability of the prediction model; the application of feature engineering enables the model to better understand the data, thereby more accurately predicting fire risks;
[0039] (2) The method of the present invention uses multiple different prediction models for prediction processing and determines the final fire prediction output result through comprehensive evaluation. This method can fully utilize the advantages of different models and improve the accuracy and robustness of the prediction;
[0040] (3) The method of the present invention reduces the risk of single model prediction errors through mechanisms such as voting;
[0041] (4) The photovoltaic power generation fire risk prediction model proposed by the method of the present invention is highly practical and applicable. It can perform customized fire risk prediction according to the characteristics and operating environment of the actual photovoltaic power station, providing a strong guarantee for the safe operation of the photovoltaic power station;
[0042] (5) The method of the present invention shows significant advantages in terms of data accuracy and reliability, depth of feature construction, accuracy and stability of the prediction model, as well as practicality and applicability, and has important practical significance and application value for preventing and reducing fire risks in photovoltaic power generation systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0044] The technical solution of the present invention is now further described in conjunction with the accompanying drawings and embodiments.
[0045] like Figure 1 As shown, the present invention provides a photovoltaic power generation fire risk prediction method based on machine learning, comprising the following steps:
[0046] Step 1: Collect basic data when a photovoltaic power generation fire occurs, including the time of fire extinguishing intervention, fire area, fire source type, fire scale, etc.; collect geographical data when a photovoltaic power generation fire occurs, including the topography, landform, vegetation coverage, etc. of the fire site; collect meteorological data when a photovoltaic power generation fire occurs, including temperature, humidity, wind speed, wind direction, etc.
[0047] In order to further enhance the generalization ability and prediction effect of the model, this embodiment also uses a generative adversarial network (GAN) for data enhancement. By generating synthetic fire samples under different geographical and meteorological conditions through GAN, the training data set can be effectively expanded.
[0048] Step 2: The data collected in step 1 often has problems such as noise, missing or inconsistency, so data cleaning and preprocessing are required. The main operations include:
[0049] Generate unit blocks based on geographic data, each unit block can store static information and dynamic information;
[0050] The basic data is analyzed to determine the fire data at any time point (the time point of fire extinguishing intervention, the location of the fire area, the type of fire source, and the size of the fire). The dynamic information is sent to the corresponding unit block according to the location of the fire area, and the time point of fire extinguishing intervention is obtained from the basic data. The dynamic information of the unit block is divided into the development stage and the fire extinguishing stage according to the time point of fire extinguishing intervention, and merged in the time and space dimensions.
[0051] Specifically, unit block division can track geographical information more accurately. This division method allows static information (such as geographical features and terrain) and dynamic information (such as fire development and fire fighting intervention) to have clear spatial definitions, thereby effectively analyzing the fire situation in each small area and facilitating regional fire monitoring.
[0052] Secondly, the division of dynamic information stages in the time dimension helps to identify the "development stage" and "extinguishing stage" of a fire. In the development stage, the system can pay attention to the growth trend of the fire and provide timely warnings at the early stage of the fire; in the extinguishing stage, the system can monitor the effect of fire extinguishing intervention and ensure the effectiveness of the intervention strategy.
[0053] In addition, the combination of space and time enables systematic analysis of fire evolution trajectories and impacts. The system aggregates fire data into more contextual information through the linkage changes of time nodes and locations, thus providing support for real-time decision-making, resource scheduling and rescue operations.
[0054] In short, this sophisticated data preprocessing method can support real-time and intelligent fire monitoring and management.
[0055] Step 3: Use feature engineering to construct features for the merged data to obtain feature data; feature engineering includes feature selection, feature extraction, feature conversion, etc. to generate feature data that can reflect fire risks.
[0056] In terms of feature engineering, this step uses a dual feature selection mechanism. First, correlation analysis is used to screen out features with high correlation with fire risk, and then the feature set is further optimized through feature importance ranking after model training. Feature importance ranking after model training refers to analyzing the importance of each feature in the model to the prediction results after model training, and ranking these features. Dual selection not only reduces the complexity of the model, but also ensures that the model can focus on the most critical risk factors.
[0057] Feature engineering is a key link in machine learning. It extracts features that have a significant impact on the prediction results by deeply analyzing and mining the data. In this embodiment, feature engineering constructs features on the merged data to generate feature data, which can more accurately reflect the potential patterns and trends of fire occurrence.
[0058] The purpose of feature selection is to screen out features with high correlation with fire risk, remove noise features, and reduce the risk of overfitting of the model. The correlation coefficient method is used here to use the Pearson correlation coefficient to evaluate the correlation between the feature and the target variable (the risk or probability of fire). The formula for the correlation coefficient is:
[0059]
[0060] Among them, x i represents the eigenvalue, y i represents the target value, x and y represent the mean of the feature and the target respectively. The appropriate feature is selected according to the size of the correlation coefficient. Usually a threshold can be set. Here, features with a correlation coefficient greater than 0.2 are retained.
[0061] Step 4: Based on the feature data, a variety of machine learning algorithms are used to build a prediction model. These algorithms include but are not limited to Logistic regression with LASSO penalty, random forest, XGBoost, LightGBM and CatBoost. By inputting these feature data into multiple different prediction models for prediction processing, multiple fire prediction results can be generated. These prediction results are integrated using methods such as voting and weighted average to determine the final fire prediction output result. This method can make full use of the advantages of different models to improve the accuracy and stability of the prediction. The specific operations include:
[0062] In the case of limited data, transfer learning technology is applied to transfer the knowledge in fire prediction models in other similar fields to the five prediction models (Logistic regression, random forest, XGBoost, LightGBM and CatBoost) proposed in this embodiment. And fine-tuned in combination with a small amount of photovoltaic power generation fire data. At the same time, an active learning mechanism is also introduced. Through the active learning framework, the model can automatically select samples with high prediction uncertainty for key learning, thereby reducing the model's dependence on noisy data. In addition, the Bayesian optimization method is used for hyperparameter tuning. Traditional grid search or random search is difficult to find the best parameter combination in high-dimensional feature space, while Bayesian optimization can automatically select hyperparameters under limited computing resources, thereby achieving better model performance. In multi-model integration, an integrated learning strategy based on stacking is adopted. By training an upper-level model (such as linear regression or shallow neural network), the output results of each model are dynamically weighted and integrated, and the stacking strategy can further improve the accuracy and robustness of the final prediction results.
[0063] Step 5: Visualize the prediction results. By visualizing the fire prediction results and the geographical location of the corresponding prediction area, relevant personnel can intuitively understand the distribution of fire risks and take preventive measures in a timely manner.
[0064] Step 6: By updating the historical fire alarm data and external environment data in real time, updated prediction results and hidden danger identification results can be generated and output and displayed to the corresponding users. This real-time update and optimization mechanism enables the present invention to continuously adapt to new data and environmental changes, and improve the accuracy and practicality of prediction.
[0065] In practical applications, the above prediction method can be integrated into the existing photovoltaic power station monitoring system to realize real-time monitoring and early warning functions of fire. In addition, it can also be applied to the maintenance and overhaul of photovoltaic power generation systems. Through the analysis and mining of historical data, it can predict which equipment or areas may have potential fire risks, thereby providing targeted guidance for maintenance and overhaul work and improving work efficiency and safety.
[0066] The method of this embodiment has made innovations in many aspects such as generative adversarial network data enhancement, active learning, and model transfer, achieving more accurate and adaptable fire risk prediction.
[0067] In order to verify the effectiveness and effect of this embodiment, the method of this embodiment is compared with the existing recognition method by example application, specifically including:
[0068] Collect historical fire records of photovoltaic power stations, including the time, location, cause, etc. of the fire; collect terrain data of the photovoltaic power station area, such as slope, vegetation coverage, etc.; collect meteorological data of the area, including temperature, humidity, wind speed, etc., and update the current meteorological conditions in real time every day. After all data are cleaned and feature extracted, feature data related to fire risk is generated.
[0069] These feature data are input into multiple machine learning models for training, including random forest, XGBoost, and LightGBM models. Through training, the risk of fire in the next 30 days can be predicted. The XGBoost model predicts that the probability of fire is 72%, the random forest predicts 75%, and the LightGBM predicts 70%. By combining the prediction results of each model, the system determines that the fire risk in the area is higher than 70%. This prediction result is displayed through a visual interface, and an early warning is issued to remind power station managers that there is a high risk of fire in the area. According to the early warning information, managers can arrange equipment inspections in advance to ensure that there are no faults in electrical equipment, and clean up flammable materials to reduce fire hazards.
[0070] Through the method of this embodiment, the power station can predict the fire risk in advance and take preventive measures in time to avoid the expansion of the fire. Compared with the traditional prediction method that relies on manual experience, this system significantly improves the accuracy and timeliness of fire risk prediction.
[0071] Embodiment 2:
[0072] This embodiment discloses a photovoltaic power generation fire risk prediction system based on machine learning, including:
[0073] Multiple pre-trained prediction models are used to take the real-time collected current data related to the occurrence of photovoltaic power generation fires as input to obtain multiple prediction results;
[0074] An integration module is used to integrate multiple prediction results by using a voting method or a weighted average method to obtain a final prediction result; the final prediction result includes: the probability of fire occurrence and the corresponding geographical location;
[0075] The visualization module is used to visualize the final prediction results.
[0076] In this embodiment, the multiple prediction models include a prediction model based on Logistic regression with LASSO penalty, a prediction model based on random forest, a prediction model based on XGBoost, a prediction model based on LightGBM, and a prediction model based on CatBoost.
[0077] Embodiment 3:
[0078] This embodiment discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps disclosed in any of the above embodiments are implemented.
[0079] Embodiment 4:
[0080] This embodiment discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps disclosed in any of the above embodiments are implemented.
[0081] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0082] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0083] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A photovoltaic power generation fire risk prediction method based on machine learning, characterized by: The following steps are involved: Step 1: Collect basic data when photovoltaic power generation fire occurs, collect geographical data when photovoltaic power generation fire occurs, and collect meteorological data when photovoltaic power generation fire occurs; Step 2: Clean and preprocess the data collected in step 1; Step 3: Extract feature data related to fire occurrence from the cleaned and preprocessed data; Step 4: Use the feature data to train multiple prediction models to obtain multiple pre-trained prediction models; Step 5: Collect current data related to the occurrence of photovoltaic power generation fires in real time, input the current data into multiple pre-trained prediction models, and obtain multiple prediction results; Step 6: Integrate multiple prediction results to obtain a final prediction result, which includes: the probability of a photovoltaic power generation fire and the corresponding geographical location.
2. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 1 is characterized by: The basic data include: the time point of fire extinguishing intervention, the location of the fire area, the type of fire source and the scale of the fire; the geographical data include: the topography, landform and vegetation coverage of the fire site; the meteorological data include: temperature, humidity, wind speed and wind direction.
3. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 2 is characterized by: In step 2, the data collected in step 1 is cleaned and preprocessed, and the specific operations include: Based on the geographic data when the photovoltaic power generation fire occurs, a plurality of unit blocks are defined, and each unit block stores static information and dynamic information; the static information includes geographic data and meteorological data; Analyze the basic data when a photovoltaic power generation fire occurs, and send the location of the fire area, the type of fire source, and the scale of the fire as dynamic information to the corresponding unit block; The time point of fire extinguishing intervention is obtained from the basic data when the photovoltaic power generation fire occurs, and the dynamic information of the unit block is divided into the development stage and the fire extinguishing stage according to the time point of fire extinguishing intervention.
4. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 3 is characterized by: In step 3, the feature data related to the occurrence of fire is extracted from the cleaned and pre-processed data, and the specific operations include: By using correlation analysis, characteristic data related to the occurrence of fire is screened out from multiple unit blocks, which is the first characteristic data; By analyzing the importance of each first feature data to the prediction result in multiple pre-trained prediction models, the first feature data are sorted, and the first feature data with the highest importance are taken as the final feature data.
5. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 1 is characterized by: Multiple prediction models include a Logistic regression prediction model with LASSO penalty, a random forest-based prediction model, an XGBoost-based prediction model, a LightGBM-based prediction model, and a CatBoost-based prediction model.
6. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 5 is characterized by: The method of training multiple prediction models using feature data to obtain multiple pre-trained prediction models specifically includes: Using transfer learning technology, the knowledge of existing fire prediction models in other fields is transferred to multiple prediction models, and then the feature data is used to fine-tune multiple prediction models; In the fine-tuning process, an active learning mechanism is introduced; The Bayesian optimization method is used to tune the hyperparameters of the prediction model to obtain multiple pre-trained prediction models.
7. The photovoltaic power generation fire risk prediction method based on machine learning according to claim 1, characterized in that: In step 6, the integration of multiple prediction results specifically includes: A stacking-based ensemble learning strategy is adopted to dynamically weight and integrate the output results of each pre-trained prediction model by training an upper-layer model.
8. A photovoltaic power generation fire risk prediction system based on machine learning, characterized by: include: Multiple pre-trained prediction models are used to take the real-time collected current data related to the occurrence of photovoltaic power generation fires as input to obtain multiple prediction results; An integration module is used to integrate multiple prediction results to obtain the final prediction result; The final prediction result includes: the probability of fire occurrence and the corresponding geographical location; Visualization module, used to visualize the final prediction results; The multiple pre-trained prediction models are obtained according to the following steps: Step 1: Collect basic data when photovoltaic power generation fire occurs, collect geographical data when photovoltaic power generation fire occurs, and collect meteorological data when photovoltaic power generation fire occurs; Step 2: Clean and preprocess the data collected in step 1; Step 3: Extract feature data related to fire occurrence from the cleaned and preprocessed data; Step 4: Use the feature data to train multiple prediction models to obtain multiple pre-trained prediction models.
9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of a photovoltaic power generation fire risk prediction method based on machine learning as described in any one of claims 1 to 7 are implemented.
10. A storage medium, characterized in that: The storage medium stores a photovoltaic power generation fire risk prediction program, and when the photovoltaic power generation fire risk prediction program is executed by at least one processor, the steps of a photovoltaic power generation fire risk prediction method based on machine learning as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Method and device for intelligently analyzing fire occurrence trend and generating report, and medium
CN120148175A