A natural product function classification method fusing knowledge graph and machine learning

By constructing a relationship network between natural products and targets and introducing intensity grading and pathway orientation constraints, a graph neural network is used for functional classification, which solves the problem of unclear functional classification in existing technologies and achieves more accurate functional differentiation and application analysis of natural products.

CN122174048APending Publication Date: 2026-06-09SHAANXI SCI TECH UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI SCI TECH UNIV
Filing Date
2026-03-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies lack detailed characterization of the strength and orientation of associations in the functional classification of natural products, leading to the clustering of functional outputs, which makes it difficult to reflect the true functional emphasis and affects the judgment of subsequent research.

Method used

A relationship network between natural products and targets is constructed, and action intensity grading, pathway level identification and pathway orientation constraints are introduced. Node representation learning is performed through graph neural network to generate functional classification results.

Benefits of technology

It enhances the ability to differentiate functions, reduces the risk of deviation caused by a single feature dominance, provides a stable basis for functional classification, and promotes consistency in subsequent application analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174048A_ABST
    Figure CN122174048A_ABST
Patent Text Reader

Abstract

This invention relates to the field of natural product functional classification technology, specifically a method for natural product functional classification integrating knowledge graphs and machine learning. The method includes acquiring natural product target information and establishing associations, constructing a product-target structure graph, introducing an action intensity grading system to form a path hierarchy, combining pathway frequency with target overlap to complete pathway mapping, further determining functional region attribution, and completing natural product functional classification based on a multi-node graph structure. This invention, by constructing a correspondence between natural products and targets and introducing action intensity grading, path hierarchy, and pathway orientation constraints, continuously associates functional information at the target, pathway, and functional region levels. This forms a stable basis for functional differentiation under multi-target and multi-pathway conditions, reducing the bias caused by a single feature dominance, and providing reliable support for natural product functional classification and subsequent application analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural product functional classification technology, and in particular to a natural product functional classification method that integrates knowledge graphs and machine learning. Background Technology

[0002] The field of natural product functional classification technology encompasses the systematic classification and summarization of the structural, functional, and biological activities of compounds from natural sources. Its core lies in using data analysis, bioinformatics mining, and molecular feature recognition to functionally categorize natural products from plants, microorganisms, and marine organisms, supporting new drug development, disease mechanism research, and resource discovery. Overall, the field integrates chemistry, biology, pharmacology, and information science, focusing on identifying and extracting functional features from complex structural information. It leverages standardized database construction, multi-dimensional attribute annotation, and pattern recognition to achieve high-throughput functional annotation and systematic management of natural products.

[0003] The natural product functional classification method integrating knowledge graphs and machine learning refers to a method based on structured knowledge representation and statistical learning models. It constructs a knowledge graph framework centered on entity relationships for the task of natural product functional annotation. Supervised learning algorithms are then introduced to predict the functional categories of natural products through feature extraction and multi-class label learning. The main components of this method include constructing a graph structure of natural product entities and their functional attributes based on existing bioactivity databases; generating structured input vectors using graph embedding-based feature extraction; and training and inferring category labels using supervised classification models such as gradient boosting trees or support vector machines, thereby forming a natural product classification system oriented towards functional identification.

[0004] Existing technologies rely primarily on existing functional labels and static feature descriptions, with functional determination depending more on overall similarity calculations. In cases of differences in target effects and frequent pathway crossovers, there is a lack of detailed characterization of the strength and direction of associations, leading to a clustering trend in the functional output of different natural products. This makes it difficult to reflect the true functional emphasis. In the analysis of natural products involving multiple sources and mechanisms, the functional boundaries are unclear, affecting subsequent research in determining the region of action and application direction. Summary of the Invention

[0005] To address the technical problems existing in the prior art, embodiments of the present invention provide a method for classifying the functions of natural products by integrating knowledge graphs and machine learning. The technical solution is as follows: A method for classifying the functions of natural products by integrating knowledge graphs and machine learning includes the following steps: S1: Obtain the target name information corresponding to the natural product, establish a list of target names for each natural product record, establish a mapping connection between the natural product name and the target name item by item, perform duplicate checks and invalid removal, and construct a structure diagram of the relationship between natural products and targets. S2: Based on each connection path in the natural product-target relationship structure diagram, extract the effect intensity attribute information, classify the levels according to the effect intensity grading rules, assign level labels, and construct a target connection path level identifier set. S3: Call the target connection path level identifier set level label information, extract the pathway names involved in the metabolic pathway of natural products, perform directional judgment based on the frequency of occurrence and the overlap of the target, complete the pathway mapping classification, and construct a natural product functional pathway mapping table. S4: Based on the projection relationship in the natural product functional pathway mapping table, extract the names of the functional regions pointed to by the pathways, perform item-by-item pairing of natural product names and functional region classification names, establish attribution relationships, and generate a natural product functional region attribution mapping set.

