Method for constructing causal knowledge graph for preventing and treating aquatic diseases based on causal span, electronic equipment and storage medium

Through the BIO part-of-speech annotation and causal span model, causal knowledge graph is constructed, and the problems of data dispersion and low information utilization efficiency in aquatic disease prevention and control are solved, efficient causal relationship extraction and information systemization are achieved, and the improvement of the improvement of causal relationship extraction and information systematization is achieved. The prevention and control capabilities of aquaculture.

CN118981546APending Publication Date: 2024-11-19DALIAN OCEAN UNIV

Patent Information

Application Number
CN202411191791.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing aquatic disease prevention and control technologies rely on expert experience and manual records. The data is scattered and difficult to systematically be used, and causal relationships cannot be effectively extracted and integrated from a large amount of text data, resulting in inefficient information utilization and lack of systematic and forward-looking guidance.

Method used

The text data is preprocessed and causal span model, and causal chains are constructed through direct adjacent or semantic similarity methods to generate a causal knowledge graph. Specific steps include collection, labeling, preprocessing, causal relationship identification and chain connection of text data, and using the BERT or Word2Vec model to calculate semantic similarity to form a complete causal chain.

Benefits of technology

It improves the accuracy and efficiency of causal relationship extraction, systematic and visualizes complex disease prevention and control information, significantly improves the availability of information and decision-making support capabilities, and improves the prevention and control capabilities of aquatic diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981546A_ABST
    Figure CN118981546A_ABST
Patent Text Reader

Abstract

The invention discloses a method for constructing an aquatic disease control causal knowledge graph based on a causal span, electronic equipment and a storage medium. The method comprises the following steps: firstly, collecting multi-source text data, and carrying out BIO part-of-speech tagging and data preprocessing on the multi-source text data; then, identifying a causal relationship in the text through a causal span model, determining specific spans of reasons and results, and constructing causal chains one by one according to the spans; and overlapping the causal chains one by one, and connecting the causal chains one by one through a direct adjacent or semantic similarity method to form a complete causal chain, thereby generating a causal knowledge graph, and improving the disease control capability of aquaculture. According to the method, the extraction precision of the causal relationship is improved, and the relationship is subjected to structured representation by constructing the knowledge graph, so that a powerful scientific basis and decision support are provided for the aquaculture industry; the application of the method provided by the invention is helpful for improving the prevention and control ability of aquatic diseases and promoting the sustainable development of aquaculture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of aquatic animal disease prevention and control, and in particular to a method, electronic device and storage medium for constructing a causal knowledge graph of aquatic animal disease prevention and control from text based on causal span. Background Art

[0002] Aquatic animal disease prevention and control is a key issue in aquaculture. With the rapid development of aquaculture, the prevention and control of aquatic animal diseases is particularly important. However, existing technologies have certain limitations in the field of aquatic disease prevention and control. For example, traditional aquatic disease prevention and control information mainly relies on expert experience and manual records, and the data is scattered and difficult to systematize, resulting in low efficiency in information utilization. In addition, the technology of automatically extracting and integrating causal relationships from large amounts of text data is still immature, and it is difficult to form an effective knowledge graph to assist decision-making. This makes the aquaculture industry lack systematic and forward-looking guidance when facing complex and changeable disease problems, affecting the timeliness and effectiveness of prevention and control measures. Therefore, it is necessary to study a method for constructing a causal knowledge graph for aquatic animal disease prevention and control from text to improve the performance and function of computers in the field of aquatic disease prevention and control. By constructing a causal knowledge graph for aquatic disease prevention and control from text, scattered disease prevention and control information can be systematically integrated and utilized, and the availability of information and decision-making support capabilities can be improved, thereby more effectively preventing and controlling aquatic diseases.

