Engineering construction standard text retrieval method and training method based on semantic reasoning

Through the standard text search method of engineering construction based on semantic reasoning, and using vectorization processing and feature fusion technology, the problem of inefficient manual search is solved, efficient and accurate text search is achieved, and the efficiency of project quality management is improved.

CN115687588BActive Publication Date: 2025-08-01TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211353564.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2025-08-01
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

In the prior art, text retrieval methods for engineering construction quality and management rely on manual review, resulting in inefficient and error-prone, and inability to obtain standard and standard text efficiently and accurately.

Method used

The standard text search method for engineering construction based on semantic reasoning is adopted, and the vectorization process of the retrieval statements and preset standard statements is performed, and the feature vectors are generated using weighting and fusion operations, the correlation characteristic matrix is calculated, the target standard statement is determined and output.

Benefits of technology

It realizes the fast and accurate matching of the sentences to be searched with high correlation with preset standard statements, improves the efficiency and accuracy of text retrieval and reduces the consumption of manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687588B_ABST
    Figure CN115687588B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for retrieving engineering construction standard texts and a training method based on semantic reasoning. The retrieval method includes: obtaining a query statement pair based on the statement to be retrieved and a preset standard statement, where the query statement pair includes a term to be retrieved and a standard term; extracting features from a preset matrix to obtain a first statement feature vector and a second statement feature vector, where the preset matrix is obtained based on the term to be retrieved and the standard term; obtaining a first fusion vector and a second fusion vector based on the first statement feature vector and the second statement feature vector; extracting features from the first fusion vector to obtain a third statement feature vector, and extracting features from the second fusion vector to obtain a fourth statement feature vector; obtaining a correlation feature matrix based on the third statement feature vector and the fourth statement feature vector; obtaining a correlation score based on the correlation feature matrix, and when the correlation score meets a preset condition, confirming the preset standard statement as the target standard statement and outputting it.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of intelligent management of engineering construction quality, and in particular to a semantic reasoning-based engineering construction standard text retrieval method and training method. Background Art

[0002] Standard specification documents contain important engineering and practical experience. Actual operations carried out in accordance with engineering construction standard documents can ensure the normal implementation and quality of the project. In related technologies, the inspection methods for relevant documents related to engineering construction quality and management mainly rely on manual review. During the operation, management personnel are required to record measured data based on actual scenarios and then review and compare the recorded measured data with a large number of standard specification documents. The manual search process consumes a lot of manpower and material resources, and there are cases of retrieval errors and omissions, which is not conducive to the efficient and accurate acquisition of the corresponding standard specification documents. Summary of the Invention

[0003] In view of this, the present disclosure provides an engineering construction standard text retrieval method and training method based on semantic reasoning, in order to partially solve at least one of the above-mentioned technical problems.

[0004] One aspect of the present disclosure provides a method for retrieving engineering construction standard text based on semantic reasoning, comprising:

[0005] Based on the query statement and the preset standard statement, a query statement pair is obtained. The preset standard statement is a statement obtained from the preset standard statement library. The query statement pair includes the query statement corresponding to the query statement and the standard phrase corresponding to the preset standard statement. Feature extraction is performed on the preset matrix to obtain a first sentence feature vector and a second sentence feature vector. The preset matrix is obtained by vectorizing the query term and the standard phrase. Based on the similarity between the first sentence feature vector and the second sentence feature vector, a weighted sum fusion operation is performed to obtain a first fused vector and a second fused vector. Feature extraction is performed on the first fused vector to obtain a third sentence feature vector, and feature extraction is performed on the second fused vector to obtain a fourth sentence feature vector. Based on the third and fourth sentence feature vectors, a correlation feature matrix is obtained. The correlation feature matrix represents the degree of correlation between the query statement and the preset standard statement. A correlation score is obtained based on the correlation feature matrix. If the correlation score meets preset conditions, the preset standard statement is confirmed as the target standard statement and output.

[0006] Another aspect of the present disclosure provides a method for training a deep learning model.

[0007] The above deep learning model includes a to-be-retrieved statement acquisition module, a standard statement acquisition module, and a text retrieval module.

[0008] The above training method includes:

[0009] Input the sample document into the above to-be-retrieved statement acquisition module to obtain the sample to-be-retrieved statement. Input the sample standard document into the above standard statement acquisition module to obtain the sample standard statement. Input the above sample to-be-retrieved statement and the above sample standard statement into the above text retrieval module to obtain the sample correlation score. Train the above deep learning model based on the above sample correlation score and the label value to obtain the trained deep learning model.

[0010] Among them, inputting the above sample to-be-retrieved statement and the above sample standard statement into the above text retrieval module to obtain the sample correlation score includes:

[0011] Obtain a sample matrix based on the above sample to-be-retrieved statement and the above sample standard statement. Extract features from the above sample matrix to obtain the first sample statement feature vector and the second sample statement feature vector. Based on the similarity between the above first sample statement feature vector and the above second sample statement feature vector, through weighted sum and fusion operations, obtain the first sample fusion vector and the second sample fusion vector. Extract features from the above first sample fusion vector to obtain the third sample statement feature vector, and extract features from the above second sample fusion vector to obtain the fourth sample statement feature vector. Based on the above third sample statement feature vector and the above fourth sample statement feature vector, obtain a sample correlation degree feature matrix, and the above sample correlation degree feature matrix characterizes the correlation degree between the above sample to-be-retrieved statement and the above sample standard statement.

[0012] Another aspect of the present disclosure provides an electronic device, including:

[0013] One or more processors; a memory for storing one or more instructions, wherein when the above one or more instructions are executed by the above one or more processors, the above one or more processors implement the above method.

[0014] Based on the above technical solutions, it can be seen that the embodiments of the present disclosure have the following beneficial effects compared with the prior art:

[0015] In the process of retrieving a retrieval statement, a first fusion vector and a second fusion vector can be obtained based on a first statement feature vector related to a retrieval term corresponding to the retrieval statement to be retrieved and a second statement feature vector related to a standard term corresponding to a preset standard statement. Since the first fusion vector and the second fusion vector are obtained through a weighted sum and fusion operation based on the similarity between the first statement feature vector and the second statement feature vector, the similarity or difference between the first fusion vector and the second fusion vector is weighted and enhanced, and the connection of irrelevant vectors is reduced. Therefore, the correlation between a third statement feature vector obtained by feature extraction based on the first fusion vector and a fourth statement feature vector obtained by feature extraction based on the second fusion vector is further strengthened; then, a correlation feature matrix is obtained based on the third statement feature vector and the fourth statement feature vector, and further a correlation score is obtained. The correlation score can represent the correlation degree between the retrieval statement to be retrieved and the preset standard statement. When the correlation score meets the preset conditions, it can be determined that the correlation degree between the retrieval statement to be retrieved and the preset standard statement is high, realizing a high-matching retrieval of the retrieval statement to be retrieved. Based on the engineering construction standard text retrieval method, a preset standard statement with a high correlation with the retrieval statement to be retrieved can be quickly obtained, overcoming the problem that the related technology cannot guarantee the efficiency and accuracy of text retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Schematically shows a flowchart of an engineering construction standard text retrieval method according to an embodiment of the present disclosure.

