Engineering quality risk hidden danger intelligent rating method and system
By applying text data acquisition, preprocessing and Doc2vec algorithm in engineering construction, intelligent rating of hidden risks and hidden dangers of engineering quality is achieved, solving the problems of low efficiency and strong subjectivity of manual ratings, and improving the accuracy and efficiency of evaluation.
Patent Information
- Application Number
- CN202411709331.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
During the construction process, there are problems of strong subjectivity, long working hours and low efficiency in the quality risks of manual rating projects, and there is a lack of effective technical solutions.
An intelligent rating method for engineering quality risk hazards is proposed. By collecting and preprocessing the quality risk hazard text data during construction, a quality risk database and corpus are established, a vector model is generated using the Doc2vec algorithm and PV-DM model, and a intelligent rating of risk hazards is performed based on the cosine similarity algorithm.
It realizes automated analysis and evaluation of hidden risks of engineering quality, improves the accuracy and efficiency of evaluation, reduces the subjectivity and workload of manual ratings, saves evaluation time, and improves the work efficiency of engineering risk consultants.
Smart Images

Figure CN119624704A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of construction project quality management, and specifically, to a method and system for intelligent rating of engineering quality risk hazards. Background Art
[0002] During the construction process, the quality of the project is related to the safety of people's lives and property. Since the construction project includes multiple sub-projects, the difficulty and complexity of the project construction are high, and various quality and safety risks may occur during the construction process. In order to promptly discover and rectify the quality risks of the project, the project risk consulting agency will regularly inspect the quality of the project. Traditional project quality inspections manually record the risks and hidden dangers found, and experts evaluate and rate the quality risks and hidden dangers based on their work experience. However, manual ratings have the disadvantages of high subjectivity, long working hours, and low efficiency. There is currently no effective technology in the industry to solve the above pain points.
[0003] In recent years, with the development of machine learning technology, natural language processing technology can learn and model various types of corpus data to achieve text analysis and mining. At present, Doc2vec and cosine similarity, as a relatively effective text modeling and text similarity calculation method, can be applied to the text modeling and evaluation rating of engineering quality risk hidden danger data. They have not been applied in the traditional engineering quality risk hidden danger evaluation rating to solve the limitation that manual rating relies too much on the subjective experience of experts and the risk hidden danger rating efficiency is low.
[0004] In view of this, the present invention is proposed. Summary of the invention
[0005] In view of the defects in the prior art, the purpose of this application is to provide a method and system for intelligent rating of engineering quality risk hazards, so as to solve the problem that the manual rating of engineering quality risk hazards during daily supervision inspections and third-party inspections is overly dependent on the subjective experience of experts, long working hours and low work efficiency.
[0006] In one aspect of the present application, a method for intelligently rating engineering quality risk hazards is provided, the method comprising the following steps:
[0007] S1. Collect text data of quality risk hazards during the construction process to form a quality risk database containing text data of existing risk hazards, wherein the text data includes hazard description, hazard category and risk level;
[0008] S2. Preprocess the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus;
[0009] S3. Based on the Doc2vec algorithm and PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model;
[0010] S4. Obtain a text data describing a risk hazard including a hazard category and a level to be evaluated, and compare the data to be evaluated with existing risk data of the same category in the quality risk database based on a cosine similarity algorithm to obtain the existing risk data that is most similar to the data to be evaluated;
[0011] S5. Obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.
[0012] Furthermore, in step S1, a quality risk database is formed, which specifically includes the following steps:
[0013] S11. Obtain text data on quality risk hazards during construction;
[0014] S12. Filter out valid risk and hidden danger data including detailed description of risk and hidden danger, hidden danger category and risk level;
[0015] S13. Number each valid risk hazard data to form a quality risk database containing existing risk hazard text data.
[0016] Furthermore, in step S2, the hidden danger description text in the existing quality risk database is preprocessed, specifically including the following steps:
[0017] S21. Based on the collected text data describing existing risks and hidden dangers and in combination with the engineering construction experience, a custom dictionary of engineering quality risks and hidden dangers is established for text segmentation;
[0018] S22. Segment the existing risk description text based on the jieba module in Python and remove stop words;
[0019] S23. Each existing risk hazard data after word segmentation includes the data number and word segmentation result. All the data after word segmentation are exported into a text file to form a quality risk hazard corpus.
[0020] Furthermore, in the step S22, it specifically includes:
[0021] Generate a Trie tree based on the original dictionary and custom dictionary of the jieba module;
[0022] According to the Trie tree, the existing risk and hidden danger description data is scanned to generate a directed acyclic graph of the existing risk and hidden danger data; wherein the directed acyclic graph includes all word segmentation combinations;
[0023] According to the dynamic programming algorithm, the word segmentation combination with the maximum probability is calculated, and the stop words are removed to generate the word segmentation result.
[0024] Furthermore, the step S3 specifically includes the following steps:
[0025] S31. Based on Python's Doc2Vec algorithm, import the word segmentation in the quality risk hidden danger corpus. Based on Python's Doc2Vec algorithm, select the PV-DM model. During the training process, each document and word will be mapped to an independent document vector and word vector. After the training is completed, the corresponding vector model will be generated. The vector model can be used to predict the context of new documents.
[0026] S32. Set parameters of the Doc2Vec algorithm; the parameters include: vector_size, window, min_count, workers, and epochs;
[0027] S33. Train the imported segmented existing risk description data to generate a vector model.
[0028] Furthermore, in step S32, the values of the parameters of the Doc2Vec algorithm are set as:
[0029] vector_size=100, window=5, min_count=1, workers=4, epochs=500.
[0030] Furthermore, in step S4, the following steps are specifically included:
[0031] S41, obtaining a piece of risk hidden danger description text data including hidden danger category and level to be evaluated, performing word segmentation and stop word removal on the hidden danger description data, and obtaining hidden danger description text data of the level to be evaluated after word segmentation;
[0032] S42, according to the serial numbers of the existing risk hidden danger description data of the same category in the quality risk database, screening the existing risk hidden danger description data of the same category in the quality risk hidden danger corpus, and calculating the cosine similarity between each existing risk hidden danger description data after word segmentation and the hidden danger description text data of the level to be evaluated after word segmentation;
[0033] S43, selecting multiple existing risk hidden danger data with the highest similarity and cosine similarity greater than 0.5 with the hidden danger description text data of the level to be evaluated.
[0034] Furthermore, the cosine similarity calculation method in step S42 is to obtain the document vectors of the risk hidden danger description data of the to-be-evaluated level after word segmentation and the existing risk hidden danger description data after word segmentation according to the model trained in S3. and The cosine similarity is calculated using the similarity formula, where the similarity formula is:
[0035]
[0036] Furthermore, in step S5, the risk level of the data to be evaluated is obtained according to the risk level of the most similar existing risk data and the risk level rating algorithm, which specifically includes the following steps:
[0037] S51, obtaining multiple existing risk hidden danger data with the highest similarity, and classifying the existing risk hidden danger data according to different risk levels;
[0038] S52, calculating the average cosine similarity of existing risk hidden danger data at each risk level;
[0039] Among them, the average cosine similarity of the existing risk hidden danger data under each risk level is calculated, which is the similarity between the hidden danger data to be evaluated and the risk level; the number of entries of the existing risk hidden danger data under the risk level is set to n, and the similarity between the hidden danger data of the level to be evaluated and the risk level is similarity level ,
[0040] Said
[0041] S53. Select the maximum value of the similarity between the hidden danger data of the level to be evaluated and different risk levels. The risk level with the maximum similarity is the risk level of the hidden danger data to be evaluated.
[0042] In a second aspect of the present application, a system for intelligent rating method of engineering quality risk hidden dangers is provided, comprising:
[0043] A collection module is used to collect text data of quality risk hazards in the construction process of the project to form a quality risk database containing text data of existing risk hazards, wherein the text data includes hazard description, hazard category and risk level;
[0044] The processing module is used to pre-process the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus; and based on the Doc2vec algorithm and the PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model;
[0045] A calculation module is used to compare the data to be evaluated with the existing risk data of the same category in the quality risk database based on the obtained text data of risk hazard description including the hazard category and the level to be evaluated, and obtain the existing risk data most similar to the data to be evaluated based on the cosine similarity algorithm;
[0046] The output module is used to obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.
[0047] Compared with the prior art, the present invention has at least one of the following beneficial effects:
[0048] This application proposes an intelligent rating method for engineering quality risk hazards by addressing the problem that manual rating of engineering quality risk hazards is overly dependent on the subjective experience of experts and has low work efficiency. The method is based on a large amount of engineering quality risk hazard data accumulated in past engineering practices, combined with natural language processing methods, to establish a quality risk database, achieve similarity comparison between new risk hazards and existing risk hazards, and intelligent rating of risk hazards based on cosine similarity; it realizes information utilization of historical risk hazard data, improves the disadvantage that manual rating is overly dependent on the subjective experience of experts, saves time for manual evaluation, and improves the work efficiency of engineering risk consultants. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0050] Figure 1 This is a flow chart of a method for intelligent rating of engineering quality risk hazards according to an embodiment of the present application.
[0051] Figure 2 This is a block diagram of an intelligent rating system for engineering quality risk hazards according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] The present application is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements can also be made without departing from the concept of the present application. These all belong to the protection scope of the present application.
[0053] Reference Figure 1 As shown, a method for intelligently rating engineering quality risk hazards in one embodiment of the present application is provided, and the method comprises the following steps:
[0054] S1. Collect text data on quality risk hazards during the construction process to form a quality risk database containing text data on existing risk hazards, wherein the text data includes hazard descriptions, hazard categories and risk levels.
[0055] By collecting text data of quality risk hazards from various records, reports, feedback and other channels during the construction process, including hazard descriptions, hazard categories (such as structural safety, material quality, construction technology, etc.) and risk levels (such as high, medium and low), the data are organized into a structured form and stored in the quality risk database.
[0056] Among them, the text data on existing risks and hidden dangers include quality risk hazards of structural engineering, mechanical and electrical installation engineering, decoration and renovation engineering, insulation engineering and waterproofing engineering involved in construction project inspections.
[0057] S2. Preprocess the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus.
[0058] Preprocess the hidden danger description text in the quality risk database, including but not limited to removing stop words, punctuation marks, numbers and other non-critical information, and perform word segmentation, stem extraction and other processing to form a quality risk hidden danger corpus and improve the accuracy of data analysis.
[0059] S3. Based on the Doc2vec algorithm and the PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model.
[0060] Based on the Doc2vec algorithm and the PV-DM (Paragraph Vector-Distributed Memory) model, each preprocessed hidden danger description is trained as a document, and a vector representation of each document is generated and stored in the vector model. Through natural language processing technology, automated analysis and pre-evaluation are achieved to improve efficiency and accuracy.
[0061] S4. Obtain a text data describing risk hazards including hazard categories and levels to be evaluated. Based on the cosine similarity algorithm, perform a similarity comparison between the data to be evaluated and the existing risk data of the same category in the quality risk database to obtain the existing risk data that is most similar to the data to be evaluated.
[0062] Obtain a new risk hazard description text data (including hazard category and level to be evaluated), and based on the cosine similarity algorithm, find the most similar data in the existing risk data of the same category. This can realize the information utilization of historical risk hazard data and improve the disadvantage of manual rating that over-reliance on expert subjective experience.
[0063] S5. Obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.
[0064] The risk level of the new data is given based on the risk level of the most similar existing risk data, combined with a risk level rating algorithm (which can be a simple level directly using similar data, or a level adjusted based on similarity and historical data).
[0065] This application collects and organizes text data on quality risk hazards to form a quality risk database, and uses the Doc2vec algorithm and cosine similarity algorithm to realize automated analysis and evaluation of risk hazards, thereby improving the accuracy and efficiency of the evaluation. Based on historical risk data, it can predict the possible risk level of newly discovered risk hazards, provide a scientific basis for risk management, and provide engineering managers with intuitive and quantitative risk level assessment results, which will help them make more scientific and reasonable decisions.
[0066] In the above embodiment, in step S1, a quality risk database is formed, which specifically includes the following steps:
[0067] S11. Obtain text data on quality risk hazards during the construction process.
[0068] S12. Filter out valid risk hazard data including specific description of risk hazards, hazard categories and risk levels.
[0069] S13. Number each valid risk hazard data to form a quality risk database containing existing risk hazard text data.
[0070] Through the above steps, the comprehensiveness and diversity of the data are ensured, which provides rich materials for risk analysis and improves the accuracy and reliability of the data. By numbering the risk data, the standardized and structured storage of the data is achieved, which provides systematic support for risk management, reduces the interference of invalid data, and improves processing efficiency.
[0071] Specifically, data is collected through multiple channels, including but not limited to construction logs, quality inspection reports, accident reports, on-site observation records, employee feedback, etc., and converted into a unified text format using manual excerpting, automated tool capture (such as OCR technology to identify text in documents), and direct acquisition through questionnaires or interviews. Each piece of data is then read and analyzed to identify entries containing specific descriptions of risk hazards, hazard categories, and risk levels to ensure that the data is complete, accurate, and meets the needs of risk assessment. Finally, each piece of valid risk hazard data is assigned a unique number for easy indexing and query, and the numbered data is stored in a certain structure (such as tables, databases, etc.) to form a quality risk database.
[0072] In the above embodiment, an example is given to illustrate: a specific implementation method is: collecting text data on quality risk hazards during the construction process of a residential project, each piece of data includes a hazard description, hazard category and risk level, to form a quality risk database containing existing risk hazard text data.
[0073] In this implementation, the risk hazard data of third-party quality inspections of multiple construction projects are used. The original data is in Excel format. Each risk hazard includes a hazard description, hazard category and risk level. The hazard categories include five categories: structural engineering, insulation engineering, waterproofing engineering, mechanical and electrical installation engineering, and decoration and renovation engineering. The risk levels include three levels: serious, medium and minor. The specific quantity of each type of data is shown in Table 1 below.
[0074] This implementation method includes a total of 12,402 valid data items; among them, the five categories of structural engineering, insulation engineering, waterproofing engineering, mechanical and electrical installation engineering and decoration and renovation engineering have 4,721, 208, 3,410, 1,463 and 2,600 items respectively; the three levels of serious, medium and minor have 243, 7,375 and 4,784 items respectively.
[0075] Table 1: Number of potential risks in each project type
[0076]
[0077] In some possible embodiments, in step S2, the hidden danger description text in the existing quality risk database is preprocessed, specifically including the following steps:
[0078] S21. Based on the collected text data describing existing risks and hidden dangers and combined with engineering construction experience, a custom dictionary of engineering quality risks and hidden dangers is established for text segmentation.
[0079] S22. Based on the jieba module in Python, the existing risk description text is segmented and stop words are removed.
[0080] S23. Each existing risk hazard data after word segmentation includes the data number and word segmentation result. All the data after word segmentation are exported into a text file to form a quality risk hazard corpus.
[0081] S21: Establish a custom dictionary of engineering quality risk hazards.
[0082] Among them, the dictionary is manually built by human input one by one.
[0083] Specifically, first, identify the professional vocabulary, terms, and phrases unique to the field of engineering construction from the existing risk and potential hazard description text data. Then, organize the collected professional vocabulary, terms, and phrases into a custom dictionary, and have experts in the engineering field review and optimize the custom dictionary to ensure that the vocabulary in the dictionary is accurate, comprehensive, and in line with actual engineering construction experience. Next, using the generated custom dictionary, perform word segmentation on each risk and potential hazard description text using the jieba module. The jieba module cuts the text into a series of word units according to the built-in algorithm and the custom dictionary. After word segmentation, remove those stop words that have no practical meaning for text understanding, such as "de" (的), "le" (了), "zai" (在), etc. These stop words can be modified according to the field. Organize the data numbers and word segmentation results of each risk and potential hazard data together to form a complete record.
[0084] Combined with engineering construction experience, the custom dictionary established in this application is based on construction engineering experience to identify professional vocabulary in the engineering field. The dictionary covers common professional terms, equipment names, material categories, key steps in the construction process, technical requirements, and relevant specifications at the construction site, such as mortar bedding layer, screw hole, waterproof structure, water stop steel plate, etc.
[0085] Through the custom dictionary, this application can ensure that professional vocabulary is correctly identified and segmented, avoiding mis-segmentation or missed-segmentation problems that may occur with general word segmentation tools. Through the pre-defined dictionary, the word segmentation process can be faster and more efficient, reducing unnecessary consumption of computing resources. The text after removing stop words is clearer and avoids interference, improving the accuracy of tasks such as risk assessment and similarity calculation.
[0086] In the above embodiment, one specific implementation method is illustrated: According to the quality risk database formed in Step 1, based on the collected existing risk and potential hazard description text data, combined with the construction experience of residential projects, establish a custom dictionary for quality risk and potential hazards in residential projects for text segmentation. The custom dictionary contains a total of 5,183 professional vocabulary, and some of the vocabulary is shown in Table 2 below.
[0087] Table 2: Some Vocabulary in the Custom Dictionary
[0088]
[0089] Use the jieba module based on Python to perform word segmentation on the existing risk and potential hazard description text in the quality risk database and remove stop words. Each segmented existing risk and potential hazard data includes the data number and the word segmentation result. Export all the segmented data into a text file to form a quality risk and potential hazard corpus. Some data of the corpus is shown in Table 3 below.
[0090] Table 3: Some Data of the Quality Risk and Potential Hazard Corpus
[0091]
[0092] In some possible embodiments, step S22 specifically includes:
[0093] Generate a Trie tree based on the original dictionary and custom dictionary of the jieba module.
[0094] According to the Trie tree, the existing risk hidden danger description data is scanned to generate a directed acyclic graph of the existing risk hidden danger data; wherein the directed acyclic graph includes all word segmentation combinations, wherein each node is weighted.
[0095] According to the dynamic programming algorithm, the word segmentation combination with the maximum probability is calculated, and the stop words are removed to generate the word segmentation result.
[0096] According to the back-to-forward dynamic programming algorithm and directed acyclic graph, suppose the text has N words, the first word is W0, and the last word is W N-1 , from W N-1 Start traversing each word W of the text in reverse order i , calculate each subtext, namely W i ~W N-1 The probability of finding the word segmentation combination with the highest probability, and removing stop words to generate the word segmentation result
[0097] Specifically, first, the jieba module will load its built-in dictionary, and then load the custom dictionary provided by the user. The jieba module uses the Trie tree (prefix tree) structure to store words in the dictionary in order to quickly find and match words in the text. Each node of the Trie tree represents a character. The characters on the path from the root node to a certain node are connected to form a prefix of a word. The jieba module scans the input existing risk description text character by character. During the scanning process, the jieba module will try to match all possible word combinations in the text based on the words in the Trie tree, and construct a directed acyclic graph; according to the dynamic programming algorithm, the word segmentation combination with the highest probability is calculated. After obtaining the word segmentation combination with the highest probability, the jieba module will loop this combination and remove the words in the predefined stop word list.
[0098] By combining the basic dictionary and the custom dictionary, the jieba module can more accurately identify vocabulary in professional fields and improve the accuracy of word segmentation. Based on the generated directed acyclic graph and combined with the dynamic programming algorithm, the jieba module can find the globally optimal word segmentation combination to quickly match and search for vocabulary, reduce unnecessary calculations, remove stop words to avoid interference in calculations or searches, and improve efficiency and accuracy.
[0099] In some possible embodiments, step S3 specifically includes the following steps:
[0100] S31. Based on the Python-based Doc2Vec algorithm, import the word segmentation in the quality risk hidden danger corpus and select the PV-DM model. The PV-DM model learns the document vector and word vector by considering the contextual information in the document and infers the vector of the new document.
[0101] S32. Set parameters of the Doc2Vec algorithm; the parameters include: vector_size, window, min_count, workers, and epochs.
[0102] S33. Train the imported segmented existing risk description data to generate a vector model.
[0103] S31: Import the word segmentation in the quality risk hidden danger corpus and select the PV-DM model
[0104] Specifically, first, the data that has been segmented and stop words removed is imported into the quality risk hidden danger corpus generated in step S23; the PV-DM (Paragraph Vector with Distributed Memory) model is selected as the implementation method of Doc2Vec; the PV-DM model trains the document vector by combining a neural network, wherein the document vector and the word vector in the window jointly predict the word in the window, thereby capturing the subject and semantic information of the document, and setting the parameters of the Doc2Vec algorithm according to the size, complexity and computing resources of the data set, and using the set parameters and the risk hidden danger description data after segmentation to train the Doc2Vec model, and the main parameters used in the training model include vector_size (the dimension size of the generated document vector), window (the maximum distance between the predicted word and the context word), and min_count (ignore the frequency threshold). , workers (the number of threads used when training the model) and epochs (the number of training rounds of the model on the entire corpus). First, an initial value is set for the above parameters, namely vector_size = 50, window = 3, min_count = 1, workers = 4, epochs = 200. Then, the initial training model is obtained. Based on the model, the test data is used to calculate the similarity with the existing risk hazard data. The quality of the model is manually judged based on construction knowledge and experience. Then, each parameter is adjusted for multiple rounds to determine the appropriate training parameters. After the model training is completed, the model is used to infer the training data to generate a vector representation of each document.
[0105] The parameters include: vector_size, window, min_count, workers, epochs.
[0106] This application uses the PV-DM model to consider the contextual information in the document, and can learn the semantic representation of the document and the learned document vector, so that similar documents are close in the vector space. Vector inference can be performed on new documents, and document similarity calculation tasks can be performed. At the same time, parameters can be adjusted to make full use of computing resources, and the model performance can be optimized according to the characteristics of specific tasks and data sets to accelerate the training process. Finally, the text data is converted into a numerical vector for easy calculation.
[0107] In the above embodiment, in step S32, the values of the parameters of the Doc2Vec algorithm are set to:
[0108] vector_size=100, window=5, min_count=1, workers=4, epochs=500.
[0109] Specifically, based on the Python Doc2Vec algorithm, the data of the description of existing risks and hidden dangers after word segmentation in the quality risk hidden danger corpus of step S3 is imported, the PV-DM model is selected, and the parameters of the Doc2Vec algorithm are set, including the dimension size vector_size of the generated document vector, the maximum distance window between the predicted word and the context word is defined, the words with a frequency lower than min_count are ignored, the number of threads workers used when training the model is specified, the number of epochs of the model training rounds on the entire corpus is set, vector_size=100, window=5, min_count=1, workers=4, epochs=500. Specifically, the dimension size of the generated document vector is set to 100; the maximum distance between the predicted word and the context word is defined to 5; the words with a frequency lower than 1 are ignored; the number of threads used when training the model is specified to 4; the number of epochs of the model training rounds on the entire corpus is 500, and the imported data of the description of existing risks and hidden dangers after word segmentation is trained to generate a vector model.
[0110] In some possible embodiments, in step S4, the following steps are specifically included:
[0111] S41, obtaining a piece of risk hidden danger description text data including hidden danger category and level to be evaluated, performing word segmentation and stop word removal on the hidden danger description data, and obtaining hidden danger description text data of the level to be evaluated after word segmentation.
[0112] The hidden danger description data is segmented and stop words are removed, and the method of S22 is used for processing.
[0113] S42. According to the numbers of the existing risk hazard description data of the same category in the quality risk database, screen the existing risk hazard description data of the same category in the quality risk hazard corpus, and calculate the cosine similarity between each segmented existing risk hazard description data and the segmented text data of the hazard description to be evaluated in turn.
[0114] S43. Select multiple existing risk hazard data with a cosine similarity greater than 0.5 to the text data of the hazard description to be evaluated and the highest similarity.
[0115] Among them, select 10 existing risk hazard data with a cosine similarity greater than 0.5 to the data of the hazard to be evaluated and the highest similarity. If the number of existing risk hazard data with a cosine similarity greater than 0.5 to the data of the hazard to be evaluated is less than 10, then select all existing risk hazard data greater than 0.5.
[0116] Through the above steps, the present application reduces the workload and subjectivity of manual evaluation, improves the efficiency and accuracy of evaluation, calculates the cosine similarity through the existing risk hazard data and the text data of the hazard description to be evaluated, and improves the accuracy of the evaluation model.
[0117] Specifically, obtain the risk hazard description text containing the hazard category and the level to be evaluated. The jieba module splits the text into individual lexical units, removes the stop words in the text, such as high-frequency but meaningless words like "of", "is", "in", etc., to reduce the interference items in subsequent processing. Then, according to the numbers of the existing risk hazard description data of the same category in the quality risk database, screen out the existing risk hazard description data of the same hazard category as the text to be evaluated from the quality risk hazard corpus; for each screened existing risk hazard description data, use the vector space model to convert it and the segmented text data to be evaluated into vector forms; then, measure the similarity between them by calculating the cosine similarity between these two vectors. By selecting the similarity threshold as 0.5, screen out the existing risk hazard data that is similar enough to the text to be evaluated, sort all existing data with a similarity greater than the threshold from high to low in terms of similarity, select multiple data with the highest similarity, and use the selected existing risk hazard description data as a reference to evaluate the level or category of the text to be evaluated.
[0118] In the above embodiment, one specific implementation manner is illustrated as follows: Select 5 pieces of risk hazard description text data to be evaluated containing the hazard category, perform word segmentation and stop word removal processing on the 5 pieces of hazard description data to obtain the segmented text data of the hazard description to be evaluated. The text data, the segmented data, and the data category are shown in Table 4 below.
[0119] According to the serial number of the existing risk hidden danger description data of the same category in the quality risk database of step S13, the existing risk hidden danger description data of the same category in the quality risk hidden danger corpus of step S23 are screened, and the cosine similarity between each existing risk hidden danger description data after word segmentation and the hidden danger description data to be evaluated after word segmentation is calculated in turn; the 10 existing risk hidden danger data with the cosine similarity to the hidden danger data to be evaluated and the highest similarity are selected; if the existing risk hidden danger data with the cosine similarity to the hidden danger data to be evaluated greater than 0.5 are less than 10, all the existing risk hidden danger data with a cosine similarity greater than 0.5 are selected.
[0120] Table 4 Risk data used for rating
[0121]
[0122] In the above embodiment, the cosine similarity calculation method in step S42 is to obtain the document vectors of the risk hazard description data to be evaluated after word segmentation and the existing risk hazard description data after word segmentation according to the model trained in S3. and The cosine similarity is calculated using the similarity formula, where the similarity formula is:
[0123]
[0124] In some possible embodiments, in step S5, the risk level of the data to be evaluated is obtained according to the risk level of the most similar existing risk data and the risk level rating algorithm, which specifically includes the following steps:
[0125] S51. Acquire multiple existing risk hidden danger data with the highest similarity, and classify the existing risk hidden danger data according to different risk levels.
[0126] S52. Calculate the average cosine similarity of the existing risk potential data at each risk level.
[0127] Among them, the average cosine similarity of the existing risk hidden danger data under each risk level is calculated, which is the similarity between the hidden danger data to be evaluated and the risk level; the number of entries of the existing risk hidden danger data under the risk level is set to n, and the similarity between the hidden danger data of the level to be evaluated and the risk level is similarity level ,
[0128]
[0129] S53. Select the maximum value of the similarity between the hidden danger data of the level to be evaluated and different risk levels. The risk level with the maximum similarity is the risk level of the hidden danger data to be evaluated.
[0130] Among them, the number of the existing risk hidden danger data with the highest similarity in step S51 is 10. Steps S51, S52, and S53 are combined to form a complete risk level rating algorithm.
[0131] This application accurately evaluates the risk level of the data to be evaluated by calculating the average similarity between the data to be evaluated and multiple similar existing data, and selecting the risk level corresponding to the highest similarity. Combined with existing risk hazard data, it reduces human intervention and subjective judgment, realizes the automation of risk level assessment, and improves processing efficiency and accuracy.
[0132] Specifically, according to the multiple existing risk hazard data with the highest similarity selected in step S43, they are classified according to their respective risk levels, and then for each risk level, the cosine similarity between all existing risk hazard data and the data to be evaluated at that level is calculated, and the average value is obtained, and the similarity between the data to be evaluated and different risk levels is compared (that is, the average cosine similarity of each level), and the risk level with the highest similarity is selected as the risk level of the data to be evaluated.
[0133] According to different risk levels, the 10 existing risk hidden danger data with the highest cosine similarity with each potential danger data to be evaluated are classified, and the average cosine similarity of the existing risk hidden danger data under each risk level is calculated, which is the similarity between the potential danger data to be evaluated and the risk level. level , assuming that the number of items of existing risk potential data under the risk level is n, then similarity level The specific calculation formula is:
[0134]
[0135] The maximum value of the similarity between the hidden danger data to be evaluated and different risk levels is selected, and the risk level with the maximum similarity is the risk level of the hidden danger data to be evaluated.
[0136] In the above embodiment, one specific implementation method is illustrated as follows: the matching data, matching data similarity and risk assessment level of the original data "the railing is not properly grounded for lightning protection" are shown in Table 5 below, and the assessment level of the risk data is "medium".
[0137] Table 5 Matching data and evaluation level of "railings not properly grounded for lightning protection"
[0138]
[0139] The matching data, matching data similarity and risk assessment level of the original data “Thermal insulation coil is not laid continuously” are shown in Table 6 below. The assessment level of the risk data is “serious”.
[0140] Table 6 Matching data and evaluation level of "Thermal insulation membrane is not laid continuously"
[0141]
[0142] The matching data, matching data similarity and risk assessment level of the original data "There are multiple signs of water seepage on the wall of the balcony" are shown in Table 7 below. The assessment level of this risk data is "medium".
[0143] Table 7 Matching data and assessment level of "The balcony has multiple water seepage marks on the wall"
[0144]
[0145]
[0146] The matching data, matching data similarity and risk assessment level of the original data “the concrete pouring is not dense, and there are honeycombs, rough surfaces and exposed reinforcement phenomena” are shown in Table 8 below. The assessment level of this risk data is “medium”.
[0147] Table 8 Matching data and evaluation level of "concrete pouring is not dense, with honeycomb, rough surface and exposed reinforcement"
[0148]
[0149] The matching data, matching data similarity and risk assessment level of the original data “local hollowing and cracking of wall plaster layer” are shown in Table 9 below. The assessment level of this risk data is “minor”.
[0150] Table 9 Matching data and evaluation level of "local hollowing and cracking of wall plaster layer"
[0151]
[0152] Reference Figure 2 As shown, the second aspect of the present application provides a system for an intelligent rating method for engineering quality risk hazards, including:
[0153] The collection module is used to collect text data on quality risk hazards during the construction process to form a quality risk database containing existing risk hazard text data, wherein the text data includes hazard description, hazard category and risk level.
[0154] The processing module is used to pre-process the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus; and based on the Doc2vec algorithm and PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model.
[0155] The calculation module is used to compare the data to be evaluated with the existing risk data of the same category in the quality risk database based on the cosine similarity algorithm, based on a text data of risk hazard description containing the hazard category and the level to be evaluated, so as to obtain the existing risk data that is most similar to the data to be evaluated.
[0156] The output module is used to obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.
[0157] Specifically, the collection module is set up to first obtain the text data of quality risk hazards in the construction process of the collection project, and generate a quality risk database containing the existing risk hazard text data, where the text data includes hazard description, hazard category and risk level. Then the processing module performs a series of preprocessing operations on the hazard description text in the quality risk database, such as word segmentation, stop word removal, part-of-speech tagging, etc., and based on the Doc2Vec algorithm and PV-DM model, the system trains the preprocessed corpus. During the training process, the system regards each hazard description as a document, learns the semantic vector representation of the document through the model, and finally generates a vector model. When the system receives a new text data describing risk hazards, including the hazard category and the level to be evaluated, the calculation module first performs the same preprocessing operation on it. Then, based on the cosine similarity algorithm, the preprocessed data to be evaluated is compared with the existing risk data of the same category in the quality risk database. By comparing the cosine value of the angle between the document vectors, the system can find the existing risk data that is most similar to the data to be evaluated. Then, the output module comprehensively evaluates the risk level of the data to be evaluated based on the risk level of the most similar existing risk data obtained by the calculation module, as well as the possible built-in risk level rating algorithm (such as weighted average, voting mechanism, etc.). Finally, the system outputs the evaluation results and generates the risk level of the data to be evaluated.
[0158] Through the above modules, this application realizes the automated collection, processing, calculation and evaluation of engineering quality risk hazards, greatly improves work efficiency and accuracy, reduces interference from human factors, establishes a quality risk database and corpus containing a large amount of existing risk hazard text data, realizes similarity comparison between new risk hazards and existing risk hazards, and intelligent rating of risk hazards based on cosine similarity; it improves the disadvantage of manual rating relying too much on expert subjective experience by utilizing information from historical risk hazard data, saves time for manual evaluation, and improves the work efficiency of engineering risk consultants.
[0159] The above describes the specific embodiments of the present application. It should be understood that the present application is not limited to the above specific embodiments, and those skilled in the art can make various modifications or variations within the scope of the claims, which does not affect the substantive content of the present application. The above preferred features can be used in any combination without conflicting with each other.
Claims
1. A method for intelligent rating of engineering quality risk hazards, characterized in that: The method comprises the following steps: S1. Collect text data of quality risk hazards during the construction process to form a quality risk database containing text data of existing risk hazards, wherein the text data includes hazard description, hazard category and risk level; S2. Preprocess the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus; S3. Based on the Doc2vec algorithm and PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model; S4. Obtain a text data describing a risk hazard including a hazard category and a level to be evaluated, and compare the data to be evaluated with existing risk data of the same category in the quality risk database based on a cosine similarity algorithm to obtain the existing risk data that is most similar to the data to be evaluated; S5. Obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.
2. According to claim 1, a method for intelligent rating of engineering quality risk hazards is characterized by: In step S1, a quality risk database is formed, which specifically includes the following steps: S11. Obtain text data on quality risk hazards during construction; S12. Filter out valid risk and hidden danger data including detailed description of risk and hidden danger, hidden danger category and risk level; S13. Number each valid risk hazard data to form a quality risk database containing existing risk hazard text data.
3. According to claim 1, a method for intelligent rating of engineering quality risk hazards is characterized by: In step S2, the hidden danger description text in the existing quality risk database is preprocessed, specifically including the following steps: S21. Based on the collected text data describing existing risks and hidden dangers and in combination with the engineering construction experience, a custom dictionary of engineering quality risks and hidden dangers is established for text segmentation; S22. Segment the existing risk description text based on the jieba module in Python and remove stop words; S23. Each existing risk hazard data after word segmentation includes the data number and word segmentation result. All the data after word segmentation are exported into a text file to form a quality risk hazard corpus.
4. According to claim 3, a method for intelligent rating of engineering quality risk hazards is characterized in that: In the step S22, specifically including: Generate a Trie tree based on the original dictionary and custom dictionary of the jieba module; According to the Trie tree, the existing risk and hidden danger description data is scanned to generate a directed acyclic graph of the existing risk and hidden danger data; wherein the directed acyclic graph includes all word segmentation combinations; According to the dynamic programming algorithm, the word segmentation combination with the maximum probability is calculated, and the stop words are removed to generate the word segmentation result.
5. According to claim 1, a method for intelligent rating of engineering quality risk hazards is characterized by: The step S3 specifically includes the following steps: S31. Based on Python's Doc2Vec algorithm, import the word segmentation in the quality risk hidden danger corpus. Based on Python's Doc2Vec algorithm, select the PV-DM model. During the training process, each document and word will be mapped to an independent document vector and word vector. After the training is completed, the corresponding vector model will be generated. The vector model can be used to predict the context of new documents. S32. Set parameters of the Doc2Vec algorithm; the parameters include: vector_size, window, min_count, workers, and epochs; S33. Train the imported segmented existing risk description data to generate a vector model.
6. According to claim 5, a method for intelligent rating of engineering quality risk hazards is characterized in that: In step S32, the values of the parameters of the Doc2Vec algorithm are set to: vector_size=100, window=5, min_count=1, workers=4, epochs=500.
7. The method for intelligent rating of engineering quality risk hazards according to claim 1 is characterized in that: In the step S4, the following steps are specifically included: S41, obtaining a piece of risk hidden danger description text data including hidden danger category and level to be evaluated, performing word segmentation and stop word removal on the hidden danger description data, and obtaining hidden danger description text data of the level to be evaluated after word segmentation; S42, according to the serial numbers of the existing risk hidden danger description data of the same category in the quality risk database, screening the existing risk hidden danger description data of the same category in the quality risk hidden danger corpus, and calculating the cosine similarity between each existing risk hidden danger description data after word segmentation and the hidden danger description text data of the level to be evaluated after word segmentation; S43, selecting multiple existing risk hidden danger data with the highest similarity and cosine similarity greater than 0.5 with the hidden danger description text data of the level to be evaluated.
8. The method for intelligent rating of engineering quality risk hazards according to claim 1 is characterized in that: The cosine similarity calculation method in step S42 is to obtain the document vectors of the risk hidden danger description data to be evaluated after word segmentation and the existing risk hidden danger description data after word segmentation according to the model trained in S3. and The cosine similarity is calculated using the similarity formula, where the similarity formula is:
9. The method for intelligent rating of engineering quality risk hazards according to claim 1 is characterized in that: In step S5, the risk level of the data to be evaluated is obtained according to the risk level of the most similar existing risk data and the risk level rating algorithm, which specifically includes the following steps: S51, obtaining multiple existing risk hidden danger data with the highest similarity, and classifying the existing risk hidden danger data according to different risk levels; S52, calculating the average cosine similarity of existing risk hidden danger data at each risk level; Among them, the average cosine similarity of the existing risk hidden danger data under each risk level is calculated, which is the similarity between the hidden danger data to be evaluated and the risk level; the number of entries of the existing risk hidden danger data under the risk level is set to n, and the similarity between the hidden danger data of the level to be evaluated and the risk level is similarity level , Said S53. Select the maximum value of the similarity between the hidden danger data of the level to be evaluated and different risk levels. The risk level with the maximum similarity is the risk level of the hidden danger data to be evaluated.
10. A system for intelligent rating of engineering quality risk hazards, characterized in that: include: A collection module is used to collect text data of quality risk hazards in the construction process of the project to form a quality risk database containing text data of existing risk hazards, wherein the text data includes hazard description, hazard category and risk level; The processing module is used to pre-process the hidden danger description text in the existing quality risk database to form a quality risk hidden danger corpus; and based on the Doc2vec algorithm and the PV-DM model, the quality risk hidden danger corpus is trained, and each hidden danger in the quality risk hidden danger corpus is taken as a document to generate a vector model; A calculation module is used to compare the data to be evaluated with the existing risk data of the same category in the quality risk database based on the obtained text data of risk hazard description including the hazard category and the level to be evaluated, and obtain the existing risk data most similar to the data to be evaluated based on the cosine similarity algorithm; The output module is used to obtain the risk level of the data to be evaluated based on the risk level of the most similar existing risk data and the risk level rating algorithm.