Method for determining a risk classification model, method and device for identifying a security risk

By segmenting and labeling construction plans, constructing labeled datasets, and training risk classification models, the problems of low accuracy and low efficiency in safety risk identification of construction plans in existing technologies are solved, and automated safety risk identification is achieved.

CN115187058BActive Publication Date: 2026-05-15GLODON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GLODON CO LTD
Filing Date
2022-07-08
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, the identification of safety risks in construction plans relies on manual identification, which suffers from low accuracy and low efficiency, and is dependent on the experience of engineering personnel.

Method used

By acquiring construction plans and safety risk information, the construction plans are segmented and labeled using a risk classification model. A labeled dataset is then constructed and the risk classification model is trained to achieve automatic identification of safety risks in the construction plans.

Benefits of technology

It improves the efficiency and accuracy of safety risk identification in construction plans, reduces reliance on the experience of engineering personnel, and achieves automated risk identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115187058B_ABST
    Figure CN115187058B_ABST
Patent Text Reader

Abstract

The application provides a risk classification model determination method, a method and device for identifying safety risks. The risk classification model determination method comprises: obtaining safety risk information and a construction scheme, wherein the safety risk information comprises risk codes and risk texts; segmenting the construction scheme to obtain a plurality of scheme unit texts; labeling risk codes for the scheme unit texts according to the similarity between the scheme unit texts and the risk texts; constructing a labeled data set by using the scheme unit texts and the labeled risk codes; and training a risk classification model through the labeled data set. Through the application, the accuracy and efficiency of identifying safety risks from construction schemes can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method for determining a risk classification model, a method for identifying security risks, and an apparatus. Background Technology

[0002] Safety in production is the top priority for any manufacturing enterprise. Adhering to the principle of "safety first" and ensuring safe production are fundamental principles that construction companies must follow. The key to safe production lies in preventing safety risks, and identifying these risks from the construction plan is the first line of defense. Currently, safety risk identification in construction plans primarily relies on manual methods. Risk identification personnel thoroughly review the construction plan to identify potential safety risks.

[0003] This method of identifying safety risks requires engineers with extensive engineering experience. If engineers do not have a comprehensive understanding of the construction plan, risks may be overlooked, resulting in low accuracy. Furthermore, engineers have limited time and energy, making manual identification inefficient.

[0004] Therefore, improving the accuracy and efficiency of identifying safety risks from construction plans has become a pressing technical problem that needs to be solved in this field. Summary of the Invention

[0005] The purpose of this invention is to provide a method for determining a risk classification model, a method and apparatus for identifying security risks, and to solve the technical problems in the prior art.

[0006] On the one hand, in order to achieve the above objectives, the present invention provides a method for determining a risk classification model.

[0007] The method for determining the risk classification model includes: acquiring safety risk information and construction plans, wherein the safety risk information includes risk codes and risk texts; segmenting the construction plan to obtain several plan unit texts; labeling the plan unit texts with risk codes based on the similarity between the plan unit texts and the risk texts; constructing a labeled dataset using the plan unit texts and the labeled risk codes; and training the risk classification model using the labeled dataset.

[0008] Further, the step of labeling the scheme unit text with risk codes based on the similarity between the scheme unit text and the risk text includes: converting the scheme unit text into a scheme unit vector and the risk text into a risk vector; calculating the similarity between the scheme unit vector and the risk vector; determining the risk vector with the highest similarity to the scheme unit vector; labeling the risk code corresponding to the risk vector with the highest similarity as a pre-labeled risk of the scheme unit vector, and labeling the highest similarity as a pre-labeled similarity of the scheme unit vector; for each risk code, determining the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity among the scheme unit vectors used as the pre-labeled risks; and labeling the scheme unit text converted into the target scheme unit vector with risk codes based on the pre-labeled risks.

[0009] Further, the step of determining the risk vector with the highest similarity to the scheme unit vector includes: searching for scheme unit vectors whose similarity to the risk vector satisfies a first preset condition to obtain a first scheme vector set; deleting scheme unit vectors that are the same as the risk vector from the first scheme vector set to obtain a second scheme vector set; and traversing the second scheme vector set to determine the risk vector with the highest similarity to each scheme unit vector.

[0010] Further, for each risk code, the step of determining the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity among the scheme unit vectors used as the pre-labeled risk includes: for each risk code, searching among the scheme unit vectors used as the pre-labeled risk for scheme unit vectors whose pre-labeled similarity satisfies a second preset condition to obtain a second scheme unit vector, wherein the second scheme unit vector is obtained by converting a second scheme unit text; verifying whether the second scheme unit text matches the risk text corresponding to the pre-labeled risk; and when the second scheme unit text matches the risk text corresponding to the pre-labeled risk, the second scheme unit vector is the target scheme unit vector of the risk code.

[0011] Furthermore, the step of labeling the solution unit text with risk codes based on the similarity between the solution unit text and the risk text further includes: when the second solution unit text does not match the risk text corresponding to the pre-labeled risk, inputting the risk code of the second solution unit text.

[0012] Further, the step of training a risk classification model using the labeled dataset includes: dividing the labeled dataset into K subsets, where K is a natural number greater than 1; selecting K-1 subsets as training datasets and the other subset as test datasets, resulting in K pairs of different training-test datasets; training the model using each pair of training-test datasets to obtain K cross-risk classification models; summarizing the prediction error samples of the K cross-risk classification models on the test dataset to obtain a cross-validation hard case set; verifying whether each scheme unit text in the cross-validation hard case set matches the risk text corresponding to its risk code; when the scheme unit text does not match the risk text corresponding to its risk code, correcting the risk code of the scheme unit text to obtain a first updated labeled dataset; and training the risk classification model using the first updated labeled dataset.

[0013] Further, the steps of training a risk classification model using the labeled dataset include: dividing the labeled dataset into K data subsets, where K is a natural number greater than 1; selecting K-1 of the data subsets as training datasets and the other data subset as test datasets, resulting in K pairs of different training-test datasets; training the model using each pair of training-test datasets to obtain K cross-risk classification models; statistically analyzing the test data volume and accuracy corresponding to each risk code on the K test datasets; filtering risk codes where the test data volume is less than a preset data volume or the accuracy is lower than a preset accuracy to obtain iterative risk codes; using the scheme unit text corresponding to the iterative risk code in the labeled dataset as the risk text, re-labeling the scheme unit text to obtain a second updated labeled dataset; and training the risk classification model using the second updated labeled dataset.