[0017] Figure 2 Schematically shows a framework diagram of a deep learning model according to an embodiment of the present disclosure.

[0018] Figure 3 Schematically shows a flowchart of a model training method according to an embodiment of the present disclosure.

[0019] Figure 4 Schematically shows a neural network structure diagram of a deep learning model according to an embodiment of the present disclosure.

[0020] Figure 5 Schematically shows a schematic diagram of word vector aggregation according to an embodiment of the present disclosure.

[0021] Figure 6 Schematically shows a schematic diagram of loss value results of a training set and a validation set during training according to an embodiment of the present disclosure.

[0022] Figure 7 Schematically shows a schematic diagram of calculation accuracy results of a training set and a validation set during training according to an embodiment of the present disclosure.

[0023] Figure 8A block diagram of an electronic device suitable for implementing a method for retrieving engineering construction standard texts and a method for model training according to an embodiment of the present disclosure is schematically shown. Detailed implementation manners

[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, for the sake of explanation, numerous specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is obvious that one or more embodiments can be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

[0025] The terms used herein are merely for describing specific embodiments and are not intended to limit the present disclosure. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0027] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, having only B, having only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).

[0028] In the process of implementing the concept of the present disclosure, the applicant found that at least the following problems exist in the related art:

[0029] In the related art, in the method of text retrieval through manual review, during the implementation of text retrieval, it is required that managers record measured data based on the actual scenario, and for the recorded measured data, a large number of standard specification texts need to be browsed and compared. The process of manual retrieval consumes a large amount of manpower and material resources, and there are cases of retrieval errors and omissions, which is not conducive to obtaining the corresponding standard specification text efficiently and accurately.

[0030] There is a need for an efficient and accurate text retrieval method.

[0031] To at least partially solve the technical problems existing in the related art, the present disclosure provides a method for retrieving engineering construction standard texts based on semantic reasoning and a training method.

[0032] According to an embodiment of the present disclosure, on the one hand, a method for retrieving engineering construction standard texts based on semantic reasoning is provided.

[0033] Figure 1 The flowchart of the method for retrieving engineering construction standard texts according to an embodiment of the present disclosure is schematically shown.

[0034] As Figure 1 shown, the method for retrieving engineering construction standard texts includes operations S110 to S160.

[0035] In operation S110, based on the to-be-retrieved statement and the preset standard statement, a to-be-query statement pair is obtained. The preset standard statement is a statement obtained from a preset standard statement library. The to-be-query statement pair includes a to-be-retrieved word corresponding to the to-be-retrieved statement and a standard word corresponding to the preset specification statement.

[0036] In operation S120, feature extraction is performed on the preset matrix to obtain a first statement feature vector and a second statement feature vector. Among them, the preset matrix is obtained by performing vectorization processing on the to-be-retrieved word and the standard word.

[0037] In operation S130, based on the similarity between the first statement feature vector and the second statement feature vector, through weighted sum and fusion operations, a first fusion vector and a second fusion vector are obtained.

[0038] In operation S140, feature extraction is performed on the first fusion vector to obtain a third statement feature vector, and feature extraction is performed on the second fusion vector to obtain a fourth statement feature vector.

[0039] In operation S150, based on the third statement feature vector and the fourth statement feature vector, a correlation degree feature matrix is obtained. The correlation degree feature matrix characterizes the correlation degree between the to-be-retrieved statement and the preset standard statement.

[0040] In operation S160, a correlation score is obtained based on the correlation degree feature matrix. When the correlation score meets the preset conditions, the preset standard statement is confirmed as the target standard statement and output.

[0041] According to an embodiment of the present disclosure, multiple preset standard statements can be obtained based on a standard specification text record. The multiple preset standard statements can be stored in a preset standard statement library, and the preset standard statements are obtained from the preset standard statement library when performing a search for an engineering construction standard text. Based on the statement to be retrieved and the preset standard statements, a statement pair to be queried is obtained. Based on the similarity of the features of the statement to be retrieved and the preset standard statements, after feature extraction, feature fusion, and another feature extraction, the correlation degree between the statement to be retrieved and the preset standard statements is obtained. When the correlation degree is high, the preset standard statement currently being calculated with the statement to be retrieved is the target standard statement of the statement to be retrieved and is output.

[0042] According to an embodiment of the present disclosure, an engineering construction standard text can be processed to obtain a preset standard statement library.

[0043] According to an embodiment of the present disclosure, the statement to be retrieved can be vectorized. Each term to be retrieved in the statement to be retrieved represented by text is converted into a vector representation. The vector corresponding to the statement to be retrieved can be a multi-dimensional vector, and each dimension in the multi-dimensional vector can be a vector element corresponding to each term to be retrieved. The multiple vector elements are arranged in the vector corresponding to the statement to be retrieved in the arrangement order of the corresponding terms to be retrieved in the statement to be retrieved. Similarly, the preset standard statements are vectorized, and a preset matrix is obtained based on the vector corresponding to the statement to be retrieved and the vector corresponding to the preset standard statements.

[0044] According to an embodiment of the present disclosure, the vector corresponding to the statement to be retrieved and the vector corresponding to the preset standard statements can be arranged in sequence to obtain a preset matrix. By forward-sequentially extracting features from the vector corresponding to the statement to be retrieved in the preset matrix, that is, extracting features in the arrangement order of the terms to be retrieved in the statement to be retrieved, and extracting features in a backward order opposite to the forward order, and based on the features extracted in the two orders, a first statement feature vector can be obtained. Through the above feature extraction, the word features of the vector elements corresponding to multiple terms to be retrieved are converted into statement features including forward context information and backward context information, preparing for subsequent similarity calculation based on the statement features. Based on a similar operation, a second statement feature vector can be obtained for the preset standard statements.

[0045] According to an embodiment of the present disclosure, between the vector corresponding to the statement to be retrieved and the vector corresponding to the preset standard statement, there may be vectors corresponding to the same words or vectors corresponding to the same characters. For example, there are vectors corresponding to the same technical terms. Thus, there is a similarity between the vectors corresponding to the same or similar words. There may also be different words between the two, and thus there is a difference between the different words. Based on the similarity and difference between the vector corresponding to the statement to be retrieved and the vector corresponding to the preset standard statement, based on the first statement feature vector and the second statement feature vector, through weighted sum and fusion operations, the similarity and difference therebetween are enlarged to obtain a first fusion vector and a second fusion vector.

