Entity relationship analysis method, device and equipment for unstructured data

Through the combination of BERT and BiLSTM-CRF models, the diversity of unstructured data in wireless communication is solved, high-precision identification and automated analysis of electromagnetic equipment and frequency interference information is realized, and the understanding and extraction ability of interference relationships is improved.

CN119248905APending Publication Date: 2025-01-03XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411309159.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the field of wireless communications, the diversity and information dispersion of unstructured data make it difficult to directly extract and utilize interference relationships. The existing technology relies on manual feature design and model training, and cannot fully tap potential information and calculate during large-scale data processing. Inefficient.

Method used

BERT is used for word segmentation processing, target embedding vector is generated, and pre-trained BiLSTM-CRF model is input. Deep learning technology processes text data in the electromagnetic field, and automatically recognizes electromagnetic equipment and frequency interference information to achieve high-precision and efficient entity relationship analysis.

Benefits of technology

Through deep learning technology, automatic learning of feature representations is captured, complex patterns and semantic information is enhanced, and the understanding and extraction capabilities of interference relationships are realized, and high-precision recognition and automated recognition of electromagnetic equipment and communication effects are achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248905A_ABST
    Figure CN119248905A_ABST
Patent Text Reader

Abstract

The invention provides an unstructured data-oriented entity relationship analysis method, device and equipment, and the method comprises the steps: obtaining unstructured data to be analyzed, the unstructured data to be analyzed being unstructured data containing related contents in the electromagnetic field; performing word segmentation processing on the to-be-analyzed unstructured data through BERT, and determining a target embedding vector corresponding to a word segmentation result; and inputting the target embedded vector into a pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed. A BiLSTM-CRF model is migrated to the electromagnetic field, the model can comprehensively process text data related to electromagnetic information through a deep learning technology, and key information such as electromagnetic equipment, frequency interference and communication effect is deeply explored from the model, so that high-precision, high-efficiency and automatic identification of the electromagnetic equipment and related technical terms thereof is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to an entity relationship analysis method, device and equipment for unstructured data. Background Art

[0002] In the field of wireless communications, the limited spectrum resources and the complexity of the spectrum environment have become key issues that need to be addressed urgently. The limited spectrum resources not only restrict the development of communication systems, but also lead to inefficient spectrum utilization and waste of spectrum resources. At the same time, with the development of communication systems and the expansion of application scenarios, the interference problems faced by communication systems are becoming increasingly prominent. Various interferences from the external environment and other communication systems have seriously affected the communication quality and system performance. In particular, the interference of malicious wireless signals poses a serious threat to the normal operation of communication systems and data security. Therefore, accurate identification and effective defense of interference between devices and malicious interference signals have become one of the technical challenges that need to be solved urgently.

[0003] In response to these problems, although researchers have proposed a variety of anti-interference methods, the implementation of these methods requires the support of a large amount of interference relationship data. However, the existing interference relationship data is often unstructured, which poses a challenge to the direct use of the data. Unstructured data usually exists in natural language text, images or other forms, which is not easy to analyze and use directly. For example, in the field of wireless communications, interference relationships may be reflected in various unstructured data such as communication logs, spectrum monitoring reports, and network topology diagrams. These data sources contain rich information, but due to the diversity of their forms and the dispersion of information, it is difficult to directly extract effective interference relationships from them. Therefore, there needs to be a way to organize unstructured data into structured data.

[0004] In the face of the above challenges, a common approach is to use statistics and machine learning techniques for feature extraction and pattern recognition. This approach usually constructs feature engineering to represent the information in unstructured data, and uses machine learning algorithms (such as support vector machines, random forests, etc.) to train models to identify and classify interference relationships. Although this approach can process unstructured data to a certain extent, it relies on manually designed features and models, may not be able to fully explore the potential information in the data, and has limited use of domain knowledge.

[0005] Another common method is to represent unstructured data as a graph structure based on graph theory and network science, and use graph analysis algorithms to explore the association relationship between entities. By constructing a network graph between the communication system and the interference source, methods such as node centrality and community discovery in graph theory can be used to reveal the patterns and regularities of interference relationships. However, this method usually requires complex preprocessing and graph construction of the data, and may face the problem of low computational efficiency when processing large-scale data. Summary of the invention

[0006] In order to solve the above problems existing in the prior art, the present invention provides an entity relationship analysis method, device and equipment for unstructured data, which specifically include:

