Data identification method based on structured semantic knowledge enhancement
By introducing data recognition technology with structured semantic knowledge into the event extraction method, abstract semantic representation graphs are generated and graph encoding are solved, and the problem of insufficient data sets and unused semantic knowledge in the existing methods is improved, and the accuracy of data recognition and the generalization ability of the model are improved.
Patent Information
- Application Number
- CN202411638173.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-16
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing event extraction methods face the problems of fewer data sets and no structural semantic knowledge, which leads to insufficient generalization capabilities of the model and low recognition accuracy.
Using a data recognition method based on structured semantic knowledge, text feature vectors are extracted through text encoder, abstract semantic representation graphs are generated using automatic abstract semantic representation parser, and graph feature vectors and enhanced data representations are extracted through graph encoder and comparison learning technology.
Improves the accuracy of data recognition and the generalization performance of the model, and can more effectively process complex and multi-type text data.
Smart Images

Figure CN119597915A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of natural language processing, and in particular relates to a data recognition method based on structured semantic knowledge enhancement. Background Art
[0002] Data recognition refers to the method of identifying, classifying and summarizing data through computer technology. With the help of automated tools and methods, this technology can detect and extract information of specified targets from a large amount of data, thereby saving human resources and improving recognition efficiency. The core value of data recognition lies in its ability to facilitate subsequent data processing, analysis or decision-making, and improve the availability of data. For example, according to the data classification and grading standards, text data can be divided into categories such as general data and important data. By applying data recognition technology, data that meets specific conditions can be extracted from the text, and accurate identification of important data can be achieved by comparing the data with the classification and grading standards.
[0003] Data recognition can be divided into direct recognition and indirect recognition. Direct recognition is to directly judge whether the data meets specific standards or conditions through preset rules or simple algorithms, such as matching with regular expressions. This method has the advantages of simple operation and fast processing speed. However, when faced with a wide variety of text data with different expressions, the direct recognition method may cause data omissions due to insufficient matching. Therefore, the indirect recognition method is introduced.
[0004] Indirect recognition refers to extracting data that meets specific conditions from text. This process involves technologies in the field of natural language processing. Using technologies in this field, specific information can be identified from text data. Among them, event extraction is a representative natural language processing technology. Event extraction can identify and extract predefined types of event information from unstructured text data. This information usually includes the main elements of the text, such as the trigger words, event types, event roles, and role types. Event extraction technology can not only convert free text into a standardized format to facilitate subsequent data processing and analysis, but also fully consider the contextual information of the text, thereby improving the accuracy of data recognition and reducing the risk of false positives and false negatives.
[0005] However, current event extraction methods face two major challenges. First, there are relatively few existing datasets for event extraction, and the text content they contain is limited to a few predefined categories and a small amount of data, which limits the number of supervised datasets that can be used for model training, which may lead to insufficient generalization of the model and make it difficult to cope with the diverse and more complex text data in practical applications. Second, existing event extraction methods ignore the potential structural semantic knowledge in the text, such as the logical relationship between sentences, the overall layout of the text, and the correlation between paragraphs, which is not fully utilized. This information plays an important role in improving the model's understanding ability and generalization performance. Summary of the invention
[0006] In order to solve the above problems, the purpose of the present invention is to provide a data recognition method based on structured semantic knowledge enhancement. The implementation of the present invention can cope with the above challenges and improve the accuracy of data recognition.
[0007] To achieve the above object, the present invention adopts the following technical solution:
[0008] A data recognition method based on structured semantic knowledge enhancement includes the following steps:
[0009] 1) Input the processed and cleaned dataset text into the text encoder to obtain the text feature vector.
[0010] 2) For the processed and cleaned dataset text, a Transformer-based automatic abstract semantic representation parser is used to obtain the corresponding abstract semantic representation graph. After obtaining the abstract semantic representation graph, cohesive subgraphs are generated through deterministic topology enhancement and probabilistic topology enhancement strategies to obtain semantic representations at different levels.
[0011] 3) A graph encoder is used to extract corresponding graph feature vectors from the abstract semantic representation graph and their cohesive subgraphs, so as to more accurately capture and understand the complex structure and representation of the graph.
[0012] 4) Contrastive learning is used to distinguish image-text pairs with different similarities to more accurately capture the correspondence between text and images. Contrastive learning learns the representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs.
[0013] 5) After obtaining the training model, test the effect by extracting events. After building multi-slot tuples, calculating link probabilities, decoding, and training to obtain output, the main elements of the text, such as trigger words, event types, event roles, and role types, are obtained. These elements are the text data that need to be recognized.
[0014] The technical solution is further optimized. In the step 1), the method of inputting the processed and cleaned data set text into the text encoder to obtain the text feature vector is:
[0015] 1.1) Process the text dataset into JSON records containing only sentences and corresponding word embeddings, and integrate each original dataset into a JSON file.
[0016] 1.2) Further process the data in the json file, delete irrelevant characters, and obtain the cleaned data set.
[0017] 1.3) Select the Roberta-Large model as the text encoder, input the text obtained in the previous step into the model, and obtain the text feature vector through the model-specific structure.
[0018] The technical solution is further optimized. In step 2), the method of using an automatic abstract semantic representation parser to obtain an abstract semantic representation graph and further obtain a cohesive subgraph for the data set text is:
[0019] 2.1) Input the processed data in step 1.2) into the Transformer-based automatic abstract semantic representation parser to generate the corresponding abstract semantic representation graph G. The graph can be represented as G = (V, E), where the node V represents the basic semantic unit, such as entity and predicate, and the edge E represents the semantic relationship between these units.
[0020] 2.2) After obtaining the abstract semantic representation graph, cohesive subgraphs are extracted to obtain semantic representations at different levels. Using the deterministic topology enhancement strategy, subgraphs are generated according to deterministic rules and selected according to predefined conditions. In order to strengthen the cohesion during the graph diffusion process, higher weights are strategically given to the edges in these cohesive subgraphs, thereby highlighting key relationships and improving the overall connectivity of the structure.
[0021] 2.3) To further supplement the potential knowledge gap in deterministic topology enhancement, a probabilistic topology enhancement strategy is introduced. This method generates subgraphs through probability distribution or random process, increases the uncertainty in the subgraph generation process, and makes the subgraph generated each time different.
[0022] In the further optimization of the technical solution, in step 3), the specific method of using the graph encoder to extract the corresponding graph feature vector from the abstract semantic representation graph and their cohesive subgraphs is:
[0023] 3.1) The graph substructure network is selected as the graph encoder, and the network is used to extract the corresponding graph feature vectors from the abstract semantic representation graph and their cohesive subgraphs. The graph substructure network first defines a substructure set composed of small substructures to capture the local information in the graph.
[0024] 3.2) Next, the graph substructure network searches for isomorphic subgraphs of each substructure in the graph G, and the role of each node is inferred by its symmetry equivalence class in the substructure.
[0025] 3.3) By counting the number of occurrences of different symmetry equivalence classes of nodes or edges, the structural feature vector of the node or edge is obtained, and then the comprehensive feature vector of the node is obtained.
[0026] 3.4) Based on the comprehensive feature vector of the node, the graph substructure network updates the node status through message passing, and uses aggregation functions to integrate the status and structural information of neighboring nodes, and finally obtains a more expressive node feature vector and graph feature vector.
[0027] In the further optimization of the technical solution, in step 4), the specific method of applying contrastive learning to the obtained text vectors and image vectors is:
[0028] 4.1) Contrastive learning learns the intrinsic representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs. Contrastive learning helps the model distinguish between image-text pairs with different similarities, thereby more accurately capturing the correspondence between text and images.
[0029] 4.2) Select triple loss as the contrastive learning loss function, and its triple structure is <anchor, positive sample, negative sample>. For a given text, it is defined as an anchor, and the corresponding abstract semantic representation graph and cohesive subgraph constitute a positive sample pair, while the abstract semantic representation graph and cohesive subgraph that do not correspond to it constitute a negative sample pair. The key is to ensure that there is a certain interval between the positive sample pair and the negative sample pair. This optimization ensures that samples of the same type are close enough in the embedding space, while samples of different types are far apart.
[0030] The technical solution is further optimized. In step 5), the specific method of obtaining the trigger words, event types, event roles, and role types in the text by extracting the event test results is:
[0031] 5.1) Evaluate the effect of the model by extracting events. First, convert the text into an input in a unified data format, which contains instructions, pattern labels, and text. The instructions indicate that an event extraction task is used here, the pattern labels refer to different data labels in the event extraction task, and the text is the input text of the event to be extracted.
[0032] 5.2) Event extraction includes two aspects: the identification of event trigger words and the identification of event roles. Tuples need to be constructed for these two aspects. Combine the trigger words and their related event roles to construct a complete event tuple. Since a trigger word may correspond to multiple groups of event roles, the multi-slot characteristics should be considered and connected through the graph structure to form a multi-span cycle graph.
[0033] 5.3) Use the previously trained model to convert each word embedding into a vector and calculate the link probability between word embeddings to determine the connection relationship between different slots. Through the affine attention mechanism, the event extraction task is represented as an adjacency matrix of a multi-span cycle graph. The training process uses cycle loss as the loss function.
[0034] 5.4) In the decoding stage, the effective forward chain is found through the graph decoding algorithm, and the chain is verified through skip connections and tail-to-head connections, and finally the event information is extracted. The results of event extraction include trigger words, event types, event roles, role types and other elements, which are the text data that need to be recognized.
[0035] Different from the prior art, the above technical solution has the following beneficial effects:
[0036] 1) Using abstract semantic representation parsing to generate self-supervised features, this abstract meaning parser can capture the structural semantic knowledge in the text without the need for additional annotations. At the same time, cohesive subgraphs are introduced to capture more different semantic structures.
[0037] 2) Use contrastive learning to establish associations between text and images. Contrastive learning can understand the semantic connections in text from the associations and differences between text and images, thus better adapting to event extraction tasks.
[0038] 3) The above methods not only achieve excellent performance in event extraction tasks, but also play an important role in data recognition applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 The flowchart of a data recognition method based on structured semantic knowledge enhancement is shown in FIG. DETAILED DESCRIPTION
[0040] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.
[0041] like Figure 1 The figure shows a flow chart of a data recognition method based on structured semantic knowledge enhancement. The data recognition method includes the following steps:
[0042] 1) Input the processed and cleaned data set text into the text encoder to obtain the text feature vector:
[0043] 1.1) Get a public text dataset and extract the sentence information from it, ignoring annotations or other irrelevant information. Divide the sentences into embedding information, where each sentence and its corresponding word embedding is a json record. All sentences in each original dataset are integrated into a single json file.
[0044] 1.2) Further process the json file generated in step 1.1) by using regular expressions to remove special characters and numbers, retaining only pure English data, and thus obtain the cleaned data set.
[0045] 1.3) Select the Roberta-Large model as the text encoder and input the text processed in the previous step into the model. Encode it through a multi-level self-attention mechanism and extract the text feature vector from the last hidden layer.
[0046] 2) For the processed and cleaned dataset text, use the Transformer-based automatic abstract semantic representation parser to obtain the corresponding abstract semantic representation graph. After obtaining the abstract semantic representation graph, introduce cohesive subgraphs to obtain semantic representations at different levels.
[0047] 2.1) Input the dataset into the Transformer-based automatic abstract semantic representation parser to generate the corresponding abstract semantic representation graph G. The graph can be represented as G = (V, E), where the node V represents the basic semantic unit, such as entity and predicate, and the edge E represents the semantic relationship between these semantic units. Each edge e ij =(v i , v j ) is associated with a relation r in the relation set R, which can be expressed as E = {(v i , v j ,r)|(v i , v j )∈V×V,r∈R}, where v represents a node in the graph.
[0048] 2.2) After obtaining the abstract semantic representation graph, cohesive subgraphs are extracted to obtain semantic representations at different levels. Using the deterministic topology enhancement strategy, subgraphs are generated using deterministic rules and selected according to predefined conditions. To improve the cohesion during the graph diffusion process, higher weights are strategically given to the edges in these cohesive subgraphs, thereby emphasizing key relationships and enhancing the overall structural connectivity. For the node v in the original abstract semantic representation graph, i ∈V, by counting the number of times it appears in the subgraph set, we get its importance weight w v(v i ). Given G k =(V k , E k ),have in is an indicator function, if v i In V k If the value is 0, then output 1, otherwise output 0. v (v i ) is normalized to obtain w′ v (v i ), so that node v is continuously updated during graph diffusion i and v j Edge ij The weight w e (e ij ) to obtain the weight w′ e (e ij ):
[0049] 2.3) In order to make up for the potential knowledge loss in deterministic topology enhancement, a probabilistic topology enhancement strategy is combined. This method generates subgraphs based on a certain probability distribution or random process, and introduces randomness in the subgraph generation process, resulting in different subgraphs generated each time. A probabilistic mechanism is introduced to modify the edges or nodes in the graph using the original discard probability P, thereby changing the topological structure of the graph. In order to maintain the cohesion of the subgraph generated by probabilistic topology enhancement, an attenuation factor ε∈(0, 1) is introduced to limit the probability P. Node v i The probability P′(v i ) and edge e ij The probability P′(e ij ) are: P′(v i )=(1-w′ v (v i )·ε)·P and
[0050] 2.4) Finally, a set of cohesive subgraphs are obtained, which not only characterize the multi-level structural cohesion of the abstract semantic representation graph, but also help to obtain deep semantic knowledge from the original text.
[0051] 3) Use a graph encoder to extract corresponding graph feature vectors from the abstract semantic representation graph and their cohesive subgraphs.
[0052] 3.1) The graph substructure network is selected as the graph encoder to extract the corresponding graph feature vector from the abstract semantic representation graph and its cohesive subgraphs. The graph substructure network first defines a substructure set H = {H1, H2, ..., H K}, used to capture local information in the graph.
[0053] 3.2) Next, the graph substructure network searches for the isomorphic subgraphs of each substructure H in the graph G, denoted as G S In this process, the role of each node v is expressed by its symmetry equivalence class Orb in the substructure H H (f(v)) to infer.
[0054] 3.3) Count the frequencies of different symmetry equivalence classes for each node or edge, and use these counts as additional node or edge features. The calculation formula for the node v structural feature is: The calculation formula of the edge structure feature between node u and node v is: in are the symmetry equivalence class sets of nodes and edges respectively.
[0055] 3.4) The structural features of these nodes or edges are combined with the original features of the nodes or edges to generate new node or edge feature vectors. The new node feature vector is expressed as: The new edge eigenvector is expressed as:
[0056] 3.5) Based on the comprehensive feature vector of the node, the graph substructure network implements the standard graph neural network message passing mechanism. At each layer, the node collects information from its neighbors and updates its own representation Use the aggregate function M t+1 Aggregate neighbor information: Among them, UP t+1 Represents a function fitter, aggregating messages Contains structural feature information from neighboring nodes. Finally, a more expressive node feature vector and graph feature vector are generated.
[0057] 4) Contrastive learning can help the model distinguish between image-text pairs with different similarities, thereby more accurately capturing the correspondence between text and images. Contrastive learning learns the intrinsic representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs.
[0058] 4.1) Contrastive learning learns the intrinsic representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs. Contrastive learning helps the model distinguish between image-text pairs with different similarities, thereby more accurately capturing the correspondence between text and images.
[0059] 4.2) In this process, triple loss is selected as the contrastive learning loss function, and its triple structure is <anchor, positive sample, negative sample>. For a given text, it is defined as an anchor, and the corresponding abstract semantic representation graph and cohesive subgraph constitute a positive sample pair, and the abstract semantic representation graph and cohesive subgraph that do not correspond to it constitute a negative sample pair. The key is to ensure that there is a certain interval separation between positive and negative pairs. This optimization strategy ensures that samples of the same category are close enough in the embedding space, while samples of different categories are far apart.
[0060] 4.3) The distance between the anchor sample and the negative sample should be significantly greater than the distance between the anchor sample and the positive sample, which can be expressed by the following formula: L = max(0,|sg + | 2 -|sg - | 2 +m), where L represents the loss function, s, g + ,g - They represent the vectors that map the text s, the positive image and the negative image corresponding to the text to the embedding space respectively. The symbol |·| represents the Euclidean distance, and m is a positive number used to define the minimum interval between positive and negative sample pairs.
[0061] 5) After the training model is obtained, the event test effect is extracted to obtain the trigger words, event types, event roles, role types and other elements in the text.
[0062] 5.1) Model effect obtained by extracting events. First, convert the text into an input in a unified data format, which contains instructions, pattern labels and text. The instruction prompt uses the event extraction task here, which contains the leading symbol [I] and the natural language sentence of the prompt; the pattern label refers to the different data labels in the event extraction task and the corresponding label text, such as [LM] for entity or event type, [LR] for relationship or parameter role; the text is the input text of the event to be extracted.
[0063] 5.2) Event extraction includes two aspects, the identification of event trigger words and the identification of event roles. Tuples need to be constructed for these two types: the trigger word type is marked as a special label [LM] and extracted together with the corresponding event type to form the first part of the tuple; event-related roles, such as participants, locations, and time, are represented by special labels [LR] to form the second part of the tuple. Combine the trigger word and its related event roles to construct a complete event tuple. Since a trigger word may correspond to multiple groups of event roles, the multi-slot characteristics must be considered and connected through the graph structure to form a multi-span cycle graph.
[0064] 5.3) Use the previously trained model to transform each word embedding into x i For vector And calculate the link probability between word embeddings to determine the connection relationship between different slots. Calculate link probability The formula is: where d h Represents the dimension of the vector. Through the affine attention mechanism, the event extraction task is represented as the adjacency matrix of a multi-span cycle graph. The training process uses the cycle loss as the loss function:
[0065] 5.4) In the decoding stage, the effective forward chain is found through the graph decoding algorithm, and the chain is verified through skip connections and tail-to-head connections, and finally the event information is extracted. The results of event extraction include trigger words, event types, event roles, role types and other elements, which are the text data that need to be recognized.
[0066] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." or "comprise..." do not exclude the existence of other elements in the process, method, article or terminal device including the elements. In addition, in this article, "greater than", "less than", "exceed" and the like are understood to exclude the number itself; "above", "below", "within" and the like are understood to include the number itself.
[0067] Although the above embodiments have been described, once those skilled in the art know the basic creative concepts, they can make additional changes and modifications to these embodiments. Therefore, the above description is only an embodiment of the present invention and does not limit the patent protection scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings of the present invention, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A data recognition method based on structured semantic knowledge enhancement, characterized in that: It includes the following steps: 1) Input the processed and cleaned data set text into the text encoder to obtain the text feature vector; 2) For the processed and cleaned dataset text, a Transformer-based automatic abstract semantic representation parser is used to obtain the corresponding abstract semantic representation graph. After obtaining the abstract semantic representation graph, cohesive subgraphs are generated through deterministic topology enhancement and probabilistic topology enhancement strategies to obtain semantic representations at different levels; 3) Using a graph encoder to extract corresponding graph feature vectors from abstract semantic representation graphs and their cohesive subgraphs, so as to more accurately capture and understand the complex structure and representation of the graph; 4) Contrastive learning is used to distinguish image-text pairs with different similarities to more accurately capture the correspondence between text and images. Contrastive learning learns the representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs. 5) After obtaining the training model, the event test effect is extracted, and the output steps are obtained through constructing multi-slot tuples, link probability calculation, decoding and training to obtain the main elements of the trigger words, event types, event roles and role type text in the text.
2. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 1, characterized in that: In the step 1), the method of inputting the processed and cleaned data set text into the text encoder to obtain the text feature vector is: 1.1) Process the text dataset into JSON records containing only sentences and corresponding word embeddings, and integrate each original dataset into a JSON file; 1.2) Further process the data in the json file, delete irrelevant characters, and obtain the cleaned data set; 1.3) Select the Roberta-Large model as the text encoder, input the text obtained in the previous step into the model, and obtain the text feature vector through the model-specific structure.
3. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 2, characterized in that: In the step 2), the method of using an automatic abstract semantic representation parser to obtain an abstract semantic representation graph and further obtain a cohesive subgraph for the data set text is: 2.1) Input the data processed in step 1.2) into the Transformer-based automatic abstract semantic representation parser to generate the corresponding abstract semantic representation graph G, which can be represented as G = (V, E), where the node V represents the basic semantic unit and the edge E represents the semantic relationship between the semantic units; 2.2) After obtaining the abstract semantic representation graph, cohesive subgraphs are extracted to obtain semantic representations at different levels. Deterministic topology enhancement strategies are used to generate subgraphs based on deterministic rules and select them according to predefined conditions. In order to enhance the cohesion during the graph diffusion process, higher weights are strategically assigned to the edges in these cohesive subgraphs, thereby highlighting key relationships and improving the overall connectivity of the structure. 2.3) In order to further supplement the potential knowledge gaps in deterministic topology enhancement, a probabilistic topology enhancement strategy is introduced. This method generates subgraphs through probability distribution or random process, increases the uncertainty in the subgraph generation process, and makes the subgraphs generated each time may be different, thus obtaining a set of cohesive subgraphs.
4. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 3, characterized in that: In step 3), the specific method of using the graph encoder to extract the corresponding graph feature vectors from the abstract semantic representation graph and their cohesive subgraphs is: 3.1) The graph substructure network is selected as the graph encoder. The network is used to extract the corresponding graph feature vectors from the abstract semantic representation graph and their cohesive subgraphs. The graph substructure network first defines a substructure set composed of small substructures to capture the local information in the graph. 3.2) Next, the graph substructure network searches for isomorphic subgraphs of each substructure in the abstract semantic representation graph G, and the role of each node is inferred by its symmetry equivalence class in the substructure; 3.3) By counting the number of occurrences of different symmetry equivalence classes of nodes or edges, the structural feature vector of the node or edge is obtained, and then the comprehensive feature vector of the node is obtained; 3.4) Based on the comprehensive feature vector of the node, the graph substructure network updates the node status through message passing, and uses aggregation functions to integrate the status and structural information of neighboring nodes, and finally obtains a more expressive node feature vector and graph feature vector.
5. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 4, characterized in that: In step 4), the specific method of applying contrastive learning to the obtained text vectors and image vectors is: 4.1) Contrastive learning learns the intrinsic representation of data by maximizing the distance between negative sample pairs and minimizing the distance between positive sample pairs. Contrastive learning helps the model distinguish between image-text pairs with different similarities, thereby more accurately capturing the correspondence between text and images. 4.2) Select triplet loss as the contrastive learning loss function, and its triplet structure is <anchor point, positive sample, negative sample>. For a given text, it is defined as the anchor point, and the corresponding abstract semantic representation graph and cohesive subgraph constitute the positive sample pair, while the abstract semantic representation graph and cohesive subgraph that do not correspond to it constitute the negative sample pair. The key is to ensure that there is a certain interval between the positive sample pair and the negative sample pair. This optimization ensures that samples of the same type are close enough in the embedding space, while samples of different types are far apart.
6. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 5, characterized in that: It also includes 4.3) The distance between the anchor sample and the negative sample should be significantly greater than the distance between the anchor sample and the positive sample, which can be expressed by the following formula: L = max(0,|sg + | 2 -|sg - | 2 +m), where L represents the loss function, s, g + ,g - They represent the vectors that map the text s, the positive image and the negative image corresponding to the text to the embedding space respectively. The symbol |·| represents the Euclidean distance. m is a positive number used to define the minimum interval between positive and negative sample pairs.
7. The data recognition method based on structured semantic knowledge enhancement as claimed in claim 5, characterized in that: In step 5), the specific method of obtaining the trigger words, event types, event roles, and role types in the text by extracting the event test results is as follows: 5.1) Evaluate the effect of the model by extracting events. First, convert the text into an input in a unified data format. The input contains instructions, pattern labels, and text. The instructions indicate that an event extraction task is used here. The pattern labels refer to different data labels in the event extraction task. The text is the input text of the event to be extracted. 5.2) Event extraction includes two aspects: the identification of event trigger words and the identification of event roles. It is necessary to construct tuples for these two aspects respectively, and to construct a complete event tuple by combining the trigger words and their related event roles. Since a trigger word may correspond to multiple groups of event roles, the multi-slot characteristics should be considered and connected through the graph structure to form a multi-span cycle graph; 5.3) Use the previously trained model to convert each word embedding into a vector and calculate the link probability between word embeddings to determine the connection relationship between different slots. Through the affine attention mechanism, the event extraction task is represented as an adjacency matrix of a multi-span cycle graph. The training process uses cycle loss as the loss function. 5.4) In the decoding stage, a valid forward chain is found through a graph decoding algorithm, and the chain is verified through skip connections and tail-to-head connections, and finally event information is extracted. The results of event extraction include trigger words, event types, event roles, and role type elements. These elements are the text data that need to be recognized.
Citation Information
Cited By
Judicial information retrieval method and system based on graph neural network
CN120632121A