[0003] Although existing computer technology has made some progress in data processing and analysis, there are still many technical difficulties in extracting causal relationships from text and constructing knowledge graphs. Text data usually contains a large amount of unstructured information, and how to accurately extract useful causal relationships from it is a huge challenge. Traditional methods often rely on rule matching or simple statistical methods, which cannot effectively handle complex language phenomena and diverse text expressions, resulting in poor accuracy and coverage of causal relationship extraction. In addition, existing knowledge graph construction technologies are mostly concentrated in general fields, and there is a lack of effective solutions for specific fields, especially professional fields such as aquatic disease prevention and control. In order to overcome these technical difficulties, it is necessary to combine natural language processing and machine learning related knowledge to develop a method that can automatically extract causal relationships from large amounts of text data and construct a causal knowledge graph for aquatic disease prevention and control. This method can not only improve the accuracy and efficiency of causal relationship extraction, but also systematize and visualize complex disease prevention and control information in the form of knowledge graphs, greatly improving the availability of information and decision support capabilities. Summary of the invention

[0004] In order to solve the above problems, the purpose of the present invention is to provide a method for constructing a causal knowledge graph for aquatic animal disease prevention and control from text.

[0005] According to some embodiments of the present application, a method for constructing a causal knowledge graph based on causal span includes:

[0006] Collect text data;

[0007] Performing BIO part-of-speech tagging on the text data;

[0008] Preprocess the annotated text data;

[0009] The causal span model is used to identify the causal relationship of the preprocessed data, and the specific span of the cause and effect in the causal relationship is determined; the span is the start and end position of the cause in the text data, and the start and end position of the effect in the text data;

[0010] According to the specific span of the identified causes and effects, link them in the order in which they appear in the text to construct a causal chain;

[0011] Connect the causal chains one by one through direct adjacency or semantic similarity to build a complete causal chain;

[0012] Based on the complete causal chain, a causal knowledge graph is generated.

[0013] Furthermore, the data are text data on aquatic animal disease prevention and control, including academic papers, professional books, technical reports, news reports, breeding manuals and online forums.

[0014] Furthermore, the text data is tagged with BIO (Begin-Inside-Outside) part-of-speech using annotation tools (such as SpaCy and NLTK), where BC is marked as the beginning of the cause; IC is marked as the end of the cause; BE is marked as the beginning of the result; IE is marked as the end of the result; and O indicates that it is neither a cause nor a result.

[0015] Furthermore, the data preprocessing cleans and denoises the annotated text data to remove irrelevant information; the preprocessing includes removing special characters, HTML tags, repeated content, and text irrelevant to the subject to ensure the quality of the data.

[0016] Furthermore, the causal span model includes an input layer, an encoding layer, a sequence annotation layer, and a causal span recognition layer;

[0017] The input layer transforms the preprocessed data into the format required by the causal span model and converts it into a digital ID;

[0018] The embedding layer maps the digital ID converted from the text data to a high-dimensional word vector space to capture the semantic information of the word;

[0019] The encoding layer uses encoding mechanisms such as LSTM and Transformer to perform context enhancement processing on the word vectors generated by the embedding layer to capture context and semantic information for labeling and recognition tasks;

[0020] The sequence annotation layer performs refined BIO part-of-speech tagging on the semantic information captured by the encoding layer to more accurately identify causal relationships;

[0021] The causal span identification layer determines the specific span between the cause and the effect in the causal relationship, that is, the start and end position of the cause in the text data, and the start and end position of the effect in the text data, according to the annotation results of the sequence annotation layer.

[0022] Furthermore, for the case where the causal chains are arranged in sequence, the causal chains are connected in a direct adjacent manner, that is, if the result of a causal chain is the cause of the next causal chain, the two adjacent causal chains are connected.

[0023] Furthermore, when the causal chains are not arranged in order, semantic similarity is used to connect the causal chains one by one. The specific method is as follows:

[0024] Use the pre-trained model to convert the text in the non-sequential causal chain into a vector representation, and then calculate the cosine similarity between the vectors in two non-sequential causal chains. The calculation formula is as follows:

[0025]

[0026] Where A and B are two vectors located in two non-sequential causal chains; A·B is the dot product of the vectors; ||A|| and ||B|| are the norms of the vectors (i.e., the lengths of the vectors);

[0027] If the cosine similarity exceeds the set threshold, the two causal chains are semantically related, and the two are connected to form a complete causal chain.

[0028] Furthermore, the pre-trained model is a BERT or Word2Vec model.

[0029] An electronic device comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor; when the processor executes the computer program, the electronic device executes the above-mentioned method of constructing a causal knowledge graph based on causal span.

[0030] A storage medium, comprising a computer program, which, when executed on an electronic device, enables the electronic device to execute the above-mentioned method for constructing a causal knowledge graph based on causal span.

[0031] Beneficial effects of the present invention: The present invention can efficiently extract the causal relationship related to aquatic diseases from a large amount of text data through a series of systematic steps and advanced technical means. The method of the present invention not only improves the extraction accuracy of causal relationships, but also constructs a knowledge graph to structure these relationships, providing a strong scientific basis and decision-making support for the aquaculture industry. The application of the method of the present invention helps to improve the prevention and control capabilities of aquatic diseases and promote the sustainable development of aquaculture. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A flowchart of the method for constructing a causal knowledge graph based on causal span provided by the present invention. DETAILED DESCRIPTION

[0033] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the specific implementation modes of the present invention will be described in detail below with reference to the accompanying drawings.

[0034] like Figure 1 As shown, this embodiment provides a method for constructing a causal knowledge graph for aquatic disease prevention and control based on causal span, which realizes the extraction of valuable causal relationships from a large amount of text and constructs a knowledge graph, providing a scientific basis and decision support for aquatic disease prevention and control; the specific steps include:

[0035] Step 1: Data Preparation

[0036] Acquire and collect massive amounts of text data on aquatic animal disease prevention and control, including academic papers, professional books, technical reports, news reports, breeding manuals, and online forums.

[0037] Step 2: Data Annotation

[0038] The collected text data is tagged with BIO part-of-speech; among them, BC is marked as the beginning of the cause; IC is marked as the end of the cause; BE is marked as the beginning of the result; IE is marked as the end of the result; O means neither the cause nor the result.

[0039] For example, text data: "Water pollution causes fish to become sick, so we need to administer medicine to cure the disease."

[0040] BIO labels are: water quality (BC), pollution (IC), cause (IC), fish (BE), sick (IE), therefore (O), we (O), need (O), administer (BC), medicine (IC), conduct (O), disease (BE), cure (IE).

[0041] Step 3: Data Preprocessing

[0042] The annotated data is cleaned and denoised to remove irrelevant information; specific operations include removing special characters, HTML tags, repeated content, and text irrelevant to the topic. During the preprocessing process, the position of the cause and effect will not change, and will not affect the text position corresponding to the annotated BIO tag.

[0043] After data preprocessing: water quality (BC), pollution (IC), cause (IC), fish (BE), sick (IE), application (BC), medicine (IC), disease (BE), cure (IE).

[0044] Step 4: Identify causal relationships

[0045] The causal span model is used to identify the causal relationship of the preprocessed data and determine the specific span of the cause and effect in the causal relationship;

[0046] The causal span model includes an input layer, an encoding layer, a sequence annotation layer and a causal span recognition layer; wherein,

[0047] Input layer: converts the preprocessed data into the format required by the causal span model and converts it into a digital ID;

[0048] For example: ["water quality"->101,"pollution"->102,"cause"->103,"fish"->104,"illness"->105,"application"->106,"drug"->107,"disease"->108,"cure"->109].

[0049] Embedding layer: maps the digital ID converted from the preprocessed data in the input layer to a high-dimensional word vector space to capture the semantic information of the word;

