Endotoxin expert question-answering method and system based on neural symbol mixed architecture

By employing a neural symbolic hybrid architecture for endotoxin expert question-and-answer methods, which combines knowledge graphs and large language models, the problems of knowledge lag and accuracy in endotoxin question-and-answer systems are solved. This achieves efficient and reliable multi-scenario adaptation and supports intelligent data processing in drug production and clinical diagnosis and treatment.

CN121958488APending Publication Date: 2026-05-01NAT INST FOR FOOD & DRUG CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NAT INST FOR FOOD & DRUG CONTROL
Filing Date
2026-01-14
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing endotoxin-related question-and-answer systems suffer from problems such as knowledge lag, difficulty in ensuring factual accuracy, lack of conflict resolution mechanisms, and insufficient cross-scenario adaptability, failing to meet the needs of efficient and accurate knowledge acquisition for drug production and clinical diagnosis and treatment.

Method used

An expert question-and-answer method for endotoxins based on a neural symbolic hybrid architecture is adopted. By combining knowledge graphs and large language models, and through dynamic knowledge update mechanisms, logical conflict resolution algorithms, and multi-scenario deployment schemes, it can achieve accurate, efficient, and compliant question-and-answer for endotoxin-related issues.

Benefits of technology

It achieves a significant improvement in the timeliness of knowledge, enhances the accuracy and reliability of question answering, possesses conflict resolution capabilities and multi-scenario adaptability, supports cloud and edge deployment, and meets the intelligent data processing needs of scientific research and pharmaceutical production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958488A_ABST
    Figure CN121958488A_ABST
Patent Text Reader

Abstract

The invention discloses an endotoxin expert question-answering method and system based on a neural symbol mixed architecture. The method comprises the following steps: constructing a structured endotoxin knowledge graph; extracting a new entity and a new relationship from a new document through automatic processing, and dynamically fusing the new entity and the new relationship into the knowledge graph based on hybrid weighted calculation of semantic association strength and domain rules; receiving a natural language query of a user, and identifying a key entity and a core intention in the query by utilizing a large language model; and based on the key entity, searching a local knowledge sub-graph containing multi-hop neighbor nodes and an association relationship in the knowledge graph, after the sub-graph is subjected to symbol rule logic verification, serializing the sub-graph into a fact constraint context, inputting the fact constraint context into the large language model, and generating a natural language answer with evidence traceability information. According to the method, accurate, efficient and compliant intelligent question answering of endotoxin-related questions is realized through a neural symbol mixed architecture combining a knowledge graph and a large language model in combination with dynamic knowledge updating, logic conflict resolution and a multi-scene deployment scheme.
Need to check novelty before this filing date? Find Prior Art

Description

An Expert Question-Answering Method and System Based on a Neural Symbolic Hybrid Architecture Technical Field

[0001] This invention relates to the field of interdisciplinary technology of artificial intelligence and biomedicine, and in particular to an endotoxin expert question-and-answer method and system based on a neural symbolic hybrid architecture. Background Technology

[0002] Endotoxins (lipopolysaccharides, LPS), as components of the cell walls of Gram-negative bacteria, are crucial for detection and control in pharmaceutical production, clinical diagnosis and treatment, and microbiological research. Endotoxin-related knowledge encompasses multiple interdisciplinary fields such as microbiology, immunology, analytical chemistry, and pharmacopoeia regulations. This knowledge system is complex and rapidly evolving, making traditional expert consultation models insufficient to meet the needs for efficient and accurate knowledge acquisition.

[0003] Existing endotoxin-related question-and-answer systems and tools suffer from the following significant drawbacks: A prominent knowledge lag problem: Traditional expert systems rely on manually written rules and updated knowledge bases, resulting in high maintenance costs. The ingestion of new knowledge (such as recombinant C-factor rFC detection technology and revised clauses in the new pharmacopoeia) takes months, failing to respond promptly to field developments. Difficulty in guaranteeing factual accuracy: While emerging Large Language Models (LLMs) possess fluent natural language interaction capabilities, they struggle with handling rigorous scientific facts (such as USPs). The system is prone to "illusion" when dealing with pharmacopoeia regulations and the maximum effective dilution (MVD) calculation formula, resulting in erroneous outputs that could lead to serious compliance risks. Furthermore, it lacks effective conflict resolution mechanisms: contradictory information often exists in multi-source heterogeneous data (different literature, different versions of pharmacopoeia), and existing systems cannot automatically identify and reasonably resolve such conflicts, leading to poor consistency in the knowledge base. It also suffers from insufficient cross-scenario adaptability: existing systems are mostly designed for research scenarios and cannot directly connect to endotoxin detection equipment in pharmaceutical production lines, making it difficult to meet the needs of real-time data acquisition and compliance judgment in GMP production environments. Finally, its reasoning logic is opaque: most question-and-answer systems only output the final answer, lacking reasoning processes and evidence traceability, making it difficult for users to verify the reliability and compliance of the answers.

[0004] Therefore, developing an endotoxin expert system that combines factual accuracy, timely knowledge, logical rigor, and adaptability to multiple scenarios has become a key requirement for solving current technical pain points. Summary of the Invention