[0006] As a further aspect of the present invention, the natural product-target relationship structure diagram includes a set of natural product identifiers, a set of target names, product-target association pairs, and association validity identifiers. The target connection path level identifier set specifically includes an effect intensity level label, a path level code, and an intensity interval identifier. The natural product functional pathway mapping table includes a set of pathway names, a pathway pointing category, and a pathway association weight identifier. The natural product functional region attribution mapping set specifically includes a functional region classification name, a region attribution label, and a region association consistency identifier.

[0007] As a further aspect of the present invention, the step of obtaining S1 is as follows: S101: Obtain all records in the natural product structure database, sequentially retrieve the target name information corresponding to each natural product, aggregate all target name entries under the same natural product, remove data with missing fields and non-standard naming, and generate a list of natural product target names. S102: Based on the list of natural product target names, extract the name information from each natural product entry, construct a bidirectional mapping relationship between the natural product name and each target name, set a unique index and record the mapping source path and matching mode parameters, and establish a natural product target name mapping connection set. S103: Call the set of natural product target name mapping connections, perform content consistency screening on each mapping relationship, remove redundant names and invalid target points, aggregate each target connection according to the natural product primary key number, extract the node identifier and connection edge path in the aggregated relationship network, and generate a natural product and target relationship structure diagram.

[0008] As a further aspect of the present invention, the step of obtaining S2 is as follows: S201: Call the natural product and target relationship structure diagram, extract each natural product and target connection path record, retrieve the effect intensity attribute field marked in the connection path, screen for missing items and abnormal format items in the effect intensity field, remove connection path entries that cannot complete the grading determination, and generate a connection path effect intensity attribute table. S202: According to the connection path intensity attribute table, read the preset intensity classification rules, classify the intensity attributes of each connection path into intervals according to the classification rules, record the path number and classification interval identifier after classification, and establish a connection path hierarchical division relationship set. S203: Based on the hierarchical relationship set of the connection path, extract the hierarchical number corresponding to each connection path, assign a level label according to the hierarchical number, establish a one-to-one mapping relationship between the connection path number and the level label, aggregate all mapping relationships and generate an index structure, and generate a target connection path level identifier set.

[0009] As a further aspect of the present invention, the step of obtaining S3 is as follows: S301: Call the target connection path level identifier set, extract the corresponding natural product name and target name in each connection path, read the metabolic pathway database, retrieve all occurrence records of natural products in known metabolic pathways, aggregate the pathway name field and establish a corresponding list of natural products and pathway names, and generate a natural product pathway name matching set. S302: Based on the natural product pathway name matching set, count the frequency of each natural product in different pathways, retrieve all name entries involving targets in the pathway, determine whether the target corresponding to the natural product appears repeatedly in the pathway, mark the pathway directionality according to the frequency of occurrence and the number of target overlaps, and generate a pathway directionality judgment result set. S303: For the pathway entries with directional attributes already marked in the pathway orientation judgment result set, classify them into functional pathway subsets according to the mapping relationship between natural products and pathways, establish a many-to-one mapping relationship table between natural product primary key numbers and functional pathway names, aggregate all natural product mapping results, and generate a natural product functional pathway mapping table.

[0010] As a further aspect of the present invention, the step of obtaining S4 is as follows: S401: Call the natural product functional pathway mapping table, extract the projection record of each natural product in the metabolic pathway, read the pathway annotation database, retrieve the functional region name field marked in each pathway record, remove empty fields and unclassified entries, and generate a pathway functional region name correspondence set. S402: Based on the set of pathway functional region names, extract the mapping relationship between natural products and pathways, establish pairing combinations between natural product names and functional region names, perform naming standard consistency checks on each combination, remove failed pairing and duplicate pairing entries, and generate a set of natural product functional region pairings. S403: For all records in the natural product functional region pairing set, extract the natural product primary key number and functional region classification name, establish a mapping key-value pair structure, aggregate the attribution relationship between all natural products and functional regions, and associate source pathway information to generate a natural product functional region attribution mapping set.

[0011] As a further aspect of the present invention, the method further includes: S5: Based on the attribution relationship in the natural product functional region attribution mapping set, construct a graph structure input between natural product nodes, target nodes, and functional region nodes, convert the graph structure input into an adjacency matrix and node embedding vectors, use a graph neural network to perform node representation learning, complete the functional category determination based on the classification probability distribution, and generate natural product functional classification results. The functional classification results of natural products include functional category names, classification confidence index, and functional determination labels.