[0050] For example, map the ID to a word vector representation. Assume that it is an n-dimensional word vector. Each element of the vector represents a feature of the word in the n-dimensional vector space, such as:

[0051] "Water quality": word vector representation is [0.12, -0.34, 0.56, -0.23, 0.78, ...];

[0052] "Pollution": word vector representation is [0.45, -0.29, 0.34, 0.12, -0.67, ...];

[0053] "Leads to": The word vector is represented as [-0.56, 0.67, -0.45, 0.34, -0.23, ...]....

[0054] Encoding layer: The word vectors generated by the embedding layer are context-enhanced through mechanisms such as LSTM and Transformer to capture the context and semantic relationship of the text;

[0055] For example: Use LSTM to process word vectors and generate new context-enhanced vectors.

[0056] LSTM(["water quality"->[0.12,-0.34,0.56,-0.23,0.78,...],"pollution"->[0.45,-0.29,0.34,0.12,-0.67,...],"result"->[-0.56,0.67,-0.45,0.34,-0.23,...],...);

[0057] Context augmentation vector: (["water quality"->[0.10,-0.20,0.40,-0.10,0.50,....], "pollution"->[0.30,-0.10,0.20,0.10,-0.40,...], "cause"->[-0.40,0.50,-0.30,0.20,-0.10,...],....).

[0058] Sequence annotation layer: Performs refined BIO part-of-speech tagging on the semantic information captured by the encoding layer;

[0059] For example, the BIO annotation of the context-enhanced vector is as follows ["water quality"->[0.10,-0.20,0.40,-0.10,0.50,....] is labeled as BC, "pollution"->[0.30,-0.10,0.20,0.10,-0.40,...] is labeled as IC, and "cause"->[-0.40,0.50,-0.30,0.20,-0.10,...] is labeled as O,...].

[0060] Causal span identification layer: According to the annotation results generated by the sequence annotation layer, the specific span of the causal relationship is determined, that is, the start and end positions of the cause and effect in the text data, to accurately locate and extract the causal relationship; among them, the determination of the specific span is still based on the BIO annotation in the preprocessed data.

[0061] For example: first identify the starting position of the first pair of cause and effect, such as "water quality" is marked as BC, the starting position of the cause is 1, "fish" is marked as BE, and the starting position of the result is 4; secondly, identify the ending position of the first pair of cause and effect, starting from "water quality" (BC), find the continuous "pollution" (IC), the ending position of the cause is 2, starting from "fish" (BE), find the continuous "illness" (IE), and the ending position of the result is 5; finally, identify the cause-effect relationship pair and the specific span, the cause of the cause-effect relationship pair: water pollution (starting position: 1, ending position: 2), the result: fish disease (starting position: 4, ending position: 5).

[0062] Similarly, to identify the second pair, first identify the starting position of the second pair of cause and effect, such as "application" is marked as BC, so the starting position of the cause is 9, and "disease" is marked as BE, so the starting position of the result is 12; secondly, identify the ending position of the second pair of cause and effect, starting from "application" (BC), find the continuous "drug" (IC), the ending position of the cause is 10, starting from "disease" (BE), find the continuous "cure" (IE), and the ending position of the result is 13; finally, identify the causal relationship pair and the specific span, the causal relationship pair cause: application of medicine (starting position: 9, ending position: 10), result: disease cure (starting position: 12, ending position: 13).

[0063] Step 5: Construct a cause-and-effect chain

[0064] Based on the identified causal relationship pairs, link them in the order of appearance in the text to construct a causal chain;

[0065] For example, the cause span is: starting position 1, ending position 2; the result span is: starting position 4, ending position 5; that is, the cause-effect chain is: water pollution -> fish disease;

[0066] Cause span: starting position 9, ending position 10; result span: starting position 11, ending position 13; that is, the cause-effect chain: administration of medicine -> disease cured.

[0067] Step 6: Construct a complete causal chain

[0068] Overlap each causal chain, connect them by direct adjacency or semantic similarity to build a complete causal chain;

[0069] 1) When the causal chains are arranged in order, that is, the result of a causal chain is the cause of the next causal chain, the causal chains are connected in a directly adjacent manner. The specific method is as follows:

[0070] Assumptions:

[0071] Causal chain 1: water pollution (cause) -> fish disease (result);

[0072] Causal chain 2: Fish get sick (cause) -> medication is administered (result);

[0073] Causal chain 3: medication administration (cause) -> disease cure (result);

[0074] In causal chain 1, "fish get sick" is the result, and in causal chain 2, "fish get sick" is the cause, therefore, causal chain 1 and causal chain 2 are connected; similarly, in causal chain 2, "administering medicine" is the result, and in causal chain 3, "administering medicine" is the cause, therefore, causal chain 2 and causal chain 3 are connected; finally, the complete causal chain is "water pollution->fish get sick->administering medicine".

[0075] 2) When the causal chains are not arranged in order, semantic similarity is used to connect them. It is necessary to calculate the semantic relationship between the causal chains. The specific method is as follows:

[0076] Use the BERT model to convert "water pollution", "fish disease", "medication", and "disease cure" into vector representations, and then calculate the cosine similarity between the "water pollution" and "medication application" vectors and between the "fish disease" and "disease cure" vectors. The calculation formula is as follows:

[0077]

[0078] Where A and B are two vectors; A·B is the dot product of the vectors. ||A|| and ||B|| are the norms of the vectors (i.e., the lengths of the vectors).

[0079] If the cosine similarity exceeds the set threshold of 0.8, the causal chains are semantically related and are connected to form a causal chain.

[0080] Assume that the semantic similarity between "water pollution" and "medication application" is calculated to be 0.85, which exceeds the set threshold of 0.8. Therefore, "water pollution" and "medication application" are semantically related. Connecting "water pollution" and "medication application" forms a complete causal chain of "water pollution->fish disease->medication application".

[0081] Step 7: Generate causal knowledge graph.

[0082] The steps of generating a causal knowledge graph include extracting information from the extracted causal chain, constructing and visualizing the graph to display and analyze the causal relationship of aquatic animal disease prevention and control. The specific steps are as follows:

[0083] Step 7.1 Information extraction and normalization;

[0084] Step 7.1.1 Entity Identification and Normalization:

[0085] Extract entity information from the causal chain. For example, in the causal chain, "water pollution", "fish disease", "medication", "disease cure" are entities. Assuming that the extracted entities have synonyms or the same phrase, normalize them. For example, normalize "polluted water quality" to "water pollution".

[0086] Step 7.1.2 Relation extraction and normalization:

[0087] Extract causal relationships, such as "leads to", "cause of", etc. Normalize both "leads to" and "cause of" to "leads to".

[0088] Step 7.2: Map construction;

[0089] Step 7.2.1 defines nodes and edges, where nodes represent entities and edges represent causal relationships.

[0090] Nodes: water pollution, fish disease, medication, disease cure;

[0091] Edge: Water pollution -> fish get sick, fish get sick -> apply medicine, apply medicine -> disease is cured.

[0092] Step 7.2.2 Build the graph

[0093] For each causal relationship pair in the causal chain, create a directed edge from the cause node to the effect node. For example:

[0094] (water pollution)-[cause]->(fish disease)

[0095] (fish disease)-[cause]->(administer medicine)

[0096] (administer medicine)-[result]->(cure disease)

[0097] Step 7.3 stores the constructed causal knowledge graph in the Neo4j graph database;

[0098] Step 7.4 Use the visualization tool Graphxr to display the knowledge graph to ensure the clarity and readability of the graph, so as to facilitate the analysis and understanding of causal relationships. The graph can be used to discover potential causal chains and help formulate water quality improvement and drug use strategies to prevent fish diseases.

