A method for jointly extracting entity relationships in the electromagnetic space field with additional time information

By constructing the STERM model, the problems of error accumulation and exposure bias in entity relation extraction in the electromagnetic space domain are solved. It achieves effective processing of entity nesting and relation overlap, can accurately represent the dynamic changes of entity relations, and improves the accuracy of extraction.

CN116911296BActive Publication Date: 2026-05-19EAST CHINA NORMAL UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EAST CHINA NORMAL UNIV
Filing Date
2022-04-20
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies for entity relation extraction in the electromagnetic space domain suffer from problems such as error accumulation, exposure deviation, entity nesting, and relation overlap, making it difficult to effectively represent the dynamic changes in entity relations.

Method used

We employ the STERM model for joint entity and relation extraction based on fragment sorting. By rewriting the BERT word segmentation function, we construct character vector representations and use a fragment sorting-based label sequence transformation and a self-attention mechanism LSTM network, combined with a sequence-first proximity matching algorithm, to achieve end-to-end prediction of entities and relations.

Benefits of technology

It effectively solves the problems of entity nesting and relationship overlap, reduces error accumulation and exposure bias, can accurately represent the dynamic changes of entity relationships, and improves the accuracy of entity relationship extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116911296B_ABST
    Figure CN116911296B_ABST
Patent Text Reader

Abstract

The application discloses an electromagnetic space field entity relationship joint extraction method with additional time information, comprising the following steps: obtaining social platform open source text data by using a Python crawler technology; performing text cleaning and preprocessing on the obtained open source text to form a data set C; determining entity and relationship classification, and formulating an entity relationship sequence joint labeling strategy; labeling the data set C with a triple tag; the triple tag is (main entity Subject, relationship Predicate, and object entity Object); an entity relationship joint extraction model STERM based on fragment sorting is constructed, and an entity relationship triple prediction model is obtained through training; and a (main entity, relationship, object entity, and time) quadruple list is obtained through a sequential priority nearest matching algorithm. The method solves the problems of error accumulation and exposure deviation, entity nesting and relationship overlap, and the problem that an entity relationship triple cannot represent dynamic changes of a relationship.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of electromagnetic space and deep learning technology, and relates to a method for joint extraction of entity relations in electromagnetic space with additional time information. It involves research and analysis related to natural language processing, specifically involving named entity recognition and relation recognition of short texts. Background Technology

[0002] Entity and relation extraction in the electromagnetic domain is a fundamental task in electronic intelligence analysis and the construction of knowledge graphs in the electromagnetic domain, and a core component of building an electromagnetic profile. Radar is a crucial military entity in the electromagnetic domain, often mounted on electronic targets such as aircraft and ships. Analyzing the situational distribution of radar equipment platforms in electronic intelligence, combined with enemy radar wave information captured in the battlefield environment, can effectively estimate enemy combat actions and intentions, aiding in military decision-making and possessing significant national defense importance. Social media platforms such as Weibo contain a wealth of military-related information. This information encompasses multiple operational domains, is large in volume, and highly real-time, serving as a supplementary information source to expand electronic intelligence data and is of great significance for military assessment and battlefield situation analysis.

[0003] Entity relation extraction in the electromagnetic space domain for open-source internet data faces challenges such as numerous aliases for military entities and inconsistent representations. Furthermore, entity nesting and overlapping relationships also exist. Previous entity relation extraction tasks were accomplished using pipelined models or two-stage joint extraction models; the former suffers from error accumulation, while the latter exhibits exposure bias. For mobile electronic targets, information extraction in the electromagnetic space domain also faces the challenge of traditional information extraction methods failing to represent the dynamic changes in entity relations. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method for jointly extracting entity relationships in an electromagnetic spatial domain with added time information, comprising the following steps:

[0005] Step A: Use Python web scraping technology to obtain open-source text data from social media platforms;

[0006] Step B: Clean and preprocess the open-source text obtained in Step A to form dataset C;

[0007] Step C: Determine the entity and relation classifications, formulate a joint annotation strategy for entity-relation sequences, and annotate the various relations contained in the sentence and the entities they contain;

[0008] Step D: Label the dataset C from Step B with triples; the triple labels are (Subject, Predicate, Object).

[0009] Step E: Construct the entity relation joint extraction model STERM based on fragment ranking, and train it to obtain the entity relation triple prediction model;

[0010] The segment sorting refers to the character pair label sequence sorted according to the word order of the input sentence: the character pair label sequence includes EH-ET (entity head-entity tail), and SH-OH (subject head-object head) and ST-OT (subject tail-object tail) sequences corresponding to each relation contained in the input text.

