Engineering patrol daily risk level classification method and device and electronic equipment

By performing data augmentation and sub-dataset training on the engineering inspection daily data set, and integrating the prediction output of multiple risk level classification submodels, the problem of low accuracy in the risk level classification of engineering inspection daily data in the existing technology is solved, and the generalization ability of the model and the accuracy of prediction classification are improved.

CN119599420APending Publication Date: 2025-03-11WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411527616.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In the prior art engineering inspection daily risk level classification, due to the few training samples, the training-derived classification model has poor generalization ability and low classification prediction accuracy.

Method used

By enhancing the acquired engineering inspection daily data set, several sub-data sets are constructed and several initial risk level classification sub-models are trained separately, and the prediction outputs of multiple sub-models are combined to improve the accuracy of risk level classification.

Benefits of technology

It effectively enhances the generalization ability of the model, improves the accuracy of prediction classification, and solves the problem of low accuracy of risk level classification in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119599420A_ABST
    Figure CN119599420A_ABST
Patent Text Reader

Abstract

The invention provides an engineering patrol daily report risk level classification method and device and electronic equipment, and belongs to the technical field of engineering safety, and the method comprises the steps: carrying out the data enhancement of an obtained engineering patrol daily report data set, obtaining an enhanced data set, and constructing a plurality of sub-data sets according to the enhanced data set; constructing a plurality of initial risk level classification sub-models with the number corresponding to that of the sub-data sets, and inputting the sub-data sets into the initial risk level classification sub-models for iterative training to obtain a plurality of completely trained risk level classification sub-models; and inputting the obtained project patrol daily report to be predicted into each completely trained risk level classification sub-model to obtain a plurality of prediction outputs, and integrating the prediction outputs to obtain a risk level classification result. According to the method, multiple risk level classification sub-models are trained in an integrated strategy mode, and project patrol daily report risk level classification tasks are performed by integrating the risk level classification sub-models, so that the generalization ability of the models is effectively enhanced, and the accuracy of prediction classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of engineering safety technology, and in particular to a method, device and electronic equipment for classifying risk levels of daily engineering inspection reports. Background Art

[0002] Engineering construction is a complex process with many typical characteristics such as long construction period, special site conditions, complex construction technology, and strong environmental dependence. In this context, compared with other fields, construction safety accidents occur frequently in the construction field, resulting in casualties and property losses. Therefore, risk management is a vital part of engineering construction. Accurately identifying the risk level can help managers quickly understand the severity of the risk at the construction site and take appropriate measures in a timely manner. Under this premise, realizing automated text classification of daily engineering inspection reports can quickly and accurately identify safety risk information, which helps to improve the efficiency of construction safety management.

[0003] However, although deep learning technology has been widely used in the field of natural language processing in recent years and can handle various text classification problems, the current deep learning model training relies more on large data sets. In the problem of daily risk level classification of engineering inspections, due to the small number of training samples, the generalization ability of the model trained by deep learning is poor, and it is difficult to ensure the accuracy of classification when performing risk level classification.

[0004] Therefore, the existing technology has the technical problem that in the classification of daily risk levels of engineering inspections, due to the small number of training samples, the generalization ability of the trained classification model is poor, and the classification prediction accuracy is low. Summary of the invention

[0005] In view of this, it is necessary to provide a method, device and electronic equipment for classifying the daily risk level of engineering inspections, so as to solve the technical problems in the prior art of the classification of daily risk levels of engineering inspections, that is, due to the small number of training samples, the generalization ability of the trained classification model is poor, and the classification prediction accuracy is low.

[0006] In order to solve the above problems, on the one hand, the present invention provides a method for classifying the risk levels of daily project inspection reports, including: The acquired engineering inspection daily data set is enhanced to obtain an enhanced data set, and several sub-data sets are constructed based on the enhanced data set; Constructing a number of initial risk level classification sub-models corresponding to the number of sub-data sets, inputting the sub-data sets into each initial risk level classification sub-model for iterative training, and obtaining a number of fully trained risk level classification sub-models; The daily inspection reports of the project to be predicted are input into each fully trained risk level classification sub-model to obtain several prediction outputs, and the risk level classification results are obtained by combining the prediction outputs.