[0046] According to an embodiment of the present disclosure, feature extraction is performed on the first fusion vector and the second fusion vector that have enlarged the similarity and difference between statements, further strengthening the feature interaction between the vector corresponding to the statement to be retrieved and the vector corresponding to the preset standard statement, as well as extracting the features of similarity and difference, so as to obtain a correlation degree feature matrix.

[0047] According to an embodiment of the present disclosure, a correlation score is obtained based on the correlation degree feature matrix. The correlation score represents the correlation degree between the statement to be retrieved and the preset standard statement. When the correlation score meets the preset condition, it means that the correlation degree between the statement to be retrieved and the preset standard statement is high. The preset standard statement currently calculated with the statement to be retrieved is the target standard statement of the statement to be retrieved and is output.

[0048] According to an embodiment of the present disclosure, after obtaining the correlation score based on the correlation degree feature matrix, the correlation degree between the statement to be retrieved and all the preset standard statements in the preset standard statement library is calculated and scored. After screening out the preset standard statements with no correlation relationship, the preset standard statements with a correlation relationship are arranged in descending order of scores, and the preset standard statements arranged in descending order of scores are output.

[0049] According to an embodiment of the present disclosure, in the process of retrieving a to-be-retrieved statement, a first fusion vector and a second fusion vector can be obtained based on a first statement feature vector related to a to-be-retrieved word corresponding to the to-be-retrieved statement and a second statement feature vector related to a standard word corresponding to a preset standard statement. Since the first fusion vector and the second fusion vector are obtained through a weighted sum fusion operation based on the similarity between the first statement feature vector and the second statement feature vector, the similarity or difference between the first fusion vector and the second fusion vector is weighted and enhanced, and the connection of irrelevant vectors is reduced. Therefore, the correlation between a third statement feature vector obtained by feature extraction based on the first fusion vector and a fourth statement feature vector obtained by feature extraction based on the second fusion vector is further strengthened; then, a correlation degree feature matrix is obtained based on the third statement feature vector and the fourth statement feature vector, and further a correlation score is obtained. The correlation score can represent the correlation degree between the to-be-retrieved statement and the preset standard statement. When the correlation score meets the preset condition, it can be determined that the correlation degree between the to-be-retrieved statement and the preset standard statement is high, and high-matching retrieval of the to-be-retrieved statement is realized. Based on the engineering construction standard text retrieval method, a preset standard statement with high relevance to the to-be-retrieved statement can be quickly obtained, overcoming the problem that the related technology cannot guarantee the efficiency and accuracy of text retrieval.

[0050] According to an embodiment of the present disclosure, the engineering construction standard text retrieval method further includes obtaining the to-be-retrieved statement from the input document before obtaining the to-be-query statement pair based on the to-be-retrieved statement and the preset standard statement.

[0051] Obtaining the to-be-retrieved statement includes:

[0052] Based on the input document, text data is obtained. Based on the text data, using a preset word segmentation rule, multiple fields are obtained. Based on the multiple fields, the to-be-retrieved word is screened out. Based on the to-be-retrieved word, the to-be-retrieved statement is obtained.

[0053] According to an embodiment of the present disclosure, the input document can be the measured data recorded based on the actual scenario in the Word format, and can include text records and table records. The input document can be parsed to obtain the text records therein, and the content of the text records is stored item by item as text data.

[0054] According to an embodiment of the present disclosure, based on text data, using a preset word segmentation rule, a word segmentation operation is performed through a word segmentation tool to obtain multiple fields. Among them, the preset word segmentation rule includes comparing, through a preset professional term word segmentation directory, the professional terms included in the preset professional term word segmentation directory with the words included in the text data, directly extracting the words that match the professional terms included in the preset professional term word segmentation directory from the text data without performing a word segmentation operation through the word segmentation tool, and directly performing a word segmentation operation on the words or paragraphs that do not match the professional terms included in the preset professional term word segmentation directory, thereby completing the word segmentation operation and obtaining multiple fields.

[0055] According to an embodiment of the present disclosure, the multiple fields are screened to remove unnecessary words. For example, conjunctions such as "de", "di", and / or "de" can be removed, or modal particles such as "a", "ne", and / or "ma" can be removed to obtain the words to be retrieved, so as to obtain the sentence to be retrieved.

[0056] According to an embodiment of the present disclosure, the preset standard sentence is a sentence obtained from a preset standard sentence library. The preset standard sentence is a standard text data based on a standard specification text and obtained through a similar word segmentation operation based on the preset word segmentation rule. Preset standard sentences can also be newly added based on relevant standard specification texts and stored in the preset standard sentence library for subsequent calculation with the sentence to be retrieved.

[0057] According to an embodiment of the present disclosure, through the preset word segmentation rule based on the preset professional term word segmentation directory, using the word segmentation rule, more accurate words to be retrieved related to professional terms are obtained, so that in the subsequent calculation of the sentence to be retrieved and the preset standard sentence, a more accurate retrieval result can be obtained based on the similarity or difference between the sentence to be retrieved and the preset standard sentence.

[0058] According to an embodiment of the present disclosure, based on the similarity between the first sentence feature vector and the second sentence feature vector, through a weighted sum and fusion operation, the first fusion vector and the second fusion vector are obtained, including:

[0059] Based on the similarity between the first sentence feature vector and the second sentence feature vector, the first similarity weighted vector and the second similarity weighted vector are obtained. Based on the first sentence feature vector, the first similarity weighted vector, and the second similarity weighted vector, the first fusion vector is obtained. Based on the second sentence feature vector, the first similarity weighted vector, and the second similarity weighted vector, the second fusion vector is obtained.

[0060] According to an embodiment of the present disclosure, based on the similarity between the first sentence feature vector and the second sentence feature vector, obtaining the first similarity weighted vector and the second similarity weighted vector includes:

[0061] Based on the first sentence feature vector and the second sentence feature vector, a similarity weight is obtained.

[0062] Based on the second sentence feature vector and the similarity weight, a first similarity weighted vector is obtained.

[0063] Based on the first sentence feature vector and the similarity weight, a second similarity weighted vector is obtained.

[0064] According to an embodiment of the present disclosure, obtaining a first fusion vector based on the first sentence feature vector, the first similarity weighted vector, and the second similarity weighted vector includes:

[0065] Based on the first sentence feature vector and the first similarity weighted vector, a first difference vector and a first product vector are obtained. Based on the first sentence feature vector and the second similarity weighted vector, a second difference vector and a second product vector are obtained. Based on the first sentence feature vector, the first similarity weighted vector, the second similarity weighted vector, the first difference vector, the first product vector, the second difference vector, and the second product vector, a first fusion vector is obtained.

[0066] According to an embodiment of the present disclosure, obtaining a second fusion vector based on the second sentence feature vector, the first similarity weighted vector, and the second similarity weighted vector includes:

