Water disaster prevention and control entity data enhancement method and system for domain knowledge extraction

By adopting data enhancement methods and text data enhancement technologies in the field of water damage prevention and control, the problems of low data quality and low data volume in water damage prevention and control knowledge have been solved, and efficient knowledge extraction and improvement of the level of intelligent water damage prevention and control have been achieved.

CN119513328APending Publication Date: 2025-02-25WUHAN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411585064.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

There are problems in water damage prevention and control knowledge that low data quality, low data volume, high data labeling cost and model accuracy are affected, resulting in low data utilization efficiency of water damage prevention and control work.

Method used

By establishing data enhancement methods in the field of water damage prevention and control, using text data enhancement technology, summarizing the concepts of the field from top to bottom, establishing an ontology model for data annotation, and using strategies such as entity replacement, synonymous interchange, language back-translation, and large language model rewriting to enhance the data of entities and non-entity parts to generate more high-quality data.

Benefits of technology

It effectively alleviates the problems of scarcity and poor quality of data in vertical fields, significantly reduces the cost of manual labeling, improves the accuracy and robustness of the knowledge extraction model, and improves the level of intelligence in water damage prevention and control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513328A_ABST
    Figure CN119513328A_ABST
Patent Text Reader

Abstract

The invention discloses a water disaster prevention and control entity data enhancement method and system for domain knowledge extraction. The method comprises the steps of obtaining text data in a water disaster prevention and control field; performing standardization processing and cleaning on the obtained text data of different formats to form an original data set of the field; according to the original data set of the domain, summarizing domain theme concepts from top to bottom, analyzing a concept association relationship, establishing a water disaster prevention and control ontology model, and carrying out data annotation according to the ontology model; dividing each piece of text data into an entity part and a non-entity part according to a labeling result, performing data enhancement on the entity part and the non-entity part by adopting a corresponding enhancement strategy, and recombining an entity part enhancement result and a non-entity part enhancement result to obtain enhanced data of the piece of text data; and the enhanced data of each text forms an enhanced data set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water conservancy and water hazard control data enhancement and knowledge graph construction, and specifically to a water hazard control entity data enhancement method and system for domain knowledge extraction. Background Art

[0002] When faced with natural disasters such as floods, timely and effective flood control actions can minimize the losses caused by disasters. However, flood control knowledge has problems such as difficulty in knowledge extraction and poor relevance, and lacks systematic organization and utilization, which brings great difficulties to flood control work. Fortunately, extracting domain knowledge from flood control experience texts and constructing knowledge graphs can realize the sorting and association of relevant knowledge, provide quick questions and answers on flood control knowledge, and thus improve the ability to identify and respond to flood risks.

[0003] The knowledge graph requires accurate domain knowledge extraction technology to support each link from construction to application. In the construction stage, this technology is needed to automatically extract the central entities of the text and extract the entity relationship; in the application stage, this technology is needed to parse the keywords of the question and enhance the performance of the information retrieval and question-answering system.

[0004] High-quality data is a key prerequisite for ensuring the accuracy of knowledge extraction models. However, water hazard prevention and control knowledge has problems such as low data quality, complex text grammatical structure, and much redundant information. In terms of data scale, it has problems such as data scarcity and uneven distribution of entity categories. In terms of data labeling, it has problems such as large workload and poor consistency of labeling results, which hinder the rapid and effective implementation of water hazard prevention and control work. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a method and system for enhancing entity data of water hazard prevention and control for domain knowledge extraction. By establishing a data enhancement method for single vertical domain data, high-quality data is used as the original data to multiply more high-quality data. Under the condition of low-quality and small amount of domain data, the efficient training of the knowledge extraction model is met, thereby improving the intelligence level of water hazard prevention and control.

[0006] According to one aspect of the present invention, a method for enhancing water hazard prevention entity data for domain knowledge extraction is provided, comprising: Obtain text data in the field of water hazard prevention; Standardize and clean the acquired text data in different formats to form the original data set in the field; Based on the original data set of the field, summarize the subject concepts of the field from top to bottom, analyze the concept associations, establish a flood control ontology model, and carry out data annotation based on the ontology model; According to the annotation results, each text data is divided into an entity part and a non-entity part. Corresponding enhancement strategies are used to implement data enhancement for the entity part and the non-entity part. The enhancement results of the entity part and the non-entity part are recombined to obtain the enhanced data of the text data. The enhanced data of each text constitutes an enhanced data set.