[0007] In a possible implementation, data enhancement is performed on the acquired engineering inspection daily data set to obtain an enhanced data set, including: The engineering inspection daily report dataset is subjected to simple data augmentation and text back-translation to obtain an enhanced dataset.

[0008] In a possible implementation, several sub-datasets are constructed based on the enhanced dataset, including: Repeatable stratified sampling is performed on the enhanced dataset to obtain several sub-datasets.

[0009] In a possible implementation, the sub-datasets are respectively input into each initial risk level classification sub-model for iterative training, including: Perform data segmentation preprocessing on each sub-data set to obtain preprocessed data; The preprocessed data are respectively input into each initial risk level classification sub-model, and the preprocessed data are sequentially subjected to multi-dimensional embedding processing, multi-head self-attention extraction, position feedforward processing, residual connection and layer normalization to obtain feature encoding output; The feature coding output is randomly discarded and classified to obtain the classification prediction results of each initial risk level classification sub-model; The predicted loss of each initial risk level classification sub-model is determined based on the classification prediction results and the sub-dataset, and each initial risk level classification sub-model is iteratively trained based on the predicted loss until the loss no longer decreases.

[0010] In one possible implementation, the multi-dimensional embedding process includes word embedding, paragraph embedding, and position embedding.

[0011] In a possible implementation, the predicted loss of each initial risk level classification sub-model is determined according to the classification prediction result and the sub-dataset, and each initial risk level classification sub-model is iteratively optimized according to the predicted loss until the loss no longer decreases, including: Based on the focused loss function, the loss of the classification prediction results and sub-datasets is calculated to obtain the prediction loss of each initial risk level classification sub-model; According to the prediction loss and based on the learning rate time decay strategy, each initial risk level classification sub-model is iteratively trained until the loss no longer decreases.

[0012] In a possible implementation, the daily inspection reports of the project to be predicted are input into each fully trained risk level classification sub-model to obtain several prediction outputs, and the risk level classification results are obtained by integrating the prediction outputs, including: Input the daily inspection data of the project to be predicted into each fully trained risk level classification sub-model to obtain several prediction outputs; The number of prediction outputs for each risk level in the prediction output is counted, and the risk level with the highest number of prediction outputs is taken as the risk level classification result.

[0013] On the other hand, the present invention also provides a device for classifying daily risk levels of engineering inspections, comprising: A data preprocessing unit is used to perform data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and to construct several sub-data sets based on the enhanced data set; A model training unit is used to construct a number of initial risk level classification sub-models corresponding to the number of sub-data sets, and input the sub-data sets into each initial risk level classification sub-model for iterative training to obtain a number of fully trained risk level classification sub-models; The prediction output unit is used to input the daily inspection reports of the engineering project to be predicted into each fully trained risk level classification sub-model to obtain a number of prediction outputs, and to obtain the risk level classification results by integrating the prediction outputs.

[0014] On the other hand, the present invention also provides an electronic device, including a memory and a processor, wherein: Memory for storing computer programs; The processor is coupled to the memory and is used to execute a computer program to implement the steps in the above-mentioned engineering inspection daily risk level classification method.

[0015] On the other hand, the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the above-mentioned method for classifying the risk levels of daily project inspection reports are implemented.

