Risk assessment method and device, computer equipment, readable storage medium and program product
By using data mining algorithms and prediction models in the power industry, the problem of insufficient accuracy of traditional risk assessment methods is solved, and higher risk assessment accuracy and risk control capabilities are achieved.
Patent Information
- Application Number
- CN202411289112.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2025-01-07
AI Technical Summary
The traditional risk assessment method of the power industry relies on experience and subjective judgment, which leads to low accuracy of assessment and difficulty in effectively dealing with the increasing occupational risks in complex operating environments.
Data mining algorithms are used to extract the risk data in the power industry, generate risk characteristics, and input them into pre-trained risk prediction models for evaluation to improve the accuracy of risk assessment. The specific steps include obtaining power accident data and operator data, calculating frequency data through data mining algorithms, generating frequent item sets and association rules, which are used to generate risk characteristics, and generating risk prediction results through prediction models.
This method can more accurately identify the highly relevant characteristics of power accidents, improve the accuracy of risk assessment, help power industry managers predict safety conditions and take preventive measures, reduce the possibility of accidents, and enhance risk control capabilities.
Smart Images

Figure CN119273149A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of safe production of electric power, and in particular to a risk assessment method, device, computer equipment, readable storage medium and program product. Background Art
[0002] With the rapid development of the power industry, the scale and complexity of power equipment are increasing, and ensuring the safety and health of employees has become one of the core tasks of the industry's development. Due to the existence of dangerous factors such as high voltage, high temperature, and high current in the power production operation environment, employees often face many occupational risks when performing equipment maintenance, operation, or accident handling. In addition, with the widespread application of smart grids and new energy, the complexity of the power system has increased significantly, and new risk factors have continued to emerge, posing new challenges to traditional safety protection and risk management.
[0003] In recent years, frequent safety accidents in the power industry have prompted companies and regulators to pay more attention to personal risk management. However, traditional risk assessment methods often rely on experience and subjective judgment, resulting in low assessment accuracy and difficulty in effectively responding to increasingly complex operating environments. Summary of the invention
[0004] Based on this, it is necessary to provide a risk assessment method, device, computer equipment, readable storage medium and program product that can improve the accuracy of risk assessment in the power industry in response to the above technical problems.
[0005] In a first aspect, the present application provides a risk assessment method, comprising:
[0006] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0007] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0008] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0009] In one embodiment, the above-mentioned data mining algorithm is used to extract features from risk data to obtain risk features, including:
[0010] The data mining algorithm is used to calculate the occurrence frequency of each risk data in the risk data set to obtain multiple frequency data;
[0011] Based on multiple frequency data, multiple frequent item sets are generated for the risk data set;
[0012] For each frequent item set, the subsets in the frequent item set are associated to obtain the association rules corresponding to the frequent item set;
[0013] Frequent item sets and the association rules corresponding to the frequent item sets are determined as risk features.
[0014] In one embodiment, the above-mentioned method of generating multiple frequent item sets for a risk data set based on multiple frequency data includes:
[0015] Sorting multiple frequency data to obtain sorting information;
[0016] The risk data set is processed based on the sorting information to obtain multiple frequent item sets.
[0017] In one embodiment, the risk data set is processed based on the ranking information to obtain multiple frequent item sets, including:
[0018] Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0019] In one embodiment, the risk data set is processed based on the ranking information to obtain multiple frequent item sets, including:
[0020] Based on the sorted data, the risk data corresponding to the frequency data is inserted into the pre-established frequent pattern tree;
[0021] Extract frequent itemsets from frequent pattern trees.
[0022] In one embodiment, the training process of the risk prediction model includes:
[0023] Obtaining a training sample set; the training sample set includes multiple risk data sample subsets;
[0024] The initial risk prediction model is fine-tuned based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0025] In one embodiment, the method further comprises:
[0026] Compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model;
[0027] When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0028] In a second aspect, the present application also provides a risk assessment device, comprising:
[0029] A data acquisition module is used to acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0030] The feature extraction module is used to extract features from risk data sets using data mining algorithms to obtain risk features;
[0031] The feature input module is used to input risk features into a pre-trained risk prediction model to obtain risk prediction results; the risk detection results are used to assess the risks of the power industry within a preset area.
[0032] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0034] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0035] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0037] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0038] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0039] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0040] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0041] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0042] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0043] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0044] The above-mentioned risk assessment method, device, computer equipment, readable storage medium and program product first obtain a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data; then, the risk data set is subjected to feature extraction processing using a data mining algorithm to obtain risk features; finally, the risk features are input into a pre-trained risk prediction model to obtain a risk prediction result; the risk detection result is used to assess the risk of the power industry within the preset area; in this method, by obtaining a risk data set of the power industry within a preset area, and using a data mining algorithm to perform in-depth analysis and feature extraction on these data, potential risk factors can be quickly identified. Compared with the traditional method of relying on experience and manual analysis, this method can more accurately identify features that are highly related to power accidents, greatly improving the accuracy of risk assessment. In addition, by inputting risk features into a pre-trained risk prediction model, accurate risk prediction results can be generated with the help of the risk prediction model. Based on these prediction results, power industry managers can predict the safety status of each area and take corresponding preventive measures, thereby reducing the possibility of accidents and enhancing global risk control capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 is an internal structure diagram of a computer device in one embodiment;
[0047] Figure 2 A schematic diagram of a risk assessment method in one embodiment;
[0048] Figure 3 is a schematic flow chart of a risk assessment method in another embodiment;
[0049] Figure 4 is a schematic flow chart of a risk assessment method in another embodiment;
[0050] Figure 5 is a schematic flow chart of a risk assessment method in another embodiment;
[0051] Figure 6 is a schematic flow chart of a risk assessment method in another embodiment;
[0052] Figure 7 is a schematic flow chart of a risk assessment method in another embodiment;
[0053] Figure 8 FIG. 4 is a structural block diagram of a risk assessment device in an embodiment. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0055] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data in the risk assessment process. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a risk assessment method is implemented.
[0056] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0057] In an exemplary embodiment, Figure 2 As shown, a risk assessment method is provided, which can be applied to Figure 1The computer device in is taken as an example to illustrate, including the following steps 201 to 203.
[0058] in:
[0059] Step 201, obtaining a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data.
[0060] In the risk assessment process, the definition of the preset area range can be flexibly set according to actual needs. The following are two common ways to define the area:
[0061] City as a unit: The preset area range can be set to the entire city, covering all administrative districts and jurisdictions within the city. The collection of risk data sets will involve all districts of the city, including different enterprises, factories, power stations and other power industry-related places. This definition is suitable for risk assessment on a larger scale, which can help city-level managers understand the risk distribution of various regions in the entire city, identify potential high-risk areas, and then take city-wide risk management measures.
[0062] In counties: The preset area range can also be set to a certain county, covering towns and villages within the county. This definition is suitable for risk assessment in smaller areas or specific counties, and is usually used for more refined risk monitoring, especially in certain counties where industry is relatively concentrated or power infrastructure is relatively dense. Through the collection and evaluation of county-level risk data, targeted safety strategies and decision-making support can be provided to county managers.
[0063] The risk data set is a comprehensive data set that covers the historical records of power accidents and related information of operators, with the aim of providing a reliable basis for risk assessment and prediction. It provides an analytical basis for machine learning algorithms to discover potential patterns and risk characteristics of accidents. It contains various types of information related to power safety. Risk data sets usually include the following data types:
[0064] (1) Power accident data:
[0065] Accident type: including different types of electrical accidents such as electric shock, equipment failure, fire, etc.
[0066] Accident time: The specific time point of the accident, used to identify the time pattern of the accident.
[0067] Accident Location: The geographical location where the accident occurred, used to locate high-risk areas.
[0068] Cause of the accident: Description of the cause of the accident, such as operating errors, equipment aging, environmental factors, etc.
[0069] Accident losses: including detailed information such as casualties, property losses, etc.
[0070] (2) Operator data:
[0071] Health status: The health status of employees, including chronic diseases, occupational contraindications, etc., to assess whether the employees are physically suitable for the relevant working environment.
[0072] Occupational exposure data: records of operators’ exposure to hazardous environments, including exposure time, exposure concentration, etc., to assess the impact of long-term exposure on health and safety.
[0073] Working hours: The employee’s years of work in the power industry and daily working hours are used to analyze the relationship with the occurrence of accidents.
[0074] Safety training records: Whether operators have received safety training and their level of participation reflect their awareness of and ability to respond to risks.
[0075] In the embodiment of the present application, it is necessary to first clarify the preset regional scope and obtain a set of risk data related to the power industry within the regional scope.
[0076] Step 202: Use a data mining algorithm to perform feature extraction processing on the risk data set to obtain risk features.
[0077] In an embodiment of the present application, the computer device first cleans and standardizes the input risk data set. The cleaning and standardization operations include processing missing values, removing duplicate data, converting data in different formats into a unified format, and processing abnormal data to ensure the quality and consistency of the data. Then, the computer device uses a feature selection algorithm to filter out features closely related to power accidents or risks from the data set. And based on the impact of these features on the probability of accidents, key variables are filtered out. For example, exposure time, health status, occupational contraindications of operators, etc. may be marked as risk-related features.
[0078] Then, based on the existing features, the computer equipment automatically generates new combined features. For example, exposure time and concentration can be combined to form a new "exposure risk index" to enhance the description of risk.
[0079] Step 203, input the risk characteristics into the pre-trained risk prediction model to obtain the risk prediction result; the risk detection result is used to evaluate the risk of the power industry within the preset area.
[0080] Among them, the risk prediction model is trained using machine learning algorithms (such as logistic regression, decision tree, random forest, support vector machine, etc.) and has the ability to predict risks in the power industry.
[0081] In the embodiment of the present application, first, the computer device uses the risk features extracted from the risk data set as input data. The computer device processes these risk features so that they are input into the risk prediction model in the correct format, and performs necessary normalization or standardization on the risk features to be consistent with the expected input format of the risk prediction model.
[0082] Next, the computer device will load a pre-trained risk prediction model. The computer device will pass the input risk features to the prediction model, which will calculate and analyze these risk features. The risk prediction model can calculate the risk probability of a risk occurring within a certain area.
[0083] Finally, based on the calculated risk probability, the computer equipment generates specific risk prediction results. For example, the probability of an accident occurring in area A is 85%; or each area is divided into low risk, medium risk and high risk levels.
[0084] In the above risk assessment method, a risk data set of the power industry within a preset area is first obtained; the risk data set includes at least power accident data and operator data; then, the risk data set is subjected to feature extraction processing using a data mining algorithm to obtain risk features; finally, the risk features are input into a pre-trained risk prediction model to obtain risk prediction results; the risk detection results are used to assess the risk of the power industry within the preset area; in this method, by obtaining a risk data set of the power industry within a preset area, and using a data mining algorithm to perform in-depth analysis and feature extraction on these data, potential risk factors can be quickly identified. Compared with the traditional method of relying on experience and manual analysis, this method can more accurately identify features that are highly related to power accidents, greatly improving the accuracy of risk assessment. In addition, by inputting risk features into a pre-trained risk prediction model, accurate risk prediction results can be generated with the help of the risk prediction model. Based on these prediction results, power industry managers can predict the safety status of each region and take corresponding preventive measures, thereby reducing the possibility of accidents and enhancing global risk control capabilities.
[0085] In an exemplary embodiment, Figure 3 As shown, the above embodiment of "using data mining algorithm to extract features from risk data to obtain risk features" includes steps 301 to 303. Among them:
[0086] Step 301, using a data mining algorithm to calculate the occurrence frequency of each risk data in a risk data set, to obtain a plurality of frequency data.
[0087] In the embodiment of the present application, the computer device uses a data mining algorithm to analyze the input risk data set, and calculates the frequency of occurrence of each risk data item in the risk data set in the entire risk data set. By counting the number of occurrences of each risk data item in the risk data set, multiple frequency data are obtained.
[0088] Step 302: Generate multiple frequent item sets for the risk data set based on multiple frequency data.
[0089] Among them, frequent item sets refer to combinations of risk factors that often appear at the same time, such as the combination of "long exposure time + high concentration + poor health status" that frequently appears in historical accident data.
[0090] In the embodiment of the present application, the computer device sets a minimum support threshold according to the calculated frequency data, and regards risk data items whose frequency exceeds the threshold as "frequent items". Then, the computer device generates multiple frequent item sets by combining multiple frequent data items.
[0091] Step 303: for each frequent item set, association processing is performed on the subsets in the frequent item set to obtain association rules corresponding to the frequent item set.
[0092] Among them, the association rules will give the conditional probability relationship between risk factors, and filter out rules with higher predictive ability by setting confidence thresholds.
[0093] In the embodiment of the present application, for each frequent item set, the computer device performs association processing on the subsets in the frequent item set through an association analysis algorithm to generate association rules. For example, the computer analyzes the relationship between certain feature items in the frequent item set and generates an association rule that "if A and B occur at the same time, C is more likely to occur".
[0094] Step 304: determine the frequent item sets and the association rules corresponding to the frequent item sets as risk features.
[0095] In the embodiment of the present application, the computer device determines the generated frequent item sets and the association rules corresponding to each frequent item set as risk features. These risk features can reveal potential high-risk combinations and patterns in the power industry, such as "long exposure time and poor health may lead to electric shock accidents."
[0096] In the above embodiment, the frequency of occurrence of various types of data in the risk data set is calculated by a data mining algorithm, which can quickly find common accident characteristics and risk factors in the power industry. In addition, frequent item set generation and association rule mining can reveal the potential relationship between multiple risk factors, making the identification of risk characteristics more accurate and effectively capturing potential safety hazards.
[0097] In an exemplary embodiment, Figure 4 As shown, the above embodiment of "generating multiple frequent item sets for a risk data set based on multiple frequency data" includes steps 401 to 402. Among them:
[0098] Step 401, sorting a plurality of frequency data to obtain sorting information.
[0099] In an embodiment of the present application, based on the calculated frequency data, the computer device sorts the frequency data in descending order, that is, data items with higher frequency of occurrence are placed in front, and items with lower frequency of occurrence are placed in the back, thereby obtaining sorting information.
[0100] Step 402: Process the risk data set based on the ranking information to obtain a plurality of frequent item sets.
[0101] In an embodiment of the present application, based on the sorting information, each subset in the risk data set is combined, and these combinations are mapped to a hash table through a hash function. Then, the hash value of each combination is counted. By recording the frequency of occurrence of these combinations, the hash table can filter out the item sets that do not meet the preset minimum support threshold, and only retain the combinations with higher frequencies as frequent item sets. Then, the filtered frequent item sets are used to continue to generate larger frequent item sets, and the above steps are repeated to gradually filter out the largest frequent item sets. The largest frequent item sets filtered out are statistically analyzed to obtain multiple frequent item sets.
[0102] In the above embodiment, by sorting the frequency data, the generation process of frequent itemsets is more orderly and controllable. The sorting information can give priority to high-frequency data, reduce the participation of low-frequency data, and improve the accuracy of association rules.
[0103] In an exemplary embodiment, the above embodiment of "processing the risk data set based on the ranking information to obtain multiple frequent item sets" includes:
[0104] Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0105] In an embodiment of the present application, based on the sorting information, different types of risk data in the risk data set are preliminarily combined to generate an initial candidate item set. Subsequently, the computer device scans the entire risk data set and calculates the support of each candidate item set, that is, the frequency of their appearance in the data set. Then, the candidate item sets that meet the preset minimum support threshold are screened out, and these item sets are used as the current frequent item sets. Next, the computer device uses these current frequent item sets for further combination to generate a larger candidate item set, and repeats the support calculation and screening process. This step will continue until the generated candidate item set no longer meets the minimum support threshold. Finally, the candidate item set generated and screened for the last time is determined as the final frequent item set.
[0106] In the above embodiment, since the risk data is combined according to the sorting information, low-frequency and unimportant combinations are excluded as early as possible, which reduces the generation of invalid combinations, reduces the complexity of the algorithm, and improves the efficiency of generating frequent item sets.
[0107] In an exemplary embodiment, Figure 5 As shown, the above embodiment of "processing the risk data set based on the sorting information to obtain multiple frequent item sets" includes steps 501 to 502. Among them:
[0108] Step 501: based on the sorted data, insert the risk data corresponding to the frequency data into a pre-established frequent pattern tree.
[0109] In the embodiment of the present application, first, the computer will sort the data in the risk data set from high to low according to the frequency of each risk data in the risk data set (such as "long exposure time" and "poor health status", etc.). Assume that there are the following data items:
[0110] Transaction 1: "Long exposure time + poor health status + harsh operating environment".
[0111] Transaction 2: "Long exposure time + poor health status".
[0112] Transaction 3: "Short exposure time + harsh operating environment".
[0113] The computer equipment sorts these items according to frequency, obtaining the sorting order of "long exposure time", "poor health status", and "harsh operating environment".
[0114] Next, the computer scans the risk data set one by one and inserts the data items in each transaction into the Frequent Pattern (FP) tree in sorted order. The FP tree reduces redundancy by sharing the same prefix path. For example:
[0115] When processing transaction 1, the path of the FP tree is: “long exposure time → poor health status → harsh operating environment”, and the initial value of the counter of each node is set to 1, indicating that the path has appeared once.
[0116] When processing transaction 2, since "Long exposure time" and "Poor health status" already exist in the FP tree, they will share the path, and the counters of the paths will increase by 1, indicating that they appear again. If "Poor operating environment" does not appear, a new node will be created and the counter will be updated.
[0117] When processing transaction 3, a new "short exposure time" node is created in the FP tree, and a new "harsh operating environment" node is created under it.
[0118] Each time an item set in a transaction is inserted, the computer device updates the counter of each node in the FP tree. For example, in the above example, the counter of the path "long exposure time → poor health status" is 2, indicating that it has appeared in two transactions; while the counter of the path "short exposure time → poor operating environment" is 1.
[0119] Step 502: extract frequent item sets from the frequent pattern tree.
[0120] In the embodiment of the present application, after the FP tree is constructed, the computer device extracts its conditional pattern base for each data item. The conditional pattern base refers to finding all paths containing the item from the FP tree and constructing a sub-pattern tree based on its frequency. For example:
[0121] For “poor health status”, the computer will backtrack the paths in the FP tree, find all paths containing “poor health status”, and extract the prefix items of these paths, such as “long exposure time → poor health status”.
[0122] Based on these paths, the computer generates a sub-pattern tree for further extraction of frequent itemsets.
[0123] From the sub-pattern tree, the computer will extract frequent item sets that meet the minimum support. For example, if the support of "long exposure time → poor health status" in the FP tree is greater than the set minimum support threshold, then the path will be considered a frequent item set. Similarly, other combinations that meet the conditions will also be extracted. In the end, the computer will get all the frequent item sets, such as:
[0124] Frequent item set 1: "Long exposure time + poor health status"
[0125] Frequent item set 2: "Short exposure time + bad operating environment"
[0126] Finally, the computer equipment will sort and filter all the extracted frequent item sets to ensure that only those item sets with support reaching the preset threshold are retained, and these frequent item sets are output as risk features. For example, a risk feature can be obtained: "If the exposure time is long and the health status is poor, there is a higher operational risk."
[0127] In the above embodiment, the FP tree stores data in a compact tree structure, which greatly reduces the memory usage. This compression method significantly improves the efficiency of data processing when facing large-scale risk data, so that frequent item sets can be efficiently generated even with a large amount of data. When constructing the FP tree, repeated risk data will share the same path. Through this sharing mechanism, the algorithm avoids repeated calculations of the same data, thereby reducing unnecessary calculation operations and further improving the processing speed.
[0128] In an exemplary embodiment, Figure 6 As shown, the above method further includes step 601 to step 602. Among them:
[0129] Step 601, obtaining a training sample set; the training sample set includes multiple risk data sample subsets.
[0130] In an embodiment of the present application, a computer device first collects multiple risk data sample subsets from the power industry. Each risk data sample subset includes a set of relevant risk data, such as accident type, exposure time, health status, occupational contraindications, etc. Each risk data sample subset should correspond to its actual risk result (such as whether an accident has occurred) for training the risk prediction model.
[0131] Step 602, fine-tuning the initial risk prediction model based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0132] In the embodiment of the present application, firstly, the acquired training sample set is subjected to data preprocessing, including data cleaning, noise removal, processing of missing values, and standardization or normalization of numerical data.
[0133] Next, the training sample set is divided into a training set and a validation set. The training set is used to train the risk prediction model, while the validation set is used to monitor the performance of the risk prediction model during the training process.
[0134] Before model training, the computer device first loads an initial risk prediction model. The initial risk prediction model can be a pre-designed risk prediction model (such as logistic regression, decision tree, neural network, etc.), but the parameters in the initial risk prediction have not been trained.
[0135] Then, a suitable fine-tuning algorithm is selected. This algorithm is responsible for adjusting the parameters of the initial risk prediction model through back propagation so that it gradually approaches the optimal solution.
[0136] The training sample set is input into the initial risk prediction model, and the fine-tuning algorithm is used to calculate the error between the model output and the actual risk result. Based on this error, the fine-tuning algorithm gradually adjusts the parameters in the model to reduce the prediction error.
[0137] During fine-tuning, regularly use the validation set to evaluate the performance of the model. For example, this can be achieved by calculating the model's accuracy, recall, F1 score, and other indicators on the validation set. And use the validation set for verification.
[0138] When the performance of the model on the validation set reaches the preset standard, or the training error tends to converge, the fine-tuning process ends. At this point, the computer device will save the final model parameters and obtain a trained risk prediction model.
[0139] In the above embodiment, by training multiple risk data subsets in the sample set, the risk prediction model can learn more diverse risk patterns, which helps to optimize the performance of the risk prediction model in different risk scenarios and improve the accuracy of predicting future accidents.
[0140] In an exemplary embodiment, Figure 7 As shown, the above method further includes step 701 to step 702. Among them:
[0141] Step 701, compare the risk prediction results with the risk measurement results, and calculate the performance index of the risk prediction model.
[0142] Among them, performance indicators may include:
[0143] (1) Accuracy: The proportion of samples correctly predicted by the model among all samples.
[0144] (2) Precision: The proportion of samples predicted by the model to be positive that are actually positive.
[0145] (3) Recall rate: the proportion of samples predicted by the model as positive among all actual positive samples.
[0146] (4) F1 score: The harmonic mean of precision and recall, which comprehensively measures model performance.
[0147] In the embodiment of the present application, the computer device obtains risk prediction results from the trained risk prediction model. Each risk prediction result corresponds to the input risk data sample, indicating the risk level of the sample or the probability of occurrence of a risk event determined by the risk prediction model.
[0148] Next, the corresponding risk measurement results are extracted from the actual records of the power industry. The risk measurement results refer to the actual risk events or safety status that occurred under the corresponding risk conditions.
[0149] The risk prediction results of the risk prediction model are compared with the actual risk measurement results one by one. The computer equipment judges the accuracy of the model by comparing the predicted value and the actual value of each sample. Depending on the specific task, a variety of comparison methods can be used, such as the "correct / wrong prediction" comparison in classification tasks or the "difference between predicted value and measured value" calculation in regression tasks.
[0150] Step 702: When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0151] In the embodiment of the present application, the computer device will calculate the corresponding score based on the selected performance indicator to measure the overall performance of the model. Then, the calculated model performance indicator is compared with a preset threshold. If the performance indicator does not reach the preset minimum standard, it means that the model prediction ability is insufficient and needs to be optimized.
[0152] If the performance indicators do not meet the preset thresholds, analyze the deficiencies of the model, which can include the following points:
[0153] (1) Overfitting: The model performs well on the training set but performs poorly on new data. This is usually because the model is too complex.
[0154] (2) Underfitting: The model performs poorly on both the training set and the test set, usually because the model is not complex enough or the data features are insufficient.
[0155] (3) Imbalanced data distribution: The ratio of positive and negative samples in the training data is unbalanced, causing the model to tend to predict the majority class.
[0156] When the performance index does not meet the preset threshold, the risk prediction model is optimized. The model optimization steps include:
[0157] (1) Adjust model parameters: Optimize model performance by adjusting hyperparameters (such as learning rate, regularization coefficient, tree depth, etc.).
[0158] (2) Replace or improve the algorithm: Try using different machine learning algorithms (such as random forest and neural network, etc.), or improve the existing algorithms.
[0159] (3) Data augmentation or sampling: Balance the ratio of positive and negative samples in the dataset through data augmentation or imbalance processing techniques, such as undersampling or oversampling.
[0160] (4) Feature Engineering: Re-evaluate the effectiveness of existing features, which may require adding, deleting, or modifying certain features to improve the input quality of the model.
[0161] (5) Cross-validation: Use cross-validation methods to conduct a more comprehensive evaluation of the model and optimize the generalization ability of the model.
[0162] After the model is optimized, the model is retrained and its performance is evaluated again. Through repeated iterations, the model performance is gradually improved until the preset threshold standard is met. Once the performance indicator reaches or exceeds the preset threshold, the final optimized risk prediction model is saved to ensure that it can be used in actual risk assessment.
[0163] In the above embodiment, the optimized model can more accurately predict potential risks and help enterprises take effective measures to prevent and control them in a timely manner. This will reduce the probability of accidents, improve the overall risk management level, and improve the safety of the power industry.
[0164] Based on all the above embodiments, a risk assessment method is also provided, which includes:
[0165] Step 1: Obtain a training sample set; the training sample set includes multiple risk data sample subsets.
[0166] Step 2: Fine-tune the initial risk prediction model based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0167] Step 3: Compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model.
[0168] Step 4: When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0169] Step 4: Obtain a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data.
[0170] Step 5: Calculate the occurrence frequency of each risk data in the risk data set using a data mining algorithm to obtain multiple frequency data.
[0171] Step 6: Generate multiple frequent item sets for the risk data set based on the multiple frequency data. The method of generating multiple frequent item sets for the risk data set includes the following two embodiments:
[0172] In some embodiments, based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0173] In some embodiments, based on the sorted data, the risk data corresponding to the frequency data is inserted into a pre-established frequent pattern tree; and frequent item sets are extracted from the frequent pattern tree.
[0174] Step 7: For each frequent item set, association processing is performed on the subsets in the frequent item set to obtain the association rules corresponding to the frequent item set.
[0175] Step 8: Determine the frequent item sets and the association rules corresponding to the frequent item sets as risk features.
[0176] Step 9, input the risk characteristics into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0177] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0178] Based on the same inventive concept, the embodiment of the present application also provides a risk assessment device for implementing the risk assessment method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more risk assessment device embodiments provided below can refer to the limitations on the risk assessment method above, and will not be repeated here.
[0179] In an exemplary embodiment, Figure 8 As shown, a risk assessment device is provided, including: a data acquisition module 801, a feature extraction module 802 and a feature input module 803, wherein:
[0180] The data acquisition module 801 is used to acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0181] The feature extraction module 802 is used to extract features from the risk data set using a data mining algorithm to obtain risk features;
[0182] The feature input module 803 is used to input the risk features into a pre-trained risk prediction model to obtain a risk prediction result; the risk detection result is used to assess the risk of the power industry within a preset area.
[0183] In an exemplary embodiment, the feature extraction module 802 is specifically used to calculate the occurrence frequency of each risk data in the risk data set using a data mining algorithm to obtain multiple frequency data; based on the multiple frequency data, generate multiple frequent item sets for the risk data set; for each frequent item set, perform association processing on the subsets in the frequent item set to obtain the association rules corresponding to the frequent item set; determine the frequent item sets and the association rules corresponding to the frequent item sets as risk features.
[0184] In an exemplary embodiment, the feature extraction module 802 is specifically used to sort a plurality of frequency data to obtain sorting information; and process the risk data set based on the sorting information to obtain a plurality of frequent item sets.
[0185] In an exemplary embodiment, the feature extraction module 802 is specifically used to perform at least one combination process on different types of risk data in the risk data set based on the sorting information until the generated candidate frequent item set does not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0186] In an exemplary embodiment, the feature extraction module 802 is specifically configured to insert risk data corresponding to frequency data into a pre-established frequent pattern tree based on the sorted data; and extract frequent item sets from the frequent pattern tree.
[0187] In an exemplary embodiment, a risk assessment device is also provided, the device further comprising:
[0188] A sample set acquisition module is used to acquire a training sample set; the training sample set includes multiple risk data sample subsets;
[0189] The model fine-tuning module is used to fine-tune the initial risk prediction model based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0190] In an exemplary embodiment, a risk assessment device is also provided, the device further comprising:
[0191] A comparison module is used to compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model;
[0192] The optimization module is used to optimize the risk prediction model when the performance index does not meet the preset threshold.
[0193] Each module in the above risk assessment device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0194] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0195] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0196] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0197] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0198] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0199] The data mining algorithm is used to calculate the occurrence frequency of each risk data in the risk data set to obtain multiple frequency data;
[0200] Based on multiple frequency data, multiple frequent item sets are generated for the risk data set;
[0201] For each frequent item set, the subsets in the frequent item set are associated to obtain the association rules corresponding to the frequent item set;
[0202] Frequent item sets and the association rules corresponding to the frequent item sets are determined as risk features.
[0203] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0204] Sorting multiple frequency data to obtain sorting information;
[0205] The risk data set is processed based on the sorting information to obtain multiple frequent item sets.
[0206] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0207] Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0208] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0209] Based on the sorted data, the risk data corresponding to the frequency data is inserted into the pre-established frequent pattern tree;
[0210] Extract frequent itemsets from frequent pattern trees.
[0211] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0212] Obtaining a training sample set; the training sample set includes multiple risk data sample subsets;
[0213] The initial risk prediction model is fine-tuned based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0214] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0215] Compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model;
[0216] When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0217] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0218] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0219] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0220] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] The data mining algorithm is used to calculate the occurrence frequency of each risk data in the risk data set to obtain multiple frequency data;
[0223] Based on multiple frequency data, multiple frequent item sets are generated for the risk data set;
[0224] For each frequent item set, the subsets in the frequent item set are associated to obtain the association rules corresponding to the frequent item set;
[0225] Frequent item sets and the association rules corresponding to the frequent item sets are determined as risk features.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0227] Sorting multiple frequency data to obtain sorting information;
[0228] The risk data set is processed based on the sorting information to obtain multiple frequent item sets.
[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0230] Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0232] Based on the sorted data, the risk data corresponding to the frequency data is inserted into the pre-established frequent pattern tree;
[0233] Extract frequent itemsets from frequent pattern trees.
[0234] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0235] Obtaining a training sample set; the training sample set includes multiple risk data sample subsets;
[0236] The initial risk prediction model is fine-tuned based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] Compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model;
[0239] When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0240] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0241] Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data;
[0242] Use data mining algorithms to extract features from risk data sets to obtain risk features;
[0243] The risk characteristics are input into the pre-trained risk prediction model to obtain the risk prediction results; the risk detection results are used to assess the risks of the power industry within the preset area.
[0244] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0245] The data mining algorithm is used to calculate the occurrence frequency of each risk data in the risk data set to obtain multiple frequency data;
[0246] Based on multiple frequency data, multiple frequent item sets are generated for the risk data set;
[0247] For each frequent item set, the subsets in the frequent item set are associated to obtain the association rules corresponding to the frequent item set;
[0248] Frequent item sets and the association rules corresponding to the frequent item sets are determined as risk features.
[0249] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0250] Sorting multiple frequency data to obtain sorting information;
[0251] The risk data set is processed based on the sorting information to obtain multiple frequent item sets.
[0252] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0253] Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent item sets do not meet the preset minimum support threshold, and the last generated candidate frequent item set is determined as the frequent item set.
[0254] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0255] Based on the sorted data, the risk data corresponding to the frequency data is inserted into the pre-established frequent pattern tree;
[0256] Extract frequent itemsets from frequent pattern trees.
[0257] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0258] Obtaining a training sample set; the training sample set includes multiple risk data sample subsets;
[0259] The initial risk prediction model is fine-tuned based on multiple risk data sample subsets and a preset fine-tuning algorithm to obtain a trained risk prediction model.
[0260] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0261] Compare the risk prediction results with the risk measurement results and calculate the performance indicators of the risk prediction model;
[0262] When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
[0263] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0264] Those skilled 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. 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). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0265] 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 application.
[0266] The above 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 present application. 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 present application shall be subject to the attached claims.
Claims
1. A risk assessment method, characterized in that: The method comprises: Acquire a risk data set of the power industry within a preset area; the risk data set includes at least power accident data and operator data; Using a data mining algorithm to perform feature extraction processing on the risk data set to obtain risk features; The risk characteristics are input into a pre-trained risk prediction model to obtain a risk prediction result; the risk detection result is used to assess the risk of the power industry within the preset area.
2. The method according to claim 1, characterized in that The step of performing feature extraction processing on the risk data using a data mining algorithm to obtain risk features includes: Calculating the occurrence frequency of each risk data in the risk data set by using the data mining algorithm to obtain a plurality of frequency data; Based on the plurality of frequency data, generating a plurality of frequent item sets for the risk data set; For each of the frequent itemsets, association processing is performed on a subset of the frequent itemsets to obtain association rules corresponding to the frequent itemsets; The frequent item sets and the association rules corresponding to the frequent item sets are determined as the risk features.
3. The method according to claim 2, characterized in that The step of generating a plurality of frequent item sets for the risk data set based on the plurality of frequency data comprises: Sorting the plurality of frequency data to obtain sorting information; The risk data set is processed based on the ranking information to obtain a plurality of the frequent item sets.
4. The method according to claim 3, characterized in that The step of processing the risk data set based on the sorting information to obtain a plurality of frequent item sets includes: Based on the sorting information, different types of risk data in the risk data set are combined at least once until the generated candidate frequent itemsets do not meet a preset minimum support threshold, and the last generated candidate frequent itemsets are determined as the frequent itemsets.
5. The method according to claim 3, characterized in that: The step of processing the risk data set based on the sorting information to obtain a plurality of frequent item sets includes: Based on the sorted data, inserting the risk data corresponding to the frequency data into a pre-established frequent pattern tree; The frequent item sets are extracted from the frequent pattern tree.
6. The method according to any one of claims 1 to 5, characterized in that: The training process of the risk prediction model includes: Acquire a training sample set; the training sample set includes multiple risk data sample subsets; The initial risk prediction model is fine-tuned based on the multiple risk data sample subsets and a preset fine-tuning algorithm to obtain the trained risk prediction model.
7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Compare the risk prediction results with the risk measured results, and calculate the performance index of the risk prediction model; When the performance indicator does not meet the preset threshold, the risk prediction model is optimized.
8. A risk assessment device, characterized in that: The device comprises: A data acquisition module, used to acquire a risk data set of the power industry within a preset area; the risk data set at least includes power accident data and operator data; A feature extraction module is used to perform feature extraction processing on the risk data set using a data mining algorithm to obtain risk features; The feature input module is used to input the risk feature into a pre-trained risk prediction model to obtain a risk prediction result; the risk detection result is used to assess the risk of the power industry within the preset area.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
A power operation risk prediction method and system
CN122905393A