[0067] Based on the second sentence feature vector and the first similarity weighted vector, a third difference vector and a third product vector are obtained. Based on the second sentence feature vector and the second similarity weighted vector, a fourth difference vector and a fourth product vector are obtained. Based on the second sentence feature vector, the first similarity weighted vector, the second similarity weighted vector, the third difference vector, the third product vector, the fourth difference vector, and the fourth product vector, a second fusion vector is obtained.

[0068] According to an embodiment of the present disclosure, the first sentence feature vector may include a vector representing the sentence features of the forward context information and the backward context information of the sentence to be retrieved, and the second sentence feature vector may include a vector representing the sentence features of the forward context information and the backward context information of the preset standard sentence. The similarity and difference between the first sentence feature vector and the second sentence feature vector obtained based on the first feature extraction exist but are not obvious, and subsequent processing is required to expand the similarity and difference between the vectors.

[0069] According to an embodiment of the present disclosure, in the process of obtaining the first similarity weighted vector and the second similarity weighted vector based on the similarity between the first sentence feature vector and the second sentence feature vector, by assigning a larger weight to the vector elements with higher similarity, more attention can be paid to the key sentences with high similarity in subsequent processing, that is, the features similar to the vector corresponding to the preset standard sentence in the vector corresponding to the sentence to be retrieved can be strengthened.

[0070] According to an embodiment of the present disclosure, in the process of obtaining the first fusion vector based on the first statement feature vector, the first similarity weighting vector, and the second similarity weighting vector, in order to further strengthen the features in the vector corresponding to the statement to be retrieved that are similar to the vector corresponding to the preset standard statement, and strengthen the features in the vector corresponding to the statement to be retrieved that are different from the vector corresponding to the preset standard statement, operations such as multiplication and subtraction can be performed based on the first statement feature vector, the first similarity weighting vector, and the second similarity weighting vector to obtain a difference vector and a product vector. Then, the obtained difference vector, product vector, the first statement feature vector, the first similarity weighting vector, and the second similarity weighting vector are subjected to a superposition operation to obtain the first fusion vector. The second fusion vector is obtained through a similar operation. In the process of obtaining the first fusion vector and the second fusion vector, the first similarity weighting vector and the second similarity weighting vector used are obtained based on the similarity weights obtained from the first statement feature vector and the second statement feature vector. The feature vector of the first statement performs feature interaction with the second similarity weighting vector, and the feature vector of the second statement performs feature interaction with the first similarity weighting vector, enhancing the same features and different features between the first statement feature vector and the second statement feature vector, and realizing the deep interaction between the first statement feature vector and the second statement feature vector.

[0071] According to an embodiment of the present disclosure, on the other hand, a method for training a deep learning model is provided.

[0072] Figure 2 A framework diagram of a deep learning model according to an embodiment of the present disclosure is schematically shown.

[0073] As Figure 2 shown, the deep learning model 200 includes: a statement to be retrieved acquisition module 210, a standard statement acquisition module 220, and a text retrieval module 230.

[0074] According to an embodiment of the present disclosure, to train the statement to be retrieved acquisition module 210, sample statements to be retrieved can be obtained based on sample documents. To train the standard statement acquisition module 220, sample standard statements can be obtained based on sample standard documents. To train the text retrieval module 230, sample correlation scores can be obtained based on the sample statements to be retrieved and the sample standard statements.

[0075] According to an embodiment of the present disclosure, the deep learning model can also be trained based on the sample correlation scores, and the network parameters of the deep learning model can be adjusted to obtain a trained deep learning model.

[0076] Figure 3 A flowchart of a model training method according to an embodiment of the present disclosure is schematically shown.

[0077] As Figure 3As shown, the training method of the deep learning model 200 includes operations S310 to S340.

[0078] In operation S310, the sample document is input into the to-be-retrieved statement acquisition module 210 to obtain the sample to-be-retrieved statement.

[0079] In operation S320, the sample standard document is input into the standard statement acquisition module 220 to obtain the sample standard statement.

[0080] In operation S330, the sample to-be-retrieved statement and the sample standard statement are input into the text retrieval module 230 to obtain the sample correlation score.

[0081] In operation S340, the deep learning model 200 is trained based on the sample correlation score and the label value to obtain the trained deep learning model 200.

[0082] In operation S330 where the sample to-be-retrieved statement and the sample standard statement are input into the text retrieval module 220 to obtain the sample correlation score, operations S331 to S335 are further included.

[0083] In operation S331, a sample matrix is obtained based on the sample to-be-retrieved statement and the sample standard statement.

[0084] In operation S332, feature extraction is performed on the sample matrix to obtain the first sample statement feature vector and the second sample statement feature vector.

[0085] In operation S333, based on the similarity between the first sample statement feature vector and the second sample statement feature vector, through a weighted sum fusion operation, the first sample fusion vector and the second sample fusion vector are obtained.

[0086] In operation S334, feature extraction is performed on the first sample fusion vector to obtain the third sample statement feature vector, and feature extraction is performed on the second sample fusion vector to obtain the fourth sample statement feature vector.

[0087] In operation S335, based on the third sample statement feature vector and the fourth sample statement feature vector, a sample correlation degree feature matrix is obtained.

[0088] The sample correlation degree feature matrix characterizes the correlation degree between the sample to-be-retrieved statement and the sample standard statement.

[0089] According to an embodiment of the present disclosure, in operation S310, inputting the sample document into the to-be-retrieved statement acquisition module 210 to obtain the sample to-be-retrieved statement includes:

[0090] Based on the sample document, obtain sample text data. Based on the sample text data, use the preset word segmentation rules to obtain multiple sample fields. Based on the multiple sample fields, filter to obtain the sample terms to be retrieved. Based on the sample terms to be retrieved, obtain the sample retrieval statements.

[0091] According to an embodiment of the present disclosure, in actual use, the input document may include an engineering document, which is mainly recorded in Word format for data storage, modification, and transmission. The engineering document mainly includes text records and table records. The standard specification text records can be retrieved based on the engineering document to obtain the corresponding standard specification text for compliance checking to ensure the normal implementation of the project and the project quality. Thus, when training the deep learning model 200 capable of performing text retrieval, the sample text data can be obtained based on the Word format sample document.

[0092] According to an embodiment of the present disclosure, the Word format sample document can be parsed through the document parsing package, and the content of the text records in the sample document is stored item by item to obtain the sample text data.

[0093] According to an embodiment of the present disclosure, first, based on relevant engineering construction standard texts such as professional books, relevant specifications, and standard specification text records, a professional term word segmentation directory is constructed, and the professional term word segmentation directory may include multiple relevant professional terms. The jieba word segmentation tool can be used to perform initial word segmentation on the sample text data to obtain multiple sample fields. After completing the initial word segmentation operation, the multiple sample fields are filtered. It can be understood that the filtering operation is similar to the operation of filtering multiple fields in the above-mentioned engineering construction standard text retrieval method and will not be elaborated here.