[0007] As a further technical solution, the method further includes: Train the model on the original data set separately, and use the trained model to obtain test results on the test set; The original dataset and the enhanced dataset are combined for model training, and the trained model is used to obtain test results on the test set. The accuracy, recall rate and F1 value are selected as indicators to compare the two groups of training results and judge the effectiveness of the proposed data enhancement method.

[0008] As a further technical solution, text data in the field of water hazard prevention is obtained, including: The scope of text data collection is determined to be basic knowledge related to water hazards and specific prevention and control methods for different water hazards; Text data collection is carried out through methods including but not limited to the following: using automated programs to crawl text data from encyclopedia websites; batch downloading technical papers containing water damage control from paper websites; obtaining professional monographs from book websites; obtaining PDF files through extensive browser searches and obtaining text data in the field of water damage control from technology sharing websites.

[0009] As a further technical solution, the obtained text data in different formats are standardized and cleaned, including: Adopting a targeted method to standardize text data of different formats into a unified editable format, wherein the unified editable format is a plain text format with a .txt suffix or a Word format with a .doc suffix; The standardized text is cleaned using one or more of the following cleaning methods: at the chapter level, data with the same topic is removed based on the chapter title and chapter content; at the paragraph level, the text description is split by periods and the data is divided into blocks; at the sentence level, missing sentence components are supplemented; at the word level, including but not limited to removing garbled characters, correcting typos, and removing stop words.

[0010] As a further technical solution, a flood control ontology model is established, and data annotation is carried out based on the ontology model, including: Start from a top-down perspective, defining high-level concepts first, and then extending low-level concepts from high-level concepts; Determine whether each concept has attributes. If so, add concept attributes and define relationships between concepts. Create a flood control ontology model based on concepts and relationships to represent the concepts, attributes and relationships in the flood control field; According to the concepts and attributes involved in the water hazard control ontology model, entity annotation is carried out to obtain the annotated dataset.

[0011] As a further technical solution, corresponding enhancement strategies are adopted to implement data enhancement for the entity part, including: Entity replacement, based on the annotated data set, establishes an entity type dictionary for all entities according to entity type. When implementing the entity replacement strategy, for each entity word in the original text data, first randomly extract an entity of the same type from the corresponding entity type dictionary according to the entity type, and then replace the original entity with a set probability P to form a new sentence; Synonym swapping: first obtain an open source synonym library, then each entity word in the sentence has a set probability P to be replaced by the corresponding synonym in the synonym library to form a new sentence; Language back-translation: for each entity word in the sentence, the translation engine is used to translate the entity word into other languages ​​with a set probability P, and then translated back into Chinese to replace the original entity word to form a new sentence; The large language model rewrites by masking the entity word to be replaced with a special marker, inputting the entire text into the large language model, and editing the prompt words to let the model fill in the masked part. The result after filling is the new sentence; or directly editing the prompt words to let the model perform synonymous rewriting on the input phrase based on the context to obtain a new sentence.

[0012] As a further technical solution, the method also includes: obtaining the original entity label and the length of the enhanced entity word in real time, and flexibly changing the label length according to the length of the entity word so that the enhanced data still has the correct annotation label.

[0013] As a further technical solution, corresponding enhancement strategies are adopted to implement data enhancement for non-entity parts, including: Based on the annotated dataset, the non-entity part is refined from the sentence granularity to the word granularity to obtain non-entity words; Data enhancement for non-entity words includes synonym swapping, language back translation, large language model rewriting, random swapping and random deletion. Among them, random swapping is to exchange the front and back positions of two words in a sentence with a set probability P / 2 after obtaining a non-entity word to form a new sentence. Random deletion is to randomly delete the non-entity word in the sentence with a set probability P after obtaining a non-entity word to form a new sentence.

[0014] According to one aspect of the present invention, a water hazard control entity data enhancement system for domain knowledge extraction is provided, comprising: The first main module is used to obtain text data in the field of water hazard prevention; The second main module is used to standardize and clean the acquired text data in different formats to form the original data set of the field; The third main module is used to summarize the domain subject concepts from top to bottom based on the original data set of the field, analyze the concept association relationship, establish a flood control ontology model, and carry out data annotation based on the ontology model; The fourth main module is used to divide each text data into an entity part and a non-entity part according to the annotation results, implement data enhancement for the entity part and the non-entity part using corresponding enhancement strategies, recombine the entity part enhancement results and the non-entity part enhancement results to obtain the enhanced data of the text data, and the enhanced data of each text constitutes an enhanced data set.