[0012] As a further aspect of the present invention, the step of obtaining S5 is as follows: S501: Call the natural product functional region attribution mapping set, extract the attribution relationship between natural product name and functional region classification name, associate the target connection information in the natural product and target relationship structure graph, construct three types of node sets: natural product node, target node, and functional region node, establish a list of edge connections between nodes and record the edge type identifier, and generate graph structure input. S502: Based on the graph structure input, extract the node number and edge connection relationship, establish the adjacency relationship index between node numbers, generate the initial value of the node embedding vector according to the node type field, complete the adjacency matrix construction and complete the node embedding vector alignment, and generate the adjacency matrix and node embedding vector. S503: Based on the adjacency matrix and node embedding vector, a graph neural network is used to perform node representation learning, extract the classification probability distribution output by the node representation learning, perform judgment based on the functional category label corresponding to the maximum value of the classification probability distribution, aggregate the judgment labels and probability distribution indexes of all natural product nodes, and generate the functional classification result of natural products.

[0013] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: In this invention, by constructing a correspondence network between natural products and targets, and introducing intensity grading, pathway level identification, and pathway orientation constraints, functional information is gradually unfolded along targets, pathways, and functional regions, forming a functional deduction chain with correlation and continuity. This enhances the basis for functional differentiation under the condition of multiple targets and multiple pathways coexisting, reduces the risk of deviation caused by a single feature dominance, provides stable support for the functional classification of natural products, and promotes the consistency of subsequent application analysis. Attached Figure Description

[0014] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a flowchart illustrating the acquisition process of S1 in this invention; Figure 3 This is a flowchart illustrating the acquisition process of S2 in this invention; Figure 4 This is a flowchart illustrating the acquisition process of S3 in this invention; Figure 5 This is a flowchart illustrating the acquisition process of S4 in this invention; Figure 6 This is a flowchart of the acquisition process for S5 of the present invention. Detailed Implementation

[0015] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0016] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0017] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0018] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0019] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0020] Please see Figure 1 This invention provides a technical solution: a method for classifying the functions of natural products by integrating knowledge graphs and machine learning, comprising the following steps: S1: Obtain the target name information corresponding to the natural product, establish a list of target names for each natural product record, establish a mapping connection between the natural product name and the target name based on the target name list, perform duplicate checks and invalid removal on the mapping connection, and construct a structure diagram of the relationship between natural products and targets. S2: Based on each natural product-target connection path in the natural product-target relationship structure diagram, extract the effect intensity attribute information of the connection path record, classify the connection path into levels according to the effect intensity grading rules, assign level labels to the level classification results, and construct a target connection path level label set. S3: Call the target connection path level identifier set to collect the level label information of natural products and target connection paths, extract the pathway names involved in the metabolic pathway of natural products, perform orientation judgment based on the frequency of natural products in the pathway and the overlap of the target, complete the pathway mapping classification based on the orientation judgment results, and construct a natural product functional pathway mapping table. S4: Based on the projection relationship of natural products in the pathway in the natural product functional pathway mapping table, extract the name of the functional region pointed to by the pathway, perform item-by-item pairing of natural product name and functional region classification name, establish the attribution relationship between natural product name and functional region classification name, and generate a natural product functional region attribution mapping set. S5: Based on the natural product functional region attribution mapping set recording the attribution relationship between natural products and functional regions, construct a graph structure input between natural product nodes, target nodes, and functional region nodes. Convert the graph structure input into an adjacency matrix and node embedding vectors. Use a graph neural network to perform node representation learning. Based on the classification probability distribution output by the node representation learning, complete the functional category determination and generate the natural product functional classification result.

[0021] The structure diagram of the relationship between natural products and targets includes a set of natural product identifiers, a set of target names, product-target association pairs, and association validity identifiers. The target connection path level identifier set specifically includes action intensity level labels, path level codes, and intensity interval identifiers. The natural product functional pathway mapping table includes a set of pathway names, pathway orientation categories, and pathway association weight identifiers. The natural product functional region attribution mapping set specifically includes functional region classification names, region attribution labels, and region association consistency identifiers. The natural product functional classification results include functional category names, classification confidence indices, and functional determination labels.