[0094] According to an embodiment of the present disclosure, after obtaining the sample terms to be retrieved, in the case where the sample terms to be retrieved are not stored in the professional term word segmentation directory, the sample terms to be retrieved are added to the professional term word segmentation directory for storage for subsequent word segmentation operations.

[0095] According to an embodiment of the present disclosure, in operation S320, input the sample standard document into the standard statement obtaining module 220, and the obtained sample standard statements include:

[0096] Based on the sample standard document, obtain sample standard text data. Based on the sample standard text data, use the preset article extraction rules to obtain sample standard article data. Based on the sample standard article data, use the preset word segmentation rules to obtain multiple sample standard fields. Based on the sample standard fields, filter to obtain sample standard words. Based on the sample standard words, obtain sample standard statements. Update the preset article extraction rules based on the sample standard words.

[0097] According to an embodiment of the present disclosure, a sample standard document may include standard specification text records or relevant regulations. The standard specification text records and relevant regulations are mainly stored in PDF documents, which include a large amount of engineering experience and practical experience.

[0098] According to an embodiment of the present disclosure, the sample standard document stored in an editable PDF document can be processed by the pdfminer tool to extract the sample standard text data therein; the sample standard document stored in an uneditable PDF document can also be processed by PDF processing software or OCR technology to extract the sample standard text data therein.

[0099] According to an embodiment of the present disclosure, since one natural paragraph in the standard specification text records and relevant regulations may include one or more sentences, it is difficult to completely express the meaning of the standard specification text records and relevant regulations when dividing them according to full stops. Therefore, based on the standard specification text records and relevant regulations, using a preset clause extraction rule, the sample standard document can be separated sentence by sentence, and then one or more sentences representing the same standard specification text record and relevant regulations are stored as one sample standard sentence for subsequent use.

[0100] According to an embodiment of the present disclosure, the preset clause extraction rule may include:

[0101] Perform an operation of searching for clause numbers on each sentence of the sample standard document separated sentence by sentence until the lowest-level clause number is obtained, and supplement the lowest-level sub-clause numbers with incomplete clause numbers. For example, Article 2 includes Articles 2.1 and 2.2. Among them, Article 2.2 has 3 lowest-level sub-clauses, and the original sub-clause numbers are "1.", "2.", "3.", which are supplemented with complete clause serial numbers "2.2.1.", "2.2.2.", "2.2.3.". Search for punctuation marks such as full stops, semicolons, and exclamation marks that represent the end of a sentence in the supplemented complete sample standard document. If there is a line break immediately following the punctuation mark, remove the line break. Check whether the punctuation mark is followed by a preset clause level. If the punctuation mark is followed by a preset clause level, it indicates that the sample standard sentence corresponding to this clause is not ended, and the sentence where the clause number is located is added to the sample standard clause data to which it belongs. For example, if the punctuation mark is followed by Article 2.3, it indicates that Article 2 is not ended, and Article 2.3 is added to the sample standard clause data corresponding to Article 2. If, in the case where the punctuation mark corresponding to Article 2.2 is followed by Article 3., it indicates that Article 2 is ended, and a line break needs to be added after this punctuation mark. Repeat the above steps of checking whether the punctuation mark is followed by a preset clause level and the corresponding operations after judgment until the sample standard document is divided completely to obtain the sample standard clause data.

[0102] According to an embodiment of the present disclosure, it can be understood that in the case of sample standard clause data, obtaining sample standard statements based on the standard clause data and updating the preset clause extraction rule based on the sample standard words are similar to the operations in the above engineering construction standard text retrieval method, which will not be elaborated herein.

[0103] According to an embodiment of the present disclosure, before inputting the sample statement to be retrieved and the sample standard statement into the text retrieval module 230 in operation S330, it may further include: obtaining the sample statement to be retrieved and the sample standard statement to obtain a sample query statement pair. Among them, the sample query statement pair with the content of the sample statement to be retrieved not matching the content of the sample standard statement may be set as a negative ratio query statement pair, and the sample query statement pair with the content of the sample statement to be retrieved matching the content of the sample standard statement may be set as a positive ratio query statement pair. The quantity ratio of the negative ratio query statement pair to the positive ratio query statement pair is obtained as 1:1. The negative ratio query statement pair and the positive ratio query statement pair may also be divided into a training set, a validation set, and a test set.

[0104] Figure 4 Schematically shows a neural network structure diagram of a deep learning model according to an embodiment of the present disclosure.

[0105] According to an embodiment of the present disclosure, a bi-directional long short-term memory network (Bi-LSTM) has the ability to retain long-term memory, plays a role in memorizing important information and forgetting unimportant information, and can be used to extract sentence-level information related to text based on the text input into the bi-directional long short-term memory network.

[0106] According to an embodiment of the present disclosure, a convolutional neural network (CNN) can extract key information from a large amount of data and compress the amount of information, and can be used to extract key information features and compress the key information features.

[0107] According to an embodiment of the present disclosure, the attention mechanism in the deep learning model can make the model pay more attention to the key parts of the statement by weighting similar information, and can strengthen the features of the statement representation.

[0108] According to an embodiment of the present disclosure, the advantages of the long short-term memory neural network and the convolutional neural network can be combined, the attention mechanism can be coupled between the first long short-term memory neural network and the second long short-term memory neural network, the attention mechanism can be embodied as a vector interaction weighting layer and a calculation layer, and a convolutional extraction layer is arranged before the output layer to obtain an enhanced long short-term memory convolutional neural network model (ESCM) for text semantic reasoning, and calculate the correlation degree between query statement pairs, so as to realize text retrieval.

[0109] As Figure 4 shown, sample query statement pairs can be obtained from the training set and input into the word vector embedding layer to obtain a sample matrix.

[0110] According to an embodiment of the present invention, the sample matrix can be represented by the following formula (1):

[0111]

[0112] where (M, N) is the sample matrix; is the vector corresponding to the sample retrieval statement composed of vector elements corresponding to m sample retrieval words; is the vector corresponding to the sample standard statement composed of vector elements corresponding to n sample standard words.

[0113] According to an embodiment of the present invention, the sample matrix is input into the first bidirectional long short-term memory network (Bi-directional Long Short-Term Memory, Bi-LSTM) for feature extraction to obtain a first sample statement feature vector and a second sample statement feature vector.

[0114] According to an embodiment of the present invention, the first sample statement feature vector can be represented by the following formula (2):

[0115]

[0116] where MA is the first sample statement feature vector, ML is the sample extraction result of forward sequential feature extraction in MA; MR is the sample extraction result of backward sequential feature extraction in MA; Bi-LSTM(·) is feature extraction through the bidirectional long short-term memory network; i is the element ordinal number in MA, representing the dynamic value-taking process of the Bi-LSTM network from 1 to L on MA M of, i and L M are positive integers, and L M is the boundary value of the first value range of i.

