Marine disaster entity identification method and equipment based on domain knowledge enhancement and boundary perception

By constructing a dictionary and category prototype matrix for the marine disaster domain, and combining multi-head attention and boundary detectors, the semantic confusion and boundary ambiguity problems of general deep learning models in the marine disaster domain are solved, achieving more accurate and complete entity recognition and improving the model's generalization ability in low-resource scenarios.

CN121920363APending Publication Date: 2026-04-24JIANGSU OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU OCEAN UNIV
Filing Date
2026-01-12
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing general-purpose deep learning models lack the use of domain knowledge in the field of marine disasters, resulting in semantic confusion, blurred entity boundaries, and poor generalization ability in low-resource scenarios, making it difficult to accurately identify marine disaster entities.

Method used

By constructing a domain dictionary and category prototype matrix for marine disasters, combining multi-head attention and gating mechanisms to enhance domain features, employing a boundary detector to explicitly predict entity boundaries, and utilizing an adaptive CRF decoding strategy to correct sequence labeling paths, we achieve flexible injection of domain knowledge and explicit boundary awareness.

Benefits of technology

It improves the accuracy and completeness of marine disaster entity identification, significantly enhances the ability to identify homonyms and low-frequency entities, reduces entity boundary drift and truncation, and enhances the model's generalization ability in low-resource scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920363A_ABST
    Figure CN121920363A_ABST
Patent Text Reader

Abstract

The invention discloses a marine disaster entity identification method and equipment based on domain knowledge enhancement and boundary perception. The method comprises the following steps: acquiring a marine disaster domain dictionary and a category prototype matrix of each entity category in the dictionary; calculating a semantic vector of the to-be-recognized text, and constructing a domain feature based on an entity category to which each character in the text belongs; calculating a knowledge enhancement vector based on the semantic vector and the domain feature, fusing the semantic vector and the knowledge enhancement vector to obtain a first fusion feature, and inputting the first fusion feature into a bidirectional long-short term memory network layer to obtain a hidden state feature; calculating to obtain a prototype enhancement vector based on the hidden state feature and the category prototype matrix, and fusing the prototype enhancement vector with the hidden state feature to obtain a second fusion feature; and predicting an entity boundary according to the second fusion feature, correcting an initial transmission score of the CRF layer based on the entity boundary, and calculating an optimal path based on the corrected transmission score to obtain a final entity label. The method is higher in recognition accuracy and integrity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and device for identifying marine disaster entities based on domain knowledge enhancement and boundary awareness. Background Technology

[0002] Named entity recognition (NER) is a fundamental task in marine disaster information processing. Current main approaches include rule-based and dictionary-based methods and general-purpose deep learning models. Rule-based and dictionary-based methods are older approaches, often utilizing manually constructed disaster keyword dictionaries and regular expressions for matching and extraction. General-purpose deep learning models have become the mainstream approach in recent years, primarily employing architectures such as BERT-BiLSTM-CRF. For example, Wu et al. applied the general information extraction framework UIE to earthquake disaster texts; Wilkho et al. constructed the FF-NER corpus and used the RoBERTa-CRF model to identify flood disaster entities. These methods typically utilize pre-trained language models (such as BERT) to obtain character vectors, model the context using BiLSTM, and finally decode using CRF.

[0003] However, existing general-purpose deep learning models have the following significant drawbacks when directly applied to the field of marine disasters:

[0004] 1. Insufficient utilization of domain knowledge (semantic confusion): Existing models mostly rely on the fusion of character and lexical information at the input layer, lacking in-depth utilization of domain knowledge. Marine disaster texts contain highly specialized terminology (such as "storm surge" and "temperate cyclone"), and there are many homonyms (such as "23" which may refer to a time or a typhoon number), which general models find difficult to distinguish effectively, leading to semantic confusion.

[0005] 2. Blurred entity boundaries (entity mismatch): In marine disaster texts, entities are often nested in a complex manner and have variable lengths (such as "230113 cold air wave"). Due to the lack of explicit modeling of entity boundaries, the model is prone to problems such as overly long prediction spans or truncation, resulting in incomplete entity recognition.