[0005] The purpose of this invention is to provide an expert question-answering method and system for endotoxin based on a neural symbolic hybrid architecture. By combining a neural symbolic hybrid architecture that integrates knowledge graphs and large language models, along with a dynamic knowledge update mechanism, a logical conflict resolution algorithm, and a multi-scenario deployment scheme, it can achieve accurate, efficient, and compliant question-answering for endotoxin-related questions.

[0006] To achieve the above objectives, the present invention provides the following solution: an endotoxin expert question-answering method based on a neural symbolic hybrid architecture, comprising the following steps: S1, initial graph construction: integrating multi-source heterogeneous biomedical data, and constructing a structured endotoxin knowledge graph (EndoKG) through biomedical entity recognition and relation extraction technologies; S2, dynamic knowledge injection: real-time monitoring of data sources, and when a new document is detected, extracting new entities and new relations through an automated processing pipeline, and dynamically fusing them into the endotoxin knowledge graph based on a hybrid weighted calculation of semantic association strength and domain rules. In the graph; S3, Query parsing: Receives the user's natural language query, uses a Large Language Model (LLM) to identify key entities and core intents in the query, and generates a standardized structured query representation; S4, Subgraph retrieval: Based on the key entities, retrieves local knowledge subgraphs containing multi-hop neighbor nodes and relationships in the endotoxin knowledge graph; S5, Hybrid reasoning and generation: Performs logical verification based on symbolic rules on the retrieved local knowledge subgraphs, serializes the verified subgraphs into fact constraint contexts, inputs them into the Large Language Model, and generates natural language answers with accompanying evidence tracing information.

[0007] Furthermore, in step S1, the multi-source heterogeneous biomedical data includes scientific literature, pharmacopoeia regulatory documents, bioinformatics database data, and endotoxin detection technology manuals; biomedical entity recognition is achieved using a pre-trained biomedical language model, and relation extraction is completed through a domain-adapted relation extraction model; the constructed endotoxin knowledge graph includes entity nodes, relation edges, and attribute information, and the entity nodes cover endotoxin-related substances, reagents, technologies, diseases, and regulatory standards.

[0008] Further, the dynamic knowledge injection in step S2 specifically includes: S201, new document preprocessing: performing format standardization, text cleaning, and sentence segmentation on the detected new document to remove redundant information and noise data; S202, candidate entity recognition: using a pre-trained biomedical language model (BioBERT) to scan the preprocessed new document sentence by sentence to identify candidate entities related to the endotoxin domain, including new substances, new technologies, new regulatory clauses, etc.; S203, hybrid association strength calculation: calculating the candidate entity e i With the existing entity e in the endotoxin knowledge graph j The mixed correlation strength S between as The calculation formula is:

[0009] in, Candidate entity e i With existing entity e j entity embedding vector, The cosine similarity represents the embedding vectors of two entities. For rule similarity based on pharmacopoeia hierarchy and domain knowledge rules, α is a dynamic weight coefficient with a value range of [0.5, 0.8]; S204, graph update determination: preset mixed association strength threshold T as If the mixed association strength S between the candidate entity and the existing entity as ≥T as If a candidate entity is a new entity with no matching existing entity, and is verified as a valid entity by domain rules, then a new entity node is created and relevant attribute information is added.

[0010] Furthermore, step S2 also includes a knowledge consistency maintenance sub-step, specifically: S2041, conflict detection: when dynamically fusing new relationships, the logical reasoning engine detects whether there is a logical conflict between the new relationship and existing relationships in the endotoxin knowledge graph. Logical conflicts include contradictory relationships (such as the simultaneous existence of "activation" and "inhibition" relationships), mutually exclusive relationships, and attribute conflicts; S2042, evidence strength scoring: for new relationships R that have conflicts... new With existing relationship R old Calculate the strength of evidence score (d) for each supporting document, using the formula: score(d) = ω1·IF d +ω2·ln(1 +Cite d ) where IF d Cite is the journal impact factor of the literature. d Let be the number of citations, ln be the natural logarithm function, and ω1 and ω2 be weighting coefficients; S2043, conflict resolution: retain the relation with the highest evidence strength score, if the new relation R new The strength of evidence score is greater than the existing relationship R. old If a predetermined threshold for the strength of evidence score is reached, the existing relationship is replaced with the new one; otherwise, the existing relationship is retained. Conflict resolution employs a discrimination formula based on the strength of evidence as follows:

[0011] Among them, D new D old These are collections of documents that support new relationships and existing relationships, respectively.

[0012] Furthermore, in step S3, the large language model adopts a model fine-tuned with endotoxin domain corpus; the core intent classification includes four categories: compliance query, technical consultation, result interpretation, and knowledge query; and the structured query representation adopts the (entity-relationship-intent) triple format.

[0013] Furthermore, in step S4, the subgraph retrieval adopts an approximate nearest neighbor retrieval algorithm based on graph neural networks, with a retrieval depth of 2-4 hops, and the retrieval results include entity node attributes, relationship type, and document identifier of evidence source.