[0022] Please see Figure 2 The steps to obtain S1 are as follows: S101: Obtain all records in the natural product structure database, sequentially retrieve the target name information corresponding to each natural product, aggregate all target name entries under the same natural product, remove data with missing fields and non-standard naming, and generate a list of natural product target names. The TCMSP and ChEMBL databases were selected as the data sources for the natural product structure database. First, a full data extraction was performed, yielding a total of 45,200 natural product records. For each natural product record (e.g., "Quercetin", PubChemCID:5280343), the associated biological target names were retrieved via the database API interface. An aggregation operation was performed to merge all target names (e.g., "PTGS2", "HSP90AA1", "NOS2") belonging to the same natural product ID (e.g., MOL000098) into a single list. Subsequently, a data cleaning process was performed: each target name field was read, and its length and character composition were checked. If a field value was NULL, an empty string, or contained only special symbols (e.g., "-", " / "), it was considered a missing field, and the target record was directly removed. If a field contained descriptive text that did not conform to IUPAC naming standards (e.g., "unknown protein"), it was considered non-standard naming data and removed. After the above cleaning process, 38,500 valid natural product entries and their corresponding target name lists are retained, generating a list of natural product target names. This list is stored in key-value pairs, where the key is the standard chemical name of the natural product and the value is an array of cleaned target gene symbols (GeneSymbol).

[0023] S102: Based on the list of natural product target names, extract the name information from each natural product entry, construct a bidirectional mapping relationship between the natural product name and each target name, set a unique index and record the mapping source path and matching mode parameters, and establish a natural product target name mapping connection set. Read the generated list of natural product target names and iterate through each natural product entry. Taking the natural product "Tanshinone IIA" as an example, extract its corresponding target list. Construct a two-way mapping mechanism: On the one hand, establish a positive index of "natural product -> target" to record the target points of tanshinone IIA. (e.g., a pointer to "MAPK1"); on the other hand, an inverse index of "target -> natural product" is established to record the target. The pointer pointed to by Tanshinone IIA. A unique index hash value (e.g., SHA-256 encoding) is generated for each mapping relationship (Pair_ID) to ensure the uniqueness of the relationship. Simultaneously, the mapping source path (i.e., the database identifier of the data source, such as "Source:ChEMBL") and the matching pattern parameter (e.g., "ExactMatch" or "SynonymMatch") are recorded. If the target name is obtained through thesaurus matching, the matching pattern parameter is marked as "Fuzzy"; otherwise, it is marked as "Exact". All mapping relationships that pass the uniqueness check and parameter labeling are stored in the edge file of a graph database (e.g., Neo4j), establishing a set of natural product target name mapping connections.

[0024] S103: Call the set of natural product target name mapping connections, perform content consistency screening on each group of mapping relationships, remove redundant names and invalid target points, aggregate each target connection according to the natural product primary key number, extract the node identifiers and connection edge paths in the aggregated relationship network, and generate a natural product and target relationship structure diagram. The system calls the set of mappings for natural product target names and performs consistency screening on each mapping relationship in the set. It compares target names recorded from different data sources for the same natural product. If "PTGS2" and "COX-2" both exist and point to the same UniProtID, "PTGS2" is retained and the redundant "COX-2" is removed, based on the pre-defined HGNC standard name list. For invalid target points, it checks whether the target exists in a human genome annotation library (such as GenCode). If it does not exist (e.g., a target from a non-human primate with no homologous genes), it is removed. After screening, the remaining valid target connections are aggregated according to the natural product primary key number (Product_ID). Node identifiers (natural product node Node_P and target node Node_T) and connection edge paths (Edge_P_T) are extracted from the aggregated relationship network. Finally, a topological network containing node attributes and edge attributes is constructed, generating a natural product-target relationship structure graph. In this graph structure, the natural product "ginsenoside Rg1" and target nodes such as "GR" and "NR3C1" are connected by undirected edges to form a local star network structure.

[0025] Please see Figure 3 The steps to obtain S2 are as follows: S201: Call the natural product and target relationship structure diagram, extract each natural product and target connection path record, retrieve the effect intensity attribute field marked in the connection path, screen for missing items and abnormal format items in the effect intensity field, remove connection path entries that cannot complete the grading determination, and generate a connection path effect intensity attribute table. The relationship structure graph between natural products and targets is invoked, and every edge (connection path) in the graph is traversed. For each connection path, the activity parameter field corresponding to the interaction is retrieved from the original database, mainly including... (half-inhibitory concentration) (Suppression constant) or (Half-maximum effect concentration). The retrieved values ​​are format-validated: if the efficacy intensity field is empty, the value is negative, or contains unparseable text characters (e.g., the non-numerical part of ">100uM" cannot be precisely defined), it is determined that the efficacy intensity field is missing or abnormal. Such unquantifiable linkage path entries are removed from the efficacy analysis queue, retaining only paths with clearly defined numerical activity data. After filtering, a linkage path efficacy intensity attribute table is generated. Each row in the table contains "Natural Product ID," "Target ID," "Activity Type," and "Activity Value" (unit uniformly converted to nM). For example, record (MOL000422,CHEMBL253,IC50,45.5).