[0007] In a first aspect, the present invention provides an entity relationship analysis method for unstructured data, comprising:

[0008] Obtaining unstructured data to be analyzed, where the unstructured data to be analyzed is unstructured data containing electromagnetic field-related content;

[0009] Use BERT to segment the unstructured data to be analyzed and determine the target embedding vector corresponding to the segmentation result;

[0010] The target embedding vector is input into the pre-trained target BiLSTM-CRF model to obtain the entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

[0011] In a second aspect, the present invention further provides an entity relationship analysis device for unstructured data, comprising:

[0012] An acquisition module, used to acquire unstructured data to be analyzed;

[0013] A processing module is used to perform word segmentation on the unstructured data to be analyzed through BERT and determine the target embedding vector corresponding to the word segmentation result;

[0014] The processing module is also used to input the target embedding vector into the pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

[0015] In a third aspect, the present invention further provides an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0016] Memory, used to store computer programs;

[0017] The processor is used to implement any method provided in the first aspect when executing a program stored in the memory.

[0018] In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any one of the methods provided in the first aspect is implemented.

[0019] In a fifth aspect, the present invention provides a program product, which includes computer program instructions, and when the computer program instructions are executed, they can implement any of the methods provided in the first aspect.

[0020] Beneficial effects of the present invention:

[0021] The entity relationship analysis method, device and equipment for unstructured data provided by the present invention obtain unstructured data to be analyzed, where the unstructured data to be analyzed is unstructured data containing electromagnetic field-related content; the unstructured data to be analyzed is word segmented by BERT, and a target embedding vector corresponding to the word segmentation result is determined; the target embedding vector is input into a pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed, and the BiLSTM-CRF model is migrated to the electromagnetic field. The model can comprehensively process text data related to electromagnetic information through deep learning technology, and deeply discover key information such as electromagnetic equipment, frequency interference and communication effects, thereby achieving high-precision, high-efficiency, and automatic recognition of electromagnetic equipment and its related technical terms.

[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a flow chart of an entity relationship analysis method for unstructured data provided by the present invention;

[0024] Figure 2 A schematic diagram of a knowledge graph provided by the present invention;

[0025] Figure 3 A schematic diagram of the architecture of a BiLSTM-CRF model provided by the present invention;

[0026] Figure 4 A schematic diagram of the LSTM network calculation process provided by the present invention;

[0027] Figure 5 A schematic diagram of the output result of a BilSTM layer provided by the present invention;

[0028] Figure 6A schematic diagram of an experimental result provided by the present invention;

[0029] Figure 7 A schematic diagram of the structure of an entity relationship analysis device for unstructured data provided by the present invention. DETAILED DESCRIPTION

[0030] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0031] In response to the problems of existing technologies, researchers have proposed a series of solutions, including cooperative communication and interference elimination, adaptive beamforming and interference suppression technology, spectrum sensing and dynamic spectrum management. Spectrum sensing and dynamic spectrum management technology uses spectrum sensing technology to monitor the spectrum environment, obtain spectrum utilization and interference in real time, and adjust communication parameters and frequency allocation in a timely manner based on dynamic spectrum management to avoid conflicts with malicious interference signals, thereby improving the stability and anti-interference ability of the communication system. In addition to this most basic anti-interference countermeasure, with the increase of various frequency-using equipment and other problems, the perception and management of the spectrum has become increasingly cumbersome and difficult, so new anti-interference methods have also emerged, such as game theory and optimization algorithm interference countermeasures.

[0032] Interference countermeasure strategy based on game theory and optimization algorithm is an emerging method to deal with the complex interaction between communication system and interference source. In traditional communication system, fixed frequency, power and modulation scheme are often used for communication, and interference is usually handled passively. Once interference occurs, certain elimination or suppression measures are taken. However, in reality, there is a complex interaction relationship between communication system and interference source. Interference source may adopt different interference methods according to the state and behavior of communication system, and communication system also needs to adjust its own parameters and strategies according to the behavior of interference source. This interaction can be regarded as a game relationship. By establishing a suitable game model, analyzing the game relationship between the two, and using optimization algorithm to find the optimal countermeasure strategy, the impact of interference on the performance of communication system can be effectively reduced, and the stability and reliability of the system can be improved.