[0011] Step F: Obtain the predicted list of time, main entity, relation, and customer entity quadruples using a proximity matching algorithm that prioritizes the order of time entity to customer entity.

[0012] Step B of the present invention further includes the following steps:

[0013] Step B1: Use regular expression matching to remove non-standard expressions such as tags, HTML links, video links, @ other bloggers, and emojis from the original text;

[0014] Step B2: Convert the Greek and Latin characters in the text into English letters;

[0015] Step B3: Use Python's `re` module to segment the corpus into sentences, using the final punctuation marks ".", "?", and "!" as boundaries;

[0016] Step B4: Filter the corpus after sentence segmentation by removing corpus unrelated to the electronic target through a list of keywords containing “airplane”, “ship”, “ship”, “boat”, “carrier”, “machine”, “vehicle”, “missile”, “take-off”, “arrival”, “drone”, “fighter”, “troops”, “sea”, “overflight”, “port”, “airport”, and “base”.

[0017] Step B5: Statistically analyze the length of each corpus in the sentence-segmented corpus. Since some microblogs are short, the possibility of sentences containing complete triples is low. In order to reduce the workload of dataset annotation, corpus with a text length of less than 10 is deleted, forming dataset C.

[0018] Step C of this invention is the stage for formulating a joint annotation strategy for entity relationships in the electromagnetic space domain. The annotation strategies involved in step C include:

[0019] Step C1: Define entity categories, which include: "Personnel Name", "Military Place Name", "Time", "Military Rank or Position", "Military Organization or Institution", "Port", "Airport", "Military Base", "Military Event", "Weapons and Equipment", "Aircraft", "Ship", "Type", "Fleet", and "Ship Class".

[0020] Step C2: Defines the relationship categories, divided into static relationships and dynamic relationships. Static relationships include: "joint reference", "hierarchy", "located in", "belong to", "belong to...formation", "home port / base", "carried", "location of occurrence". Dynamic relationships include: "command", "execution", "end of execution", "departure", "appeared in", "going to", "once in", "arrived".

[0021] Step E of this invention is the STERM stage for constructing a joint entity relation extraction model based on fragment ranking. The model structure diagram is as follows: Figure 1 As shown, step E includes:

[0022] Step E1: The input of the STERM joint extraction model takes the dataset C obtained from the preprocessing in step B as the input of STERM. Since the original BERT word segmentation function cannot segment English or numbers according to characters, such as “P-8A” being segmented into “P”, “-”, and “SA”, in order to ensure that its form is consistent with the labeled corpus, the STERM joint extraction model rewrites the BERT word segmentation function to strictly segment the input sequence according to characters. The input sequence passes through the N-layer Transformer mechanism in BERT to learn the context features of each character and construct the character vector representation of the input sequence as set B.

[0023] Step E2: Construct the sequence label transformation layer of the STERM model to convert the entity start and end position label sequences in the input entity relation triples into fragment-ordered EH-ET (entity head-entity tail), SH-OH (subject head-object head), and ST-OT (subject tail-object tail) sequences. The EH-ET sequence represents the entity start and end position sequence, the SH-OH sequence represents the entity start position sequence corresponding to the relation, and the ST-OT sequence represents the entity end position sequence corresponding to the relation. A schematic diagram of the label sequence transformation is shown below. Figure 2 As shown, based on the word order of the input statement, each character in the sentence is matched to form a character pair. The EH-HT of each entity is marked as 1, and the SH-OH and ST-OT of each relation category are marked as 1. The formula for converting the input label sequence into a fragment sorting index is:

[0024] Where x refers to the subsequence accumulated during the enumeration of entity labels, i represents the index of the entity's start position in the original input text, j represents the index of the entity's end position in the original input text, and n represents the length of the original sequence. For entity labels, the index position is marked as 1; for relation labels, the index position is marked as 1 when i ≤ j, and as 2 when i > j. The output transformed sequence label T′ = [EH-ET, SH-OH, ST-OT];