[0014] Furthermore, the step of training the risk classification model using the labeled dataset includes: using the scheme unit text and keywords in the labeled dataset as input vectors, and using the risk codes labeled in the scheme unit text as output vectors to train the Roformer classification model to obtain the risk classification model.

[0015] On the other hand, in order to achieve the above objectives, the present invention provides a method for identifying safety risks from construction plans.

[0016] The method for identifying safety risks from construction plans includes: segmenting the construction plan to be identified to obtain several unit texts of the plan to be identified; using the unit texts of the plan to be identified to construct the input vector of a pre-trained risk classification model, and obtaining the risk prediction result of the risk classification model for the unit texts of the plan to be identified, wherein the risk classification model is determined using any risk classification model determination method provided by the present invention.

[0017] Furthermore, the method for identifying safety risks from construction plans also includes: using a pre-trained construction plan classification model to determine the engineering classification of the construction plan to be identified; determining the risk code set corresponding to the construction plan based on the engineering classification of the construction plan to be identified and a pre-set engineering classification-risk correspondence; and determining the accuracy of the risk code prediction of the unit text of the construction plan to be identified when the risk prediction result is that the risk code of the unit text of the construction plan to be identified belongs to the risk code set.

[0018] On the other hand, in order to achieve the above objectives, the present invention provides a device for determining a risk classification model.

[0019] The device for determining the risk classification model includes: an acquisition module for acquiring safety risk information and construction plans, wherein the safety risk information includes risk codes and risk texts; a segmentation module for segmenting the construction plans to obtain several plan unit texts; an annotation module for annotating the plan unit texts with risk codes based on the similarity between the plan unit texts and the risk texts; a construction module for constructing an annotated dataset using the plan unit texts and the annotated risk codes; and a training module for training the risk classification model using the annotated dataset.

[0020] On the other hand, in order to achieve the above objectives, the present invention provides a device for identifying safety risks from construction plans.

[0021] The device for identifying safety risks from construction plans includes: a segmentation module for segmenting the construction plan to be identified into several unit texts of the plan to be identified; and a processing module for using the unit texts of the plan to be identified to construct the input vector of a pre-trained risk classification model and obtain the risk prediction result of the risk classification model for the unit texts of the plan to be identified, wherein the risk classification model is determined using any risk classification model determination method provided by the present invention.

[0022] In another aspect, to achieve the above objectives, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above method.

[0023] In another aspect, to achieve the above objectives, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method.

[0024] The present invention provides a method and apparatus for determining a risk classification model and identifying safety risks. First, a construction plan is acquired and segmented to obtain several plan unit texts. Simultaneously, safety risk information is acquired, including risk codes for identifying safety risks and risk texts describing the safety risks and corresponding countermeasures. Then, based on the similarity between the plan unit texts and the risk texts, the risk codes corresponding to the plan unit texts are found, i.e., the safety risks associated with the construction activities corresponding to the plan unit texts are identified and labeled. Finally, a labeled dataset is constructed using the plan unit texts and the labeled risk codes to train a risk classification model. In practical applications, the construction plan to be identified can be segmented to obtain plan unit texts, and an input vector can be constructed and input into the risk classification model. The risk classification model outputs the risk identification result corresponding to the plan unit text. Through this invention, a risk classification model for identifying safety risks in construction plans can be trained using a labeled dataset, thereby achieving automatic identification of safety risks in construction plans. This improves the efficiency of identifying safety risks from construction plans and, without relying on human experience, enhances the accuracy of identification. Attached Figure Description

[0025] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0026] Figure 1 A flowchart illustrating the method for determining a risk classification model provided in Embodiment 1 of the present invention;

[0027] Figure 2 This is a flowchart of a method for identifying safety risks from a construction plan, provided in Embodiment 2 of the present invention.

[0028] Figure 3 This is a flowchart of a method for identifying safety risks from a construction plan, provided in Embodiment 3 of the present invention.

[0029] Figure 4 This is a data processing diagram illustrating the method for identifying safety risks from a construction plan as provided in Embodiment 3 of the present invention.

[0030] Figure 5 This is a block diagram of the device for determining the risk classification model provided in Embodiment 4 of the present invention;

[0031] Figure 6 This is a block diagram of the device for identifying safety risks from construction plans provided in Embodiment 5 of the present invention;

[0032] Figure 7 This is a hardware structure diagram of a computer device provided in Embodiment Six of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0034] Example 1

[0035] This invention provides a method for determining a risk classification model. Through this method, a risk classification model can be trained to identify risks in construction plans, thereby improving the accuracy and efficiency of identifying safety risks from construction plans. Figure 1 The flowchart is as follows: This is a method for determining a risk classification model provided in Embodiment 1 of the present invention. Figure 1 As shown, specifically, the method for determining the risk classification model provided in this embodiment includes the following steps S101 to S105.

[0036] Step S101: Obtain safety risk information and construction plan.

[0037] Specifically, for various engineering categories, such as scaffolding engineering, high-altitude engineering, and foundation pit engineering, the potential safety risks and construction plans belonging to each engineering category are collected and obtained. Each safety risk is identified by a risk code to form safety risk information. This safety risk information includes a risk code and a risk text. The risk code can be composed of a combination of numbers, letters, and symbols, and the risk text includes a risk description and a response text.

[0038] Optionally, a security risk database can be established to store security risk information. Each piece of security risk information may include fields such as risk code, risk text, and project classification. In this step, the security risk database can be read to obtain the security risk information.

[0039] Optionally, a construction plan library can be established to store construction plans. Each construction plan can include fields such as plan name, plan text, and project category. In this step, the construction plan library can be read to obtain the construction plan.

[0040] Step S102: Divide the construction plan to obtain several plan unit texts.

[0041] In this step, the construction plan is segmented. Specifically, it can be segmented according to a certain amount of data, or it can be segmented according to the text structure, such as by sections or paragraphs, so that the corresponding unit text of the plan is the section text or the paragraph text.

[0042] Optionally, the construction plan can be segmented into individual sentences using line breaks and periods to obtain the individual sentence text. After segmenting the construction plans in the construction plan library, a single-sentence construction plan library can be generated.

[0043] Step S103: Based on the similarity between the solution unit text and the risk text, label the solution unit text with risk codes.

[0044] In this step, the risk code that matches the solution unit text is found by the similarity between the solution unit text and the risk text, and the solution unit text is labeled using the matching risk code.

