Model training method, construction safety assessment method, device and equipment
By improving the weighted loss function and calculating the missing ratio and weight value of the label, the problem that the missing values in the data set affect the prediction accuracy of the model is solved, the accuracy and generalization ability of the model are improved, and the accuracy of multi-dimensional prediction is achieved.
Patent Information
- Application Number
- CN202411296300.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-18
AI Technical Summary
The prior art fails to effectively process missing values of data sets in model training, resulting in a decrease in prediction accuracy, especially in the absence of complexity and diversity of data.
By improving the weighted loss function, the label missing ratio and weight value are calculated based on the correlation information between the training sample and the real value label, the partial missing sample data is retained, and trained through the neural network model until the target loss function meets the convergence conditions.
It improves the accuracy and generalization ability of the model, can effectively process prediction values in multiple dimensions, reduces the decrease in prediction accuracy, and enhances the ability to handle data missing situations.
Smart Images

Figure CN118821887B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model training method, a construction safety assessment method, a device and equipment. Background Art
[0002] In practical applications, datasets often contain varying degrees of missing data due to equipment failures, data collection errors, and other reasons. Typically, deep neural network model training is performed by deleting samples with missing values or using interpolation methods such as the mean or median. However, this approach fails to fully consider the complexity and diversity of missing data. This results in datasets losing authenticity and information, introducing errors that affect the model's prediction accuracy and lead to suboptimal prediction results. Summary of the Invention
[0003] In view of this, the present application provides a model training method, construction safety assessment method, device and equipment, which retains sample data with partially missing labels by improving the weighted loss function, thereby solving the problem that partial missing data sets affect the model prediction accuracy.
[0004] According to a first aspect of the present application, a model training method is provided, comprising:
[0005] Acquire sample data, wherein the sample data includes training samples and true value labels of the training samples in different dimensions;
[0006] Determining, based on the association information between the training samples and the true value labels, label missing ratios of the training samples in different dimensions and first weight values of the training samples in different dimensions;
[0007] Determining a second weight value of the training sample according to the label missing ratio;
[0008] The sample data, the first weight value, and the second weight value are input into a preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining a target prediction model.
[0009] Optionally, determining the first weight value of the training sample in different dimensions based on the association information between the training sample and the true value label includes:
[0010] If the association information indicates that the training sample is associated with the true value label in any dimension, assigning the first weight value in any dimension to 1;
[0011] If the association information indicates that the training sample is not associated with the true value label in any dimension, the first weight value in any dimension is assigned to 0.
[0012] Optionally, determining the label missing ratio of the training sample in different dimensions based on the association information between the training sample and the true value label includes:
[0013] Counting the association information as the number of missing labels of training samples that are not associated with the true value labels in any dimension;
[0014] The quotient of the number of missing labels in the dimension and the total number of training samples in the sample data is calculated as the label missing ratio of any dimension.
[0015] Optionally, determining the second weight value of the training sample according to the label missing ratio includes:
[0016] Calculating the information entropy and mutual information of the true value label;
[0017] The second weight value is determined according to the information entropy, the mutual information, and the label missing ratio.
[0018] Optionally, the information entropy of the true value label is calculated as follows:
[0019] ;
[0020] Where, E j Indicates the j The information entropy of the true value labels, p ij Indicates the i The training samples in j The probability of the value on the true value label appearing, n Represents the total number of training samples;
[0021] The calculation formula of the mutual information of the true value label is expressed as:
[0022] ;
[0023] Where, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between p ( y j ,y k ) indicates a tag Y j and Y k The joint probability mass function of p ( y j )and p ( y k ) represent labels respectively Y j and Y k The marginal probability mass function of ;
[0024] The second weight value is determined according to the information entropy, the mutual information and the label missing ratio, using the following formula:
[0025] ;
[0026] Where, w j Indicates the j The second weight value of the true value label, m represents the total number of true value labels in any dimension, E j Indicates the j The information entropy of the true value labels, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between I ( Y k ; Y l ) indicates a tag Y k and Y l The mutual information between α Indicates the label missing ratio in any dimension.
[0027] Optionally, the objective loss function is expressed as:
[0028] ;
[0029] Where, loss represents the loss function, y represents the true value label, represents the predicted value of the model output, nrepresents the total number of training samples, l Indicates the number of predicted labels, i represents the number of the training sample, a ij Indicates the i The first training sample j The first weight value of the true value label, w j Indicates the j The second weight value of the true value label.
[0030] Optionally, the model training method further includes:
[0031] Normalize the second weight value.
[0032] According to a second aspect of the present application, a method for construction safety assessment of a wind power project is provided, comprising:
[0033] Obtaining a target prediction model and safety factor information of a target wind power project, wherein the target prediction model is trained using the model training method provided in the first aspect using safety factor information and safety scores of historical wind power projects as sample data;
[0034] The safety factor information is dimensionally processed according to a preset conversion rule to generate a safety index value;
[0035] Inputting the safety index value into the target prediction model to obtain a safety score for the target wind power project;
[0036] If the security score is less than or equal to the score threshold, a security warning message is displayed.
[0037] According to a third aspect of the present application, a model training device is provided, comprising:
[0038] An acquisition module is used to acquire sample data, wherein the sample data includes training samples and true value labels of the training samples in different dimensions;
[0039] a determination module, configured to determine, based on the association information between the training sample and the true value label, a label missing ratio of the training sample in different dimensions and a first weight value of the training sample in different dimensions; and determine a second weight value of the training sample based on the label missing ratio;
[0040] A training module is used to input the sample data, the first weight value, and the second weight value into a preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining a target prediction model.
[0041] Optionally, the determination module is specifically used to assign the first weight value in any dimension to 1 if the association information is that the training sample in any dimension is associated with the true value label; if the association information is that the training sample in any dimension is not associated with the true value label, assign the first weight value in any dimension to 0.
[0042] Optionally, the determination module is specifically used to count the number of missing labels of training samples in which the association information is not associated with the true value label in any dimension; and calculate the quotient of the number of missing labels of the dimension and the total number of training samples in the sample data as the label missing ratio of any dimension.
[0043] Optionally, the determination module is specifically configured to calculate the information entropy and mutual information of the true value label; and determine the second weight value based on the information entropy, the mutual information and the label missing ratio.
[0044] Optionally, the model training device further includes:
[0045] A preprocessing module is used to normalize the second weight value.
[0046] According to a fourth aspect of the present application, a construction safety assessment device for a wind power project is provided, comprising:
[0047] an acquisition module, configured to acquire a target prediction model and safety factor information of a target wind power project, wherein the target prediction model is trained using the model training method provided in the first aspect, using safety factor information and safety scores of historical wind power projects as sample data;
[0048] A data processing module, configured to perform dimensionless processing on the safety factor information according to preset conversion rules to generate a safety index value;
[0049] An evaluation module, configured to input the safety index value into the target prediction model to obtain a safety score for the target wind power project;
[0050] The early warning module is used to display a security early warning message if the security score is less than or equal to the score threshold.
[0051] According to the fifth aspect of the present application, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the above-mentioned model training method and the construction safety assessment method of the wind power project are implemented.
[0052] According to the sixth aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the program, the steps of the above-mentioned model training method and the construction safety assessment method for wind power projects are implemented.
[0053] This technical solution calculates the weights of training samples across different dimensions based on information about whether they are associated with true value labels. The weights represent the importance of sample data with partially missing labels. This allows the model to retain the sample data with partially missing labels when calculating the loss value for the missing label, using the weights as a reference. This effectively addresses the problem of decreased prediction accuracy caused by deleting partially missing samples from a dataset, improves model accuracy, and enables accurate prediction of values across multiple dimensions simultaneously.
[0054] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0056] Figure 1 A flow chart of the model training method provided in an embodiment of the present application is shown;
[0057] Figure 2 A schematic diagram showing a flow chart of a construction safety assessment method for a wind power project provided in an embodiment of the present application is shown;
[0058] Figure 3 The following is a structural diagram of the model training device provided in an embodiment of the present application;
[0059] Figure 4 The structural block diagram of the construction safety assessment device for a wind power project provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0060] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0061] The following describes in detail embodiments of the present application, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limiting the present application.
[0062] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of this application refers to the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, or there may be intermediate elements. In addition, "connected" or "connected" as used herein may include wireless connection or wireless fusion. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0063] Now, exemplary embodiments according to the present application will be described in more detail with reference to the accompanying drawings. However, these exemplary embodiments may be implemented in a variety of different forms and should not be construed as being limited to the embodiments set forth herein. It should be understood that these embodiments are provided to make the disclosure of this application thorough and complete and to fully convey the concepts of these exemplary embodiments to those of ordinary skill in the art.
[0064] In this embodiment, a model training method is provided, such as Figure 1 As shown, the method includes:
[0065] Step 110: Obtain sample data.
[0066] The sample data includes training samples and true value labels of training samples in different dimensions, that is, different true value labels can be associated with the same training sample in different dimensions. Specifically, the sample data can be represented in a matrix format, for example, , the true value label ,in, x i ∈ R d For the i samples, d is the feature dimension, n is the total number of samples, l is the number of labels that need to be predicted.
[0067] Step 120 : Determine the label missing ratio of the training sample in different dimensions and the first weight value of the training sample in different dimensions based on the association information between the training sample and the true value label.
[0068] In this embodiment, the label missing ratio, which characterizes the label missing situation of different training samples under each feature dimension, and the first weight value, which characterizes whether each training sample under a certain feature dimension has a missing true value label, are determined based on the association information of whether the training samples are associated with the true value labels. This allows for the accurate evaluation of the reference importance of each training sample through the label missing ratio and the first weight value, and facilitates the calculation of the weighted loss, so that the trained target prediction model can be more specific and meet the accuracy requirements of actual scenarios.
[0069] In a specific embodiment, step 120 determines the first weight values of the training samples in different dimensions based on the association information between the training samples and the true value labels, which specifically includes the following steps:
[0070] Step 121 - 1 : If the associated information indicates that the training sample is associated with a true value label in any dimension, the first weight value in any dimension is assigned to 1.
[0071] Step 121 - 2 : If the associated information indicates that the training sample in any dimension is not associated with a true value label, the first weight value in any dimension is assigned to 0.
[0072] In this embodiment, the first weight value is assigned to 1 or 0 according to whether the training sample is associated with a real value label. This is to better distinguish between training samples with real value labels and those without real value labels. When the training sample has a real value label in a certain dimension, the first weight value in this dimension is assigned to 1, indicating that the training sample in this dimension has played a positive role in the training of the model. On the contrary, when the training sample does not have a real value label in a certain dimension, the first weight value in this dimension is assigned to 0, indicating that the training sample in this dimension has no effect on the training of the model. In this way, when the model is trained, even if the training sample lacks a label in a certain dimension, the training sample will be retained so that the model can learn the characteristics of the training sample in other dimensions. This improves the learning ability and generalization ability of the model during data training, and helps to enhance the model's ability to process data with missing labels.
[0073] For example, if the element in row i and column j of the true value label matrix Y is missing, then the first weight value a ij It is recorded as 0, otherwise it is recorded as 1.
[0074] In a specific embodiment, step 120 determines the label missing ratio of the training samples in different dimensions based on the association information between the training samples and the true value labels, which specifically includes the following steps:
[0075] Step 122 - 1 , counting the associated information as the number of missing labels of training samples that are not associated with true value labels in any dimension.
[0076] Step 122 - 2 , calculate the quotient of the number of missing dimension labels and the total number of training samples in the sample data as the missing label ratio of any dimension.
[0077] In this embodiment, the quotient of the number of missing labels in each dimension and the total number of training samples in the sample data for that dimension is calculated to obtain the missing label ratio for each dimension. The missing label ratio reflects the degree of missing labels in each dimension, which facilitates subsequent processing and weight adjustment during neural network model training, thereby improving the accuracy and generalization ability of the model.
[0078] For example, taking 5 training samples and 3 feature dimensions as an example, the sample data matrix is expressed as:
[0079] ;
[0080] If only the true value label Empty, indicating training samples The second feature dimension lacks the true value label, so the label missing ratio for the second feature dimension is 1 / 5. and Empty, indicating training samples and If the true value label is missing in the second feature dimension, the label missing ratio for the second feature dimension is 2 / 5. The larger the label missing ratio, the more serious the label missing in the corresponding dimension.
[0081] Step 130: Determine a second weight value of the training sample according to the label missing ratio.
[0082] In this embodiment, by dynamically adjusting the second weight value when training the neural network model according to the degree of label missing in each dimension, the model's ability to process data with missing labels can be further enhanced, thereby improving the accuracy and robustness of the model.
[0083] In a specific embodiment, step 130, i.e., determining the second weight value of the training sample based on the label missing ratio, specifically includes the following steps:
[0084] Step 131: Calculate the information entropy and mutual information of the true value label.
[0085] Entropy is a metric that indicates the amount of information. Higher entropy indicates greater information content, higher uncertainty, and greater difficulty in prediction. Mutual information is a statistic used to measure the closeness of the relationship between two true value labels, indicating the correlation between the true value labels. Higher entropy indicates lower reliability of the label data, while greater mutual information indicates higher correlation between the labels.
[0086] Specifically, the calculation formula of the information entropy of the true value label is expressed as:
[0087] ;
[0088] Where, E j Indicates the j The information entropy of the true value labels, p ij Indicates the i The training samples in j The probability of the value on the true value label appearing, n Represents the total number of training samples.
[0089] The calculation formula of the mutual information of the true value label is expressed as:
[0090] ;
[0091] Where, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between p ( y j , y k ) indicates a tag Y j and Y k The joint probability mass function of p ( y j )and p ( y k ) represent labels respectively Y j and Y k The marginal probability mass function of .
[0092] Step 132: Determine a second weight value based on information entropy, mutual information, and label missing ratio.
[0093] Specifically, the second weight value is determined based on information entropy, mutual information, and label missing ratio, using the following formula:
[0094] ;
[0095] Where, w j Indicates the j The second weight value of the true value label, m represents the total number of true value labels in any dimension, E j Indicates the j The information entropy of the true value labels, E k Indicates the k The information entropy of the true value labels, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between I ( Y k ; Y l ) indicates a tag Y k and Y l The mutual information between α Indicates the label missing ratio in any dimension.
[0096] In this embodiment, the information entropy and mutual information of each true value label are calculated by the entropy weight method, and the uncertainty of the label and the correlation between the labels are measured by calculating the information entropy and mutual information of the true value label. Then, the different labels are comprehensively weighted in combination with the label missing ratio to obtain a second weight value. Thus, the weight distribution is performed based on the information entropy, and the weight is further adjusted using the mutual information and the label missing ratio, so that the label with a higher correlation with other true value labels or a lower missing ratio obtains a higher weight. Then, by reasonably determining the second weight value, it is convenient for the model to learn the potential distribution of missing data and the correlation between data, reduce the risk of overfitting and the impact of label missing on model performance, and at the same time, reduce the subjective dependence of sample data, make the weight distribution more objective and reasonable, and ensure the balance of the importance of each label under different dimensions. Further improve the generalization ability of the model, so that the model can achieve good prediction results on different data sets, and improve the performance and stability of the target prediction model.
[0097] It is worth mentioning that a generative adversarial network can also be constructed using the true value labels and their information entropy and mutual information, allowing the network to learn the potential distribution of missing labels. The trained generative adversarial network is used to generate reconstructed labels that conform to the distribution of the true value labels, and the reconstructed labels are then filled into the missing labels of the corresponding training samples. This allows the network to learn data features from irregular discrete measurement data in an unsupervised manner, making the sample data required for training more complete and ensuring high data accuracy under different missing rate conditions.
[0098] Specifically, the generative adversarial network can be CNN (Convolutional Neural Networks) or ViT (Vision Transformer, self-attention model), etc.
[0099] In one embodiment, after step 130, the model training method further includes: normalizing the second weight value.
[0100] In this embodiment, the second weight values are linearly transformed through normalization and mapped to the range of [0, 1], and the sum of the second weight values of all true value labels in the same dimension is 1. This can better balance the impact of the correlation between different true value labels on the model training quality, making the model more interpretable and stable during the training process.
[0101] Step 140: Input the sample data, the first weight value, and the second weight value into a preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining a target prediction model.
[0102] Specifically, the preset neural network model can adopt a single neural network model, such as a deep neural network (DNN) model, a convolutional neural network (CNN) model, a recurrent neural network (RNN) model, a residual network (ResNet) model, and a BERT (Bidirectional Encoder Representation from Transformers) model.
[0103] The model training method provided in the embodiment of the present application can calculate the weights of the training samples in different dimensions based on the associated information of whether the training samples are associated with real value labels, and express the importance of the sample data with partially missing labels through weights. In this way, when calculating the loss value of the model, the loss value of the missing label of the sample can be calculated with reference to the weights when the sample data with partially missing labels is retained. This effectively solves the problem of decreased prediction accuracy caused by deleting samples with partial missing data sets, and improves the accuracy of the model. In addition, since the sample data is divided according to dimensions, after training the target prediction model with sample data, it can achieve accurate prediction of the prediction values of multiple dimensions at the same time, which helps to improve the prediction efficiency.
[0104] In actual application scenarios, the target loss function is expressed as:
[0105] ;
[0106] Where, loss represents the loss function, y represents the true value label, represents the predicted value of the model output, n represents the total number of training samples, l Indicates the number of predicted labels, i represents the number of the training sample, j The number representing the true value label, a ij Indicates the i The first training sample j The first weight value of the true value label, w j Indicates the j The second weight value of the true value label.
[0107] By introducing a first weight value for missing labels and a second missing value for relevance into the loss function, the loss for samples with missing labels is not calculated, and the loss is weighted according to relevance. This allows the model to prioritize training samples with no missing labels and those with higher label relevance during training. Even with some missing labels, the model can understand and adapt to data characteristics and distributions across different dimensions, making the training performance of the target prediction model similar to that of a model with no missing samples. This improves accuracy and reliability while maintaining the generalization ability of the target language model.
[0108] For example, the sample data in the dataset is analyzed and the label missing ratio is calculated. The sample data is then divided into a training set and a test set according to a preset ratio. The test set data is then imported into a deep neural network model with a customized model loss function for training. Finally, the mean squared error is used as the error between the predicted output of the loss function and the expected output. The model accuracy is evaluated on the validation set, and the deep neural network model parameters and the customized loss function weights are adjusted and optimized until the loss function is minimized.
[0109] In this embodiment, a construction safety assessment method for a wind power project is provided. Figure 2 As shown, the method includes:
[0110] Step 210: Obtain sample data.
[0111] The sample data includes safety factor information and safety scores for historical wind power projects. Safety factor information includes indicator values corresponding to different safety factors. Safety factors can be appropriately configured based on the actual engineering requirements of the wind power project. For example, safety factors may include wind turbine power, operating time, the remaining service life and number of overhauls of electrical equipment such as transmission lines, transformers, and switchgear, environmental parameters, and the deployment of fire prevention facilities. These examples are not listed in detail in this embodiment.
[0112] Step 220 : Determine the label missing ratio of the training sample in different dimensions and the first weight value of the training sample in different dimensions based on the association information between the training sample and the true value label.
[0113] In a specific embodiment, in step 220, the first weight value of the training sample in different dimensions is determined based on the association information between the training sample and the true value label, which specifically includes the following steps: if the association information is that the training sample is associated with a true value label in any dimension, the first weight value in any dimension is assigned to 1; if the association information is that the training sample is not associated with a true value label in any dimension, the first weight value in any dimension is assigned to 0.
[0114] In this embodiment, the first weight value is assigned to 1 or 0 depending on whether the training sample is associated with a true value label. This allows for better distinction between training samples with true value labels and those without. When a training sample has a true value label in a certain dimension, the first weight value in that dimension is assigned to 1, indicating that the training sample in that dimension has played a positive role in model training. Conversely, when a training sample does not have a true value label in a certain dimension, the first weight value in that dimension is assigned to 0, indicating that the training sample in that dimension has no effect on model training. This improves the model's learning and generalization capabilities during data training, and helps enhance the model's ability to handle data with missing labels.
[0115] In a specific embodiment, step 220 determines the label missing ratio of the training samples in different dimensions based on the association information between the training samples and the true value labels, specifically including the following steps: the statistical association information is the number of label missing training samples in any dimension for which the training samples are not associated with the true value labels; and the quotient of the number of dimension label missing and the total number of training samples in the sample data is calculated as the label missing ratio of any dimension.
[0116] In this embodiment, the quotient of the number of missing labels in each dimension and the total number of training samples in the sample data for that dimension is calculated to obtain the missing label ratio for each dimension. The missing label ratio reflects the degree of missing labels in each dimension, which facilitates subsequent processing and weight adjustment during neural network model training, thereby improving the accuracy and generalization ability of the model.
[0117] Step 230: Determine a second weight value of the training sample according to the label missing ratio.
[0118] In a specific embodiment, step 230, i.e., determining the second weight value of the training sample based on the label missing ratio, specifically includes the following steps: calculating the information entropy and mutual information of the true value label; and determining the second weight value based on the information entropy, mutual information and label missing ratio.
[0119] Specifically, the calculation formula of the information entropy of the true value label is expressed as:
[0120] ;
[0121] Where, E j Indicates the j The information entropy of the true value labels, p ij Indicates the i The training samples in j The probability of the value on the true value label appearing, n Represents the total number of training samples.
[0122] The calculation formula of the mutual information of the true value label is expressed as:
[0123] ;
[0124] Where, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between p (y j , y k ) indicates a tag Y j and Y k The joint probability mass function of p ( y j )and p ( y k ) represent labels respectively Y j and Y k The marginal probability mass function of .
[0125] The second weight value is determined based on information entropy, mutual information, and label missing ratio using the following formula:
[0126] ;
[0127] Where, w j Indicates the j The second weight value of the true value label, m represents the total number of true value labels in any dimension, E j Indicates the j The information entropy of the true value labels, E k Indicates the k The information entropy of the true value labels, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between I ( Y k ; Y l ) indicates a tag Y k and Y l The mutual information between α Indicates the label missing ratio in any dimension.
[0128] In this embodiment, the information entropy and mutual information of each true value label are calculated by the entropy weight method, and the uncertainty of the label and the correlation between the labels are measured by calculating the information entropy and mutual information of the true value label. Then, the different labels are comprehensively weighted in combination with the label missing ratio to obtain a second weight value. Thus, the weight distribution is performed based on the information entropy, and the weight is further adjusted using the mutual information and the label missing ratio, so that the label with a higher correlation with other true value labels or a lower missing ratio obtains a higher weight. Then, by reasonably determining the second weight value, it is convenient for the model to learn the potential distribution of missing data and the correlation between data, reduce the risk of overfitting and the impact of label missing on model performance, and at the same time, reduce the subjective dependence of sample data, make the weight distribution more objective and reasonable, and ensure the balance of the importance of each label under different dimensions. Further improve the generalization ability of the model, so that the model can achieve good prediction results on different data sets, and improve the performance and stability of the target prediction model.
[0129] In step 240 , the sample data, the first weight value, and the second weight value are input into a preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining a target prediction model.
[0130] Among them, the objective loss function is expressed as:
[0131] ;
[0132] Where, loss represents the loss function, y represents the true value label, represents the predicted value of the model output, n represents the total number of training samples, l Indicates the number of predicted labels, i represents the number of the training sample, j The number representing the true value label, a ij Indicates the i The first training sample j The first weight value of the true value label, w j Indicates the j The second weight value of the true value label.
[0133] Step 250: Obtain safety factor information of the target wind power project.
[0134] Step 260 : Perform dimensionless processing on the safety factor information according to a preset conversion rule to generate a safety index value.
[0135] In this embodiment, by converting complex safety factor information into unified and concise indicators, it is convenient to compare and analyze models and improve data processing efficiency.
[0136] Step 270: Input the safety index value into the target prediction model to obtain a safety score for the target wind power project.
[0137] Step 280: If the security score is less than or equal to the score threshold, display security warning information.
[0138] Among them, the scoring threshold can be reasonably set according to the project security requirements, and the embodiments of this application do not make specific limitations.
[0139] The construction safety assessment method for wind power projects provided in the embodiment of the present application uses the safety factor information and safety scores of historical wind power projects as samples, and trains the target prediction model in combination with the first weight value and the second weight value related to whether the safety score is missing. The safety situation of the target wind power project is scored by the trained target prediction model. When the safety score is low, the system automatically prompts the user to correct the problem. Even if there are some missing sample data, it is still possible to accurately predict the operational safety of the wind power project, effectively solving the problems in the field of safety that are difficult to handle due to the high complexity of data and the low prediction accuracy of the network model, thereby improving the effectiveness of safety prediction and ensuring the safe construction and maintenance of wind power projects.
[0140] The model training method and the construction safety assessment method for wind power projects provided in the embodiments of the present application can be applied to a terminal, a server, or software running on a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers, or as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the intent recognition method, etc., but is not limited to the above forms.
[0141] It should be noted that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0142] Furthermore, if Figure 3As shown, as a specific implementation of the above-mentioned model training method, an embodiment of the present application provides a model training device 300, which includes: an acquisition module 301, a determination module 302 and a training module 303.
[0143] The acquisition module 301 is used to acquire sample data, wherein the sample data includes training samples and true value labels of the training samples in different dimensions;
[0144] Determination module 302 is configured to determine, based on the association information between the training samples and the true value labels, the label missing ratios of the training samples in different dimensions and the first weight values of the training samples in different dimensions; and determine the second weight value of the training samples based on the label missing ratios;
[0145] The training module 303 is used to input the sample data, the first weight value, and the second weight value into the preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining the target prediction model.
[0146] In this embodiment, the weights of training samples in different dimensions are calculated based on information about whether the training samples are associated with true value labels, and the weights are used to represent the importance of sample data with partially missing labels. This allows the weights to be used to calculate the loss for the missing labels of the samples, while retaining the sample data with partially missing labels. This effectively addresses the problem of reduced prediction accuracy caused by deleting samples with partially missing labels from the dataset, improves model accuracy, and enables accurate prediction of values for multiple dimensions simultaneously.
[0147] Furthermore, the determination module 302 is specifically used to assign the first weight value in any dimension to 1 if the associated information is that the training sample is associated with a true value label in any dimension; if the associated information is that the training sample is not associated with a true value label in any dimension, the first weight value in any dimension is assigned to 0.
[0148] Furthermore, the determination module 302 is specifically used to count the associated information as the number of missing labels of training samples that are not associated with true value labels in any dimension; and calculate the quotient of the number of missing dimension labels and the total number of training samples in the sample data as the missing label ratio of any dimension.
[0149] Furthermore, the determination module 302 is specifically configured to calculate the information entropy and mutual information of the true value label; and determine the second weight value based on the information entropy, mutual information, and label missing ratio.
[0150] Furthermore, the model training device 300 further includes: a pre-processing module (not shown in the figure);
[0151] The preprocessing module is used to perform normalization processing on the second weight value.
[0152] Furthermore, if Figure 4 As shown, as a specific implementation of the above-mentioned wind power project construction safety assessment method, an embodiment of the present application provides a wind power project construction safety assessment device 400, which includes: an acquisition module 401, a data processing module 402, an assessment module 403 and an early warning module 404.
[0153] An acquisition module 401 is configured to acquire a target prediction model and safety factor information of a target wind power project, wherein the target prediction model is trained using the model training method provided in the embodiment of the first aspect, using safety factor information and safety scores of historical wind power projects as sample data;
[0154] The data processing module 402 is used to perform dimensionless processing on the safety factor information according to a preset conversion rule to generate a safety index value;
[0155] Evaluation module 403, used to input the safety index value into the target prediction model to obtain the safety score of the target wind power project;
[0156] The warning module 404 is configured to display a safety warning message if the safety score is less than or equal to a score threshold.
[0157] In this embodiment, a target prediction model is trained using historical wind power project safety factor information and safety scores as samples, combined with first and second weight values related to safety score omissions. The trained target prediction model scores the safety of the target wind power project. If the safety score is low, the system automatically prompts the user to address the issue. Even with partial missing sample data, accurate predictions of wind power project operational safety are achieved, effectively addressing the challenges of complex data processing and low prediction accuracy of network models in the safety field. This improves the effectiveness of safety predictions and ensures the safe construction and maintenance of wind power projects.
[0158] For the specific definition of the model training device, please refer to the definition of the model training method above, which will not be repeated here. Each module in the above-mentioned model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0159] Based on the above Figure 1 and Figure 2The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, the embodiment of the present application further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by the processor, the computer program is executed as shown in FIG. Figure 1 The model training method shown and Figure 2 The construction safety assessment method for wind power projects is shown.
[0160] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0161] Based on the above Figure 1 and Figure 2 The method shown, and Figure 3 、 Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 The model training method shown and Figure 2 The construction safety assessment method for wind power projects is shown.
[0162] Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, etc. The user interface may include a display, an input unit such as a keyboard, etc. Optional user interfaces may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a Wi-Fi interface), etc.
[0163] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0164] The storage medium may also include an operating system and a network communication module. An operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the execution of information processing programs and other software and / or programs. The network communication module facilitates communication between components within the storage medium, as well as with other hardware and software within the physical device.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform, or by hardware.
[0166] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0167] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.
Claims
1. A model training method, characterized in that: The method comprises: Acquire sample data, wherein the sample data includes training samples and true value labels of the training samples in different dimensions, the training samples include safety factor information of historical wind power projects, and the true value labels include safety scores of historical wind power projects; Determine, according to the association information between the training sample and the true value label, the label missing ratio of the training sample in different dimensions and the first weight value of the training sample in different dimensions; Determining a second weight value of the training sample according to the label missing ratio; Inputting the sample data, the first weight value, and the second weight value into a preset neural network model for training until the loss value of the target loss function of the preset neural network model meets the model convergence condition, thereby obtaining a target prediction model, wherein the target prediction model is used to predict the safety score of the target wind power project; The determining, based on the association information between the training sample and the true value label, the label missing ratio of the training sample in different dimensions and the first weight value of the training sample in different dimensions comprises: If the association information is that the training sample is associated with the true value label in any dimension, assign the first weight value in any dimension to 1; if the association information is that the training sample is not associated with the true value label in any dimension, assign the first weight value in any dimension to 0; count the number of missing labels of training samples whose association information is that the training sample is not associated with the true value label in any dimension; calculate the quotient of the number of missing labels in the dimension and the total number of training samples in the sample data as the missing label ratio in any dimension; The determining the second weight value of the training sample according to the label missing ratio includes: Calculating the information entropy and mutual information of the true value label; determining the second weight value according to the information entropy, the mutual information and the label missing ratio; The objective loss function is expressed as: ; In the formula, loss represents the loss function, y represents the true value label, represents the predicted value of the model output, n represents the total number of training samples, l Indicates the number of predicted labels, i represents the number of the training sample, a ij Indicates i The first training sample j The first weight value of the true value label, w j Indicates j The second weight value of the true value label.
2. The model training method according to claim 1, characterized in that: The calculation formula of the information entropy of the true value label is expressed as: ; In the formula, E j Indicates j The information entropy of the true value labels, p ij Indicates i The training samples are j The probability of the value on the true value label appearing, n Represents the total number of training samples; The calculation formula of the mutual information of the true value label is expressed as: ; In the formula, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between p ( y j , y k ) indicates a tag Y j and Y k The joint probability mass function of p ( y j )and p ( y k ) represent labels respectively Y j and Y k The marginal probability mass function of ; The second weight value is determined according to the information entropy, the mutual information and the label missing ratio, using the following formula: ; In the formula, w j Indicates j The second weight value of the true value label, m represents the total number of true value labels in any dimension, E j Indicates j The information entropy of the true value labels, I ( Y j ; Y k ) indicates a tag Y j and Y k The mutual information between I ( Y k ; Y l ) indicates a tag Y k and Y l The mutual information between α Indicates the label missing ratio in any dimension.
3. The model training method according to claim 1, characterized in that: The method further comprises: The second weight value is normalized.
4. A construction safety assessment method for a wind power project, characterized in that: The method further comprises: Obtaining a target prediction model and safety factor information of a target wind power project, wherein the target prediction model uses safety factor information and safety scores of historical wind power projects as sample data and is trained using the model training method described in any one of claims 1 to 3; The safety factor information of the target wind power project is dimensionally processed according to a preset conversion rule to generate a safety index value; Inputting the safety index value into the target prediction model to obtain a safety score for the target wind power project; If the safety score is less than or equal to the score threshold, a safety warning message is displayed.
5. A model training device, characterized in that: The device comprises: An acquisition module, used to acquire sample data, wherein the sample data includes training samples and true value labels of the training samples in different dimensions, the training samples include safety factor information of historical wind power projects, and the true value labels include safety scores of historical wind power projects; A determination module, configured to determine the label missing ratio of the training sample in different dimensions and the first weight value of the training sample in different dimensions according to the association information between the training sample and the true value label; and Determining a second weight value of the training sample according to the label missing ratio; A training module, used for inputting the sample data, the first weight value, and the second weight value into a preset neural network model for training, until the loss value of the target loss function of the preset neural network model meets the model convergence condition, and obtaining a target prediction model, wherein the target prediction model is used to predict the safety score of the target wind power project; The determination module is specifically used to assign the first weight value in any dimension to 1 if the association information is that the training sample is associated with the true value label in any dimension; assign the first weight value in any dimension to 0 if the association information is that the training sample is not associated with the true value label in any dimension; count the number of missing labels of training samples whose association information is that the training sample is not associated with the true value label in any dimension; calculate the quotient of the number of missing dimensional labels and the total number of training samples in the sample data as the missing label ratio in any dimension; calculate the information entropy and mutual information of the true value label; and determine the second weight value based on the information entropy, the mutual information and the missing label ratio; The objective loss function is expressed as: ; In the formula, loss represents the loss function, y represents the true value label, represents the predicted value of the model output, n represents the total number of training samples, l Indicates the number of predicted labels, i represents the number of the training sample, a ij Indicates i The first training sample j The first weight value of the true value label, w j Indicates j The second weight value of the true value label.
6. A construction safety assessment device for a wind power project, characterized in that: The device comprises: An acquisition module, used to acquire a target prediction model and safety factor information of a target wind power project, wherein the target prediction model uses safety factor information and safety scores of historical wind power projects as sample data and is trained using the model training method described in any one of claims 1 to 3; A data processing module, used for performing dimensionless processing on the safety factor information of the target wind power project according to a preset conversion rule to generate a safety index value; An evaluation module, used for inputting the safety index value into the target prediction model to obtain a safety score of the target wind power project; The warning module is used to display safety warning information if the safety score is less than or equal to the score threshold.
7. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the program, the model training method according to any one of claims 1 to 3 or the construction safety assessment method for a wind power project according to claim 4 is implemented.