[0015] According to one aspect of the present invention specification, there is provided an electronic device, comprising: a memory for storing one or more computer instructions; a processor for executing the computer program, wherein when the one or more instructions are executed by the one or more processors, the one or more processors implement the steps of the water hazard control entity data enhancement method for domain knowledge extraction.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The data used in the present invention is derived from the long-term experience of human beings in fighting against floods, and is universal for different river basins and different water conservancy facilities. The present invention increases the amount of original text data through a text data enhancement method, thereby alleviating the problem of data scarcity and poor data quality in vertical fields. By implementing data enhancement on entities in small sample categories, the distribution of various entity data is also more balanced; new training samples do not require manual labeling, which significantly reduces the cost of manual labeling and reduces the problem of low model accuracy caused by inconsistent data labeling results; and data enhancement can also improve the robustness of the model by operations such as changing the sentence structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction is given below to the drawings used in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A schematic flow chart of a method for enhancing water hazard prevention entity data for domain knowledge extraction provided by an exemplary embodiment is shown; Figure 2 An operational flow chart provided by an exemplary embodiment is shown; Figure 3A water damage prevention ontology model diagram provided by an exemplary embodiment is shown; Figure 4 A sample diagram of data enhancement results provided by an exemplary embodiment is shown; Figure 5 A schematic diagram showing the comparison of entity knowledge extraction accuracy before and after data enhancement provided by an exemplary embodiment is shown; Figure 6 A schematic diagram showing comparison of entity knowledge extraction recall rates before and after data enhancement provided by an exemplary embodiment is shown; Figure 7 A schematic diagram showing the comparison of F1 values ​​of entity knowledge extraction before and after data enhancement provided by an exemplary embodiment is shown; Figure 8 A schematic structural diagram of a water hazard prevention entity data enhancement system for domain knowledge extraction provided by an exemplary embodiment is shown. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention are arbitrarily combined with each other to form a new technical solution. This combination is not restricted by the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that this combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0020] The embodiment of the present invention provides a method for enhancing water hazard prevention entity data for domain knowledge extraction, which can effectively improve the problems of low data quality and small data volume of water hazard prevention knowledge.

[0021] The water hazard prevention entity data enhancement method for domain knowledge extraction described in the embodiment of the present invention is as follows: Figure 1 As shown, the following steps are included: Step 1: Determine the research field as the field of water hazard prevention knowledge, and collect text data in the field from various channels; Step 2: Use targeted methods to standardize texts of different formats into a unified editable format; clean the standardized data through a variety of means to obtain a clean original data set of the field; Step 3: Analyze the acquired text content, summarize the domain subject concepts from top to bottom, analyze the concept associations, establish a flood control ontology model, and perform data annotation based on the ontology model; Step 4: According to the annotation results, each text data is divided into an entity part and a non-entity part, and corresponding enhancement strategies are used to implement data enhancement for the entity part and the non-entity part. The entity part enhancement results and the non-entity part enhancement results are recombined to obtain the enhanced data of the text data. The enhanced data of each text constitutes an enhanced data set.

[0022] Optionally, the step 1 specifically includes the following steps: Step 1-1: Determine that the field of knowledge extraction is the field of water disaster prevention and control, so the scope of text data collection is the basic knowledge related to water disasters and specific prevention and control methods for different water disasters.

[0023] Step 1-2: Various approaches include but are not limited to the following methods: using automated programs to crawl text data from encyclopedia websites; batch downloading technical papers containing water damage control from paper websites; obtaining professional monographs from book websites; obtaining PDF files through extensive browser searches and obtaining text data in the field of water damage control from technology sharing websites.

[0024] Optionally, the step 2 specifically includes the following steps: Step 2-1: The targeted method may include the following: text data, scannable PDF files, web column articles, etc. obtained by automated programs can be directly converted into standard plain text data, while non-copyable PDF scanned files of paper monographs need to be converted into plain text data using optical character recognition technology.

[0025] Step 2-2: The unified editable format may be a plain text format with a .txt suffix or a Word format with a .doc suffix.

[0026] Step 2-3: The above-mentioned multiple cleaning methods may include the following: at the chapter level, data with the same theme is removed based on the chapter title and chapter content; at the paragraph level, the text description is split by period, the data is divided into blocks, and the text complexity is reduced; at the sentence level, missing sentence components are supplemented, such as subject supplementation and pronoun restoration; at the word level, garbled characters are removed, typos are corrected, stop words are removed, etc. After the data cleaning is completed, the original data set of the clean domain is obtained.