[0045] Step S104: Construct a labeled dataset using the scheme unit text and the labeled risk codes.

[0046] In this step, the solution unit text and its associated risk code are used as annotation samples to construct an annotation dataset. The annotation dataset includes multiple annotation samples, each containing two fields: solution unit text and risk code.

[0047] Step S105: Train a risk classification model using a labeled dataset.

[0048] Specifically, labeled samples are used to construct the input vectors required for model training, and risk codes are used to construct the output vectors required for model training. After selecting an initial model, the constructed input vectors are used as the input to the initial model, and the constructed output vectors are used as the output of the initial model. The initial model is then trained to obtain a risk classification model. This risk classification model can predict or identify the safety risks present in the unit text of a construction plan. In practical applications, the construction plan to be identified can be segmented to obtain the unit text of the plan, and then the input vector is constructed and input into the risk classification model. The risk classification model outputs the risk identification result corresponding to the unit text of the plan. For example, the risk classification model outputs the probability that the unit text of the plan belongs to various risk codes. When the probability of belonging to a certain risk code is greater than or equal to a preset threshold, the unit text of the plan belongs to that risk code, that is, the construction behavior corresponding to the unit text of the plan has the safety risk identified by that risk code. When the probability of belonging to each risk code is less than the preset threshold, the unit text of the plan does not belong to any risk code, that is, the construction behavior corresponding to the unit text of the plan does not have any safety risk, thus achieving the purpose of automatically identifying the safety risks present in the construction plan.

[0049] In the risk classification model determination method provided in this embodiment, the construction plan is first acquired and segmented to obtain several plan unit texts included in the construction plan. Simultaneously, safety risk information is acquired, including risk codes used to identify safety risks, as well as risk texts describing the safety risks and corresponding countermeasures. Then, based on the similarity between the plan unit texts and the risk texts, the risk codes corresponding to the plan unit texts are found, i.e., the safety risks present in the construction behavior corresponding to the plan unit texts are identified. The plan unit texts are then labeled. Finally, a labeled dataset is constructed using the plan unit texts and the labeled risk codes to train the risk classification model. Using the risk classification model determination method provided in this embodiment, a risk classification model for identifying safety risks in construction plans can be trained using a labeled dataset, thereby achieving automatic identification of safety risks in construction plans. This improves the efficiency of identifying safety risks from construction plans and, without relying on human experience, enhances the accuracy of identification.

[0050] Optionally, in one embodiment, the step of labeling risk codes for solution unit text based on the similarity between solution unit text and risk text includes: converting solution unit text into solution unit vectors and risk text into risk vectors; calculating the similarity between solution unit vectors and risk vectors; determining the risk vector with the highest similarity to the solution unit vector; labeling the risk code corresponding to the risk vector with the highest similarity as a pre-labeled risk of the solution unit vector, and labeling the highest similarity as a pre-labeled similarity of the solution unit vector; for each risk code, determining the target solution unit vector of the risk code based on the magnitude of the pre-labeled similarity among the solution unit vectors used as pre-labeled risks; and labeling risk codes for solution unit text converted into target solution unit vectors based on the pre-labeled risks.

[0051] Specifically, when annotating the unit text of a solution, the text is first converted into a vector. Optionally, the Roformer-sim model is used to convert the unit text of a solution into a unit vector and the risk text into a risk vector. After conversion into vectors, the similarity between each unit vector of a solution and each risk vector is calculated. Specifically, existing vector similarity calculation methods can be used for calculation. Optionally, the cosine similarity calculation method can be used to calculate the similarity between unit vectors of solutions and risk vectors.

[0052] All scheme unit vectors are used to construct a scheme unit vector library, and all risk vectors are used to construct a risk vector library. For any scheme unit vector A, the risk vector a with the highest similarity to scheme unit vector A is found in the risk vector library. The risk code a1 corresponding to risk vector a is used as the pre-labeled risk of scheme unit vector A, and the similarity between scheme unit vector A and risk vector a is used as the pre-labeled similarity of scheme unit vector A. Each scheme unit vector has a pre-labeled risk and a pre-labeled similarity.

[0053] For each risk code, several scheme unit vectors are used as pre-labeled risks. For any risk code b, scheme unit vectors B1, B2, B3…BN are used as pre-labeled risks, and the pre-labeled similarities of scheme unit vectors B1, B2, B3…BN are C1, C2, C3…CN respectively. Among the scheme unit vectors B1, B2, B3…BN, according to the magnitude of the pre-labeled similarities C1, C2, C3…CN, one scheme unit vector is selected as the target scheme unit vector B. The target scheme unit vector B is obtained by converting the scheme unit text B'. Then, the risk code b is used to label the scheme unit text B', that is, the scheme unit text B' and the risk code b are used as a labeling sample.

[0054] The method for determining the risk classification model provided in this embodiment converts text into vectors. The similarity between vectors is then calculated to determine the text similarity. First, the risk vector with the highest similarity is found for each scheme unit vector, ensuring that each scheme unit vector matches the risk vector with the highest similarity. However, this does not mean that every scheme unit vector is risky. Then, from all scheme unit vectors that match the risk vector, the target scheme unit vector is selected. For example, the scheme unit vector with the highest similarity is chosen as the target scheme unit vector, or the scheme unit vector with a similarity greater than a certain threshold is chosen as the target scheme unit vector, achieving the final match. Therefore, for the target scheme unit vector, labeling it with the risk code corresponding to the risk vector that matches it helps improve the accuracy of the labeled samples, improves the quality of the labeled dataset, and makes the trained risk classification model more accurate.

[0055] Optionally, in one embodiment, the step of determining the risk vector with the highest similarity to the scheme unit vector includes: searching for scheme unit vectors whose similarity to the risk vector satisfies a first preset condition to obtain a first scheme vector set; deleting scheme unit vectors that are the same as the risk vector from the first scheme vector set to obtain a second scheme vector set; and traversing the second scheme vector set to determine the risk vector with the highest similarity to each scheme unit vector.

[0056] Specifically, when determining the risk vector with the highest similarity to the solution unit vector, the process involves first traversing each risk vector and searching the solution unit vector library for solution unit vectors whose similarity meets certain conditions. For example, searching the solution unit vector library for solution unit vectors whose similarity is greater than a preset similarity threshold, or searching the solution unit vector library for N solution unit vectors with relatively high similarity. The searched solution unit vectors are defined as the first solution vector set. That is, for each risk vector, a first solution vector set will be obtained.