[0016] The beneficial effects of the present invention are as follows: the risk level classification method for daily engineering inspection reports provided by the present invention first performs data enhancement on the acquired daily engineering inspection report data set to obtain an enhanced data set, and constructs several sub-data sets based on the enhanced data set; then constructs several initial risk level classification sub-models corresponding to the number of sub-data sets, and inputs the sub-data sets into each initial risk level classification sub-model for iterative training to obtain several fully trained risk level classification sub-models; finally, the acquired daily engineering inspection reports to be predicted are input into each fully trained risk level classification sub-model to obtain several prediction outputs, and the risk level classification results are obtained by integrating the prediction outputs. The present invention trains multiple risk level classification sub-models separately through an integrated strategy, and integrates multiple risk level classification sub-models to classify the risk levels of daily engineering inspection reports, which effectively enhances the generalization ability of the model and improves the accuracy of prediction classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 A schematic diagram of a flow chart of an embodiment of a method for classifying daily risk levels of engineering inspections provided by the present invention; Figure 2 A schematic diagram of the iterative training process of an embodiment of the present invention; Figure 3 A schematic diagram of a process for determining prediction loss iterative training according to an embodiment of the present invention; Figure 4 A schematic diagram of a flow chart of comprehensive prediction output according to an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an embodiment of a device for classifying risk levels of daily project inspections provided by the present invention; Figure 6 A schematic structural diagram of an embodiment of an electronic device provided by the present invention. DETAILED DESCRIPTION

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

[0020] In the description of the embodiments of the present invention, unless otherwise specified, "multiple" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone.

[0021] The descriptions of "first", "second", etc. involved in the embodiments of the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

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

[0023] The present invention provides a method, device and electronic equipment for classifying daily risk levels of engineering inspections, which are described below respectively.

[0024] Figure 1 A flow chart of an embodiment of the method for classifying the risk level of daily project inspection reports provided by the present invention is shown in FIG. Figure 1 As shown in the figure, the risk level classification method of engineering inspection daily report includes: S101, performing data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and constructing several sub-data sets based on the enhanced data set; S102, constructing a number of initial risk level classification sub-models corresponding to the number of sub-data sets, inputting the sub-data sets into each initial risk level classification sub-model for iterative training, and obtaining a number of fully trained risk level classification sub-models; S103, input the obtained daily inspection reports of the project to be predicted into each fully trained risk level classification sub-model to obtain a number of prediction outputs, and obtain the risk level classification result by integrating the prediction outputs.

[0025] Specifically, the engineering inspection daily risk level classification method provided by the present invention first performs data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and constructs several sub-data sets based on the enhanced data set; then constructs several initial risk level classification sub-models corresponding to the number of sub-data sets, and inputs the sub-data sets into each initial risk level classification sub-model for iterative training to obtain several fully trained risk level classification sub-models; finally, the acquired engineering inspection daily data to be predicted is input into each fully trained risk level classification sub-model to obtain several prediction outputs, and the risk level classification results are obtained by combining the prediction outputs. The present invention trains multiple risk level classification sub-models separately through an integrated strategy, and integrates multiple risk level classification sub-models to classify the risk level of engineering inspection daily reports, which effectively enhances the generalization ability of the model and improves the accuracy of prediction classification.

[0026] In some embodiments of the present invention, data enhancement is performed on the acquired engineering inspection daily data set to obtain an enhanced data set, including: The engineering inspection daily report dataset is subjected to simple data augmentation and text back translation to obtain an enhanced dataset.

[0027] Specifically, considering that the amount of data in the original engineering inspection daily data set is too small, the embodiment uses EDA (easy data augmentation) and text back translation to perform data enhancement on the original data, expand the amount of original data, and increase effective samples.

[0028] Among them, simple data enhancement is a simple and effective text data enhancement technology. It generates new training samples by making a small modification to the original text data. Simple data enhancement has four ways to modify the original samples: synonym replacement, random insertion, random sampling, and random deletion. Among them, synonym replacement randomly selects several uninterrupted words in the sentence and replaces them with synonyms of these words. This method can increase the diversity of text without changing the meaning of the sentence. Random insertion randomly selects a word in the sentence and finds its synonyms, and then inserts the synonyms into random positions in the sentence. This process can be repeated several times to further increase the changes in the text. Random sampling is to randomly select two words in a sentence and exchange their positions. This operation can increase the diversity of word order while keeping the basic structure and meaning of the sentence unchanged. Random deletion randomly deletes words in the sentence with a certain probability, which can simulate the situation of partial missing words and enhance the robustness of the model to incomplete input.