[0033] Deep learning language models use pre-trained language models for named entity recognition and relation extraction, which has several significant advantages. First, deep learning models can automatically learn feature representations without relying on hand-crafted feature engineering, so that they can better capture complex patterns and semantic information in the data. Second, pre-trained language models are trained on large-scale text data and have strong generalization capabilities, which can effectively deal with problems such as data scarcity and domain bias. In addition, deep learning models can fuse information at different levels through multi-level representation learning, so as to better understand professional terminology and domain knowledge in the field of communications and improve the model's ability to understand and extract interference relationships.

[0034] Based on this, the present invention proposes an entity relationship analysis method for unstructured data, such as Figure 1 As shown, the method includes:

[0035] S101. Obtain unstructured data to be analyzed.

[0036] The unstructured data to be analyzed is unstructured data containing electromagnetic field-related content, and specifically may be text data.

[0037] S102. Perform word segmentation on the unstructured data to be analyzed through BERT, and determine the target embedding vector corresponding to the word segmentation result.

[0038] S103, inputting the target embedding vector into the pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

[0039] The entity relationship analysis method for unstructured data provided by the present invention obtains unstructured data to be analyzed, wherein the unstructured data to be analyzed is unstructured data containing electromagnetic field-related content; performs word segmentation processing on the unstructured data to be analyzed through BERT, and determines a target embedding vector corresponding to the word segmentation result; inputs the target embedding vector into a pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed, and migrates the BiLSTM-CRF model to the electromagnetic field. The model can comprehensively process text data related to electromagnetic information through deep learning technology, and deeply discover key information such as electromagnetic equipment, frequency interference and communication effects, thereby achieving high-precision, high-efficiency, and automatic recognition of electromagnetic equipment and its related technical terms.

[0040] The main task of the BiLSTM-CRF model is to find the most likely label sequence to accurately label the input sequence. In the sequence labeling task, it is usually hoped that the model can give the most likely label sequence to correctly represent the grammatical structure, entity boundaries and other information in the input sequence. For example, as shown in Table 1, for text data, each word in the sentence is analyzed and labeled to determine whether it is part of an entity, as well as the specific location and category of the entity, that is, whether it is a word in a place name, or it is part of a device name.

[0041] Table 1 Tag sequences

[0042]

[0043] In Table 1, the high-order region is labeled LOC, which is the name of the region, B- represents the beginning of the word, I represents the middle of the word, E represents the end of the word, and O represents that no entity is recognized for the word.

[0044] The BiLSTM-CRF model learns the hidden state of each position in the input sequence and combines it with the conditional random field (CRF) layer to model the dependencies and global features between labels, thereby obtaining the optimal label sequence. During the training phase, the model adjusts the parameters by minimizing the difference between the predicted label sequence and the true label sequence, expressed as:

[0045]

[0046] Among them, P(y|x) represents the probability of label sequence y given input sequence x, the negative sign is used to convert the problem of maximizing probability into the problem of minimizing loss, and Score(x,y) represents the score of input sequence x with label sequence y.

[0047] Further, based on the above embodiment, in a possible implementation, training the target BiLSTM-CRF model includes the following steps A1-A5:

[0048] A1. Obtain unstructured data in multiple electromagnetic fields, each of which contains at least one complete triple.

[0049] Unstructured data in the electromagnetic field can be text data such as technical literature, research papers, patent documents, technical reports, standards and specifications documents, white papers, etc.

[0050] For example, technical literature and research papers in the electromagnetic field, IEEE Xplore, ScienceDirect, Google Scholar and other databases can be consulted to obtain technical literature and research papers. Such literature usually contains information such as interference relationships between devices, frequency optimization, and communication effects. Patent literature in the electromagnetic field can be obtained by searching through patent platforms such as the State Intellectual Property Office, Espacenet, and PatFT. Patent literature usually contains technical details such as equipment design, interference processing, and communication optimization. Relevant technical reports and white papers can also be obtained from equipment manufacturers, scientific research institutions, and industry associations. Such literature may describe in detail the interference and optimization effects between devices. Electromagnetic compatibility (EMC) standards and industry specifications can also be consulted. Such documents usually specify interference standards and optimization recommendations between devices.

[0051] Specifically, relevant keywords (such as "equipment interference", "frequency optimization", "communication effect", etc.) are used to search in various data sources to locate literature related to the interference relationship between devices and the communication effect.