[0057] For each first set of solution vectors, delete the solution unit vectors that are identical to the risk vectors, thus removing redundant solution unit vectors from the first set of solution vectors. This means deleting existing solution unit vectors from the risk vector library within the first set of solution vectors. The remaining solution unit vectors form the second set of solution vectors. Finally, iterate through the second set of solution vectors to determine the risk vector that has the highest similarity to each solution unit vector in the second set of solution vectors.

[0058] In the risk classification model determination method provided in this embodiment, when determining the risk vector with the highest similarity to the scheme unit vector, firstly, for each risk vector in the risk vector library, search in the scheme unit vector library for which scheme unit vectors have a similarity that meets a first preset condition, and then deduplicate the search results by removing scheme unit vectors that are identical to the risk vector. For the remaining scheme unit vectors, the risk vector with the highest similarity is then determined. The risk classification model determination method provided in this embodiment improves the effectiveness of labeled samples, reduces invalid samples in the labeled dataset, and makes the generalization ability of the trained risk classification model better.

[0059] Optionally, in one embodiment, for each risk code, the step of determining the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity among the scheme unit vectors used as pre-labeled risks includes: for each risk code, searching for scheme unit vectors whose pre-labeled similarity satisfies a second preset condition among the scheme unit vectors used as pre-labeled risks to obtain a second scheme unit vector, wherein the second scheme unit vector is obtained by converting the second scheme unit text; verifying whether the second scheme unit text matches the risk text corresponding to the pre-labeled risk; and when the second scheme unit text matches the risk text corresponding to the pre-labeled risk, the second scheme unit vector is the target scheme unit vector of the risk code.

[0060] Specifically, when determining a target scheme unit vector for a risk encoding, among all scheme unit vectors that use this risk encoding as pre-labeled risk, scheme unit vectors with high pre-labeled similarity are identified according to preset conditions such as proportion, threshold, or quantity. The accuracy of these scheme unit vectors and their pre-labeled risks is verified by the corresponding scheme unit text and risk text.

[0061] For example, when determining the target scheme unit vector for risk code X, among all scheme unit vectors that use risk code X as a pre-labeled risk, the five scheme unit vectors Y1-Y5 with the highest pre-labeling similarity are identified. These five scheme unit vectors are defined as the second scheme unit vectors. These five second scheme unit vectors Y1-Y5 are respectively transformed from second scheme unit texts Z1-Z5. The security risk information containing risk code X includes risk text W. For these five second scheme unit vectors Y1-Y5, the scheme unit texts Z1-Z5 are checked to see if they match the risk text W. Specifically, manual verification can be used here. If the verification shows that the second scheme unit text Z1 matches the risk text W, then the second scheme unit vector Y1 is the target scheme unit vector for risk code X.

[0062] The method for determining the risk classification model provided in this embodiment utilizes text verification to further select matching scheme unit texts and risk codes, which helps to further improve the accuracy of labeled samples, thereby further improving the recognition accuracy of the risk classification model.

[0063] Optionally, in one embodiment, the step of labeling the risk code of the solution unit text according to the similarity between the solution unit text and the risk text further includes: when the second solution unit text does not match the risk text corresponding to the pre-labeled risk, inputting the risk code of the second solution unit text.

[0064] Specifically, in the above matching results, if a certain second scheme unit text does not match the risk text corresponding to the pre-labeled risk, it means that the second scheme unit text does not have the risk described by the risk text. In this case, the risk code of this scheme unit text can be manually determined, or there is no security risk.

[0065] The method for determining the risk classification model provided in this embodiment, by adding manual information in cases of mismatch in verification, helps to further improve the accuracy of labeled samples, thereby further improving the identification accuracy of the risk classification model.

[0066] Optionally, in one embodiment, the step of training a risk classification model using a labeled dataset includes: dividing the labeled dataset into K subsets, where K is a natural number greater than 1; selecting K-1 subsets as training datasets and the other subset as test datasets, resulting in K pairs of different training-test datasets; training the model using each pair of training-test datasets to obtain K cross-risk classification models; summarizing the prediction error samples of the K cross-risk classification models on the test dataset to obtain a cross-validation hard case set; verifying whether the unit text of each scheme in the cross-validation hard case set matches the risk text corresponding to its risk code; when the unit text of the scheme does not match the risk text corresponding to its risk code, correcting the risk code of the unit text of the scheme to obtain a first updated labeled dataset; and training the risk classification model using the first updated labeled dataset.

[0067] Specifically, in the step of training the risk classification model using labeled datasets, cross-training is used to validate the labeled samples in the cross-validation hard case set and correct any mismatches, which helps improve the recognition accuracy of the risk classification model.

[0068] Optionally, in one embodiment, the step of training a risk classification model using a labeled dataset includes: dividing the labeled dataset into K subsets, where K is a natural number greater than 1; selecting K-1 subsets as training datasets and the other subset as test datasets, resulting in K pairs of different training-test datasets; training the model using each pair of training-test datasets to obtain K cross-risk classification models; calculating the test data volume and accuracy for each risk code on the K test datasets; filtering risk codes with test data volumes less than a preset data volume or accuracy lower than a preset accuracy to obtain iterative risk codes; using the scheme unit text corresponding to the iterative risk codes in the labeled dataset as risk text, and re-labeling the scheme unit text to obtain a second updated labeled dataset; and training the risk classification model using the second updated labeled dataset.

[0069] Specifically, in the step of training the risk classification model through labeled datasets, cross-training is used for training. The cross-training results are used for statistical analysis to identify risk codes with small sample sizes or low accuracy. The labeled samples of this type of risk code are iteratively expanded to increase the amount of this type of risk code in the standard dataset, which helps to improve the recognition accuracy of the risk classification model.

[0070] Optionally, in one embodiment, the step of training a risk classification model using a labeled dataset includes: using the unit text of the proposed solution and the keywords in the unit text of the proposed solution as input vectors, and using the risk codes labeled in the unit text of the proposed solution as output vectors to train the Roformer classification model to obtain a risk classification model.

[0071] In this embodiment, the Roformer classification model is used as the initial model for training, which is beneficial for processing Chinese natural language text. Furthermore, taking advantage of the Roformer classification model's learning based on characters and their relationships, keywords are extracted from the unit text of the solution to construct the input vector, which helps improve the accuracy of the risk classification model.

[0072] Example 2

