A Complex Triple Extraction Method for the Field of Weaponry and Equipment
By using the weapon and equipment knowledge base and multi-round anti-attack methods in the complex triple extraction in the weapon and equipment field, the problems of insufficient utilization of unstructured information and sample annotation dependence are solved, and the more efficient triple extraction effect is achieved, improving the robustness and accuracy of the model.
Patent Information
- Application Number
- CN202210975168.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-17
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-08-17
AI Technical Summary
In the complex triple extraction in the field of weapons and equipment, the use of unstructured information is insufficient and the dependence on sample annotation is severe, resulting in insufficient robustness of the model.
Using the method of mounting the knowledge base of weapons and equipment fields and combining multiple rounds of confrontational attacks, the feature vector is obtained through self-coding and self-attention mechanisms, the head entity is identified using a single-layer pointer network and knowledge rewards are provided, and the object position is determined by layered annotation framework, and complex triple extraction is finally realized.
The model's ability to utilize unstructured information is improved, sample diversity is enhanced, and the model's robustness and extraction effect is improved, reaching an F1 value of 81.72%.
Smart Images

Figure CN115270785B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the triple extraction technology in the field of natural language processing, and particularly relates to the complex triple extraction for the field of weapons and equipment. Background Art
[0002] Relation Extraction (RE) is a key subtask of knowledge acquisition, which is responsible for extracting the relationships confirmed by ontology design from unstructured natural language and constructing the lines between nodes in the knowledge graph accordingly. According to the type of relationship, the relationships can be divided into two categories: Normal Triples and Complex Triples, where the complex triples include two categories: head entity or tail entity overlapping triples and completely overlapping head and tail entities.
[0003] There are mainly two major schools of methods for triple extraction: the first is the pipeline-style extraction, which extracts the relationships between entities after the named entity recognition and classification tasks are completed; the second is the joint extraction, which simultaneously identifies entities and relationships, originating from the end-to-end model of neural networks. Currently, there are two problems: one is the insufficient utilization of unstructured information, and the deep domain features cannot be mined from multiple perspectives; the other is that the method is highly dependent on the sample annotation in the field of weapons and equipment. In order to more fully mine unstructured information, an encyclopedic knowledge base is mounted to interpret the types of correct head entities of the head entity recognizer to give knowledge rewards to the subsequent extraction process; in order to alleviate the dependence of the model on sample annotation, the diversity of samples is improved by using multi-round adversarial attacks, and the robustness of the model is improved. Summary of the Invention
[0004] Based on the above research and analysis, it can be found that there are two problems in the extraction of complex relationships in the field of weapons and equipment. The first is the insufficient utilization of unstructured information, and the deep domain features cannot be mined from multiple perspectives. The second is that the method relies heavily on sample annotation in the field of weapons and equipment. In order to more fully mine unstructured information, we use an attached encyclopedia knowledge base to interpret the types of correct head entities of the head entity recognizer to give knowledge rewards to the subsequent extraction process; to alleviate the model's dependence on sample annotation, we use the method of multi-round adversarial attacks to improve the diversity of samples and enhance the robustness of the model. Accordingly, a complex triple extraction method that attaches a knowledge base in the field of weapons and equipment and combines multi-round adversarial attacks is proposed. This method is a three-stage extraction scheme. The first stage is to obtain feature vectors; the second stage is to use a single-layer pointer network to identify the head entity and attach the knowledge base in the field of weapons and equipment to give knowledge rewards to the correctly identified head entity. To solve the problem of lack of sample diversity, we use the means of launching multi-round adversarial attacks in the Embedding layer; the third stage is to adopt a hierarchical annotation framework based on linearized predicates and use a single-layer pointer network to determine the start and end positions of the object, and finally realize the extraction of complex triples.
[0005] A complex triple extraction method for the field of weapons and equipment of the present invention includes the following steps:
[0006] (1) Automatically collect information such as ships and aircraft through data collection technology and persist it into a container. After data screening and data cleaning, 5,000 pieces of labeled data are finally obtained.
[0007] (2) The text is serialized by the text embedding layer module, and the self-encoding method is used in combination with the self-attention mechanism to obtain the feature vectors of the bidirectional context of the text.
[0008] (3) Input the obtained vector into the head entity recognizer combined with multi-round adversarial attacks to identify it as a head entity or a tail entity.
[0009] (4) Pass the obtained entity through the weapons and equipment knowledge base module. For different head entity types, obtain the sentence interpretation vectors describing this type according to the definitions or explanations in the encyclopedia. Then, perform information fusion with the smallest character granularity.
[0010] (5) Finally, enter the relationship tail entity recognition module to specify the head recognition and tail recognition of the corresponding tail entity of the relationship.
[0011] Through data collection technology, information such as ships and aircraft on the military network was automatically collected and persisted in a container. After data screening and data cleaning, 5000 pieces of labeled data were finally obtained, and the data quality was inspected by the signed cross method. The final data was divided with a ratio of 7:2:1 as the training set, validation set, and test set respectively.
[0012] The experimental data is from publicly available data on the Internet. Through data collection technology, information such as ships and aircraft on the military network was automatically collected and persisted in a container. After data screening and data cleaning, 5000 pieces of labeled data were finally obtained, and the data quality was inspected by the signed cross method. The relationship distribution statistics are shown in Table 1. The statistics of the experimental data are shown in Table 2.
[0013] Table 1 Relationship Distribution Statistical Table
[0014]
[0015]
[0016] It can be found from Table 1 that the relationships with the most occurrences in the dataset are "equipment" and "belongs to", accounting for 29.68% and 24.80% respectively; the relationships with the fewest occurrences are "ship width" and "draft", accounting for 0.55% and 0.25% respectively. It can be found from the observation of the relationship distribution that this dataset has strong domain characteristics.
[0017] Table 2 Statistical Information of Experimental Data
[0018]
[0019] It can be found from Table 2 that there is a certain proportion of single entity overlap triples and entity pair overlap triples in the data. The numbers are 5435 and 68 respectively, accounting for 69.26% and 0.87% respectively. Examples of data annotation are shown in Table 3. The content of the first sample contains SPO triples, and "a certain R number" participates in three triples as the shared head entity. The content of the second sample contains EPO triples, and "a certain number" and "19xx year" participate in two triples as the head entity and tail entity respectively.
[0020] Table 3 Marking Example Information of Experimental Data
[0021]
[0022] To ensure the fairness of the evaluation, the precision (P), recall (R), and F1 value based on the fragment entity granularity that ignores the order constraints are calculated. The calculation method based on the fragment entity granularity is shown in the following formula
[0023]
[0024] Among them, TP represents the number of combinations of head entities, relationships, and tail entities correctly identified (with entity or relationship fragments as the smallest granularity), FP represents the number of combinations of head entities, relationships, and tail entities misidentified as such, and FN represents the number of combinations of head entities, relationships, and tail entities not identified
[0025] The text vectorization technology adopted is BERT. First, token embeddings are carried out, which include three parts: The first part, Token Embedding, is the word vector or character vector. The CLS token is used to more fairly integrate the semantics of each token in the sentence for subsequent classification tasks; the second part, Segment Embedding, is required to distinguish two sentences due to the NSP (Next Sentence Prediction) subtask of the autoencoder language model, which is defaulted to zero in this paper; the third part, Position Embeddings, is to introduce position embedding information to adapt to the temporality of natural language after getting rid of the position constraints of the RNN time series model. To avoid the defect that the duality of trigonometric functions cannot distinguish directions, instead of adopting the position embedding information method of TRM, it is obtained by learning parameters. Then, through 12 layers of TRM modules, the bidirectional context of the text is obtained as a vector using the autoencoder method combined with the self-attention mechanism
[0026] The input of the text embedding layer is regarded as a character serialization, X = (x0, x1, x2,..., x n-1 ), and the process from the input token sequence to the vector sequence is shown in the following formula
[0027]
[0028] Among them, V x represents the vector sequence obtained by the input X passing through the BERT pre-trained model, represents the Token Embedding of the input sequence X, represents the Segment Embedding of the input sequence, The PositionEmbedding representing the input sequence, where "[0]" means taking the zero - numbered vector after passing through BERT. The generation method of adversarial attack is the Fast Gradient Method (FGM), and its principle is shown in the following formula.
[0029]
[0030] Among them, θ represents the model parameters, x represents the original input sample, y represents the gold label, L represents the loss function, represents taking the gradient of x.
[0031] FGM: r adv = ε * g / ||g||2
[0032] Among them, r adv represents the attack perturbation sample, ε represents the adversarial attack intensity coefficient, and g represents the gradient. FGM more strictly preserves the direction of the gradient by using the L2 normalization technique to correct the gradient. Use the encyclopedia as an external knowledge base for the type of weapon and equipment. For different head entity types, obtain the sentence interpretation vector describing this type according to the definitions or explanations in the encyclopedia. Then, fuse the information with the character as the smallest granularity. The working principle of the Type information fusion module is shown in the following formula.
[0033] sent_vec entity = Wiki(Type entity )
[0034] Among them, sent_vec type represents the sentence interpretation vector corresponding to the category Type, Wiki represents the encyclopedia, and entity represents the result of the head entity recognizer combining multi - round adversarial attacks in the previous section.
[0035]
[0036] Among them, represents the vector of the i - th token, and represent the vector and the sentence interpretation vector after multi - round adversarial attacks respectively. In this paper, addition is used to semantically fuse the vectors in different feature spaces, and finally, the fusion vector of the knowledge base of the mounted weapon and equipment field and the sample generated by the adversarial attack is obtained.
[0037] The tail entity recognition module simultaneously recognizes the tail entity and the relationships included in the ontology design to which it belongs. Its structure is similar to that of the head entity recognizer, and the task is also refined into two subtasks: the recognition of the head of the tail entity corresponding to the specified relationship and the recognition of the tail. The difference is that all the relationships covered in the ontology design will be operated on the results of the subject recognizer to obtain the mining of the subject and all possible relationships. The operating principle of this module is shown in the following formula.
[0038]
[0039] Among them, and represent the probabilities that the i-th token is the head and the tail of the tail entity respectively, and H j represents the overall sequence of the j-th head entity recognized by the head entity recognizer. v k represents the vector obtained by taking the average of the results of the S recognition layer and the E recognition layer in the head entity recognition part. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of the present invention. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:
[0041] Figure 1 is a flowchart of a complex triple extraction method for the field of weaponry and equipment according to the present invention;
[0042] Figure 2 is a schematic diagram of the ablation experiment effect of the model extraction method under different assembled components. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0043] The exemplary embodiments of the present invention will be described in more detail below with reference to the drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided so that the present invention can be more thoroughly understood and the scope of the present invention can be fully conveyed to those skilled in the art.
[0044] Figure 1 The complex triple extraction method and flowchart for the field of weaponry and equipment according to the present invention include the following steps:
[0045] Through data acquisition technology, information such as ships and aircraft on the military network was automatically collected and persisted in containers. After data screening and data cleaning, 5,000 labeled data were finally obtained, and the data quality was checked by the signed cross method. The final data was divided with a ratio of 7:2:1, which were used as the training set, validation set, and test set respectively.
[0046] The text vectorization technology adopted is BERT. First, Embedding is carried out on tokens, which includes three parts: The first part, Token Embedding, is a word vector or character vector. The CLS marker is used to more fairly integrate the semantics of each token in the sentence for subsequent classification tasks; The second part, Segment Embedding, is for the NSP (Next Sentence Prediction) sub-task of the auto-encoding language model to distinguish two sentences, which is defaulted to zero in this article; The third part, Position Embeddings, is to introduce position embedding information to adapt to the temporality of natural language after getting rid of the position constraint of the RNN time series model. To avoid the defect that the duality of trigonometric functions cannot distinguish directions, instead of adopting the position embedding information method of TRM, it is obtained by learning parameters. Then, through 12 layers of TRM modules, the auto-encoding method is used to combine the self-attention mechanism to obtain vectors for the bidirectional context of the text.
[0047] The input of the text embedding layer is regarded as a character serialization, X = (x0, x1, x2,..., x n-1 ), and the process from the input token sequence to the vector sequence is shown in the following formula.
[0048]
[0049] Among them, V x represents the vector sequence obtained by the input X passing through the BERT pre-trained model, represents the Token Embedding of the input sequence X, represents the Segment Embedding of the input sequence, represents the PositionEmbedding of the input sequence, and "[0]" represents taking out the zero vector after passing through BERT.
[0050] The generation method of adversarial attack is Fast Gradient Method (FGM), and its principle is shown in the following formula.
[0051]
[0052] Among them, θ represents the model parameters, x represents the original input sample, y represents the gold label, and L represents the loss function. represents taking the gradient with respect to x.
[0053] FGM.r adv = ε * g / ||g||2
[0054] Among them, r adv represents the attack perturbation sample, ε represents the adversarial attack intensity coefficient, and g represents the gradient. FGM more strictly preserves the direction of the gradient by using the L2 normalization technique to correct the gradient.
[0055] Use the encyclopedia as an external knowledge base for weapon and equipment types. For different head entity types, according to
[0056] the definitions or explanations in the encyclopedia, obtain the sentence interpretation vectors that describe this type. Then, perform information fusion with the smallest granularity of words. The working principle of the Type information fusion module is shown in the following formula.
[0057] sent_vec entity = Wiki(Type entity )
[0058] Among them, sent_vec type represents the sentence interpretation vector corresponding to the category Type, Wiki represents the encyclopedia, and entity represents the result of the head entity recognizer that combines multiple rounds of adversarial attacks in the previous section.
[0059]
[0060] Among them, represents the vector of the i-th token, and represent the vectors and sentence interpretation vectors after multiple rounds of adversarial attacks respectively. In this paper, addition is used to perform semantic fusion on the vectors in different feature spaces, and finally, the fusion vector of the knowledge base of the mounted weapon and equipment field and the samples generated by adversarial attacks is obtained.
[0061] The relation tail entity recognition module simultaneously recognizes the tail entity and the relations included in the ontology design to which it belongs. Its structure is similar to that of the head entity recognizer, and the task is also refined into two subtasks: the recognition of the head of the tail entity corresponding to the specified relation and the recognition of the tail. The difference is that all the relations covered in the ontology design will be operated on the results of the subject recognizer to obtain the mining of the subject and all possible relations. The operation principle of this module is shown in the following formula.
[0062]
[0063] Among them, and represent the probabilities of the i-th token as the head and tail of the tail entity, respectively, H j represents the overall sequence of the j-th head entity recognized by the head entity recognizer. v k represents the vector obtained by averaging the results of the S recognition layer and the E recognition layer in the head entity recognizer part.
[0064] Figure 2 is a schematic diagram of the ablation experiment effect of the model extraction method under different assembled components, where:
[0065] The first group is to remove multi-round adversarial attacks and the weapon and equipment knowledge base;
[0066] The second group is to remove multi-round adversarial attacks and retain the weapon and equipment knowledge base;
[0067] The third group is to remove the weapon and equipment knowledge base and retain multi-round adversarial attacks;
[0068] The fourth group is to retain both multi-round adversarial attacks and mount the weapon and equipment knowledge base.
[0069] From Figure 2 it can be seen that without adding any components and only using the BERT model as the pre-trained model to introduce general domain knowledge, the performance reaches an F1 value of 80.18%. Comparing experiment numbers 0 and 1, it can be found that the externally mounted weapon and equipment domain knowledge base makes a great contribution to the improvement of performance, and the F1 value increases by 0.98%. Comparing experiment numbers 0 and 2, it can be found that launching multi-round adversarial attacks during training is effective, which improves the sample diversity, increases the perplexity of the model to a certain extent, and obtains a 0.25% increase in the F1 value. Comparing experiment numbers 0 and 3, it can be found that the effect is significantly improved after launching multi-round adversarial attacks and mounting the externally mounted weapon and equipment domain knowledge base during training. The combination of the two increases the F1 value by 1.54%.
[0070] Example 1:
[0071] To verify the effectiveness of the proposed complex triple method RDA that combines domain knowledge of mounted weapons and equipment with multi-round adversarial attacks, the experiment compared four models that currently perform best in the triple extraction task. The first model is NovelTagging proposed at the ACL conference in 2017; the second model is CopyR proposed at the ACL conference in 2018; the third model is GraphRel proposed at the ACL conference in 2019; the fourth model is the Baidu triple extraction method (referred to as SJL) proposed by Su Jianlin in 2019; the fifth is the HSL method proposed at the NLPCC2020 conference in 2020. The settings of the comparative experiment and the descriptions of the corresponding characteristics are shown in Table 4.
[0072] Table 4 Information Table of Comparative Experiments
[0073]
[0074] Among them, the NovelTagging method adopts the end-to-end model idea, uses Bi-LSTM to capture semantic information, designs a new data annotation strategy, uses the Arabic numerals 1 and 2 to represent the relative positions of the head and tail entities respectively, and transforms the relation extraction task into a horizontal sequence annotation problem. The CopyR method introduces the commonly used copying mechanism in the translation field into the relation extraction task, which is a typical joint learning architecture. It uses two strategies for decoding, one is the joint decoder, and the other is multiple separate decoders. It uses LSTM to capture semantics and conducts the extraction of complex triples through multiple separate decoders. The GraphRel method uses an LSTM network to capture context information based on Glove-trained word vectors, and then uses a Bi-GCN network to construct a dependency structure multi-hop information capture to complete the tasks in two stages. The task of the first stage is to judge the belonging relationship of entity pairs; the task of the second stage is to use Bi-GCN to perform reinforcement learning on the word features of incoming and outgoing edges, so that GCN has a directional characteristic and is more adaptable to the directional nature of relations. The SJL method first conducts entity recognition work, and then inputs the information of the subject and the context information of the sentence captured by Bi-LSTM into the model for 0, 1 sequence annotation, and has a certain processing ability for complex triples. The HSL method uses the dilated convolution technology with residual connections to expand the receptive field of the model, alleviates the problem of information omission, uses the Self-attention mechanism to extract relations, and has good extraction ability for complex triples.
[0075] The experiment was run on the Linux Ubuntu operating system, with the programming language being Python 3.6.9. The neural network was built using the Pytorch framework. The Batch_size was set to 32 according to the GPU size of the server. In this paper, the weapon equipment knowledge base was mounted using the Word2Vec model, with the vector dimension set to 300, the sliding window set to 5, and the low-frequency word threshold set to 1. The interference intensity coefficient for multi-round adversarial attacks was 1.0. The early stopping method was used to control and optimize the training, with the tolerance set to 20 and the threshold for fluctuating changes set to 0.00002. The parameters related to this experiment are shown in Table 5.
[0076] Table 5 Information on model parameter settings
[0077]
[0078] The RDA method proposed in this invention runs under the Linux Ubuntu operating system and uses the GPU for matrix acceleration. During the training process, the data was divided in a ratio of 7:2:1. After multiple rounds of parameter tuning and training, multiple attempts were made on parameters such as the learning rate, interference intensity coefficient, change threshold, and tolerance. Finally, the best parameter combination in the model parameter settings information table was obtained. The performance comparison of the final comparative experiment is shown in Table 6.
[0079] Table 6 Results of the comparative experiment
[0080]
[0081] After analyzing the data in Table 6, it can be seen that the F1 values of NovelTagging numbered 0 using single-layer sequence labeling and SJL method numbered 3 using hierarchical sequence labeling are 23.65% and 74.24% respectively. There are probably two reasons: one reason is that the former's semantic capture is relatively poor; another reason may be that the single horizontal sequence labeling task of the former cannot solve the label overlap problem of complex triples, while the vertical stratification of the latter can alleviate the problem of label stacking. The model experiments of using a single joint decoder and multiple separate decoders numbered 2 achieved F1 values of 18.24% and 25.57% respectively. From this, it can be seen that the latter multiple separate decoders can alleviate the two major problems encountered by complex triples: SEO and EPO, obtaining a performance improvement of 7.33%. The F1 values of the two-stage SJL method numbered 3 and the HSL method using dilated convolution technology on the dataset are 74.24% and 79.17% respectively, obtaining a performance improvement of 4.93%. It can be seen that the dilated convolution technology adopted by the latter expands the receptive field, which is beneficial to the relation extraction task. The above methods do not integrate knowledge prompts into model extraction, and the robustness is limited due to limited data. The proposed RDA method mounts the knowledge of the weapon and equipment field, incorporates the type explanation of entities as new knowledge prompts into the model, as the reward in the first stage, and then combines multi-round adversarial attacks to improve sample diversity, gives the model the maximum confusion under limited conditions to enhance the robustness of the model, and finally obtains the best performance: an F1 value of 81.72%, obtaining a performance improvement of 2.55% compared with HSL proposed by NLPCC2020.
[0082] The single sequence labeling task of the NovelTagging method, the single joint decoder of CopyROneDecoder, and the absence of the Bi-GCN branch in the GraphRel1p method all perform poorly. The reason may be due to the label hierarchy stacking, diverse classification results, and strong association problems of shared segments caused by SEO and EPO. Then the SJL method adopts the idea of hierarchical labeling and has been significantly improved compared with previous methods. Then the HSL method uses dilated convolution technology to expand the receptive field and improves the recall rate, obtaining a better performance. On the one hand, RDA enhances the robustness of the model by launching multi-round adversarial attacks and increasing the perplexity during model training; on the other hand, it uses the knowledge base of the weapon and equipment field to expand the knowledge prompts of the head entity type representation, rewarding the correct samples of the subject recognizer combined with multi-round adversarial attacks, and finally achieving SOTA.
[0083] To more intuitively illustrate the performance differences of the comparative experiments, examples containing two types of triples, SEO and EPO, were set for further specific comparative analysis. The experimental results of the examples are shown in Table 7.
[0084] Table 7 Example Table of Triple Extraction
[0085]
[0086]
[0087] As shown in Table 7, through the examples of comparative experiments, it can be seen that the extraction of the NovelTagging method in Experiment 0 is missing triples and fails to complete the extraction of complex triples. This may be because only a new annotation strategy is designed at the annotation level, and no targeted design is carried out for the problems of SEO and EPO triples. The CopyR method in Experiment 1 applies the copying mechanism to the task of relation extraction. It can be found through examples that the extraction effect of SEO-type triples is improved compared with the NovelTagging method in Experiment 0, but the implicit triple knowledge is still not found; the extraction effect of EPO triples is still poor, which may be caused by the ineffective copying and successful matching of the head and tail entities by the copying mechanism. Although the GraphRel method in Experiment 2 enhances the encoding ability using RNN and GCN, the extraction results for the weapon and equipment field are not good. The SJL method in Experiment 3 incorporates the prior information of the subject into the model and extracts more triples for SEO triples compared with the NovelTagging in Experiment 0, but the implicit triple knowledge is still not extracted. The HSL method in Experiment 4 uses the dilated convolution technique with residual connections to improve the SJL method in Experiment 3. Compared with Experiments 0, 1, and 2, it not only maintains the good extraction performance of SEO triples but also improves the effect of EPO triples. RDA improves and enhances the two-stage extraction framework adopted in Experiments 3 and 4, achieving the best extraction effect.
[0088] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A complex triple extraction method for the field of weaponry and equipment, characterized in that, It includes the following steps: Step S1: Automatically collect information on ship and aircraft weaponry through data collection technology, and persist the collected data into a container. Subsequently, screen, clean, and store the persisted data based on a military terminology dictionary, and finally complete the annotation of 5,000 pieces of data; Step S2: Use the text embedding layer module to perform serialization processing on the text, and use the auto-encoding method combined with the self-attention mechanism to obtain feature vectors for the bidirectional context of the text; Specifically, it includes: The text vectorization technology adopted is BERT. The first part, token embedding, is a word vector or character vector, and the CLS token is used to fuse the semantics of each token in the sentence; the second part, segment embedding, is required to distinguish two sentences due to the next sentence prediction sub-task of the auto-encoding language model, and the default value is zero; the third part, position embeddings, is to introduce position embedding information to adapt to the temporality of natural language after removing the position constraint of the RNN time series model; Step S3: Input the obtained vector into the head entity recognizer combined with multi-round adversarial attacks, and identify the vector as a head entity or a tail entity; among them, the generation method of adversarial attacks is the Fast Gradient Method; the L2 normalization technology is used to correct the gradient; Step S4: Input the obtained entity into the weaponry knowledge base module. For different types of head entities, extract the sentences describing the type according to the definition or explanation of the type in the online encyclopedia and convert them into explanation vectors, and then perform information fusion with the character as the smallest granularity; Specifically, it includes: After multi-round adversarial attacks, the vector and the sentence explanation vector are obtained. The addition method is used to perform semantic fusion on the vectors in different feature spaces, and finally the fusion vector of the knowledge base in the field of mounted weaponry and the samples generated by adversarial attacks is obtained; Step S5: Finally, enter the relationship tail entity recognition module, which divides the task into two sub-tasks: the head recognition and tail recognition of the tail entity corresponding to the specified relationship; Specifically, it includes: Where S represents the entity head and E represents the entity tail, and represent the probabilities of the i-th token as the head and tail of the tail entity respectively, H j represents the overall sequence of the j-th head entity recognized by the head entity recognizer; v k represents the vector obtained by averaging the results of the S recognition layer and the E recognition layer in the head entity recognizer part.
2. The complex triple extraction method for the weapon and equipment field according to claim 1, characterized in that: In step S1, the signature cross method is used to check the data quality, and the final data is divided, and the division ratio is 7:2:1, which are used as the training set, validation set, and test set respectively.