[0052] The extracted unstructured data should contain at least one complete triple, such as: device name-usage frequency-frequency information, device type A-interference relationship-device type B, device type-device location-communication status. There should be an association relationship between entities.

[0053] Furthermore, the acquired unstructured data can be stored in a database or file system to ensure the structuring and accessibility of the information.

[0054] A2. Use BERT to perform word segmentation on each unstructured data and obtain the embedding vector corresponding to each unstructured data.

[0055] Optionally, BERT is used to perform word segmentation on the unstructured data to obtain the corresponding embedding vector, including the following steps 1)-4):

[0056] 1) The BERT-based WordPiece word segmenter decomposes unstructured data into basic word fragments and obtains multiple word segments.

[0057] Specifically, BERT uses the WordPiece tokenizer to decompose the input unstructured data into basic word fragments (subword tokens). These word fragments are usually smaller than complete words, which can handle unseen words and reduce the size of the vocabulary.

[0058] 2) Insert markers at the beginning and end of the word segmentation result to mark the starting point of the classification task and the separator in the task.

[0059] Specifically, the [CLS] tag is used at the beginning of the sequence to indicate the starting point of the classification task; the [SEP] tag is used to separate two sentences, indicating the separator in the task and marking the end of the sequence.

[0060] 3) Determine the word index, position code and segment code corresponding to each word segment.

[0061] Among them, position coding is used to identify the sequential position of a word in a sentence; segment coding is used to identify the sentence to which the word belongs.

[0062] Specifically, each word segment will be converted into a corresponding word index, and position embeddings and segment embeddings will be generated to indicate the position of the word in the sentence and the sentence to which the word belongs.

[0063] 4) Based on BERT, according to the input unstructured data, the word embedding, position embedding and segment embedding corresponding to each word segment are generated, and the embedding vector corresponding to each word segment is generated according to the word embedding, position embedding and segment embedding corresponding to each word segment.

[0064] This embedding vector is the final representation of the unstructured text in BERT and is used for subsequent task processing.

[0065] Specifically, each word segment will be mapped to an embedding vector to obtain the corresponding word vector. The dimensions of these embedding vectors are preset by the BERT model.

[0066] Position embedding is used to encode the position information of the word in the sentence to help the model understand the word order.

[0067] When processing an input containing two sentences, the segment embeddings are used to distinguish the two sentences.

[0068] According to the word embedding, position embedding and segment embedding corresponding to each word segment, the embedding vector corresponding to the unstructured data is determined, that is, the embedding vector is formed by combining the word embedding, position embedding and segment embedding.

[0069] The following is a specific example to further explain the process of determining the embedding vector:

[0070] First, the text in the electromagnetic field, such as "Electromagnetic interference sources affect electronic devices through radio frequency signals", is processed by BERT. The text is first processed by word segmentation, and BERT divides it into subwords or words, such as ["electric", "magnetic", "interference", "disturbance", "source", "pass", "pass", "radiation", "frequency", "signal", "signal", "effect", "response", "electric", "electronic", "equipment", "equipment"]. Then, special tags [CLS] and [SEP] are added to the beginning and end of the word segmentation results. Then, BERT converts each word segment into a corresponding vocabulary index and generates a position encoding to determine its position in the sentence. At the same time, a segment encoding is generated to distinguish the sentence to which the word segment belongs (for example, the segment encoding of all word segments in a single sentence scenario is usually the same). Finally, the vectors of word embedding, position encoding, and segment encoding are summed element by element to obtain the embedding vector corresponding to each word segment.

[0071] A3. Pre-train the initial BiLSTM-CRF model through each embedding vector to obtain the first model.

[0072] A4. Construct multiple unstructured data in the electromagnetic field with annotation information, where the annotation information includes at least one of the following information: device entity, location entity, and relationship entity.

[0073] Specifically, the number of the constructed multiple electromagnetic field unstructured data with annotation information may be smaller than the number of the electromagnetic field unstructured data acquired in step A1.

[0074] A5. Fine-tune the first model using unstructured data in the electromagnetic field with labeled information to obtain the target BiLSTM-CRF model.

[0075] This method forms pre-trained training samples based on a large amount of unstructured data in the electromagnetic field, pre-trains the initial BiLSTM-CRF model to expand the learning field of the BiLSTM-CRF model, migrates the BiLSTM-CRF model to the electromagnetic equipment field, and improves its learning ability for relevant knowledge in the electromagnetic equipment field; further, the pre-trained model is fine-tuned through unstructured data in the electromagnetic field with labeled information to obtain a model that can fully process unstructured data related to electromagnetic information and deeply discover key information such as electromagnetic equipment, frequency interference, and communication effects. The training process supports the rapid integration of the latest research results and technical information to maintain the timeliness of the data.

