Pig antibiotic substitute knowledge discovery method, device, equipment, medium and product
By semantically enhancing and using graph neural network feature evolution on the knowledge graph of swine antibiotic alternatives, the problems of coarse entity semantic classification and poor graph connectivity were solved, enabling deep causal reasoning and multi-hop association discovery, thus improving the data quality and reasoning ability of the knowledge graph.
Patent Information
- Application Number
- CN202611296979.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-24
AI Technical Summary
Existing knowledge graphs for swine antibiotic alternatives suffer from coarse entity semantic classification and poor graph connectivity, making it difficult to perform multi-hop causal inference. Traditional methods lack the ability for deep semantic understanding and complex topological logical reasoning.
By semantic enhancement and graph neural network feature evolution, the original knowledge graph data is obtained, semantic role labeling and cascade alignment are performed, and a pre-trained language model is used to map it into a high-dimensional dense semantic vector. A two-layer GraphSAGE graph neural network is then constructed to perform neighbor feature fusion and link prediction.
It improves the quality of knowledge graph data, has deep causal reasoning capabilities, can efficiently discover the association strength and mechanism of antibiotic alternatives, and supports multi-hop causal inference.
Smart Images

Figure CN123159485A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of animal husbandry, and in particular to a method, apparatus, equipment, medium and product for discovering knowledge of antibiotic alternatives for pigs. Background Technology
[0002] In the livestock industry, finding safe and effective antibiotic alternatives has become a focal point. Existing research findings are scattered across a large amount of literature in the form of unstructured text. The knowledge graphs constructed after preliminary mining often suffer from highly fragmented knowledge, diverse conceptual expressions, and redundant and complex entity relationships. Entity naming is ambiguous, lacking a unified semantic classification and standard alignment; the graph topology is loose, with poor node connectivity, making it difficult to support multi-hop logical deduction and causal reasoning. Traditional knowledge graph application methods are mostly based on shallow graph traversal or simple statistical features, failing to effectively transform discrete entity relationships into computational models with deep semantic understanding and complex topological logical reasoning capabilities. Therefore, there is an urgent need for an intelligent knowledge discovery method capable of semantic enhancement and structured evolution of existing knowledge graphs. Summary of the Invention
[0003] This application provides a method, apparatus, equipment, medium, and product for discovering knowledge about swine antibiotic alternatives, in order to solve the problems of coarse entity semantic classification, poor graph connectivity, and difficulty in multi-hop causal inference in existing swine antibiotic alternative knowledge graphs. Through semantic enhancement and graph neural network feature evolution, it realizes the improvement of knowledge graph data quality and deep causal reasoning capabilities.
[0004] The first aspect of this application provides a method for discovering knowledge about antibiotic alternatives for pigs, including the following steps: Intervention entities are identified from the domain knowledge graph of antibiotic alternatives for target pigs. These intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides. The intervention measure entities are semantically labeled and concatenated for alignment to obtain alignment results, and the alignment results are mapped to semantic vectors. Based on the semantic vector, neighbor features are fused using the mean aggregation operator to obtain a node embedding vector, and link prediction is performed based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes.
[0005] According to one embodiment of this application, intervention entities are identified from a knowledge graph of antibiotic alternatives for target pigs, including: Obtain the raw data of the knowledge graph of the target swine antibiotic alternative domain; The original data is labeled with semantic roles to determine the intervention entity. The semantic roles include intervention entity, target entity, and effect entity.
[0006] According to one embodiment of this application, the semantic tagging and concatenation alignment of the intervention measure entity to obtain the alignment result includes: The entities representing the intervention measures are semantically categorized to obtain the annotation results; Based on the annotation results, the overall confidence level between the entity of the intervention measure to be aligned and the candidate entries of the preset standard database is calculated. The overall confidence level is a weighted sum of string inclusion matching degree, edit distance matching degree and semantic vector cosine matching degree. If the overall confidence level is within the first preset confidence level range, then the alignment result is confirmed based on the weighted sum. If the overall confidence level is within the second preset confidence level range, then a cross-validation request is sent to at least one preset external database, and the alignment result is determined based on the returned validation result. Wherein, the lower limit of the first preset confidence interval is greater than the upper limit of the second preset confidence interval.
[0007] According to one embodiment of this application, mapping the alignment result to a semantic vector includes: Obtain the aligned text labels of the intervention entity; The text labels of the intervention entities are input into a preset language model to obtain semantic vectors of a preset dimension. The semantic vectors of the preset dimension corresponding to all intervention entities are stacked in node order to form an initial node feature matrix for training the graph neural network model.
[0008] According to one embodiment of this application, the step of fusing neighbor features using a mean aggregation operator based on the semantic vector to obtain a node embedding vector includes: Construct a graph neural network model with at least two layers, with each layer employing the mean aggregation operator; For each layer of the network, the current semantic vector of each node is averaged with the current semantic vectors of all its neighboring nodes to obtain the embedding vector of each node in the next layer. The embedding vector output from the last layer of the network is used as the node embedding vector.
[0009] According to one embodiment of this application, the step of performing link prediction based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes includes: Positive sample pairs are sampled from existing relationships in the knowledge graph, and relationships that do not exist in the knowledge graph are generated as negative sample pairs. The number of negative sample pairs is equal to the number of positive sample pairs. The node embedding vectors of the two nodes in each sample pair are concatenated, and the concatenation result is input into a multilayer perceptron to obtain the predicted probability that there is a correlation between each sample pair. Calculate the error between the predicted probability and the true label, and optimize the parameters of the graph neural model with the goal of minimizing the error; Using the query entity as the anchor point, traverse each remaining node in the knowledge graph other than the query entity, and calculate the prediction probability between the query entity and each remaining node respectively. A preset number of nodes are output as candidate antibiotic substitutes in descending order of predicted probability, and the corresponding predicted probability is used as the association strength between the candidate antibiotic substitute and the query entity.
[0010] According to the knowledge discovery method for swine antibiotic alternatives provided in this application, semantic labeling and concatenation alignment are performed on each intervention entity in the original data of the knowledge graph of the target swine antibiotic alternative domain. The alignment results are mapped to semantic vectors, and neighbor features are fused using the mean aggregation operator to obtain node embedding vectors. Link prediction is then performed to obtain the association strength between at least two different candidate antibiotic alternative nodes. This solves the problems of coarse entity semantic classification, poor graph connectivity, and difficulty in multi-hop causal inference in existing swine antibiotic alternative knowledge graphs. Through semantic enhancement and graph neural network feature evolution, the data quality of the knowledge graph is improved, and deep causal reasoning capabilities are enhanced.
[0011] A second aspect of this application provides a knowledge discovery device for swine antibiotic alternatives, comprising: The determination module is used to determine intervention entities from the knowledge graph of antibiotic alternatives for target pigs, wherein the intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides; The alignment module is used to perform semantic tagging and concatenation alignment on the intervention measure entities to obtain the alignment result, and map the alignment result into a semantic vector; The prediction module is used to perform neighbor feature fusion using the mean aggregation operator based on the semantic vector to obtain a node embedding vector, and to perform link prediction based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes.
[0012] According to one embodiment of this application, the determining module is configured to: Obtain the raw data of the knowledge graph of the target swine antibiotic alternative domain; The original data is labeled with semantic roles to determine the intervention entity. The semantic roles include intervention entity, target entity, and effect entity.
[0013] According to one embodiment of this application, the alignment module is used for: The entities representing the intervention measures are semantically categorized to obtain the annotation results; Based on the annotation results, the overall confidence level between the entity of the intervention measure to be aligned and the candidate entries of the preset standard database is calculated. The overall confidence level is a weighted sum of string inclusion matching degree, edit distance matching degree and semantic vector cosine matching degree. If the overall confidence level is within the first preset confidence level range, then the alignment result is confirmed based on the weighted sum. If the overall confidence level is within the second preset confidence level range, then a cross-validation request is sent to at least one preset external database, and the alignment result is determined based on the returned validation result. Wherein, the lower limit of the first preset confidence interval is greater than the upper limit of the second preset confidence interval.
[0014] According to one embodiment of this application, the alignment module is used for: Obtain the aligned text labels of the intervention entity; The text labels of the intervention entities are input into a preset language model to obtain semantic vectors of a preset dimension. The semantic vectors of the preset dimension corresponding to all intervention entities are stacked in node order to form an initial node feature matrix for training the graph neural network model.
[0015] According to one embodiment of this application, the prediction module is configured to: Construct a graph neural network model with at least two layers, with each layer employing the mean aggregation operator; For each layer of the network, the current semantic vector of each node is averaged with the current semantic vectors of all its neighboring nodes to obtain the embedding vector of each node in the next layer. The embedding vector output from the last layer of the network is used as the node embedding vector.
[0016] According to one embodiment of this application, the prediction module is configured to: Positive sample pairs are sampled from existing relationships in the knowledge graph, and relationships that do not exist in the knowledge graph are generated as negative sample pairs. The number of negative sample pairs is equal to the number of positive sample pairs. The node embedding vectors of the two nodes in each sample pair are concatenated, and the concatenation result is input into a multilayer perceptron to obtain the predicted probability that there is a correlation between each sample pair. Calculate the error between the predicted probability and the true label, and optimize the parameters of the graph neural model with the goal of minimizing the error; Using the query entity as the anchor point, traverse each remaining node in the knowledge graph other than the query entity, and calculate the prediction probability between the query entity and each remaining node respectively. A preset number of nodes are output as candidate antibiotic substitutes in descending order of predicted probability, and the corresponding predicted probability is used as the association strength between the candidate antibiotic substitute and the query entity.
[0017] According to the knowledge discovery device for swine antibiotic alternatives provided in this application embodiment, semantic labeling and concatenation alignment are performed on each intervention entity in the original data of the knowledge graph of the target swine antibiotic alternative domain. The alignment results are mapped to semantic vectors, and neighbor features are fused using the mean aggregation operator to obtain node embedding vectors. Link prediction is then performed to obtain the association strength between at least two different candidate antibiotic alternative nodes. This solves the problems of coarse entity semantic classification, poor graph connectivity, and difficulty in multi-hop causal inference in existing swine antibiotic alternative knowledge graphs. Through semantic enhancement and graph neural network feature evolution, the device achieves improved knowledge graph data quality and deep causal reasoning capabilities.
[0018] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the porcine antibiotic alternative knowledge discovery method as described in the above embodiments.
[0019] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the porcine antibiotic alternative knowledge discovery method as described in the above embodiments.
[0020] A fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the knowledge discovery method for porcine antibiotic alternatives as described in the above embodiments.
[0021] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0022] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a method for discovering knowledge about swine antibiotic alternatives according to an embodiment of this application; Figure 2 This is a schematic diagram of the GraphSAGE graph neural network structure according to an embodiment of this application; Figure 3 This is a flowchart of a method for discovering porcine antibiotic alternatives based on vertical knowledge graphs and graph neural networks according to an embodiment of this application; Figure 4 This is an architecture diagram of a porcine antibiotic alternative discovery system based on vertical knowledge graphs and graph neural networks according to an embodiment of this application; Figure 5 This is a block diagram of a knowledge discovery device for swine antibiotic alternatives according to an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0024] The following description, with reference to the accompanying drawings, describes a method, apparatus, device, medium, and product for discovering knowledge of swine antibiotic alternatives according to embodiments of this application.
[0025] Those skilled in the art will understand that knowledge graph-based discovery methods in related technologies first obtain unstructured text from literature databases such as PubMed, perform entity recognition and relation extraction using a pre-trained language model, and store the extraction results as entity nodes and relation edges in a graph database (such as Neo4j) to construct a knowledge graph. Based on this, multi-hop retrieval is performed using a graph query language, or link prediction is performed after vectorizing the nodes using graph embedding techniques. Finally, the query results are presented to the user in the form of a visual graph or list to assist in research tasks such as relocation and target discovery.
[0026] However, the aforementioned related technologies suffer from the following main problems: First, cascade alignment relies solely on string matching, lacking semantic classification based on domain knowledge systems and standard mapping to authoritative databases (NCBI, PubChem); second, graph embedding methods are mostly shallow topological learning methods, failing to integrate textual semantics and multi-level neighbor features, making it difficult to support multi-hop causal inference. Therefore, addressing the problems in existing porcine antibiotic alternative knowledge graphs, such as coarse entity semantic classification lacking standardized alignment, loose graph structure with poor connectivity, and the difficulty of performing multi-hop causal inference using existing methods, this application provides a technical solution that can semantically enhance and topologically evolve the original data of knowledge graphs, thereby supporting deep knowledge discovery. This solution performs semantic enhancement and topological evolution on the original data of existing knowledge graphs, transforming them into a graph computation model with causal inference capabilities.
[0027] The core technology of this invention is as follows: After acquiring the original knowledge graph data, the original data is first labeled with semantic roles to determine the intervention entities. Then, the intervention entities are semantically labeled and aligned with an external authoritative database based on a comprehensive confidence model. Next, a pre-trained language model is called to map the entity text into a high-dimensional dense semantic vector. Finally, a two-layer GraphSAGE graph neural network is constructed to perform feature evolution and link prediction, and output an optimized embedding vector that integrates semantics and topology for mechanism mining and causal inference of antibiotic alternatives.
[0028] Specifically, Figure 1 This is a flowchart illustrating a method for discovering knowledge about swine antibiotic alternatives, provided in an embodiment of this application.
[0029] like Figure 1 As shown, the knowledge discovery method for antibiotic alternatives in pigs includes the following steps: In step S101, intervention entities are identified from the target pig antibiotic alternative domain knowledge graph. Intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides.
[0030] It should be noted that the categories of intervention entities mentioned above are merely exemplary. The categories of intervention entities in this application embodiment may also include other categories besides the plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides mentioned above, and are not specifically limited here.
[0031] Furthermore, in some embodiments, the raw data of the domain knowledge graph of the target pig antibiotic alternative is obtained, and the raw data is labeled with semantic roles to determine the intervention entity. The semantic roles include the intervention entity, the target entity, and the effect entity.
[0032] This application embodiment first obtains the original data of the constructed knowledge graph of swine antibiotic alternatives. The original data includes at least a set of entity nodes and a set of relation edges. The extracted entity types include at least core semantic units such as pig breeds, antibiotic alternatives, microbial communities, target genes, and phenotypic indicators.
[0033] For example, decomposition is triggered when the text label of an entity node contains the following patterns: (1) a combined description containing “treatment group / experimental group” and “indicator change trend”; (2) a coupled description containing “intervention measures”, “microbial name” and “abundance change”; (3) a direct association description containing “intervention measures” and “phenotypic indicators”. The decomposition algorithm identifies the core semantic units in the composite node through dependency parsing algorithm and uses semantic role labeling to determine the semantic role of each unit (such as intervention measure entity, target entity and effect entity). For example, for the composite node “zinc oxide treatment group significantly reduced the colonization of enterotoxigenic Escherichia coli”, the algorithm decomposes it into three atomic entities: “zinc oxide”, “enterotoxigenic Escherichia coli” and “colonization reduction”, and establishes relation edges “zinc oxide → acts on → enterotoxigenic Escherichia coli”, “zinc oxide → leads to → colonization reduction” and “zinc oxide” intervention measure entity respectively.
[0034] In step S102, the intervention measure entities are semantically labeled and concatenated to obtain the alignment result, and the alignment result is mapped to a semantic vector.
[0035] Further, in some embodiments, semantic tagging and cascade alignment are performed on the intervention entity to obtain the alignment result, including: semantic category labeling of the intervention entity to obtain the labeling result, wherein the semantic categories include plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, bioactive peptides or other categories; based on the labeling result, the comprehensive confidence score between the intervention entity to be aligned and the candidate entries in the preset standard database is calculated, wherein the comprehensive confidence score is a weighted sum of string inclusion matching score, edit distance matching score and semantic vector cosine matching score; if the comprehensive confidence score is within a first preset confidence score interval, the alignment result is confirmed according to the weighted sum; if the comprehensive confidence score is within a second preset confidence score interval, a cross-validation request is sent to at least one preset external database, and the alignment result is determined according to the returned validation result; wherein the lower limit of the first preset confidence score interval is greater than the upper limit of the second preset confidence score interval.
[0036] Furthermore, in some embodiments, mapping the alignment result into a semantic vector includes: obtaining the aligned text labels of the intervention entities; inputting the text labels of the intervention entities into a preset language model to obtain a semantic vector of a preset dimension, so as to stack the semantic vectors of the preset dimension corresponding to all intervention entities in node order to form an initial node feature matrix for training the graph neural model.
[0037] Specifically, this invention performs semantic tagging and alignment on intervention measure entities. The semantic tagging module calls a large language model (DeepSeek-V3 in this embodiment) for refined classification, with classification dimensions including plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides. A multi-cascaded search pipeline is used for cascaded alignment: first, precise matching is performed in a MySQL database, followed by semantic-level fuzzy recall using the FAISS vector retrieval engine. The underlying algorithm incorporates a confidence calculation model based on multi-feature fusion, the mathematical principle of which is formally expressed as: ; in, , , The weighting coefficient is dynamically adjusted according to the entity type (0.2, 0.2, and 0.6 are used in this embodiment). Include indicator functions for strings. To edit distance similarity, This is a high-dimensional semantic cosine similarity. The underlying semantic embedding directly uses the 768-dimensional PubMedBERT model for representation. The system first performs exact matching in the MySQL database. If the matching fails, the FAISS vector retrieval engine is introduced for semantic-level fuzzy recall, calculating the combined confidence C between the entity to be aligned and the candidate standard entity.
[0038] When the overall confidence level If the value exceeds a preset threshold (preferably 0.85), the alignment result is directly confirmed and written to the Neo4j graph database; when the overall confidence level... When the data is in the medium confidence range (e.g., 0.5-0.85), the system concurrently requests APIs from authoritative external databases such as NCBI, PubChem, and KEGG for joint cross-validation. Combining the identifiers and semantic information returned by the external databases, the system finally determines the standard entity mapping.
[0039] In step S103, based on the semantic vector, neighbor features are fused using the mean aggregation operator to obtain the node embedding vector, and link prediction is performed based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes.
[0040] Furthermore, in some embodiments, the node embedding vector is obtained by fusing neighbor features using a mean aggregation operator based on the semantic vector, including: constructing a graph neural model with at least two layers, each layer employing a mean aggregation operator; for each layer, performing mean aggregation on the current semantic vector of each node and the current semantic vectors of all neighboring nodes of each node to obtain the embedding vector of each node in the next layer; and using the embedding vector output by the last layer of the network as the node embedding vector.
[0041] Specifically, after completing the concatenation alignment, this invention calls a lightweight pre-trained language model based on the Transformer architecture (all-MiniLM-L6-v2 is used in this embodiment) to map the original unstructured one-dimensional text labels of all entity nodes in the graph into high-dimensional continuous dense semantic vectors. The vector dimension is preferably 256 to 768 dimensions (384 dimensions are used in this embodiment).
[0042] For example, the model takes entity name strings as input and outputs a 384-dimensional continuous vector representation. Specifically, it batch-reads the `name` attribute of all nodes in the Neo4j graph database, and uses the Sentence-Transformers framework to call the pre-trained model in parallel, generating 384-dimensional floating-point vectors as the initial feature matrix X∈R(N×384) for the graph neural network nodes, where N is the total number of nodes. The core function of this step is to transform discrete text labels into a computable continuous vector space, enabling the subsequent graph convolution process to compute the potential homology between different biological terms.
[0043] Furthermore, a two-layer graph neural network feature evolution is performed. This invention constructs a two-layer GraphSAGE (GraphSample and Aggregate, inductive graph neural network model) graph neural network architecture, and uses the mean aggregation operator to fuse neighbor features within the receptive field. The core physical process of neighbor aggregation and node representation update in the GraphSAGE model is represented as follows: ; in, Represents the target node In the Hidden layer density characterization of the layer; It is the ReLU activation function; For the first Layer-learnable weight matrix; For the target node In the The feature vector of the layer; For nodes All first-order neighbor nodes In the The set of feature vectors of a layer; For the target node The set of first-order neighbor nodes; The operation computes the node itself and all its neighboring nodes in the th The mean of the layer representation; The initial semantic vector is generated by the above steps. The hidden layer dimension is preferably 64~256 dimensions (128 dimensions are used in this embodiment) to balance the generalization ability and computational efficiency of the model.
[0044] For example, a schematic diagram of a graph neural network structure is shown below. Figure 2 As shown, in the network topology, the system constructs a two-layer GraphSAGE architecture, with the hidden layer dimension set to 128 dimensions.
[0045] Further, in some embodiments, link prediction is performed based on node embedding vectors to obtain the association strength between at least two different candidate antibiotic alternatives, including: sampling positive sample pairs from existing associations in the knowledge graph and generating associations that do not exist in the knowledge graph as negative sample pairs, with the number of negative sample pairs equal to the number of positive sample pairs; concatenating the node embedding vectors of the two nodes in each sample pair and inputting the concatenation result into a multilayer perceptron to obtain the predicted probability that there is an association between each sample pair; calculating the error between the predicted probability and the true label, and optimizing the parameters of the graph neural model with the goal of minimizing the error; using the query entity as the anchor point, traversing each remaining node in the knowledge graph other than the query entity, and calculating the predicted probability between the query entity and each remaining node respectively; outputting a preset number of nodes as candidate antibiotic alternatives in descending order of predicted probability, and using the corresponding predicted probability as the association strength between the candidate antibiotic alternative and the query entity.
[0046] Specifically, by continuously approximating the global optimum through the network, the final output is an optimized embedded feature set that integrates textual semantics and topological logic, which is used for target mechanism mining and phenotypic intervention inference of downstream antibiotic alternatives. The link prediction task adopts an unsupervised learning paradigm, where the model optimizes parameters by predicting known edges (positive samples) and randomly sampled spurious edges (negative samples) in the graph.
[0047] Furthermore, the supervision signal for model training comes from the link prediction task. This embodiment employs an unsupervised learning paradigm, using existing edges in the graph as positive samples and generating an equal number of negative samples (i.e., edges not present in the graph) through random sampling. The link predictor uses a multilayer perceptron structure, with node pairs as input. Embedded vector concatenation [ (2); (2) The output is the connection probability. In the link prediction task at the network backend, the connection is based on a multilayer perceptron predictor. A binary cross-entropy loss function with Logits is used as the optimization objective.
[0048] The model employs the Adam optimizer with an initial learning rate of 0.01 and 100 training epochs. Over these 100 iterations, a binary cross-entropy loss function (BCE) with logits is used to continuously approximate the global optimum. Specifically, during training, the preferred learning rate is 0.001–0.05 (0.01 in this embodiment), and the preferred number of training epochs is 50–200 (100 in this embodiment). During training, the system dynamically monitors the loss function value, completing training when the loss value converges to a stable range. In this embodiment, the loss value decreased from the initial 0.6915–0.6947 to 0.1781–0.2059, representing a decrease of 70.22%.
[0049] After training, the model outputs an optimized embedding feature set H∈R(N×128) that integrates textual semantics and topological logic. For downstream applications, two query modes are supported: (1) Using a specific entity as the query object, calculate its connection probability with all other nodes in the entire graph, and output the Top-K association results in descending order of probability values; (2) Using entity type as a constraint, perform path deduction, and identify high-confidence multi-hop causal paths by traversing the embedding space output by the graph neural network and combining an attention mechanism. The output results are presented in a structured form, including the target entity, associated entities, association strength, and attribute category.
[0050] To facilitate a more intuitive understanding of the knowledge discovery method for porcine antibiotic alternatives in this application by those skilled in the art, a detailed description is provided below in conjunction with the accompanying drawings.
[0051] like Figure 3 As shown, the discovery method of this invention includes the following core workflow steps: In the cascaded entity disambiguation and alignment stage, the system formulates a highly rigorous rule-driven cascaded cleaning mechanism combined with large model empowerment. Next, a pre-training engine (all-MiniLM-L6-v2 in this embodiment) is invoked to map unstructured text names into 384-dimensional dense golden semantic vectors. Finally, the high-dimensional vectors are input into a graph neural network for link prediction training, outputting optimized entity vectors with deep biological multidimensional topological evolution laws to support multi-hop causal inference.
[0052] The following is combined with Figure 4 This application introduces a knowledge enhancement and discovery system for swine antibiotic alternatives based on graph neural networks. The system adopts a hierarchical collaborative architecture, which includes, from bottom to top, a physical hardware and scheduling layer, a storage and cache matrix layer, a core computing and model layer, and an application and business discovery layer.
[0053] The physical hardware and scheduling layer is deployed on heterogeneous computing platforms (such as Apple Silicon architecture, x86 architecture, ARM architecture, or GPU clusters), and includes a hardware scheduling policy module. When extracting dense semantic vectors and performing graph tensor calculations, this module automatically switches the tensor allocation engine between the GPU hardware accelerator and the CPU to overcome the occasional low-level technical error problems when transferring node features across devices.
[0054] Furthermore, the storage and caching matrix layer constructs a collaborative heterogeneous computing storage matrix, specifically including: Graph databases: As the core knowledge computing carrier, they store the topological structure and entity relationships of knowledge graphs.
[0055] Relational databases: used for millisecond-level precise entity matching and mapping under high concurrency.
[0056] Vector retrieval engine: Builds localized, high-speed, dense vector index files for semantic-level fuzzy alignment exploration.
[0057] Local lightweight caching library: mounted on the development platform, providing cache penetration defense based on space-for-time tradeoff for external authoritative benchmark API verification.
[0058] Furthermore, the core computing and model layer, serving as the system's data processing hub, comprises the following three core engines: Semantic Tagging Large Language Model Engine: Responsible for entity, relation, and attribute extraction and classification tagging of unstructured text in the early stage, including single / two-stage adaptive degradation control modules.
[0059] Feature-based semantic upscaling engine: Utilizes a lightweight pre-trained model to encode discrete text entities into high-dimensional dense semantic vectors.
[0060] Graph Neural Network Engine: Deploys a two-layer GraphSAGE architecture, attaches a multi-layer perceptron to the predictor, and trains the structured representation evolution of the entire graph through a mean aggregation mechanism.
[0061] Furthermore, the application and business discovery layer serves as a decision support layer for end users. This layer encapsulates specific business scripts through highly abstracted Cypher high-level execution plan code, providing users with empirical results such as target mechanism correlation tracking, macroscopic phenotypic causal inference, and ranking of specific antibiotic alternatives.
[0062] To verify the effectiveness of this invention, a systematic experimental evaluation was conducted on a real-world knowledge graph of swine antibiotic alternatives. The dataset was derived from literature collected from the PubMed database between 2000 and 2025. Initially, 135,699 articles were collected, and after multi-stage screening, 5,694 high-quality articles were retained. Eleven core entities (including swine breeds, antibiotic alternatives, microbial communities, target genes, phenotypic indicators, etc.) were extracted from these, ultimately forming an original knowledge graph containing 86,480 entity nodes and 187,924 relational edges.
[0063] Furthermore, the model training performance parameters are shown in Table 1: Table 1
[0064] The preferred parameter configurations for specific implementations of this invention are shown in Table 2: Table 2
[0065] The following section provides a detailed explanation of the knowledge discovery method for porcine antibiotic alternatives proposed in this application, using specific examples.
[0066] Example 1: Discovery of an antibiotic alternative mechanism based on zinc oxide.
[0067] Input: Input a collection of academic literature on "zinc oxide" as a pig feed additive from the PubMed literature database, including unstructured text such as abstracts, experimental methods, and results data.
[0068] Processing procedure: 1. Entity semantic tagging and cascade alignment: The system performs semantic tagging on “zinc oxide”, and calculates a comprehensive score of 0.92 based on the comprehensive confidence model, which exceeds the threshold of 0.85, and directly classifies it as a “trace element” category.
[0069] 2. Feature vector semantic dimension upscaling: The all-MiniLM-L6-v2 pre-trained model is called to map each entity into a 384-dimensional dense semantic vector.
[0070] 3. Graph Neural Network Feature Evolution: The constructed two-layer GraphSAGE model uses the mean aggregation operator to fuse neighbor features, and the loss converges to 0.1781 after training.
[0071] 4. Link Prediction and Alternative Deduction: Using "zinc oxide" as the query entity, the cosine similarity between it and all other nodes in the entire graph is calculated. The candidate alternatives with the highest similarity are selected, and the results are shown in Table 3. Table 3
[0072] Output: The system not only outputs highly similar candidate alternatives but also automatically labels their academic categories, facilitating rapid screening by researchers. Among them, the second-ranked probiotic, "Lactobacillus reuteri," has a similarity of 0.9866 to "zinc oxide" and belongs to the probiotic category, possessing good biocompatibility.
[0073] Example 2: Deduction of the cross-stage regulatory pathway of antibiotic alternatives based on "zinc oxide".
[0074] To further verify the biological rationality of the inference results, the system executed the mechanism overlap analysis module, which extracted the biological targets of the common action of the two entities (Lactobacillus reuteri and zinc oxide) through graph database queries. The core query logic of this module is: to search for common nodes in the 1-2 step neighborhood of each entity, and to limit the node type to biologically related categories (microorganisms, growth performance, metabolic response, digestibility, gene expression, disease, immunity), while excluding interfering nodes related to the experimental background (such as nodes containing keywords such as experimental pigs, experimental treatment, and diet). The common biological targets returned by the system for zinc oxide and Lactobacillus reuteri are shown in Table 4: Table 4
[0075] These common targets cover multiple dimensions, including gut microbiota (Enterobacteriaceae), intestinal barrier function (mucus secretion), production performance (feed intake, oxygen consumption), and metabolic pathways (valine, stress response). They are highly consistent with the known biological functions of zinc oxide and Lactobacillus reuteri, providing mechanistic evidence to support the substitution relationship between the two.
[0076] In summary, the present invention has the following advantages over the prior art: (i) To achieve deep knowledge discovery with multi-hop causal reasoning capabilities.
[0077] The two-layer GraphSAGE neural network constructed in this invention captures multi-order neighbor features of nodes through the mean aggregation operator, deeply integrating textual semantics with topological structure, and achieving a leap in ability from shallow co-occurrence associations to deep causal inference. In the link prediction task, after 100 rounds of training, the loss function value of the model steadily decreased from the initial 0.6915~0.6947 to 0.1781~0.2059, with a loss reduction rate of 70.22%, indicating that the model has successfully learned the topological evolution law of the graph and has the deep ability to perform multi-hop inference across the text surface.
[0078] (ii) Successfully discover novel associations with biological consistency.
[0079] This invention has yielded innovative discoveries in practical applications. For example, for zinc oxide, it successfully identified candidate alternatives with highly similar mechanisms of action (such as *Lactobacillus reuteri*), with a correlation strength as high as 0.9866. Simultaneously, the system, through a mechanism overlap analysis module, automatically revealed the common targets of both in gut microbiota regulation, intestinal barrier function, production performance, and metabolic pathways, providing interpretable biological evidence for the substitution relationship. This complete technological chain achieves a closed loop from discovering alternatives to verifying substitution mechanisms, providing a systematic and intelligent solution for the efficient screening and mechanism research of antibiotic alternatives in pigs.
[0080] (iii) A standardized cascading alignment mechanism conforming to the domain knowledge system has been constructed. This invention introduces a large language model for refined semantic labeling, and combines a comprehensive confidence model with cross-validation using authoritative external databases to achieve standardized mapping of entities to authoritative international databases such as NCBI, PubChem, and KEGG. This mechanism not only overcomes the limitations of existing technologies that rely on string matching for cascade alignment, but also establishes a standardized classification framework that conforms to the knowledge system of animal science, providing technical support for knowledge fusion and reuse across documents and databases.
[0081] According to the knowledge discovery method for swine antibiotic alternatives proposed in this application, semantic labeling and concatenation alignment are performed on each intervention entity in the original data of the knowledge graph of the target swine antibiotic alternative domain. The alignment results are mapped to semantic vectors, and neighbor features are fused using the mean aggregation operator to obtain node embedding vectors. Link prediction is then performed to obtain the association strength between at least two different candidate antibiotic alternative nodes. This solves the problems of coarse entity semantic classification, poor graph connectivity, and difficulty in multi-hop causal inference in existing swine antibiotic alternative knowledge graphs. Through semantic enhancement and graph neural network feature evolution, the data quality of the knowledge graph is improved, and deep causal reasoning capabilities are enhanced.
[0082] Next, the knowledge discovery device for swine antibiotic alternatives proposed according to embodiments of this application is described with reference to the accompanying drawings.
[0083] Figure 5 This is a block diagram of a knowledge discovery device for swine antibiotic alternatives according to an embodiment of this application.
[0084] like Figure 5 As shown, the knowledge discovery device 10 for swine antibiotic alternatives includes: a determination module 100, an alignment module 200, and a prediction module 300.
[0085] The system includes a determination module 100, which determines intervention entities from the knowledge graph of antibiotic alternatives for target pigs. The intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides. An alignment module 200 performs semantic tagging and cascade alignment on the intervention entities to obtain alignment results and maps the alignment results to semantic vectors. A prediction module 300 performs neighbor feature fusion using the mean aggregation operator based on the semantic vectors to obtain node embedding vectors and performs link prediction based on the node embedding vectors to obtain the association strength between at least two different candidate antibiotic alternative nodes.
[0086] Furthermore, in some embodiments, the determining module 100 is used to: acquire raw data of the knowledge graph of antibiotic alternatives for target pigs; and determine intervention entities by semantic role labeling on the raw data, wherein the semantic roles include intervention entities, target entities, and effect entities.
[0087] Further, in some embodiments, the alignment module 200 is used to: perform semantic category annotation on the intervention entity to obtain annotation results; calculate the comprehensive confidence score between the intervention entity to be aligned and candidate entries in a preset standard database based on the annotation results, wherein the comprehensive confidence score is a weighted sum of string inclusion matching score, edit distance matching score, and semantic vector cosine matching score; if the comprehensive confidence score is within a first preset confidence score interval, confirm the alignment result according to the weighted sum; if the comprehensive confidence score is within a second preset confidence score interval, send a cross-validation request to at least one preset external database, and determine the alignment result based on the returned validation result; wherein the lower limit of the first preset confidence score interval is greater than the upper limit of the second preset confidence score interval.
[0088] According to one embodiment of this application, the alignment module 200 is used to: obtain the text labels of the intervention entities after alignment processing; input the text labels of the intervention entities into a preset language model to obtain semantic vectors of a preset dimension, so as to stack the semantic vectors of the preset dimension corresponding to all intervention entities in node order to form an initial node feature matrix for training the graph neural model.
[0089] According to one embodiment of this application, the prediction module 300 is used to: construct a graph neural model with at least two layers, each layer employing a mean aggregation operator; for each layer of the network, perform mean aggregation on the current semantic vector of each node and the current semantic vectors of all neighboring nodes of each node to obtain the embedding vector of each node in the next layer; and use the embedding vector output by the last layer of the network as the node embedding vector.
[0090] According to one embodiment of this application, the prediction module 300 is configured to: sample positive sample pairs from existing associations in the knowledge graph, and generate associations that do not exist in the knowledge graph as negative sample pairs, wherein the number of negative sample pairs is equal to the number of positive sample pairs; concatenate the node embedding vectors of the two nodes in each sample pair, input the concatenation result into a multilayer perceptron, and obtain the predicted probability that there is an association between each sample pair; calculate the error between the predicted probability and the true label, and optimize the parameters of the graph neural model with the goal of minimizing the error; traverse each remaining node in the knowledge graph other than the query entity using the query entity as the anchor point, and calculate the predicted probability between the query entity and each remaining node respectively; output a preset number of nodes as candidate antibiotic alternatives in descending order of predicted probability, and use the corresponding predicted probability as the association strength between the candidate antibiotic alternative and the query entity.
[0091] It should be noted that the foregoing explanation of the embodiment of the method for discovering knowledge about swine antibiotic alternatives also applies to the swine antibiotic alternative knowledge discovery device of this embodiment, and will not be repeated here.
[0092] The porcine antibiotic alternative knowledge discovery device proposed in this application performs semantic labeling and concatenation alignment on each intervention entity in the original data of the target porcine antibiotic alternative domain knowledge graph. The alignment results are mapped to semantic vectors, and neighbor features are fused using a mean aggregation operator to obtain node embedding vectors. Link prediction is then performed to obtain the association strength between at least two different candidate antibiotic alternative nodes. This solves the problems of coarse entity semantic classification, poor graph connectivity, and difficulty in multi-hop causal inference in existing porcine antibiotic alternative knowledge graphs. Through semantic enhancement and graph neural network feature evolution, it achieves improved knowledge graph data quality and deep causal reasoning capabilities.
[0093] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0094] When the processor 602 executes the program, it implements the knowledge discovery method for porcine antibiotic alternatives provided in the above embodiments.
[0095] Furthermore, electronic devices also include: Communication interface 603 is used for communication between memory 601 and processor 602.
[0096] The memory 601 is used to store computer programs that can run on the processor 602.
[0097] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0098] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0099] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0100] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0101] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for discovering knowledge about swine antibiotic alternatives.
[0102] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method for discovering knowledge about swine antibiotic alternatives.
[0103] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0104] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0105] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0106] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0107] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0108] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0109] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0110] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for discovering knowledge about antibiotic alternatives for pigs, characterized in that, Includes the following steps: Intervention entities are identified from the domain knowledge graph of antibiotic alternatives for target pigs. These intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides. The intervention measure entities are semantically labeled and concatenated for alignment to obtain alignment results, and the alignment results are mapped to semantic vectors. Based on the semantic vector, neighbor features are fused using the mean aggregation operator to obtain a node embedding vector, and link prediction is performed based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes.
2. The method according to claim 1, characterized in that, The identification of intervention entities from the target swine antibiotic alternatives domain knowledge graph includes: Obtain the raw data of the knowledge graph of the target swine antibiotic alternative domain; The original data is labeled with semantic roles to determine the intervention entity. The semantic roles include intervention entity, target entity, and effect entity.
3. The method according to claim 1, characterized in that, The semantic tagging and concatenation alignment of the intervention measure entities to obtain the alignment result includes: The entities representing the intervention measures are semantically categorized to obtain the annotation results; Based on the annotation results, the overall confidence level between the entity of the intervention measure to be aligned and the candidate entries of the preset standard database is calculated. The overall confidence level is a weighted sum of string inclusion matching degree, edit distance matching degree and semantic vector cosine matching degree. If the overall confidence level is within the first preset confidence level range, then the alignment result is confirmed based on the weighted sum. If the overall confidence level is within the second preset confidence level range, then a cross-validation request is sent to at least one preset external database, and the alignment result is determined based on the returned validation result. Wherein, the lower limit of the first preset confidence interval is greater than the upper limit of the second preset confidence interval.
4. The method according to claim 1, characterized in that, The step of mapping the alignment result to a semantic vector includes: Obtain the aligned text labels of the intervention entity; The text labels of the intervention entities are input into a preset language model to obtain semantic vectors of a preset dimension. The semantic vectors of the preset dimension corresponding to all intervention entities are stacked in node order to form an initial node feature matrix for training the graph neural network model.
5. The method according to claim 1, characterized in that, The step of fusing neighbor features using the mean aggregation operator based on the semantic vector to obtain the node embedding vector includes: Construct a graph neural network model with at least two layers, with each layer employing the mean aggregation operator; For each layer of the network, the current semantic vector of each node is averaged with the current semantic vectors of all its neighboring nodes to obtain the embedding vector of each node in the next layer. The embedding vector output from the last layer of the network is used as the node embedding vector.
6. The method according to claim 1, characterized in that, The link prediction based on the node embedding vector, to obtain the association strength between at least two different candidate antibiotic alternative nodes, includes: Positive sample pairs are sampled from existing relationships in the knowledge graph, and relationships that do not exist in the knowledge graph are generated as negative sample pairs. The number of negative sample pairs is equal to the number of positive sample pairs. The node embedding vectors of the two nodes in each sample pair are concatenated, and the concatenation result is input into a multilayer perceptron to obtain the predicted probability that there is a correlation between each sample pair. Calculate the error between the predicted probability and the true label, and optimize the parameters of the graph neural model with the goal of minimizing the error; Using the query entity as the anchor point, traverse each remaining node in the knowledge graph other than the query entity, and calculate the prediction probability between the query entity and each remaining node respectively. A preset number of nodes are output as candidate antibiotic substitutes in descending order of predicted probability, and the corresponding predicted probability is used as the association strength between the candidate antibiotic substitute and the query entity.
7. A device for discovering knowledge about antibiotic alternatives for pigs, characterized in that, include: The determination module is used to determine intervention entities from the knowledge graph of antibiotic alternatives for target pigs, wherein the intervention entities include at least one of plant extracts, trace elements, organic acids, probiotics, polysaccharides and oligosaccharides, and bioactive peptides; The alignment module is used to perform semantic tagging and concatenation alignment on the intervention measure entities to obtain the alignment result, and map the alignment result into a semantic vector; The prediction module is used to perform neighbor feature fusion using the mean aggregation operator based on the semantic vector to obtain a node embedding vector, and to perform link prediction based on the node embedding vector to obtain the association strength between at least two different candidate antibiotic alternative nodes.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, the processor executing the computer program to implement the porcine antibiotic alternative knowledge discovery method as described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement the knowledge discovery method for porcine antibiotic alternatives as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the knowledge discovery method for porcine antibiotic alternatives as described in any one of claims 1-6.