[0029] Text back-translation is to translate the source language into an intermediate language, and then translate the intermediate language back to the source language. This method can enrich the number of samples while retaining the semantic features of the data. In the embodiment, the original engineering inspection daily data set was back-translated twice. The first back-translation selected English as the intermediate language to back-translate all the original samples. In order to further increase the number of very small data sets, the embodiment also uses the same method for such data sets, using French as the intermediate language and back-translating again.

[0030] In some embodiments of the present invention, several sub-datasets are constructed according to the enhanced data set, including: Repeatable stratified sampling is performed on the enhanced dataset to obtain several sub-datasets.

[0031] Specifically, in order to train multiple risk level classification sub-models separately, the enhanced data set needs to be divided into multiple sub-data sets, but considering that the sample size of the original data set is too small, although the enhanced enhanced data set has enriched the sample size to a certain extent, the total sample size is still small. In this regard, the embodiment adopts a stratified repeatable sampling method, through stratified sampling and allowing multiple repeated sample selections, to obtain several different sub-data sets from the enhanced data set, and divide the training set, test set and validation set according to a preset ratio for the training of each risk level classification sub-model.

[0032] In some embodiments of the present invention, Figure 2 FIG. 1 is a flow chart of iterative training according to an embodiment of the present invention. Figure 2 As shown, the sub-datasets are input into each initial risk level classification sub-model for iterative training, including: S201, performing data segmentation preprocessing on each sub-data set to obtain preprocessed data; S202, inputting the preprocessed data into each initial risk level classification sub-model respectively, and sequentially performing multi-dimensional embedding processing, multi-head self-attention extraction, feature encoding, residual connection and layer normalization on the preprocessed data to obtain feature encoding output; S203, performing random discard processing and classification prediction on the feature coding output to obtain classification prediction results of each initial risk level classification sub-model; S204. Determine the predicted loss of each initial risk level classification sub-model according to the classification prediction result and the sub-dataset, and iteratively train each initial risk level classification sub-model according to the predicted loss until the loss no longer decreases.

[0033] In some embodiments of the present invention, the multi-dimensional embedding process includes word embedding, paragraph embedding and position embedding.

[0034] Specifically, during the iterative training of each initial risk level classification sub-model, the embodiment first performs data segmentation preprocessing on the sub-dataset to obtain preprocessed data. During the segmentation preprocessing process, the embodiment performs segmentation on the text data, divides the text into multiple smaller text sequence units, and ensures that the text sequence lengths are the same, and the insufficient parts are filled with special tags. Then, a start tag and an end tag are added to the beginning and end positions of each text sequence unit to separate the individual text sequence units. The embodiment then converts each text sequence unit into digital text data that can be understood by the model through dictionary conversion, and marks the text type to distinguish different sentences or paragraphs, and then fills in special tags to mark them to indicate which digital text data are actual data and which are data filled to achieve a fixed length.

[0035] Then, the embodiment inputs the preprocessed data into the initial risk level classification sub-model, and sequentially performs multi-dimensional embedding processing, multi-head self-attention extraction, position feedforward processing, residual connection and layer normalization to obtain feature encoding output.

[0036] Among them, multi-dimensional embedding processing includes three methods: word embedding, paragraph embedding and position embedding. The embodiment embeds the pre-processed data into the feature space from the three dimensions of word, paragraph and text position to facilitate model processing, and combines the three parts as the input of the Transformer layer in the next step.

[0037] In each Transformer layer, the embodiment first extracts attention to features through multi-head self-attention. The multi-head self-attention mechanism allows the model to consider other words in the sentence when processing each word, so as to capture the contextual relationship between words. , the self-attention mechanism formula is expressed as:

[0038] in, is the query vector and key vector The dot product between represents the dimension of the key vector, the dot product is scaled to , to prevent the values ​​from becoming very large, thus pushing the softmax value into a region that could result in very small gradients.

[0039] The multi-head self-attention mechanism concatenates the outputs of all heads after attention extraction, and then uses a linear transformation as the output of the module. The formula is expressed as:

[0040]

[0041] in, It is the linear transformation matrix of the multi-head attention output, which is used to transform the outputs of all heads after concatenating them. , and The linear transformation matrices representing the query, key, and value, respectively, are used to transform the output into , and .

[0042] Then the feature encoding processing part first inputs the output of the multi-head self-attention layer into the position feedforward network. There is a position feedforward network after the multi-head self-attention layer in each Transformer layer. This network processes the representation of each position independently. The position feedforward network consists of two linear layers with a ReLU activation function in the middle. represents the input of this sublayer, then the output The formula is:

[0043] in, and represents the weights of the two linear layers, and represents the bias of the two linear layers.

[0044] Then, the embodiment passes the output of each sub-layer through the self-attention and feed-forward network through a residual connection, and then performs layer normalization. The residual connection helps to avoid the gradient vanishing problem in deep networks, and the output of the layer normalization is the feature encoding output of the model feature encoding part. The residual connection can be expressed as:

[0045] in, represents the input signal, Represents the output of the sublayer. Embodiment This form of residual connection can make it easier for the network to learn the identity mapping and help solve the gradient disappearance or gradient explosion problem.

[0046] Layer normalization can be formulated as:

[0047] in, is the input vector, is the mean of the input vector, is the standard deviation of the input vector, and are learnable parameters used to scale and offset the normalized values. This formula applies to the input vector Mean normalization and standard deviation normalization are performed, and learnable parameters are introduced so that the model can learn normalization rules suitable for the current task.

[0048] Then, in order to prevent overfitting, the embodiment processes the feature encoding output by inputting it into a dropout layer, and the dropout layer reduces overfitting by randomly "discarding" the output of some neurons.

[0049] The features output by the dropout layer are then input into the classification head to obtain the prediction results of a single sub-model. The classification head includes a fully connected layer and a softmax activation function. The fully connected layer is used to map the features to the final classification label. The formula is:

[0050] in, is the weight matrix, is the bias vector, is the input vector, is the output vector.

[0051] Then the output of the fully connected layer is converted into a probability distribution through the softmax activation function to obtain the prediction result of a single sub-model. , the softmax function converts it into a probability distribution , where each element The calculation formula is expressed as:

[0052] in, express The denominator is the sum of all exponential values, ensuring The sum of all elements of is 1, and the value of each element is between 0 and 1.

[0053] The final embodiment iteratively trains the model based on the obtained prediction output and actual classification labels.

[0054] In some embodiments of the present invention, Figure 3 FIG. 1 is a flow chart of determining the prediction loss iterative training process according to an embodiment of the present invention. Figure 3 As shown, the predicted loss of each initial risk level classification sub-model is determined according to the classification prediction results and the sub-dataset, and each initial risk level classification sub-model is iteratively optimized according to the predicted loss until the loss no longer decreases, including: S301, performing loss calculation on the classification prediction results and the sub-datasets based on the focused loss function to obtain the predicted loss of each initial risk level classification sub-model; S302, iteratively training each initial risk level classification sub-model according to the predicted loss and based on the learning rate time decay strategy until the loss no longer decreases.

[0055] Specifically, in the process of calculating the prediction loss, in order to reduce the contribution of easy-to-classify samples, that is, samples with high classification confidence, to the loss, and make the model pay more attention to samples that are difficult to classify or misclassified, the embodiment uses a focused loss function Instead of the cross entropy loss, the formula is as follows:

[0056] in, is the model’s predicted probability for the correct category, is a balance parameter used to balance the weights of positive and negative samples. is a tuning parameter used to reduce the loss contribution of easy-to-classify samples.