[0027] Optionally, step 3 specifically includes the following steps: Step 3-1: Start from a top-down perspective, define high-level concepts first, and then extend low-level concepts from high-level concepts.

[0028] Step 3-2: Determine whether each concept has attributes. If so, add concept attributes and define relationships between concepts.

[0029] Step 3-3: Use the open source programming environment provided by Jena to create a domain ontology model based on concepts and relationships to represent the concepts, attributes, and relationships in the field of water hazard control.

[0030] Step 3-4: Expand entity annotation according to the concepts and attributes involved in the domain ontology model to obtain annotated data sets. The specific operation is to find the instances corresponding to each concept and attribute in the clean original data set of the domain obtained in step 2. Based on the annotated data set, non-entity parts and entity words of different categories can be distinguished.

[0031] Furthermore, the top-down specific steps described in step 3-1 are to determine the scope of high-level concepts according to the target domain of knowledge extraction, and to determine whether each high-level concept has the attributes of the underlying concepts, and to add the concept attributes if the attributes exist.

[0032] Furthermore, the entity annotation results of the data set in steps 3-4 are directly related to the effectiveness of the subsequent enhanced data. Therefore, in order to ensure the accuracy of annotation, the method described in the present invention first randomly selects 10% of the text data and has it independently annotated by multiple annotators, compares the differences in annotation results, explores annotation experience, and summarizes unified annotation rules; after determining the annotation rules, the remaining 90% of the text is annotated separately by each annotator, and the annotation process is promptly inspected, supervised and discussed to ensure the annotation quality.

[0033] Optionally, step 4 includes the following steps: Step 4-1: Entity words are knowledge to be extracted that is implicit in the sentence description. Data enhancement of entity words should ensure that the enhanced results are highly consistent with the original entities. Therefore, the proposed entity word enhancement strategies include entity replacement, synonym exchange, language back translation, and large language model rewriting.

[0034] Further: Entity replacement: Based on the annotated data set obtained in step 3, an entity type dictionary is established for all entities according to their categories. When implementing the entity replacement strategy, for each entity word in the original text data, an entity of the same type is first randomly selected from the corresponding entity type dictionary based on the entity type, and then the original entity is replaced with a certain probability P to form a new sentence; Synonym swap: First, obtain an open source synonym library, and then each entity word in the sentence is replaced by the corresponding synonym in the synonym library with a certain probability P to form a new sentence; Language back-translation: For each entity word in the sentence, the translation engine is used to translate the entity word into English, French or other languages ​​with a certain probability P, and then translated back into Chinese to replace the original entity word to form a new sentence; Large language model rewriting: refers to masking the entity word to be replaced with a special marker, inputting the entire text into the large language model, editing the prompt word to allow the large language model to fill in the masked part, and the result after filling is the new sentence, or directly editing the prompt word to allow the large language model to perform synonymous rewriting on the input phrase based on the context to obtain a new sentence.

[0035] Furthermore, entity words can be divided into two categories: one is an independent entity composed of a single word, which cannot be segmented by the word segmenter; the other is a composite entity formed by a combination of multiple words, which can be segmented by the word segmenter. When implementing the synonym exchange strategy, because the entity word may be a composite entity, it is difficult to directly match a synonym in the synonym library, so it is necessary to first use an open source word segmentation tool to implement the word segmentation operation, split the composite entity into multiple basic words, and then combine each basic word into a new entity word after implementing synonym replacement.

[0036] Furthermore, the models that can be rewritten by the large language model include but are not limited to GPT, GLM, Llama, Qwen and other models. This strategy includes two modules: task description module and real task input module. The task description module sets the role positioning for the model through natural language, and limits the field to a clear field of flood control to exclude interference from other fields, and removes a large amount of redundant knowledge stored in the large model. The real task input module is an application module that receives text without data enhancement and uses the generation and semantic understanding capabilities of the large language model to fill in the masked text.

[0037] Furthermore, entity categories and text labels are key learning materials for the model to extract knowledge in sentences. In order to avoid the problem that the original text label annotation results are unavailable due to the change in word length after entity data enhancement, the present invention proposes an elastic indexing method to obtain the original entity label category and the enhanced word length in real time, and dynamically change the text label according to the enhanced length to ensure that the enhanced data still has the correct annotation label.