[0117] According to an embodiment of the present invention, the second sample statement feature vector can be represented by the following formula (3):

[0118]

[0119] where NA is the second sample statement feature vector, NL is the sample extraction result of forward sequential feature extraction in NA; NR is the sample extraction result of backward sequential feature extraction in NA; j is the element ordinal number in MA, representing the dynamic value-taking process of the Bi-LSTM network from 1 to L on NA N of, j and L Nis a positive integer, L N is the boundary value of the first value range of j.

[0120] According to an embodiment of the present disclosure, based on the similarity between the first sample statement feature vector and the second sample statement feature vector, through a weighted sum fusion operation, obtaining the first sample fusion vector and the second sample fusion vector includes:

[0121] Based on the similarity between the first sample statement feature vector and the second sample statement feature vector, obtaining a first sample similarity weighted vector and a second sample similarity weighted vector; based on the first sample statement feature vector, the first sample similarity weighted vector, and the second sample similarity weighted vector, obtaining a first sample fusion vector, and based on the second sample statement feature vector, the first sample similarity weighted vector, and the second sample similarity weighted vector, obtaining a second sample fusion vector;

[0122] Performing feature extraction on the first sample fusion vector to obtain a third sample statement feature vector, and performing feature extraction on the second sample fusion vector to obtain a fourth sample statement feature vector.

[0123] According to an embodiment of the present disclosure, the first sample statement feature vector and the second sample statement feature vector can be input into a vector interaction weighted layer, and based on the first sample statement feature vector and the second sample statement feature vector, the sample attention weights between the two vectors are obtained.

[0124] According to an embodiment of the present invention, the sample attention weights can be represented by the following formula (4):

[0125] W ij = MA i T NA j (4)

[0126] Wherein, W ij is the sample attention weight; MA i T is the transpose matrix of MA.

[0127] According to an embodiment of the present disclosure, the higher the word similarity between the first sample statement feature vector and the second sample statement feature vector, the larger W ij is, and the more attention the corresponding vector elements assigned by subsequent W ij can obtain in the calculation by the deep learning model 200.

[0128] According to an embodiment of the present disclosure, the first sample similarity weighted vector and the second sample similarity weighted vector can be obtained in the vector interaction weighted layer based on the similarity between the first sample statement feature vector and the second sample statement feature vector.

[0129] According to an embodiment of the present invention, the first sample similarity weighted vector can be obtained through the following formula (5):

[0130]

[0131] where M′ j is the first sample similarity weighted vector.

[0132] According to an embodiment of the present invention, the second sample similarity weighted vector can be obtained through the following formula (6):

[0133]

[0134] where N′ i is the second sample similarity weighted vector.

[0135] According to an embodiment of the present disclosure, the attention weight between the first sample statement feature vector and the second sample statement feature vector can be calculated by means of a dot product. Based on this weight, the first sample statement feature vector and the second sample statement feature vector corresponding to the sample query statement pair are multiplied one by one to obtain the first sample similarity weighted vector and the second sample similarity weighted vector. The obtained first sample similarity weighted vector and second sample similarity weighted vector represent that the sample to-be-retrieved statement content in the sample query statement pair and the sample standard statement have a deep interaction, and the similarities and differences between the first sample similarity weighted vector and the second sample similarity weighted vector are enhanced, so as to realize the mutual reasoning between the sample to-be-retrieved statement content and the sample standard statement subsequently.

[0136] According to an embodiment of the present disclosure, through the calculation layer of the deep learning model 200, based on the first sample statement feature vector and the first sample similarity weighted vector, the first sample difference vector and the first sample product vector are obtained through vector subtraction and vector multiplication operations. Based on the first sample statement feature vector and the second sample similarity weighted vector, the second sample difference vector and the second sample product vector are obtained through vector subtraction and vector multiplication operations. Based on the first sample statement feature vector, the first sample similarity weighted vector, the second sample similarity weighted vector, the first sample difference vector, the first sample product vector, the second sample difference vector, and the second sample product vector, the first sample fusion vector is obtained in the calculation layer. The second sample fusion vector is obtained through a similar operation.

[0137] According to an embodiment of the present disclosure, the third sample statement feature vector can be represented through the following formula (7) based on the first sample fusion vector:

[0138] MA′=(ML′, MR′)=Bi-LSTM(M″, i, l M″ -i) (7)

[0139] Among them, MA′ is the third sample statement feature vector; M″ is the first sample fusion vector; ML′ is the sample extraction result of extracting features in the forward order in MA′; MR′ is the sample extraction result of extracting features in the backward order in MA′; l M″ is the boundary value of the second value range of i, l M″ is a positive integer.

[0140] According to an embodiment of the present disclosure, the fourth sample statement feature vector can be obtained based on the second sample fusion vector through the following formula (8):

[0141] NA′ = (NL′, NR′) = Bi-LSTM(N″, j, l N″ -j) (8)

[0142] Among them, NA′ is the third sample statement feature vector; N″ is the first sample fusion vector; NL′ is the sample extraction result of extracting features in the forward order in NA′; NR′ is the sample extraction result of extracting features in the backward order in NA′; l N″ is the boundary value of the second value range of j, l N″ is a positive integer.

[0143] According to an embodiment of the present disclosure, MA′ and NA′ include the results of the inference of the deep learning model 200, which contain the differences between positive examples or negative examples. The degree of association between the corresponding sample statement to be retrieved and the sample standard statement can be judged according to the magnitude of the difference. For example, the greater the difference, the smaller the degree of association. If the features are directly extracted based on MA′ and NA′ to judge the level of their differences, the dimensionality of the MA′ and NA′ feature vectors is too high, which is not conducive to quickly obtaining the difference results. The sample association degree feature matrix can be obtained based on the third sample statement feature vector and the sample fourth statement feature vector in the convolution extraction layer.

[0144] According to an embodiment of the present disclosure, the sample association degree feature matrix can be obtained based on the third sample statement feature vector and the sample fourth statement feature vector through the following formula (9):

[0145] MN = conv(concat(average(MA′), max(MA′), average(NA′), max(NA′))) (9)

[0146] Among them, MN is the sample association degree feature matrix; conv represents the convolution operation; concat represents the concatenation operation; average represents the operation of calculating the average value; max represents the operation of calculating the maximum value.

[0147] According to an embodiment of the present disclosure, in the process of obtaining the sample correlation feature matrix, the global feature and the most obvious feature can be retained respectively by two methods of calculating the vector average value and the vector maximum value, and after splicing the global feature and the most obvious feature, further extraction and compression are performed on them to reduce the dimension of the spliced feature. In the process of extraction and compression, in order to ensure the integrity of the word vector, a one-dimensional convolution method can be adopted, that is, the length of the convolution kernel is the same as the dimension of the word vector, and the convolution operation is only performed in the sentence length direction to extract text features, so as to ensure the integrity of the word vector.