[0025] Step E3: Construct the hidden layers of the STERM model to learn the contextual information of the original input text sequence. The original text input is encoded by BERT to obtain the hidden word vectors. seq To predict the label sequence, the sub-vector sequence needs to be hidden. seq Align with the sorted label sequence of the fragments, as shown in the attached figure. Figure 3 (b) shows the concatenation of word vectors to obtain [h visible h repeat ], where the visible vector h visible The corresponding character vector in the upper right triangle of the diagram, h repeat Corresponding to the character vector in the lower left corner of the diagram; for each input sequence, hidden seq Given 2n+1 corresponding label sequences T′ (i.e., one [EH-ET] sequence) and n relations, each corresponding to a set of [SH-OH, ST-OT] sequences, the model constructs 2n+1 independent hidden layer structures. Each hidden layer structure is identical, and h is normalized using Conditional Layer Normalization (CLN). visible with h repeat Orthogonal multiplication yields the masked sequence h. mask To prevent gradient vanishing or exploding in subsequent LSTM networks, a bidirectional long short-term memory LSTM network with self-attention mechanism is used to... visible Further encoding as h att ; Perform a dropout operation on the features output by the LSTM, randomly removing some nodes (approximately 30%) of features to reduce the impact of negative samples on model training; h mask with h att The output h of the hidden layer is obtained by orthogonal multiplication using CLN. out Finally, by concatenating the outputs of 2n+1 hidden layers, we obtain...

[0026] Step E4: Construct the output layer of the STERM model, outputting the predicted label sequence P = [P EH-ET P SH-OH P ST-OT], where the entity sequence P EH-ET Each position takes the value [0, 1], and the relation sequence P SH-OH P ST-OT Each position takes the value [0, 1, 2]; the segment sorting index is converted into the input sequence index by the decoding algorithm to obtain the predicted triplet list.

[0027] The decoding algorithm in step E4 further includes:

[0028] Step E4_1: Decode P EH-ET Get all entities in the sentence, and store them in dictionary D using the first character of each entity as the key and the entity as the value.

[0029] Step E4_2: Traverse the relation set R and decode the P of each relation. ST-OT Sequence, obtain entity tail character pairs and store them in the set E corresponding to the relation; decode P of each relation. SH-OH The sequence is used to obtain the entity header character pair. This character pair is then associated with the dictionary D to obtain the set of entity pairs S corresponding to this relation.

[0030] Step E4_3: Traverse the entity pair set S of each relation and query the entity tail character pair E to decode and obtain the possible triples.

[0031] The label sequence transformation layer constructed in step E2 converts the input sequence indices into three types of labeled sequence and then into fragment sorting indices. Specific steps include:

[0032] Step E2_1: Three types of annotation sequence are defined: EH-ET, SH-OH, and ST-OT. The input sequence is transformed by segment sorting to represent the entity start and end position sequence (EH-ET), the subject start index to object start index sequence of the relation (SH-OH), and the subject end index to object end index sequence of the relation (ST-OT).

[0033] Step E2_2: A word pair linking strategy, TPLTS, was designed: For a sentence of length p, S = [w1, w2, ..., w...], ... p The sentence's corresponding fragment order is S′=[S 1,1 S 1,2 , ..., s 1,p s 2,1 ,...s p,p The length of the sorted fragment is p×p, where s i,j Indicates from w i to w jA sequence of fragments. For a given set of m entity categories and n relation categories, 2n+1 sequences can be generated; for all entities E = [e1, e2, ..., e...] in the sequence... n ], each entity e = span(w i w j ) corresponds to s in the EH-ET sequence i,j Position, marked as "1"; for all relations in the sequence, each relation is represented as a triple = <subj, pre, obj>, where subj represents the relation subject, pre represents the relation class, and obj represents the relation object. Given a triple subj = span(w sh w st ), obj = span(w oh w ot The corresponding relation is predicate, that is, in the SH-ST sequence S of the predicate relation. sh,st Position, s of the OH-OT sequence oh,ot The position is marked as "1";

[0034] Step E2_3: Design the optimized annotation strategy: The original annotation strategy requires enumerating the label sequence corresponding to each character. The resulting label is a p×p matrix. The "1" label in the lower left triangle of this matrix can only be the case where the object entity appears before the main entity. In this case, diagonal flipping can be used to further optimize memory. This method flips the relationship where the main entity appears after the object diagonally to the upper right part of the p×p matrix and sets the label to "2", optimizing the p×p matrix into a sequence of length p×(p-1) / 2. The optimized sequence diagram is shown below. Figure 3 As shown.

[0035] Step F is a sequence-first nearest-neighbor matching algorithm, including:

[0036] Step F1: Construct a sequence-first proximity matching algorithm. In the STERM model prediction stage in step E4, the input of the algorithm is the original text sequence seq, the predicted triplet triples, the time entity list timeList corresponding to the original text, and the posting time Time on the social platform corresponding to the original text.

[0037] Step F2: Determine if the current relationship is dynamic. If it is static, return directly; if it is dynamic, proceed to step F3.