[0038] The specific operation of the elastic indexing method is as follows: Index strings are established according to the length of each text. The establishment principle is that non-entity parts are all represented by the letter A, and entity parts are represented by numbers [0-9] according to ten entity categories. For example, in <When using earth-filled bags to rush to repair slope collapse, sandy soil and loessial soil are good for soil materials, and geotextile bags should be sealed with a portable sewing machine.>, <slope collapse> is a danger situation entity, represented by the number 1; <earth-filled bags> is an engineering measure entity, represented by the number 2; <sandy soil> etc. are material entities, represented by the number 3; <portable sewing machine> is a mechanical entity, represented by the number 4; then the index string is '1111AA222AAAAAAA33A333AAA33333AA444444AAA'. After entity enhancement, if the original sentence becomes <When using earth-filled bags to rush to repair collapse, clay and sandy soil are good for soil materials, and geotextile bags should be sealed with cable ties.>, by tracking the length changes of each entity word, the length of the index string is changed accordingly. For example, the length of the first entity word <collapse> becomes two, and the length of the last entity word <cable ties> becomes two, etc. According to the above rules, the index string after data enhancement is constructed as '11AA222AAAAAAA33A33AAA33333AA44AAA'. Finally, according to the index string, the letter A and the numbers [0-9] are restored to the corresponding entity categories, thereby ensuring that the enhanced entity words are correctly separated in the sentence and ensuring the accuracy of the entity categories.

[0039] Step 4-2: Based on the labeled dataset obtained in Step 3, ignoring the entity parts with entity labels, use an open-source word segmentation tool to refine the non-entity parts from the sentence level to the word level, that is, obtain non-entity words.

[0040] Step 4-3: Non-entity words are not the knowledge information we focus on. Data enhancement of non-entity words can shuffle the order of words. Therefore, the proposed data enhancement method for non-entity words includes five methods: synonym replacement, language back-translation, large language model rewriting, random swapping, and random deletion.

[0041] Furthermore, the methods of synonym replacement, language back-translation, and large language model rewriting involved in Step 4-3 are consistent with the entity enhancement strategy; the specific operations of random swapping and random deletion are as follows: Random swapping: After obtaining non-entity words, with a certain probability P / 2, swap the positions of two words in the sentence to form a new sentence.

[0042] Random deletion: After obtaining non-entity words, with a certain probability P, randomly delete non-entity words in the sentence to form a new sentence.

[0043] Furthermore, when implementing the random swapping strategy, because two non-entity words are changed simultaneously, when performing this enhancement strategy, the probability becomes P / 2.

[0044] Step 4-4: Strategy combination. For each piece of text data in the annotated dataset, there are four enhancement strategies for entity words and five enhancement strategies for non-entity words. Twenty non-repetitive enhancement methods can be obtained through permutations and combinations. Therefore, the proposed method can increase the original data volume by up to twenty times. The annotated dataset is enhanced using the proposed method to obtain an enhanced dataset.

[0045] The method for enhancing water hazard prevention entity data for domain knowledge extraction described in the embodiment of the present invention further includes: Step 5: Train the model on the original dataset separately, then merge the original dataset with the enhanced dataset for model training, and select indicators to analyze the effectiveness of the proposed entity data enhancement method.

[0046] Specifically, step 5 includes the following steps: Step 5-1: Train the model on the original data set separately, and use the trained model to obtain test results on the test set.

[0047] Step 5-2: Merge the original dataset and the enhanced dataset for model training, and use the trained model to obtain test results on the test set.

[0048] Step 5-3: Select accuracy, recall, and F1 value as judgment indicators to compare the two sets of training results and determine the effectiveness of the proposed method.

[0049] As a preferred embodiment, the present invention provides a method for enhancing water hazard prevention entity data for domain knowledge extraction, such as Figure 2 As shown, the following steps are included: Step 1: First, determine the target field as the field of water hazard prevention and control, and collect multi-source text data including encyclopedia data, norms and standards, scientific papers, technical manuals, etc. according to the target field. Among them, Python automation scripts can be used to crawl water conservancy terms and definitions from websites such as Baidu Encyclopedia; batch download technical papers containing water hazard prevention and control from paper websites to obtain editable PDF document text data; search and purchase professional papers, use scanners to obtain non-editable PDF scans, obtain PDF files through extensive browser searches, and obtain text data in the field of water hazard prevention and control on technology sharing websites.