[0057] Example by This item can be found in When it is close to 1, that is, when the model is very confident in the classification of the sample, the loss is significantly reduced, so that the model pays more attention to samples that are difficult to classify or predicted incorrectly. , which can effectively balance the contribution of positive and negative samples in the loss function, thereby alleviating the problem of class imbalance.

[0058] Then, in the process of iteratively optimizing the model, the embodiment adopts a learning rate time decay strategy, that is, the learning rate decreases at a certain rate with each training round. In this way, the embodiment sets a larger learning rate at the beginning, so that the model can quickly approach the optimal solution in the early stage of training, gradually reduce the learning rate during the process, and finally fine-tune near the optimal solution in the late stage of training to avoid oscillation near the optimal solution and failure to converge due to excessive learning rate.

[0059] In some embodiments of the present invention, Figure 4 FIG. 1 is a flow chart of the comprehensive prediction output of an embodiment of the present invention, such as Figure 4 As shown in the figure, the daily inspection reports of the project to be predicted are input into each fully trained risk level classification sub-model to obtain several prediction outputs. The risk level classification results are obtained by integrating the prediction outputs, including: S401, input the obtained daily inspection data of the project to be predicted into each fully trained risk level classification sub-model to obtain a number of prediction outputs; S402. Count the number of prediction outputs for each risk level in the prediction output, and take the risk level with the highest number of prediction outputs as the risk level classification result.

[0060] Specifically, after completing the training of each risk level classification sub-model, when using each sub-model to classify the daily risk level of the engineering inspection, the embodiment uses each sub-model to perform predictions separately to obtain multiple prediction results, and then uses the risk level that appears most times in the prediction results as the risk level classification result of this daily risk level classification task of the engineering inspection.

[0061] The embodiment uses a method of synchronously predicting multiple sub-models and combining multiple prediction results to determine the classification result, which can avoid the problem of inaccurate prediction results caused by overfitting of a single model due to too small a data set, effectively improve the generalization ability of the model, and solve the data imbalance problem in the data set.

[0062] In addition, in order to verify the effectiveness of this solution, the embodiment also tests the model performance, and the performance standard evaluation indicators include precision, recall rate and F1 statistic.

[0063] The evaluation results of each classification task can be expressed as , which means the true label of the sample is , the model predicts it as The number of Indicates the true label of the sample, which is divided into four risk levels: A no warning, B yellow warning, C orange warning and D red warning. Indicates the prediction label of the model, which is divided into four risk levels: I (no warning), II (yellow warning), III (orange warning), and IV (red warning). Indicates the number of samples whose true label is yellow warning and the model predicts it as red warning.

[0064] The calculation formula for accuracy is:

[0065] The calculation formula for recall is:

[0066] The F1 statistic is the harmonic mean of recall and precision, and is calculated as:

[0067] where, for any given model and any given single label (e.g., DI), true positives (TP) are the number of paragraphs correctly classified as DI, false positives (FP) are the number of paragraphs incorrectly classified as DI, and false negatives (FN) are the number of paragraphs incorrectly classified as non-DI.

[0068] In summary, in order to enhance the generalization ability of the model and improve the accuracy of prediction and classification, the engineering inspection daily risk level classification method provided by the present invention first performs data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and constructs several sub-data sets based on the enhanced data set; then constructs several initial risk level classification sub-models corresponding to the number of sub-data sets, and inputs the sub-data sets into each initial risk level classification sub-model for iterative training to obtain several fully trained risk level classification sub-models; finally, the acquired engineering inspection daily report to be predicted is input into each fully trained risk level classification sub-model to obtain several prediction outputs, and the risk level classification results are obtained by integrating the prediction outputs. The present invention trains multiple risk level classification sub-models separately through an integrated strategy, and integrates multiple risk level classification sub-models to classify the risk level of the engineering inspection daily report, which effectively enhances the generalization ability of the model and improves the accuracy of prediction and classification.