[0073] Embodiment 2 of the present invention provides a method for identifying safety risks from construction plans. This method can automatically identify the risks existing in the construction plan, thereby improving the accuracy and efficiency of identifying safety risks from the construction plan. Figure 2 The flowchart of the method for identifying safety risks from construction plans provided in Embodiment 2 of the present invention is as follows: Figure 2 As shown, specifically, the method for identifying safety risks from a construction plan provided in this embodiment includes the following steps S201 to S202.

[0074] Step S201: Segment the construction scheme to be identified to obtain several unit texts of the scheme to be identified.

[0075] For construction plans that require safety risk identification, the first step is to segment the construction plan into several unit texts to be identified. Typically, the construction plan can be segmented into multiple single-sentence texts according to information such as punctuation marks and format, that is, the construction plan can be broken down into multiple sentences.

[0076] Step S202: Construct the input vector of the pre-trained risk classification model using the unit text of the scheme to be identified, and obtain the risk prediction result of the risk classification model for the unit text of the scheme to be identified.

[0077] The risk classification model used in this step can be determined by any of the risk classification model determination methods provided in the above embodiments. The relevant technical features and corresponding technical effects can be referred to in the above embodiments, and will not be repeated here.

[0078] Optionally, multiple unit costs of the proposed solutions are obtained through step S201. For each unit cost of the proposed solution, it is input into a pre-trained risk classification model. The risk classification model outputs the probability of each type of risk code. If the probability of a certain type of risk code is the highest and greater than or equal to a predetermined threshold, then the unit cost of the proposed solution has the security risk identified by that type of risk code, and the unit cost of the proposed solution and the corresponding risk code can be output. If the probability of any risk code is less than the predetermined threshold, then the unit cost of the proposed solution does not have a security risk. After each unit cost of the proposed solution is identified and predicted by the risk classification model, it is possible to identify which unit texts in the proposed solution text have security risks.

[0079] Optionally, in one embodiment, the method for identifying safety risks from a construction plan further includes: using a pre-trained construction plan classification model to determine the engineering classification of the construction plan to be identified; determining the risk code set corresponding to the construction plan based on the engineering classification of the construction plan to be identified and a pre-set engineering classification-risk correspondence; and determining the accuracy of the risk code prediction for the unit text of the construction plan to be identified when the risk prediction result indicates that the risk code prediction for the unit text of the construction plan to be identified belongs to the risk code set.

[0080] Specifically, construction plans under different engineering categories can be collected to form a construction plan library. The library includes fields such as plan name, plan text, and engineering category. This library is used to train a construction plan classification model. Optionally, the HanLP word segmentation tool can be used to segment the construction plans. The segmentation results are used to construct the model's input vector, and the corresponding engineering category is used to construct the output vector. This is then used to train a FastText model, generating a pre-trained construction plan classification model. After obtaining the construction plan to be identified, the trained classification model is used to identify the plan, thus determining its engineering category.

[0081] Optionally, identify potential safety risks under different engineering categories and establish a safety risk database. Fields may include: risk code, engineering category, risk description, and countermeasures. Then, establish a scheme-risk engineering category correspondence table, that is, the engineering category-risk correspondence relationship. The content is which risk codes may be included in the construction scheme of a certain engineering category. The engineering category-risk correspondence relationship may specifically include fields such as scheme engineering category and risk code set.

[0082] After obtaining the project classification of the construction scheme to be identified, the risk code set corresponding to the project classification to which the construction scheme to be identified belongs is found through the pre-set project classification-risk correspondence. For the risk code of the identified unit text of the scheme to be identified, it is further determined whether it belongs to the risk code set. If it does, it indicates that the prediction is accurate. At this time, it is determined that the risk code prediction of the unit text of the scheme to be identified is accurate.

[0083] The method for identifying safety risks from construction plans provided in this embodiment is used to further verify the safety risks predicted by the construction plan classification model, thereby improving the accuracy of safety risk identification.

[0084] Example 3

[0085] Embodiment 3 of the present invention provides a method for identifying safety risks from construction plans. Figure 3 This is a flowchart of the method for identifying safety risks from construction plans provided in Embodiment 3 of the present invention. Figure 4 This is a data processing diagram illustrating the method for identifying safety risks from construction plans provided in Embodiment 3 of the present invention, as shown below. Figure 3 and Figure 4 As shown, specifically, the method for identifying safety risks from a construction plan provided in this embodiment includes the following steps S310 to S380.

[0086] S310: Establish a safety risk database and a construction plan database.

[0087] The specific steps are as follows:

[0088] S311: Identify potential safety risks under different project categories and establish a safety risk database. Required fields include: risk code, project category, risk description, and countermeasures.

[0089] S312: Collect construction plans under different project categories to form a construction plan library. The construction plan library includes fields such as plan name, plan text, and project category.

[0090] S313: Establish a scheme-risk engineering classification mapping table, which contains the risk code set of risks that may be included in a scheme of a certain engineering category. The scheme-risk engineering classification mapping table includes fields such as scheme engineering category and risk code set of effective risks.

[0091] S320: Use the construction scheme library to train the construction scheme classification model.

[0092] The specific steps are as follows:

[0093] S321: Use the Hanlp word segmentation tool to segment the construction plan.

[0094] S322: Use the word segmentation results of the scheme and the corresponding project classification to train the Fasttext model and generate a construction scheme classification model.

[0095] S330: Use a similar sentence pre-annotation algorithm to generate a pre-annotated risk single sentence library.

[0096] The specific steps are as follows:

[0097] S331: Divide the construction plans in the construction plan library into single-sentence texts according to line breaks and periods, and generate a single-sentence library of construction plans.

[0098] S332: Using the Roformer-sim model, the single-sentence text of the construction plan in the single-sentence library is converted into single-sentence vectors, generating a single-sentence vector library. The fields include single-sentence text, single-sentence vectors, etc.

[0099] S333: Using the Roformer-sim model, the risk description and response fields in the safety risk inventory library are converted into sentence vectors to generate a pre-annotated risk vector library. The fields include risk sentence text, risk sentence vector, and risk code.

[0100] S334: Use cosine similarity as the similarity between two vectors. Iterate through each risk sentence vector in the pre-labeled risk vector library, and search for the top N solution sentence vectors with the highest similarity to that risk sentence vector in the solution sentence vector library. This results in the search solution sentence set, which is the solution sentence set that includes N solution sentence vectors for each risk sentence vector.

[0101] S335: Remove identical vectors from the pre-labeled risk vector library from the searched scheme sentence set.