[0050] Step 2: Normalize the data format. For example, you can use a Python automation script to save the obtained text data directly in ".txt" format; use optical character recognition technology to extract non-editable PDF scanned text to obtain ".txt" format data; use the Pdfminer tool to extract the editable PDF document text data of the paper to obtain ".txt" format data.

[0051] Then, the unified formatted data was cleaned: at the chapter level, data with the same theme was removed based on chapter title and chapter content; at the paragraph level, the text description was split by period, the data was divided into blocks to reduce the complexity of the text; at the sentence level, missing sentence components were supplemented, such as subject supplementation and pronoun restoration; at the word level, garbled characters were removed, typos were corrected, stop words were removed, etc. After cleaning, a clean original data set of the field was obtained.

[0052] Step 3: Using top-down logic, through the open source programming environment provided by Jena, create a flood control ontology model to represent the concepts, attributes and relationships in the field of flood control. The specific method is: according to the theme of flood control, determine the scope of the ontology concept as the use of specific engineering measures to rescue dangerous situations in water conservancy facilities, and extract three core concepts, namely water conservancy facilities, dangerous situations, and engineering measures as high-level concepts of the ontology; Furthermore, we determine whether each concept has attributes. If it does, we add concept attributes. The specific operations are as follows: for water conservancy facilities, we do not define their attributes because there is little relevant content in the text data; for hazards, we define their attributes, including definition, hazard level, and hazard manifestation; for engineering measures, we define their attributes, including principles, measure locations, materials, and machinery. We define attributes and relationships for each concept, thus determining Figure 3 The ontology model of the flood control domain is shown. According to the ontology model, the entity instances contained in the original data set of the clean domain are classified and labeled to obtain the flood control data set.

[0053] Step 4: Take out the annotated texts from the flood control dataset in turn. For one annotated text, separate the entity part from the non-entity part according to the annotation category. The entity part can perform four enhancement strategies, including entity replacement, synonym exchange, language back translation, and large language model rewriting. Use word segmentation tools such as jieba and HanLP to refine the non-entity part from the sentence granularity to the word granularity, that is, obtain non-entity words. Non-entity words can perform five enhancement strategies, including synonym exchange, language back translation, large language model rewriting, random exchange, and random deletion. In this example, the value of probability P in all strategies is set to 0.2. For each entity word in the text data, one of the above four entity enhancement strategies is randomly selected, and for non-entity words, one of the above five non-entity enhancement strategies is randomly selected. After the flood control dataset is enhanced three times, the enhancement results are merged with the flood control dataset to obtain an enhanced flood control dataset. Examples of enhancement results corresponding to various enhancement strategies are shown below. Figure 4 shown.

[0054] Step 5: Divide the manually annotated original data set into training set, validation set and test set according to a certain ratio, such as 3:1:1. Use the training set as learning material to train the model's ability to extract knowledge about water hazard prevention and control entities, use the validation set to iteratively optimize the model network parameters, and select the model parameters that perform best on the validation set to test the model training effect on the test set.

[0055] The BERT-BiLSTM_CRF entity knowledge extraction model was selected to verify the effectiveness of the data enhancement method, and the accuracy, recall and F1 value were selected as evaluation indicators. The entity knowledge extraction model was trained with the flood control data set and the enhanced flood control data set, and the performance of the model on the test set under the action of different data sets was compared. The results are shown in the figure. Figures 5 to 7 shown. Figures 5 to 7 The final average values ​​show the average accuracy, recall rate and F1 value of 10 types of entities. It can be seen from the figure that the average values ​​of the three indicators are significantly improved after data enhancement. Among them, the F1 value, which best reflects the model effect, has an average value of 5.12% after data enhancement, which has obvious benefits. The method proposed in the present invention can significantly improve the accuracy of knowledge extraction by improving data quality without optimizing the model. It is suitable for knowledge extraction tasks with less data volume and low data quality in vertical fields. At the same time, it can significantly reduce the amount of data annotation tasks and alleviate the problem of model accuracy loss caused by inconsistent operations of annotation personnel, and has good use value.

[0056] The implementation basis of each embodiment of the present invention is to implement programmed processing through a device with a processor function. Therefore, in engineering practice, the technical solutions and functions of each embodiment of the present invention are encapsulated into various modules. Based on this reality, on the basis of the above embodiments, an embodiment of the present invention provides a water hazard prevention and control entity data enhancement system for domain knowledge extraction, which is used to execute a water hazard prevention and control entity data enhancement method for domain knowledge extraction in the above method embodiment.