[0026] S202: Based on the connection path action intensity attribute table, read the preset action intensity classification rules, classify the action intensity attribute of each connection path into intervals according to the classification rules, record the path number and classification interval identifier after classification, and establish a connection path hierarchical division relationship set; Based on the connectivity path efficacy attribute table, the preset efficacy grading rules are read. These rules set interval thresholds based on pharmacological affinity standards. A high-activity threshold is then set. , medium activity threshold The hierarchical logic is as follows: 1. If the path activity value... 1. Determined as "Level 1 Strength" (High Affinity); 2. If the pathway activity value 3. If the pathway activity value is determined to be "secondary strength" (medium affinity); It was determined to be of "Level III strength" (low affinity). A practical example illustrates this: for the binding of natural product A to target B, the measured... ,because It is classified as "Level 1 intensity"; for natural product A and target C, the measured... ,because The path is classified as "Level 2 Intensity". The classification results are written to the database, recording the path number (Path_ID) and the level interval identifier (Level_ID), and a set of connection path level division relationships is established. Specific leveling rules and example data are shown in Table 1.

[0027] Table 1: Grading Rules for the Intensity of Action of Natural Product Target Linkage Pathways As shown in Table 1, the linkage pathways were divided into three distinct levels based on nanomolar level activity data, clarifying the biological significance of each chemical linkage.

[0028] S203: Based on the hierarchical division of the connection path relationship set, extract the hierarchical number corresponding to each connection path, assign a level label according to the hierarchical number, establish a one-to-one mapping relationship between the connection path number and the level label, aggregate all mapping relationships and generate an index structure, and generate a target connection path level label set. Based on the hierarchical partitioning of connection paths, the hierarchy number corresponding to each connection path (Path_ID) is extracted. A corresponding One-hot encoded label is assigned according to the hierarchy number: the first-level strength is mapped as follows: Second-order intensity mapping is The third-level intensity mapping is Establish a one-to-one mapping between connection path numbers and level labels. Aggregate all mappings and generate a B+ tree index structure with Path_ID as the key for fast subsequent retrieval. Finally, generate a target connection path level label set, which clarifies the weight attribute of each edge in the graph. For example, Path_001 corresponds to label Level_1, and Path_002 corresponds to label Level_2, providing a quantitative basis for subsequent edge weight calculation in the graph neural network.

[0029] Please see Figure 4 The steps to obtain S3 are as follows: S301: Call the target connection path level identifier set, extract the corresponding natural product name and target name in each connection path, read the metabolic pathway database, retrieve all occurrence records of natural products in known metabolic pathways, aggregate the pathway name field and establish a corresponding list of natural products and pathway names, and generate a natural product pathway name matching set. Call the target connection path level identifier set to extract the set of natural product names. With target name set Access to the KEGG and Reactome metabolic pathway databases. For For each natural product (e.g., "resveratrol"), retrieve its co-occurrence or annotation records in known metabolic pathways. If a database contains an explicit annotation indicating that the natural product participates in a certain pathway (e.g., "mTOR signaling pathway"), aggregate the pathway name field. Establish a mapping list between natural products and pathway names. If a natural product does not appear directly in the pathway annotation, indirectly associate it with the pathway containing its high-affinity target (primary strength). Finally, generate a natural product pathway name matching set, with the record format: {natural product ID:[pathway ID_1,pathway ID_2,...]}.

[0030] S302: Based on the natural product pathway name matching set, count the frequency of each natural product in different pathways, retrieve all name entries involving targets in the pathway, determine whether the natural product corresponding to the target appears repeatedly in the pathway, mark the pathway directionality according to the frequency of occurrence and the number of target overlaps, and generate a pathway directionality judgment result set. Based on the natural product pathway name matching set, statistical analysis of a specific natural product In specific pathways Frequency of occurrence and target coverage. Setting a pathway directionality determination threshold. (Number). Retrieval Path The set of all targets included Obtaining natural products The set of targets acted upon Calculate the intersection of the two. .like The criteria for determining a natural product are: the number of overlapping target sites is greater than or equal to two, and the target site includes at least one primary target site. For pathways It exhibits significant targeting. For example, the natural product baicalin acts on a set of target sites. The pathway “Apoptosis” contains a set of targets. The intersection is The quantity is 2. If If the connection strength is at level one, the pathway directionality is labeled "Direct_Regulation". If the overlap is 1 or there are no level one targets, it is labeled "Weak_Association". A pathway directionality judgment result set is generated to clarify the association nature of each "product-pathway" pair.