[0102] S336: Traverse the searched single-sentence vectors of the scheme, and use the risk code and corresponding similarity of the risk single-sentence vector with the highest similarity as the pre-labeled risk code and pre-labeled similarity of the single-sentence vector of the scheme.

[0103] S337: For each type of pre-labeled risk code, select multiple scheme sentence vectors with the highest pre-labeled similarity according to a certain ratio, arrange them in descending order of similarity, and generate a pre-labeled risk sentence set. This pre-labeled risk sentence set contains multiple scheme sentence texts, pre-labeled risk codes, and pre-labeled similarity fields.

[0104] S340: Manually verify the pre-labeled risk sentence set and update the labeled dataset.

[0105] The specific steps are as follows:

[0106] S341: Manually verify the pre-labeled risk sentence set. If the text of the solution sentence does not match the risk description and countermeasures corresponding to the pre-labeled risk code, the labeled risk code will be changed to another risk code or no risk will be declared.

[0107] S342: Update the previous annotation dataset with the results of manual verification. For the same scheme, the single sentence text shall be based on the results of manual verification. The annotation dataset contains two fields: single sentence text of the annotation scheme and annotation risk code.

[0108] S350: Train a single-sentence risk classification model using a labeled dataset.

[0109] The specific steps are as follows:

[0110] S351: Randomly divide the labeled dataset into K groups, use K-1 groups as training data and the other group as test data, and a total of K pairs of training and test data can be divided.

[0111] S352: Using the Rosemer classification model, train K pairs of training and testing data to generate K cross-sentence risk classification models.

[0112] S353: Summarize the sentence texts of the solutions that were incorrectly predicted on the test set by the K cross-validation sentence models to generate a cross-validation hard example set. This cross-validation hard example set includes fields such as the sentence text of the solution, the labeled risk code, and the predicted risk code.

[0113] S360: Manually verify difficult cross-validation examples and update the labeled dataset.

[0114] The specific steps are as follows:

[0115] S361: Manual cross-validation of difficult cases. If the single sentence text of the solution does not match the labeled risk code, the labeled risk code will be changed to another risk code or no risk.

[0116] S362: Update the previous labeled dataset with the results of manual verification. The single-sentence text of the repeated scheme is based on the results of manual verification. The labeled dataset contains two fields: labeled single-sentence text and labeled risk code.

[0117] S370: Statistical model performance, risk classification labeling data with poor iteration results.

[0118] The specific steps are as follows:

[0119] S371: In statistical cross-validation, the amount of labeled data and prediction accuracy for each risk code.

[0120] S372: If the prediction results of the single-sentence risk classification model are satisfactory, execute S380; otherwise, execute S373.

[0121] S373: Filter out risk codes with insufficient labeled data or low prediction accuracy, and generate an iterative pre-labeled risk code set.

[0122] S374: Use the labeled dataset as corpus, calculate the single sentence vector, and then update the pre-labeled risk vector library.

[0123] S375: Return to step S333 and repeat the similar sentence pre-annotation and subsequent steps. At this time, the pre-annotated risk vector library only contains the risk codes in the iteratively pre-annotated risk code set.

[0124] S380: Integrate the model to generate a risk classification model and identify risks in construction plans.

[0125] The specific steps are as follows:

[0126] S381: After the user uploads the construction plan file to be identified, the Hanlp word segmentation tool is used for word segmentation.

[0127] S382: Use the construction plan classification model to predict the word segmentation results and obtain the user's construction plan project classification.

[0128] S383: Based on the user's construction plan project classification and the corresponding table of plan-risk project classification, obtain the effective risk code set.

[0129] S384: Divide the user's construction plan into individual sentences using line breaks and periods to obtain a list of individual sentences in the user's construction plan.

[0130] S385: Use a risk classification model to predict all single sentences of the construction plan in the user's list of single sentences, select the single sentence text of the plan that is predicted to be a risk code in the effective risk code set and whose prediction probability is greater than a certain threshold (e.g., 0.8), and return the single sentence text of the plan and the risk code to the user.

[0131] The method for identifying safety risks from construction plans provided in this embodiment allows construction personnel to obtain potential safety risks in the construction plan after it has been written and uploaded. This method is fast and highly accurate, and can improve the effectiveness of safety risk management during the construction process.

[0132] Example 4

[0133] Corresponding to Embodiment 1 above, Embodiment 4 of the present invention provides a device for determining a risk classification model. The technical features and corresponding technical effects can be referred to Embodiments 1 to 3 above, and will not be repeated in Embodiment 4. Figure 5 This is a block diagram of the risk classification model determination device provided in Embodiment 4 of the present invention, as shown below. Figure 5 As shown, the device includes: an acquisition module 401, a segmentation module 402, a labeling module 403, a construction module 404, and a training module 405.

[0134] The acquisition module 401 is used to acquire safety risk information and construction plans, wherein the safety risk information includes risk codes and risk texts; the segmentation module 402 is used to segment the construction plan to obtain several plan unit texts and segment the risk texts to obtain several risk texts; the annotation module 403 is used to annotate the plan unit texts with risk codes based on the similarity between the plan unit texts and the risk texts; the construction module 404 is used to construct an annotation dataset using the plan unit texts and the annotated risk codes; and the training module 405 is used to train a risk classification model using the annotation dataset.

[0135] Optionally, in one embodiment, the annotation module 403 includes: a conversion unit for converting the scheme unit text into a scheme unit vector and the risk text into a risk vector; a calculation unit for calculating the similarity between the scheme unit vector and the risk vector; a first determining unit for determining the risk vector with the highest similarity to the scheme unit vector; a first annotation unit for annotating the risk code corresponding to the risk vector with the highest similarity as a pre-annotated risk of the scheme unit vector and annotating the highest similarity as a pre-annotated similarity of the scheme unit vector; a second determining unit for determining the target scheme unit vector of the risk code based on the magnitude of the pre-annotated similarity among the scheme unit vectors used as the pre-annotated risk for each risk code; and a second annotation unit for annotating the scheme unit text converted into the target scheme unit vector with risk codes based on the pre-annotated risks.

[0136] Optionally, in one embodiment, when the first determining unit determines the risk vector with the highest similarity to the scheme unit vector, the specific steps include: searching for scheme unit vectors whose similarity to the risk vector satisfies a first preset condition to obtain a first scheme vector set; deleting scheme unit vectors that are the same as the risk vector from the first scheme vector set to obtain a second scheme vector set; and traversing the second scheme vector set to determine the risk vector with the highest similarity to each scheme unit vector.