[0014] Further, step S5 specifically includes: S501, Symbol rule verification: Calling the endotoxin domain-specific rule library to perform logical verification on the retrieved local knowledge subgraph. The domain-specific rule library contains at least 21 core rules, covering LAL reagent usage restrictions, endotoxin detection method compliance requirements, result judgment standards, etc.; S502, Subgraph serialization: Converting the logically verified local knowledge subgraph into a structured text format, including entity relationship links, attribute constraints, and rule verification results; S503, Answer generation: Combining the serialized factual constraint context with the user's query intent, inputting it into the large language model, and generating a natural language answer. The answer includes core conclusions, reasoning basis, and evidence source identifiers. The evidence source can be traced back to specific literature or pharmacopoeia clauses; S504, Dual-view display: Providing a dual-view display of text view and graph view on the user interaction interface. The text view displays the natural language answer and a list of evidence sources. The graph view adopts a force-oriented layout, supporting users to click on entities in the text view, synchronously highlighting the corresponding graph nodes and multi-hop reasoning paths.

[0015] This invention provides an endotoxin expert question-answering system based on a neural symbolic hybrid architecture, used to execute the aforementioned endotoxin expert question-answering method based on a neural symbolic hybrid architecture. The system includes: a knowledge base module for storing a graph-structured endotoxin knowledge graph (EndoKG), supporting hierarchical storage of hot and cold data. Hot data consists of frequently accessed core entities and relationships, while cold data consists of frequently accessed extended knowledge, stored using a distributed graph database; a dynamic injection module configured for an automated update process to perform dynamic knowledge injection, including a document monitor, entity parser, association strength calculator, conflict detector, and graph update decision maker. The document monitor supports real-time access from multiple data sources; a neural symbolic hybrid reasoning module containing neural components for semantic parsing and symbolic rule components for logical verification. The neural components employ a fine-tuned large language model and graph neural network, while the symbolic rule components store a rule library specific to the endotoxin domain, supporting dynamic addition and updating of rules; a human-computer interaction module providing a dual-view interactive interface, supporting natural language input, voice input, and file upload for query methods, and supporting query history storage and backtracking; and an external integration interface configured to use OPC. The UA protocol connects to endotoxin detection equipment, acquires detection data in real time, and links it to a knowledge graph, supporting standardized data format conversion.

[0016] Furthermore, the system supports two deployment modes: cloud-based distributed deployment and edge-based lightweight deployment. In the cloud-based distributed deployment mode, a microservice architecture is adopted, including graph services, inference services, interaction services, and data synchronization services, supporting high-concurrency access. In the edge-based lightweight deployment mode, a graph pruning module and a model compression module are configured. The graph pruning module retains only local subgraphs related to the current experimental or production topic, while the model compression module uses quantization and pruning techniques to compress the large language model volume and periodically performs incremental data synchronization with the central node.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture as described above.

[0018] As can be seen from the above technical solutions, compared with the prior art, the endotoxin expert question-answering method and system based on a neural symbolic hybrid architecture provided by this invention integrates a neural symbolic hybrid architecture of knowledge graph and large language model. It solves the hallucination problem through knowledge graph-guided retrieval-enhanced generation (KG-RAG) and solves the knowledge lag problem through a dynamic injection mechanism based on hybrid similarity calculation. It possesses dynamic knowledge update capabilities, conflict resolution mechanisms, and multi-scenario deployment capabilities; it has the following beneficial effects: significantly improved knowledge timeliness: through a dynamic knowledge injection mechanism based on hybrid association strength, the cycle from literature publication to database availability is shortened from the traditional monthly level to the minute level, ensuring that users always obtain the latest knowledge in the field; high accuracy and reliability of question answering: the neural symbolic hybrid architecture combined with knowledge graph-guided retrieval-enhanced generation technology effectively suppresses the "..." of large language models. For the "hallucination" problem, the accuracy of the answers is improved, and a complete evidence tracing and reasoning process is provided, meeting the rigor requirements of the biomedical field. It boasts strong conflict resolution capabilities: a conflict resolution algorithm based on the strength of literature evidence can automatically identify and process contradictory information in multi-source data, ensuring the consistency and authority of the knowledge base and reducing manual maintenance costs. It has broad scenario adaptability: supporting both cloud and edge deployment modes, it meets the full-scale knowledge query needs of research institutions and adapts to the real-time data processing and compliance judgment scenarios of pharmaceutical production lines. It can directly connect to testing equipment, realizing intelligent processing from data collection to result interpretation. It offers a user-friendly interactive experience: the dual-view display mode balances the intuitiveness of natural language answers with the logic of the knowledge graph. Users can clearly view the reasoning path through the graph view, enhancing their trust in the answers. It also supports multiple query methods to meet the usage habits of different users. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 is a flowchart of the endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to the present invention; Figure 2 is a structural diagram of the endotoxin expert question-and-answer system based on a neural symbolic hybrid architecture according to the present invention; Figure 3 is a schematic diagram of the dynamic knowledge injection principle of the present invention; Figure 4 is a schematic diagram of the user interface of the system according to the present invention; Figure 5 is a schematic diagram of the application interface of the endotoxin expert question-and-answer system in Embodiment 1 of the present invention; Figure 6 is a schematic diagram of the application interface of the endotoxin expert question-and-answer system in Embodiment 2 of the present invention; Figure 7 is a schematic diagram of the application interface of the endotoxin expert question-and-answer system in Embodiment 3 of the present invention. Detailed Implementation

