Biosecurity risk scheme prediction generation method and system based on knowledge graph
Through the biosafety risk solution prediction generation method based on knowledge graph, the risk type map and generation solution are constructed using Transformer and GPT models, the problem of insufficient timeliness and accuracy of prediction generation in the existing technology is solved, and more efficient biosafety risk response is achieved.
Patent Information
- Application Number
- CN202510532223.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-25
AI Technical Summary
The failure of the existing technology to effectively integrate knowledge graphs and large language models has led to insufficient timeliness and accuracy in the generation of biosafety risk schemes.
Using a biosafety risk scheme prediction generation method based on knowledge graph, the risk type of biosafety event is obtained through the Transformer model, the risk type map architecture is constructed, and the entity content is extracted and solution text vectors are generated to achieve the prediction of risk factors and solutions.
It improves the timeliness and accuracy of biosafety risk plan prediction and enhances the ability to respond to emergencies.
Smart Images

Figure CN120450422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for predicting and generating biosafety risk scenarios based on a knowledge graph. Background Art
[0002] Biosafety emergencies are generally sudden, hidden, and dangerous, such as sudden infectious diseases and biological sample leaks. In recent years, especially, sudden infectious diseases have occurred frequently, significantly increasing the biosafety risk situation. The ability to respond to and handle sudden biosafety incidents is a key guarantee for achieving biosafety, and therefore, it is necessary to improve these capabilities.
[0003] The currently published invention patent, application number 202410907153.8, is titled "A Method for Predicting and Generating Emergency Biosafety Events Based on a Large Model." This patent utilizes a large model and similarity technology to generate emergency plans for sudden biosafety events. However, there is currently no technology that integrates knowledge graphs and large language models with diverse functions to predict and generate biosafety risk scenarios.
[0004] In order to effectively respond to sudden biosafety incidents, protect people's life safety and physical health, and reduce casualties and property losses, the present invention designs a biosafety risk plan prediction and generation method and system based on knowledge graph, which can effectively predict and generate corresponding solution plans for sudden biosafety incidents. Summary of the Invention
[0005] In response to the problems and shortcomings of the existing technology, the present invention provides a method and system for predicting and generating biosafety risk scenarios based on knowledge graphs.
[0006] The present invention solves the above technical problems through the following technical solutions:
[0007] The present invention provides a method for predicting and generating biosafety risk scenarios based on a knowledge graph, which is characterized by comprising:
[0008] S1. Obtain a biosafety event, input the event text information of the biosafety event into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event;
[0009] S2. Select the risk type map structure corresponding to the biosafety risk type;
[0010] Construction of risk type map architecture:
[0011] Various past biosafety incidents are divided into biosafety risk types to obtain a biosafety event set corresponding to each biosafety risk type. Each past biosafety incident in the biosafety event set includes text information about the incident itself and text information about the solution. The biosafety field GPT model, based on the knowledge graph principle, analyzes the attribute triples shared by at least two different biosafety incidents in each biosafety event set. The analyzed attribute triples are used to construct the corresponding risk type graph architecture;
[0012] S3. Utilize the latest GPT model in the field of biosafety to extract entity content from the text information of the incident itself and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map;
[0013] S4. The triplet with entity content written into both the first and last nodes in the target risk type graph is used as a risk factor text vector to construct a risk factor text vector set;
[0014] S5. Input the risk factor text vector set into the latest GPT model for solution generation. The GPT model for solution generation outputs the solution text vector after training, and generates a solution to the biosafety incident based on the solution text vector.
[0015] The present invention also provides a biosafety risk scenario prediction and generation system based on a knowledge graph, which is characterized by including:
[0016] A risk type acquisition module is used to obtain a biosafety event and input the text information of the biosafety event itself into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event;
[0017] A graph architecture selection module is used to select the risk type graph architecture corresponding to the biosafety risk type;
[0018] A graph architecture construction module is used to classify various past biosafety incidents according to biosafety risk type, obtaining a biosafety event set corresponding to each biosafety risk type. Each past biosafety incident in the biosafety event set includes textual information about the incident itself and textual information about the solution. The biosafety domain GPT model, based on the knowledge graph principle, analyzes attribute triples shared by at least two different biosafety incidents in each biosafety event set and uses the analyzed attribute triples to construct the corresponding risk type graph architecture;
[0019] The feature map construction module is used to extract entity content from the text information of the event itself using the latest GPT model in the field of biosafety and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map;
[0020] A text vector construction module is used to take a triplet with entity content written into both the first and last nodes in the target risk type graph as a risk factor text vector, and construct a risk factor text vector set;
[0021] The solution generation module is used to input the risk factor text vector set into the latest GPT model for solution generation. The GPT model for solution generation is trained to output the solution text vector, and generate a solution to the biosafety incident based on the solution text vector.
[0022] The present invention further provides an electronic device, which is characterized in that it includes:
[0023] processor;
[0024] a memory for storing processor-executable instructions;
[0025] The processor is configured to call instructions stored in the memory to execute the method according to any one of claims 1 to 7.
[0026] The present invention also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the method according to any one of claims 1 to 7 when executed by a processor.
[0027] The positive progress effect of the present invention is:
[0028] This invention takes advantage of the knowledge graph and large language model, effectively integrating the knowledge graph and large language model technology with different functions, and improves the timeliness and accuracy of biosafety risk scenario prediction generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flowchart of a method for predicting and generating a biosafety risk scenario according to a preferred embodiment of the present invention.
[0030] Figure 2 This is a block diagram of a biosafety risk scenario prediction and generation system according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0032] like Figure 1As shown, an embodiment of the present invention provides a method for predicting and generating biosafety risk scenarios based on a knowledge graph, comprising the following steps:
[0033] Step 101: Obtain a biosafety event, and input the text information of the biosafety event itself into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event.
[0034] Among them, the risk type is obtained by using the Transformer model to train the general Transformer model using the text information of previous biosafety incidents as input and the corresponding biosafety risk type as output.
[0035] Types of biosafety risks include pathogen infection, contamination by hazardous substances, poisoning by hazardous substances, leakage of biological samples, etc.
[0036] Step 102: Select the risk type map architecture corresponding to the biosafety risk type.
[0037] In this step, based on the one-to-one correspondence between biosafety risk types and risk type map architectures, the risk type map architecture corresponding to the biosafety risk type can be obtained.
[0038] Among them, the construction of the risk type map architecture:
[0039] Various previous biosafety incidents (i.e., biosafety incidents that have occurred in the past) are divided according to biosafety risk types to obtain a biosafety event set corresponding to each biosafety risk type. Each previous biosafety incident in the biosafety event set includes text information about the incident itself and text information about the solution. The GPT model in the biosafety field analyzes the attribute triples shared by at least two different biosafety incidents in each biosafety event set based on the knowledge graph principle, and uses the analyzed attribute triples to construct the corresponding risk type graph architecture.
[0040] Each biosafety risk type corresponds to a biosafety event set. Each previous biosafety event in each set includes text information about the event itself and text information about the solution. The GPT model in the biosafety field can analyze the attribute triples shared by at least two different biosafety events in each set, and use the attribute triples analyzed for this set to construct the risk type map architecture corresponding to this biosafety risk type.
[0041] Step 103: Use the latest GPT model in the biosafety field to extract entity content from the text information of the biosafety incident itself and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map of the biosafety incident.
[0042] Among them, the GPT model in the biosafety field is obtained through training and learning using knowledge in the biosafety field.
[0043] Step 104: write the triplet of entity content in both the first and last nodes of the target risk type graph as a risk factor text vector to construct a risk factor text vector set.
[0044] Step 105: Input the risk factor text vector set into the latest solution generation GPT model. The solution generation GPT model outputs the solution text vector after training, and generates a solution to the biosafety incident in relatively fluent language based on the solution text vector.
[0045] Among them, the solution generation uses the construction of the GPT model:
[0046] The GPT model in the biosafety field extracts each biosafety event set, extracts the characteristic entity triples of each previous biosafety event in the biosafety event set, and writes them into the corresponding attribute triple nodes in the corresponding risk type graph architecture to obtain the written risk type graph corresponding to each previous biosafety event.
[0047] The triples related to the event itself, in which the feature entities are written into the first and last nodes of each risk type map after writing, are taken as a risk factor text vector, and the triples related to the solution are taken as a solution text vector, to construct the risk factor text vector set and solution text vector set corresponding to each risk type map after writing.
[0048] The general GPT model is trained and learned using the text vector sets of each risk factor, the corresponding solution text vector sets and the solution text information to construct a GPT model for solution generation.
[0049] In addition, we regularly summarize the latest biosafety incidents, and use the risk factor text vector set, solution text vector set, and solution text information corresponding to each new biosafety incident to fine-tune the GPT model for solution generation and obtain the latest GPT model for solution generation.
[0050] Regularly use the text information of the recently summarized biosafety incidents as input and the corresponding biosafety risk types as output to fine-tune the risk type Transformer model and obtain the latest risk type Transformer model.
[0051] Regularly use the recently added biosafety field knowledge to train the biosafety field GPT model to obtain the latest biosafety field GPT model.
[0052] like Figure 2 As shown, an embodiment of the present invention also provides a biosafety risk solution prediction and generation system based on a knowledge graph, including a risk type acquisition module 1, a graph architecture selection module 2, a feature graph construction module 3, a text vector construction module 4, a solution generation module 5, a graph architecture construction module 6 and a GPT model construction module 7.
[0053] The risk type acquisition module 1 is used to obtain a biosafety event, and input the text information of the biosafety event itself into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event.
[0054] The graph architecture selection module 2 is used to select the risk type graph architecture corresponding to the biosafety risk type.
[0055] The feature map construction module 3 is used to use the latest GPT model in the biosafety field to extract entity content from the text information of the event itself and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map.
[0056] The text vector construction module 4 is used to take the triplet with entity content written into the first and last nodes in the target risk type map as a risk factor text vector to construct a risk factor text vector set.
[0057] The solution generation module 5 is used to input the risk factor text vector set into the latest solution generation GPT model. The solution generation GPT model outputs the solution text vector after training, and generates a solution to the biosafety incident based on the solution text vector.
[0058] The graph architecture construction module 6 is used to classify various previous biosafety incidents according to biosafety risk types, and obtain a biosafety event set corresponding to each biosafety risk type. Each previous biosafety event in the biosafety event set includes text information of the event itself and text information of the solution. The GPT model in the biosafety field analyzes the attribute triples common to at least two different biosafety events in each biosafety event set based on the knowledge graph principle, and uses the analyzed attribute triples to construct the corresponding risk type graph architecture.
[0059] The GPT model construction module 7 is used to extract each biosafety event set using the GPT model in the biosafety field, extract the characteristic entity triples of each previous biosafety event in the biosafety event set and write them into the corresponding attribute triple nodes in the corresponding risk type map architecture, and obtain the risk type map corresponding to each previous biosafety event after writing; write the triples related to the event itself in the first and last nodes of each risk type map after writing as a risk factor text vector, and the triples related to the solution as a solution text vector, and construct the risk factor text vector set and solution text vector set corresponding to each risk type map after writing; use the risk factor text vector sets, the corresponding solution text vector sets and the solution text information to train and learn the general GPT model, and construct a GPT model for solution generation.
[0060] An embodiment of the present invention further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the aforementioned method.
[0061] An embodiment of the present invention further provides a computer-readable storage medium having computer program instructions stored thereon, and the computer program instructions implement the aforementioned method when executed by a processor.
[0062] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0063] Although specific embodiments of the present invention have been described above, those skilled in the art will appreciate that these are merely illustrative and that the scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, and such changes and modifications are intended to fall within the scope of the present invention.
Claims
1. A method for predicting and generating biosafety risk scenarios based on knowledge graphs, characterized by: include: S1. Obtain a biosafety event, input the event text information of the biosafety event into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event; S2. Select the risk type map structure corresponding to the biosafety risk type; Construction of risk type map architecture: Various past biosafety incidents are divided into biosafety risk types to obtain a biosafety event set corresponding to each biosafety risk type. Each past biosafety incident in the biosafety event set includes text information about the incident itself and text information about the solution. The biosafety field GPT model, based on the knowledge graph principle, analyzes the attribute triples shared by at least two different biosafety incidents in each biosafety event set. The analyzed attribute triples are used to construct the corresponding risk type graph architecture; S3. Utilize the latest GPT model in the field of biosafety to extract entity content from the text information of the incident itself and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map; S4. The triplet with entity content written into both the first and last nodes in the target risk type graph is used as a risk factor text vector to construct a risk factor text vector set; S5. Input the risk factor text vector set into the latest GPT model for solution generation. The GPT model for solution generation outputs the solution text vector after training, and generates a solution to the biosafety incident based on the solution text vector.
2. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 1, wherein: Solution generation in S5 uses the GPT model to build: The GPT model in the biosafety field extracts each biosafety event set, extracts the characteristic entity triples of each previous biosafety event in the biosafety event set, and writes them into the corresponding attribute triple nodes in the corresponding risk type map architecture, thereby obtaining the corresponding risk type map for each previous biosafety event. The triples related to the event itself, with the feature entities written into the first and last nodes of each risk type graph after writing, are used as a risk factor text vector, and the triples related to the solution are used as a solution text vector. The risk factor text vector set and solution text vector set corresponding to each risk type graph after writing are constructed. The general GPT model is trained and learned using the text vector sets of each risk factor, the corresponding solution text vector sets and the solution text information to construct a GPT model for solution generation.
3. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 2, wherein: Regularly summarize the most recently added biosafety incidents, and use the risk factor text vector set, corresponding solution text vector set, and solution text information corresponding to each newly added biosafety incident to fine-tune the GPT model for solution generation to obtain the latest GPT model for solution generation.
4. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 1, wherein: The risk type is obtained by training a general Transformer model using the text information of previous biosafety incidents as input and the corresponding biosafety risk type as output.
5. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 4, wherein: Regularly use the text information of the recently summarized biosafety incidents as input and the corresponding biosafety risk types as output to fine-tune the risk type Transformer model and obtain the latest risk type Transformer model.
6. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 1, wherein: The GPT model in the biosafety field is obtained by training and learning using knowledge in the biosafety field.
7. The method for predicting and generating biosafety risk scenarios based on knowledge graphs according to claim 6, wherein: Regularly use the recently added biosafety field knowledge to train the biosafety field GPT model to obtain the latest biosafety field GPT model.
8. A biosafety risk scenario prediction and generation system based on knowledge graph, characterized by: include: A risk type acquisition module is used to obtain a biosafety event and input the text information of the biosafety event itself into the latest risk type Transformer model to obtain the biosafety risk type of the biosafety event; A graph architecture selection module is used to select the risk type graph architecture corresponding to the biosafety risk type; A graph architecture construction module is used to classify various past biosafety incidents according to biosafety risk type, obtaining a biosafety event set corresponding to each biosafety risk type. Each past biosafety incident in the biosafety event set includes textual information about the incident itself and textual information about the solution. The biosafety domain GPT model, based on the knowledge graph principle, analyzes attribute triples shared by at least two different biosafety incidents in each biosafety event set and uses the analyzed attribute triples to construct the corresponding risk type graph architecture; The feature map construction module is used to extract entity content from the text information of the event itself using the latest GPT model in the field of biosafety and write it into the corresponding node of the selected risk type map architecture to obtain the target risk type map; A text vector construction module is used to take a triplet with entity content written into both the first and last nodes in the target risk type graph as a risk factor text vector, and construct a risk factor text vector set; The solution generation module is used to input the risk factor text vector set into the latest GPT model for solution generation. The GPT model for solution generation is trained to output the solution text vector, and generate a solution to the biosafety incident based on the solution text vector.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Risk label determination method and device based on knowledge graph
CN115374940A
Transformer equipment health degree evaluation method fusing pre-training language model and map
CN117435933A
Method and system for identifying starting risk of newly-added equipment
CN118504988A
Security management knowledge graph construction method
CN119357410A
Process industry safety knowledge graph error detection method and system based on large language model
CN119740644A
Cited By
A large model-based research project biosafety risk assessment method
CN122735680A