Triplet extraction system and method for technical standard documents
By constructing open-domain and closed-domain triple extraction models and combining them with the schema of technical standard documents, the problem of low triple extraction accuracy in existing technologies is solved, achieving efficient and accurate triple extraction, which is suitable for knowledge graph construction of technical standard documents.
Patent Information
- Application Number
- CN202211339655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-10-26
AI Technical Summary
Existing triplet extraction models have low accuracy in technical standard documents, rely heavily on human intervention, are inefficient, and make it difficult to quickly retrieve the required content.
By employing an input representation encoding module, an S-field and P-field extraction module, an S-field and P-field relationship determination module, and an O-field extraction module, combined with open-domain and closed-domain triplet extraction models, a schema for technical standard documents is constructed using training data, thereby improving extraction accuracy.
It enables efficient and accurate extraction of triples from technical standard documents, improving the efficiency and accuracy of triple extraction, and is suitable for knowledge graph construction of technical standard documents.
Smart Images

Figure CN115660085B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of knowledge graph data processing, and specifically relates to a system and method for extracting triples from technical standard documents. Background Technology
[0002] Knowledge graphs are constructed by visually building relationships between key information in original text. The most crucial step in this process is triple extraction, where a triple consists of a subject (S), a predicate (P), and an object (O). Triple extraction extracts these three fields from a document to build the knowledge graph, enabling users to quickly find the content they need. Therefore, the accuracy of triple extraction is extremely important. Existing triple extraction models primarily rely on schemas, requiring domain experts to construct schemas from a large number of documents—a time-consuming and labor-intensive process with high human intervention. Current open-domain triple extraction methods still rely on syntactic tools and depend on the customization of syntax and subsequent rules, resulting in relatively low accuracy.
[0003] Technical standards, issued by national standardization committees, are dynamic information, and understanding their content is crucial for businesses. Due to the large volume and numerous knowledge points in these documents, direct keyword searches are insufficient to fully leverage their guiding role in various operations. For company staff, the ability to quickly find the necessary information from a vast amount of technical standard documentation significantly improves work efficiency. Therefore, constructing a knowledge graph of technical standard documents becomes extremely important.
[0004] Technical standard documents are more specialized, and using existing triplet extraction methods to extract triplets from technical standard documents results in low triplet accuracy. Summary of the Invention
[0005] Purpose of the invention: This invention addresses the problems existing in the prior art by proposing a triplet extraction system that effectively improves extraction accuracy.
[0006] Technical solution: To achieve the above objectives, the present invention provides a triplet extraction system, including an input representation encoding module, an S-field and P-field extraction module, an S-field and P-field relationship determination module, and an O-field extraction module;
[0007] The input representation encoding module converts the input sentence into a text vector representation; and inputs the obtained text vector representation of the input sentence into the S field and P field extraction module.
[0008] The S-field and P-field extraction module extracts all S-fields and P-fields from the text vector representation of the received input sentence and classifies them; then the extracted and classified results are input into the S-field and P-field relationship determination module.
[0009] The module for determining the relationship between S and P fields uses the tail position of the S and P fields to determine the S and P fields that have a relationship.
[0010] The O-field extraction module extracts the corresponding O-fields based on the relative positions of other fields in the sentence with the S-fields and P-fields that have a relationship with each other.
[0011] The present invention also provides a triple extraction system for technical standard documents, including a technical standard document preprocessing module, an open domain triple extraction module, a closed domain triple extraction module, and a triple output module;
[0012] The technical standard document preprocessing module is used to extract text from the technical standard documents to be extracted and the training documents; the extracted sentences are input into the open domain triple extraction module and the closed domain triple extraction model, respectively; the training documents include documents of any type and technical standard documents of different kinds.
[0013] The open-domain triplet extraction module employs the triplet extraction system described in claim 1. The open-domain triplet extraction module first trains the triplet extraction system described in claim 1 using documents of any type to obtain an open-domain triplet extraction model. Different types of technical standard documents are then input into the open-domain triplet extraction model for S, P, and O triplet extraction. All P fields in the extraction results are clustered, and based on the cluster results, the P fields in the technical standard document schema are obtained. The obtained P fields in the technical standard document schema are then input into the closed-domain triplet extraction module. The technical standard documents to be extracted are input into the open-domain triplet extraction model for triplet extraction, and the extraction results are input into the triplet output module.
[0014] The closed-domain triple extraction module trains a closed-domain triple extraction model based on the P field in the received technical standard document Schema; the technical standard document to be extracted is input into the trained closed-domain triple extraction model, and the extraction result is input into the triple output module.
[0015] The triplet output module deduplicatizes and merges the extraction results from the open domain triplet extraction module and the closed domain triplet extraction module, and saves the deduplicated and merged result.
[0016] Furthermore, the closed-domain triple extraction model in the closed-domain triple extraction module is the CASREL model.
[0017] Furthermore, the triplet extraction results stored in the triplet output module are used as training data for the open-domain triplet extraction model in the open-domain triplet extraction module, thereby training the open-domain triplet extraction model. This effectively improves the accuracy of the entire model.
[0018] This invention also provides a method for extracting triples from technical standard documents, comprising the following steps:
[0019] Step 1: Construct an open-domain triplet extraction model and train it; wherein the constructed open-domain triplet extraction model adopts the triplet extraction system described in claim 1, and uses documents of any type as training data;
[0020] Step 2: Input different types of technical standard documents into the open domain triplet extraction model trained in Step 1 to extract S, P, O triplets; cluster all P fields in the extraction results, and obtain the P fields in the technical standard document schema based on the cluster results of each cluster.
[0021] Step 3: Train the closed-domain triplet extraction model using the P field of the technical standard file obtained in Step 2;
[0022] Step 4: Preprocess the technical standard documents to be extracted;
[0023] Step 5: Use the trained open-domain triplet extraction model and closed-domain triplet extraction model to extract triples from the preprocessed technical standard documents obtained in Step 4.
[0024] Step 6: Deduplicatize and merge the results extracted by the open domain triplet extraction model and the closed domain triplet extraction model; and save the deduplicated and merged results.
[0025] Furthermore, the training data in step 1 consists of sentences from documents of any type that simultaneously contain the three fields S, P, and O.
[0026] Furthermore, the results obtained in step 6 are used to separate open and closed domain data according to the P field in the technical standard document Schema. The open domain data is then input into the open domain triplet extraction model trained in step 1 for further training, resulting in a new open domain triplet extraction model. The closed domain data is then used to train the closed domain triplet extraction model obtained in step 3, resulting in a new closed domain triplet extraction model. This approach can significantly improve the accuracy of triplet extraction.
[0027] The present invention also provides a computer system, comprising:
[0028] One or more processors;
[0029] The memory stores operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, including the flow described above for the triple extraction method in a technical standard document.
[0030] The present invention also provides a computer-readable medium for storing software, the software including instructions executable by one or more computers, the instructions causing the one or more computers to perform operations including the above-described process for the triple extraction method in technical standard documents.
[0031] Working Principle: This invention constructs a novel triplet extraction model. This new model first analyzes the S and P fields in a sentence, then determines the tail positions of the S and P fields, and finally extracts the corresponding O field based on the text vector representation of the input sentence and the relative positional relationship of the S and P fields. This extraction model achieves higher accuracy for open-domain triplet extraction. This invention constructs triplet extraction models from both depth and breadth perspectives. First, it extracts triples from any document using an open-domain triplet extraction model, then clusters and reviews the data to construct a schema, and finally extracts triples from technical standard documents using a closed-domain triplet extraction model.
[0032] Beneficial Effects: Compared with existing technologies, the triplet extraction system provided by this invention extracts triples from both open and closed domains. It extracts triples from any document using an open domain extraction model, constructs a schema, and then builds a closed domain triplet extraction model based on the schema. Finally, it combines the results of the open and closed domain models to return the final standard document triplet extraction result. This method is more efficient and accurate than current triplet extraction methods. The triplet extraction method for technical standard documents provided by this invention can extract triples from technical standard documents more accurately.
[0033] It should be understood that all combinations of the foregoing concepts and the additional concepts described in more detail below may be considered part of the inventive subject matter of this disclosure, provided that such concepts do not contradict each other. Furthermore, all combinations of the claimed subject matter are considered part of the inventive subject matter of this disclosure.
[0034] The foregoing and other aspects, embodiments, and features of the teachings of the present invention will be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the invention, such as features and / or beneficial effects of exemplary embodiments, will become apparent from the following description or may be learned through practice of specific embodiments according to the teachings of the present invention. Attached Figure Description
[0035] The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in the various figures may be denoted by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the invention will now be described by way of example and with reference to the accompanying drawings, wherein:
[0036] Figure 1 This is a schematic diagram of the triplet extraction system provided in Example 1;
[0037] Figure 2 This is a schematic diagram of the system for extracting triples from technical standard documents provided in Example 2;
[0038] Figure 3 This is a schematic diagram of the system for extracting triples from technical standard documents provided in Example 3;
[0039] Figure 4 This is a flowchart of the triple extraction method for technical standard documents provided in Example 4;
[0040] Figure 5 This is a schematic diagram of the open domain triple extraction model provided in Example 4;
[0041] Figure 6 This is a flowchart of the triplet extraction method for technical standard documents provided in Example 5. Detailed Implementation
[0042] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.
[0043] Various aspects of the invention are described in this disclosure with reference to the accompanying drawings, which illustrate numerous illustrative embodiments. The embodiments of this disclosure are not necessarily intended to encompass all aspects of the invention. It should be understood that the various concepts and embodiments described above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.
[0044] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] Example 1:
[0046] This embodiment discloses a triplet extraction system, such as Figure 1 As shown, it includes: an input representation encoding module, an S-field and P-field extraction module, an S-field and P-field relationship determination module, and an O-field extraction module;
[0047] The input representation encoding module converts the input sentence into a text vector representation; and inputs the obtained text vector representation of the input sentence into the S field and P field extraction module.
[0048] The S-field and P-field extraction module extracts all S-fields and P-fields from the text vector representation of the received input sentence and classifies them; then the extracted and classified results are input into the S-field and P-field relationship determination module.
[0049] The module for determining the relationship between S and P fields uses the tail position of the S and P fields to determine the S and P fields that have a relationship.
[0050] The O-field extraction module extracts the corresponding O-fields based on the relative positions of other fields in the sentence with the S-fields and P-fields that have a relationship with each other.
[0051] Example 2:
[0052] This embodiment provides a system for extracting triples from technical standard documents, such as... Figure 2 As shown, it includes a technical standard document preprocessing module, an open domain triple extraction module, a closed domain triple extraction module, and a triple output module;
[0053] The technical standard document preprocessing module is used to extract text from the technical standard documents to be extracted and the training documents; the extracted sentences are input into the open domain triple extraction module and the closed domain triple extraction model, respectively; the training documents include documents of any type and technical standard documents of different kinds.
[0054] The open-domain triplet extraction module adopts the triplet extraction system disclosed in Example 1. The open-domain triplet extraction module first trains the triplet extraction system disclosed in Example 1 using documents of any type to obtain an open-domain triplet extraction model. Different types of technical standard documents are input into the open-domain triplet extraction model for S, P, and O triplet extraction. All P fields in the extraction results are clustered. Based on the cluster results, the P fields in the technical standard document schema are obtained, and the obtained P fields in the technical standard document schema are input into the closed-domain triplet extraction module. The technical standard document to be extracted is input into the open-domain triplet extraction model for triplet extraction, and the extraction results are input into the triplet output module.
[0055] The closed-domain triple extraction module trains a closed-domain triple extraction model based on the P field in the received technical standard document Schema; the technical standard document to be extracted is input into the trained closed-domain triple extraction model, and the extraction result is input into the triple output module.
[0056] The triplet output module deduplicatizes and merges the extraction results from the open domain triplet extraction module and the closed domain triplet extraction module, and saves the deduplicated and merged result.
[0057] Example 3:
[0058] like Figure 3 As shown, this embodiment provides a triple extraction system for technical standard documents. Based on Embodiment 2, the triple extraction results stored in the triple output module are used as training data for the open-domain triple extraction model in the open-domain triple extraction module, thereby training the open-domain triple extraction model. This results in higher extraction accuracy from the open-domain triple extraction model.
[0059] Example 4:
[0060] This embodiment discloses a method for extracting triples from technical standard documents, such as... Figure 4 As shown, the main steps include:
[0061] Step 1: Construct and train an open-domain triple extraction model. In this embodiment, the constructed open-domain triple extraction model uses a joint modeling approach for extraction.
[0062] Step 2: Input different types of technical standard documents into the open domain triplet extraction model trained in Step 1 to extract S, P, O triplets; cluster all P fields in the extraction results, and obtain the P fields in the technical standard document schema based on the cluster results of each cluster.
[0063] Step 3: Train the closed-domain triplet extraction model using the P field of the technical standard file obtained in Step 2;
[0064] Step 4: Preprocess the technical standard documents to be extracted;
[0065] Step 5: Use the trained open-domain triplet extraction model and closed-domain triplet extraction model to extract triples from the preprocessed technical standard documents. The closed-domain triplet extraction model extracts triples based on the P field in the technical standard document schema obtained in Step 2, extracting only triples containing the P field in the technical standard document schema.
[0066] Step 6: Deduplicatize and merge the results extracted by the open domain triplet extraction model and the closed domain triplet extraction model; and save them to a relational database for graph construction.
[0067] Below, we will provide a more detailed explanation of the implementation of the methods in the aforementioned embodiments using specific examples.
[0068] As shown in the figure, in step 1 above, in the open-domain triple extraction model constructed in this embodiment, the sentence is first input into the BERT encoder to complete the text vector representation of the sentence, then the S field and P field in the input sentence are extracted, then the tail position of the S field and P field is determined, and finally the corresponding O field is extracted based on the text vector representation of the input sentence combined with the relative position relationship of the S field and P field.
[0069] The training steps for the open-domain triple extraction model include:
[0070] Step 101: Construct the training dataset; In this embodiment, publicly available Baidu information labeled triplet data and Tongji University publicly available triplet data are used as candidate data; From the candidate data, sentences that simultaneously contain the three fields S, P, and O are selected as the training dataset;
[0071] Step 102: Obtain the text vector representation of each sentence in the training dataset; H = BERT(x1, x2, x3, ... x i ...x n H represents the text vector representation of the input sentence; where x i This represents the content at the i-th position in the input sentence;
[0072] Step 103: Entity extraction from the text vector representation of the input sentence. Entity extraction here mainly involves identifying and classifying all S and P fields in the input sentence. Entity extraction can be viewed as table filling; the length of the input sentence corresponds to the number of rows and columns in the table, and the elements in the table are... This indicates that the i-th and j-th positions in the input sentence are the k-th positions. a The probability of the start and end positions of each entity type, including two types: S field and P field; a = 1, 2. In this embodiment, This represents the probability that the i-th and j-th positions in the input sentence are the start and end positions of the S-field; This represents the probability that the i-th and j-th positions in the input sentence are the start and end positions of field P.
[0073] E i =w i h i +b i ;
[0074] E j =w j h j +b j ;
[0075]
[0076]
[0077] Among them, h i =BERT(x i ), h i The text vector representation of the content at position i in the input sentence; w i b i w j and b j These are the parameters to be trained. E i E represents the content at position i as the representation of the entity's starting position. j The content at position j represents the starting position of the entity. For E j The transpose of σ is used. σ represents the sigmoid activation function. Linear is the linear activation function. During training, the S and P fields of the input sentence are known information, and the parameters w to be trained are trained based on this known information. i b i w j and b j .
[0078] Step 104: Extract the last positions of the S and P fields obtained in Step 103, and determine the S and P fields with a relationship based on their last positions. The main method is as follows:
[0079] R S =tanh(w s h i +b s );
[0080] R P =tanh(w P h i +b P );
[0081]
[0082] P i,j =σ(Linear(R) i,j ));
[0083] Among them, R S hi This represents the tail position of the S field; R P h i This represents the tail position of the P field; h i The text vector representation of the content at position i in the input sentence; w s b s w P and b P These are the parameters to be trained. tanh represents the activation function. This represents the concatenation operation, σ represents the sigmoid activation function, and P... i,j This represents the probability that the i-th and j-th positions of the input sentence can form a relation. During training, the end positions of the S-field and P-field of the input sentence are known information; therefore, the trainable parameters w are trained based on this known information. s b s w P and b P .
[0084] Step 105: Extract the corresponding O fields based on the relative positional relationships between other fields in the sentence and the S and P fields that have a relationship. This is mainly achieved by using the following formula to obtain the probability that each position in the input sentence is the start and end position of an O field, thus realizing the extraction of O fields.
[0085] s dis =Embedding(Sidx);
[0086] p dis =Embedding(Pidx);
[0087]
[0088]
[0089]
[0090] Among them, h i The text vector representation of the content at position i in the input sentence; Sidx represents the relative position of other fields with respect to field S, Pidx represents the relative position of other fields with respect to field P, and w start b start w end and b end These are the parameters to be trained. This represents the probability that the i-th position in the input sentence is the starting position of field O. This represents the probability that the i-th position in the input sentence is the end position of field O.
[0091] In this embodiment, the O field is extracted using a relative positional relationship. To ensure the correspondence between the O field and the SP field, the relative positional encoding information of the S and P fields, namely Sidx and Pidx, is embedded on the BERT representation.
[0092] During training, since the O, P, and S fields are all known, for example, in the sentence "bulletproof vehicles, their light transmittance is not less than 60%", the corresponding S field is "bulletproof vehicle" and the P field is "light transmittance". Therefore, the relative positions of the other fields with their corresponding S fields are: Sidx = [0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]. Since the S field is at the beginning of the sentence, the positional relationship between the other fields and the S field is the distance between them and the last character of the S field. The relative positions of the other fields with their corresponding P fields are: Pidx = [6, 5, 4, 3, 2, 1, 0, 0, 0, 1, 2, 3, 4, 5, 6]. Since the P field is in the middle of the sentence, the characters before the P field are recorded as the distance between them and the first character of the P field, and the characters after the P field are recorded as the distance between them and the last character of the P field. The training parameters w are then trained based on this known information. start、 b start w end and b end .
[0093] Step 2: Input different types of technical standard documents into the open domain triplet extraction model trained in Step 1 to extract S, P, O triplets; cluster all P fields in the extraction results, and obtain the P fields in the technical standard document schema based on the cluster results of each cluster.
[0094] For example, the P fields in the obtained technical standard document Schema include: "Contains", "Belongs to", "Definition", "Applies to", "Requirement", "Drafter", "Influencing Factors", "Alternative", "Synonyms", "Based on", "Steps", "Drafting Organization", "Scope", "Dimensions", "References", and "Published".
[0095] Step 3: Train the closed-domain triplet extraction model using the technical standard file P field obtained in Step 2.
[0096] For example, in this embodiment, the closed domain triple extraction model adopts the CASREL model, which can effectively solve the problem of overlapping triple extraction.
[0097] Step 4: Preprocess the technical standard documents to be extracted.
[0098] As an optional implementation, text extraction is performed on technical standard documents based on their different types: if the technical standard document is a docx document, the python-docx package is used to parse it, and the title and paragraphs of the Word document are parsed according to the format of Word itself; if the technical standard document is a pdf file, pdfplumber is used to parse it, and each line in the pdf is read directly.
[0099] Step 5: Use the trained open-domain triplet extraction model and closed-domain triplet extraction model to extract triples from the preprocessed technical standard documents.
[0100] The closed-domain triple extraction model extracts triples based on the P field in the technical standard document Schema obtained in step 2, and only extracts triples containing the P field in the technical standard document Schema.
[0101] Step 6: Deduplicate and merge the results extracted by the open domain triplet extraction model and the closed domain triplet extraction model; and save them to a relational database for graph construction.
[0102] Example 5:
[0103] This embodiment discloses a method for extracting triples from technical standard documents, wherein steps 1 to 6 are the same as in embodiment 5; and further includes step 7:
[0104] Step 7: Add the correctly deduplicated and merged triples obtained in Step 6 to the model for fine-tuning training to optimize the model's extraction performance. Based on the P field in the technical standard document Schema, separate the open-domain and closed-domain data from the deduplicated and merged triples obtained in Step 6. Triples containing the P field from the technical standard document Schema are closed-domain data, and the others are open-domain data. Input the open-domain data into the open-domain triplet extraction model obtained in Step 1 for training to obtain a new open-domain triplet extraction model. Train the closed-domain triplet extraction model obtained in Step 3 with the closed-domain data to obtain a new closed-domain triplet extraction model.
[0105] The present invention also provides a computer-readable medium for storing software, the software including instructions executable by one or more computers, the instructions causing the one or more computers to perform operations including the above-described process for the triple extraction method in technical standard documents.
[0106] The present invention also provides a computer system comprising: one or more processors; and a memory storing operable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations, the operations including the aforementioned flow for a triple extraction method in a technical standard document.
[0107] It should be understood that the aforementioned examples of the triple extraction method for technical standard documents of the present invention can be applied to any computer system containing data storage and data processing capabilities. The aforementioned computer system can be at least one electronic processing system or electronic device including a processor and memory, such as a PC, whether it be a personal PC, a commercial PC, a graphics processing PC, or a server-class PC. These PCs enable wired and / or wireless data transmission, especially image data, through data interfaces and / or network interfaces.
[0108] In other embodiments, the computer system may also be a server, especially a cloud server, with data storage, processing, and network communication functions.
[0109] A typical computer system includes at least one processor, memory, and a network interface connected by a system bus. The network interface is used to communicate with other devices / systems.
[0110] The processor is used to provide computation and control for the system.
[0111] Memory includes non-volatile memory and cache.
[0112] Non-volatile memory typically has massive storage capacity and can store operating systems and computer programs. These computer programs may include operable instructions that, when executed by one or more processors, enable one or more processors to perform the process described above for the triple extraction method in the technical standard document of this invention.
[0113] In a necessary or reasonable implementation, the aforementioned computer system, whether a PC device or a server, may include more or fewer components or combinations thereof than those shown in the diagram, or may employ different hardware, software, or other components or different deployment methods.
[0114] While the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A triple extraction system, characterized in that: The system comprises an input representation encoding module, an S field and P field extraction module, an S field and P field relationship determination module, and an O field extraction module. The input representation encoding module converts an input sentence into a text vector representation, and inputs the text vector representation of the input sentence into the S field and P field extraction module. The S field and P field extraction module extracts all S fields and P fields from the input sentence according to the received text vector representation, and classifies the extracted S fields and P fields. The S field and P field relationship determination module determines the S fields and P fields that have a relationship according to the tail positions of the S fields and P fields. The O field extraction module extracts the O fields according to the relative position relationship between the other fields in the sentence and the S fields and P fields that have a relationship. The S field and P field relationship determination module is configured to determine the S fields and P fields that have a relationship according to the tail positions of the extracted S fields and P fields. R S = tanh(w s h i + b s ); R P = tanh(w P h i + b P ); P i,j = σ(Linear(R i,j )) ; wherein R S represents h i is a representation of the tail position of the S field; R P represents h i is a representation of the tail position of the P field; h i represents a text vector representation of the content of the i-th position in the input sentence; w s , b s , w P and b P are parameters to be trained; tanh represents an activation function, represents a splicing operation, and σ represents a sigmoid activation function, P i,j represents the probability that the i-th position and the j-th position of the input sentence can constitute a relationship; in the training process, the tail positions of the S field and the P field of the input sentence are known information, and then the known information is used to train the parameters to be trained w s , b s , w P and b P ; The O field extraction module is configured to obtain the probability that each position in the input sentence is the start position and end position of an O field, and extract the O fields according to the following process: s dis = Embedding(Sidx); p dis = Embedding(Pidx); wherein h i represents a text vector representation of the content of the i-th position in the input sentence; Sidx represents the relative position between the S field and other fields, Pidx represents the relative position between the P field and other fields, w start , b start , w end and b end are parameters to be trained; represents the probability that the i-th position in the input sentence is the start position of the O field, represents the probability that the i-th position in the input sentence is the end position of the O field.
2. A system for tripl e extraction in technical standard documents, characterized in that: The system comprises a technical standard document preprocessing module, an open domain triple extraction module, a closed domain triple extraction module, and a triple output module. The technical standard document preprocessing module is used to extract text from the technical standard document to be extracted and the training document, and input the extracted sentences into the open domain triple extraction module and the closed domain triple extraction module. The open domain triple extraction module adopts the triple extraction system of claim 1, and is trained by the document of any type to obtain the open domain triple extraction model. The closed domain triple extraction module trains the closed domain triple extraction model according to the received P fields in the technical standard file Schema. The triple output module combines the extraction results of the open domain triple extraction module and the closed domain triple extraction module, and saves the combined results.
3. The system for extracting triplets in technical standard documents according to claim 2, wherein: The closed domain triple extraction model in the closed domain triple extraction module is a CASREL model.
4. The system for extracting triplets in technical standard documents according to claim 2, wherein: The triple extraction result saved by the triple output module is taken as training data of an open domain triple extraction model in an open domain triple extraction module, and the open domain triple extraction model is trained.
5. A method for extracting triples in technical standard documents, characterized in that: The method comprises the following steps: Step 1: constructing and training an open domain triple extraction model; The constructed open domain triple extraction model adopts the triple extraction system of claim 1 and adopts documents of unlimited types as training data; Step 2: inputting technical standard documents of different types into the open domain triple extraction model trained in step 1 to perform S, P and O triple extraction; clustering all P fields in the extraction result, and obtaining P fields in a technical standard file Schema according to each clustering cluster result; Step 3: training a closed domain triple extraction model by using the P fields of the technical standard file obtained in step 2; Step 4: preprocessing a technical standard file to be extracted; Step 5: performing triple extraction on the preprocessed technical standard file obtained in step 4 by using the trained open domain triple extraction model and closed domain triple extraction model respectively; Step 6: performing deduplication and merging on the results extracted by the open domain triple extraction model and the closed domain triple extraction model; and saving the deduplicated and merged result. The training data in step 1 is a sentence containing S, P and O fields simultaneously in a document of unlimited types.
6. The method for extracting triples in technical standard documents according to claim 5, characterized in that: The result obtained in step 6 is separated into open domain and closed domain data according to the P fields in the technical standard file Schema; the open domain data is input into the open domain triple extraction model trained in step 1 to obtain a new open domain triple extraction model; and the closed domain data is used to train the closed domain triple extraction model obtained in step 3 to obtain a new closed domain triple extraction model.
7. The method for extracting triples in technical standard documents according to claim 5, characterized in that: The method comprises the following steps:
8. A computer system, characterized by one or more processors; a memory storing instructions operable to cause the one or more processors to perform operations when executed by the one or more processors, the operations comprising the flow of the method for triple extraction in a technical standard document according to any one of claims 5-7. The software comprises instructions executable by one or more computers, the instructions causing the one or more computers to perform operations when executed by the one or more computers, the operations comprising the flow of the method for triple extraction in a technical standard document according to any one of claims 5-7.
9. A computer readable medium storing software, characterized in that,
Citation Information
Patent Citations
Method and system for extracting triad information in complex number fusion feature extraction pointer mode and computer medium
CN110889276A
Text triad extraction method and device, electronic equipment and storage medium
CN111950267A