[0038] Step F3: Determine if the current timeList is empty. If it is empty, convert the posting time of the social platform to the standard time format and assign it to triple. If it is not empty, record the start position objStartIndex and end position objEndIndex of the current triple object.

[0039] Step F4: Traverse the timeList from back to front to find the first time entity before the object entity; if not found, traverse the timeList from front to back to find the first time entity after the object entity; assign the found time entity to the triple to get the time triple.

[0040] The present invention also discloses the application of the above method in obtaining real-time information on radar models and equipment platforms from various intelligence sources, thereby generating electromagnetic target intelligence, updating radar situation intelligence, and performing intelligent analysis and visualization of radar situation.

[0041] The present invention also proposes an apparatus comprising: a memory and a processor; wherein the memory stores a computer program, and when the computer program is executed by the processor, the above-described method is implemented.

[0042] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.

[0043] The beneficial effects of this invention are as follows: Existing methods use sequence labeling to extract triples of entities and relations. However, sequence labeling performs poorly when handling nested entities. For example, for the entity "AABBB Air Force Base," sequence labeling can only label the entire entity as "base," and cannot simultaneously label the place name "AA." Relational overlap refers to different relational triples containing the same entity. For example, the sentence "Air Force 132 Squadron 11-22 takes off from AABBB base" contains the triples (11-22, belongs to, Air Force 132 Squadron) and (11-22, departs from..., AABBB base). Sequence labeling methods cannot predict two labels for 11-22 simultaneously. Compared to existing methods, the STERM model constructed in this invention no longer uses traditional sequence labeling methods, but instead transforms it into a start-end index prediction task for entities, effectively solving the problems of relational overlap and entity nesting. Compared to existing models, the STERM model constructs a single-stage end-to-end model structure, solving the error accumulation and exposure bias problems caused by existing pipeline models and two-stage joint extraction models. Attached Figure Description

[0044] Figure 1 This is a schematic diagram of the STERM joint extraction model structure.

[0045] Figure 2 A diagram illustrating the TPTLS labeling strategy.

[0046] Figure 3 A schematic diagram of the annotation sequence optimized for TPTLS. Detailed Implementation

[0047] The present invention will be further described in detail below with reference to the specific embodiments and accompanying drawings. Except for the contents specifically mentioned below, the processes, conditions, and experimental methods for implementing the present invention are all common knowledge and general knowledge in the art, and the present invention does not have any particular limitations.

[0048] This invention first obtains text data from an open-source social platform, then cleans and preprocesses the dataset. Next, it determines entity and relation classifications and formulates a joint entity-relation annotation strategy, annotating the dataset. Finally, it constructs a time, entity, and relation joint extraction model, STERM, based on fragment ranking. A sequence-first proximity matching algorithm is used to obtain predicted time, main entity, relation, and object entity quadruples. The joint extraction model proposed in this invention solves the error accumulation and exposure bias problems of existing pipeline and two-stage joint extraction models. It also effectively addresses entity nesting and relation overlap issues through fragment ranking and solves the problem that entity-relation triples cannot represent dynamic relation changes by adding time information.

[0049] The present invention proposes a method for jointly extracting entity relations in an electromagnetic spatial domain with additional time information, comprising the following steps:

[0050] Step A: Obtain open-source text data from social media platforms;

[0051] Step B: Text cleaning and preprocessing to form dataset C;

[0052] Step C: Determine entity and relation classifications, and formulate a joint annotation strategy for entity-relation sequence;

[0053] Step D: Label the dataset C with triples; the triple labels are (Subject, Predicate, Object).

[0054] Step E: Construct the entity relation joint extraction model STERM based on fragment ranking, and train it to obtain the entity relation triple prediction model;

[0055] Step F: Obtain a list of (main entity, relation, object entity, time) quadruples using a sequence-first proximity matching algorithm.

[0056] In step B of this invention, text cleaning and preprocessing mainly include expression standardization, Latin character conversion, sentence segmentation, filtering irrelevant text, and deleting excessively short text.

[0057] In step C of this invention, the entity categories include "personnel name", "military place name", "time", "military rank or position", "military organization or institution", "port", "airport", "military base", "military event", "weapons and equipment", "aircraft", "ship", "model", "formation", and "ship class"; the relationship categories include "common reference", "hierarchy", "located at", "belonging to", "belonging to...formation", "home port / base", "carried", "place of occurrence", "command", "execution", "end of execution", "departure", "appeared at", "going to", "once at", and "arrived".

[0058] Step E of this invention is the stage of constructing a Span-Level Temporal Joint Entity and Relation Extraction Model (STERM) based on fragment ranking. A schematic diagram of the model structure is shown below. Figure 1 It includes the following parts:

[0059] Step E1: The input part of the STERM joint extraction model takes the dataset C obtained from the preprocessing in step B as the input of STERM. The model rewrites the BERT word segmentation function. The input sequence goes through the N layers of Transformer mechanism in BERT to learn the context features of each character and construct the character vector representation of the input sequence as set B.

[0060] Step E2: Construct the sequence label transformation layer of the STERM model to convert the input label sequence into fragment-ordered EH-ET, SH-OH, and ST-OT sequences. The EH-ET sequence represents the start and end position sequence of entities, the SH-OH sequence represents the start position sequence of entities corresponding to a relation, and the ST-OT sequence represents the end position sequence of entities corresponding to a relation. A schematic diagram of the label sequence transformation is shown below. Figure 2 As shown in the table below, the conversion formula for transforming an input label sequence into a fragment sort is:

[0061] Where x refers to the subsequence accumulated during the enumeration of entity labels, i represents the index of the entity's start position in the original input text, j represents the index of the entity's end position in the original input text, and n represents the length of the original sequence. For entity labels, the index position is marked as 1; for relation labels, the index position is marked as 1 when i ≤ j, and as 2 when i > j. The output transformed sequence label T′ = [EH-ET, SH-OH, ST-OT];

[0062] Step E3: Construct the hidden layers of the STERM model to learn the contextual information of the text sequence. For each input sequence, the hidden layers are... seq Given the corresponding 2n+1 label sequences T′, the model constructs 2n+1 independent hidden layer structures. Each hidden layer structure is identical, and h is transferred using a CLN. visible with h repeat Orthogonal multiplication yields the masked sequence h. mask Sentence sequence features are learned through a bidirectional LSTM network with self-attention mechanism; a Dropout layer is added to randomly remove some nodes to reduce the impact of negative samples on model training; h mask with h att The output h of the hidden layer is obtained by orthogonal multiplication using CLN. out Finally, by concatenating the outputs of 2n+1 hidden layers, we obtain...

[0063] Step E4: Construct the output layer of the STERM model, outputting the predicted label sequence P = [P EH-ET P SH-OH P ST-OT ], where the entity sequence P EH-ET Each position takes the value [0, 1], and the relation sequence P SH-OH P ST-OT Each position takes the value [0, 1, 2]; the segment sorting index is converted into the input sequence index by the decoding algorithm to obtain the predicted triplet list.

[0064] The label sequence transformation layer constructed in step E2 converts the input sequence indices into three types of labeled sequence and then into fragment sorting indices. Specific steps include:

[0065] Step E2 1: Three types of annotation sequence are defined: EH-ET, SH-OH, and ST-OT. The input sequence is transformed by segment sorting to represent the entity start and end position sequence, the subject start index to object start index sequence of the relation, and the subject end index to object end index sequence of the relation, respectively.