[0076] Further optionally, based on any of the above embodiments, the entity relationship analysis method for unstructured data provided by the present invention also includes: supplementing the target BiLSTM-CRF model with training based on the unstructured data to be analyzed, and the entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed, so as to obtain an optimized target BiLSTM-CRF model.

[0077] Through this method, the model parameters can be continuously optimized and the model accuracy can be improved.

[0078] Further optionally, based on any of the above embodiments, the entity relationship analysis method for unstructured data provided by the present invention also includes: based on Neo4j, generating a visual knowledge graph according to entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

[0079] According to the entity results obtained by the model, the entities are combined into a triple pattern of "entity A-relationship-entity B" to build a knowledge graph between different electromagnetic devices and other entity information. Specifically, Neo4j is used as the presentation software of the knowledge graph, and all entities are converted into triples and stored in Neo4j, forming a Figure 2 The knowledge graph shown in the figure supports efficient search and intuitive observation.

[0080] This method uses Neo4j to efficiently store and query nodes and their relationships. It is particularly suitable for processing complex relationship networks, interference patterns, communication effects and other information between electromagnetic devices, and provides fast graph traversal and relationship query capabilities. At the same time, visualization tools enable users to intuitively view and analyze graph data, helping to understand the network structure, relationships and data patterns of electromagnetic devices.

[0081] Further optionally, based on any of the above embodiments, the BiLSTM-CRF model provided by the present invention is as follows: Figure 3 As shown, it includes: BiLSTM layer and CRF layer.

[0082] Among them, the BiLSTM layer includes a forward LSTM network, a reverse LSTM network and an LSTM integrated output network.

[0083] The propagation formula of the forward LSTM network is expressed as:

[0084]

[0085] in, represents the forward hidden state of the previous time step, and xt represents the input of the current time step;

[0086] The propagation formula of the reverse LSTM network is expressed as:

[0087]

[0088] in, represents the reverse hidden state of the next time step;

[0089] The calculation process of the CRF layer is expressed as:

[0090]

[0091] in, represents the transfer score, and P(yt|ht) represents the output result of the BiLSTM layer.

[0092] Specifically, when building a BiLSTM-CRF model, the BiLSTM layer is built first, followed by the CRF layer.

[0093] The construction process of the BiLSTM layer is introduced in detail:

[0094] BiLSTM is a bidirectional long short-term memory network used to capture contextual information in the input sequence. BiLSTM consists of two LSTM (Long Short-Term Memory) networks and an LSTM integrated output network. The two LSTM networks process the forward and reverse information of the input sequence respectively. The forward LSTM calculates the result of the hidden state at each moment through forward propagation, and the reverse LSTM calculates the result of the hidden state at each moment through back propagation. Then, the LSTM integrated output network splices the forward and reverse hidden states together to form the final hidden state sequence, which is then integrated into the output of the BiLSTM layer.

[0095] Specifically, Figure 4 A schematic diagram of the LSTM network calculation process provided by the present invention, see Figure 4 ,The calculation process of LSTM network mainly involves forget gate calculation, input gate calculation, memory cell calculation, output gate calculation and hidden state update.

[0096] Among them, the forget gate determines whether the information in the memory cell of the previous time step is retained to the current time step. The calculation process of the forget gate is expressed as:

[0097] F t =σ(W f ·[h t-1 ,x t ]+b f ),

[0098] Among them, Ft represents the output of the forget gate, σ represents the activation function, Wf represents the weight matrix of the forget gate, ht-1 represents the hidden state of the previous time step, xt represents the input of the current time step, bf represents the bias term, and t represents the current time step.

[0099] The input gate determines which information in the input of the current time step will be added to the memory cell. The calculation process of the input gate is expressed as:

[0100] I t =σ(W i ·[h t-1 ,x t ]+b i ),

[0101] Among them, It represents the output of the forget gate, Wi represents the weight matrix of the input gate, and bi represents the bias term.

[0102] The process of updating memory cells involves two parts: first, the input of the current time step and the hidden state of the previous time step are converted into a new candidate memory cell through a tanh function; then, the memory cell is updated according to the output of the input gate to decide how much new information to retain. The calculation process of the memory cell is expressed as:

[0103]

[0104] in, Represents a candidate memory cell, Wc represents the weight matrix of the input gate, bc represents the bias term, Ct represents the state of the memory cell at the current time step, and Ct-1 represents the state of the memory cell at the previous time step.

[0105] The output gate determines which parts of the updated memory cells the hidden state of the current time step is based on. The calculation process of the output gate is expressed as:

[0106] O t =σ(W O ·[h t-1 ,x t ]+b O ),

[0107] Among them, Ot represents the candidate memory cell, W O represents the weight matrix of the input gate, b O represents the bias term;

[0108] Finally, the output of the output gate is used to update the hidden state of the current time step to obtain the final hidden state. The hidden state update process is expressed as:

[0109] h t =O t tanh(Ct ),

[0110] Among them, ht represents the hidden state of the current time step.

[0111] At this point, the LSTM network has completed the calculation of one time step and obtained the hidden state and memory cells of the current time step. In the recurrent neural network, the hidden state will be passed to the next time step and become the input of the next time step, so that each element in the sequence can be processed in turn. In the end, the BilSTM layer will get a Figure 5 The output shown includes the corresponding score for each label for each input sequence h.

[0112] The construction process of the CRF layer is introduced in detail:

[0113] The CRF (Conditional Random Field) layer is used to model the label sequence to solve the dependency and local optimality problems in the sequence labeling task. In the CRF layer, the transition probability between labels is learned and the score of each label sequence is calculated.

[0114] The CRF layer defines the transfer matrix A, Indicates that from label y t-1 Move to label y t This matrix captures the dependency between labels, that is, in the named entity recognition task, if a word is marked as the beginning of an entity (B-label), the next word is more likely to be the inside of the entity (I-label) or the end of the entity (E-label), rather than a non-entity (O-label). For example, if the previous entity is a walkie-talkie, then the next entity is more likely to be a channel; if the previous entity is a drone, the next word may be a height or direction such as longitude and latitude.

[0115] Specifically, the score calculation process of the CRF layer is expressed as:

[0116]

[0117] in, is the transfer score, P(yt|ht) is the emission score output by the BiLSTM layer, that is, the output result of the BiLSTM layer, x represents the input sequence, y represents the label sequence, T represents the sequence length, t represents the time step, and ht represents the hidden state at time step t.

[0118] Through the above steps, an entity model can be obtained. By inputting a text into the model, the model can output the entities and entity relationships in the text through the logical relationship of the context.

[0119] In order to further demonstrate the beneficial effects of the present invention, the present invention also compares the performance of different methods on the same interference data set. The training computer configuration and training parameters are shown in Table 2 and Table 3. The experimental results are shown in Figure 6 As shown in the figure, as the number of training times increases, the loss of the Bert-BiLSTM-CRF model on the validation set gradually decreases, which indicates that as the number of training times increases, the performance of the model on the validation data is improved. The BERT algorithm shows a higher validation set loss under the same number of training times, because the pure BERT algorithm requires more training samples and longer training time when processing named entity recognition tasks. On the other hand, since the IDCNN-CRF model cannot effectively capture the contextual information in the input sequence, it reduces the performance in the named entity recognition task. In summary, the BiLSTM-CRF model has a good performance in the named entity recognition task, especially when there are fewer training samples.

[0120] Table 2 Computer configuration

[0121] operating system Win11 23H2 CPU Intel i7-12700H GPU NVIDIA 3050 Memory 64G Torch version 2.2.1 cuda version 12.1

[0122] Table 3 Training parameters

[0123] parameter illustrate Numeric batch_size Number of samples per batch 32 embedding_dim Dimensions of word embeddings 128 hidden_dim Hidden layer dimensions 768 epochs Number of training rounds 100 lr Learning Rate 0.001 weight_decay Weight decay 1.00E-04

[0124] The present invention also provides an entity relationship analysis device for unstructured data, see Figure 7 , the device comprises:

[0125] The acquisition module 71 is used to acquire unstructured data to be analyzed.

[0126] The processing module 72 is used to perform word segmentation processing on the unstructured data to be analyzed through BERT, and determine the target embedding vector corresponding to the word segmentation result.

[0127] The processing module 72 is also used to input the target embedding vector into the pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

[0128] The present invention also provides a structure of an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus.