[0069] In order to better implement the engineering inspection daily risk level classification method in the embodiment of the present invention, based on the engineering inspection daily risk level classification method, correspondingly, Figure 5 As shown, the present invention also provides a device for classifying the risk level of daily project inspection reports, the device for classifying the risk level of daily project inspection reports 500, comprising: The data preprocessing unit 501 is used to perform data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and construct a plurality of sub-data sets according to the enhanced data set; The model training unit 502 is used to construct a number of initial risk level classification sub-models corresponding to the number of sub-data sets, and input the sub-data sets into each initial risk level classification sub-model for iterative training to obtain a number of fully trained risk level classification sub-models; The prediction output unit 503 is used to input the obtained daily inspection reports of the engineering project to be predicted into each fully trained risk level classification sub-model to obtain a number of prediction outputs, and to obtain a risk level classification result by integrating the prediction outputs.

[0070] The engineering inspection daily risk level classification device 500 provided in the above embodiment can implement the technical solution described in the above engineering inspection daily risk level classification method embodiment. The specific implementation principles of the above modules or units can refer to the corresponding contents in the above engineering inspection daily risk level classification method embodiment, which will not be repeated here.

[0071] like Figure 6 As shown, the present invention also provides an electronic device 600. The electronic device 600 includes a processor 601, a memory 602 and a display 603. Figure 6 Only some components of the electronic device 600 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0072] In some embodiments, the processor 601 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run program codes or process data stored in the memory 602, such as the engineering inspection daily risk level classification method of the present invention.

[0073] In some embodiments, the processor 601 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 601 may be local or remote. In some embodiments, the processor 601 may be implemented in a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.

[0074] In some embodiments, the memory 602 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 602 may also be an external storage device of the electronic device 600, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the electronic device 600.

[0075] Furthermore, the memory 602 may include both an internal storage unit of the electronic device 600 and an external storage device. The memory 602 is used to store application software installed in the electronic device 600 and various data.

[0076] In some embodiments, the display 603 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 603 is used to display information of the electronic device 600 and to display a visual user interface. The components 601-603 of the electronic device 600 communicate with each other through a system bus.

[0077] In one embodiment, when the processor 601 executes the engineering inspection daily risk level classification program in the memory 602, the following steps may be implemented: The acquired multi-source IoT data is standardized to obtain standardized data, the standardized data is multi-level stored to obtain storage data, and a multi-dimensional bitmap index of the storage data is constructed based on a bitmap index strategy; The query condition is determined according to the obtained aggregation query request, the query condition and the multi-dimensional bitmap index are subjected to index analysis and matching to obtain matching data, and parallel aggregation calculation is performed on the matching data to obtain the aggregation calculation result.

[0078] It should be understood that: when the processor 601 executes the engineering inspection daily risk level classification program in the memory 602, in addition to the above functions, other functions can also be implemented. For details, please refer to the description of the corresponding method embodiment above.

[0079] Furthermore, the embodiment of the present invention does not specifically limit the type of the electronic device 600 mentioned, and the electronic device 600 may be a portable electronic device such as a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of portable electronic devices include but are not limited to portable electronic devices equipped with IOS, Android, Microsoft or other operating systems. The above-mentioned portable electronic devices may also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, the electronic device 600 may not be a portable electronic device, but a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0080] Accordingly, an embodiment of the present application also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, it can implement the steps or functions in the engineering inspection daily risk level classification method provided in the above-mentioned method embodiments.

[0081] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0082] The above is a detailed introduction to the engineering inspection daily risk level classification method, device, electronic device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and scope of application. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for classifying the risk level of daily project inspection reports, characterized in that: include: Performing data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and constructing several sub-data sets based on the enhanced data set; Constructing a number of initial risk level classification sub-models corresponding to the number of the sub-datasets, inputting the sub-datasets into each initial risk level classification sub-model for iterative training, and obtaining a number of fully trained risk level classification sub-models; The obtained daily inspection reports of the project to be predicted are input into each of the fully trained risk level classification sub-models to obtain a number of prediction outputs, and the risk level classification results are obtained by combining the prediction outputs.