[0031] S303: For pathway entries with directional attributes already marked in the pathway orientation judgment result set, classify them into functional pathway subsets according to the mapping relationship between natural products and pathways, establish a many-to-one mapping relationship table between natural product primary key numbers and functional pathway names, aggregate all natural product mapping results, and generate a natural product functional pathway mapping table. For the pathway orientation determination result set, only pathway entries labeled with the attribute "Direct_Regulation" are retained. These high-confidence pathways are defined as "functional pathway subsets". A many-to-one mapping table between natural product primary key numbers and functional pathway names is established (i.e., one natural product can correspond to multiple functional pathways, but each record row uniquely corresponds to one combination). All mapping results are aggregated to generate a natural product functional pathway mapping table. For example, the record items are: Product_001->Pathway_A; Product_001->Pathway_B. This table filters out incidental associations and focuses on the biological pathways through which natural products exert their main pharmacological effects.

[0032] Please see Figure 5 The steps to obtain S4 are as follows: S401: Call the natural product functional pathway mapping table, extract the projection record of each natural product in the metabolic pathway, read the pathway annotation database, retrieve the functional region name field marked in each pathway record, remove empty fields and unclassified entries, and generate a pathway functional region name correspondence set. The natural product functional pathway mapping table is invoked to extract the pathway ID (e.g., "hsa04010"). A KEGGBRITE or similar pathway annotation database is read, retrieving the functional category name field from each pathway record. Functional categories are typically the next higher level of pathway classification, such as "Signal transduction," "Cell growth and death," and "Metabolism." Unclassified entries with empty functional category fields (NULL) or marked "Unclassified" are removed. A pathway functional category name mapping set is generated, establishing a hierarchical transition from specific pathways to macroscopic functional categories.

[0033] S402: Based on the pathway functional region name correspondence set, extract the mapping relationship between natural products and pathways, establish pairing combinations between natural product names and functional region names, perform naming standard consistency check on each combination, remove failed pairing and duplicate pairing entries, and generate a natural product functional region pairing set. Perform association operations based on the pathway functional region name mapping set. (Known natural products) Mapping to Path ,path Mapping to functional areas Construct the transitive mapping: This establishes a pairing system between natural product names and functional region names. Perform a naming convention consistency check on each combination to standardize the naming format of functional regions (e.g., standardize "CellularProcesses-CellGrowth" to "Cell_Growth"). Remove failed pairings (no corresponding region) and duplicate pairings (i.e., the same natural product points to the same functional region through multiple different pathways, retaining only one duplicate record). Generate a set of natural product functional region pairings, which abstracts the specific molecular mechanisms into macroscopic biological functional labels.

[0034] S403: For all records in the natural product functional region pairing set, extract the natural product primary key number and functional region classification name, establish a mapping key-value pair structure, aggregate the attribution relationship between all natural products and functional regions, and associate source pathway information to generate a natural product functional region attribution mapping set. For all records in the natural product functional region pairing set, extract the natural product primary key (Product_Key) and functional region classification name (Region_Class). Establish a mapping key-value pair structure in the form of... It aggregates the attribution relationships between all natural products and their functional regions, and associates source pathway information as an evidence path. For example, natural product A belongs to the "immune regulation" region, and its source pathway is the "NF-kappaB signaling pathway". It generates a set of functional region attribution maps for natural products, providing clear classification labels for subsequent supervised learning tasks.

[0035] Please see Figure 6 The steps to obtain S5 are as follows: S501: Call the functional region attribution mapping set of natural products, extract the attribution relationship between natural product name and functional region classification name, associate the target connection information in the relationship structure diagram between natural products and target points, construct three types of node sets: natural product nodes, target nodes, and functional region nodes, establish a list of edge connections between nodes and record edge type identifiers, and generate graph structure input. By invoking the functional region attribution mapping set of natural products and forming a local star network structure, a heterogeneous graph network is constructed, containing three types of node sets: natural product node set. Target node set Functional area node set Establish a list of edge connections between nodes: 1. : The edge type is "Interaction", and the weight is assigned according to the level identifier set of S203 (Level 1 = 1.0, Level 2 = 0.5, Level 3 = 0.1); 2. Edge type is "PPI" (protein interaction), based on STRING database data; 3. Edges are of type "Belongs_To", based on an S403 mapping set (used only for supervision signals of training set nodes). Record edge type identifiers and weights to generate graph structure input data in the format of an adjacency list.