[0129] Memory, used to store computer programs;

[0130] The processor is used to implement the steps provided in the above method embodiment when executing the program stored in the memory.

[0131] The communication interface is used for communication between the above electronic device and other devices.

[0132] The method provided in the embodiment of the present invention can be applied to electronic devices. Specifically, the electronic device can be: a desktop computer, a portable computer, an intelligent mobile terminal, a server, etc. This is not limited here, and any electronic device that can implement the present invention belongs to the protection scope of the present invention.

[0133] The present invention also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps provided in the above method embodiment can be implemented.

[0134] The present invention also provides a program product, which includes computer program instructions. When the computer program instructions are executed, the steps provided in the above method embodiment can be implemented.

[0135] As for the device / electronic device / storage medium / program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the specific contents and beneficial effects and other related matters can be referred to the partial description of the method embodiments.

[0136] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0137] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. An entity relationship analysis method for unstructured data, characterized in that: include: Acquire unstructured data to be analyzed, wherein the unstructured data to be analyzed is unstructured data containing electromagnetic field-related content; Perform word segmentation on the unstructured data to be analyzed by using BERT, and determine a target embedding vector corresponding to the word segmentation result; The target embedding vector is input into a pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

2. The method according to claim 1, characterized in that Training the target BiLSTM-CRF model includes: Acquire a plurality of unstructured data in electromagnetic fields, each of the unstructured data containing at least one complete triple; Using BERT, each of the unstructured data is segmented to obtain an embedding vector corresponding to each of the unstructured data; Pre-training the initial BiLSTM-CRF model through each of the embedding vectors to obtain a first model; Constructing a plurality of unstructured data in the electromagnetic field with annotation information, wherein the annotation information includes at least one of the following information: a device entity, a location entity, and a relationship entity; The first model is fine-tuned and trained using the unstructured data in the electromagnetic field with labeled information to obtain the target BiLSTM-CRF model.

3. The method according to claim 2, characterized in that Also includes: According to the unstructured data to be analyzed, and the entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed, the target BiLSTM-CRF model is supplementarily trained to obtain an optimized target BiLSTM-CRF model.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: Based on Neo4j, a visual knowledge graph is generated according to the entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

5. The method according to any one of claims 1 to 3, characterized in that: Through BERT, unstructured data is segmented and the corresponding embedding vectors are obtained, including: The BERT-based WordPiece word segmenter decomposes the unstructured data into basic word fragments to obtain multiple word segments; Insert markers at the beginning and end of the word segmentation result to mark the starting point of the classification task and the separator in the task respectively; Determine a word index, a position code and a segment code corresponding to each of the segmented words, wherein the position code is used to identify the sequential position of the word in the sentence, and the segment code is used to identify the sentence to which the word belongs; Based on BERT, word embedding, position embedding and segment embedding corresponding to each word segment are generated according to the unstructured data, and based on the word embedding, position embedding and segment embedding corresponding to each word segment, an embedding vector corresponding to the unstructured data is determined.

6. The method according to any one of claims 1 to 3, characterized in that: BiLSTM-CRF model, including: BiLSTM layer and CRF layer; The BiLSTM layer includes a forward LSTM network and a reverse LSTM network; The propagation formula of the forward LSTM network is expressed as: in, represents the forward hidden state of the previous time step, and xt represents the input of the current time step; The propagation formula of the reverse LSTM network is expressed as: in, represents the reverse hidden state of the next time step; The calculation process of the CRF layer is expressed as: in, represents the transfer score, and P(yt|ht) represents the output result of the BiLSTM layer.

7. An entity relationship analysis device for unstructured data, characterized in that: include: An acquisition module, used to acquire unstructured data to be analyzed; A processing module, used to perform word segmentation processing on the unstructured data to be analyzed through BERT, and determine a target embedding vector corresponding to the word segmentation result; The processing module is also used to input the target embedding vector into a pre-trained target BiLSTM-CRF model to obtain entities and entity relationships related to the electromagnetic field in the unstructured data to be analyzed.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A program product, characterized in that The program product comprises computer program instructions, and when the computer program instructions are executed, the method according to any one of claims 1 to 6 can be implemented.

Citation Information

Patent Citations

  • Threat intelligence entity relation extraction method oriented to unstructured data

    CN116450844A

  • Data mining analysis method based on entity recognition and relation extraction

    CN118550987A