A constraint multi-tuple extraction method based on semantic multi-scale perception network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-28
- Publication Date
- 2026-08-11
AI Technical Summary
[0003]然而,现有方法在进行约束多元组抽取时,往往直接利用文本的语义嵌入进行多元组抽取,未能充分挖掘文本语义特征、语法特征和外部知识之间关系,导致神经网络模型泛化性能不佳
[0095] 1. In order to endow the model with the ability to understand the constraints of sentence components, external knowledge of sentence constraints is injected into the model. A method for acquiring external knowledge of sentence constraints based on prompting thought chain is proposed. Using thought chain prompts can stimulate the ability of large models to generate high-quality external knowledge of sentence constraints to a greater extent.
Smart Images

Figure CN122549412A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a constraint tuple extraction method based on a semantic multi-scale perceptual network, belonging to the fields of information extraction and artificial intelligence technology, and is applied to the task of extracting constraint knowledge from unstructured text. Background Technology
[0002] Constraint tuple extraction is a task within information extraction. The goal of information extraction is to extract structured information from unstructured or semi-structured text. Constraint tuple extraction aims to identify triples with specific constraints within sentences, where the constraints can be temporal, spatial, conditional, or other types. Existing constraint tuple extraction tasks primarily rely on neural network models, mining implicit semantic information beyond the context through interactions between multiple text features to discover potential constraints.
[0003] However, existing methods often directly utilize the semantic embedding of the text when performing constrained tuple extraction, failing to fully explore the relationship between text semantic features, syntactic features and external knowledge, resulting in poor generalization performance of neural network models.
[0004] Therefore, improving the generalization ability of multi-granular semantic features and multi-scale syntactic features in constrained tuple extraction has become an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to address the technical problem of improving the generalization ability of multi-granular semantic features and multi-scale syntactic features in constraint tuple extraction, and to propose a constraint tuple extraction method based on a semantic multi-scale perceptual network.
[0006] The working principle of this invention is as follows: by introducing a semantic multi-scale perception model that integrates semantic and syntactic features, and by fusing multiple semantic embeddings, syntactic embeddings and external knowledge embeddings, the generalization ability of multi-granular semantic features and multi-scale syntactic features is improved; by introducing a tuple extraction model with guided constraints, the large language model is fine-tuned to improve the accuracy of model output constraint tuple extraction.
[0007] The objective of this invention is achieved through the following technical solution:
[0008] This invention discloses a constraint tuple extraction method based on a semantic multi-scale perceptual network, comprising the following steps:
[0009] Step 1: Construct constrained external knowledge text. Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding Phrase text encoding sequence Text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis encoding sequence embedding and constrained external knowledge text embedding ;
[0010] Step 1.1: Use a large language model to perform syntactic decomposition on sentences in unstructured text, and construct first-level similar sentences and second-level similar sentences by determining the modifiers;
[0011] Step 1.1.1: Use a large language model to grammatically decompose the original unstructured text into simple sentences and modifiers as shown in equation (1);
[0012] simple s =(h, r, t) (1)
[0013] Where h represents the subject, r represents the predicate, and t represents the object;
[0014] Step 1.1.2: When the modifier is not NULL, use the large language model to replace the modifier with phrases and recombine them with simple sentences to form first-level similar sentences {s1, s2, ..., sn}; a first-level similar sentence is a sentence whose subject, verb, and object are completely identical to the given sentence, but other components are replaced with different words;
[0015] Step 1.1.3: When the modifier is NULL, the simple sentence is expanded and filled using a large language model to form a second-level similar sentence {s'1, s'2, ..., s'n}; a second-level similar sentence is a sentence whose subject-verb-object structure is completely consistent with the given sentence, but whose words have been replaced and then expanded and imitated to generate the sentence.
[0016] Step 1.2: Construct constraint external knowledge text using first-level similar statements, second-level similar statements, constraint substitution statements, identical constraint statements, and similar constraint statements;
[0017] Step 1.2.1: Construct part-of-speech constraints. The large language model uses part-of-speech constraints to generate unstructured text sentences into constraint replacement sentences, sentences with the same constraints, and sentences with the same type of constraints.
[0018] A constraint substitution statement is a sentence that replaces the original constraint in a statement with a constraint of the same type and structure; a similar constraint statement is a sentence that generates a similar constraint statement with constraint c as the constraint in the statement; a similar constraint statement is a sentence that generates a sentence containing the type of constraint c.
[0019] Step 1.2.2: Combine the first-level similar statements, second-level similar statements, constraint replacement statements, identical constraint statements, and similar constraint statements to form constraint external knowledge text;
[0020] Step 1.3: Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding and phrase text encoding sequence Text embedding ;
[0021] Step 1.3.1: Add [CLS] to the original unstructured text. And the [SEP] tag, generate as shown in equation (2). The original text encoding sequence;
[0022] (2)
[0023] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; This represents each token in the text;
[0024] Step 1.3.2: Decompose the original unstructured text using an automatic phrase recognition method and add phrase start and end tags. <phrase>< / phrase> and including [CLS], With the [SEP] tag, construct the phrase text encoding sequence as shown in equation (3). ;
[0025] (3)
[0026] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; This represents each token in the text;
[0027] Step 1.3.3: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation The original text encoded sequence is obtained through mean pooling using the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer, resulting in the original text encoding sequence shown in Equation (4). Text embedding ;
[0028] (4)
[0029] in, Represents the original text encoding sequence All tokens in express The token in the original text encoding sequence;
[0030] Step 1.3.4: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The phrase text encoding sequence is obtained through mean pooling using the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer to obtain the phrase text encoding sequence as shown in Equation (5). Text embedding ;
[0031] (5)
[0032] in, Represents a phrase text encoding sequence All tokens in express Tokens in phrase text encoding sequences;
[0033] Step 1.4: Obtain the dependency parsing encoded sequence embeddings of the original unstructured text through mean pooling and fully connected layers of the BERT model. Part-of-speech analysis and encoding sequence embedding ;
[0034] Step 1.4.1: Use the large language model to generate the sentence dependency analysis of the original unstructured text, and obtain the semantic dependency analysis sequence as shown in Equation (6);
[0035] semantic = [[hse1, tse1,se1], . . . , [hse n , tse n ,se n (6)
[0036] Among them, hse i The core word in indicating dependency relations is tse i Modifiers indicating dependency relationships, se i It indicates the dependency relationship between each pair of dependency phrases.
[0037] Step 1.4.2: Use the spaCy natural language processing library to generate the original unstructured text. Perform part-of-speech analysis to obtain the pos shown in equation (7). s Part-of-speech analysis sequence;
[0038] pos s = [[w1, POS1], [w2, POS2],……[w n POS n (7)
[0039] Among them, w i POS represents each word in the statement. i Indicates the part of speech of a word;
[0040] Step 1.4.3: Add sequences containing [CLS] to the semantic dependency parsing sequence. And the [SEP] tag, generate as shown in equation (8). Dependency analysis sequence encoding sequence;
[0041] (8)
[0042] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; se i This represents each token in the dependency parsing sequence;
[0043] Step 1.4.4: Add [CLS] to the part-of-speech tagging sequence. The [SEP] tag generates a part-of-speech sequence encoding sequence as shown in equation (9);
[0044] (9)
[0045] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; p i This represents each token in the part-of-speech analysis sequence;
[0046] Step 1.4.5: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation Dependency analysis sequence encoding sequences are obtained through mean pooling in the BERT model. The dependency parsing sequence is encoded by a context-dependent representation of the sequence and mapped to the embedding space using a fully connected layer to obtain the dependency parsing sequence shown in Equation (10). Encoding sequence embedding ;
[0047] (10)
[0048] in, Indicates the sequence of dependency parsing All tokens in the encoded sequence, express Dependency analysis sequence encoding of tokens in the sequence;
[0049] Step 1.4.6: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Part-of-speech tagging sequences are obtained through mean pooling in the BERT model. The part-of-speech (POS) analysis encodes the context-related representation of the sequence and maps it to the embedding space using a fully connected layer to obtain the POS analysis as shown in Equation (11). Encoding sequence embedding ;
[0050] (11)
[0051] in, Part-of-speech analysis All tokens in the encoded sequence, express Part-of-speech encoding of tokens in sequences;
[0052] Step 1.5: Obtain the constraint external knowledge text embedding of the original unstructured text through mean pooling and fully connected layers of the BERT model. ;
[0053] Step 1.5.1: Add [CLS] to the constraint external knowledge text. And the [SEP] tag, generate as shown in equation (12). Constraining the text encoding sequence of external knowledge;
[0054] (12)
[0055] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; t i This represents each token in the text;
[0056] Step 1.5.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The constrained external knowledge text encoding sequence is obtained through mean pooling in the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer to obtain the constrained external knowledge text as shown in Equation (13). Encoding sequence Embedded;
[0057] (13)
[0058] in, Represents the constraint of external knowledge text All tokens in the encoded sequence, Represents the constraint of external knowledge text The token in the encoded sequence;
[0059] Step 2: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features and a tuple extraction model with guided constraints;
[0060] Step 2.1: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features; input the joint embedding obtained by fusing the attention weights of semantic syntactic perception and semantic external perception, the text embeddings of the original text and the phrase text encoding sequence into a linear classification layer to obtain the distribution probability;
[0061] Step 2.1.1: Calculate the text embedding of the original text encoding sequence respectively. and phrase text encoding sequence text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis and encoding sequence embedding The attention score is used to obtain the semantic grammar-aware attention weight as shown in Equation (14). ;
[0062] (14)
[0063] Where x represents the original text encoding sequence text embedding. and phrase text encoding sequence text embedding W represents the dependency parsing encoded sequence embedding. Part-of-speech analysis and encoding sequence embedding K is the key vector, d k It is the dimension of the vector;
[0064] Step 2.1.2: Calculate the text embedding of the original text encoding sequence. External knowledge text encoding sequence for constraints The attention score is used to obtain the semantic external perception attention weight as shown in Equation (15). :
[0065] (15)
[0066] Step 2.1.3: Apply semantic-grammar-aware attention weights Semantic external perception attention weight Original text encoding sequence text embedding and phrase text encoding sequence text embedding The splicing and fusion are performed to obtain the joint embedding h as shown in equation (16), where the symbol "+" represents the splicing operation;
[0067] h = w + p + + (16)
[0068] Step 2.1.4: Input the joint embedding h into the linear classification layer to obtain the BIOES class distribution probability of all labels. As shown in equation (17):
[0069] (17)
[0070] The linear classification layer consists of a fully connected layer (FC) and a normalized exponential function (softmax).
[0071] Step 2.2: Construct a tuple extraction model for guided constraints for fine-tuning unstructured text; establish the original parameter matrix, mapping matrix, and inverse mapping matrix for fine-tuning;
[0072] Step 2.2.1: In the Llama3 model, select the target layer, attention computation layer, and feedforward neural network layer to apply LoRA, and construct the original parameter matrix. ;
[0073] Step 2.2.2: Construct an initialization mapping matrix A for the target layer. Initialize matrix A using a random Gaussian distribution, where... The size of the matrix is determined by the rank of LoRA and the value of α.
[0074] Step 2.2.3: Construct an initialization inverse mapping matrix B for the target layer, initializing B as an all-zero matrix; where, The size of the matrix is determined by the rank of LoRA and the value of α.
[0075] Step 3: Train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion using relation constraint extraction loss; fine-tune the tuple extraction model with guided constraints using iterative replacement of the original parameter matrix of the target layer and guided constraint feedback iteration.
[0076] Step 3.1: Use the relation constraint extraction loss as shown in Equation (18) to train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion;
[0077] (18)
[0078] Where CrossEntropy represents the cross-entropy loss function; Let α represent the probability distribution of each tag's BIOES category. c This represents the weight of class c, used to balance classes; the parameter γ is an adjustment factor, the larger the value, the more the weight of easily classified samples decreases; p c It is the probability that the model predicts the label belongs to category c; Refers to the expected BIOES tag for each tag;
[0079] Step 3.2: Fine-tune the tuple extraction model with guiding constraints;
[0080] Step 3.2.1: Obtain the original parameter matrix of the target layer. The transformation parameter matrix shown in equation (19) is obtained by transforming the mapping matrix A and the inverse mapping matrix B and fine-tuning it using Lora:
[0081] (19)
[0082] in, This represents the pre-trained weight matrix. This indicates parameter updates during fine-tuning; This represents the original forward propagation process, where the training data x extracted from the input tuple is processed through the weight matrix. Get the output; This indicates the correction terms introduced during the fine-tuning process; This means adding the original weight matrix W0 and the correction term BA to obtain the fine-tuned weight matrix, and then adding it to the training data extracted from the input tuple. Multiply to output the transformation parameter matrix. ;
[0083] Step 3.2.2: Iteratively replace the original parameter matrix of the target layer using the transformation parameter matrix;
[0084] Step 3.2.3: Update the mapping matrix A and the inverse mapping matrix B using the adaptive moment estimator Adam; update the original parameter matrix of the target layer using the gradient shown in Equation (20);
[0085] (20)
[0086] in, It is the gradient of the loss function with respect to the mapping matrix A. It is the gradient of the loss function with respect to the mapping matrix B. It is the loss of the weights updated in the weights;
[0087] Step 3.2.4: Repeat steps 3.2.1 to 3.2.3 in each training batch until the predetermined number of training epochs is reached;
[0088] Step 3.2.5: Use the error sample to obtain the correction content as the guiding constraint, and use the feedback iteration method shown in Equation (21) to fine-tune the tuple extraction model;
[0089] (twenty one)
[0090] in, This represents the input during the LoRA fine-tuning process. W represents the parameter matrix for model fine-tuning iterations. i This represents the weight matrix that is fine-tuned after feedback. This represents the correction term introduced during the fine-tuning process of the tuple dataset;
[0091] Step 4: Input the sentence samples used for tuple extraction into the trained semantic multi-scale perception model with semantic and syntactic feature fusion and the tuple extraction model with guided constraints, and output the tuple results as shown in Equation (22).
[0092] constrained_tuple=(s, r, o, c time , c space , c construction ) (twenty two)
[0093] Where s represents the head entity, r represents the relation, o represents the tail entity, and c time Indicates time constraints, c space Represents spatial constraints, c construction Indicates conditional constraints;
[0094] Compared with existing technologies, it has the following beneficial effects:
[0095] 1. In order to endow the model with the ability to understand the constraints of sentence components, external knowledge of sentence constraints is injected into the model. A method for acquiring external knowledge of sentence constraints based on prompting thought chain is proposed. Using thought chain prompts can stimulate the ability of large models to generate high-quality external knowledge of sentence constraints to a greater extent.
[0096] 2. This paper utilizes a multi-scale perception method based on multi-granularity semantic embedding for relation extraction and constraint tuple recognition tasks. This method deeply integrates multi-granularity semantic information with grammatical features and external constraint knowledge. Two key grammatical features are dependency parsing and part-of-speech embedding. Different levels of language features are processed through independent attention computation modules.
[0097] 3. A manual feedback iterative mechanism is introduced. After the initial fine-tuning, the model is tested, and samples with incorrect, incomplete, or irrelevant outputs are manually filtered out. Corrective measures and correct samples are then input into the prompt for further fine-tuning. This process is iterated multiple times to obtain the final fine-tuned model. Through model fine-tuning, the model becomes more sensitive to triplet and multi-tuple extraction tasks, which can alleviate model illusion. Attached Figure Description
[0098] Figure 1 is a schematic diagram of the process of the present invention; Detailed Implementation
[0099] To better illustrate the purpose and advantages of this invention, the invention will be further described below with reference to the accompanying drawings and examples. It should be noted that the implementation of this invention is not limited to the following embodiments, and any modifications or alterations made to this invention will fall within the scope of protection of this invention.
[0100] Example
[0101] like Figure 1 As shown in the figure, the specific implementation steps of the constraint tuple extraction method based on semantic multi-scale perceptual network in this embodiment are as follows:
[0102] Step 1: Construct constrained external knowledge text. Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding Phrase text encoding sequence Text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis encoding sequence embedding and constrained external knowledge text embedding ;
[0103] Step 1.1: Use a large language model to perform syntactic decomposition on sentences in unstructured text, and construct first-level similar sentences and second-level similar sentences by determining the modifiers;
[0104] Step 1.1.1: Use a large language model to grammatically decompose the original unstructured text into simple sentences and modifiers as shown in equation (1);
[0105] simple s =(h, r, t) (1)
[0106] Where h represents the subject, r represents the predicate, and t represents the object;
[0107] Step 1.1.2: When the modifier is not NULL, use the large language model to replace the modifier with phrases and recombine them with simple sentences to form first-level similar sentences {s1, s2, ..., sn}; a first-level similar sentence is a sentence whose subject, verb, and object are completely identical to the given sentence, but other components are replaced with different words;
[0108] Step 1.1.3: When the modifier is NULL, the simple sentence is expanded and filled using a large language model to form a second-level similar sentence {s'1, s'2, ..., s'n}; a second-level similar sentence is a sentence whose subject-verb-object structure is completely consistent with the given sentence, but whose words have been replaced and then expanded and imitated to generate the sentence.
[0109] Step 1.2: Construct constraint external knowledge text using first-level similar statements, second-level similar statements, constraint substitution statements, identical constraint statements, and similar constraint statements;
[0110] Step 1.2.1: Construct part-of-speech constraints. The large language model uses part-of-speech constraints to generate constraint replacement statements, identical constraint statements, and similar constraint statements from unstructured text. A constraint replacement statement is a sentence that replaces the original constraint in a statement with a similar constraint of the same structure. An identical constraint statement is a sentence that generates an identical constraint statement with constraint c as the constraint in the statement. A similar constraint statement is a sentence that generates a sentence containing the type of constraint c.
[0111] Step 1.2.2: Combine the first-level similar statements, second-level similar statements, constraint replacement statements, identical constraint statements, and similar constraint statements to form constraint external knowledge text;
[0112] Step 1.3: Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding and phrase text encoding sequence Text embedding ;
[0113] Step 1.3.1: Add [CLS] to the original unstructured text. And the [SEP] tag, generate as shown in equation (2). The original text encoding sequence;
[0114] (2)
[0115] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; This represents each token in the text;
[0116] Step 1.3.2: Decompose the original unstructured text using an automatic phrase recognition method and add phrase start and end tags. <phrase>< / phrase> and including [CLS], With the [SEP] tag, construct the phrase text encoding sequence as shown in equation (3). ;
[0117] (3)
[0118] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; This represents each token in the text;
[0119] Step 1.3.3: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation The original text encoded sequence is obtained through mean pooling using the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer, resulting in the original text encoding sequence shown in Equation (4). Text embedding ;
[0120] (4)
[0121] in, Represents the original text encoding sequence All tokens in express The token in the original text encoding sequence;
[0122] Step 1.3.4: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The phrase text encoding sequence is obtained through mean pooling using the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer to obtain the phrase text encoding sequence as shown in Equation (5). Text embedding ;
[0123] (5)
[0124] in, Represents a phrase text encoding sequence All tokens in express Tokens in phrase text encoding sequences;
[0125] Step 1.4: Obtain the dependency parsing encoded sequence embeddings of the original unstructured text through mean pooling and fully connected layers of the BERT model. Part-of-speech analysis and encoding sequence embedding ;
[0126] Step 1.4.1: Use the large language model to generate the sentence dependency analysis of the original unstructured text, and obtain the semantic dependency analysis sequence as shown in Equation (6);
[0127] semantic = [[hse1, tse1,se1], . . . , [hse n , tse n ,se n (6)
[0128] Among them, hse i The core word in indicating dependency relations is tse i Modifiers indicating dependency relationships, se i It indicates the dependency relationship between each pair of dependency phrases.
[0129] Step 1.4.2: Use the spaCy natural language processing library to generate the original unstructured text. Perform part-of-speech analysis to obtain the pos shown in equation (7). s Part-of-speech analysis sequence;
[0130] pos s = [[w1, POS1], [w2, POS2],……[w n POS n (7)
[0131] Among them, w i POS represents each word in the statement. i Indicates the part of speech of a word;
[0132] Step 1.4.3: Add sequences containing [CLS] to the semantic dependency parsing sequence. And the [SEP] tag, generate as shown in equation (8). Dependency analysis sequence encoding sequence;
[0133] (8)
[0134] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; se i This represents each token in the dependency parsing sequence;
[0135] Step 1.4.4: Add [CLS] to the part-of-speech tagging sequence. The [SEP] tag generates a part-of-speech sequence encoding sequence as shown in equation (9);
[0136] (9)
[0137] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; p i This represents each token in the part-of-speech analysis sequence;
[0138] Step 1.4.5: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation Dependency analysis sequence encoding sequences are obtained through mean pooling in the BERT model. The dependency parsing sequence is encoded by a context-dependent representation of the sequence and mapped to the embedding space using a fully connected layer to obtain the dependency parsing sequence shown in Equation (10). Encoding sequence embedding ;
[0139] (10)
[0140] in, Indicates the sequence of dependency parsing All tokens in the encoded sequence, express Dependency analysis sequence encoding of tokens in the sequence;
[0141] Step 1.4.6: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Part-of-speech tagging sequences are obtained through mean pooling in the BERT model. The part-of-speech (POS) analysis encodes the context-related representation of the sequence and maps it to the embedding space using a fully connected layer to obtain the POS analysis as shown in Equation (11). Encoding sequence embedding ;
[0142] (11)
[0143] in, Part-of-speech analysis All tokens in the encoded sequence, express Part-of-speech encoding of tokens in sequences;
[0144] Step 1.5: Obtain the constraint external knowledge text embedding of the original unstructured text through mean pooling and fully connected layers of the BERT model. ;
[0145] Step 1.5.1: Add [CLS] to the constraint external knowledge text. And the [SEP] tag, generate as shown in equation (12). Constraining the text encoding sequence of external knowledge;
[0146] (12)
[0147] in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; t i This represents each token in the text;
[0148] Step 1.5.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] The constrained external knowledge text encoding sequence is obtained through mean pooling in the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer to obtain the constrained external knowledge text as shown in Equation (13). Encoding sequence Embedded;
[0149] (13)
[0150] in, Represents the constraint of external knowledge text All tokens in the encoded sequence, Represents the constraint of external knowledge text The token in the encoded sequence;
[0151] In this embodiment, the unstructured text "At the same time, warm moist air from the Gulf of Mexico flows north." is grammatically decomposed using a large language model into the simple sentence structure "(warm moist air, flows, north)" and the modifier "(At the same time, from the Gulf of Mexico)". The large language model then performs phrase substitution on the modifier and recombines it with the simple sentence to obtain the first-level similar sentence "During this period, warm moist air near the Gulf of Mexico flows north.". Part-of-speech constraints are constructed, and the large language model uses these constraints to generate the unstructured text into the constraint substitution sentence "During this period, warm moist air from the Gulf of Mexico flows north.", the same constraint sentence "At the same time, Penelope resists from the suitors and brings up their very son Telemachus.", and the similar constraint sentence "When he is back to home, Odysseus kills all of the suitors in his palace.". The first-level similar sentences, second-level similar sentences, constraint substitution sentences, same constraint sentences, and similar constraint sentences are then combined to form the constraint external knowledge text "During this period, warm...". moist air near the Gulf of Mexico flows north. At the same time, Penelope resists from the suitors and brings up their very son Telemachus. When he is back to home, Odysseus kills all of the suitors in his palace."; The text encoding sequence of the unstructured text is "[CLS]At the same time, warm moist air from the Gulf of Mexico flows north.After encoding "[PAD][SEP]" with BERT, the output token representation is averaged and pooled to obtain the text encoding sequence text embedding. The phrase text encoding sequence for unstructured text is "[CLS]". <phrase>At the same time <\phrase>, warm moist air from <phrase>The Gulf of Mexico flows north. [PAD][SEP]” After BERT encoding, the output token representation is average-pooled to obtain the phrase text encoding sequence text embedding. The dependency parsing encoding sequence for unstructured text generated using a large language model is "[CLS][[time, At, case], [time, the, det], [time, same,amod], [flows, time, obl], [flows, ,, punct], [air, warm, amod], [air, moist,amod], [flows, air, nsubj], [Gulf, from, case], [Gulf, the, det], [air, Gulf,nmod], [Mexico, of, case], [Gulf, Mexico, nmod], [ROOT, flows, root], [flows,north, advmod], [flows, ., punct]][SEP]". After BERT encoding, the output token representation is average-pooled to obtain the dependency parsing encoding sequence embedding. The part-of-speech (POS) encoding sequence of unstructured text generated using the SpaCY library is "[CLS][[At, ADP [the, DET], [same, ADJ], [time, NOUN], [,,PUNCT], [warm, ADJ], [moist, NOUN], [air, NOUN], [from, ADP], [the, DET],[Gulf, PROPN], [of, ADP], [Mexico, PROPN], [flows, VERB], [north, ADV], [.,PUNCT][SEP]". After BERT encoding, the output token representation is average-pooled to obtain the POS encoding sequence embedding. The constrained external knowledge text encoding sequence "[CLS]During this period, warm moist air near the Gulf of Mexico flows north. At the same time, Penelope resists from the suitors and brings up their very son Telemachus. When he is back to home, Odysseus kills all of the suitors in his palace. [SEP]" is encoded using BERT. The output token representation is then averaged to obtain the constrained external knowledge text embedding. ;
[0152] Step 2: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features and a tuple extraction model with guided constraints;
[0153] Step 2.1: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features; input the joint embedding obtained by fusing the attention weights of semantic syntactic perception and semantic external perception, the text embeddings of the original text and the phrase text encoding sequence into a linear classification layer to obtain the distribution probability;
[0154] Step 2.1.1: Calculate the text embedding of the original text encoding sequence respectively. and phrase text encoding sequence text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis and encoding sequence embedding The attention score is used to obtain the semantic grammar-aware attention weight as shown in Equation (14). ;
[0155] (14)
[0156] Where x represents the original text encoding sequence text embedding. and phrase text encoding sequence text embedding W represents the dependency parsing encoded sequence embedding. Part-of-speech analysis and encoding sequence embedding K is the key vector, d k It is the dimension of the vector;
[0157] Step 2.1.2: Calculate the text embedding of the original text encoding sequence. External knowledge text encoding sequence for constraints The attention score is used to obtain the semantic external perception attention weight as shown in Equation (15). :
[0158] (15)
[0159] Step 2.1.3: Apply semantic-grammar-aware attention weights Semantic external perception attention weight Original text encoding sequence text embedding and phrase text encoding sequence text embedding The splicing and fusion are performed to obtain the joint embedding h as shown in equation (16), where the symbol "+" represents the splicing operation;
[0160] h = w + p + + (16)
[0161] Step 2.1.4: Input the joint embedding h into the linear classification layer to obtain the BIOES class distribution probability of all labels. As shown in equation (17):
[0162] (17)
[0163] The linear classification layer consists of a fully connected layer (FC) and a normalized exponential function (softmax).
[0164] Step 2.2: Construct a tuple extraction model for guided constraints for fine-tuning unstructured text; establish the original parameter matrix, mapping matrix, and inverse mapping matrix for fine-tuning;
[0165] Step 2.2.1: In the Llama3 model, select the target layer, attention computation layer, and feedforward neural network layer to apply LoRA, and construct the original parameter matrix. ;
[0166] Step 2.2.2: Construct an initialization mapping matrix A for the target layer. Initialize matrix A using a random Gaussian distribution, where... The size of the matrix is determined by the rank of LoRA and the value of α.
[0167] Step 2.2.3: Construct an initialization inverse mapping matrix B for the target layer, initializing B as an all-zero matrix; where, The size of the matrix is determined by the rank of LoRA and the value of α.
[0168] In this embodiment, taking the unstructured text "At the same time, warm moist air from the Gulf of Mexico flows north." as an example, a semantic multi-scale perception model with semantic and syntactic feature fusion is constructed, and semantic and syntactic perception attention weights are applied. Semantic external perception attention weight Original text encoding sequence text embedding and phrase text encoding sequence text embedding By performing fusion, the joint embedding h is input into a linear classification layer to obtain the BIOES class distribution probabilities for all labels. Construct a tuple extraction model with guided constraints to output the tuples contained in the unstructured text "At the same time, warm moist air from the Gulf of Mexico flows north."
[0169] Step 3: Train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion using relation constraint extraction loss; fine-tune the tuple extraction model with guided constraints using iterative replacement of the original parameter matrix of the target layer and guided constraint feedback iteration.
[0170] Step 3.1: Use the relation constraint extraction loss as shown in Equation (18) to train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion;
[0171] (18)
[0172] Where CrossEntropy represents the cross-entropy loss function; Let α represent the probability distribution of each tag's BIOES category. c This represents the weight of class c, used to balance classes; the parameter γ is an adjustment factor, the larger the value, the more the weight of easily classified samples decreases; p c It is the probability that the model predicts the label belongs to category c; Refers to the expected BIOES tag for each tag;
[0173] Step 3.2: Fine-tune the tuple extraction model with guiding constraints;
[0174] Step 3.2.1: Obtain the original parameter matrix of the target layer. The transformation parameter matrix shown in equation (19) is obtained by transforming the mapping matrix A and the inverse mapping matrix B and fine-tuning it using Lora:
[0175] (19)
[0176] in, This represents the pre-trained weight matrix. This indicates parameter updates during fine-tuning; This represents the original forward propagation process, where the training data x extracted from the input tuple is processed through the weight matrix. Get the output; This indicates the correction terms introduced during the fine-tuning process; This means adding the original weight matrix W0 and the correction term BA to obtain the fine-tuned weight matrix, and then adding it to the training data extracted from the input tuple. Multiply to output the transformation parameter matrix. ;
[0177] Step 3.2.2: Iteratively replace the original parameter matrix of the target layer using the transformation parameter matrix;
[0178] Step 3.2.3: Update the mapping matrix A and the inverse mapping matrix B using the adaptive moment estimator Adam; update the original parameter matrix of the target layer using the gradient shown in Equation (20);
[0179] (20)
[0180] in, It is the gradient of the loss function with respect to the mapping matrix A. It is the gradient of the loss function with respect to the mapping matrix B. It is the loss of the weights updated in the weights;
[0181] Step 3.2.4: Repeat steps 3.2.1 to 3.2.3 in each training batch until the predetermined number of training epochs is reached;
[0182] Step 3.2.5: Use the error sample to obtain the correction content as the guiding constraint, and use the feedback iteration method shown in Equation (21) to fine-tune the tuple extraction model;
[0183] (twenty one)
[0184] in, This represents the input during the LoRA fine-tuning process. W represents the parameter matrix for model fine-tuning iterations. i This represents the weight matrix that is fine-tuned after feedback. This represents the correction term introduced during the fine-tuning process of the tuple dataset;
[0185] In this embodiment, taking the unstructured text "At the same time, warm moist air from the Gulf of Mexico flows north." as an example, the BIOES categories of all tags are defined, the loss for relation constraint extraction is calculated, and a semantic multi-scale perception model with semantic and syntactic feature fusion is trained and optimized. Fine-tuning samples of the text are defined, and a tuple extraction model with guided constraints is fine-tuned.
[0186] Step 4: Input the sentence samples used for tuple extraction into the trained semantic multi-scale perception model with semantic and syntactic feature fusion and the tuple extraction model with guided constraints, and output the tuple results as shown in Equation (22).
[0187] constrained_tuple=(s, r, o, c time , c space , c construction ) (twenty two)
[0188] Where s represents the head entity, r represents the relation, o represents the tail entity, and c time Indicates time constraints, c space Represents spatial constraints, c construction Indicates conditional constraints;
[0189] In this embodiment, taking the unstructured text "At the same time, warm moist air from the Gulf of Mexico flows north." as an example, the sentence sample used for tuple extraction is input into a trained semantic multi-scale perception model that incorporates semantic and syntactic features and a guided tuple extraction model, and the tuple results are output as (warm moist air, flows, north, At the same time, from the Gulf of Mexico, NAN, NAN).
[0190] To illustrate the effect of the constrained tuple extraction of the present invention, this experiment compares three methods under the same conditions, using the same training set, validation set, and test set.
[0191] The first method is a constrained tuple extraction method based on an interactive perceptual attention network; the second method is an open information extraction method based on dual predicate prompts; and the third method is the constrained tuple extraction method based on a semantic multi-scale perceptual network, as described in this invention. The evaluation metrics used are: precision, recall, and F1 score.
[0192] The results of constraint tuple extraction are as follows: the precision, recall, and F1 score of the first method are 71.9%, 57.4%, and 63.8%, respectively; the precision, recall, and F1 score of the second method are 67.9%, 60.9%, and 64.2%, respectively; and the precision, recall, and F1 score of the method proposed in this invention are 74.6%, 77.7%, and 76.2%, respectively. Experiments demonstrate the effectiveness of the proposed constraint tuple extraction method based on a semantic multi-scale perceptual network.
[0193] Experimental results show that this method enhances relation constraint tuple extraction by introducing a multi-granularity semantic multi-scale perception mechanism. It explicitly utilizes text semantics, syntax, and external knowledge information to improve the generalization of text representation, effectively addressing the problems of low generalization performance and low recall in constraint tuple extraction tasks. By completing constraint tuple extraction in two stages—relation constraint extraction and tuple extraction—the accuracy of constraint tuple extraction is improved. This method has broad application prospects in knowledge graph construction, the introduction of external knowledge systems into large language models, and intelligent search.
[0194] The above description is merely a preferred embodiment of the present invention, and the present invention should not be limited to the content disclosed in this embodiment and the accompanying drawings. Any equivalent or modified embodiments made without departing from the spirit of the present invention fall within the scope of protection of the present invention.< / phrase> < / phrase>
Claims
1. A constraint multi-tuple extraction method based on semantic multi-scale perception network, characterized in that: Includes the following steps, Step 1: Construct constrained external knowledge text. Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding Phrase text encoding sequence Text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis encoding sequence embedding and constrained external knowledge text embedding ; Step 2: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features and a tuple extraction model with guided constraints; Step 2.1: Construct a semantic multi-scale perception model with fusion of semantic and syntactic features; input the joint embedding obtained by fusing the attention weights of semantic syntactic perception and semantic external perception, the text embeddings of the original text and the phrase text encoding sequence into a linear classification layer to obtain the distribution probability; Step 2.2: Construct a tuple extraction model for guided constraints for fine-tuning unstructured text; establish the original parameter matrix, mapping matrix, and inverse mapping matrix for fine-tuning; Step 3: Train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion using relation constraint extraction loss; The tuple extraction model with guided constraints is fine-tuned by iteratively replacing the original parameter matrix of the target layer and using guided constraint feedback iteration. Step 4: Input the sentence samples used for tuple extraction into the trained semantic multi-scale perception model with semantic and syntactic feature fusion and the tuple extraction model with guided constraints, and output the tuple results as shown in Equation (22). constrained_tuple=(s, r, o, c time , c space , c construction ) (22) wherein s represents a head entity, r represents a relation, o represents a tail entity, c time represents a temporal constraint, c space represents a spatial constraint, c construction represents a conditional constraint.
2. The constraint multi-tuple extraction method based on semantic multi-scale perception network according to claim 1, wherein: Step 1 is implemented as follows: Step 1.1: Use a large language model to perform syntactic decomposition on sentences in unstructured text, and construct first-level similar sentences and second-level similar sentences by determining the modifiers; Step 1.2: Construct constraint external knowledge text using first-level similar statements, second-level similar statements, constraint substitution statements, identical constraint statements, and similar constraint statements; Step 1.3: Obtain the original text encoding sequence of the unstructured text through mean pooling and fully connected layers of the BERT model. Text embedding and phrase text encoding sequence Text embedding ; Step 1.4: Obtain the dependency parsing encoded sequence embeddings of the original unstructured text through mean pooling and fully connected layers of the BERT model. Part-of-speech analysis and encoding sequence embedding ; Step 1.5: Obtain constraint external knowledge text embedding for raw unstructured text by mean-pooling and fully connected layer of BERT model . 3.The constraint multi-tuple extraction method based on semantic multi-scale perception network according to claim 2, characterized in that: Step 1.1 is implemented as follows: Step 1.1.1: Use a large language model to grammatically decompose the original unstructured text into simple sentences and modifiers as shown in equation (1); simple s = (h, r, t) (1) Where h represents the subject, r represents the predicate, and t represents the object; Step 1.1.2: When the modifier is not NULL, use the large language model to replace the modifier with phrases and recombine them with simple sentences to form first-level similar sentences {s1, s2, ..., sn}; a first-level similar sentence is a sentence whose subject, verb, and object are completely identical to the given sentence, but other components are replaced with different words; Step 1.1.3: When the modifier is NULL, the simple sentence is expanded and filled using the large language model to form a second-level similar sentence {s'1, s'2, ..., s'n}. A second-level similar sentence is a sentence that has the same subject-verb-object structure as the given sentence, but whose words have been replaced and then expanded and imitated. 4.The constraint multi-tuple extraction method based on semantic multi-scale perception network according to claim 2, wherein: Step 1.2 is implemented as follows: Step 1.2.1: Construct part-of-speech constraints. The large language model uses part-of-speech constraints to generate unstructured text sentences into constraint replacement sentences, sentences with the same constraints, and sentences with the same type of constraints. A constraint substitution statement is a statement that replaces an existing constraint in a statement with a constraint of the same type and structure. The same constraint statement refers to generating a statement with constraint c as the constraint in the statement; the same type constraint statement refers to generating a statement containing the type of constraint c. Step 1.2.2: Combine the first-level similar statements, second-level similar statements, constraint replacement statements, identical constraint statements, and similar constraint statements to form the constraint external knowledge text.
5. The constraint multi-tuple extraction method based on semantic multi-scale perception network according to claim 2, characterized in that: Step 1.3 is implemented as follows: Step 1.3.1: Add [CLS] to the original unstructured text. With the [SEP] tag, generate as shown in equation (2). The original text encoding sequence; (2) in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; This represents each token in the text; Step 1.3.2: Decompose the original unstructured text using an automatic phrase recognition method and add phrase start and end tags. <phrase>< / phrase> and including [CLS], With the [SEP] tag, construct the phrase text encoding sequence as shown in equation (3). ; (3) wherein, the tag indicates the start of a sequence, the tag indicates a fill sequence length placeholder, the tag indicates the end of a sequence; represents each token in the text; Step 1.3.3: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation The original text encoded sequence is obtained through mean pooling using the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer, resulting in the original text encoding sequence shown in Equation (4). Text embedding ; (4) wherein, represents all tokens in the original text encoding sequence represents a token in the original text encoding sequence; Step 1.3.4: obtaining the phrase text encoding sequence by mean-pooling the BERT model The phrase text encoding sequence is obtained by mean-pooling the BERT model The context-dependent representation of the original text encoding sequence is mapped to an embedding space using a fully connected layer, obtaining the text embedding of the phrase text encoding sequence as shown in equation (5) ; (5) wherein, represents a phrase text encoding sequence all tokens in the phrase text encoding sequence, represents a token in the phrase text encoding sequence.
6. The constraint tuple extraction method based on a semantic multi-scale perceptual network as described in claim 2, characterized in that: Step 1.4 is implemented as follows: Step 1.4.1: Use the large language model to generate the sentence dependency analysis of the original unstructured text, and obtain the semantic dependency analysis sequence as shown in Equation (6); semantic = [[hse1, tse1,se1], . . . , [hse n , these n ,this n ]] (6) Where hsei represents the core word in the dependency relationship, tsei represents the modifier in the dependency relationship, and sei represents the dependency relationship between each pair of dependency words; Step 1.4.2: Use the spaCy library of natural language processing to generate the part-of-speech analysis of the original unstructured text to obtain the poss part-of-speech analysis sequence as shown in equation (7); pos s = [[w1, POS1], [w2, POS2],……[w n , POS n ]] (7) Where wi represents each word in the sentence, and POSi represents the part of speech of the word; Step 1.4.3: Adding [CLS], and [SEP] tokens to the semantic dependency parsing sequence, generating a dependency parsing sequence encoding sequence as shown in equation (8). (8) (8) in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; sei represents each token in the dependency parsing sequence; Step 1.4.4: Adding [CLS] and [SEP] tokens to the POS analysis sequence, generating a POS analysis sequence encoding sequence as shown in Equation (9); (9) (9) wherein, the tag represents the start of a sequence, the tag represents a fill sequence length placeholder, the tag represents the end of a sequence; pi represents each token in the part-of-speech analysis sequence; Step 1.4.5: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation would require the full context.] Dependency analysis sequence encoding sequences are obtained through mean pooling in the BERT model. The dependency parsing sequence is encoded by a context-dependent representation of the sequence and mapped to the embedding space using a fully connected layer to obtain the dependency parsing sequence shown in Equation (10). Encoding sequence embedding ; (10) in, Indicates the sequence of dependency parsing All tokens in the encoded sequence, express Dependency analysis sequence encoding of tokens in the sequence; Step 1.4.6: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation Part-of-speech tagging sequences are obtained through mean pooling in the BERT model. The part-of-speech (POS) analysis encodes the context-related representation of the sequence and maps it to the embedding space using a fully connected layer to obtain the POS analysis as shown in Equation (11). Encoding sequence embedding ; (11) in, Part-of-speech analysis All tokens in the encoded sequence, express Tokens in part-of-speech encoding sequences.
7. The constraint n-ary relation extraction method based on semantic multi-scale perception network according to claim 2, characterized in that: Step 1.5 is implemented as follows: Step 1.5.1: Add [CLS] to the constraint external knowledge text. And the [SEP] tag, generate as shown in equation (12). Constraining the text encoding sequence of external knowledge; (12) in, The marker indicates the start of the sequence. The marker indicates a placeholder for the length of the padding sequence. The marker indicates the end of the sequence; ti represents each token in the text; Step 1.5.2: [The text appears to be incomplete and contains several grammatical errors. A more accurate translation The constrained external knowledge text encoding sequence is obtained through mean pooling in the BERT model. The context-dependent representation of the original text encoding sequence is obtained and mapped to the embedding space using a fully connected layer to obtain the constrained external knowledge text as shown in Equation (13). Encoding sequence Embedded; (13) in, Represents the constraint of external knowledge text All tokens in the encoded sequence, Represents the constraint of external knowledge text The token in the encoded sequence.
8. The constraint multi-tuple extraction method based on semantic multi-scale perception network of claim 1, wherein: Step 2.1 is implemented as follows: Step 2.1.1: Calculate the text embedding of the original text encoding sequence respectively. and phrase text encoding sequence text embedding Dependency analysis encoding sequence embedding Part-of-speech analysis and encoding sequence embedding The attention score is used to obtain the semantic grammar-aware attention weight as shown in Equation (14). ; (14) where x represents the original text encoding sequence text embedding and phrase text encoding sequence text embedding , W represents the dependency analysis encoding sequence embedding and part-of-speech analysis encoding sequence embedding , K is the key vector, and dk is the dimension of the vector; Step 2.1.2: Compute original text encoding sequence text embeddings Attention scores for the constrained external knowledge text encoding sequence obtain semantic external-aware attention weights as in equation (15) : (15) Step 2.1.3: Apply semantic-grammar-aware attention weights Semantic external perception attention weight Original text encoding sequence text embedding and phrase text encoding sequence text embedding The splicing and fusion are performed to obtain the joint embedding h as shown in equation (16), where the symbol "+" represents the splicing operation; h = w + p + (16) Step 2.1.4: Input the joint embedding h into the linear classification layer to obtain the BIOES class distribution probability of all labels. As shown in equation (17): (17) The linear classification layer consists of a fully connected layer (FC) and a normalized exponential function (softmax).
9. The constraint multi-tuple extraction method based on semantic multi-scale perception network according to claim 1, characterized in that: Step 2.2 is implemented as follows: Step 2.2.1: Select target layers to apply LoRA in the Llama3 model, attention computation layers and feedforward neural network layers, and construct the original parameter matrix ; Step 2.2.2: Construct the initialization mapping matrix A for the target layer, initialize the matrix A using a random Gaussian distribution, wherein, The size of the matrix is determined by the rank of LoRA and the value of a; Step 2.2.3: Construct the initialization inverse mapping matrix B for the target layer, initialize B as a full 0 matrix; wherein, The size of the matrix is determined by the rank of LoRA and the value of a.
10. The constraint n-ary relation extraction method based on semantic multi-scale perception network of claim 1, wherein: Step 3 is implemented as follows: Step 3.1: Use the relation constraint extraction loss as shown in Equation (18) to train and optimize the semantic multi-scale perception model with semantic and syntactic feature fusion; (18) Where CrossEntropy represents the cross-entropy loss function; This represents the probability distribution of each label's BIOES category; αc is the weight of category c, used to balance the categories; the parameter γ is an adjustment factor, the larger the value, the more the weight of easily classified samples decreases; pc is the probability that the model predicts the label belongs to category c. Refers to the expected BIOES tag for each tag; Step 3.2: Fine-tune the tuple extraction model with guiding constraints; Step 3.2.1: Obtain the original parameter matrix of the target layer. The transformation parameter matrix shown in equation (19) is obtained by transforming the mapping matrix A and the inverse mapping matrix B and fine-tuning it using Lora: (19) in, This represents the pre-trained weight matrix. This indicates parameter updates during fine-tuning; This represents the original forward propagation process, where the training data x extracted from the input tuple is passed through the weight matrix. Get the output; This indicates the correction term introduced during the fine-tuning process; This means adding the original weight matrix W0 and the correction term BA to obtain the fine-tuned weight matrix, and then adding it to the training data extracted from the input tuple. Multiply to output the transformation parameter matrix. ; Step 3.2.2: Iteratively replace the original parameter matrix of the target layer using the transformation parameter matrix; Step 3.2.3: Update the mapping matrix A and the inverse mapping matrix B using the adaptive moment estimator Adam; update the original parameter matrix of the target layer using the gradient shown in equation (20); (20) wherein, is the gradient of the loss function with respect to the mapping matrix A, is the gradient of the loss function with respect to the mapping matrix B, is the weight of the loss to the weight update; Step 3.2.4: Repeat steps 3.2.1 to 3.2.3 in each training batch until the predetermined number of training epochs is reached; Step 3.2.5: Use the error sample to obtain the correction content as the guiding constraint, and use the feedback iteration method shown in Equation (21) to fine-tune the tuple extraction model; (21) wherein, represents the input in the LoRA fine-tuning process, represents the parameter matrix of the model fine-tuning iteration; Wi represents the weight matrix that is fine-tuned after feedback, represents the correction term introduced by the multivariate dataset fine-tuning process.