[0099] Finally, it should be noted that the above embodiments are intended to illustrate the technical solutions of the present invention and do not constitute any form of limitation on the present invention. Those skilled in the art should fully understand that it is completely feasible to modify the technical solutions described in the above embodiments or to perform equivalent replacements on any part or all of the technical features therein. These modifications or replacements, as long as they do not deviate from the scope of protection determined by the claims of the present invention, should be regarded as reasonable extensions of the present invention.

Claims

1. A method for constructing a causal knowledge graph based on causal span, characterized in that: include: Collect text data; Performing BIO part-of-speech tagging on the text data; Preprocess the annotated text data; The causal span model is used to identify the causal relationship of the preprocessed data, and the specific span of the cause and effect in the causal relationship is determined; the span is the start and end position of the cause in the text data, and the start and end position of the effect in the text data; According to the specific span of the identified causes and effects, link them in the order in which they appear in the text to construct a causal chain; Connect the causal chains one by one through direct adjacency or semantic similarity to build a complete causal chain; Based on the complete causal chain, a causal knowledge graph is generated.

2. A method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: The data are text data on aquatic animal disease prevention and control.

3. The method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: In the BIO part-of-speech tagging, BC is marked as the beginning of the cause, IC is marked as the end of the cause, BE is marked as the beginning of the result, IE is marked as the end of the result, and O indicates that it is neither a cause nor a result.

4. The method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: The pre-processing includes removing special characters, HTML tags, repeated content, and text not related to the topic.

5. The method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: The causal span model includes an input layer, an encoding layer, a sequence annotation layer and a causal span recognition layer; The input layer transforms the preprocessed data into the format required by the causal span model and converts it into a digital ID; The embedding layer maps the digital ID converted from the text data to a high-dimensional word vector space to capture the semantic information of the word; The encoding layer performs context enhancement processing on the word vectors generated by the embedding layer to capture context and semantic information for labeling and recognition tasks; The sequence annotation layer performs refined BIO part-of-speech tagging on the semantic information captured by the encoding layer to more accurately identify causal relationships; The causal span identification layer determines the start and end positions of the cause in the text data and the start and end positions of the result in the text data according to the annotation results of the sequence annotation layer.

6. A method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: For the case where the causal chains are arranged in sequence, the causal chains are connected in a direct adjacent manner, that is, if the result of a causal chain is the cause of the next causal chain, the two adjacent causal chains are connected.

7. The method for constructing a causal knowledge graph based on causal span according to claim 1, characterized in that: When the causal chains are not arranged in order, semantic similarity is used to connect the causal chains one by one. The specific method is as follows: Use the pre-trained model to convert the text in the non-sequential causal chain into a vector representation, and then calculate the cosine similarity between the vectors in two non-sequential causal chains. The calculation formula is as follows: Where A and B are two vectors located in two non-sequential causal chains respectively; A·B is the dot product of the vectors; ||A|| and ||B|| are the norms of the vectors; If the cosine similarity exceeds the set threshold, the two causal chains are semantically related, and the two are connected to form a complete causal chain.

8. The method for constructing a causal knowledge graph based on causal span according to claim 7, characterized in that: The pre-trained model is a BERT or Word2Vec model.

9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor; when the processor executes the computer program, the electronic device executes the method for constructing a causal knowledge graph based on causal span as described in any one of claims 1-8.

10. A storage medium, characterized in that: The storage medium includes a computer program, and when the computer program runs on an electronic device, the electronic device executes the method for constructing a causal knowledge graph based on causal span as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Aquatic animal disease diagnosis and prevention knowledge graph construction method

    CN113434700A

  • Method and system for constructing affair knowledge graph based on metabolic diseases

    CN115062162A

  • Aviation safety accident affair map construction method based on causal relationship

    CN117291264A

  • Multi-field cross-chapter event causal relationship mining and judging device and method

    CN117453802A

Cited By

  • Disease and pest causal relationship identification method and system and disease and pest causal map construction method and system

    CN121052349A