[0036] S502: Based on the graph structure input, extract the node number and edge connection relationship, establish the adjacency relationship index between node numbers, generate the initial value of the node embedding vector according to the node type field, complete the adjacency matrix construction and complete the node embedding vector alignment, and generate the adjacency matrix and node embedding vector. Based on the graph structure input, extract the node number sequence, establish an adjacency index between node numbers, and construct an adjacency matrix. Let the total number of nodes be... ,but for A 2D matrix. Initial values ​​for node embedding vectors are generated based on the node type field. For natural product nodes, their molecular fingerprint (e.g., Morgan Fingerprint, 2048 bits) is used as the initial feature vector. For target nodes, pre-trained embeddings of their protein sequences (such as ProtVec) or randomly initialized vectors are used as initial feature vectors. Perform dimension alignment operations through a linear transformation layer. Map features of different dimensions to a unified hidden layer dimension. (like ). Complete the adjacency matrix construction and node embedding vector alignment to generate the adjacency matrix. With node embedding vector .

[0037] S503: Based on the adjacency matrix and node embedding vector, a graph neural network is used to perform node representation learning, extract the classification probability distribution output by the node representation learning, perform judgment based on the functional category label corresponding to the maximum value of the classification probability distribution, aggregate the judgment labels and probability distribution indexes of all natural product nodes, and generate the functional classification results of natural products. Based on adjacency matrix With node embedding vector Node representation learning is performed using either a Graph Convolutional Neural Network (GCN) or a Graph Attention Network (GAT). The hierarchical propagation rule is defined as follows: in, (Add self-loop) For degree matrix, For learnable weight matrix, The ReLU activation function is used. The network has two layers; the last layer node is used to represent the learned output. For each natural product node to be classified, its vector is input into the Softmax classification layer, which outputs the classification probability distribution. ,in This represents the total number of functional region categories. For example, the output probability distribution of a natural product node is... The corresponding categories are [metabolism, anti-inflammation, neural regulation, cell cycle]. The determination is performed based on the functional category label (anti-inflammation) corresponding to the maximum probability distribution value (0.78). If the maximum probability... If the confidence threshold is not met, it is marked as "undefined classification". The decision labels and probability distribution indexes of all natural product nodes are aggregated to generate the functional classification results of the natural product. This result indicates that the natural product exhibits significant anti-inflammatory functional characteristics at the molecular network level.

[0038] Table 2: Examples of Functional Classification Results of Natural Products Table 2 shows the final functional positioning of natural products, which intuitively reflects the confidence level of classification through probability values ​​and transforms the molecular-level connections into macroscopic functional attributes.

[0039] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for classifying the functions of natural products by integrating knowledge graphs and machine learning, characterized in that, Includes the following steps: S1: Obtain the target name information corresponding to the natural product, establish a list of target names for each natural product record, establish a mapping connection between the natural product name and the target name item by item, perform duplicate checks and invalid removal, and construct a structure diagram of the relationship between natural products and targets. S2: Based on each connection path in the natural product-target relationship structure diagram, extract the effect intensity attribute information, classify the levels according to the effect intensity grading rules, assign level labels, and construct a target connection path level identifier set. S3: Call the target connection path level identifier set level label information, extract the pathway names involved in the metabolic pathway of natural products, perform directional judgment based on the frequency of occurrence and the overlap of the target, complete the pathway mapping classification, and construct a natural product functional pathway mapping table. S4: Based on the projection relationship in the natural product functional pathway mapping table, extract the names of the functional regions pointed to by the pathways, perform item-by-item pairing of natural product names and functional region classification names, establish attribution relationships, and generate a natural product functional region attribution mapping set.

2. The natural product functional classification method integrating knowledge graphs and machine learning according to claim 1, characterized in that: The natural product-target relationship structure diagram includes a set of natural product identifiers, a set of target names, product-target association pairs, and association validity identifiers. The target connection path level identifier set specifically includes an effect intensity level label, a path level code, and an intensity interval identifier. The natural product functional pathway mapping table includes a set of pathway names, a pathway pointing category, and a pathway association weight identifier. The natural product functional region attribution mapping set specifically includes a functional region classification name, a region attribution label, and a region association consistency identifier.

3. The natural product functional classification method integrating knowledge graphs and machine learning according to claim 1, characterized in that, The steps for obtaining S1 are as follows: S101: Obtain all records in the natural product structure database, sequentially retrieve the target name information corresponding to each natural product, aggregate all target name entries under the same natural product, remove data with missing fields and non-standard naming, and generate a list of natural product target names. S102: Based on the list of natural product target names, extract the name information from each natural product entry, construct a bidirectional mapping relationship between the natural product name and each target name, set a unique index and record the mapping source path and matching mode parameters, and establish a natural product target name mapping connection set. S103: Call the set of natural product target name mapping connections, perform content consistency screening on each mapping relationship, remove redundant names and invalid target points, aggregate each target connection according to the natural product primary key number, extract the node identifier and connection edge path in the aggregated relationship network, and generate a natural product and target relationship structure diagram.