[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] The purpose of this invention is to provide an endotoxin expert question-answering method and system based on a neural symbolic hybrid architecture. It addresses the hallucination problem through Knowledge Graph-Guided Retrieval Enhanced Generation (KG-RAG) and solves the knowledge lag problem through a dynamic injection mechanism based on hybrid similarity calculation. The technical improvements of this invention are as follows: Dynamic Knowledge Injection: An incremental update algorithm based on semantic association strength is designed. Unlike traditional batch updates, this invention introduces a hybrid similarity calculation formula, combining vector similarity and rule similarity to achieve minute-level document-to-knowledge graph fusion.

[0023] Neural symbolic hybrid reasoning: It adopts a dual architecture of "neural parsing + symbolic verification". LLM is responsible for intent understanding and fluent generation, while the symbolic rule engine (containing 21 domain rules) is responsible for logical cleaning of the retrieved subgraphs to ensure that the answer conforms to the pharmacopoeia.

[0024] Conflict resolution mechanism: To address potential contradictions in multi-source data (such as conflicting conclusions from different literature), an automatic resolution algorithm based on the strength of evidence is introduced to ensure the consistency of the knowledge base.

[0025] Multi-scenario adaptation: The system supports full cloud deployment and edge deployment in pharmaceutical production lines, and can be directly connected to testing equipment to achieve intelligent processing from data collection to compliance determination.

[0026] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0027] As shown in Figure 1, the present invention provides an endotoxin expert question-answering method based on a neural symbol hybrid architecture, which includes the following steps: S1, initial graph construction: integrate multi-source heterogeneous biomedical data, and construct a structured endotoxin knowledge graph (EndoKG) through biomedical entity recognition and relation extraction technology.

[0028] The multi-source heterogeneous biomedical data includes scientific literature, pharmacopoeia regulatory documents, bioinformatics database data, and endotoxin detection technology manuals; biomedical entity recognition is achieved using a pre-trained biomedical language model, and relation extraction is completed through a domain-adapted relation extraction model; the constructed endotoxin knowledge graph includes entity nodes, relation edges, and attribute information, with entity nodes covering endotoxin-related substances, reagents, technologies, diseases, and regulatory standards.

[0029] S2, Dynamic Knowledge Injection: Real-time monitoring of the data source; when a new document is detected, new entities and relationships are extracted through an automated processing pipeline. Based on a weighted calculation of semantic association strength and domain rules, these are dynamically fused into the endotoxin knowledge graph. Specifically, as shown in Figure 3, the dynamic knowledge injection in step S2 includes: S201, New Document Preprocessing: Standardizing the format, cleaning the text, and segmenting the detected new document to remove redundant information and noise data; S202, Candidate Entity Recognition: Using a pre-trained biomedical language model (BioBERT), the preprocessed new document is scanned sentence by sentence to identify candidate entities related to the endotoxin domain. Candidate entities include new substances, new technologies (e.g., recombinant C factor rFC), new regulatory clauses, etc.; S203, Weighted Association Strength Calculation: Calculating the weighted association strength of candidate entities e. i With the existing entity e in the endotoxin knowledge graph j The mixed correlation strength S between as The calculation formula is:

[0030] in, Candidate entity e i With existing entity e j entity embedding vector, The cosine similarity represents the embedding vectors of two entities. For rule similarity based on pharmacopoeia hierarchy and domain knowledge rules, α is a dynamic weight coefficient with a value range of [0.5, 0.8]; S204, graph update determination: preset mixed association strength threshold T asIf the mixed association strength S between the candidate entity and the existing entity as ≥T as If a candidate entity is a new entity with no matching existing entity, and is verified as a valid entity by domain rules, then a new entity node is created and relevant attribute information is added.

[0031] Step S2 further includes a knowledge consistency maintenance sub-step, specifically: S2041, Conflict Detection: When dynamically fusing new relationships, the logical reasoning engine detects whether there is a logical conflict between the new relationship and existing relationships in the endotoxin knowledge graph. Logical conflicts include contradictory relationships (such as the simultaneous existence of "activation" and "inhibition" relationships), mutually exclusive relationships, and attribute conflicts; S2042, Evidence Strength Scoring: For new relationships R that have conflicts... new With existing relationship R old Calculate the strength of evidence score (d) for each supporting document, using the formula: score(d) = ω1·IF d +ω2·ln(1 +Cite d ) where IF d Cite is the journal impact factor of the literature. d ω1 represents the number of citations, ln is the natural logarithm function (to smooth out long-tail effects), and ω2 are weighting coefficients (preferably ω1=0.6, ω2=2.0). Knowledge coverage is only performed when the strength of new evidence is significantly higher than that of old evidence (coefficient 1.5).