[0148] According to an embodiment of the present disclosure, obtaining the sample correlation score based on the sample correlation feature matrix includes:

[0149] Performing dimensionality reduction processing on the sample correlation feature matrix to obtain low-dimensional features; and

[0150] Obtaining the sample correlation score based on the low-dimensional features.

[0151] According to an embodiment of the present disclosure, dimensionality reduction processing can be performed on the sample correlation feature matrix in the convolutional extraction layer to obtain low-dimensional features.

[0152] According to an embodiment of the present disclosure, the sample correlation score obtained based on the sample correlation feature matrix can be represented by the following formula (10):

[0153] prediction = softmax(MN) (10)

[0154] Where prediction is the sample correlation score; softmax(·) is to score the low-dimensional features through a function.

[0155] According to an embodiment of the present disclosure, in the case of obtaining the sample correlation score in the output layer, the loss value between the sample correlation score and the label value can be obtained based on the sample correlation score and the label value, and the network parameters of the deep learning model 200 can be adjusted based on the loss value to train the deep learning model 200 to obtain the trained deep learning model 200.

[0156] According to an embodiment of the present disclosure, the loss value between the sample correlation score and the label value obtained based on the sample correlation score and the label value can be represented by the following formula (11):

[0157] Loss = CE(prediction, label) (11)

[0158] Where Loss is the loss value; CE(·) is the cross-entropy function; prediction is the sample correlation score; label is the label value, representing the true result.

[0159] According to an embodiment of the present disclosure, the engineering construction standard text retrieval method can be used for compliance detection in the process of infrastructure engineering construction. A weekly supervision report of a dam project in a certain water conservancy and hydropower project can be selected as a sample document, and relevant engineering construction standard texts such as relevant standard specification text records can be used as sample standard documents to train the deep learning model 200.

[0160] According to an embodiment of the present disclosure, after the above processing of the engineering supervision weekly report and relevant standard specification text records, sample sentences to be retrieved and sample standard sentences are obtained to obtain query sentence pairs. Among them, in the process of vectorizing the sentence pairs to be retrieved to obtain a preset matrix, 10 words of the word context can be selected to train the word vectors of the words in the sentence pairs to be retrieved, the vector dimension is set to 100 dimensions, and the NEC loss function is used for negative sampling to accelerate the calculation time, and the number of iterations is 100,000 rounds. Finally, the word vectors included in the preset matrix are obtained.

[0161] Figure 5 Schematically shows a schematic diagram of word vector aggregation according to an embodiment of the present disclosure.

[0162] As Figure 5 shown, there is a semantic association between the word representations in the three dotted boxes in the figure, and their corresponding vectors are aggregated at relatively close coordinate positions.

[0163] According to an embodiment of the present disclosure, 4,600 sample query sentence pairs can be used as a training set, 1,500 sample query sentence pairs can be used as a validation set, and 1,500 sample query sentence pairs can be used as a test set. In the training set, validation set and test set, the quantity ratio of negative query sentence pairs to positive query sentence pairs can be maintained at 1:1.

[0164] According to an embodiment of the present disclosure, the specific parameters of the deep learning model 200 can be set. The number of hidden layers of the Bi-LSTM is selected to be 128, and the number of convolution kernels in the convolutional layer is 32, and one-dimensional convolution is used for convolution. The cross-entropy loss function is used to obtain the loss value, and the specific parameters of the deep learning model 200 are continuously adjusted based on the loss value to optimize the accuracy of the deep learning model 200 and complete the training of the deep learning model 200.

[0165] According to an embodiment of the present disclosure, based on the training set to train the deep learning model 200, the number of training calculation rounds can be set to 50 rounds. During the training process, the validation set is continuously used to verify the effect of the deep learning model 200, and the corresponding training set loss value, validation set loss value, training set accuracy and validation set accuracy are obtained. After the training is completed, the accuracy of the trained deep learning model 200 can be tested using the test set.

[0166] According to an embodiment of the present disclosure, it can also be set that if the accuracy of the validation set obtained within 15 training calculation rounds does not increase, the training ends.

[0167] Figure 6 Schematically shows a schematic diagram of the loss value results of the training set and the validation set during the training process according to an embodiment of the present disclosure.

[0168] Figure 7 Schematically shows a schematic diagram of the calculation accuracy results of the training set and the validation set during the training process according to an embodiment of the present disclosure.

[0169] As Figure 6 and Figure 7 shown, in the first 10 training calculation rounds, the loss value continuously decreases. The loss value of the training set can be reduced to around 0.22, and the loss value of the validation set can be reduced to around 0.37. The accuracy rate rises rapidly. The accuracy rate of the training set reaches 92.39%, and the accuracy rate of the validation set reaches 86.10%. In the subsequent training calculation rounds, both the size of the loss value and the improvement of the accuracy rate slow down.

[0170] According to an embodiment of the present disclosure, the highest accuracy rate that the final model can achieve on the validation set is 87.90%. The corresponding accuracy rate that can be achieved on the test set is 86.00%. The time consumed to obtain the target standard statement on the test set can be compressed to 18 seconds. The trained deep learning model 200 can obtain a relatively high accuracy rate, meeting the calculation requirements; and the speed of obtaining the target standard statement is fast and the efficiency is high.

[0171] According to an embodiment of the present disclosure, based on the trained deep learning model 200, it is possible to retrieve the target standard specification articles based on the engineering text records to be matched, so as to retrieve the target standard specification articles based on the operations in the project, which has a good promoting effect on accelerating the project construction progress and ensuring the project construction quality.

[0172] Figure 8 Schematically shows a block diagram of an electronic device suitable for implementing the engineering construction standard text retrieval method and the model training method according to an embodiment of the present disclosure.

[0173] Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present disclosure.

[0174] As Figure 8As shown, the computer electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. The processor 801 can include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application-specific integrated circuit (ASIC)), and so on. The processor 801 can also include on-board memory for caching purposes. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0175] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to an embodiment of the present disclosure by executing the programs in the ROM 802 and / or the RAM 803. It should be noted that the program can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method flow according to an embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0176] According to an embodiment of the present disclosure, the electronic device 800 can further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 can further include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read from it can be installed into the storage section 808 as needed.

[0177] According to an embodiment of the present disclosure, the method flow according to the embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the above-described system, device, apparatus, module, unit, etc. can be implemented by computer program modules.

[0178] The flowcharts and block diagrams in the accompanying drawings schematically illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0179] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly recited in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features recited in the various embodiments and / or claims of the present disclosure can be combined and combined in various ways. All such combinations and / or combinations fall within the scope of the present disclosure.