[0137] Optionally, in one embodiment, when the second determining unit determines the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity among the scheme unit vectors used as the pre-labeled risk for each risk code, the specific steps include: for each risk code, searching among the scheme unit vectors used as the pre-labeled risk for scheme unit vectors whose pre-labeled similarity satisfies a second preset condition to obtain a second scheme unit vector, wherein the second scheme unit vector is obtained by converting a second scheme unit text; verifying whether the second scheme unit text matches the risk text corresponding to the pre-labeled risk; and when the second scheme unit text matches the risk text corresponding to the pre-labeled risk, the second scheme unit vector is the target scheme unit vector of the risk code.

[0138] Optionally, in one embodiment, the annotation module further includes an input unit, configured to input the risk code of the second scheme unit text when the second scheme unit text does not match the risk text corresponding to the pre-annotated risk.

[0139] Optionally, in one embodiment, the training module 405 includes: a first processing unit, configured to divide the labeled dataset into K data subsets, where K is a natural number greater than 1; a second processing unit, configured to select K-1 of the data subsets as training datasets and the other data subset as test datasets, obtaining K pairs of different training-test datasets; a training unit, configured to train a model using each pair of training-test datasets to obtain K cross-risk classification models; a summarizing unit, configured to summarize the prediction error samples of the K cross-risk classification models on the test dataset to obtain a cross-validation hard case set; a validation unit, configured to validate whether each scheme unit text in the cross-validation hard case set matches the risk text corresponding to its risk code; a correction unit, configured to correct the risk code of the scheme unit text when the scheme unit text does not match the risk text corresponding to its risk code, obtaining a first updated labeled dataset; and a first training unit, configured to train a risk classification model using the first updated labeled dataset.

[0140] Optionally, in one embodiment, the training module 405 includes: a third processing unit, configured to divide the labeled dataset into K data subsets, where K is a natural number greater than 1; a fourth processing unit, configured to select K-1 of the data subsets as training datasets and the other data subset as test datasets, obtaining K pairs of different training-test datasets; a training unit, configured to train a model using each pair of training-test datasets to obtain K cross-risk classification models; a statistics unit, configured to count the amount of test data and the accuracy corresponding to each risk code on the K test datasets; a filtering unit, configured to filter risk codes whose test data amount is less than a preset amount of data or whose accuracy is lower than a preset accuracy, to obtain iterative risk codes; a third labeling unit, configured to use the scheme unit text corresponding to the iterative risk code in the labeled dataset as the risk text, and re-label the scheme unit text to obtain a second updated labeled dataset; and a second training unit, configured to train a risk classification model using the second updated labeled dataset.

[0141] Optionally, in one embodiment, the training module 405 is further configured to use the scheme unit text and the keywords in the scheme unit text in the labeled dataset as input vectors, and the risk codes labeled in the scheme unit text as output vectors to train the Roformer classification model to obtain the risk classification model.

[0142] Example 5

[0143] Corresponding to Embodiment 2 above, Embodiment 5 of the present invention provides a device for identifying safety risks from a construction plan. The technical features and corresponding technical effects can be referred to Embodiments 1 to 3 above, and will not be repeated in Embodiment 5. Figure 6 This is a block diagram of the risk classification model determination device provided in Embodiment 5 of the present invention, as shown below. Figure 6 As shown, the device includes a segmentation module 501 and a processing module 502.

[0144] The segmentation module 501 is used to segment the construction scheme to be identified to obtain several scheme unit texts; the processing module 502 is used to construct the input vector of the pre-trained risk classification model using the scheme unit texts to be identified, and obtain the risk prediction result of the risk classification model for the scheme unit texts to be identified. The risk classification model is determined using any of the risk classification model determination methods provided in the above embodiments.

[0145] Optionally, in one embodiment, the device for identifying safety risks from a construction plan further includes: a first determining module, configured to determine the engineering classification of the construction plan to be identified using a pre-trained construction plan classification model; a second determining module, configured to determine the risk code set corresponding to the construction plan based on the engineering classification of the construction plan to be identified and a preset engineering classification-risk correspondence; and a third determining module, configured to determine that the risk code prediction of the unit text of the construction plan to be identified is accurate when the risk prediction result indicates that the risk code of the unit text of the construction plan to be identified belongs to the risk code set.

[0146] Example 6

[0147] This embodiment also provides a computer device, such as a smartphone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server, or cabinet server (including a standalone server or a server cluster composed of multiple servers), etc., capable of executing programs. Figure 7 As shown, the computer device 01 in this embodiment includes, but is not limited to, a memory 011 and a processor 012 that can be interconnected via a system bus, such as... Figure 7 As shown. It should be noted that, Figure 7 Only a computer device 01 with component memory 011 and processor 012 is shown; however, 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.

[0148] In this embodiment, the memory 011 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 011 may be an internal storage unit of the computer device 01, such as the hard disk or memory of the computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 01. Of course, the memory 011 may include both the internal storage unit and its external storage device of the computer device 01. In this embodiment, the memory 011 is typically used to store the operating system and various application software installed on the computer device 01, such as the program code of the risk classification model determination device of embodiment four or the device for identifying safety risks from construction plans of embodiment five. In addition, memory 011 can also be used to temporarily store various types of data that have been output or will be output.

[0149] In some embodiments, processor 012 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 012 is typically used to control the overall operation of computer device 01. In this embodiment, processor 012 is used to run program code stored in memory 011 or process data, such as methods for determining risk classification models or methods for identifying safety risks from construction plans.

[0150] Example 7

[0151] This embodiment also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program. When the program is executed by a processor, it implements the corresponding function. The computer-readable storage medium of this embodiment is used to store a method for determining a risk classification model and a method for identifying safety risks from construction plans. When executed by a processor, it implements the risk classification model determination method of Embodiment 1, or the methods for identifying safety risks from construction plans of Embodiments 2 and 3.

[0152] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0153] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0154] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0155] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for determining a risk classification model, characterized in that, include: Obtain safety risk information and construction plans, wherein the safety risk information includes risk codes and risk texts; The construction plan is segmented to obtain several plan unit texts; Based on the similarity between the scheme unit text and the risk text, risk coding is assigned to the scheme unit text, including: converting the scheme unit text into a scheme unit vector and the risk text into a risk vector; calculating the similarity between the scheme unit vector and the risk vector; determining the risk vector with the highest similarity to the scheme unit vector; labeling the risk code corresponding to the risk vector with the highest similarity as a pre-labeled risk of the scheme unit vector, and labeling the highest similarity as a pre-labeled similarity of the scheme unit vector; for each risk code, determining the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity among the scheme unit vectors used as the pre-labeled risks; and assigning risk coding to the scheme unit text converted into the target scheme unit vector based on the pre-labeled risks. A labeled dataset is constructed using the unit text of the proposed scheme and the labeled risk codes; and A risk classification model was trained using the labeled dataset.