[0066] Step E22: A word pair linking strategy, TPLTS, was designed: For a sentence of length p, S = [w1, w2, ..., w...], ... p The sentence corresponding to this sentence is ordered as S′ = [s 1,1 s 1,2 , ..., s 1,p s 2,1 ,...s p,p The length of the sorted fragment is p×p, where s i,j Indicates from w i to w j A sequence of fragments. Given m entity categories and n relation categories, 2n+1 sequences can be generated; for all entities E = [e1, e2, ..., e...] in the sequence... n ], each entity e = span(w i w j ) corresponds to s in the EH-ET sequence i,j Position, marked as "1"; for all relations in the sequence, each relation is represented as a triple = <subj, pre, obj>, where subj represents the relation subject, pre represents the relation class, and obj represents the relation object. Given a triple subj = span(w sh w st ), obj = span(w oh w ot The corresponding relation is predicate, that is, in the SH-ST sequence s of the predicate relation. sh,st Position, s of the OH-OT sequence oh,ot The position is marked as "1";

[0067] Step E2_3: Design the optimized annotation strategy: Optimize the annotation strategy using diagonal flipping. Flip the relationship where the subject appears after the object diagonally to the upper right part of the p×p matrix and set the marker to "2". Optimize the p×p matrix into a sequence of length p×(p-1) / 2. A schematic diagram of the optimized sequence is shown below. Figure 3 As shown.

[0068] Step F of this invention is the stage of constructing a joint extraction model of time, entity, and relation based on fragment ranking to add time information to the prediction stage. The specific steps are as follows:

[0069] Step F1: Construct a sequence-first proximity matching algorithm. In the STERM model prediction stage in step E4, the input of the algorithm is the original text sequence seq, the predicted triplet triples, the time entity list timeList corresponding to the original text, and the social media posting time Time corresponding to the original text.

[0070] Step F2: Determine if the current relationship is dynamic; if it is static, return directly.

[0071] Step F3: Determine if the current timeList is empty. If it is empty, convert the social media posting time (Time) to the standard time format and assign it to timedTriple. If it is not empty, record the start position objStartIndex and end position objEndIndex of the current triple object.

[0072] Step F4: Traverse the timeList from back to front to find the first time entity before the object entity; if not found, traverse the timeList from front to back to find the first time entity after the object entity; assign the found time entity to triple to get timedTriple.

[0073] Example

[0074] The electromagnetic spatial domain entity relation joint extraction method with additional time information described in this embodiment includes the following steps:

[0075] Step A: Obtain blog posts published by users "XX Strategic Situation Awareness" and "Strategy Page 7" on the Weibo social media platform, construct the original dataset, and obtain the blog posts in the following format:

[0076] On the morning of March 1, an 11-22 reconnaissance aircraft took off from AABBB base.

[0077] On the morning of February 26, a destroyer appeared in the southern part of the YY Strait and was transiting the strait. An 11-22 electronic reconnaissance aircraft provided intelligence support at the southern entrance of the YY Strait. (XX Strategic Situation Awareness)

[0078] Step B: Dataset cleaning and preprocessing. By setting some keyword seeds, such as "airplane", "radar", "ship", "takeoff", and "arrival", irrelevant text from the crawled Weibo posts is removed. Texts shorter than 10 characters are deleted. Regular expressions are used to segment texts longer than 100 characters into sentences with "[。?!].*" as the interval.

[0079] Step C: Based on the knowledge of experts in the electromagnetic space domain, determine the entity categories as "personnel name", "military place name", "time", "military rank or position", "military organization or institution", "port", "airport", "military base", "military event", "weapon equipment", "aircraft", "ship", "model", "formation", and "ship class", and the relationship categories as "common reference", "hierarchy", "located in", "belonging to", "belonging to...formation", "home port / base", "carried", "place of occurrence", "command", "execution", "end of execution", "departure", "appeared in", "going to", "was in", and "arrived", and formulate a joint annotation strategy for entity relationship sequences;

[0080] Step D: Label the preprocessed dataset, labeling it in the form of head entities, relations, and customer entities, as shown in the example below:

[0081] Input: On the morning of March 1, the 11-22 reconnaissance aircraft took off from AABBB base.

[0082] Entity sequence: [(entity_id: 0, start: 7, end: 11, text: 11-22, label: Plane); (entity_id: 1, start: 7, end: 14, text: 11-22 reconnaissance aircraft, label: Plane); (entity_id: 2, start: 15, end: 16, text: AA, label: Place), (entity_id: 3, start: 15, end: 21, text: AABBB base, label: Base)]

[0083] Relationship sequence: [(relation_type: same_as, subject_entity_id: 0, object_entity_id: 1); (relation_type: start_off, subject_entity_id: 0, object_entity_id: 3); (relation_type: be located, subject_entity_id: 3, object_entity_id: 2)]

[0084] Step E: Using the deep learning framework PyTorch, with a host device having 32GB of RAM and an NVIDIA GTX 3080 GPU, write deep learning code based on BERT-Attention-BiLSTM and train it to obtain an entity relationship triplet prediction model. The model structure is attached. Figure 3 As shown, during training, the entity and relation sequences obtained in step D need to be converted into the following format: Figure 3(b) shows the upper triangular segment sorting sequence to reduce memory consumption;

[0085] Step F: In the prediction phase, for each sequence to be tested, use the model to predict it and obtain P = [P EH-ET P SH-OH P ST-OT ]sequence.

[0086] Step F_1: Decode P EH-ET This process retrieves all entities from the sentence, using the entity's header character as the key and the entity itself as the value, and stores them in dictionary D. (The rest of the text appears to be unrelated and possibly machine-generated.) Figure 2 For example, the obtained entities are (11-22, 11-22 reconnaissance aircraft, AA, AABBB base), and the dictionary D is {E: (11-22, 11-22 reconnaissance aircraft), A: (AA, AABBB base)};

[0087] Step F_2: Traverse the set of relations R and decode the P of each relation. ST-OT Sequence, obtain entity tail character pairs and store them in the set E corresponding to the relation; decode P of each relation. SH-OH The sequence is used to obtain entity header character pairs. These character pairs are then associated with dictionary D to obtain the set of entity pairs S corresponding to the relation. Figure 2 Taking the "take off from..." relationship as an example, the entity tail character pair E is {(E, ground)}; the entity head character pair is {(E, A)}, and the entity pair set S corresponding to the head character pair in the dictionary D is {head entity set (11-22, 11-22 reconnaissance aircraft), tail entity set (AA, AABBB base)};

[0088] Step F_3: Traverse the entity pair set S of each relation and query the entity tail character pair E to decode the possible triples; combining S and E in E4_3, we know that the possible triples are (11-22, take off from..., AABBB base).

[0089] By appending the Weibo posting time to the triple using a sequence-first proximity matching algorithm, we can obtain the quadruple information (March 21, 2021, 11-22, took off from..., AABBB base).

[0090] The scope of protection of this invention is not limited to the above embodiments. Any variations and advantages that can be conceived by those skilled in the art without departing from the spirit and scope of this invention are included in this invention and are protected by the appended claims.

Claims

1. A method for jointly extracting entity relations in an electromagnetic spatial domain with additional time information, characterized in that, Includes the following steps: Step A: Use Python web scraping technology to obtain open-source text data from social media platforms; Step B: Clean and preprocess the open-source text obtained in Step A to form dataset C; Step C: Determine entity and relation classifications, and formulate a joint annotation strategy for entity-relation sequence; Step D: Label the dataset C from Step B with triples; the triple labels are (Subject, Predicate, Object). Step E: Construct the entity relation joint extraction model STERM based on fragment ranking, and train it to obtain the entity relation triple prediction model; Step E further includes the following steps: Step E1: The input part of the STERM joint extraction model takes the dataset C obtained from the preprocessing in step B as the input of STERM. For English or numerical expressions, the STERM joint extraction model rewrites the BERT word segmentation function to strictly segment the input sequence according to the characters. The input sequence goes through the N-layer Transformer mechanism in BERT to learn the context features of each character and construct the character vector representation of the input sequence as set B. Step E2: Construct the sequence label transformation layer of the STERM model to convert the entity start and end position label sequences in the input entity relation triples into fragment-sorted EH-ET, SH-OH, and ST-OT sequences. The EH-ET sequence represents the entity start and end position sequence, the SH-OH sequence represents the entity start position sequence corresponding to the relation, and the ST-OT sequence represents the entity end position sequence corresponding to the relation. The subscript conversion formula from the input label sequence to fragment sorting is as follows: ; Where x refers to the subsequence accumulated during the enumeration of entity labels. This indicates the index of the entity's starting position in the original input text. This indicates the index of the end position of the entity in the original input text. Indicates the length of the original sequence; for entity tags, it will... The position is marked as 1; for relation labels, when hour, The position is marked as 1, when hour, The position is marked as 2; output the transformed sequence label. ; Step E3: Construct the hidden layers of the STERM model to learn the contextual information of the original input text sequence; for each input sequence and corresponding A sequence of labels That is, 1 A sequence, and n kinds of relations, with a set corresponding to each relation. Sequences, model construction independent There are several hidden layer structures; each hidden layer structure is identical, and CLN is normalized through a conditional layer. and Orthogonal multiplication yields the masked sequence. To prevent gradient vanishing or exploding in subsequent LSTM networks; to learn sentence sequence features using a bidirectional long short-term memory LSTM network with self-attention; to apply a dropout operation to the LSTM output, randomly removing 30% of node features to reduce the impact of negative samples on model training; and to... and The output of the hidden layer is obtained by orthogonal multiplication using CLN. Finally, the output vectors of 2n+1 hidden layers are concatenated to obtain... ; Step E4: Construct the output layer of the STERM model to output the predicted label sequence. , where entity sequence Each position takes the value [0,1], relation sequence Each position takes the value [0, 1, 2]; after obtaining the predicted label sequence, a decoding algorithm is used to convert it into a list of triples; Step F: Obtain a list of (main entity, relation, object entity, time) quadruples using a sequence-first proximity matching algorithm.

2. The method for jointly extracting entity relationships in an electromagnetic spatial domain with added time information as described in claim 1, characterized in that, Step B further includes: Step B1: Remove non-standard expressions from the original text using regular expression matching; these non-standard expressions include tags, HTML links, video links, mentions of other bloggers, and emojis. Step B2: Convert the Greek and Latin characters in the text into English letters; Step B3: Use Python's `re` module to segment the corpus into sentences, using the final punctuation marks "。?!" as boundaries; Step B4: Filter the corpus after sentence segmentation, and remove corpus that is irrelevant to the electronic target by using a keyword list; the keywords in the keyword list include: "airplane", "ship", "ship", "boat", "ship", "aircraft carrier", "airplane", "vehicle", "missile", "take-off", "arrival", "drone", "fighter jet", "troops", "sea", "airspace", "port", "airport", "base"; Step B5: Statistically analyze the length of each corpus in the sentence-segmented corpus, delete corpora with a text length of less than 10, and form dataset C.

3. The method for jointly extracting entity relationships in an electromagnetic spatial domain with added time information as described in claim 1, characterized in that, The annotation strategies involved in step C include: Step C1: Defines entity categories, including: "Personnel Name", "Military Place Name", "Time", "Military Rank or Position", "Military Organization or Institution", "Port", "Airport", "Military Base", "Military Event", "Weapons and Equipment", "Aircraft", "Ship", "Type", "Fleet", and "Ship Class"; Step C2: Define the relationship categories, which are divided into two types: static relationships and dynamic relationships. Static relationships include: "joint reference", "hierarchy", "located in", "belong to", "belong to... formation", "home port / base", "carried", "location of occurrence". Dynamic relationships include: "command", "execution", "end of execution", "departure", "appear in", "going to", "once in", "arrived".

4. The method for jointly extracting electromagnetic spatial domain entity relations with additional time information as described in claim 1, characterized in that, In step E4, the decoding algorithm further includes: Step E4_1: Decoding Get all entities in the sentence, and store them in dictionary D using the first character of each entity as the key and the entity as the value. Step E4_2: Traverse the relation set R defined in step C2 and decode each relation. The sequence is used to obtain the entity tail character pairs and store them in the set E corresponding to the relation; the relations are then decoded. The sequence is used to obtain the entity header character pair. This character pair is then associated with the dictionary D to obtain the set of entity pairs S corresponding to this relation. Step E4_3: Traverse the entity pair set S of each relation and query the entity tail character pair E to decode and obtain the possible triples.

5. The method for jointly extracting electromagnetic spatial domain entity relations with additional time information as described in claim 1, characterized in that, Step E2 further includes the following steps: Step E2_1: Three annotation sequence types are defined: EH-ET, SH-OH, and ST-OT. The input sequence is transformed by segment sorting to represent the entity start and end position sequence, the subject start index to object start index sequence of the relation, and the subject end index to object end index sequence of the relation, respectively. Step E2_2: A word pair link annotation strategy, TPLTS, was designed: for a link of length... Sentences The order of the segments corresponding to this sentence The length of the fragment sorting is ,in Indicates from arrive The sequence of fragments; for a given set of m entity categories and n relation categories, generate 2n+1 corresponding sequences; for all entities in the sequence Each entity Corresponding EH-ET sequence Position, marked as "1"; for all relations in the sequence, each relation is represented as a triple. ,in Indicates the subjects of the relationship. Indicates the type of relationship. Represent a relational object, given a triple. , The corresponding relationship is That is, in SH-ST sequences of relations Position, OH-OT sequence The position is marked as "1"; Step E2_3: Design the optimized annotation strategy: Optimize the annotation strategy using diagonal flipping, flipping the relationships where the subject appears after the object diagonally. The upper right part of the matrix, and set the marker to "2", will The matrix is ​​optimized to a length of sequence.

6. The method for jointly extracting entity relationships in an electromagnetic spatial domain with added time information as described in claim 1, characterized in that, The order-first proximity matching algorithm in step F further includes the following steps: Step F1: Construct a sequence-first proximity matching algorithm. In the STERM model prediction stage of step E4, the input of the algorithm is the original text sequence. Predicting triples The list of time entities corresponding to the original text The publication time of the original text on the corresponding social media platform. ; Step F2: Determine if the current relationship is dynamic. If it is static, return directly; if it is dynamic, proceed to step F3. Step F3: Determine the current situation Is the list empty? If it is empty, then use the posting time on social media platforms. Convert to standard time format and assign to If not empty, record the current triplet. The starting position of the object and end position ; Step F4: Traverse from back to front Find the first time entity preceding the object entity; if not found, traverse from front to back. Find the first time entity that follows the object entity; assign the found time entity to... get .

7. The method for joint extraction of electromagnetic spatial domain entity relationships with additional time information as described in any one of claims 1-6 is applied to obtaining real-time movement information of radar equipment from various intelligence sources, thereby generating electromagnetic target intelligence, updating radar situation intelligence, and performing intelligent analysis and visualization of radar situation.

8. A device, characterized in that, include: Memory and processor; The memory stores a computer program that, when executed by the processor, implements the method as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.