[0057] Please refer to Figure 8 The system 800 includes: a first main module 810, which is used to obtain text data in the field of water hazard prevention and control; a second main module 820, which is used to standardize and clean the obtained text data in different formats to form an original data set of the field; a third main module 830, which is used to summarize the field subject concepts from top to bottom, analyze the concept association relationship, establish a water hazard prevention and control ontology model, and perform data annotation according to the ontology model; a fourth main module 840, which is used to divide each text data into an entity part and a non-entity part according to the annotation result, implement data enhancement for the entity part and the non-entity part using corresponding enhancement strategies, recombine the entity part enhancement result and the non-entity part enhancement result, and obtain the enhanced data of the text data, and the enhanced data of each text constitutes an enhanced data set.

[0058] The embodiment of the present invention provides a water hazard prevention entity data enhancement system for domain knowledge extraction, using Figure 8 By establishing a data enhancement method for single vertical field data, the high-quality data is used as the original data to multiply more high-quality data. Under the condition of low-quality and small amount of field data, the efficient training of the knowledge extraction model is met, and the level of intelligence in water disaster prevention and control is improved.

[0059] It should be noted that the system embodiments provided by the present invention are not only used to implement the methods in the above-mentioned method embodiments, but also used to implement the methods in other method embodiments provided by the present invention. The only difference lies in the setting of corresponding functional modules, and the principles thereof are basically the same as the principles of the above-mentioned system embodiments provided by the present invention. As long as technical personnel in this field refer to the specific technical solutions in other method embodiments on the basis of the above-mentioned system embodiments, obtain corresponding technical means and technical solutions composed of these technical means by combining technical features, and on the premise of ensuring the practicality of the technical solutions, they will improve the modules in the above-mentioned system embodiments to obtain corresponding system class embodiments for implementing the methods in other method class embodiments.

[0060] Based on the same inventive concept as the above-mentioned embodiment, an embodiment of the present invention also provides an electronic device, including: a memory for storing one or more computer instructions; a processor for executing the computer program, when the one or more instructions are executed by the one or more processors, the one or more processors implement the steps of the water hazard control entity data enhancement method for domain knowledge extraction.

[0061] In summary, the present invention utilizes a variety of text data collection methods to collect texts related to water hazard prevention and control from a variety of channels; converts the obtained text data into a unified editable format and performs data cleaning; combines water hazard prevention and control experience and knowledge to construct a water hazard prevention and control field ontology model and implements data annotation; divides each text data into an entity part and a non-entity part according to the annotation results, and adopts corresponding data enhancement strategies to implement data enhancement to obtain an enhanced data set; uses the data sets before and after data enhancement to train the knowledge extraction model respectively, and verifies the effectiveness of the data enhancement method. The present invention generates more high-quality data based on a small amount of manually annotated high-quality data, effectively reducing the cost of manual annotation, which is conducive to alleviating the scarcity of high-quality data in vertical fields, and enhancing the robustness and accuracy of the knowledge extraction model by improving the diversity of text data, providing high-quality data support for the development of high-quality knowledge graphs in the field of water hazard prevention and control.

