Rail transit event extraction method fusing semantic features and local dependency features
By integrating semantic features and local dependency features, the problem of poor adaptability of traditional models in the rail transit field is solved, achieving higher event extraction accuracy and improving the applicability of the model in the rail transit field.
Patent Information
- Application Number
- CN202411977413.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Traditional event extraction models are poorly adapted to the rail transit field, resulting in low event extraction accuracy and failure to fully utilize the semantic features and local dependency features of events.
A rail transit event extraction method that integrates semantic features and local dependency features is proposed. By enhancing local dependency features and semantic features, the method uses a CRF model for prediction and combines RGAT and BiLSTM models for feature fusion and optimization.
It improves the accuracy of event extraction, makes full use of all event information, and enhances the model's adaptability and accuracy in the rail transit field.
Smart Images

Figure CN119862877B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of big data processing technology for rail transit engineering, specifically involving a method for extracting rail transit events by fusing semantic features and local dependency features. Background Technology
[0002] As the complexity and scale of rail transit projects continue to grow, the number of design specifications, construction records, and technical documents is also rapidly increasing. These documents contain a wealth of valuable event information regarding project progress, construction methods, and safety measures. Accurately extracting this information is crucial for future compliance checks, risk assessments and management, and the construction of event maps, effectively improving the overall management level and safety assurance of the project.
[0003] In the field of rail transit engineering, event extraction technology is often used for information extraction. Traditional event extraction models such as BERT+BiLSTM+CRF and BERT+CRF, although they show high accuracy on public datasets, have a decline in accuracy in practical applications in the rail transit field. This is because traditional event extraction models rely solely on the semantic features or local features of events, failing to fully utilize all the information of the events. This results in poor model adaptability in the rail transit field, and the lack of domain knowledge leads to low event extraction accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a method for extracting rail transit events that integrates semantic features and local dependency features, thereby solving the problem of low accuracy in traditional event extraction models in the prior art.
[0005] The technical solution adopted in this invention is a rail transit event extraction method that integrates semantic features and local dependency features, comprising the following steps:
[0006] Step 1: Obtain the original design specification text and preprocess it to obtain the event text dataset;
[0007] Step 2: Enhance the local dependency information of the event text dataset in Step 1, and then obtain the enhanced local dependency features;
[0008] Step 3: Enhance the semantic information of the event text dataset in Step 1, and then obtain the enhanced semantic features;
[0009] Step 4: Fuse the enhanced local dependency features from Step 2 and the enhanced semantic features from Step 3 to generate a fused feature vector;
[0010] Step 5: Input the fused feature vector from Step 4 into the CRF model for prediction, and evaluate the model performance using various evaluation metrics.
[0011] The invention is further characterized in that:
[0012] The specific process of step 1 is as follows:
[0013] Step 1.1: Obtain the original design specification text; the data must conform to the railway track engineering construction quality acceptance standards.
[0014] Step 1.2: Perform data cleaning on the original design specification text from Step 1.1, and then filter the cleaned text.
[0015] The data cleaning methods in step 1.2 include:
[0016] Remove special characters and symbols that are not related to the theme of the original design specification text; delete redundant spaces and garbled characters in the original design specification text; identify and delete duplicate sentences, useless sentences and erroneous sentences in the original design specification text; replace English symbols in the original design specification text with Chinese symbols; and correct typos in the original design specification text.
[0017] The specific process of data filtering in step 1.2 is as follows:
[0018] After obtaining the original design specification text after data cleaning, the characters of the sentence corresponding to each period in the text are calculated, and sentences with more than 80 characters are deleted to obtain the filtered text.
[0019] Step 1.3: Obtain the text after data filtering in Step 1.2, and perform period segmentation according to each period in the text to obtain several sentences, which together form the event text dataset;
[0020] Step 1.4: Perform trigger word recognition on the event text dataset from Step 1.3 and obtain a list of trigger words;
[0021] The specific process of step 1.4 is as follows:
[0022] Step 1.4.1: Select words related to the field of rail transit technology to construct a trigger word dictionary;
[0023] Step 1.4.2: Use regular expressions to match words from the trigger word dictionary in Step 1.4.1 above as trigger words;
[0024] Step 1.4.3: Use a word segmentation tool to segment the event text dataset from Step 1.3, and use the pre-trained language model BERT to generate the context embedding representation of each word in the event. The specific formula is as follows:
[0025] (1);
[0026] in, Indicates the first... i One word; Indicator Contextual embedding representation;
[0027] Step 1.4.4: Combining the contextual embedding representation of each word in the event from step 1.4.3, the cosine similarity method is used to calculate the similarity between the contextual embedding representation of each word in the event and the embedding representation of each trigger word in the dictionary. If the similarity is higher than a predetermined threshold, it is marked as a potential trigger word; otherwise, it is marked as a non-trigger word. The specific formula for calculating the similarity is as follows:
[0028] (2);
[0029] in, and represents the context embedding representation of words in the event and the context embedding representation of words in the dictionary, respectively; || represents the Euclidean norm of the embedding representation, i.e., the length or modulus of the embedding representation;
[0030] Step 1.4.5: Use a Conditional Random Field (CRF) model to predict the events that have been judged by similarity in Step 1.4.3. By parsing the label sequence generated by the CRF model, the final list of trigger words can be obtained.
[0031] Step 1.5: Combining the trigger word list from Step 1.4, segment each event into trigger words to ensure that each event has only one trigger word;
[0032] The specific process of step 1.5 is as follows:
[0033] Step 1.5.1: Count the number of trigger words for each event in Step 1.4;
[0034] Step 1.5.2: Determine whether the number of trigger words in each event exceeds 1. If the number of trigger words is only 1, mark the event as a simple event. If the number of trigger words is greater than 1, mark the event as a complex event.
[0035] Step 1.5.3: Combine Step 1.5.2 to identify the position of the trigger word in the complex event, then use the tree structure analysis method to identify the master-detail structure of the complex event, and use the syntactic analysis tool spaCy to segment the complex event into multiple separate events. Return to Step 1.5.2 to continue to judge each separate event until each event has only one trigger word, and then proceed to the next step.
[0036] Step 1.6: Perform BIO annotation on the events segmented by trigger words in Step 1.5 to obtain the BIO-annotated event text dataset;
[0037] The specific process of BIO annotation in step 1.6 is as follows:
[0038] Obtain the events segmented by trigger words in step 1.5, mark the starting position of each trigger word and argument in the event as BX, mark the subsequent position of each trigger word and argument as IX, and mark other words that do not belong to trigger words and arguments as O;
[0039] In the tagging of trigger words and arguments, if it is a trigger word, X is represented as V; if it is an argument, X represents the specific type of the argument. The specific types of arguments include: OBJ, ADJ, ATTR, and COND.
[0040] The specific process of step 2 is as follows:
[0041] Step 2.1: Obtain the event text dataset annotated with BIO from Step 1, and identify the trigger words and arguments in each event;
[0042] Step 2.2: Extract the dependencies between arguments from Step 2.1;
[0043] The specific process of step 2.2 is as follows:
[0044] Select a dependency parsing tool to perform dependency parsing and obtain the syntactic dependency information of the event text;
[0045] Step 2.3: Construct a dependency graph based on the syntactic dependency information of the event text in Step 2.2, and train the generated dependency graph using a Relational Graph Attention Network (RGAT) to obtain node features. Edge features ;
[0046] The specific process of step 2.3 is as follows:
[0047] Step 2.3.1: Construct a dependency graph based on the event structure information and basic dependencies of arguments in Step 2.2. Each node in the dependency graph represents an argument, and each edge represents the dependency relationship between arguments.
[0048] Step 2.3.2: Construct the node features and edge features in the dependency graph. Specifically, use Word2Vec to encode each node to construct node features, represented as follows:
[0049] (3);
[0050] in, Represents a d-dimensional vector; It is a node The vector representation of ; i represents the node number;
[0051] Edge features are constructed based on the dependencies between nodes, which are represented as follows:
[0052] (4);
[0053] Where i represents the starting node of the dependency relationship; j represents the target node of the dependency relationship;
[0054] Step 2.4: Define the graph structure using the DGL graph network framework, construct the RGAT model, and input the node features obtained from training in Step 2.3. Sum of edge features The RGAT model aggregates features from neighboring nodes through a self-attention mechanism, captures dependencies in events, and outputs enhanced local dependency features. The specific formula is as follows:
[0055] (5);
[0056] in, It is a node i Local dependency feature representation; It is a node i The set of neighboring nodes; j Represents a node i The neighboring nodes; w is a learnable linear transformation matrix; These are the self-attention weights, calculated using the following formula:
[0057] (6);
[0058] Where LeakReLU is the activation function; This represents a parameter vector for calculating attention weights; W is a linear transformation matrix. and These are the features of nodes i and j, respectively; and These are the edge features of node i, node j, and node k, respectively; || indicates concatenating the vectors.
[0059] The specific process of step 3 is as follows:
[0060] Step 3.1: Obtain the event text dataset labeled with BIO from Step 1. Enhance the semantic information of the events by supplementing each event with quantifiers and mining new trigger words.
[0061] The specific process of step 3.1 is as follows:
[0062] Step 3.1.1: Using the density-based clustering algorithm (DBSCAN), the correspondence between measurement terms and units of measurement in events is identified through cluster analysis, and a dictionary of measurement terms and units of measurement is constructed, as follows:
[0063] In step 1, measure terms and units of measurement are extracted from the BIO-annotated event text. The extracted measure terms and units of measurement are then represented using the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm. The TF-IDF formula is as follows:
[0064] (7);
[0065] in, y is the frequency of word y in the document; DF(y) represents the number of documents containing word y; N is the total number of documents;
[0066] Then, the DBSCAN algorithm is used to cluster the feature vectors. Specifically, first, the distance from each feature vector to its K-nearest neighbor is calculated by plotting a K-distance graph, and these distances are sorted in ascending order. Then, the neighborhood parameter is selected. The inflection point of the corresponding distance curve is considered optimal. At the same time, set the minimum number of points minPts required to form a cluster, at point p. Points within the neighborhood The details are as follows:
[0067] (8);
[0068] Where q is a point in the set, and it is a neighbor of point p;
[0069] if If p is marked as the core point, all core points and their neighboring points are grouped into the same cluster, that is, semantically similar words are grouped into the same cluster. Semantically similar words include measurement terms and measurement units. After the clustering is completed, the correspondence between measurement terms and measurement units can be identified through each cluster, and then a dictionary of measurement terms and measurement units can be constructed.
[0070] Step 3.1.2: Use the Latent Dirichlet Algorithm (LDA) to mine new trigger words in the event. If the mined event contains more than one trigger word, then the trigger word segmentation method in Step 1.5 is used to ensure that each event has only one trigger word.
[0071] The specific process of using the LDA algorithm to mine new trigger words in events is as follows:
[0072] The LDA algorithm is used to analyze the topics contained in each event text, mine the high-frequency words in each topic, calculate the weight of the high-frequency words and compare it with the set threshold. If the weight of the high-frequency word is greater than the threshold, the word is set as a potential trigger word. Otherwise, other high-frequency words are judged. Finally, trigger word segmentation is performed on topic texts with more than one trigger word to ensure that each topic text contains only one trigger word.
[0073] The likelihood function formula for the LDA algorithm is as follows:
[0074] (9);
[0075] Where α is the topic distribution hyperparameter; β is the word distribution hyperparameter; and the event set... Theme distribution and each topic k Word distribution in They are all generated from the Dirichlet distribution; It is the first i The first event j Tags for each word; It is the first i The first document in the document j One word; It is the first i The number of words in a document; θ is the total number of events; i It is the first i Thematic distribution of events;
[0076] The weights of high-frequency words are calculated using the TF-IDF algorithm described in step 3.1.1 above. The specific method for setting the threshold is as follows:
[0077] Calculate all words in each topic ·TF-IDF value, according to • The distribution of TF-IDF values, sorting all words by their weights from smallest to largest, to find • The weight value corresponding to the 90th percentile in the TF-IDF value distribution is set as the threshold. The specific calculation formula is as follows:
[0078] (10);
[0079] in, This represents the probability that word y will be generated given topic k.
[0080] Step 3.2: Use the SBERT+BiLSTM model to encode the events whose semantic information was enhanced in Step 3.1 and extract the enhanced semantic features;
[0081] The specific process of step 3.2 is as follows:
[0082] The events in step 3.1 that enhance semantic information are transformed into contextual embedding representations using SBERT. Then BiLSTM processing is used. For context embedding of input sequences The details are as follows:
[0083] (11);
[0084] in, T Indicates the length of the event; It is the SBERT embedding representation vector of each word. Represents a d-dimensional vector;
[0085] BiLSTM computes the hidden state using two LSTM units, forward and backward. The formulas for the forward and backward hidden states of BiLSTM dynamically model context dependencies, embedding the input context for further processing and extracting enhanced semantic features, as detailed below:
[0086] (12) (13);
[0087] Where t is the time step; and These are the t-th hidden states of the forward and backward LSTMs, respectively. and This represents the forward and backward propagation parts of the LSTM, where the input sequence is processed from beginning to end and from end to beginning according to time steps, respectively. It is the input embedding at time step t; and These are the hidden states of the previous time step and the next time step, respectively.
[0088] Then, the forward and backward hidden states are concatenated to obtain the enhanced semantic features. The details are as follows:
[0089] (14);
[0090] in, , This represents a 2d-dimensional vector.
[0091] The specific process of step 4 is as follows:
[0092] For the local dependency features in step 2 and the enhanced semantic features in step 3 Perform a weighted average and define a learnable weight parameter. Its value range is [0, 1]. Then, the optimal weights, i.e., the fused features, are learned through the Adam optimization algorithm. It can be represented as:
[0093] (15).
[0094] The specific process of step 5 is as follows:
[0095] Step 5.1: Use CRF as the prediction model and input the features fused in Step 4. Training is conducted to predict the annotation of each character;
[0096] Step 5.2: During the training process in Step 5.1, the CRF model optimizes the weights using the sequence cross-entropy loss function, ensuring that the predicted labeled sequence matches the actual labeled sequence.
[0097] The sequence cross-entropy loss function is used to measure the difference between the predicted value and the true label. The formula for the cross-entropy loss function is:
[0098] (16);
[0099] in, This represents the predicted category probability distribution; represents the real label; M represents the number of events.
[0100] The beneficial effects of this invention are:
[0101] This invention presents a rail transit event extraction method that integrates semantic features and local dependency features. It enhances the semantic information of events by supplementing quantifiers and mining new trigger words. At the same time, it makes full use of the local dependency features of events by constructing a dependency graph and RGAT model. The effective integration of the two fully utilizes all event information and effectively improves the accuracy of event extraction. Attached Figure Description
[0102] Figure 1 This is an overall flowchart of the rail transit event extraction method that integrates semantic features and local dependency features according to the present invention;
[0103] Figure 2 This is a flowchart of the data preprocessing process in the rail transit event extraction method that integrates semantic features and local dependency features of the present invention;
[0104] Figure 3This is a schematic diagram of a BIO annotation in the rail transit event extraction method that integrates semantic features and local dependency features of the present invention;
[0105] Figure 4 This is an example of an output result from the rail transit event extraction method that integrates semantic features and local dependency features of the present invention. Detailed Implementation
[0106] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.
[0107] This invention provides a method for extracting rail transit events that integrates semantic features and local dependency features, such as... Figure 1 As shown, the specific steps are as follows:
[0108] Step 1: Obtain the original design specification text and perform preprocessing, such as... Figure 2 As shown, the event text dataset is obtained;
[0109] Step 1.1: Obtain the original design specification text; the data must conform to the railway track engineering construction quality acceptance standards.
[0110] Step 1.2: Perform data cleaning on the original design specification text from Step 1.1, and then filter the cleaned text.
[0111] The data cleaning methods in step 1.2 include:
[0112] Remove special characters and symbols unrelated to the theme of the original design specification text; delete redundant spaces and garbled characters from the original design specification text; identify and delete duplicate, useless, and erroneous sentences from the original design specification text; replace English symbols in the original design specification text with Chinese symbols, such as colons, semicolons, and commas; and correct typos in the original design specification text.
[0113] The specific process of data filtering in step 1.2 is as follows:
[0114] After obtaining the original design specification text after data cleaning, the characters of the sentence corresponding to each period in the text are calculated, and sentences with more than 80 characters are deleted to obtain the filtered text.
[0115] Step 1.3: Obtain the text after data filtering in Step 1.2, and perform period segmentation according to each period in the text to obtain several sentences, which together form the event text dataset;
[0116] For example, the sentence "The type of rail for mainline turnouts should be consistent with the type of rail in adjacent sections, and should not be lower than the strength grade and material requirements of the rails in adjacent sections. Mainlines, auxiliary lines, and test tracks of the metro should preferably use turnouts of no less than No. 9, while the throat area of the depot should preferably use turnouts of no more than No. 7, and should preferably use AT switch rails, high-manganese steel frogs, and adjustable guard rails," can be divided into two parts by using periods: "The type of rail for mainline turnouts should be consistent with the type of rail in adjacent sections, and should not be lower than the strength grade and material requirements of the rails in adjacent sections" and "Mainlines, auxiliary lines, and test tracks of the metro should preferably use turnouts of no less than No. 9, while the throat area of the depot should preferably use turnouts of no more than No. 7, and should preferably use AT switch rails, high-manganese steel frogs, and adjustable guard rails."
[0117] Step 1.4: Perform trigger word recognition on the event text dataset from Step 1.3 and obtain a list of trigger words;
[0118] The specific process of step 1.4 is as follows:
[0119] Step 1.4.1: Select words related to the field of rail transit technology to construct a trigger word dictionary; for example, words such as "sampling", "retention", "inspection", "sawing", "paving", and "conducting".
[0120] Step 1.4.2: Use regular expressions to match words from the trigger word dictionary in Step 1.4.1 above as trigger words;
[0121] Step 1.4.3: Use a word segmentation tool to segment the event text dataset from Step 1.3, and use the pre-trained language model BERT to generate the context embedding representation of each word in the event. The specific formula is as follows:
[0122] (1);
[0123] in, Indicates the first... i One word; Indicator Contextual embedding representation;
[0124] Word segmentation tools that use dictionary and statistical methods to segment Chinese words, such as Jieba Word Segmentation Tool.
[0125] Step 1.4.4: Combining the contextual embedding representation of each word in the event from step 1.4.3, the cosine similarity method is used to calculate the similarity between the contextual embedding representation of each word in the event and the embedding representation of each trigger word in the dictionary. If the similarity is higher than a predetermined threshold, it is marked as a potential trigger word; otherwise, it is marked as a non-trigger word. The specific formula for calculating the similarity is as follows:
[0126] (2);
[0127] in, and represents the context embedding representation of words in the event and the context embedding representation of words in the dictionary, respectively; || represents the Euclidean norm of the embedding representation, i.e., the length or modulus of the embedding representation;
[0128] Step 1.4.5: Use a Conditional Random Field (CRF) model to predict the events that have been judged by similarity in Step 1.4.3. By parsing the label sequence generated by the CRF model, the final list of trigger words can be obtained.
[0129] Step 1.5: Combining the trigger word list from Step 1.4, segment each event using trigger words to ensure that each event has only one trigger word. The specific process is as follows:
[0130] Step 1.5.1: Count the number of trigger words for each event in Step 1.4;
[0131] Step 1.5.2: Determine whether the number of trigger words in each event exceeds 1. If the number of trigger words is only 1, mark the event as a simple event. If the number of trigger words is greater than 1, mark the event as a complex event.
[0132] Step 1.5.3: Combine Step 1.5.2 to identify the position of the trigger word in the complex event, then use the tree structure analysis method to identify the master-detail structure of the complex event, and use the syntactic analysis tool spaCy to segment the complex event into multiple separate events. Return to Step 1.5.2 to continue to judge each separate event until each event has only one trigger word, and then proceed to the next step.
[0133] For example: the trigger word for the event "The construction unit shall randomly inspect 10 welds per train or 10km" is "random inspection"; the trigger word for the event "The truss reinforcement shall not be twisted, deformed, unwelded, or loose" is "shall not"; the trigger word for the event "The pre-laid ballast surface shall be 50mm higher than the abutment retaining wall" is "higher than"; the trigger word for the event "Concrete pouring construction and curing shall comply with the relevant provisions of Articles 6.4.2 to 6.4.8 of the Railway Concrete Engineering Construction Quality Acceptance Standard TB10424-2018" is "complies with".
[0134] Step 1.6: Perform BIO annotation on the events segmented by trigger words in Step 1.5 to obtain the BIO-annotated event text dataset;
[0135] The specific process of BIO annotation in step 1.6 is as follows:
[0136] Obtain the events segmented by trigger words in step 1.5. Mark the starting position of each trigger word and argument in the event as BX, the subsequent position of each trigger word and argument as IX, and other words that are not trigger words or arguments as O. For example: "The pre-laid ballast surface should be 50mm higher than the bridge abutment retaining wall." In this sentence, "pre-laid ballast surface" is the subject, "pre" is the starting position, and "laid ballast surface" is the subsequent position.
[0137] In this process, after identifying the event trigger word, the related words are found through dependency parsing, which are the arguments. In the tagging of the trigger word and the arguments, if it is a trigger word, X is represented as V, and if it is an argument, X is represented as the specific type of the argument. The specific types of arguments include: subject (OBJ), adjective (ADJ), object (ATTR), and condition (COND).
[0138] like Figure 3 The image shows an example of BIO annotation for the sentence "When the track is locked, the difference between the highest and lowest actual locked track temperatures of a unit track section within the same section shall not exceed 10℃". The image shows the annotation results for the trigger words, arguments, and other words that are not trigger words or arguments in this example.
[0139] Step 2: Enhance the local dependency information of the event text dataset in Step 1, and then obtain the enhanced local dependency features;
[0140] Step 2.1: Obtain the event text dataset annotated with BIO from Step 1, and identify the trigger words and arguments in each event;
[0141] Step 2.2: Extract the dependencies between arguments from Step 2.1;
[0142] The specific process of step 2.2 is as follows:
[0143] Choose a dependency parsing tool to perform dependency parsing and obtain syntactic dependency information. For example, select the parsing tool Stanford Parser, then download the software Stanford CoreNLP and Java, install and start the Stanford CoreNLP server, submit the event text and send a request for dependency parsing. The Stanford CoreNLP server returns the parsing results in JSON format, which includes the syntactic dependency information of the event text. Each dependency relationship indicates the dependency of one dependent word on another subject word. For example, in the event "Strengthen the protection of track components during the construction of ballastless track bed", "strengthen" depends on "ballastless track bed", "during the construction process" depends on "ballastless track bed", "track components" depends on "protection", and "protection" depends on "strengthen".
[0144] Step 2.3: Construct a dependency graph based on the syntactic dependency information of the event text in Step 2.2, and train the generated dependency graph using a Relational Graph Attention Network (RGAT) to obtain node features. Edge features ;
[0145] The specific process of step 2.3 is as follows:
[0146] Step 2.3.1: Construct a dependency graph based on the event structure information and basic dependencies of arguments in Step 2.2. Each node in the dependency graph represents an argument, and each edge represents the dependency relationship between arguments.
[0147] Step 2.3.2: Construct node features and edge features in the dependency graph. Specifically, use the context window-based distributed word embedding method (Word2Vec) to encode each node and construct node features, represented as follows:
[0148] (3)
[0149] in, Represents a d-dimensional vector; yes The vector representation of ; i represents the node number;
[0150] Edge features are constructed based on the dependencies between nodes, which are represented as follows:
[0151] (4);
[0152] Where i represents the starting node of the dependency relationship; j represents the target node of the dependency relationship;
[0153] Step 2.4: Define the graph structure using the DGL graph network framework, construct the RGAT model, and input the node features obtained from training in Step 2.3. Sum of edge features The RGAT model aggregates features from neighboring nodes through a self-attention mechanism. These features contain dependency information that influences the target node within an event, capturing dependencies in the event and outputting enhanced local dependency features. The specific formula is as follows:
[0154] (5);
[0155] in, It is a node i , where j represents the set of neighboring nodes of node i; and W is a learnable linear transformation matrix. These are the self-attention weights, calculated using the following formula:
[0156] (6);
[0157] Where LeakReLU is the activation function; This represents a parameter vector for calculating attention weights; W is a linear transformation matrix. and These are the features of nodes i and j, respectively; and These are the edge features of node i, node j, and node k, respectively; || indicates concatenating the vectors.
[0158] Step 3: Enhance the semantic information of the event text dataset in Step 1, and then obtain the enhanced semantic features;
[0159] Step 3.1: Obtain the event text dataset labeled with BIO from Step 1. Enhance the semantic information of the events by supplementing each event with quantifiers and mining new trigger words.
[0160] The specific process of step 3.1 is as follows:
[0161] Step 3.1.1: Using the density-based clustering algorithm (DBSCAN), the correspondence between measurement terms and units of measurement in events is identified through cluster analysis, and a dictionary of measurement terms and units of measurement is constructed, as follows:
[0162] In step 1, measure terms and units of measurement are extracted from the BIO-annotated event text. The extracted measure terms and units of measurement are then represented using the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm. The TF-IDF formula is as follows:
[0163] (7);
[0164] Where TF(y) is the frequency of word y in the document; DF(y) represents the number of documents containing word y; and N is the total number of documents.
[0165] Then, the DBSCAN algorithm is used to cluster the feature vectors. Specifically, first, the distance from each feature vector to its K-nearest neighbor is calculated by plotting a K-distance graph, and these distances are sorted in ascending order. Then, the neighborhood parameter is selected. The inflection point of the corresponding distance curve is considered optimal. At the same time, set the minimum number of points minPts required to form a cluster. For example, set the minimum number of points minPts required to form a cluster to 4 to ensure a reasonable cluster density and reduce false positives of noise points. The number of points in the neighborhood of point p The details are as follows:
[0166] (8);
[0167] Where q is a point in the set, and it is a neighbor of point p;
[0168] if Then, p is marked as the core point, and all core points and their neighboring points are grouped into the same cluster, that is, semantically similar words are grouped into the same cluster, where semantically similar words include measurement terms and measurement units; after the clustering is completed, the correspondence between measurement terms and measurement units is identified through each cluster, and then a dictionary of measurement terms and measurement units is constructed.
[0169] For example, some dictionaries might include "meter" for the units of measurement "length," "height," and "distance," and "°C" for the unit of measurement "temperature." Furthermore, for events that only contain units of measurement but lack explicit terms, the corresponding terms can be added by combining the context and dictionaries of terms and units of measurement to more comprehensively express the quantitative information of the event. For example, in the event "For lines with a design speed below 120 km / h, when ballast can be laid manually with the assistance of small machinery to reduce the track height to approximately 50 mm below the rail surface, large track maintenance machinery should be used for track maintenance," the missing term should be "height." After adding it, the sentence can be revised to: "For lines with a design speed below 120 km / h, when ballast can be laid manually with the assistance of small machinery to reduce the track height to approximately 50 mm below the rail surface, large track maintenance machinery should be used for track maintenance."
[0170] Step 3.1.2: Use the Latent Dirichlet Algorithm (LDA) to mine new trigger words in the events. If the mined events contain more than one trigger word, then use the trigger word segmentation method in Step 1.5 to ensure that all events have only one trigger word.
[0171] The specific process of using the LDA algorithm to mine new trigger words in events is as follows:
[0172] The LDA algorithm is used to analyze the topics contained in each event text, mine the high-frequency words in each topic, calculate the weight of the high-frequency words and compare it with the set threshold. If the weight of the high-frequency word is greater than the threshold, the word is set as a potential trigger word. Otherwise, other high-frequency words are judged. Finally, trigger word segmentation is performed on topic texts with more than one trigger word to ensure that each topic text contains only one trigger word.
[0173] The likelihood function formula of LDA can discover hidden semantic structures and lexical distributions in text by maximizing the probability distribution between documents and topics. Furthermore, by identifying high-frequency words within a topic, it can provide potential trigger words for event extraction. The likelihood function formula of the LDA algorithm is as follows:
[0174] (9);
[0175] Where α is the topic distribution hyperparameter; β is the word distribution hyperparameter; and the event set is... Theme distribution and each topic k Word distribution in They are all generated from the Dirichlet distribution; It is the first i The first event j Tags for each word; It is the j-th word in the i-th document; It is the first i The number of words in a document; θ is the total number of events; i This is the topic distribution of the i-th event;
[0176] For example, in the sentence: "For lines with a design speed of 120km / h or less, when ballast can be laid manually with the assistance of small machinery to screed to a height of approximately 50mm below the rail surface, large track maintenance machinery shall be used for track screeding," the quantifier has already been added in step 3.1.1. Next, in step 3.1.2, a new trigger word, "for," is identified by mining new trigger words. After adding it, the event contains two trigger words: "for" and "to carry out." Therefore, step 1.4 is needed to divide it into multiple simple events: "For lines with a design speed of 120km / h or less, when ballast can be laid manually with the assistance of small machinery to screed to a height of approximately 50mm below the rail surface" and "When ballast can be laid manually with the assistance of small machinery to screed to a height of approximately 50mm below the rail surface, large track maintenance machinery shall be used for track screeding."
[0177] The weights of high-frequency words are calculated using the TF-IDF algorithm described in step 3.1.1 above. The specific method for setting the threshold is as follows:
[0178] Calculate all words in each topic ·TF-IDF value, according to • The distribution of TF-IDF values, sorting all words by their weights from smallest to largest, to find • The weight value corresponding to the 90th quantile in the TF-IDF value distribution is set as the threshold. The specific calculation formula is as follows:
[0179] (10);
[0180] in, This represents the probability that word y will be generated given topic k.
[0181] Step 3.2: Use the SBERT+BiLSTM model to encode the events whose semantic information was enhanced in Step 3.1 and extract the enhanced semantic features;
[0182] The specific process of step 3.2 is as follows:
[0183] The events in step 3.1 that enhance semantic information are transformed into contextual embedding representations using SBERT. Then BiLSTM processing is used. For context embedding of input sequences The details are as follows:
[0184] (11);
[0185] in, T Indicates the length of the event; It is the SBERT embedding representation vector of each word;
[0186] BiLSTM computes the hidden state using two LSTM units, forward and backward. The formulas for the forward and backward hidden states of BiLSTM dynamically model context dependencies, embedding the input context for further processing and extracting enhanced semantic features, as detailed below:
[0187] (12) (13);
[0188] Where t is the time step; and These are the t-th hidden states of the forward and backward LSTMs, respectively. and This represents the forward and backward propagation parts of the LSTM, where the input sequence is processed from beginning to end and from end to beginning according to time steps, respectively. It is the input embedding at time step t; and These are the hidden states of the previous time step and the next time step, respectively.
[0189] Then, the forward and backward hidden states are concatenated to obtain the enhanced semantic features. The details are as follows:
[0190] (14);
[0191] in, ;
[0192] Step 4: Fuse the enhanced local dependency features from Step 2 and the enhanced semantic features from Step 3 to generate a fused feature vector. By supplementing the measure words and mining new trigger words, the semantic information of the event is enhanced. At the same time, by constructing a dependency graph and the RGAT model, the local dependency features of the event are fully utilized. The effective fusion of the two fully utilizes all the information of the event and effectively improves the accuracy of event extraction.
[0193] The specific process of step 4 is as follows:
[0194] For the local dependency features in step 2 and semantic features in step 3 Perform a weighted average and define a learnable weight parameter. Its value range is [0, 1]. Then, the optimal weights, i.e., the fused features, are learned through the Adam optimization algorithm. It can be represented as:
[0195] (15).
[0196] Step 5: Input the fused feature vector from Step 4 into the CRF model for prediction, and evaluate the model performance using various evaluation metrics.
[0197] The specific process of step 5 is as follows:
[0198] Step 5.1: Use CRF as the prediction model and input the features fused in Step 4. Training is conducted to predict the annotation of each character;
[0199] Step 5.2: During the training process in Step 5.1, the CRF model uses the sequence cross-entropy loss function to optimize the weights so that the predicted labeled sequence matches the real labeled sequence.
[0200] The sequence cross-entropy loss function is used to measure the difference between the predicted value and the true label. The formula for the cross-entropy loss function is:
[0201] (16);
[0202] in, This represents the predicted category probability distribution; represents the real label; M represents the number of events.
[0203] For example: Regarding the event "When the track is locked, the difference between the highest and lowest actual locked track temperatures of a single track section within the same section shall not exceed 10℃", such as... Figure 4 The image shows the final output.
[0204] The specific implementation of the rail transit event extraction method that integrates semantic features and local dependency features of the present invention is as follows:
[0205] Example 1
[0206] A method for extracting rail transit events by integrating semantic features and local dependency features includes the following steps:
[0207] Step 1: Obtain the original design specification text and preprocess it to obtain the event text dataset;
[0208] Step 2: Enhance the local dependency information of the event text dataset in Step 1, and then obtain the enhanced local dependency features;
[0209] Step 3: Enhance the semantic information of the event text dataset in Step 1, and then obtain the enhanced semantic features;
[0210] Step 4: Fuse the enhanced local dependency features from Step 2 and the enhanced semantic features from Step 3 to generate a fused feature vector;
[0211] Step 5: Input the fused feature vector from Step 4 into the CRF model for prediction, and evaluate the model performance using various evaluation metrics.
[0212] Example 2
[0213] Based on the above embodiment 1, this embodiment discloses the specific process of step 1, which is as follows:
[0214] Step 1.1: Obtain the original design specification text; the data must conform to the railway track engineering construction quality acceptance standards.
[0215] Step 1.2: Perform data cleaning on the original design specification text from Step 1.1, and then filter the cleaned text.
[0216] The data cleaning methods in step 1.2 include:
[0217] Remove special characters and symbols that are not related to the theme of the original design specification text; delete redundant spaces and garbled characters in the original design specification text; identify and delete duplicate sentences, useless sentences and erroneous sentences in the original design specification text; replace English symbols in the original design specification text with Chinese symbols; and correct typos in the original design specification text.
[0218] The specific process of data filtering in step 1.2 is as follows:
[0219] After obtaining the original design specification text after data cleaning, the characters of the sentence corresponding to each period in the text are calculated, and sentences with more than 80 characters are deleted to obtain the filtered text.
[0220] Step 1.3: Obtain the text after data filtering in Step 1.2, and perform period segmentation according to each period in the text to obtain several sentences, which together form the event text dataset;
[0221] Step 1.4: Perform trigger word recognition on the event text dataset from Step 1.3 and obtain a list of trigger words;
[0222] The specific process of step 1.4 is as follows:
[0223] Step 1.4.1: Select words related to the field of rail transit technology to construct a trigger word dictionary;
[0224] Step 1.4.2: Use regular expressions to match words from the trigger word dictionary in Step 1.4.1 above as trigger words;
[0225] Step 1.4.3: Use a word segmentation tool to segment the event text dataset from Step 1.3, and use BERT to generate the context embedding representation of each word in the event. The specific formula is as follows:
[0226] (1);
[0227] in, Indicates the first... i One word; Indicator Contextual embedding representation;
[0228] Step 1.4.4: Combining the contextual embedding representation of each word in the event from step 1.4.3, the cosine similarity method is used to calculate the similarity between the contextual embedding representation of each word in the event and the embedding representation of each trigger word in the dictionary. If the similarity is higher than a predetermined threshold, it is marked as a potential trigger word; otherwise, it is marked as a non-trigger word. The specific formula for calculating the similarity is as follows:
[0229] (2);
[0230] in, and represents the context embedding representation of words in the event and the context embedding representation of words in the dictionary, respectively; || represents the Euclidean norm of the embedding representation, i.e., the length or modulus of the embedding representation;
[0231] Step 1.4.5: Use the CRF model to predict the events that have been judged by similarity in step 1.4.3. By parsing the label sequence generated by the CRF model, the final list of trigger words can be obtained.
[0232] Step 1.5: Combining the trigger word list from Step 1.4, segment each event into trigger words to ensure that each event has only one trigger word;
[0233] The specific process of step 1.5 is as follows:
[0234] Step 1.5.1: Count the number of trigger words for each event in Step 1.4;
[0235] Step 1.5.2: Determine whether the number of trigger words in each event exceeds 1. If the number of trigger words is only 1, mark the event as a simple event. If the number of trigger words is greater than 1, mark the event as a complex event.
[0236] Step 1.5.3: Combine Step 1.5.2 to identify the position of the trigger word in the complex event, then use the tree structure analysis method to identify the master-detail structure of the complex event, and use the syntactic analysis tool spaCy to segment the complex event into multiple separate events. Return to Step 1.5.2 to continue to judge each separate event until each event has only one trigger word, and then proceed to the next step.
[0237] Step 1.6: Perform BIO annotation on the events segmented by trigger words in Step 1.5 to obtain the BIO-annotated event text dataset;
[0238] The specific process of BIO annotation in step 1.6 is as follows:
[0239] Obtain the events segmented by trigger words in step 1.5, mark the starting position of each trigger word and argument in the event as BX, mark the subsequent position of each trigger word and argument as IX, and mark other words that do not belong to trigger words and arguments as O;
[0240] In the tagging of trigger words and arguments, if it is a trigger word, X is represented as V; if it is an argument, X represents the specific type of the argument. The specific types of arguments include: OBJ, ADJ, ATTR, and COND.
[0241] Example 3
[0242] Based on the above embodiment 2, this embodiment discloses the specific process of step 2, which is as follows:
[0243] Step 2.1: Obtain the event text dataset annotated with BIO from Step 1, and identify the trigger words and arguments in each event;
[0244] Step 2.2: Extract the dependencies between arguments from Step 2.1 using the Stanford Parser parsing tool;
[0245] The specific process of step 2.2 is as follows:
[0246] Download the Stanford CoreNLP software and Java, install and start the Stanford CoreNLP server, submit the event text and send a request, perform dependency parsing, and the Stanford CoreNLP server returns the parsing results in JSON format, which includes the syntactic dependency information of the event text;
[0247] Step 2.3: Construct a dependency graph based on the syntactic dependency information of the event text in Step 2.2, and train the generated dependency graph using RGAT to obtain node features. Edge features ;
[0248] The specific process of step 2.3 is as follows:
[0249] Step 2.3.1: Construct a dependency graph based on the event structure information and basic dependencies of arguments in Step 2.2. Each node in the dependency graph represents an argument, and each edge represents the dependency relationship between arguments.
[0250] Step 2.3.2: Construct the node features and edge features in the dependency graph. Specifically, use Word2Vec to encode each node to construct node features, represented as follows:
[0251] (3);
[0252] in, Represents a d-dimensional vector; It is a node The vector representation of ; i represents the node number;
[0253] Edge features are constructed based on the dependencies between nodes, which are represented as follows:
[0254] (4);
[0255] Where i represents the starting node of the dependency relationship; j represents the target node of the dependency relationship;
[0256] Step 2.4: Define the graph structure using the DGL graph network framework, construct the RGAT model, and input the node features obtained from training in Step 2.3. Sum of edge features The RGAT model aggregates features from neighboring nodes through a self-attention mechanism, captures dependencies in events, and outputs enhanced local dependency features. The specific formula is as follows:
[0257] (5);
[0258] in, It is a node i , where j represents the set of neighboring nodes of node i; and w is a learnable linear transformation matrix. These are the self-attention weights, calculated using the following formula:
[0259] (6);
[0260] Where LeakReLU is the activation function; This represents a parameter vector for calculating attention weights; W is a linear transformation matrix. and These are the features of nodes i and j, respectively; and These are the edge features of node i, node j, and node k, respectively; || indicates concatenating the vectors.
[0261] Example 4
[0262] Based on the above embodiment 3, this embodiment discloses the specific process of step 3, as follows:
[0263] Step 3.1: Obtain the event text dataset labeled with BIO from Step 1. Enhance the semantic information of the events by supplementing each event with quantifiers and mining new trigger words.
[0264] The specific process of step 3.1 is as follows:
[0265] Step 3.1.1: Use the DBSCAN clustering algorithm to identify the correspondence between measurement terms and units of measurement in the event through cluster analysis, and construct a dictionary of measurement terms and units of measurement, as follows:
[0266] In step 1, measure terms and units of measurement are extracted from the BIO-annotated event text. The TF-IDF algorithm is then used to perform feature representation on the extracted measure terms and units of measurement. The formula for TF-IDF is as follows:
[0267] (7);
[0268] in, y is the frequency of word y in the document; DF(y) represents the number of documents containing word y; N is the total number of documents;
[0269] Then, the DBSCAN algorithm is used to cluster the feature vectors. Specifically, first, the distance from each feature vector to its K-nearest neighbor is calculated by plotting a K-distance graph, and these distances are sorted in ascending order. Then, the neighborhood parameter is selected. The inflection point of the corresponding distance curve is considered optimal. Meanwhile, the minimum number of points minPts required to form a cluster is set to 4 to ensure a reasonable cluster density and reduce false positives for noise points at point p. Points within the neighborhood The details are as follows:
[0270] (8);
[0271] Where q is a point in the set, and it is a neighbor of point p;
[0272] if If p is marked as the core point, all core points and their neighboring points are grouped into the same cluster, that is, semantically similar words are grouped into the same cluster. Semantically similar words include measurement terms and measurement units. After the clustering is completed, the correspondence between measurement terms and measurement units can be identified through each cluster, and then a dictionary of measurement terms and measurement units can be constructed.
[0273] Step 3.1.2: Use the LDA algorithm to mine new trigger words in the events. If the mined events contain more than one trigger word, then use the trigger word segmentation method in step 1.5 to ensure that all events have only one trigger word.
[0274] The specific process of using the LDA algorithm to mine new trigger words in events is as follows:
[0275] The LDA algorithm is used to analyze the topics contained in each event text, mine the high-frequency words in each topic, calculate the weight of the high-frequency words and compare it with the set threshold. If the weight of the high-frequency word is greater than the threshold, the word is set as a potential trigger word. Otherwise, other high-frequency words are judged. Finally, trigger word segmentation is performed on topic texts with more than one trigger word to ensure that each topic text contains only one trigger word.
[0276] The likelihood function formula for the LDA algorithm is as follows:
[0277] (9);
[0278] Where α is the topic distribution hyperparameter; β is the word distribution hyperparameter; and the event set is... Theme distribution and each topic k Word distribution in They are all generated from the Dirichlet distribution; It is the first i The first event j Tags for each word; It is the first i The first document in the documentj One word; It is the first i The number of words in a document; θ is the total number of events; i This is the topic distribution of the i-th event;
[0279] The weights of high-frequency words are calculated using the TF-IDF algorithm described in step 3.1.1 above. The specific method for setting the threshold is as follows:
[0280] Calculate all words in each topic ·TF-IDF value, according to • The distribution of TF-IDF values, sorting all words by their weights from smallest to largest, to find • The weight value corresponding to the 90th percentile in the TF-IDF value distribution is set as the threshold. The specific calculation formula is as follows:
[0281] (10);
[0282] in, This represents the probability that word y will be generated given topic k.
[0283] Step 3.2: Use the SBERT+BiLSTM model to encode the events whose semantic information was enhanced in Step 3.1 and extract the enhanced semantic features;
[0284] The specific process of step 3.2 is as follows:
[0285] The events in step 3.1 that enhance semantic information are transformed into contextual embedding representations using SBERT. Then BiLSTM processing is used. For context embedding of input sequences The details are as follows:
[0286] (11);
[0287] in, T Indicates the length of the event; It is the SBERT embedding representation vector of each word. Represents a d-dimensional vector;
[0288] BiLSTM computes the hidden state using two LSTM units, forward and backward. The forward and backward hidden state formulas of BiLSTM dynamically model context dependencies, embedding the input context for further processing and extracting enhanced semantic features. These features can better capture the contextual information of events, providing higher-quality semantic input for subsequent event extraction, as detailed below:
[0289] (12) (13);
[0290] Where t is the time step; and These are the t-th hidden states of the forward and backward LSTMs, respectively. and This represents the forward and backward propagation parts of the LSTM, where the input sequence is processed from beginning to end and from end to beginning according to time steps, respectively. It is the input embedding at time step t; and These are the hidden states of the previous time step and the next time step, respectively.
[0291] Then, the forward and backward hidden states are concatenated to obtain the enhanced semantic features. The details are as follows:
[0292] (14);
[0293] in, , This represents a 2d-dimensional vector.
[0294] Example 5
[0295] Based on the above embodiment 4, this embodiment also discloses the specific process of step 4, which is as follows:
[0296] For the local dependency features in step 2 and semantic features in step 3 Perform a weighted average and define a learnable weight parameter. Its value range is [0, 1]. Then, the optimal weights, i.e., the fused features, are learned through the Adam optimization algorithm. It can be represented as:
[0297] (15).
[0298] Example 6
[0299] Based on the above embodiment 5, this embodiment also discloses the specific process of step 5, which is as follows:
[0300] The specific process of step 5 is as follows:
[0301] Step 5.1: Use CRF as the prediction model and input the features fused in Step 4. Training is conducted to predict the annotation of each character;
[0302] Step 5.2: During the training process in Step 5.1, the CRF model optimizes the weights using the sequence cross-entropy loss function, ensuring that the predicted labeled sequence matches the actual labeled sequence.
[0303] The sequence cross-entropy loss function is used to measure the difference between the predicted value and the true label. The formula for the cross-entropy loss function is:
[0304] (16);
[0305] in, This represents the predicted category probability distribution; represents the real label; M represents the number of events.
Claims
1. A method for extracting rail transit events by integrating semantic features and local dependency features, characterized in that, Includes the following steps: Step 1: Obtain the original design specification text and preprocess it to obtain the event text dataset; Step 2: Enhance the local dependency information of the event text dataset from Step 1, and then obtain the enhanced local dependency features; the specific process of Step 2 is as follows: Step 2.1: Obtain the event text dataset annotated with BIO from Step 1, and identify the trigger words and arguments in each event; Step 2.2: Extract the dependencies between arguments from Step 2.1; Step 2.3: Construct a dependency graph based on the syntactic dependency information of the event text in Step 2.2, and train the generated dependency graph using RGAT to obtain node features. Edge features ; Step 2.4: Define the graph structure using the DGL graph network framework, construct the RGAT model, and input the node features obtained in step 2.
3. Sum of edge features The RGAT model aggregates features from neighboring nodes through a self-attention mechanism, captures dependencies in events, and outputs enhanced local dependency features. ; Step 3: Enhance the semantic information of the event text dataset from Step 1, and then obtain the enhanced semantic features; the specific process of Step 3 is as follows: Step 3.1: Obtain the event text dataset labeled with BIO from Step 1. Enhance the semantic information of the events by supplementing each event with quantifiers and mining new trigger words. Step 3.2: Use the SBERT+BiLSTM model to encode the events whose semantic information was enhanced in Step 3.1 and extract the enhanced semantic features; Step 4: Fuse the enhanced local dependency features from Step 2 and the enhanced semantic features from Step 3 to generate a fused feature vector; the specific process of Step 4 is as follows: For the local dependency features in step 2 and the enhanced semantic features in step 3 Perform a weighted average and define a learnable weight parameter. Its value range is [0, 1]. Then, the optimal weights, i.e., the fused features, are learned through the Adam optimization algorithm. It can be represented as: (15); Step 5: Input the fused feature vector from Step 4 into the CRF model for prediction, and evaluate the model performance using various evaluation metrics; the specific process of Step 5 is as follows: Step 5.1: Use CRF as the prediction model and input the features fused in Step 4. Training is conducted to predict the annotation of each character; Step 5.2: During the training process in Step 5.1, the CRF model uses the sequence cross-entropy loss function to optimize the weights so that the predicted labeled sequence matches the real labeled sequence. The sequence cross-entropy loss function is used to measure the difference between the predicted value and the true label. The formula for the cross-entropy loss function is: (16) in, This represents the predicted category probability distribution; represents the real label; M represents the number of events.
2. The rail transit event extraction method integrating semantic features and local dependency features according to claim 1, characterized in that, The specific process of step 1 is as follows: Step 1.1: Obtain the original design specification text; the data must conform to the railway track engineering construction quality acceptance standards. Step 1.2: Perform data cleaning on the original design specification text from Step 1.1, and then filter the cleaned text. The data cleaning methods described in step 1.2 include: Remove special characters and symbols that are not related to the theme of the original design specification text; delete redundant spaces and garbled characters in the original design specification text; identify and delete duplicate sentences, useless sentences and erroneous sentences in the original design specification text; replace English symbols in the original design specification text with Chinese symbols; and correct typos in the original design specification text. The specific process of data filtering described in step 1.2 is as follows: After obtaining the original design specification text after data cleaning, the characters of the sentence corresponding to each period in the text are calculated, and sentences with more than 80 characters are deleted to obtain the filtered text. Step 1.3: Obtain the text after data filtering in Step 1.2, and perform period segmentation according to each period in the text to obtain several sentences, which together form the event text dataset; Step 1.4: Perform trigger word recognition on the event text dataset from Step 1.3 and obtain a list of trigger words; Step 1.5: Combining the trigger word list from Step 1.4, segment each event into trigger words to ensure that each event has only one trigger word; Step 1.6: Perform BIO annotation on the events segmented by trigger words in Step 1.5 to obtain the BIO-annotated event text dataset; The specific process of BIO annotation described in step 1.6 is as follows: Obtain the events segmented by trigger words in step 1.5, mark the starting position of each trigger word and argument in the event as BX, mark the subsequent position of each trigger word and argument as IX, and mark other words that do not belong to trigger words and arguments as O; In the tagging of trigger words and arguments, if it is a trigger word, X is represented as V; if it is an argument, X represents the specific type of the argument. The specific types of arguments include: OBJ, ADJ, ATTR, and COND.
3. The rail transit event extraction method integrating semantic features and local dependency features according to claim 2, characterized in that, The specific process of step 1.4 is as follows: Step 1.4.1: Select words related to the field of rail transit technology to construct a trigger word dictionary; Step 1.4.2: Use regular expressions to match words from the trigger word dictionary in Step 1.4.1 above as trigger words; Step 1.4.3: Use a word segmentation tool to segment the event text dataset from Step 1.3, and use the pre-trained language model BERT to generate the context embedding representation of each word in the event. The specific formula is as follows: (1) in, Indicates the first... i One word; Indicator Contextual embedding representation; Step 1.4.4: Combining the contextual embedding representation of each word in the event from step 1.4.3, the cosine similarity method is used to calculate the similarity between the contextual embedding representation of each word in the event and the embedding representation of each trigger word in the dictionary. If the similarity is higher than a predetermined threshold, it is marked as a potential trigger word; otherwise, it is marked as a non-trigger word. The specific formula for calculating the similarity is as follows: (2) in, and represents the context embedding representation of words in the event and the context embedding representation of words in the dictionary, respectively; || represents the Euclidean norm of the embedding representation, i.e., the length or modulus of the embedding representation; Step 1.4.5: Use the CRF model to predict the events that have been judged by similarity in step 1.4.
3. By parsing the label sequence generated by the CRF model, the final list of trigger words can be obtained.
4. The rail transit event extraction method integrating semantic features and local dependency features according to claim 2, characterized in that, The specific process of step 1.5 is as follows: Step 1.5.1: Count the number of trigger words for each event in Step 1.4; Step 1.5.2: Determine whether the number of trigger words in each event exceeds 1. If the number of trigger words is only 1, mark the event as a simple event. If the number of trigger words is greater than 1, mark the event as a complex event. Step 1.5.3: Combined with Step 1.5.2, identify the position of the trigger word in the complex event, then use the tree structure analysis method to identify the master-detail structure of the complex event, and use the syntactic analysis tool spaCy to segment the complex event into multiple separate events. Return to Step 1.5.2 to continue to judge each separate event until each event has only one trigger word, and then proceed to the next step.
5. The rail transit event extraction method integrating semantic features and local dependency features according to claim 1, characterized in that, The specific process of step 2.2 is as follows: Select a dependency parsing tool to perform dependency parsing and obtain the syntactic dependency information of the event text; The specific process of step 2.3 is as follows: Step 2.3.1: Construct a dependency graph based on the event structure information and basic dependencies of arguments in Step 2.
2. Each node in the dependency graph represents an argument, and each edge represents the dependency relationship between arguments. Step 2.3.2: Construct the node features and edge features in the dependency graph. Specifically, use Word2Vec to encode each node to construct node features, represented as follows: (3) in; Represents a d-dimensional vector; It is a node The vector representation of ; i represents the node number; The edge features are constructed based on the dependencies between nodes, and the dependencies are represented as follows: (4) Where i represents the starting node of the dependency relationship; j represents the target node of the dependency relationship; The specific formula for step 2.4 is as follows: (5) in, It is a node i The set of neighboring nodes of node i; j represents the neighboring nodes of node i; w is a learnable linear transformation matrix; These are the self-attention weights, calculated using the following formula: (6) Where LeakReLU is the activation function; This represents a parameter vector for calculating attention weights; W is a linear transformation matrix. and These are the features of nodes i and j, respectively; and These are the edge features of node i, node j, and node k, respectively; || indicates concatenating the vectors.
6. The rail transit event extraction method integrating semantic features and local dependency features according to claim 1, characterized in that, The specific process of step 3.1 is as follows: Step 3.1.1: Use the DBSCAN clustering algorithm to identify the correspondence between measurement terms and units of measurement in the event through cluster analysis, and construct a dictionary of measurement terms and units of measurement, as follows: In step 1, measure terms and units of measurement are extracted from the BIO-annotated event text. The TF-IDF algorithm is then used to perform feature representation on the extracted measure terms and units of measurement. The formula for TF-IDF is as follows: (7) in, y is the frequency of word y in the document; DF(y) represents the number of documents containing word y, and N is the total number of documents; Then, the DBSCAN algorithm is used to cluster the feature vectors. Specifically, first, the distance from each feature vector to its K-nearest neighbor is calculated by plotting a K-distance graph, and these distances are sorted in ascending order. Then, the neighborhood parameter is selected. The inflection point of the corresponding distance curve is considered optimal. At the same time, set the minimum number of points minPts required to form a cluster, at point p. Points within the neighborhood The details are as follows: (8) Where q is a point in the set, and it is a neighbor of point p; if If p is marked as the core point, all core points and their neighboring points are grouped into the same cluster, that is, semantically similar words are grouped into the same cluster. Semantically similar words include measurement terms and measurement units. After the clustering is completed, the correspondence between measurement terms and measurement units is identified through each cluster, and then a dictionary of measurement terms and measurement units is constructed. Step 3.1.2: Use the LDA algorithm to mine new trigger words in the event. If the mined event contains more than one trigger word, then use the trigger word segmentation method in step 1.5 to ensure that each event has only one trigger word. The specific process of using the LDA algorithm to mine new trigger words in events is as follows: The LDA algorithm is used to analyze the topics contained in each event text, mine the high-frequency words in each topic, calculate the weight of the high-frequency words and compare it with the set threshold. If the weight of the high-frequency word is greater than the threshold, the word is set as a potential trigger word. Otherwise, other high-frequency words are judged. Finally, trigger word segmentation is performed on topic texts with more than one trigger word to ensure that each topic text contains only one trigger word. The likelihood function formula for the LDA algorithm is as follows: (9) Where α is the topic distribution hyperparameter; β is the word distribution hyperparameter; and the event set... Theme distribution and each topic k Word distribution in They are all generated from the Dirichlet distribution; It is the first i The first event j Tags for each word; It is the first i The first document in the document j One word; It is the first i The number of words in a document; θ is the total number of events; i This is the topic distribution of the i-th event; The weights of the high-frequency words are calculated using the TF-IDF algorithm described in step 3.1.1 above. The specific method for setting the threshold is as follows: Calculate all words in each topic ·TF-IDF value, according to • The distribution of TF-IDF values, sorting all words by their weights from smallest to largest, to find • The weight value corresponding to the 90th quantile in the TF-IDF value distribution is set as the threshold. The specific calculation formula is as follows: (10) in, This represents the probability that word y will be generated given topic k; The specific process of step 3.2 is as follows: The events in step 3.1 that enhance semantic information are transformed into contextual embedding representations using SBERT. Then BiLSTM processing is used. For context embedding of input sequences The details are as follows: (11) in, T Indicates the length of the event; It is the SBERT embedding vector of each word; Represents a d-dimensional vector; BiLSTM computes the hidden state using two LSTM units, forward and backward. The formulas for the forward and backward hidden states of BiLSTM dynamically model context dependencies, embedding the input context for further processing and extracting enhanced semantic features, as detailed below: (12) (13) Where t is the time step; and These are the t-th hidden states of the forward and backward LSTMs, respectively. and This represents the forward and backward propagation parts of the LSTM, where the input sequence is processed from beginning to end and from end to beginning according to time steps, respectively. It is the input embedding at time step t; and These are the hidden states of the previous time step and the next time step, respectively; Then, the forward and backward hidden states are concatenated to obtain the enhanced semantic features. The details are as follows: (14) in, , This represents a 2d-dimensional vector.