[0006] 3. Poor generalization ability in low-resource scenarios: Marine disaster annotation data is scarce and the entity types are unevenly distributed (long-tailed distribution). Existing models perform poorly on low-frequency entities that lack sample support. Summary of the Invention

[0007] To address the problems existing in the prior art, the purpose of this invention is to provide a method and device for identifying marine disaster entities based on domain knowledge enhancement and boundary awareness, which provides more accurate and complete identification results.

[0008] To achieve the above-mentioned objectives, the present invention provides the following technical solution:

[0009] A method for identifying marine disaster entities based on domain knowledge enhancement and boundary awareness includes the following steps:

[0010] (1) Obtain the marine disaster domain dictionary and the category prototype matrix of each entity category in the dictionary;

[0011] (2) Calculate the semantic vector of each character in the text to be identified, and construct a domain feature based on the entity category to which each character belongs in the dictionary. The domain feature is a matrix obtained by encoding the entity category to which the character belongs.

[0012] (3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fusion feature of each character.

[0013] (4) Input the first fusion feature into the trained bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information;

[0014] (5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature.

[0015] (6) Based on the second fusion feature, predict the entity boundary using the trained boundary detector;

[0016] (7) Transform the entity boundary into a structured bias term through linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final entity label.

[0017] Furthermore, step (1) specifically includes:

[0018] (1.1) Clean the collected marine disaster bulletin text and label each term with its corresponding entity category;

[0019] (1.2) Construct a dictionary for the field of marine disasters based on the labeled tags;

[0020] (1.3) Calculate the semantic vector of each term in each entity category in the dictionary in advance using the BERT pre-trained model;

[0021] (1.4) For each entity category, calculate the mean of the semantic vectors of all its terms and obtain the category prototype matrix of each entity category by linear transformation.

[0022] Furthermore, step (2) specifically includes:

[0023] (2.1) The semantic vector of each character in the text to be recognized is calculated using the BERT pre-trained model;

[0024] (2.2) Match each character in the text to be identified with the terms in the dictionary to find the entity category to which each character belongs;

[0025] (2.3) Encode whether a character has an entity category and the entity category to which it belongs to obtain the domain features of each character.

[0026] Furthermore, step (3) specifically includes:

[0027] (3.1) Map the domain features and semantic vectors to the same dimension based on the pre-trained projection matrix;

[0028] (3.2) Using the mapped semantic vector as the query vector and the mapped domain features as the key vector and value vector, a multi-head attention mechanism is used to calculate the knowledge enhancement vector;

[0029] (3.3) Based on the pre-trained gating parameters, a gating mechanism is used to calculate the fusion coefficient of the semantic vector and the knowledge enhancement vector;

[0030] (3.4) Based on the fusion coefficient, the semantic vector and the knowledge enhancement vector are fused to obtain the first fusion feature of each character.

[0031] Furthermore, step (5) specifically includes:

[0032] (5.1) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, a multi-head attention mechanism is used to calculate the prototype enhancement vector;

[0033] (5.2) Based on the pre-trained scalar gating parameters, the scalar weights of the prototype enhancement vector and the hidden state features are calculated using the scalar gating mechanism;

[0034] (5.3) Based on the scalar weights, the prototype enhancement vector is fused with the latent state features to obtain the second fused feature.

[0035] Furthermore, step (7) specifically includes:

[0036] (7.1) Based on the pre-trained mapping parameters, linear mapping is used to transform the entity boundary into a structured bias term;

[0037] (7.2) Input the entity boundary into the CRF layer to obtain the initial emission score;

[0038] (7.3) The structured bias term is superimposed on the initial emission score of the CRF layer to obtain the corrected emission score;

[0039] (7.4) The optimal path is calculated based on the corrected emission fraction using the Viterbi algorithm to obtain the final entity label.

[0040] Furthermore, a network training step is included before step (1), which specifically includes:

[0041] (0-1) Based on the collected marine disaster-related texts, construct a marine disaster domain dictionary and a category prototype matrix for each entity category in the dictionary;

[0042] (0-2) Calculate the semantic vector of each character in the training sample set, and construct the domain feature based on the entity category to which each character belongs in the dictionary. The domain feature is a matrix obtained by encoding the entity category to which the character belongs.

[0043] (0-3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fused feature of each character.

[0044] (0-4) Input the first fusion feature into the bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information;

[0045] (0-5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature.

[0046] (0-6) Based on the second fusion feature, predict the entity boundary and entity label distribution using the boundary detector;

[0047] (0-7) Transform the entity boundary into a structured bias term through a linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final predicted entity label.

[0048] (0-9) Based on the predicted entity boundary, entity label distribution prediction, entity label and real label, calculate the total loss, update each network parameter according to the total loss, and return to execute step (0-2) until the preset number of iterations is reached to complete the training of each network parameter.

[0049] Furthermore, the total loss is a weighted sum of the boundary detection loss calculated from the loss of predicting entity boundaries and entity label distribution, and the CRF loss calculated based on entity labels and real labels.

[0050] A computer program product includes a computer program that, when executed by a processor, implements the above-described method.

[0051] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.

[0052] Compared with existing technologies, the advantages of this invention are as follows: Addressing the characteristics of terminology polysemy and high specialization, this invention proposes a soft dictionary attention mechanism, abandoning the traditional direct dictionary matching method and achieving accurate disambiguation of homonyms through flexible injection of domain knowledge. To overcome the limitations of data scarcity and long-tail distribution, this invention utilizes an entity-aware attention mechanism to construct semantic prototypes, enhancing the generalization representation ability of low-frequency entities based on semantic similarity. Furthermore, addressing the boundary drift and truncation phenomena of complex entities, this invention employs a boundary-aware combined with an adaptive decoding strategy, explicitly predicting the start and end positions of entities and transforming them into strong constraint biases in the decoding process, dynamically correcting the sequence labeling path, thereby significantly improving the completeness and accuracy of disaster element extraction. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating the marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness provided in this embodiment of the invention.

[0054] Figure 2 This is a structural diagram of the marine disaster entity recognition model based on domain knowledge enhancement and boundary awareness provided in this embodiment of the invention;

[0055] Figure 3 It refers to the changes in F1 scores during the training of different models;

[0056] Figure 4 This is a structural diagram of the computer device provided in an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0058] Example 1

[0059] This invention provides a method for identifying marine disaster entities based on domain knowledge enhancement and boundary awareness, such as... Figure 1 and Figure 2 As shown, it includes the following steps:

[0060] (1) Obtain the marine disaster domain dictionary and the category prototype matrix of each entity category in the dictionary.

[0061] Step (1) specifically includes:

[0062] (1.1) The collected marine disaster bulletin texts are cleaned, and each term is labeled with its corresponding entity category; the labeled tag set contains Category labels in a specific format;

[0063] (1.2) Based on the labeled tags, construct a dictionary for the field of marine disasters. The dictionary contains a set of standard terms for nine entity categories, including disaster type, disaster-causing factors, and disaster-affected areas.

[0064] (1.3) Calculate the semantic vector of each term in each entity category in the dictionary in advance using the BERT pre-trained model;

[0065] (1.4) For each entity category, calculate the mean of the semantic vectors of all its terms, and obtain the category prototype matrix of each entity category through a linear transformation;

[0066]

[0067] in, The category prototype matrix represents the category of the k-th entity. Stacking the prototype matrices of each category yields the prototype matrix. , for Network length.

[0068] (2) Calculate the semantic vector of each character in the text to be identified, and construct domain features based on the entity category to which each character belongs in the dictionary.

[0069] The domain features are matrices obtained by encoding the entity category to which a character belongs. Specifically, they include:

[0070] (2.1) The semantic vector of each character in the text to be recognized is calculated using the BERT pre-trained model. , For the hidden layer dimension.

[0071] (2.2) Match each character in the text to be identified with the terms in the dictionary to find the entity category to which each character belongs.

[0072] (2.3) Encode whether a character has an entity category and the entity category to which it belongs to obtain the domain features of each character.

[0073] Specifically, domain characteristics The first bit represents whether an entity category identifier has been found for the current character; it is 1 if found and 0 otherwise. The next K bits are the one-hot encoding of the entity category, with the bit containing the character's entity category set to 1 and the rest to 0. The domain features of all characters form a domain feature matrix. N represents the number of characters in the text to be recognized.

[0074] (3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fused feature of each character.

[0075] This step specifically includes:

[0076] (3.1) Map the domain features and semantic vectors to the same dimension based on the pre-trained projection matrix; the specific formula is as follows:

[0077]

[0078]

[0079] In the formula, The mapped semantic vector, and For the pre-trained projection matrix, These are the mapped domain features.

[0080] (3.2) Using the mapped semantic vector as the query vector and the mapped domain features as the key vector and value vector, a multi-head attention mechanism is used to calculate the knowledge enhancement vector. .

[0081]

[0082] MHA() is a multi-head attention function.

[0083] (3.3) Based on the pre-trained gating parameters, a gating mechanism is used to calculate the fusion coefficient of the semantic vector and the knowledge enhancement vector. :

[0084]

[0085] in, This indicates a splicing operation. It is the Sigmoid activation function. The fusion coefficient is... These are the gating parameters.

[0086] (3.4) Based on the fusion coefficient, the semantic vector and the knowledge enhancement vector are fused to obtain the first fusion feature of each character. :

[0087]

[0088] in, This represents the Hadamard product.

[0089] Steps (2) and (3) abandon the traditional direct dictionary matching method and adopt the soft dictionary attention mechanism (SoftGazetteer Attention, SGA) to achieve flexible injection of domain prior knowledge and achieve accurate disambiguation of homonyms.

[0090] (4) Input the first fusion feature into the trained bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information.

[0091] Specifically, input the first fused feature sequence In BiLSTM, the sequence is traversed both forward and backward to capture long-range dependencies in the text, outputting a hidden state feature sequence containing rich contextual information. .

[0092] (5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature.

[0093] This step specifically includes:

[0094] (5.1) Features of hidden states For the query vector, use the category prototype matrix Given key and value vectors, a multi-head attention mechanism is used to compute the prototype enhancement vector; where the first... The output of each attention head The calculation formula is:

[0095]

[0096] in, , , The attention parameters are used. The prototype enhancement vector is obtained by concatenating the multi-head outputs and linearly mapping them. This process aligns the semantics of the current character with the global category prototype.

[0097] (5.2) Based on the pre-trained scalar gating parameters, the scalar weights of the prototype augmentation vector and the hidden state features are calculated using a scalar gating mechanism. :

[0098]

[0099] These are scalar gated parameters;

[0100] (5.3) Based on the scalar weights, the prototype enhancement vector and the latent state features are fused to obtain the second fused feature. :

[0101]

[0102] in This ensures that the model automatically suppresses prototype noise in non-physical regions.

[0103] Step (5) introduces Entity-aware Attention (EAA) based on category prototypes, which leverages the semantic similarity enhancement model's ability to generalize representations of low-frequency entities, thus achieving effective completion of low-frequency entities.

[0104] (6) Based on the second fusion feature, predict the entity boundary using the trained boundary detector.

[0105] The boundary detector is specifically a lightweight feedforward neural network that can predict three signals in parallel: the probability of the entity's initial position. Entity end position probability and BIO entity tag distribution The entity boundary includes the probability of the entity's initial position. Entity end position probability .

[0106] (7) Transform the entity boundary into a structured bias term through linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final entity label.

[0107] This step specifically includes:

[0108] (7.1) Based on the pre-trained mapping parameters A linear mapping is used to transform entity boundaries into structured bias terms. ; The original logits features of the entity boundaries output by the boundary detector;

[0109] (7.2) Input the physical boundary into the CRF layer to obtain the initial emission score. ;

[0110] (7.3) Structured bias terms Initial transmit fraction superimposed on the CRF layer The corrected emission score is obtained above. ;

[0111] (7.4) The optimal path is calculated based on the corrected emission fraction using the Viterbi algorithm to obtain the final entity label.

[0112] Specifically, by maximizing the conditional probability Find the optimal path :

[0113]

[0114] in, Represents the set of all possible label sequences for the input sequence. Indicates from the first A label of 1 character Transfer to the A label of 1 character Label transfer score, Indicates the first One character was predicted as the label. The corrected label classification score.

[0115] This step addresses the boundary drift and truncation phenomena of complex entities by employing a boundary-aware, adaptive decoding strategy. It explicitly predicts the start and end positions of entities and transforms them into strong constraint biases in the decoding process, dynamically correcting the sequence labeling path, thereby significantly improving the completeness and accuracy of disaster element extraction.

[0116] This step is based on the Adaptive Conditional Random Field (CRF) for decoding output, which transforms the boundary signal into a strongly constrained bias injection decoding process, thereby achieving pixel-level correction of the entity boundary.

[0117] In addition, a network training step is included before step (1), which specifically includes:

[0118] (0-1) Based on the collected marine disaster-related texts, construct a marine disaster domain dictionary and a category prototype matrix for each entity category in the dictionary;

[0119] (0-2) Calculate the semantic vector of each character in the training sample set, and construct the domain feature based on the entity category to which each character belongs in the dictionary. The domain feature is a matrix obtained by encoding the entity category to which the character belongs.

[0120] (0-3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fused feature of each character.

[0121] (0-4) Input the first fusion feature into the bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information;

[0122] (0-5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature.

[0123] (0-6) Based on the second fusion feature, predict the entity boundary and entity label distribution using the boundary detector;

[0124] (0-7) Transform the entity boundary into a structured bias term through a linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final predicted entity label.

[0125] (0-9) Based on the predicted entity boundary, entity label distribution prediction, entity label and real label, calculate the total loss, update each network parameter according to the total loss, and return to execute step (0-2) until the preset number of iterations is reached to complete the training of each network parameter.

[0126] Of which, total loss Boundary detection loss is calculated to predict the loss of entity boundaries and entity label distribution. The CRF loss calculated based on entity labels and real labels. The weighted sum is as follows:

[0127]

[0128]

[0129]

[0130] Network parameters Parameters including BERT, BiLSTM, SGA, EAA, and CRF layers.

[0131] To verify the effectiveness of the "Marine Disaster Entity Recognition Method Integrating Domain Knowledge and Boundary Awareness" proposed in this invention in practical applications, this embodiment conducted a complete model construction, training, and testing based on real marine disaster bulletin data, and compared and verified it with existing mainstream technologies.

[0132] 1. Dataset

[0133] This embodiment collects 79 marine disaster bulletins published between 2020 and 2023 (covering national-level bulletins and coastal provinces such as Fujian and Guangdong). The text is extracted using optical character recognition (OCR) technology and annotated according to the domain ontology constructed in this invention.

[0134] Dataset size: The final corpus consists of 10,023 entities and 151,960 characters, as shown in Table 1.

[0135] Data partitioning: The dataset was randomly divided into a training set (2,964 sentences), a validation set (1,197 sentences), and a test set (755 sentences) in a ratio of 7:2:1.

[0136] Entity distribution: It covers nine major categories of entities, including disaster type, disaster-causing factors, and disaster impact. Among them, the category of "disaster impact" is a typical long-tailed distribution entity. The distribution is shown in Table 2.

[0137] Table 1. Corpus Statistics and Entity Distribution

[0138] gather Tokens Sentence count Average sentence length Entity Number Total number of entity tags training set 151,960 2,964 51.3 10,023 53,389 Validation set 61,585 1,197 51.4 4,184 22,206 test set 39,581 755 52.4 2,735 14,588

[0139] Table 2 Entity Category Distribution

[0140] Entity Category training set Validation set test set total Percentage (%) area geographical unit 2,874 1,227 742 4,843 28.58 type of disaster 2,493 968 652 4,113 24.28 time unit 1,644 852 525 3,021 17.83 characteristic disaster features 1,203 430 287 1,920 11.33 disaster response 543 162 105 810 4.78 Hazardous factors 465 175 114 754 4.45 Impact disaster 318 170 162 650 3.84 instance disaster event 281 121 84 486 2.87 org government agencies 202 79 64 345 2.04 total 10,023 4,184 2,735 16,942 100.00

[0141] 2. Hardware and Parameter Configuration

[0142] Hardware platform: The experiment was conducted on a host equipped with an NVIDIA GeForce RTX 4060 TI GPU.

[0143] Model parameters: The BERT encoder uses bert-base-chinese (768-dimensional); the BiLSTM hidden layer dimension is set to 256; the learning rate is set to... The batch size is 16; the number of training epochs is 30.

[0144] Baseline comparison: BiLSTM-CRF (base model), BERT-CRF (pre-trained model), and BERT-BiLSTM-CRF (strong baseline model) were selected as comparison objects.

[0145] 3. Implementation Results and Verification

[0146] To demonstrate the advanced nature of the technical solution in this embodiment, rigorous entity-level evaluation was conducted on the test set, using precision (P), recall (R), and F1 score as evaluation metrics. The experimental results are shown in Table 3. Figure 3 As shown.

[0147] Table 3 Performance Comparison between the Basic Model and the Proposed Method

[0148] Model Accuracy (%) Recall rate (%) F1(%) BiLSTM-CRF 33.42 29.07 31.09 BERT-CRF 78.50 78.40 78.45 BERT-BiLSTM-CRF 79.69 79.65 79.67 This method 80.74 81.35 81.04

[0149] As can be seen from the charts, the model of this invention significantly outperforms existing technologies in all metrics. Compared with the strongest baseline model (BERT-BiLSTM-CRF), the F1 score of this embodiment is improved by 1.37 percentage points, reaching 81.04%. The recall rate improvement is the most significant, increasing by 1.70 percentage points (from 79.65% to 81.35%). This indicates that the "soft dictionary attention" and "entity perception attention" introduced in this invention effectively solve the problem of long-tail entity missed detection, verifying the robustness of the model in low-resource scenarios.

[0150] To verify the specific contributions of each innovative module (SGA, EAA, boundary detection) in this invention, an ablation experiment was conducted in this embodiment, and the results are shown in Table 4.

[0151] Table 4 Ablation Experiment Results

[0152] Ablation type Accuracy (%) Recall rate (%) F1(%) Complete model 80.74 81.35 81.04 w / oSGA 80.49 80.97 80.73 w / oEAA 80.29 80.48 80.39 w / oBoundaryAux 79.82 81.25 80.83

[0153] The model's accuracy experienced its largest drop (0.92%) after the boundary detection branch was removed. In practice, this manifested as the model predicting many false entities with excessively long spans or containing irrelevant characters. This demonstrates that the "boundary awareness and adaptive decoding" technique in this embodiment can effectively suppress false positives and achieve accurate boundary localization.

[0154] When entity-aware attention (EAA) was removed, the recall rate decreased by 0.87%. This demonstrates that the "category prototype" does indeed act as a semantic anchor in practice, helping the model identify catastrophic factors and impact descriptions that are rarely seen in the training set.

[0155] In summary, the marine disaster entity recognition method integrating domain knowledge and boundary awareness proposed in this invention achieves improvements in recognition accuracy and robustness compared to existing technologies, as shown in Table 1. Under stringent entity-level evaluation criteria, the method of this invention achieves an F1 score of 81.04%, which is 1.37 percentage points higher than the current mainstream strong baseline model (BERT-BiLSTM-CRF). The improvement in recall is particularly significant, reaching 1.70 percentage points, while precision also improves by 1.05 percentage points. This comprehensive result demonstrates that by softly injecting domain knowledge and explicitly modeling boundary constraints, the model significantly reduces the missed detection of disaster elements while maintaining high accuracy, and can more reliably serve the needs of automated monitoring and emergency response to marine disasters.

[0156] To address the challenges of scarce data and extremely uneven entity category distribution (long-tail distribution) in the field of marine disasters, this invention introduces an Entity Aware Attention (EAA) mechanism to effectively complete the representation of low-frequency entities. Existing technologies often struggle to extract effective features when faced with a limited number of disaster-causing factors or impact descriptions. This invention, however, utilizes "category prototypes" as semantic anchors, relying not solely on statistical patterns but on semantic similarity for discrimination. Ablation experiments confirm the theoretical advantages of this mechanism: removing the entity awareness module significantly reduced the model's recall by 0.87 percentage points, a reduction exceeding the losses caused by other modules. This demonstrates that this invention effectively covers sparse regions in the semantic space, significantly enhancing the model's generalization ability to recognize unseen or low-frequency long-tail entities.

[0157] Furthermore, the embodiments of this invention have significant technical advantages in resolving entity boundary ambiguity and suppressing false positive predictions. Existing models often suffer from excessively long prediction spans or truncation due to a lack of explicit awareness of entity start and end positions. This invention, by constructing a boundary detection auxiliary task and employing an adaptive CRF decoding strategy, transforms boundary signals into a strongly constrained bias injection decoding process, thereby achieving pixel-level correction of entity boundaries. Experiments show that the core function of this mechanism is to suppress redundant predictions; if the boundary auxiliary module is removed, the model's accuracy will significantly decrease by 0.92 percentage points. This explicit boundary control effectively prevents the model from mislabeling irrelevant characters as part of entities, ensuring the accuracy and completeness of extracted key elements such as disaster time, location, and severity across the text span.

[0158] Example 2

[0159] This invention provides a computer program product, such as an app on a mobile phone or tablet, or an installer on a computer. The product includes a computer program / instructions that, when executed by a processor, implement the method described in Embodiment 1. The code for the computer-executable program used to perform the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0160] Example 3

[0161] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The embodiments of the present invention provide services for implementing the method of the first embodiment of the present invention described above. Figure 4 As shown, the device may include: a memory 301 storing a computer-executable program; a processor 302 coupled to the memory 301; the processor 302 calls the computer-executable program stored in the memory 301 to perform the steps in the method described in Embodiment 1.

[0162] Memory 301 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, memory 301 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). A program / utility having a set (at least one) of program modules may be stored, for example, in memory 301. Such program modules include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. The computer-executable program of the program modules typically performs the functions and / or methods described in the embodiments of the present invention.

[0163] The processor 302 executes various functional applications and data processing by running programs stored in the memory 301, such as implementing the method provided in Embodiment 1 of the present invention.

[0164] The code of a computer executable program can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages.

[0165] It should be understood that the embodiments and descriptions above are only the principles, main features and advantages of the present invention. Various changes and modifications can be made to the present invention without departing from the spirit and scope of the invention, and all such changes and modifications fall within the protection scope of the present invention.

Claims

1. A method for identifying marine disaster entities based on domain knowledge enhancement and boundary awareness, characterized in that, Includes the following steps: (1) Obtain the marine disaster domain dictionary and the category prototype matrix of each entity category in the dictionary; (2) Calculate the semantic vector of each character in the text to be identified, and construct a domain feature based on the entity category to which each character belongs in the dictionary. The domain feature is a matrix obtained by encoding the entity category to which the character belongs. (3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fusion feature of each character. (4) Input the first fusion feature into the trained bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information; (5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature. (6) Based on the second fusion feature, predict the entity boundary using the trained boundary detector; (7) Transform the entity boundary into a structured bias term through linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final entity label.

2. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (1) specifically includes: (1.1) Clean the collected marine disaster bulletin text and label each term with its corresponding entity category; (1.2) Construct a dictionary for the field of marine disasters based on the labeled tags; (1.3) Calculate the semantic vector of each term in each entity category in the dictionary in advance using the BERT pre-trained model; (1.4) For each entity category, calculate the mean of the semantic vectors of all its terms and obtain the category prototype matrix of each entity category by linear transformation.

3. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (2) specifically includes: (2.1) The semantic vector of each character in the text to be recognized is calculated using the BERT pre-trained model; (2.2) Match each character in the text to be identified with the terms in the dictionary to find the entity category to which each character belongs; (2.3) Encode whether a character has an entity category and the entity category to which it belongs to obtain the domain features of each character.

4. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (3) specifically includes: (3.1) Map the domain features and semantic vectors to the same dimension based on the pre-trained projection matrix; (3.2) Using the mapped semantic vector as the query vector and the mapped domain features as the key vector and value vector, a multi-head attention mechanism is used to calculate the knowledge enhancement vector; (3.3) Based on the pre-trained gating parameters, a gating mechanism is used to calculate the fusion coefficient of the semantic vector and the knowledge enhancement vector; (3.4) Based on the fusion coefficient, the semantic vector and the knowledge enhancement vector are fused to obtain the first fusion feature of each character.

5. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (5) specifically includes: (5.1) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, a multi-head attention mechanism is used to calculate the prototype enhancement vector; (5.2) Based on the pre-trained scalar gating parameters, the scalar weights of the prototype enhancement vector and the hidden state features are calculated using the scalar gating mechanism; (5.3) Based on the scalar weights, the prototype enhancement vector is fused with the latent state features to obtain the second fused feature.

6. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (7) specifically includes: (7.1) Based on the pre-trained mapping parameters, linear mapping is used to transform the entity boundary into a structured bias term; (7.2) Input the entity boundary into the CRF layer to obtain the initial emission score; (7.3) The structured bias term is superimposed on the initial emission score of the CRF layer to obtain the corrected emission score; (7.4) The optimal path is calculated based on the corrected emission fraction using the Viterbi algorithm to obtain the final entity label.

7. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 1, characterized in that, Step (1) is preceded by a network training step, which specifically includes: (0-1) Based on the collected marine disaster-related texts, construct a marine disaster domain dictionary and a category prototype matrix for each entity category in the dictionary; (0-2) Calculate the semantic vector of each character in the training sample set, and construct the domain feature based on the entity category to which each character belongs in the dictionary. The domain feature is a matrix obtained by encoding the entity category to which the character belongs. (0-3) Map the domain features and semantic vectors to the same dimension, and use the mapped semantic vector as the query vector, the mapped domain features as the key vector and value vector to calculate the knowledge enhancement vector. Then, through a gating mechanism, the semantic vector and the knowledge enhancement vector are adaptively fused to obtain the first fused feature of each character. (0-4) Input the first fusion feature into the bidirectional long short-term memory network layer to obtain the hidden state feature containing contextual information; (0-5) Using the latent state features as the query vector and the category prototype matrix as the key vector and value vector, the prototype enhancement vector is calculated. The prototype enhancement vector is adaptively fused with the latent state features through a gating mechanism to obtain the second fused feature. (0-6) Based on the second fusion feature, predict the entity boundary and entity label distribution using the boundary detector; (0-7) Transform the entity boundary into a structured bias term through a linear mapping, and superimpose the structured bias term onto the initial emission score of the CRF layer to obtain the corrected emission score. Use the Viterbi algorithm to calculate the optimal path based on the corrected emission score to obtain the final predicted entity label. (0-9) Based on the predicted entity boundary, entity label distribution prediction, entity label and real label, calculate the total loss, update each network parameter according to the total loss, and return to execute step (0-2) until the preset number of iterations is reached to complete the training of each network parameter.

8. The marine disaster entity recognition method based on domain knowledge enhancement and boundary awareness according to claim 7, characterized in that, The total loss is a weighted sum of the boundary detection loss calculated from the loss of predicting entity boundaries and entity label distribution, and the CRF loss calculated based on entity labels and real labels.

9. A computer program product, comprising a computer program, characterized in that: When the computer program is executed by a processor, it implements the method of any one of claims 1-8.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the method as described in any one of claims 1-8.