[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.

Claims

1. A water hazard prevention entity data enhancement method for domain knowledge extraction, characterized in that: include: Obtain text data in the field of water hazard prevention; Standardize and clean the acquired text data in different formats to form the original data set in the field; Based on the original data set of the field, summarize the subject concepts of the field from top to bottom, analyze the concept associations, establish a flood control ontology model, and carry out data annotation based on the ontology model; According to the annotation results, each text data is divided into an entity part and a non-entity part. Corresponding enhancement strategies are used to implement data enhancement for the entity part and the non-entity part. The enhancement results of the entity part and the non-entity part are recombined to obtain the enhanced data of the text data. The enhanced data of each text constitutes an enhanced data set.

2. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: The method further comprises: Train the model on the original data set separately, and use the trained model to obtain test results on the test set; The original dataset and the enhanced dataset are combined for model training, and the trained model is used to obtain test results on the test set. The accuracy, recall rate and F1 value are selected as indicators to compare the two groups of training results and judge the effectiveness of the proposed data enhancement method.

3. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: Obtain text data in the field of water damage control, including: The scope of text data collection is determined to be basic knowledge related to water hazards and specific prevention and control methods for different water hazards; Text data collection is carried out through methods including but not limited to the following: using automated programs to crawl text data from encyclopedia websites; batch downloading technical papers containing water damage control from paper websites; obtaining professional monographs from book websites; obtaining PDF files through extensive browser searches and obtaining text data in the field of water damage control from technology sharing websites.

4. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: Standardize and clean the acquired text data in different formats, including: Adopting a targeted method to standardize text data of different formats into a unified editable format, wherein the unified editable format is a plain text format with a .txt suffix or a Word format with a .doc suffix; The standardized text is cleaned using one or more of the following cleaning methods: at the chapter level, data with the same topic is removed based on the chapter title and chapter content; at the paragraph level, the text description is split by periods and the data is divided into blocks; at the sentence level, missing sentence components are supplemented; at the word level, including but not limited to removing garbled characters, correcting typos, and removing stop words.

5. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: Establish a flood control ontology model and carry out data annotation based on the ontology model, including: Start from a top-down perspective, defining high-level concepts first, and then extending low-level concepts from high-level concepts; Determine whether each concept has attributes. If so, add concept attributes and define relationships between concepts. Create a flood control ontology model based on concepts and relationships to represent the concepts, attributes and relationships in the flood control field; According to the concepts and attributes involved in the water hazard control ontology model, entity annotation is carried out to obtain the annotated dataset.

6. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: The corresponding enhancement strategies are used to implement data enhancement for the entity part, including: Entity replacement, based on the annotated data set, establishes an entity type dictionary for all entities according to entity type. When implementing the entity replacement strategy, for each entity word in the original text data, first randomly extract an entity of the same type from the corresponding entity type dictionary according to the entity type, and then replace the original entity with a set probability P to form a new sentence; Synonym swapping: first obtain an open source synonym library, then each entity word in the sentence has a set probability P to be replaced by the corresponding synonym in the synonym library to form a new sentence; Language back-translation: for each entity word in the sentence, the translation engine is used to translate the entity word into other languages ​​with a set probability P, and then translated back into Chinese to replace the original entity word to form a new sentence; The large language model rewrites by masking the entity word to be replaced with a special marker, inputting the entire text into the large language model, and editing the prompt words to let the model fill in the masked part. The result after filling is the new sentence; or directly editing the prompt words to let the model perform synonymous rewriting on the input phrase based on the context to obtain a new sentence.

7. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 6, characterized in that: The method also includes: obtaining the original entity label and the length of the enhanced entity word in real time, and flexibly changing the label length according to the length of the entity word so that the enhanced data still has the correct annotation label.

8. The method for enhancing water hazard prevention entity data for domain knowledge extraction according to claim 1, characterized in that: For non-entity parts, corresponding enhancement strategies are used to implement data enhancement, including: Based on the annotated dataset, the non-entity part is refined from the sentence granularity to the word granularity to obtain non-entity words; Data enhancement for non-entity words includes synonym swapping, language back translation, large language model rewriting, random swapping and random deletion. Among them, random swapping is to exchange the front and back positions of two words in a sentence with a set probability P / 2 after obtaining a non-entity word to form a new sentence. Random deletion is to randomly delete the non-entity word in the sentence with a set probability P after obtaining a non-entity word to form a new sentence.

9. A water hazard prevention entity data enhancement system for domain knowledge extraction, characterized in that: include: The first main module is used to obtain text data in the field of water hazard prevention; The second main module is used to standardize and clean the acquired text data in different formats to form the original data set of the field; The third main module is used to summarize the domain subject concepts from top to bottom based on the original data set of the field, analyze the concept association relationship, establish a flood control ontology model, and carry out data annotation based on the ontology model; The fourth main module is used to divide each text data into an entity part and a non-entity part according to the annotation results, implement data enhancement for the entity part and the non-entity part using corresponding enhancement strategies, recombine the entity part enhancement results and the non-entity part enhancement results to obtain the enhanced data of the text data, and the enhanced data of each text constitutes an enhanced data set.

10. An electronic device, characterized in that: include: a memory for storing one or more computer instructions; A processor for executing the computer program, when the one or more instructions are executed by the one or more processors, the one or more processors implement the steps of the water hazard control entity data enhancement method for domain knowledge extraction as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Entity relation joint extraction method and system based on active deep learning

    CN113901825A

  • Multi-source heterogeneous data processing method and system for numerical control machine tool manufacturing resources

    CN114722159A

  • Aviation text data labeling method and labeling system thereof

    CN116244445A

  • Epidemic situation Chinese data enhancement method based on intra-domain entity replacement

    CN116415584A

  • Disaster emergency knowledge graph construction method for aid decision-making

    CN117252255A