[0032] S2043, Conflict Resolution: Retain the relation with the highest evidence strength score; if the new relation R... new The strength of evidence score is greater than the existing relationship R. old If a predetermined threshold for the strength of evidence score is reached, the existing relationship is replaced with the new one; otherwise, the existing relationship is retained. Conflict resolution employs a discrimination formula based on the strength of evidence as follows:

[0033] Among them, D new D old These are document collections that support new relationships and existing relationships, respectively; S3, Query Parsing: Receives natural language queries from users, uses a Large Language Model (LLM) to identify key entities and core intents in the query, and generates a standardized structured query representation; the Large Language Model adopts a model fine-tuned with endotoxin domain corpus; the core intents are classified into four categories: compliance query, technical consultation, result interpretation, and knowledge query, and the structured query representation adopts the (entity-relationship-intent) triple format.

[0034] S4, Subgraph Retrieval: Based on the key entity, retrieve a local knowledge subgraph containing multi-hop neighbor nodes and relationships in the endotoxin knowledge graph; wherein, the subgraph retrieval adopts an approximate nearest neighbor retrieval algorithm based on graph neural network, with a retrieval depth of 2-4 hops, and the retrieval results include entity node attributes, relationship type, and document identifier of evidence source.

[0035] S5, Hybrid Reasoning and Generation: Performs symbolic rule-based logical verification on the retrieved local knowledge subgraphs, serializes the verified subgraphs into fact constraint contexts, inputs them into the large language model, and generates natural language answers with accompanying evidence tracing information. Specifically, step S5 includes: S501, symbol rule verification: calling the endotoxin domain-specific rule library to perform logical verification on the retrieved local knowledge subgraph. The domain-specific rule library contains at least 21 core rules, covering LAL reagent usage restrictions, endotoxin detection method compliance requirements, result judgment standards, etc.; S502, subgraph serialization: converting the logically verified local knowledge subgraph into a structured text format, including entity relationship links, attribute constraints, and rule verification results; S503, answer generation: combining the serialized fact constraint context with the user's query intent, inputting it into the large language model, and generating a natural language answer. The answer includes core conclusions, reasoning basis, and evidence source identifiers. The evidence source can be traced back to specific literature or pharmacopoeia clauses; S504, dual-view display: providing a dual-view display of text view and graph view on the user interaction interface. The text view displays the natural language answer and a list of evidence sources, while the graph view adopts a force-oriented layout, supporting users to click on entities in the text view to simultaneously highlight the corresponding graph nodes and multi-hop reasoning paths.

[0036] As shown in Figure 2, the endotoxin expert question-and-answer system based on a neural symbolic hybrid architecture provided by this invention is used to execute the aforementioned endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture. It includes: a knowledge base module for storing a graph-structured endotoxin knowledge graph (EndoKG), supporting hierarchical storage of hot and cold data. Hot data consists of frequently accessed core entities and relationships, while cold data consists of frequently accessed extended knowledge, stored using a distributed graph database; a dynamic injection module configured to execute an automated update process for dynamic knowledge injection, including a document monitor, entity parser, association strength calculator, conflict detector, and graph update decision maker. The document monitor supports real-time access from multiple data sources; a neural symbolic hybrid reasoning module containing neural components for semantic parsing and symbolic rule components for logical verification. The neural components employ a fine-tuned large language model and graph neural network, while the symbolic rule components store a rule library specific to the endotoxin domain, supporting dynamic addition and updating of rules; a human-computer interaction module, as shown in Figure 4, providing a dual-view interactive interface supporting natural language input, voice input, and file upload for querying, and supporting query history storage and backtracking; and an external integration interface configured to use OPC. The UA protocol connects to endotoxin detection equipment, acquires detection data in real time, and links it to a knowledge graph, supporting standardized data format conversion.

[0037] The system supports two deployment modes: cloud-based distributed deployment and edge-based lightweight deployment. In the cloud-based distributed deployment mode, a microservice architecture is adopted, including graph services, inference services, interaction services, and data synchronization services, supporting high-concurrency access with a maximum concurrent user count of no less than 500. Benefiting from the horizontal scaling characteristics of distributed architecture, the system is configured to support high-concurrency access (e.g., designed for no less than 500 concurrent users) to meet the concurrent usage needs of large pharmaceutical companies. The following are the technical supports for the calculations: Architecture: Microservice architecture (Kubernetes / Docker) supports horizontal scaling (scale-out); Inference optimization: Modern inference services (such as vLLM, TGI) adopt continuous batching technology, with a single A100 / H800 graphics card capable of supporting dozens of concurrent requests; Calculation: Assuming the system deploys 5-10 inference nodes, coupled with Nginx load balancing, supporting 500 concurrent connections (QPS) is a completely reasonable and conservative indicator in engineering (internet-level applications typically reach tens of thousands, while 500 is already very high for enterprise-level applications).

[0038] In the edge lightweight deployment mode, a graph pruning module and a model compression module are configured. The graph pruning module retains only local subgraphs related to the current experimental or production topic. The model compression module uses quantization and pruning techniques to compress the large language model volume to less than 30% of the original volume. It periodically performs incremental data synchronization with the central node, and the synchronization cycle can be configured to 1-24 hours.