[0180] The above describes the embodiments of the present disclosure. However, these embodiments are only for explaining the purpose, technical solutions, and beneficial effects of the present disclosure, and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, and within the spirit and principles of the present disclosure, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the protection scope of the present disclosure.

Claims

1. An engineering construction standard text retrieval method based on semantic reasoning, comprising: Obtaining a query statement pair based on the statement to be retrieved and a preset standard statement, where the preset standard statement is a statement obtained from the preset standard statement library, and the query statement pair includes a retrieval term corresponding to the statement to be retrieved and a standard term corresponding to the preset standard statement; Performing feature extraction on a preset matrix to obtain a first statement feature vector and a second statement feature vector, where the preset matrix is obtained by vectorizing the retrieval term and the standard term; Based on the similarity between the first statement feature vector and the second statement feature vector, through weighted sum and fusion operations, obtaining a first fusion vector and a second fusion vector; Performing feature extraction on the first fusion vector to obtain a third statement feature vector, and performing feature extraction on the second fusion vector to obtain a fourth statement feature vector; Based on the third statement feature vector and the fourth statement feature vector, obtaining a correlation degree feature matrix, where the correlation degree feature matrix represents the correlation degree between the statement to be retrieved and the preset standard statement; and Obtaining a correlation score based on the correlation degree feature matrix, and when the correlation score meets a preset condition, confirming the preset standard statement as the target standard statement and outputting it; The step of obtaining a first fusion vector and a second fusion vector through weighted sum and fusion operations based on the similarity between the first statement feature vector and the second statement feature vector includes: Based on the similarity between the first statement feature vector and the second statement feature vector, obtaining a first similarity weighted vector and a second similarity weighted vector; Based on the first statement feature vector, the first similarity weighted vector, and the second similarity weighted vector, obtaining the first fusion vector; and Based on the second statement feature vector, the first similarity weighted vector, and the second similarity weighted vector, obtaining the second fusion vector. The method according to claim 1, further comprising obtaining the statement to be retrieved from the input document, including: Obtaining text data based on the input document; Based on the text data, using a preset word segmentation rule to obtain a plurality of fields; Based on the plurality of fields, screening to obtain the retrieval term; And Based on the retrieval term, obtaining the statement to be retrieved.

3. The method according to claim 1, wherein The step of obtaining a first similarity weighted vector and a second similarity weighted vector based on the similarity between the first statement feature vector and the second statement feature vector includes: Based on the first statement feature vector and the second statement feature vector, obtaining a similarity weight; Based on the second statement feature vector and the similarity weight, obtaining a first similarity weighted vector; and Based on the first statement feature vector and the similarity weight, obtaining a second similarity weighted vector.

4. The method according to claim 1, wherein, The step of obtaining a first fusion vector based on the first statement feature vector, the first similarity weighted vector, and the second similarity weighted vector includes: Based on the first statement feature vector and the first similarity weighted vector, obtaining a first difference vector and a first product vector; Based on the first statement feature vector and the second similarity weighted vector, a second difference vector and a second product vector are obtained; Based on the first statement feature vector, the first similarity weighted vector, the second similarity weighted vector, the first difference vector, the first product vector, the second difference vector and the second product vector, the first fusion vector is obtained; and The obtaining of the second fusion vector based on the second statement feature vector, the first similarity weighted vector and the second similarity weighted vector includes: Based on the second statement feature vector and the first similarity weighted vector, a third difference vector and a third product vector are obtained; Based on the second statement feature vector and the second similarity weighted vector, a fourth difference vector and a fourth product vector are obtained; Based on the second statement feature vector, the first similarity weighted vector, the second similarity weighted vector, the third difference vector, the third product vector, the fourth difference vector and the fourth product vector, the second fusion vector is obtained.

5. A training method for a deep learning model, the deep learning model including a to-be-retrieved statement acquisition module, a standard statement acquisition module and a text retrieval module; The training method includes: Inputting a sample document into the to-be-retrieved statement acquisition module to obtain a sample to-be-retrieved statement; Inputting a sample standard document into the standard statement acquisition module to obtain a sample standard statement; Inputting the sample to-be-retrieved statement and the sample standard statement into the text retrieval module to obtain a sample correlation score; and Training the deep learning model based on the sample correlation score and a label value to obtain a trained deep learning model; wherein, the inputting the sample to-be-retrieved statement and the sample standard statement into the text retrieval module to obtain a sample correlation score includes: Obtaining a sample matrix based on the sample to-be-retrieved statement and the sample standard statement; Performing feature extraction on the sample matrix to obtain a first sample statement feature vector and a second sample statement feature vector; Based on the similarity between the first sample statement feature vector and the second sample statement feature vector, through weighted sum and fusion operations, a first sample fusion vector and a second sample fusion vector are obtained; Performing feature extraction on the first sample fusion vector to obtain a third sample statement feature vector, and performing feature extraction on the second sample fusion vector to obtain a fourth sample statement feature vector; Based on the third sample statement feature vector and the fourth sample statement feature vector, a sample correlation degree feature matrix is obtained, and the sample correlation degree feature matrix characterizes the correlation degree between the sample to-be-retrieved statement and the sample standard statement; The obtaining of the first sample fusion vector and the second sample fusion vector based on the similarity between the first sample statement feature vector and the second sample statement feature vector through weighted sum and fusion operations includes: Based on the similarity between the first sample statement feature vector and the second sample statement feature vector, a first sample similarity weighted vector and a second sample similarity weighted vector are obtained; based on the first sample statement feature vector, the first sample similarity weighted vector and the second sample similarity weighted vector, a first sample fusion vector is obtained, and based on the second sample statement feature vector, the first sample similarity weighted vector and the second sample similarity weighted vector, a second sample fusion vector is obtained; Feature extraction is performed on the first sample fusion vector to obtain a third sample statement feature vector, and feature extraction is performed on the second sample fusion vector to obtain a fourth sample statement feature vector.

6. The method according to claim 5, wherein, The obtaining of the sample association score based on the sample association degree feature matrix includes: Based on the sample association degree feature matrix, dimensionality reduction processing is performed to obtain low-dimensional features; and Based on the low-dimensional features, the sample association score is obtained.

7. The method according to claim 5, wherein, The inputting of the sample standard document into the standard statement obtaining module to obtain the sample standard statement includes: Based on the sample standard document, sample standard text data is obtained; Based on the sample standard text data, using a preset clause extraction rule, sample standard clause data is obtained; Based on the sample standard clause data, using a preset word segmentation rule, a plurality of sample standard fields are obtained; Based on the sample standard fields, sample standard words are screened out; and Based on the sample standard words, the sample standard statement is obtained.

8. An electronic device, comprising: One or more processors; And A memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Deep text matching method and device based on unlogged word processing

    CN109992788A

  • Text similarity measurement method based on semantic document expression

    CN111444700A