4. The method for classifying natural product functions by integrating knowledge graphs and machine learning according to claim 1, characterized in that, The steps for obtaining S2 are as follows: S201: Call the natural product and target relationship structure diagram, extract each natural product and target connection path record, retrieve the effect intensity attribute field marked in the connection path, screen for missing items and abnormal format items in the effect intensity field, remove connection path entries that cannot complete the grading determination, and generate a connection path effect intensity attribute table. S202: According to the connection path intensity attribute table, read the preset intensity classification rules, classify the intensity attributes of each connection path into intervals according to the classification rules, record the path number and classification interval identifier after classification, and establish a connection path hierarchical division relationship set. S203: Based on the hierarchical relationship set of the connection path, extract the hierarchical number corresponding to each connection path, assign a level label according to the hierarchical number, establish a one-to-one mapping relationship between the connection path number and the level label, aggregate all mapping relationships and generate an index structure, and generate a target connection path level identifier set.

5. The natural product functional classification method integrating knowledge graphs and machine learning according to claim 1, characterized in that, The steps for obtaining S3 are as follows: S301: Call the target connection path level identifier set, extract the corresponding natural product name and target name in each connection path, read the metabolic pathway database, retrieve all occurrence records of natural products in known metabolic pathways, aggregate the pathway name field and establish a corresponding list of natural products and pathway names, and generate a natural product pathway name matching set. S302: Based on the natural product pathway name matching set, count the frequency of each natural product in different pathways, retrieve all name entries involving targets in the pathway, determine whether the target corresponding to the natural product appears repeatedly in the pathway, mark the pathway directionality according to the frequency of occurrence and the number of target overlaps, and generate a pathway directionality judgment result set. S303: For the pathway entries with directional attributes already marked in the pathway orientation judgment result set, classify them into functional pathway subsets according to the mapping relationship between natural products and pathways, establish a many-to-one mapping relationship table between natural product primary key numbers and functional pathway names, aggregate all natural product mapping results, and generate a natural product functional pathway mapping table.

6. The natural product functional classification method integrating knowledge graphs and machine learning according to claim 1, characterized in that, The steps for obtaining S4 are as follows: S401: Call the natural product functional pathway mapping table, extract the projection record of each natural product in the metabolic pathway, read the pathway annotation database, retrieve the functional region name field marked in each pathway record, remove empty fields and unclassified entries, and generate a pathway functional region name correspondence set. S402: Based on the set of pathway functional region names, extract the mapping relationship between natural products and pathways, establish pairing combinations between natural product names and functional region names, perform naming standard consistency checks on each combination, remove failed pairing and duplicate pairing entries, and generate a set of natural product functional region pairings. S403: For all records in the natural product functional region pairing set, extract the natural product primary key number and functional region classification name, establish a mapping key-value pair structure, aggregate the attribution relationship between all natural products and functional regions, and associate source pathway information to generate a natural product functional region attribution mapping set.

7. The method for classifying natural product functions by integrating knowledge graphs and machine learning according to claim 1, characterized in that, The method further includes: S5: Based on the attribution relationship in the natural product functional region attribution mapping set, construct a graph structure input between natural product nodes, target nodes, and functional region nodes, convert the graph structure input into an adjacency matrix and node embedding vectors, use a graph neural network to perform node representation learning, complete the functional category determination based on the classification probability distribution, and generate natural product functional classification results. The results of the natural product functional classification include functional category name, classification confidence index, and functional determination label.

8. The natural product functional classification method integrating knowledge graphs and machine learning according to claim 7, characterized in that, The steps for obtaining S5 are as follows: S501: Call the natural product functional region attribution mapping set, extract the attribution relationship between natural product name and functional region classification name, associate the target connection information in the natural product and target relationship structure graph, construct three types of node sets: natural product node, target node, and functional region node, establish a list of edge connections between nodes and record the edge type identifier, and generate graph structure input. S502: Based on the graph structure input, extract the node number and edge connection relationship, establish the adjacency relationship index between node numbers, generate the initial value of the node embedding vector according to the node type field, complete the adjacency matrix construction and complete the node embedding vector alignment, and generate the adjacency matrix and node embedding vector. S503: Based on the adjacency matrix and node embedding vector, a graph neural network is used to perform node representation learning, extract the classification probability distribution output by the node representation learning, perform judgment based on the functional category label corresponding to the maximum value of the classification probability distribution, aggregate the judgment labels and probability distribution indexes of all natural product nodes, and generate the functional classification result of natural products.