[0039] In the edge lightweight deployment mode, the system integrates a model compression module. By employing quantization (such as INT4) and pruning techniques, it is theoretically possible to compress the size of large language models to less than 30% of their original size (for example, converting an FP16 model to INT4 format typically results in a compression of about 75%), thus adapting to the storage resources of edge devices. Furthermore, the system supports configurable incremental synchronization strategies, with the synchronization cycle set from 1 to 24 hours depending on network conditions (e.g., setting it to synchronize during off-peak hours at midnight every day).

[0040] Supporting Explanation: Quantization: This is currently the most mainstream model compression technique; the original model is usually FP16 (16-bit floating-point number); quantization to INT4 (4-bit integer) is the current industry standard (such as GPTQ, AWQ algorithm); calculation: 4bit / 16bit = 25%.

[0041] Pruning: Removes unimportant parameters from the model, which can typically reduce them by another 10%-20%.

[0042] Calculation: By using INT4 quantization, the model size is reduced to 25% of its original size. With the addition of a small amount of metadata, the size of a large language model can be compressed to less than 30% of its original size.

[0043] Furthermore, pharmacopoeia or literature updates are not instantaneous, but typically occur daily or weekly. Edge network conditions (such as factory servers) may be limited, making real-time synchronization of large files unsuitable. Setting a configurable window of 1-24 hours allows synchronization during off-peak hours at night, aligning with the logic of industrial environments.

[0044] As shown in Figure 5, in specific applications, the implementation process of the question-answering method of the endotoxin expert question-answering system based on a neural symbolic hybrid architecture provided in Example 1 is as follows: Step S2 is executed when a new document about "recombinant C factor (rFC)" is detected. First, the entire document is formatted and cleaned (e.g., headers and footers are removed, and unified encoding is performed) to extract the core research content paragraphs. Then, a pre-trained BioBERT model is used to scan the text and identify the candidate entity "recombinant C factor (rFC)". Subsequently, the association strength S between rFC and existing entities (such as LAL) is calculated. as The calculation formula is:

[0045] In this embodiment, a dynamic weighting coefficient is set. = 0.7.

[0046] Vector similarity calculation: Through BioBERT encoding, the cosine similarity (cos(v)) between rFC and LAL in the high-dimensional semantic space. rFC , v LAL The value was measured to be 0.82 (indicating a high degree of functional correlation between the two).

[0047] Rule similarity calculation: According to the pharmacopoeia hierarchy, both belong to the subclass "Bacterial endotoxin detection methods", and the calculated similarity is... rule The value is 0.90. Final strength calculation: S as = 0.7 × 0.82 + (1-0.7) × 0.90 = 0.574 + 0.270 = 0.844 Since the calculated result 0.844 > 0.65 (preset threshold), the system determines that the association is valid and automatically establishes the edge "rFC-[replacement]→LAL" to complete the incremental update of the knowledge graph.

[0048] If a new relation R is detected during the injection process new With existing relationship R old If a logical conflict exists (e.g., a new paper claims "rFC completely replaces LAL," while an older paper claims "only partially"), the system will invoke the conflict detection component. Conflict resolution employs a discriminant formula based on the strength of evidence:

[0049] Where D represents the set of documents supporting the relationship, and score(d) is the authority score normalized based on the journal's impact factor and citation count. Knowledge coverage is only performed when the strength of new evidence is significantly higher than that of old evidence (coefficient 1.5).

[0050] Example 2 is shown in Figure 6. In Example 2, the implementation process of the question-and-answer method of the endotoxin expert question-and-answer system based on the neural symbol hybrid architecture is as follows: The user inputs the query through the human-computer interaction interface: "Can LAL reagent be used to detect samples with severe β-glucan contamination?", and the system executes the following process: (1) Query parsing: The fine-tuned large language model is called to identify the key entities "LAL reagent" and "β-glucan". The core intent is "compliance query (applicability judgment)", and a structured query representation is generated (LAL reagent - detection applicability - β-glucan contaminated sample); (2) Subgraph retrieval: Based on the key entities "LAL reagent" and "β-glucan", the local knowledge subgraph within 3 hops is retrieved in EndoKG to obtain the associated node "G factor", the relationship "β-glucan - activation → G factor", "G factor - causing false positive → LAL reagent", "LAL reagent - detection object → endotoxin". (3) Symbol rule verification: Call the domain rule library and match Rule #12 "β-glucan will activate the G factor pathway in LAL and cause false positive interference". Logically verify the retrieved local knowledge subgraph and confirm that the subgraph information is consistent with the rule; (4) Subgraph serialization: Convert the verified subgraph into structured text: "Entity: LAL reagent, β-glucan, G factor; Relation: β-glucan activates G factor, and G factor causes false positive detection of LAL reagent; Rule verification result: conforms to Rule #12, and there is detection interference"; (5) Answer generation: The system adopts a hybrid reasoning mode, and the generation logic of the final answer A is expressed as: in, This represents the constraints after logical filtering of the subgraph by the application domain rule base (such as Rule #12: LAL and β-glucan have G-factor bypass reaction interference); Indicates vector concatenation or prompt word concatenation. Result generation: LLM combined with rule verification results generates the answer: "Cannot be used directly. Because β-glucan will activate the G factor pathway in LAL, leading to false positives (interference), it is recommended to use specific LAL reagents or rFC method." (6) Dual view display: The text view displays the above answer and the source of evidence (USP). <85> (References from Biochem.J.) The graph view uses a force-oriented layout to display the entity relationship network. When the user clicks on "G factor" in the text, the graph view simultaneously highlights the reasoning path "β-glucan → G factor → LAL reagent".