2. The method for determining the risk classification model according to claim 1, characterized in that, The steps for determining the risk vector with the highest similarity to the unit vector of the proposed scheme include: Search for scheme unit vectors whose similarity to the risk vector satisfies a first preset condition, and obtain a first scheme vector set; Remove the unit vectors of schemes that are identical to the risk vector from the first scheme vector set to obtain the second scheme vector set; and Traverse the second scheme vector set and determine the risk vector with the highest similarity to each scheme unit vector.

3. The method for determining the risk classification model according to claim 1, characterized in that, For each risk code, the step of determining the target scheme unit vector of the risk code based on the magnitude of the pre-labeled similarity in the scheme unit vectors used as the pre-labeled risks includes: For each risk code, in the scheme unit vectors that are used as the pre-labeled risks, search for scheme unit vectors whose pre-labeled similarity satisfies the second preset condition to obtain the second scheme unit vector, wherein the second scheme unit vector is obtained by converting the second scheme unit text; Verify whether the unit text of the second scheme matches the risk text corresponding to the pre-labeled risk; and When the second scheme unit text matches the risk text corresponding to the pre-labeled risk, the second scheme unit vector is the target scheme unit vector of the risk encoding.

4. The method for determining the risk classification model according to claim 3, characterized in that, The step of labeling the risk code for the solution unit text based on the similarity between the solution unit text and the risk text further includes: When the second scheme unit text does not match the risk text corresponding to the pre-labeled risk, input the risk code of the second scheme unit text.

5. The method for determining the risk classification model according to claim 1, characterized in that, The steps for training a risk classification model using the labeled dataset include: The labeled dataset is divided into K subsets, where K is a natural number greater than 1; Select K-1 sets of the data subsets as the training dataset and another set of the data subsets as the test dataset to obtain K pairs of different training-test datasets; Models are trained using each pair of training-test datasets to obtain K cross-risk classification models; The K prediction error samples of the cross-risk classification model on the test dataset are summarized to obtain the cross-validation hard case set; Verify whether the unit text of each scheme in the cross-validation difficult example set matches the risk text corresponding to its risk code; When the scheme unit text does not match the risk text corresponding to its risk code, the risk code of the scheme unit text is corrected to obtain the first updated annotation dataset. The risk classification model was trained using the first updated labeled dataset.

6. The method for determining the risk classification model according to claim 1, characterized in that, The steps for training a risk classification model using the labeled dataset include: The labeled dataset is divided into K subsets, where K is a natural number greater than 1; Select K-1 sets of the data subsets as the training dataset and another set of the data subsets as the test dataset to obtain K pairs of different training-test datasets; Models are trained using each pair of training-test datasets to obtain K cross-risk classification models; Statistically analyze the amount of test data and accuracy for each risk code on the K test datasets. By filtering out risk codes where the amount of test data is less than a preset amount of data or the accuracy is lower than a preset accuracy, iterative risk codes are obtained. The solution unit text corresponding to the iterative risk code in the labeled dataset is used as the risk text, and the solution unit text is re-labeled to obtain the second updated labeled dataset; The risk classification model was trained using the second updated labeled dataset.

7. The method for determining the risk classification model according to claim 1, characterized in that, The steps for training a risk classification model using the labeled dataset include: The Roformer classification model is trained by using the unit text of the scheme and the keywords in the unit text of the scheme in the labeled dataset as input vectors and the risk codes labeled in the unit text of the scheme as output vectors, to obtain the risk classification model.

8. A method for identifying safety risks from construction plans, characterized in that, include: The construction scheme to be identified is segmented to obtain several unit texts of the scheme to be identified; The input vector of a pre-trained risk classification model is constructed using the unit text of the scheme to be identified, and the risk prediction result of the risk classification model for the unit text of the scheme to be identified is obtained. The risk classification model is determined using the method for determining the risk classification model as described in any one of claims 1 to 7.

9. The method for identifying safety risks from a construction plan according to claim 8, characterized in that, Also includes: The pre-trained construction scheme classification model is used to determine the project classification of the construction scheme to be identified; Based on the project classification of the construction scheme to be identified and the pre-set project classification-risk correspondence, determine the risk code set corresponding to the construction scheme; When the risk prediction result indicates that the risk code of the unit text of the scheme to be identified belongs to the risk code set, it is determined that the risk code prediction of the unit text of the scheme to be identified is accurate.

10. A device for determining a risk classification model, characterized in that, include: The acquisition module is used to acquire safety risk information and construction plans, wherein the safety risk information includes risk codes and risk texts; The segmentation module is used to segment the construction plan into several plan unit texts; A labeling module is used to label risk codes for the scheme unit text based on the similarity between the scheme unit text and the risk text. The module includes: a conversion unit for converting the scheme unit text into a scheme unit vector and the risk text into a risk vector; a calculation unit for calculating the similarity between the scheme unit vector and the risk vector; a first determining unit for determining the risk vector with the highest similarity to the scheme unit vector; a first labeling unit for labeling the risk code corresponding to the risk vector with the highest similarity as a pre-labeled risk of the scheme unit vector and labeling the highest similarity as a pre-labeled similarity of the scheme unit vector; a second determining unit for determining the target scheme unit vector for each risk code among the scheme unit vectors used as pre-labeled risks based on the magnitude of the pre-labeled similarity; and a second labeling unit for labeling risk codes for the scheme unit text converted into the target scheme unit vector based on the pre-labeled risks. A construction module is used to construct a labeled dataset using the scheme unit text and the labeled risk codes; and The training module is used to train a risk classification model using the labeled dataset.

11. A device for identifying safety risks from construction plans, characterized in that, include: The segmentation module is used to segment the construction scheme to be identified into several unit texts of the scheme to be identified. The processing module is used to construct the input vector of a pre-trained risk classification model using the unit text of the scheme to be identified, and to obtain the risk prediction result of the risk classification model for the unit text of the scheme to be identified, wherein the risk classification model is determined by the method for determining the risk classification model according to any one of claims 1 to 7.

12. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.