2. The method for classifying the risk levels of daily project inspection reports according to claim 1 is characterized in that: The data enhancement of the acquired engineering inspection daily data set to obtain an enhanced data set includes: Simple data enhancement and text back translation are performed on the engineering inspection daily report dataset to obtain an enhanced dataset.

3. The method for classifying the risk levels of daily project inspection reports according to claim 1 is characterized in that: The step of constructing a plurality of sub-datasets according to the enhanced data set includes: Repeatable stratified sampling is performed on the enhanced data set to obtain a plurality of sub-data sets.

4. The method for classifying the risk levels of daily project inspection reports according to claim 1 is characterized in that: The step of inputting the sub-datasets into each initial risk level classification sub-model for iterative training comprises: Performing data segmentation preprocessing on each of the sub-data sets to obtain preprocessed data; The preprocessed data are respectively input into each initial risk level classification sub-model, and the preprocessed data are sequentially subjected to multi-dimensional embedding processing, multi-head self-attention extraction, position feedforward processing, residual connection and layer normalization to obtain feature encoding output; Performing random discarding and classification prediction on the feature coding output to obtain classification prediction results of each initial risk level classification sub-model; The predicted loss of each of the initial risk level classification sub-models is determined according to the classification prediction result and the sub-dataset, and each of the initial risk level classification sub-models is iteratively trained according to the predicted loss until the loss no longer decreases.

5. The method for classifying the risk levels of daily project inspection reports according to claim 4 is characterized in that: The multi-dimensional embedding process includes word embedding, paragraph embedding and position embedding.

6. The method for classifying the risk levels of daily project inspection reports according to claim 4 is characterized in that: Determining the predicted loss of each of the initial risk level classification sub-models according to the classification prediction result and the sub-dataset, and iteratively optimizing each of the initial risk level classification sub-models according to the predicted loss until the loss no longer decreases, includes: Performing loss calculation on the classification prediction result and the sub-dataset based on a focused loss function to obtain a predicted loss for each of the initial risk level classification sub-models; Each of the initial risk level classification sub-models is iteratively trained according to the predicted loss and based on a learning rate time decay strategy until the loss no longer decreases.

7. The method for classifying the risk levels of daily project inspection reports according to claim 1 is characterized in that: The daily inspection reports of the project to be predicted are input into each of the fully trained risk level classification sub-models to obtain a number of prediction outputs, and the risk level classification results are obtained by combining the prediction outputs, including: Input the obtained daily inspection reports of the engineering project to be predicted into each of the fully trained risk level classification sub-models to obtain a number of prediction outputs; The number of prediction outputs of each risk level in the prediction output is counted, and the risk level with the highest number of prediction outputs is taken as the risk level classification result.

8. A risk level classification device for daily project inspection, characterized in that: include: A data preprocessing unit, used for performing data enhancement on the acquired engineering inspection daily data set to obtain an enhanced data set, and constructing a plurality of sub-data sets according to the enhanced data set; A model training unit is used to construct a number of initial risk level classification sub-models corresponding to the number of the sub-datasets, and input the sub-datasets into each initial risk level classification sub-model for iterative training to obtain a number of fully trained risk level classification sub-models; The prediction output unit is used to input the obtained daily inspection reports of the engineering project to be predicted into each of the fully trained risk level classification sub-models to obtain a number of prediction outputs, and to obtain the risk level classification results by integrating the prediction outputs.

9. An electronic device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is coupled to the memory and is used to execute a computer program to implement the steps in the method for classifying the daily risk levels of engineering inspections as described in any one of claims 1 to 7.

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 in the method for classifying the risk level of daily project inspection reports described in any one of claims 1 to 7 are implemented.