[0051] As shown in Figure 7, in Example 3, the endotoxin expert question-and-answer system based on a neural symbolic hybrid architecture is used for embedded integration in a pharmaceutical production line.

[0052] This embodiment demonstrates the application of the present invention in a GMP production environment.

[0053] The question-and-answer system is deployed on an edge server in the pharmaceutical workshop and is directly connected to the endotoxin detector via the OPC UA protocol. When the detector uploads the test value (0.05 EU / ml) of a certain batch of water for injection, the system executes the following process: (1) Data access: Receive the test data through the external integration interface, perform format standardization conversion, and extract the key information "water for injection" and "test value: 0.05 EU / ml"; (2) Knowledge association: Search the "endotoxin limit" attribute associated with "water for injection" in the cropped local knowledge subgraph and obtain the standard limit "0.25 EU / ml"; (3) Compliance judgment: Compare the test value (0.05 EU / ml) with the standard limit (0.25 EU / ml) and determine that the endotoxin test result of the batch of water for injection is qualified; (4) Result display and warning: Display the test result, qualification judgment conclusion and the standard on the industrial control interface. If the test value exceeds the standard limit, a pop-up alarm will be immediately triggered, and possible pollution source investigation paths will be pushed based on the causal chain reasoning in the graph (such as "contamination of water for injection storage container → endotoxin exceeding the standard" and "microbial contamination in preparation process → endotoxin exceeding the standard").

[0054] The endotoxin expert question-answering method and system based on a neural symbol hybrid architecture described in this invention has the following innovations: 1. High timeliness: Based on the incremental update mechanism of the hybrid similarity formula, the delay of new knowledge entering the database is reduced from the monthly level to the minute level.

[0055] 2. High reliability: The introduction of the symbol rule layer effectively intercepts compliance errors that may be generated by LLM (such as misjudging pharmacopoeia limits).

[0056] 3. Strong applicability: It supports edge computing and direct device connection, making the system not only a scientific research tool, but also directly serving the quality control of pharmaceutical production.

[0057] Furthermore, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture as described above.

[0058] Matters not covered in this invention are common knowledge.

[0059] Those skilled in the art will understand that, in addition to implementing the system, apparatus, and their modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and their modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.

[0060] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An endotoxin expert question-answering method based on a neural symbolic hybrid architecture, characterized in that, The process includes the following steps: S1, Initial Knowledge Graph Construction: Integrating multi-source heterogeneous biomedical data, a structured endotoxin knowledge graph is constructed using biomedical entity recognition and relation extraction technologies; S2, Dynamic Knowledge Injection: Real-time monitoring of data sources; when a new document is detected, new entities and relations are extracted through an automated processing pipeline, and dynamically fused into the endotoxin knowledge graph based on a hybrid weighted calculation of semantic association strength and domain rules; S3, Query Parsing: Receiving user natural language queries, identifying key entities and core intents in the query using a large language model, and generating a standardized structured query representation; S4, Subgraph Retrieval: Based on the key entities, retrieving local knowledge subgraphs containing multi-hop neighbor nodes and relationships from the endotoxin knowledge graph; S5, Hybrid Reasoning and Generation: Performing logical verification based on symbolic rules on the retrieved local knowledge subgraphs, serializing the verified subgraphs into factual constraint contexts, inputting them into the large language model, and generating natural language answers with accompanying evidence tracing information.

2. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 1, characterized in that, In step S1, the multi-source heterogeneous biomedical data includes scientific literature, pharmacopoeia regulatory documents, bioinformatics database data, and endotoxin detection technology manuals; biomedical entity recognition is achieved using a pre-trained biomedical language model, and relation extraction is completed through a domain-adapted relation extraction model; the constructed endotoxin knowledge graph includes entity nodes, relation edges, and attribute information, and the entity nodes cover endotoxin-related substances, reagents, technologies, diseases, and regulatory standards.

3. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 1, characterized in that, The dynamic knowledge injection in step S2 specifically includes: S201, new document preprocessing: standardizing the format, cleaning the text, and segmenting the detected new document to remove redundant information and noisy data; S202, candidate entity recognition: using a pre-trained biomedical language model to scan the preprocessed new document sentence by sentence to identify candidate entities related to the endotoxin domain, including new substances, new technologies, and new regulatory provisions; S203, hybrid association strength calculation: calculating the candidate entity e. i With the existing entity e in the endotoxin knowledge graph j The mixed correlation strength S between as The calculation formula is: in, Candidate entity e i With existing entity e j entity embedding vector, The cosine similarity represents the embedding vectors of two entities. For rule similarity based on pharmacopoeia hierarchy and domain knowledge rules, α is a dynamic weighting coefficient; S204, graph update determination: preset mixed association strength threshold T as If the mixed association strength S between the candidate entity and the existing entity as ≥T as If a candidate entity is a new entity with no matching existing entity, and is verified as a valid entity by domain rules, then a new entity node is created and relevant attribute information is added.

4. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 3, characterized in that, Step S2 further includes a knowledge consistency maintenance sub-step, specifically: S2041, Conflict Detection: When dynamically fusing new relationships, the logical reasoning engine detects whether there is a logical conflict between the new relationship and existing relationships in the endotoxin knowledge graph. Logical conflicts include contradictory relationships, mutually exclusive relationships, and attribute conflicts; S2042, Evidence Strength Scoring: For new relationships R that have conflicts... new With existing relationship R old Calculate the strength of evidence score (d) for each supporting document, using the formula: score(d) = ω1·IF d +ω2·ln(1 +Cite d ) where IF d Cite is the journal impact factor of the literature. d Let be the number of citations, ln be the natural logarithm function, and ω1 and ω2 be weighting coefficients; S2043, conflict resolution: retain the relation with the highest evidence strength score, if the new relation R new The strength of evidence score is greater than the existing relationship R. old If a predetermined threshold for the strength of evidence score is reached, the existing relationship is replaced with the new one; otherwise, the existing relationship is retained. Conflict resolution employs a discrimination formula based on the strength of evidence as follows: Among them, D new D old These are collections of documents that support new relationships and existing relationships, respectively.

5. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 1, characterized in that, In step S3, the large language model adopts a model that has been fine-tuned with endotoxin domain corpus; the core intent classification includes four categories: compliance query, technical consultation, result interpretation, and knowledge query; and the structured query representation adopts the (entity-relationship-intent) triple format.

6. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 1, characterized in that, In step S4, the subgraph retrieval adopts an approximate nearest neighbor retrieval algorithm based on graph neural networks, with a retrieval depth of 2-4 hops. The retrieval results include entity node attributes, relationship types, and document identifiers of evidence sources.

7. The endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture according to claim 1, characterized in that, Step S5 specifically includes: S501, Symbol rule verification: Calling the endotoxin domain-specific rule library to perform logical verification on the retrieved local knowledge subgraph. The domain-specific rule library contains at least 21 core rules, covering LAL reagent usage restrictions, endotoxin detection method compliance requirements, and result judgment standards; S502, Subgraph serialization: Converting the logically verified local knowledge subgraph into a structured text format, including entity relationship links, attribute constraints, and rule verification results; S503, Answer generation: Combining the serialized factual constraint context with the user's query intent and inputting it into the large language model to generate a natural language answer. The answer includes core conclusions, reasoning basis, and evidence source identifiers, with evidence sources traceable to specific literature or pharmacopoeia clauses; S504, Dual-view display: Providing a dual-view display of text view and graph view on the user interaction interface. The text view displays the natural language answer and a list of evidence sources, while the graph view adopts a force-oriented layout, allowing users to click on entities in the text view to simultaneously highlight the corresponding graph nodes and multi-hop reasoning paths.

8. An endotoxin expert question-and-answer system based on a neural symbolic hybrid architecture, used to execute the endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture as described in any one of claims 1-7, characterized in that, include: The knowledge base module stores the endotoxin knowledge graph with a graph structure, supporting hierarchical storage of hot and cold data. Hot data consists of core entities and relationships accessed frequently, while cold data consists of extended knowledge accessed infrequently. It is stored using a distributed graph database. The dynamic injection module is configured to perform an automated update process for dynamic knowledge injection. It includes a document monitor, entity parser, association strength calculator, conflict detector, and graph update decision maker. The document monitor supports real-time access from multiple data sources. The neural-symbolic hybrid reasoning module includes a neural component for semantic parsing and a symbolic rule component for logical verification. The neural component uses a fine-tuned large language model and graph neural network, while the symbolic rule component stores a rule library specific to the endotoxin domain and supports the dynamic addition and updating of rules. The human-computer interaction module provides a dual-view interactive interface, supports three query methods: natural language input, voice input, and file upload, and supports the storage and retrieval of query history. The external integration interface is configured to connect to the endotoxin detection device via the OPC UA protocol, acquire detection data in real time and associate it with the knowledge graph, and supports standardized data format conversion.

9. The endotoxin expert question-and-answer system based on a neural symbolic hybrid architecture according to claim 8, characterized in that, The system supports two modes: cloud-based distributed deployment and edge-based lightweight deployment. In the cloud-based distributed deployment mode, a microservice architecture is adopted, which includes graph services, inference services, interaction services, and data synchronization services, and supports high-concurrency access. In the edge lightweight deployment mode, a graph pruning module and a model compression module are configured. The graph pruning module retains only local subgraphs related to the current experimental or production topic, while the model compression module uses quantization and pruning techniques to compress the volume of large language models and periodically synchronizes incremental data with the central node.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the endotoxin expert question-and-answer method based on a neural symbolic hybrid architecture as described in any one of claims 1 to 7.