Knowledge question-answering method and system for vertical domain design document
By preprocessing the vertical domain design document and using the dual-scoring learning model, a vertical domain knowledge base is built, which solves the problem of low efficiency in the unstructured data search in the vertical domain design document, and realizes efficient and trustworthy knowledge extraction and query.
Patent Information
- Application Number
- CN202411492396.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art is difficult to efficiently find and extract unstructured key data from vertical design documents, resulting in inefficient and costly technicians when searching for information.
By reading the design document for preprocessing, converting it into word embedding representation, and using the dual-scoring hierarchical learning model to extract the fusion scoring matrix of vertical domain knowledge and labels, constructing a vertical domain knowledge dictionary and knowledge base, and realizing a question-and-answer query for the knowledge base .
It improves the efficiency of extracting and querying vertical knowledge in design documents, reduces labor and time costs for technicians, enhances the credibility of answers, and is suitable for natural language form queries of complex logic.
Smart Images

Figure CN119397033A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge question and answer query technology, and in particular to a knowledge question and answer method and system for vertical domain design documents. Background Art
[0002] The design documents generated during the construction process in the vertical domain include various key data, which can be used to assist in document writing and subsequent data analysis and evaluation. However, since the various key data in the documents are recorded in an unstructured form, technicians need to spend a lot of time and resources to find information in the documents, resulting in low work efficiency and increased manpower and time costs. Therefore, it is crucial to implement a question-and-answer system for design documents.
[0003] A question-answering system is a system designed to receive questions in natural language from users and provide accurate answers. Compared with search engines, the design goal of a question-answering system is to provide a more convenient and efficient user experience, and to directly give the final answer to the question instead of returning a list of relevant paragraphs or hyperlinks. Most question-answering systems follow three steps: question parsing, document retrieval, and answer extraction. The question-answering system converts questions into document search queries, searches for text and data related to the query in the documents, and finally returns the answer.
[0004] At present, mainstream intelligent question-answering methods have insufficient expressive power for reasoning and statistical tasks and are not suitable for the current situation of small-scale vertical domain design document collections and no data sets. In addition, generative question-answering methods based on large language models cannot guarantee the credibility of generated content, and there are problems of information leakage caused by calling interfaces or huge computing resource consumption caused by local deployment. Summary of the invention
[0005] The present invention provides a knowledge question answering method and system for vertical domain design documents, so as to solve the defects of the prior art.
[0006] The present invention provides a knowledge question answering method for vertical domain design documents, comprising: S1: Read a design document and pre-process the design document to obtain an input text; S2: Convert the input text into word embedding representation; S3: Establish a dual scoring layer, learn the word embedding representation through the dual scoring layer, obtain a fusion scoring matrix of vertical domain knowledge and corresponding labels, and convert the fusion scoring matrix into a prediction sequence of vertical domain knowledge corresponding labels; S4: extracting a vertical domain knowledge dictionary from the input text through a candidate mechanism according to the prediction sequence, and constructing a vertical domain knowledge base according to the vertical domain knowledge dictionary; S5: The vertical domain knowledge base performs knowledge query and returns the query result.
[0007] According to a knowledge question answering method for vertical domain design documents provided by the present invention, step S1 specifically includes: S11: receiving and reading design documents; S12: converting the design document into a dictionary variable corresponding to the original text; S13: According to the preset vertical domain knowledge parameters, the paragraph where the vertical domain knowledge is located in the design document is located according to the dictionary variables to obtain the input text.
[0008] According to a knowledge question answering method for vertical domain design documents provided by the present invention, in step S2, the input text is learned through the BERT layer to obtain a word embedding representation.
[0009] According to a knowledge question answering method for vertical domain design documents provided by the present invention, the dual scoring layer in step S3 includes: A first scoring layer, wherein the first scoring layer is a BiLSTM network; The second scoring layer is an IDCNN network.
[0010] According to a knowledge question-answering method for vertical domain design documents provided by the present invention, the dual scoring layer in step S3 also includes an attention layer and a fully connected layer.
[0011] According to a knowledge question answering method for vertical domain design documents provided by the present invention, step S3 further includes: S31: Input the word embedding representation into the first scoring layer, and obtain a first scoring matrix of vertical domain knowledge elements and labels through an attention layer and a fully connected layer; S32: Input the word embedding representation into the second scoring layer, and obtain a second scoring matrix of vertical domain knowledge elements and labels through an attention layer and a fully connected layer; S33: performing weighted summation on the first scoring matrix and the second scoring matrix to obtain a fusion scoring matrix; S34: The fused rating matrix is converted into a prediction sequence of labels corresponding to vertical domain knowledge through the conditional random field layer.
[0012] According to a knowledge question answering method for vertical domain design documents provided by the present invention, step S5 further includes: S51: receiving a query question; S52: converting the query question into an SQL statement; S53: Perform a search query on the vertical domain knowledge base according to the SQL statement, obtain the query result and return the query result.
[0013] According to a knowledge question answering method for vertical domain design documents provided by the present invention, step S52 further includes: S521: Decoupling the conversion task of the query question to obtain multiple conversion subtasks; S522: converting the multiple sub-query problems corresponding to the multiple conversion sub-tasks into multiple SQL clauses respectively; S523: Combine multiple SQL clauses to obtain an SQL statement corresponding to the query question.
[0014] According to a knowledge question answering method for vertical domain design documents provided by the present invention, step S523 also includes: The conditional values of conditional statements in multiple SQL statements are aligned with the knowledge base, wherein the conditional values include data types and field names.
[0015] The present invention also provides a knowledge question answering system for vertical domain design documents, which is used to execute a knowledge question answering method for vertical domain design documents as described in any one of the above items, including: Preprocessing module: used for reading the design document and preprocessing the design document to obtain input text; Embedding module: used to convert input text into word embedding representation; Scoring module: by learning the word embedding representation based on the established dual scoring layer, a fusion scoring matrix of vertical domain knowledge and corresponding labels is obtained, and the fusion scoring matrix is converted into a prediction sequence of the corresponding labels of the vertical domain knowledge; Construction module: used for extracting a vertical domain knowledge dictionary from the input text through a candidate mechanism according to the prediction sequence, and constructing a vertical domain knowledge base according to the vertical domain knowledge dictionary; Query module: used to perform knowledge query in the vertical domain knowledge base and return the query results.
[0016] The present invention provides a knowledge question-and-answer method and system for vertical domain design documents, which realizes intelligent question-and-answer applications for design documents by extracting information from documents into a knowledge base and realizing question-and-answer queries for the knowledge base. The present invention can constrain the results of question-and-answer queries to come from the vertical domain knowledge existing in the document, improve the credibility of the answer, and satisfy natural language queries with complex logic. For knowledge extraction tasks, the present invention designs knowledge extraction that integrates dual scoring and multi-granularity prediction, which can realize the extraction of vertical domain knowledge in documents and use it for subsequent knowledge base construction, and can guide the large language model to generate a knowledge data set in the form of a design document text for knowledge extraction model training. In addition, the present invention also designs a task-decoupled knowledge base query conversion method for SQL statement structure to realize the conversion of natural language queries to SQL statements. The question-and-answer method proposed in the present invention realizes convenient query of vertical domain design document knowledge, reduces the labor cost and time cost of technical personnel in querying data, improves work efficiency, and has positive significance for specific vertical domains. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of a flow chart of a knowledge question answering method for vertical domain design documents provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a knowledge question and answer system for vertical domain design documents provided in an embodiment of the present invention. Description of the drawings: 100, preprocessing module; 200, embedding module; 300, scoring module; 400, construction module; 500, query module. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments, and they should not be understood as limitations on the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In the description of the present invention, it should be understood that the terms used are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0021] In order to better understand the present invention, the existing knowledge question-answering technology related to the present invention is first explained below.
[0022] Intelligent question-answering technology based on knowledge graph: Intelligent question-answering technology based on knowledge graphs uses structured knowledge graphs and semantic reasoning methods to understand users' natural language questions, retrieve relevant entities and relationships in the knowledge graph, and perform semantic reasoning to ultimately generate accurate answers. This technology can help users quickly acquire knowledge and provide an intelligent and efficient interactive experience, but it also needs to address challenges such as the completeness and accuracy of the knowledge graph.
[0023] However, the construction of knowledge graphs requires a lot of manual work and expert knowledge, involving processes such as knowledge extraction, entity linking, and relationship modeling, so the time and labor costs are high. Secondly, the completeness and accuracy of knowledge graphs are a challenge. In addition, the semantic relationships in knowledge graphs may be ambiguous or lack fine-grained descriptions, resulting in a decrease in the system's performance when answering complex questions or reasoning and inference, and its lack of expressiveness when dealing with reasoning and statistical tasks.
[0024] Intelligent question-answering technology based on machine reading comprehension: Intelligent question-answering technology based on machine reading comprehension uses deep learning and natural language processing methods to enable machines to understand and answer questions raised by users. This technology is trained on large-scale text corpora, enabling the model to extract information from text and reason based on the semantics and context of the question to accurately answer the question. Machine reading comprehension technology has been widely used in various fields and tasks, including question-answering systems, document summarization, information retrieval, etc., to provide users with fast and accurate answers and solutions.
[0025] However, machine reading comprehension models require large amounts of training data and computing resources, and the process of training and adjusting the model is relatively complex and time-consuming. Small data scale will affect the accuracy and reliability of question answering, and it is not suitable for situations such as vertical domain design documents where the data scale is small and there is a lack of corresponding data sets.
[0026] Intelligent question-answering technology based on large language model: Intelligent question-answering technology based on large language models uses large language models trained on large text data sets to provide accurate answers by processing and understanding natural language questions and contextual semantic information. This technology uses pre-trained models to transfer learning on a wide range of language knowledge, giving the model powerful language understanding and generation capabilities. Intelligent question-answering technology based on large language models can be applied to various scenarios, such as question-answering systems, virtual assistants, and intelligent customer service, to provide users with efficient and accurate question answers and information query services.
[0027] However, building a question-answering system based on a large language model usually calls the API provided by the online model, which poses a risk of privacy data leakage. Since the design documents record key sensitive information about drilling, the question-answering system based on the large language model API is not suitable for vertical design document question-answering scenarios. On the other hand, although the question-answering system based on a local large language model can avoid data security issues, its training and inference require huge amounts of memory and video memory resources, and have high hardware requirements. In addition, the answers provided by the question-answering system based on a large language model are generative, which may result in incorrect or unreliable answers, and the answers generated by the large language model are uncertain, which is not conducive to downstream module utilization.
[0028] Combine the following Figure 1 to Figure 2 Embodiments of the present invention are described.
[0029] like Figure 1 As shown, the present invention provides a knowledge question answering method for vertical domain design documents, comprising: S1: Read a design document and pre-process the design document to obtain an input text.
[0030] In step S1, the document in ".docx" format is first read and converted into a unified semi-structured data form, including dictionary variables of objects such as paragraphs, texts and tables, to provide processable data for downstream modules. The present invention uses a string matching method to locate the paragraphs where various vertical domain knowledge is located according to the names of the vertical domain knowledge parameters, and uses the located paragraphs as the input of the knowledge extraction module.
[0031] Wherein, step S1 specifically includes: S11: receiving and reading design documents; S12: converting the design document into a dictionary variable corresponding to the original text; In step S12, the text content in the document is first organized into a dictionary according to paragraphs. Each dictionary item contains text content, location information (such as paragraph number, page number, etc.), and tag information. The dictionary variable refers to a variable that uses a dictionary-like data structure to store and organize document content. It is a built-in data type that stores data in the form of key-value pairs.
[0032] S13: According to the preset vertical domain knowledge parameters, the paragraph where the vertical domain knowledge is located in the design document is located according to the dictionary variables to obtain the input text.
[0033] In step S13, vertical domain knowledge parameters are first obtained, which are regular expressions corresponding to keywords, and are used to define and identify vertical domain knowledge. These parameters are then used to search and locate paragraphs or texts containing vertical domain knowledge in dictionary variables to obtain matching paragraphs or texts.
[0034] S2: Convert the input text into word embedding representation.
[0035] In step S2, the input text is learned through the BERT layer to obtain a word embedding representation.
[0036] In BERT, multiple Transformer encoder layers are stacked. By working together, the stacked encoder layers can generate a high-level, abstract representation of the input text, that is, it is converted into a high-dimensional word embedding representation containing semantic information, which is then used in subsequent tasks.
[0037] S3: Establish a dual scoring layer, learn the word embedding representation through the dual scoring layer, obtain a fusion scoring matrix of vertical domain knowledge and corresponding labels, and convert the fusion scoring matrix into a prediction sequence of vertical domain knowledge corresponding labels.
[0038] The dual scoring layer in step S3 includes: A first scoring layer, wherein the first scoring layer is a BiLSTM network; A second scoring layer, wherein the second scoring layer is an IDCNN network; It also includes attention layers and fully connected layers.
[0039] Furthermore, the dual scoring layers proposed in the present invention are BiLSTM network and IDCNN network. BiLSTM network has strong memory and context understanding ability when processing text sequences, while IDCNN network can capture feature information of text sequences at different scales. Therefore, combining the outputs of the two networks can improve the model's ability to represent text sequences.
[0040] Wherein, step S3 further comprises: S31: Input the word embedding representation into the first scoring layer, and obtain a first scoring matrix of vertical domain knowledge elements and labels through an attention layer and a fully connected layer; S32: Input the word embedding representation into the second scoring layer, and obtain a second scoring matrix of vertical domain knowledge elements and labels through an attention layer and a fully connected layer; S33: performing weighted summation on the first scoring matrix and the second scoring matrix to obtain a fusion scoring matrix; S34: The fused rating matrix is converted into a prediction sequence of labels corresponding to the vertical domain knowledge through the conditional random field layer. In steps S31 to S34, the aforementioned input text is first processed by the BiLSTM network and the IDCNN network, and combined with the attention mechanism, the model calculates two rating matrices respectively. These two rating matrices represent the ratings or probabilities of the two networks classifying text elements into each label; then, the two rating matrices are fused by weighted summation to form a comprehensive rating matrix, which will be used for subsequent sequence label prediction.
[0041] S4: According to the fused prediction sequence, a vertical domain knowledge dictionary is extracted from the input text through a candidate mechanism, and a vertical domain knowledge base is constructed based on the vertical domain knowledge dictionary.
[0042] In step S4, after obtaining the fusion scoring matrix, the candidate mechanism can be used to realize fine-grained type prediction of the extracted data. This method can extract the data corresponding to each vertical domain knowledge and realize the transformation of unstructured data of vertical domain design documents to structured data to form a knowledge base.
[0043] In addition, the present invention also proposes a step-by-step BRTE prompt design method, which uses the GPT model to construct a data set for vertical domain knowledge extraction tasks. BRTE stands for Background-Requirement-Template-Example, that is, the background part: this part provides contextual information of the task, including the background, purpose, and related domain knowledge of the task, which helps the model understand the overall framework of the task and the type of data that needs to be processed. In this embodiment, it is the vertical domain knowledge background; the requirement part: this part specifies the specific requirements that the model should meet when generating output; the template part: this part provides a basic framework or structure for generating output; the example part: provides a specific and referenceable output sample for the model.
[0044] S5: The vertical domain knowledge base performs knowledge query and returns the query result.
[0045] Wherein, step S5 further comprises: S51: receiving a query question; S52: converting the query question into an SQL statement; Wherein, step S52 further comprises: S521: Decouple the conversion task of the query question to obtain multiple conversion subtasks.
[0046] In the process of converting natural language queries into SQL statements, due to the diversity and complexity of natural language queries, directly converting them into complete SQL statements may be a challenge. Therefore, in step 521, this task is first decomposed into multiple subtasks, that is, each clause of the SQL statement is processed separately.
[0047] S522: Convert the multiple sub-query problems corresponding to the multiple conversion sub-tasks into multiple SQL clauses respectively.
[0048] For a given natural language query, this stage does not directly try to generate the entire SQL statement, but first tries to understand and convert different parts of the query, corresponding to the SELECT clause, WHERE clause, etc. of the SQL statement.
[0049] S523: Combine multiple SQL clauses to obtain an SQL statement corresponding to the query question.
[0050] In steps S521 to S523, by decomposing the complex query conversion task into simpler subtasks, the entire task is easier to handle and optimize; secondly, processing different parts of the SQL statement separately can reduce error propagation because the conversion of each part is relatively independent; in addition, since the system can independently process different clauses of the SQL statement, it is easier to adapt to different query requirements and data patterns.
[0051] S53: Perform a search query on the vertical domain knowledge base according to the SQL statement, obtain the query result and return the query result.
[0052] Wherein, step S523 also includes: The conditional values of conditional statements in multiple SQL statements are aligned with the knowledge base, wherein the conditional values include data types and field names.
[0053] Specifically, the above-mentioned data type alignment is to ensure that the data type of the condition value (such as integer, floating point number, string, etc.) in the natural language query is consistent with the data type of the corresponding field in the SQL statement; and the field name correspondence is to ensure the correct correspondence of the field name when mapping the conditions in the natural language query to the fields of the SQL statement. If the field name mentioned in the query is inconsistent with the actual field name in the database, or there is a spelling error, it will cause the query to fail or the result to be inaccurate; the conditional logic consistency is that the conditional logic in the natural language query (such as "greater than", "less than", "equal to", etc.) needs to be accurately converted into the conditional expression in the SQL statement. After alignment, security issues such as SQL injection can be avoided and the query can be executed correctly.
[0054] like Figure 2As shown, the present invention also provides a knowledge question answering system for vertical domain design documents, comprising: Preprocessing module 100: used to read the design document and preprocess the design document to obtain input text; Embedding module 200: used to convert input text into word embedding representation; Scoring module 300: obtaining a fusion scoring matrix of vertical domain knowledge and corresponding labels by learning the word embedding representation based on the established dual scoring layer, and converting the fusion scoring matrix into a prediction sequence of vertical domain knowledge corresponding labels; Construction module 400: used to extract a vertical domain knowledge dictionary from the input text through a candidate mechanism according to the prediction sequence, and construct a vertical domain knowledge base according to the vertical domain knowledge dictionary; Query module 500: used to perform knowledge query in the vertical domain knowledge base and return the query result.
[0055] The present invention also relates to a question-answering platform framework, which adopts a "client-server" architecture design. In the overall design, the platform architecture can be summarized into three main layers: interaction layer, algorithm middle layer and data source layer, among which the interaction layer belongs to the client, and the algorithm middle layer and data source layer belong to the server.
[0056] The interactive layer provides users with a graphical human-computer interaction interface, which is responsible for receiving user input and displaying the corresponding results. This layer includes query sending and result display module, query recommendation module, document upload module, knowledge base management module and document review module. The platform allows users to enter natural language queries and returns and displays the retrieved answers. The platform supports recommending related queries to assist users in the next query, and allows users to upload vertical domain design documents to update the vertical domain knowledge base. The platform can display the content of the current vertical domain knowledge base and allow users to delete and modify the knowledge base data. In addition, the platform supports users to directly search the knowledge base and review the vertical domain design documents uploaded to the platform.
[0057] The algorithm middle layer includes query conversion and result return module, query recommendation module and knowledge extraction and knowledge base construction module. Based on the query conversion method, the platform can convert the natural language query input by the user into SQL statements and return the search results obtained from the vertical domain knowledge base to the client. The platform can generate recommended queries based on the user's previous round of queries and vertical domain knowledge base information and return them to the client. In addition, the platform can automatically extract vertical domain knowledge from the uploaded vertical domain design documents based on the knowledge extraction method and update it to the knowledge base.
[0058] The data source layer includes the vertical domain design document collection and the vertical domain knowledge base. The former is used to store all uploaded vertical domain design documents, and the latter stores the vertical domain knowledge extracted from the vertical domain design documents in the form of a database for user query.
[0059] The vertical domain intelligent question-answering system mentioned above can be deployed to a remote GPU server. Users can upload the vertical domain design documents recorded during the construction process to the system, and the system can automatically extract key vertical domain knowledge from the documents to form a vertical domain knowledge base. Technicians can query key knowledge in the documents by asking questions in natural language. The system can retrieve relevant information in the knowledge base based on the query and return it to the query interface, and push relevant recommended queries. In addition, technicians can manage the knowledge base and directly query the vertical domain design documents uploaded to the system.
[0060] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment, and those of ordinary skill in the art may understand and implement it without creative work.
[0061] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0062] In another embodiment, the present invention also tests 46 exemplary fracturing design documents based on the proposed vertical domain intelligent question answering method.
[0063] According to statistics, the total number of fracturing knowledge to be stored in the fracturing design documents is 626, the total number of fracturing knowledge accurately stored is 586, and the accurate storage rate is 93.61%. The test results verify the effectiveness of the fracturing knowledge extraction method designed by the present invention in processing the existing fracturing design document knowledge extraction task.
[0064] On the basis of the constructed and improved fracturing knowledge base, the present invention evaluates the conversion effect of natural language queries for the fracturing knowledge base, and determines whether the converted SQL statements are correct by manual judgment. The present invention designs a total of 400 queries for the fracturing knowledge base, and tests the query conversion effect of the method of the present invention, and counts the number of correctly converted queries. Examples of each difficulty question in this test and the conversion results are shown in Table 1.
[0065] Table 1 Query conversion example
[0066] The test results in Table 1 show that the conversion accuracy of the method of the present invention when processing natural language queries for the fracturing knowledge base is 91.50%, which proves the effectiveness of the query conversion method of the present invention.
[0067] The present invention proposes a knowledge question and answer method machine system for vertical design documents. The method extracts information in the document as a knowledge base and implements question-and-answer query for the knowledge base, so as to realize intelligent question and answer application for vertical design documents. The present invention can constrain the results of question-and-answer query to come from the vertical knowledge existing in the document, thereby improving the credibility of the answer and satisfying natural language query of complex logic. The method proposed in the present invention is based on a pre-trained language model and assisted by a large language model, thereby achieving data security protection and system lightweight, realizing convenient query of vertical design document knowledge, reducing the labor cost and time cost of technical personnel in querying data, and improving work efficiency.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A knowledge question answering method for vertical domain design documents, characterized in that: include: S1: Reading a design document and preprocessing the design document to obtain an input text; S2: Convert the input text into word embedding representation; S3: Establish a dual scoring layer, learn the word embedding representation through the dual scoring layer, obtain a fusion scoring matrix of vertical domain knowledge and corresponding labels, and convert the fusion scoring matrix into a prediction sequence of vertical domain knowledge corresponding labels; S4: extracting a vertical domain knowledge dictionary from the input text through a candidate mechanism according to the prediction sequence, and constructing a vertical domain knowledge base based on the vertical domain knowledge dictionary; S5: The vertical domain knowledge base performs knowledge query and returns the query result.
2. A knowledge question-answering method for vertical domain design documents according to claim 1, characterized in that: Step S1 specifically includes: S11: receiving and reading design documents; S12: converting the design document into a dictionary variable corresponding to the original text; S13: According to the preset vertical domain knowledge parameters, the paragraph where the vertical domain knowledge is located in the design document is located according to the dictionary variables to obtain the input text.
3. The knowledge question answering method for vertical domain design documents according to claim 1 is characterized in that: In step S2, the input text is learned through the BERT layer to obtain word embedding representation.
4. The knowledge question answering method for vertical domain design documents according to claim 1 is characterized in that: The dual scoring layer in step S3 includes: A first scoring layer, wherein the first scoring layer is a BiLSTM network; The second scoring layer is an IDCNN network.
5. The knowledge question answering method for vertical domain design documents according to claim 4 is characterized in that: The dual scoring layer in step S3 also includes an attention layer and a fully connected layer.
6. The knowledge question answering method for vertical domain design documents according to claim 5 is characterized in that: Step S3 further comprises: S31: Input the word embedding representation into the first scoring layer, and obtain a first scoring matrix of vertical domain knowledge elements and labels through the attention layer and the fully connected layer; S32: Input the word embedding representation into the second scoring layer, and obtain a second scoring matrix of vertical domain knowledge elements and labels through the attention layer and the fully connected layer; S33: Performing weighted summation on the first scoring matrix and the second scoring matrix to obtain a fusion scoring matrix; S34: The fused rating matrix is converted into a prediction sequence of labels corresponding to vertical domain knowledge through the conditional random field layer.
7. The knowledge question answering method for vertical domain design documents according to claim 1 is characterized in that: Step S5 further comprises: S51: receiving query questions; S52: Convert the query question into an SQL statement; S53: Perform a search query on the vertical domain knowledge base according to the SQL statement, obtain the query result and return the query result.
8. The knowledge question answering method for vertical domain design documents according to claim 7 is characterized in that: Step S52 further includes: S521: Decoupling the conversion task of the query question to obtain multiple conversion subtasks; S522: Convert multiple subquery problems corresponding to the multiple conversion subtasks into multiple SQL clauses respectively; S523: Combine multiple SQL clauses to obtain an SQL statement corresponding to the query question.
9. The knowledge question answering method for vertical domain design documents according to claim 8, characterized in that: Step S523 also includes: Conditional values of conditional statements in multiple SQL statements are aligned with a knowledge base, where the conditional values include data types and field names.
10. A knowledge question answering system for vertical domain design documents, used to execute the knowledge question answering method for vertical domain design documents according to any one of claims 1 to 9, characterized in that: include: Preprocessing module: used for reading the design document and preprocessing the design document to obtain input text; Embedding module: used to convert input text into word embedding representation; Scoring module: By learning the word embedding representation based on the established dual scoring layer, a fusion scoring matrix of vertical domain knowledge and corresponding labels is obtained, and the fusion scoring matrix is converted into a prediction sequence of the corresponding labels of the vertical domain knowledge; Construction module: used for extracting a vertical domain knowledge dictionary from the input text through a candidate mechanism according to the prediction sequence, and constructing a vertical domain knowledge base according to the vertical domain knowledge dictionary; Query module: used to perform knowledge query in the vertical domain knowledge base and return the query results.