Method for determining the inclusion relationship of binary phylogenetic network tree applied to batch screening of biological database
By prioritizing and synchronously modifying methods, the problem of search space expansion in phylogenetic network determination is solved, the solution efficiency is improved, and efficient batch screening of biological databases is achieved.
Patent Information
- Application Number
- CN202611497702.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-03
AI Technical Summary
Existing technologies for determining whether a phylogenetic network contains a target phylogenetic tree in a biological database suffer from search space expansion, low solution efficiency, and insufficient utilization of the topological information of the phylogenetic tree.
By dividing leaf nodes into multiple priorities, deterministic processing precedes branch processing, and by combining the synchronous modification of the phylogenetic network and the tree with local state reassessment, topological information is utilized in real time to compress the search space.
It improves the efficiency of solving the phylogenetic network tree inclusion problem, shortens the time required for batch screening of biological databases, and supports the automated screening of candidate evolutionary models.
Smart Images

Figure CN123033581A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of bioinformatics technology, and in particular to a method for determining the inclusion relationship of a binary phylogenetic network tree for batch screening of biological databases. Background Technology
[0002] With the continuous accumulation of phylogenetic tree and phylogenetic network data in public biological databases, research platforms need to perform automated consistency verification and batch screening of massive candidate evolutionary models. Due to the existence of non-vertical genetic events such as hybridization and horizontal gene transfer, the evolutionary history of species needs to be described using phylogenetic networks. However, the evolutionary process of a single gene is tree-like. Therefore, during batch screening, it is necessary to determine whether the candidate phylogenetic network contains the target phylogenetic tree, i.e., the tree inclusion problem.
[0003] The tree inclusion problem is an NP-hard problem, and existing solutions use a fixed-parameter branch search algorithm with the number of regression nodes as the parameter. However, existing algorithms do not fully utilize the topological information of the phylogenetic tree, leading to an expanded search space and low solution efficiency. Summary of the Invention
[0004] This application provides a method for determining the inclusion relationship of a binary phylogenetic network tree for batch screening of biological databases, so as to make full use of the topological information of the phylogenetic tree, compress the search space, and improve the solution efficiency of the tree inclusion problem.
[0005] In a first aspect, embodiments of this application provide a method for determining the inclusion relationship of a binary phylogenetic network tree applied to batch screening of a biological database, comprising: obtaining candidate phylogenetic networks and a target phylogenetic tree from a biological database, wherein the target phylogenetic tree is used to characterize the evolutionary history of a target gene in multiple species, and the candidate phylogenetic networks are used to characterize the evolutionary relationship containing network evolutionary events among the multiple species; screening the candidate phylogenetic networks according to the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree, wherein the target phylogenetic network N is used to characterize the evolutionary relationship containing network evolutionary events among the multiple species; and selecting the candidate phylogenetic networks according to the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree. The phylogenetic tree is a binary phylogenetic tree T. The binary phylogenetic network N includes tree nodes and regression nodes, each regression node having two incoming edges. Leaf nodes in the binary phylogenetic network N are processed sequentially according to multiple preset priorities, each priority corresponding to the structural characteristics of the leaf node. The processing includes deterministic processing and branch processing, with deterministic processing performed before branch processing. The deterministic processing includes processing the edges in the binary phylogenetic network N based on the local structural characteristics of the leaf node to be processed and the topological relationship between the label of the leaf node and the corresponding node in the binary phylogenetic tree T. The process involves deterministic deletion of nodes, including selecting one incoming edge from each of the two incoming edges of a target regression node for deletion, forming multiple sub-problems, and recursively executing the process on each sub-problem. During the processing of leaf nodes, the binary phylogenetic network N and the binary phylogenetic tree T are synchronously modified. This synchronous modification includes deleting the corresponding node or edge in the binary phylogenetic tree T when a node or edge is deleted in the binary phylogenetic network N, and deleting the corresponding node or edge in the binary phylogenetic tree T when a new label is added to a node in the binary phylogenetic network N. The corresponding nodes in the metaphylogenetic tree T are newly labeled with the same tag; after each deletion of an edge in the binary phylogenetic network N, the states of the two endpoints of the deleted edge and the neighboring nodes of the two endpoints are re-estimated, and the leaf nodes to be processed and their priorities are updated according to the state re-estimated results; based on the processing results of each leaf node, it is determined whether the binary phylogenetic network N contains the binary phylogenetic tree T; based on the determination results, the candidate phylogenetic networks in the biological database are batch-screened to identify candidate phylogenetic networks that are consistent with the gene evolution history represented by the target phylogenetic tree.
[0006] Secondly, embodiments of this application provide a device for determining the inclusion relationship of binary phylogenetic network trees applied to batch screening of biological databases, comprising: an acquisition module, configured to acquire candidate phylogenetic networks and a target phylogenetic tree from a biological database, wherein the target phylogenetic tree is used to characterize the evolutionary history of a target gene in multiple species, the candidate phylogenetic networks are used to characterize the evolutionary relationship containing network evolutionary events among the multiple species, and the candidate phylogenetic networks are screened according to the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree, wherein the target phylogenetic tree is... A binary phylogenetic tree T, and a binary phylogenetic network N comprising tree nodes and regression nodes, each regression node having two incoming edges; a processing module, configured to process leaf nodes in the binary phylogenetic network N sequentially according to a preset set of priorities, each priority corresponding to the structural characteristics of the leaf node; the processing includes deterministic processing and branch processing, with deterministic processing performed before branch processing; wherein, the deterministic processing includes performing deterministic processing on edges and / or nodes in the binary phylogenetic network N based on the local structural characteristics of the leaf node to be processed and the topological relationship of the label of the leaf node to be processed to the corresponding node in the binary phylogenetic tree T. The deletion process, specifically the branching process, involves selecting one incoming edge from each of the two incoming edges of the target regression node for deletion, thus forming multiple sub-problems. The processing is then recursively applied to each of these sub-problems. The synchronous modification module is used to synchronously modify the binary phylogenetic network N and the binary phylogenetic tree T during the processing of the leaf nodes. This synchronous modification includes deleting the corresponding node or edge in the binary phylogenetic tree T when a node or edge is deleted in the binary phylogenetic network N, and deleting the corresponding node or edge in the binary phylogenetic tree T when a new label is added to a node in the binary phylogenetic network N. The system includes the following modules: a new identical label; a state reassessment module, used to reassess the states of the two endpoints of the deleted edge and the neighboring nodes of the two endpoints after each deletion of an edge in the binary phylogenetic network N, and update the leaf nodes to be processed and their priorities based on the state reassessment results; a judgment module, used to determine whether the binary phylogenetic network N contains the binary phylogenetic tree T based on the processing results of each leaf node; and a batch screening module, used to perform batch screening of candidate phylogenetic networks in the biological database based on the judgment results to identify candidate phylogenetic networks that are consistent with the gene evolution history represented by the target phylogenetic tree.
[0007] Thirdly, embodiments of this application provide an electronic device, the electronic device comprising: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the method for determining the inclusion relationship of a binary phylogenetic network tree as described in any one of the first aspects.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the method for determining the inclusion relationship of a binary phylogenetic network tree as described in any one of the first aspects.
[0009] Fifthly, embodiments of this application provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the method for determining the inclusion relationship of a binary phylogenetic network tree as described in any one of the first aspects.
[0010] The method for determining the inclusion relationship of a binary phylogenetic network tree provided in this application processes leaf nodes in the binary phylogenetic network N sequentially according to multiple priorities corresponding to the structural features of the leaf nodes. Deterministic processing that does not require enumeration is performed before branch processing, ensuring that structures that can be deterministically eliminated do not enter branch enumeration, thus compressing the branch search space from the source. During processing, the binary phylogenetic network N and the binary phylogenetic tree T are modified synchronously, allowing the topological information of T to participate in each processing decision in real time, changing the existing algorithm's approach of only using T as a static reference. After each edge deletion, only the two endpoints of the deleted edge and their neighboring nodes are locally re-estimated, and the leaf nodes to be processed and their priorities are updated accordingly, avoiding a full graph traversal after each operation. Therefore, the problem of search space expansion caused by insufficient utilization of the phylogenetic tree topological information during the search process is suppressed, and the efficiency of solving the tree inclusion problem is improved, thus providing efficient support for the batch screening of candidate phylogenetic networks in biological databases. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of the structure of a binary phylogenetic network tree inclusion relationship determination system for batch screening of biological databases, provided in an embodiment of this application; Figure 2This is a flowchart illustrating a method for determining the inclusion relationship of a binary phylogenetic network tree used in batch screening of biological databases, provided in an embodiment of this application. Figure 3 This is a schematic diagram of the substructure corresponding to basic fact 1 provided in the embodiments of this application; Figure 4 This is a schematic diagram of the substructure corresponding to basic fact 2 provided in the embodiments of this application; Figure 5 This is a first schematic diagram of the one-way equivalent transformation of the solution in basic fact 2 provided in the embodiments of this application; Figure 6 This is a second schematic diagram of the one-way equivalent transformation of the solution in basic fact 2 provided in the embodiments of this application; Figure 7 This is a schematic diagram of the substructure corresponding to basic fact 3 provided in the embodiments of this application; Figure 8 This is a schematic diagram of the first scenario of Case 1 in the basic facts 3 provided in the embodiments of this application; Figure 9 This is a schematic diagram of the second scenario of Case 1 of Basic Fact 3 provided in the embodiments of this application; Figure 10 This is a schematic diagram of the third scenario of Case 1 of Basic Fact 3 provided in the embodiments of this application; Figure 11 This is a schematic diagram of basic fact 3, case 2 provided in the embodiments of this application; Figure 12 This is a schematic diagram of the leaf node structure corresponding to priority 1 provided in the embodiments of this application; Figure 13 This is a schematic diagram of the leaf node structure corresponding to priority 2 provided in the embodiments of this application; Figure 14 This is a schematic diagram of the leaf node structure corresponding to priority 3 provided in the embodiments of this application; Figure 15 This is a schematic diagram of the leaf node structure corresponding to priority 4 provided in the embodiments of this application; Figure 16 This is a schematic diagram of the leaf node structure corresponding to priority 5 provided in the embodiments of this application; Figure 17 This is a schematic diagram of the leaf node structure corresponding to priority 6 provided in the embodiments of this application; Figure 18 This is a schematic diagram of the leaf node structure corresponding to priority 7 provided in the embodiments of this application; Figure 19 This is a schematic diagram of the leaf node structure corresponding to priority 8 provided in the embodiments of this application; Figure 20This is a schematic diagram of three structural scenarios of leaf nodes corresponding to priority 10 provided in the embodiments of this application; Figure 21 This is a schematic diagram of the subdivision of case III in priority 10 provided in the embodiments of this application; Figure 22 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0014] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0015] To facilitate understanding of the technical solutions provided in the embodiments of this application, the relevant concepts involved in the embodiments of this application are explained below.
[0016] A phylogenetic tree is a special type of rooted directed tree used to describe the evolutionary relationships between species, genes, or proteins. In a phylogenetic tree, the root node represents the common ancestor of all considered species, internal nodes represent divergence events that occurred in the history of ancestral species, and leaf nodes represent extant species or currently observed genes. Each leaf node has a unique label. If a phylogenetic tree satisfies the following conditions: the root node has an out-degree of 2, each internal node has an in-degree of 1 and an out-degree of 2, and each leaf node has an in-degree of 1 and an out-degree of 0, then it is called a binary phylogenetic tree.
[0017] Phylogenetic networks are a generalization of phylogenetic trees. Essentially, they are rooted, directed, acyclic graphs used to describe biological evolutionary processes involving complex events such as hybridization, gene recombination, and horizontal gene transfer. A phylogenetic network satisfies the following: it has a unique root node with an in-degree of 0; there are no directed cycles; each leaf node has a unique label; and all edges point from ancestor to offspring. The biggest difference between a network and a tree is that some nodes can have more than one parent node, representing situations where a species inherits genetic material from different ancestors simultaneously. If a phylogenetic network satisfies the following: the root node has an in-degree of 0 and an out-degree of 2; each tree node has an in-degree of 1 and an out-degree of 2; each regression node has an in-degree of 2, with internal regression nodes having an out-degree of 1 and leaf regression nodes having an out-degree of 0; and each non-regressing leaf node has an in-degree of 1 and an out-degree of 0, then it is called a binary phylogenetic network. Here, "binary" means that each speciation produces exactly two offspring, and each network event involves exactly two parental sources.
[0018] Tree nodes and regressive nodes: In phylogenetic networks, nodes, except for the root node, can be divided into two categories based on their in-degree and out-degree characteristics. Tree nodes are nodes with an in-degree of 1 and an out-degree greater than 1. In a binary network, the out-degree equals 2, representing normal species divergence or gene duplication events. Regressive nodes are nodes with an in-degree greater than 1. In a binary network, the in-degree equals 2, representing complex evolutionary events such as hybridization, horizontal gene transfer, and gene recombination, where an offspring simultaneously acquires genetic material from two parent lineages. It should be noted that the root node has an in-degree of 0, which does not meet the strict definition of a tree node, but it is equivalent to a tree node in the network structure, serving as the starting point of the evolutionary history described by the entire network, and does not require separate classification.
[0019] Regression number: Let R(N) be the set of all regression nodes in a phylogenetic network N. Then the regression number of the network is defined as: (1) The regression number is the total number of regression nodes in the network. It measures the complexity of the network; a larger regression number indicates more complex events such as hybridization and horizontal gene transfer involved, and a greater deviation from a tree structure. The regression number is the most commonly used structural parameter in parameterized algorithms, and in this embodiment, it is denoted as k.
[0020] Node suppression: In a phylogenetic network, if a node has both an in-degree and an out-degree of 1, it is topologically redundant. It is merely a transit point on a path and does not contribute any branching or merging information. In this case, the node can be deleted, and its unique parent node can be directly connected to its unique child node. This operation is called node suppression. Node suppression does not change the set of trees that the network can display and is the most basic and commonly used operation in network reduction.
[0021] Tree-like substructure: In a phylogenetic network N, let v be any tree node. A tree-like substructure rooted at v refers to a subgraph formed by all nodes and edges traversed from node v, following a priority depth-first search along the path below it until a leaf node or a regressor node is encountered. Specifically, the search starts at v and extends downwards layer by layer along the tree edges below v. Each time a tree node is encountered during the search, the search continues downwards along its edges. When a leaf node or a regressor node is reached, that node is marked as the boundary node of the substructure, and the downward expansion stops. The node set of the substructure is all nodes traversed during the search, including the starting point v and all boundary nodes, and the edge set is all edges traversed during the search.
[0022] Corresponding Nodes: Given a binary phylogenetic network N and a binary phylogenetic tree T with the same set of leaf labels, for a leaf node u in N, denoted by its label L(u), if the label of a leaf node u' in T is also L(u), then nodes u and u' are called corresponding nodes, i.e., a pair of leaf nodes with the same label. This correspondence is the basis of the embodiments of this application, because during the algorithm operation, whenever the local structure of a leaf node in N is checked, it is necessary to find the corresponding position of that leaf node in T through its label, so as to determine whether the local structure is consistent with the topology of the target tree T.
[0023] Display and inclusion: For a given phylogenetic network N and phylogenetic tree T, if the following three steps can be performed to obtain a rooted tree isomorphic to phylogenetic tree T, then the phylogenetic network N displays the phylogenetic tree T, or the phylogenetic network N includes the phylogenetic tree T. Here, isomorphism between two rooted trees with labeled leaf nodes means that there exists a one-to-one correspondence between nodes, which maintains the direction of edges and parent-child relationships, retains leaf node labels, and retains the identity of the root node. In the embodiments of this application, "display" and "inclusion" are equivalent terms, both indicating that the evolutionary structure of network N contains the evolutionary history described by tree T.
[0024] Tree Containment Problem: Given a binary phylogenetic network N and a binary phylogenetic tree T with the same set of leaf labels, the tree containment problem is defined as: determining whether the binary phylogenetic network N contains (explicitly) the binary phylogenetic tree T. If there exists a way to select the incoming edges of regression nodes such that each regression node selects exactly one of its two incoming edges, resulting in a tree isomorphic to T after edge deletion and node suppression, then output YES; otherwise, if none of the possible selection methods can produce a tree isomorphic to T, output NO.
[0025] Parametric algorithms: In parametric complexity theory, the regression coefficient k is typically used as the core parameter. The design goal of parametric algorithms is to constrain the exponential complexity of the problem to the parameter k, so that the algorithm's running time has the following form: (2) Where k is the number of regression nodes, n is the network size, i.e., the total number of nodes in the phylogenetic network, f(k) is a function that depends only on the parameter k, usually an exponential function, and poly(n) is some polynomial of n. When the parameter k is much smaller than the network size n, this is a typical characteristic of real biological data, i.e., hybridization events are relatively rare in evolutionary history. Such algorithms can solve problems accurately with near-polynomial time efficiency.
[0026] Branch search technique: Branch search is one of the core methods in fixed-parameter algorithm design. Its basic idea is to decompose the original problem into several subproblems, and then, by utilizing the relationships between these subproblems, gradually reduce the problem size through a search process until the original problem is solved. The basic process is as follows: Select parameter k as the metric for branch search, decompose the original problem into q subproblems, and each subproblem reduces parameter k by... , ... The computational complexity of this process can be recursively expressed as follows: (3) The corresponding characteristic equation is: (4) Let x0 be the largest positive real root of the characteristic equation for all possible branches. If each branch can be completed in polynomial time (n), then the total time complexity of the original problem can be constrained to... In this case, the 'O' notation indicates that polynomial factors are ignored. For example, suppose a branch process splits the original problem into two, and the branch process can be completed in polynomial time n, with the parameters of each subproblem reduced by 2, then the recurrence relation is: (5) The characteristic equation is Solving for x0, we get x0 is approximately 1.414, corresponding to a complexity of O(n log n). If operations can be designed to reduce parameters more significantly or have fewer branches, the eigenvalues will be smaller and the solution efficiency will be higher.
[0027] As described in the background section, existing algorithms do not fully utilize the topological information of the phylogenetic tree during the search process, leading to search space expansion and low solution efficiency. Specifically, existing schemes treat the phylogenetic tree T as an external static reference rather than a data structure that can be operated synchronously. The topological information of T is only referenced in individual steps or extracted into a static summary and then no longer interacted with. After each branch processing, a full graph traversal is used to find the structure that can be reduced to the next step, resulting in excessive computational overhead within each branch. The selection of incoming edges for each regression node is treated as an independent decision, without considering the topological coupling formed between regression nodes through shared downstream paths or common ancestors, making it difficult to eliminate invalid branches in advance. The granularity of node state classification is too coarse, making it impossible to distinguish which nodes can be immediately and deterministically eliminated through local operations and which must wait for branch processing. The branching strategy lacks asymmetric design, and in the worst case, the amount of regression node reduction is the same for all branch paths, making it difficult to break through the golden ratio of 1.618. The root cause of these problems is that the search process of existing algorithms experiences continuous accumulation of inefficiency in the three stages of information utilization, structure detection, and branch decision-making.
[0028] To address this, this application provides a method for determining the inclusion relationship in a binary phylogenetic network tree. Leaf nodes are categorized into multiple priority levels based on structural characteristics, with higher-certainty nodes receiving priority. Branch search is postponed until it cannot be derived further. The phylogenetic tree T is elevated to an equal status with network N, and through a synchronous deletion and label transmission mechanism between N and T, the complete topological information of T participates in each pruning decision in real time. A local incremental update strategy is adopted, updating only the affected nodes and their neighborhoods after each operation, avoiding full graph traversal. These three collaborative improvements compress the search space and improve solution efficiency while ensuring the correctness of the determination results.
[0029] Figure 1 This is a schematic diagram of a binary phylogenetic network tree inclusion relationship determination system for batch screening of biological databases, provided in an embodiment of this application. Please refer to... Figure 1The system includes an acquisition module, a processing module, a synchronous modification module, a state reestimation module, a judgment module, and a batch screening module. The acquisition module retrieves candidate phylogenetic networks and a target phylogenetic tree from a biological database, and filters the candidate phylogenetic networks based on the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree, which is a binary phylogenetic tree T. The processing module processes the leaf nodes in the binary phylogenetic network N sequentially according to preset priorities. The synchronous modification module synchronously modifies N and T during leaf node processing. The state reestimation module re-estimates the states of the two endpoints of the deleted edge and its neighboring nodes after each edge deletion in N, and updates the leaf nodes to be processed and their priorities based on the reestimation results. The judgment module determines whether N contains T based on the processing results of each leaf node. The batch screening module performs batch screening of candidate phylogenetic networks in the biological database based on the judgment results to identify candidate phylogenetic networks consistent with the gene evolution history represented by the target phylogenetic tree. In some implementations, the system can also maintain data structures such as priority queue groups and bidirectional mapping relationships. The priority queue groups include multiple first-in-first-out queues corresponding to multiple priorities, and the bidirectional mapping relationships include LabelToN and LabelToT tables, which record the correspondence between leaf labels and nodes in N and T, respectively, to support the priority determination and structure processing of the processing module.
[0030] In this embodiment, through the collaborative work of the acquisition module, processing module, synchronization modification module, state re-evaluation module, judgment module, and batch screening module, leaf nodes are processed in an orderly manner according to priority, deterministic processing is maximized in advance, branch search is minimized in delay, and N and T are always kept in a synchronized state. Thus, at the system level, the full utilization of the phylogenetic tree topology information and the compression of the search space are realized. The batch screening module applies the judgment results to the batch screening of biological databases, providing support for the automated screening of candidate evolutionary models.
[0031] It should be noted that the data involved in the embodiments of this application are scientific data such as phylogenetic networks and phylogenetic trees used in species evolution analysis, and do not involve personal privacy information; in the data processing process, data security and compliance requirements can be followed, such as verifying the legality of the data source, and desensitizing or anonymizing the data, etc., and the embodiments of this application do not limit this.
[0032] Figure 2 This is a flowchart illustrating a method for determining the inclusion relationship of a binary phylogenetic network tree used in batch screening of biological databases, as provided in an embodiment of this application. Please refer to... Figure 2 The method includes steps S101 to S106.
[0033] Step S101: Obtain candidate phylogenetic networks and target phylogenetic trees from the biological database. Filter candidate phylogenetic networks based on the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree. The target phylogenetic tree is a binary phylogenetic tree T.
[0034] In this embodiment, the binary phylogenetic network N includes tree nodes and regression nodes, with each regression node having two incoming edges. A biological database refers to a database storing biological evolution data, such as a public phylogenetic database or a private database built by a research platform. A candidate phylogenetic network is used to characterize evolutionary relationships among multiple species that include network evolutionary events, such as species networks, viral evolution networks, or microbial evolution networks obtained based on whole-genome analysis or multi-gene joint inference. A target phylogenetic tree is used to characterize the evolutionary history of a target gene in multiple species, such as a gene tree constructed based on sequencing data of a gene family. N and T have the same set of leaf labels, meaning they describe the evolutionary structure of the same group of existing species or genes. The difference lies in that N also includes regression structures formed by non-vertical genetic events such as hybridization and horizontal gene transfer. For example, N can be an evolutionary network constructed based on species data, and T can be a gene tree constructed based on gene sequencing data. Determining whether N contains T verifies whether the gene evolutionary path described by the gene tree can be accommodated by the evolutionary structure of the species network. Since candidate phylogenetic networks in the database typically cover the entire study area, their leaf labels often exceed those of the target phylogenetic tree, and they may contain evolutionary branches unrelated to the target gene. Screening involves retaining ancestral paths and regression structures relevant to the target gene samples, deleting irrelevant branches, and compressing redundant nodes. For example, node suppression is performed on nodes with both in-degree and out-degree of 1, resulting in a binary phylogenetic network N with the same set of leaf labels as the target phylogenetic tree. After screening, the global network originally describing the evolutionary history of the entire species population is transformed into a local network containing only samples related to the target gene, providing a unified and accurate input for subsequent tree inclusion determination. For new sequencing data not present in the database, a corresponding phylogenetic tree can be constructed first based on the target gene sequence, and then a candidate phylogenetic network can be constructed based on the whole genome data, followed by screening and preprocessing in the same manner.
[0035] Step S102: Process the leaf nodes in the binary phylogenetic network N sequentially according to multiple preset priorities.
[0036] In this embodiment, each priority level corresponds to the structural characteristics of the leaf nodes. The processing includes deterministic processing and branching processing. The principle of processing order is that deterministic processing is executed before branching processing, and lower-cost processing is executed before higher-cost processing. Specifically, deterministic processing includes deterministically deleting edges and / or nodes in the binary phylogenetic network N based on the local structural characteristics of the leaf node to be processed and the topological relationship of the corresponding node in the binary phylogenetic tree T. Branching processing includes selecting one incoming edge from each of the two incoming edges of the target regression node for deletion to form multiple branch sub-problems, and recursively performing the above processing on each branch sub-problem.
[0037] In this implementation, priority is used to characterize the degree to which a leaf node can be deterministically deduced. The more uniquely the structural features can identify the leaf node to be deleted, the higher its priority and the earlier it is processed. Deterministic processing refers to operations that can uniquely determine the processing result without enumerating choices, while branch processing refers to operations that require enumerating and searching among multiple choices. By scheduling deterministic processing before branch processing, structures that can be deterministically eliminated no longer enter branch enumeration, thus compressing the branch search space from the source; branch processing is only executed when deterministic deduction cannot continue, minimizing the delay of branch search.
[0038] Step S103: During the processing of leaf nodes, the binary phylogenetic network N and the binary phylogenetic tree T are modified synchronously.
[0039] In this embodiment, synchronous modification includes deleting the corresponding node or edge in the binary phylogenetic tree T when a node or edge is deleted in the binary phylogenetic network N, and adding the same label to the corresponding node in the binary phylogenetic tree T when a new label is added to a node in the binary phylogenetic network N. For example, when a pair of labeled leaf nodes that are siblings are deleted in N and a previously unseen label t is added to their parent node, the corresponding two leaf nodes in T are simultaneously deleted and the corresponding parent node is added with the same label t, so that N and T always describe the evolutionary structure on the same set of leaf labels.
[0040] In this embodiment, by synchronously modifying N and T, T is elevated to an equal status with N, enabling the complete topological information of T to participate in every step of the processing decision in real time. This changes the existing algorithm's approach of using T only as a static reference, and provides a real-time information foundation for constraint determination and deterministic edge selection based on topological relationships.
[0041] Step S104: After each deletion of an edge in the binary phylogenetic network N, the states of the two endpoints of the deleted edge and the neighboring nodes of the two endpoints are re-estimated, and the leaf nodes to be processed and their priorities are updated according to the state re-estimated results.
[0042] In this embodiment, state re-evaluation refers to re-examining the in-degree, out-degree, and structural characteristics of local nodes affected by edge deletion to determine their current state. Since edge deletion can only affect the states of the nodes at both ends of the deleted edge and their neighboring nodes, this embodiment only re-evaluates the nodes within the aforementioned local range, without needing to traverse the entire network. For example, if a node becomes a node with both in-degree and out-degree of 1 after edge deletion, node suppression can be performed on it; if a node becomes a leaf node after edge deletion, its priority is recalculated and the set of leaf nodes to be processed is updated according to the priority.
[0043] Step S105: Based on the processing results of each leaf node, determine whether the binary phylogenetic network N contains a binary phylogenetic tree T.
[0044] In this embodiment, if all leaf nodes are successfully processed and no contradiction occurs, then N is determined to contain T; if a deterministic contradiction occurs during the processing, or if all branch subproblems are exhausted and no inclusion conclusion is obtained, then N is determined not to contain T.
[0045] Step S106: Based on the judgment results, a batch screening of candidate phylogenetic networks in the biological database is performed to identify candidate phylogenetic networks that are consistent with the gene evolution history represented by the target phylogenetic tree.
[0046] In this embodiment, batch screening refers to performing the tree inclusion determination on each of the multiple candidate phylogenetic networks in the biological database and summarizing the determination results. For example, for a target phylogenetic tree, it is sequentially compared with multiple candidate phylogenetic networks in the database to screen out all candidate phylogenetic networks that can explain the evolutionary history of the gene, while excluding inconsistent candidate phylogenetic networks. For a candidate phylogenetic network, it can also be sequentially verified whether it can contain multiple target phylogenetic trees corresponding to different gene families, thereby evaluating the rationality of the candidate phylogenetic network as a global evolutionary model. The database records all determination results corresponding to each target phylogenetic tree, including the conclusion of inclusion or exclusion and the corresponding candidate phylogenetic network number. Based on these records, a list of candidate phylogenetic networks consistent with the evolutionary history of each gene family can be output, providing basic data for analytical tasks such as hybridization event identification, viral recombination analysis, and horizontal gene transfer detection.
[0047] In this embodiment, the efficiency of solving the decision-making process for a single tree group is improved, thereby reducing the total time required for batch screening and making automated consistency verification for massive candidate evolution models practical.
[0048] The method provided in this embodiment processes leaf nodes sequentially according to multiple priorities corresponding to their structural features, and schedules deterministic processing before branch processing to prevent derivable structures from entering branch enumeration. Through synchronous modification of N and T, the topological information of T participates in each processing decision in real time. By using local incremental state reestimation, full graph traversal after each edge deletion is avoided. Therefore, addressing the problems of insufficient utilization of the topological information of phylogenetic trees, resulting in search space expansion and low solution efficiency in existing algorithms, this embodiment can effectively compress the search space and reduce single-step computational overhead, thereby improving the solution efficiency of the tree inclusion problem and shortening the overall time for batch screening of biological databases.
[0049] In some embodiments, prior to step S102, the method may further include a preprocessing process, which includes steps A1 to A4.
[0050] Step A1: Perform a depth-first search traversal on the binary phylogenetic network N and the binary phylogenetic tree T, and record the parent and child nodes of each node.
[0051] Step A2: Perform node suppression on nodes in the binary phylogenetic network N that have both in-degree and out-degree of 1. Node suppression includes directly connecting the parent node of the node to the child node of the node and deleting the node.
[0052] Step A3: Establish multiple priority queues corresponding to multiple priorities, and add leaf nodes that meet the structural characteristics of the corresponding priority to the corresponding priority queue. At the same time, establish a corresponding hash table for each priority queue to record the nodes already enqueued to prevent duplicate additions.
[0053] Step A4: Establish a bidirectional mapping relationship between leaf labels and nodes. The bidirectional mapping relationship includes the correspondence between leaf labels and nodes in the binary phylogenetic network N, and the correspondence between leaf labels and nodes in the binary phylogenetic tree T.
[0054] In this implementation, the parent-child relationships recorded by the depth-first search traversal provide a basic graph access interface for subsequent operations; global node suppression pre-eliminates all redundant transit nodes in the network, simplifying the network size; priority queues enable leaf nodes to be retrieved in order of priority; bidirectional mapping supports bidirectional queries between labels and nodes in constant time. For example, given a leaf node u in N, the corresponding node u' can be directly located in the mapping table on the T side using its label L(u) as the key.
[0055] In this embodiment, all data structures and initial states required for subsequent processing are established at once through the preprocessing process, simplifying the operation of the main loop.
[0056] In some implementations, the multiple priorities may include ten priorities determined according to the in-degree of the leaf node, the node type of the leaf node's parent node, and the sibling relationship between the leaf node's label and the labels of its sibling nodes in the binary phylogenetic tree T. The leaf nodes of the first eight priorities are added to eight first-in-first-out queues, while the leaf nodes of the ninth and tenth priorities are not added to the queues. Accordingly, step S102 may include: retrieving the head leaf node from the first non-empty first-in-first-out queue in ascending order of queue number for processing.
[0057] In this implementation, the in-degree of a leaf node, the node type of its parent node, and the sibling relationship between the corresponding nodes in T are three structural dimensions that characterize the degree to which a leaf node can be deterministically deduced. Ten priorities are arranged from highest to lowest determinism. The first eight priorities correspond to cases that can be queued for processing, while the ninth and tenth priorities are fallback cases where the leaf nodes do not enter any queue and are only processed uniformly when all eight queues are empty. For example, priority 1 corresponds to a leaf node that does not have a label, and priority 2 corresponds to a leaf node with an in-degree of 1 and a unique parent node that is a regression node. The lower the priority (the larger the number), the more complex the structure of the leaf node, and the more the processing method tends to be branch enumeration.
[0058] In this implementation, leaf nodes are subdivided into ten priorities and scheduled using eight first-in-first-out queues. This ensures that structures with higher determinism are processed first, while branch searches are postponed until they cannot be derived further. Simultaneously, since deterministic processing with smaller queue numbers precedes branch processing with larger queue numbers, newly generated leaf nodes capable of deterministic processing after a branch operation are added to the smaller queue and processed with priority. This creates a positive feedback loop between branching and deterministic processing, further compressing the search space. The specific criteria for the ten priorities and the processing operations for each priority level can be found in the subsequent application examples.
[0059] In some implementations, the deterministic processing may include the following constraint determination based on the topological relationship of sibling nodes: when both the leaf node to be processed and its sibling node are leaf nodes with labels, if the corresponding node of the label of the leaf node to be processed and the label of its sibling node in the binary phylogenetic tree T is not a sibling node, then it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T.
[0060] In this embodiment, sibling nodes refer to two nodes that share the same parent node. When the leaf node u to be processed and its sibling node v are both labeled leaf nodes, the local structure of the shared tree node parent node has already been formed in N. Since tree T does not contain regression nodes, if the corresponding nodes u' and v' of u' and v' in T are not sibling nodes, then no matter which edges are subsequently deleted or retained, the above local structure will eventually be retained in the result tree. However, this structure is not part of T, thus creating a contradiction. Therefore, this instance can be directly determined to be a false instance.
[0061] In this embodiment, by using the above-mentioned constraint determination, unsolvable instances can be identified in advance without performing any branch enumeration, so that invalid searches are terminated at the earliest stage, avoiding unnecessary expansion of the search space for unsolvable instances.
[0062] In some implementations, the deterministic processing may further include the following tree-based substructure operations: performing a priority depth-first search on the tree substructure rooted at the sibling node of the leaf node to be processed, wherein the tree substructure is a subgraph consisting of nodes and edges traversed from the sibling node down the tree edges until a leaf node or a return node is encountered; if a leaf node with an in-degree of 1 is found, and if this leaf node with an in-degree of 1 is not the target leaf node, then it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T, wherein the target leaf node is the leaf node in the binary phylogenetic network N corresponding to the sibling leaf node of the leaf node to be processed in the binary phylogenetic tree T; if no leaf node with an in-degree of 1 is found, deleting the edges traversed in the tree substructure.
[0063] In this embodiment, the theoretical basis for the above operation is as follows: In a tree substructure rooted at the sibling node of the leaf node to be processed, if a leaf node with an in-degree of 1 appears at the end of the search and this leaf node is not the expected corresponding node, it indicates that the leaf node will meet the leaf node to be processed at an incorrect branch position, which contradicts the tree structure in T, and the instance must be a false instance; if the search ends are all returning nodes with an in-degree of at least 2, then the edges in this tree substructure will not be used by any correct solution and can be deleted deterministically as a whole. The above operation is also referred to as operation A in this embodiment of the application, and its specific derivation process can be found in the explanation of basic fact 3 in the subsequent specific application examples.
[0064] In this embodiment, by prioritizing depth search and deterministic deletion of tree-like substructures, hidden false instances can be identified, and a series of useless structures can be eliminated in one operation, avoiding branching and enumerating each regression node, thus significantly reducing the size of the structure to be searched.
[0065] In some implementations, the deterministic processing may further include the following deterministic edge selection based on a one-way equivalent transformation of the solution: when the in-degree of the leaf node to be processed is 1, the unique parent node of the leaf node to be processed is a tree node, and the sibling node of the leaf node to be processed is a leaf node with an in-degree of 2 and a label, the target in-edge to be deleted is determined from the two in-edges of the sibling node according to the sibling relationship between the label of the leaf node to be processed and the label of the sibling node in the binary phylogenetic tree T, and only the target in-edge is deleted.
[0066] In this implementation, when the only sibling node of the leaf node to be processed is a regression node, theoretically, one of the two incoming edges of that sibling node needs to be deleted, forming a binary choice branch. However, using the sibling relationship between the label of the leaf node to be processed and the label of its sibling node in T, it can be proven that: if the two corresponding nodes are not sibling nodes in T, then only one of the two incoming edges can be retained with a correct solution, and the other must be deleted; if the two corresponding nodes are sibling nodes in T, the leaf node to be processed and its sibling node can be arranged to meet in advance at the unique parent node, so that the solution set obtained by deleting one of the incoming edges includes all the solutions obtained by deleting the other incoming edge, that is, there is a one-way equivalence relationship between the two choices. Therefore, in either case, the target incoming edge to be deleted can be uniquely determined, reducing the original binary choice branch to a deterministic edge selection. The specific process of the above derivation can be found in the explanation of basic fact 2 in the subsequent specific application examples.
[0067] In this embodiment, by transforming the solution in a one-way equivalent manner, the two-choice branch is reduced to deterministic deletion, so that such a structure no longer consumes branch resources and directly reduces the number of branches in the branch search tree.
[0068] In some implementations, the branching process may include asymmetric two-way branching: when the in-degree of the leaf node to be processed is 2, one of the parent nodes of the leaf node to be processed is a regressing node, and the only sibling node of the leaf node to be processed is a leaf node with an in-degree of 2 and a label, the asymmetric two-way branching is performed; the asymmetric two-way branching includes a first branch and a second branch, the first branch deleting the edges associated with the leaf node to be processed, the two parent nodes of the leaf node to be processed, and the only sibling node to eliminate three regressing nodes, and the second branch deleting the in-edge between the aforementioned parent node and the leaf node to be processed to eliminate one regressing node.
[0069] In this embodiment, the regression node reduction amounts for the two branches are 3 and 1, respectively, which are significantly asymmetrical. According to the recursive analysis of the branch search technique, the recursive relationship corresponding to this branch processing is T(k) = T(k-3) + T(k-1), and the characteristic equation is... Its maximum positive real solution is approximately 1.465, which is less than the common degenerate value of 1.618 other than the characteristic root of the symmetric two-way branch of 1.414. For details, please refer to the explanation of formula (7) in the subsequent specific application examples.
[0070] In this embodiment, by using asymmetric branching design, the reduction of single regression nodes in some branches is significantly greater than that in other branches, thereby reducing the eigenvalues of branch recursion and lowering the upper bound of the search tree size.
[0071] In some implementations, step S102 may further include branching for a fallback scenario: when all FIFO queues are empty and leaf nodes still exist in the binary phylogenetic network N, a pair of sibling leaf nodes are selected in the binary phylogenetic tree T. Based on the bidirectional mapping relationship, the labels of these sibling leaf nodes are determined to correspond to two target nodes in the binary phylogenetic network N. The two target nodes are then judged to belong to either the ninth or tenth priority level. If they belong to the ninth priority level, deterministic processing is performed on the target nodes; if they belong to the tenth priority level, branching processing is performed on the target nodes. After deleting the incoming edges, each branch subproblem performs the following processing on the sibling nodes of the leaf node to be processed: The search proceeds downwards along the tree edges from the sibling node until a leaf node or a return node is encountered. If a leaf node with an in-degree of 1 is found, it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T. If no leaf node with an in-degree of 1 is found, the searched edges are deleted, and the leaf nodes that satisfy the structural characteristics of the corresponding priority after processing are added to the corresponding priority queue.
[0072] In this implementation, leaf nodes remaining in N but not yet enqueued fall under the catch-all category of the ninth and tenth priorities, whose local structures cannot be processed by the rules of the first eight priorities. In this case, a branch point is artificially constructed by selecting a pair of sibling leaf nodes in T and mapping them back to N. The decision to perform deterministic processing or branching processing is made by determining whether the node belongs to priority 9. The process of searching downwards along the tree edges from the sibling node and deleting the edges traversed during the search is operation A. Since the structure generated after branching will inevitably contain sibling nodes capable of executing operation A, branching will inevitably trigger operation A, generating new leaf nodes that can be deterministically processed and flowing back to the priority queue, allowing the main loop to continue running.
[0073] In this implementation, the linkage mechanism between the fallback branch and operation A ensures that the algorithm can continue to advance under any structural condition. At the same time, each step of the fallback branch can trigger deterministic deletion in a cascading manner, thereby suppressing the expansion of the search space in the worst case.
[0074] In some implementations, branching can be performed using an explicit backtracking method, including: recording a list of changes for each branch subproblem, the list of changes including deleted edges, deleted nodes, and changed labels; and, if the branch subproblem processing is completed and backtracked, restoring the binary phylogenetic network N and the binary phylogenetic tree T in the reverse order of the records in the change list.
[0075] In this implementation, the modification list records changes occurring at both ends of N and T. For example, if edge e1, node u, and the label of node x are deleted sequentially in a certain branching subproblem, then during rollback, the label of x, node u, and edge e1 are restored in reverse order.
[0076] In this embodiment, the branch search rollback operation can be supported without deep copying N and T through an explicit backtracking mechanism. This reduces the space overhead of the branch from copying the entire data structure each time to only recording the actual changes, significantly reducing memory overhead and copying time.
[0077] In some implementations, the state re-evaluation in step S104 may include: performing node suppression on a node when both its in-degree and out-degree are 1; recalculating the priority of a leaf node when it becomes a leaf node, and attempting to add the leaf node to the first-in-first-out queue corresponding to the recalculated priority and updating the corresponding hash table if the recalculated priority is among the top eight priorities; and synchronously updating the parent-child relationship information and bidirectional mapping relationship of the two ends of the deleted edge.
[0078] In this implementation, state recalculation only applies to the two endpoints of the deleted edge and their neighboring nodes. For example, after deleting an edge, if the out-degree of an endpoint becomes 0, that endpoint becomes a leaf node, and its priority is recalculated. If the recalculated priority belongs to the top eight priorities, the tuple containing the priority and the node is placed in the queue with the corresponding number. After deleting an edge, the parent-child information of the two endpoints is modified synchronously; after a node adds a label, the LabelToN and LabelToT mapping tables are updated synchronously to ensure that the bidirectional mapping relationship is always consistent with the current state.
[0079] In this implementation, by maintaining the state in a localized incremental manner, the structural changes caused by edge deletion are restricted to propagation within a local scope. Newly generated processable leaf nodes are promptly identified and added to the queue, and the parent-child information and label mapping remain consistent, ensuring the correctness of subsequent processing. At the same time, repeated traversal of the entire network is avoided, reducing the single-step maintenance overhead to a constant level.
[0080] In some implementations, the process of processing leaf nodes sequentially according to multiple preset priorities may include priority failure detection of the head node: after removing the head leaf node, recalculate the true priority of the head leaf node in the current state; if the true priority is inconsistent with the priority when the head leaf node was enqueued, discard the head leaf node and remove the next head leaf node.
[0081] In this implementation, since the local structure of a leaf node may be altered by subsequent operations after it is enqueued, its actual priority may change, potentially leaving expired records in the queue. By recalculating the actual priority of the leaf node at the head of the queue after removing it, expired records can be identified and discarded. Since any altered leaf nodes have already had their priorities recalculated and added to the corresponding queue in a subsequent state reassessment, discarding expired records will not result in any omissions.
[0082] In this embodiment, priority failure detection ensures that the leaf node actually processed each time is the leaf node with the highest priority in the current state, thereby ensuring the correctness of the processing order and avoiding incorrect processing caused by expired records.
[0083] In some implementations, step S105 may include: determining that the binary phylogenetic network N contains a binary phylogenetic tree T if there are no remaining leaf nodes in the binary phylogenetic network N; and determining that the binary phylogenetic network N does not contain a binary phylogenetic tree T if all branch subproblems have been processed and the binary phylogenetic network N has not been determined to contain a binary phylogenetic tree T.
[0084] In this implementation, when there are no remaining leaf nodes in N, it means that all labeled leaf nodes have been successfully processed. At this time, N has only one root node, and all local structures are consistent with the topology of T. It can be determined that N contains T, and YES is output. When all branch subproblems are exhausted and no branch has obtained the inclusion conclusion, it means that there is no way to select the incoming edge that can obtain a tree isomorphic to T. It can be determined that N does not contain T, and NO is output.
[0085] In this embodiment, by using explicit termination conditions, the algorithm is guaranteed to end within a finite number of steps and output a definite determination result, and the determination result is strictly consistent with the definition of the tree inclusion problem.
[0086] To facilitate understanding of the technical solution of this application, a specific application example will be used to illustrate the technical solution of this application in detail below.
[0087] I. Detailed Analysis of Application Scenarios and Existing Technologies The rapid development of high-throughput sequencing technology has led to the continuous accumulation of massive amounts of genomic, transcriptomic, and proteomic data. Reconstructing evolutionary relationships between species using molecular sequences has become one of the core research areas in modern life sciences. Phylogenetic analysis infers the divergence history of different species by comparing gene or protein sequences.
[0088] Phylogenetic tree models are widely used to describe evolutionary relationships due to their simplicity and solid mathematical foundation. Tree models naturally correspond to vertical inheritance processes, where genetic material is transmitted unidirectionally from parent to offspring, and their branching structure intuitively depicts the history of gradual differentiation from a common ancestor through speciation events. However, in actual evolutionary processes, non-vertical inheritance events such as horizontal gene transfer, hybridization, gene recombination, viral co-infection, and gene introgression are prevalent. These events mean that the genetic material of a species or gene may originate from multiple different ancestral lineages, breaking the strict vertical transmission assumption upon which tree models rely. Therefore, evolutionary history at the species level needs to be described using phylogenetic networks. Although evolution at the species level needs to be described using networks, the inheritance process of a single gene is naturally tree-like. This naturally leads to a core question: after constructing an evolutionary network N from species data and a gene tree T from gene sequencing, can the gene evolutionary path described by T be accommodated by the evolutionary structure of N? In other words, this is the tree inclusion problem of determining whether the phylogenetic network contains the phylogenetic tree. This problem has important applications in scenarios such as consistency verification of evolutionary models and coordination analysis of gene trees and species networks.
[0089] As public biological databases continue to accumulate large amounts of phylogenetic tree and phylogenetic network data, research platforms need to perform automated consistency verification and batch screening of massive candidate evolutionary models. During batch screening of biological databases, it is typically necessary to determine the inclusion relationship between candidate phylogenetic networks and target phylogenetic trees in a batch. For example, multiple candidate species networks, virus evolution networks, or microbial evolution networks can be read from the database, along with their corresponding gene tree data. The method provided in this application's embodiments can then be used to determine whether each phylogenetic tree is included in the candidate phylogenetic network, thereby automatically screening candidate models that meet evolutionary constraints.
[0090] The essence of the tree inclusion problem is: given a species evolution network N containing network events such as hybridization and gene transfer, and a phylogenetic tree T describing the evolutionary trajectory of a certain gene, does there exist a way to select exactly one of the two incoming edges from each regression node in N and delete the other, such that the rooted tree obtained after edge deletion, unreachable node deletion, and node suppression is isomorphic to T? Based on this idea, fixed-parameter algorithms based on search trees constitute the mainstream approach to solving the tree inclusion problem. Early algorithms used a naive branch enumeration strategy, independently selecting the incoming edges of each regression node, with the worst-case running time reaching [missing information]. In recent years, researchers have significantly reduced the branching factor and thus the exponential base by designing more sophisticated decomposition and reduction rules. The following section provides a detailed analysis of two of the most representative existing technical solutions.
[0091] Firstly, the tree component algorithm proposed by Gunawan et al. in 2016. The core idea of this algorithm is to decompose the network into several tree components: starting from each regression node or root node, extending downwards along the tree edges until the next regression node is encountered, all covered nodes form a local subtree. In this way, all non-regression structures in the network are cut into non-overlapping tree components. Each tree component has two key states: exposed, meaning there are no nested complex substructures below it; and visible, meaning there exists a leaf label such that all paths from the root to that label pass through this component. Components enter two processing paths depending on their state: if the component is simultaneously exposed, visible, and non-trivial, the entire component along with its lower structure is shrunk into a new leaf node, without branching, deterministically eliminating a regression node; this operation is called dissolution. If the component is exposed but not visible, a regression node below the component is selected as a two-way branch, deleting two candidate incoming edges from the outside and two from the inside respectively, reducing at least one regression node in each path. In the worst case, the branches form a Fibonacci recurrence. The eigenvalues were found to be the golden ratio of 1.618. However, the calculations related to a single dissolution operation require dynamic programming, which is time-consuming. Therefore, the time complexity is O(n). This work represents a breakthrough for the first time. The upper bound, and its tree component decomposition paradigm, became the basis for subsequent research in this direction.
[0092] Secondly, the stability algorithm proposed in Li Hangcheng's 2023 dissertation. This algorithm, also for rooted binary networks, improves the time complexity to... It has the same exponential base as Gunawan, but the polynomial part is different. Down to The core idea of this algorithm is to introduce stability to determine which regression edges can be eliminated directly without branching: Marking layers from the leaf to the root, if a node is stable, all paths to its descendants must pass through it. Leaves are naturally stable, and stability propagates from bottom to top. Among the three branching cases considered, the worst case involves a correlation analysis with deterministic approaches, and the corresponding characteristic equation is... The positive real root of the inequality is exactly the golden ratio 1.618. Furthermore, each branch requires traversing the entire network from bottom to top, thus the overall complexity is constrained to within a certain range. The two works mentioned above together constitute the best results for this problem in the published literature prior to this application. The difference between the two is that Gunawan decomposes the network into tree components for bottom-up processing, while this paper uses stability labels for bottom-up derivation, which belongs to two different paradigms.
[0093] Analysis reveals the following drawbacks of existing technologies: First, the information in the phylogenetic tree T is not fully utilized; existing schemes only refer to T or extract static summaries in certain steps and then cease interaction. Second, the computational overhead within each branch is too high, requiring a full graph traversal and failing to achieve local incremental updates. Third, the search space is too large, making it difficult to eliminate invalid branches in advance, neglecting topological coupling between nodes, and lacking early pruning. Fourth, the utilization of network topological features is insufficient, node states are roughly characterized, and the one-way equivalent transformation of solutions is not utilized. Fifth, the exponent base does not break through the Fibonacci upper bound of 1.618, and both schemes eventually degenerate to the golden ratio.
[0094] Analyzing the shortcomings of existing technologies using causal reasoning, the reasons are as follows: First, existing solutions treat the phylogenetic tree T as an external static reference, rather than a data structure that can be operated synchronously. The Gunawan algorithm only uses T for relevant decisions during dissolution, and T is not involved at all in the branching process. The dissertation pre-compresses T into a target set and then no longer accesses T itself. Second, existing solutions use a full graph traversal after each branching process to find the structure that can be reduced to the next step. Each recursive call in Gunawan requires traversing the entire network for relevant calculations, resulting in high overhead per call. Although the dissertation optimizes this to inverse topological sorting, it still requires scanning the entire graph after deleting an edge. Third, existing schemes treat the selection of incoming edges for each regression node as independent decisions, failing to consider the topological coupling formed between regression nodes through shared downstream paths or common ancestors. For example, if the descendant labels of two regression nodes happen to be a pair of siblings in T, they cannot each choose disjoint ancestor paths. Such constraints are not utilized by existing schemes. Fourth, the node state classification granularity of existing schemes is too coarse. The stability of the thesis is only divided into stable and unstable. Once stability propagation is interrupted at a certain layer, all unlabeled nodes fall into the same state, making it impossible to distinguish which can be immediately and deterministically eliminated through local operations and which must wait for branch processing. Fifth, Gunawan's recursion... Characteristic equation of the thesis Both degenerate to the golden ratio of 1.618. In the worst case, neither can allow some branches to eliminate enough regression nodes at once to reduce the overall eigenvalues. The fundamental reason is that the branching strategy lacks asymmetric design, and the reduction amount of all branch paths is the same.
[0095] Based on the above analysis, this application recognizes that the limited efficiency of solving the tree containment problem is not caused by the lack of a single strategy, but rather by the continuous accumulation of inefficiencies in the search process of existing algorithms across the three stages of information utilization, structure detection, and branch decision-making. Therefore, this application elevates T to an equal status with N at the information utilization level. Through the synchronous deletion and label transmission mechanism between N and T, the complete topological information of T participates in each step of the pruning decision in real time. At the same time, it utilizes the topological relationships of sibling nodes to identify unsolvable instances in advance. At the structure detection level, a local incremental update strategy is adopted, updating only the affected nodes and their neighborhoods after each operation. At the branch decision-making level, leaf nodes are divided into ten priorities based on structural characteristics, with higher determinism being processed first. An asymmetric branching design and a one-way equivalent transformation of the solution are used to suppress eigenvalues.
[0096] II. Basic Definitions and Problem Formalization The following definitions are divided into three groups: basic concepts of graph theory, establishing a general mathematical language; specific concepts of phylogenetic networks, describing the structural features of biological evolution models; and formal definitions of problems, defining the problems that this application aims to solve.
[0097] A directed graph is a data structure consisting of a vertex set V and an edge set E between vertices in V. |V| represents the number of vertices in graph G, and |E| represents the number of edges in graph G. For an edge set E′, G\E′ represents the network obtained by deleting edges from E′ in G. In a directed graph, every edge has a specific direction.<u,v> This indicates that the edge points from vertex u to vertex v. The in-degree of vertex u is the number of edges pointing to u, i.e., it is in the form of...<x,u> The number of edges; the out-degree of vertex u is the number of edges pointing from u to other vertices, i.e., in the form of...<u,x> The number of edges. In simple terms, in-degree indicates how many edges end with u, and out-degree indicates how many edges start with u. These quantities are used in the algorithm to determine the type and state of nodes.
[0098] Directed Acyclic Graph (DAG): A DAG is a special type of directed graph whose core characteristic is that it contains no directed cycles. A directed cycle is a directed path that starts from a given node, traverses several edges, and returns to that node. In other words, for any node v, there does not exist a path of the form: The structure of a directed acyclic graph (DAG) is such that, since there are no directed cycles, nodes in a DAG can naturally form an ancestor-descendant hierarchy: if there exists a directed path from node u to node v, then u is said to be an ancestor of v, and v is a descendant of u. This ancestor-descendant relationship is transitive: if u is an ancestor of v and v is an ancestor of w, then u is also an ancestor of w. Intuitively, a DAG can be imagined as a multi-layered structure where all edges point from ancestors in the upper layers to descendants in the lower layers. Because there are no cycles, there will never be a logical contradiction where a node is on top of another node and another node is on top of the same node. This property makes DAGs very suitable for describing evolutionary history.
[0099] Rooted Tree: A tree T is a connected, acyclic directed graph structure where V(T) is the set of vertices and E(T) is the set of edges. In a rooted tree, one node is designated as the root node, and the remaining nodes form a hierarchical structure from the root to the leaves. In a rooted tree, for each edge...<u,v> In a tree, u is called the parent node of v, and v is called the child node of u. If two nodes have the same parent node, they are called sibling nodes. A rooted tree satisfies the following properties: the root node has no parent node and its in-degree is 0; every node except the root node has exactly one parent node and its in-degree is 1; nodes with an out-degree of 0 are called leaf nodes, representing the endpoint of the evolution process; non-leaf nodes are called internal nodes, representing the branching points in the evolution process; there is a unique path from the root node to any node.
[0100] Isomorphism: Two trees T1 and T2 with roots and labeled leaf nodes are said to be isomorphic if a one-to-one correspondence exists between their nodes, satisfying the following: Maintaining the direction and parent-child relationship of edges (i.e., if node u is the parent of v in T1, then the node corresponding to u is also the parent of the node corresponding to v in T2); Maintaining leaf node labels (i.e., if the label of leaf node u in T1 is 'a', then the label of the node corresponding to u in T2 is also 'a'); Maintaining the identity of the root node (i.e., the root node of T1 corresponds to the root node of T2). Simply put, two labeled trees are isomorphic because, ignoring the specific drawing method, they have completely identical lineage structures. Isomorphism is the ultimate criterion for determining whether a phylogenetic network contains a certain phylogenetic tree.
[0101] Based on this, the definitions of binary phylogenetic trees, binary phylogenetic networks, tree nodes, regression nodes, regression numbers, node suppression, tree substructures, corresponding nodes, explicit and implicit inclusion, tree inclusion problem, parameterized algorithms, and branch search techniques can be found in the relevant concept explanation section above, and will not be repeated here. Among them, the running time form of the parameterized algorithm is given by formula (2) above, and the branch recursion relationship and characteristic equation are given by formula (3) and formula (4) above, respectively.
[0102] The algorithm in this application example is a priority-driven algorithm, which divides each leaf node into 10 priority levels and processes each leaf node in ascending order of priority. After processing the current highest priority node, the priorities of nearby leaf nodes are reassessed, and the next highest priority leaf node is processed, entering the next loop. If a contradiction occurs during the processing of a leaf node, or if all leaf nodes have been processed, the algorithm terminates, and it can be determined whether the problem is a true instance or a false instance.
[0103] III. Three fundamental facts used to derive reduction operations Before going into the specific details of the algorithm, let’s first establish the following three basic facts for deriving the reduction operation.
[0104] Basic Fact 1: Please refer to Figure 3 If N contains a substructure where u and v are sibling nodes and both are leaf nodes, and let u and v correspond to nodes u' and v' in T, respectively, then if u' and v' are not sibling nodes in T, then N must not contain T. This means the tree inclusion problem is a false instance (i.e., "determining that the binary phylogenetic network N does not contain the binary phylogenetic tree T"). The reason is that regardless of which edges are deleted or selected, the local structure of u and v sharing a tree node parent node will ultimately remain in the resulting tree, but this structure is not part of T, thus creating a contradiction.
[0105] Basic Fact 2: Please refer to Figure 4 If N has the following substructure, where u and v are sibling nodes and both are leaf nodes, v has an in-degree of 2, and v's two parent nodes are x and y, where x is also the parent node of both u and v. Let u' and v' be the corresponding nodes in T. Since the tree does not contain regressing nodes, the two edges connecting v...<x,v> and<y,v> We must choose to delete one edge, and we will discuss the following two cases: If u' and v' are not sibling nodes in T, then we retain the edge.<x,v> And delete the edge<y,v> According to the discussion of basic fact 1, this is not feasible, so the deletion of the edge can be uniquely determined.<x,v> ; If u' and v' are sibling nodes in T, theoretically it's possible to keep either edge, but if we consider keeping one edge...<y,v> And delete the edge<x,v> In this case, it means that until points u and v meet at some point, all redundant edges connecting the previous points will be deleted, meaning they won't be used in the final result. Therefore, it's entirely possible to arrange for points u and v to meet at point x beforehand. In other words, if we choose to delete edges...<x,v> Ultimately, we can obtain N containing T, so we choose to delete the edge.<y,v> It will definitely guarantee the same result, but not necessarily the other way around, so we only need to consider deleting edges.<y,v> That's all that matters.
[0106] Please refer to Figure 5 and Figure 6 For selecting to delete edges<y,v> To explain in detail, the red edges represent the edges through which u and v meet, and the blue edges represent the edges that are deleted. Figure 5 In a correct solution, that is, a feasible solution where N contains T, points u and v meet at the topmost black point; Figure 6 In China, according to Figure 5 In the modified solution, points u and v meet for the first time at point x, but they still pass through the topmost black point. Furthermore, the union of the red and blue edges (the edges that are kept and the edges that are deleted) remains unchanged, meaning it doesn't affect other parts of the solution. Therefore... Figure 6 This would also be a feasible solution. These two graphs explain why it's unnecessary to consider deleting edges.<x,v> Therefore, the branch that originally required two choices and enumeration is reduced to a unique edge deletion (i.e., "determine the target incoming edge to be deleted from the two incoming edges of the sibling node, and delete only the target incoming edge").
[0107] Basic Fact 3: Please refer to Figure 7 If N has the following substructure, where u and v are sibling nodes, u is a leaf node, and v is a tree node, then v represents all nodes below v. , ... The omitted nodes are all tree nodes, forming a tree substructure rooted at point v. This means performing a depth-first search on v, traversing downwards along the tree node chain below v until a leaf node or a returning node is encountered. Let u' be the node corresponding to u in T, u' have a sibling leaf node o' in T, and o' have a corresponding node o in N. Consider the terminal node reached during the traversal. , ... Different situations.
[0108] Case 1: Among the terminal nodes reached during traversal, there exists a leaf node with an in-degree of 1.
[0109] For the first scenario, please refer to... Figure 8 If there is only one leaf node with an in-degree of 1 and this leaf node is point o, since point u and point o will definitely meet at point x, then except for the edge between point w and point o, all the other edges omitted in the graph, i.e. the red edges, can be directly deleted. Among them, the labels of o and u are sibling nodes in T.
[0110] For the second scenario, please refer to... Figure 9 If there are multiple leaf nodes with an in-degree of 1, and one of them is point O, denote any point that is not point O as... This means that point o and They will definitely meet before point u, which does not conform to the tree structure in T. Therefore, the instance can be directly determined to be a false instance, that is, N cannot display T.
[0111] For the third scenario, please refer to... Figure 10 If point o does not exist among the points with an in-degree of 1, then denote any leaf node with an in-degree of 1 as... So, due to v to All nodes between them are tree nodes, with no branches or merges. In any tree ultimately obtained from N, u must be connected to... They meet at point v. Therefore, regardless of where point o is, either point o or... First, meet, or click u and... If they meet first, it does not conform to the tree structure in T, so the instance can be directly determined to be a false instance, that is, N cannot display T.
[0112] Scenario 2: Please refer to Figure 11 All terminal nodes visited All nodes are regression nodes with an in-degree of at least 2, and node x is not an ancestor of node o. In this case, all edges marked in red in the graph can be deleted, including the edges...<x,v> And all edges on the v chain. Its correctness lies in the fact that since v is not an ancestor of o, the point where u and o meet must be above x. Therefore, no other leaf node needs to pass through these red edges. If any exist, then according to the argument in case 1, the instance must be a false instance. Therefore, the deletion of this chain is a deterministic deduction and does not affect the determination of the inclusion relationship.
[0113] Based on basic fact 3, we can define operation A on point q: perform a priority depth-first search on point q until a leaf node or a return node is encountered. If a leaf node with an in-degree of 1 is encountered, then this instance is a false instance and NO is returned; otherwise, delete all traversed edges and check all traversed nodes (i.e., "search downwards along the tree edges from the sibling node until a leaf node or a return node is encountered, and stop when a leaf node with an in-degree of 1 is encountered and is not the target leaf node, determine that the binary phylogenetic network N does not contain the binary phylogenetic tree T, and delete the searched edges if no leaf node with an in-degree of 1 is found").
[0114] IV. The division of ten priorities and the processing operations for each priority level First, all possible leaf node cases are assigned priority numbers, with smaller numbers indicating higher priority. The ten priority levels are based on the following table (i.e., "ten priorities determined according to the in-degree of the leaf node, the node type of the leaf node's parent node, and the sibling relationship between the leaf node's label and its sibling node's label in the binary phylogenetic tree T"): Table 1. Priority Division Basis Table
[0115] Please refer to Figures 12 to 20 , Figures 12 to 19 The leaf node structures corresponding to priorities 1 to 8 are shown respectively. Figure 20 The diagram illustrates three structural scenarios for the leaf nodes corresponding to priority 10, with point u being the point we are considering. Among these, Figure 12 Corresponding to priority 1, Figure 13 Corresponding to priority 2, Figure 14 Corresponding priority 3, Figure 15 Corresponding priority 4, Figure 16 Corresponding priority 5, Figure 17 Corresponding priority 6, Figure 18 Corresponding priority 7, Figure 19 Corresponding priority 8, Figure 20 The corresponding priority is 10.
[0116] The following considers the processing methods for each priority level. During the algorithm's execution, after deleting some edges, other points may become new leaf nodes or be eligible for node suppression operations. Therefore, as the algorithm progresses, it continuously checks the latest status of surrounding nodes (i.e., "after each deletion of an edge in the binary phylogenetic network N, the states of the two endpoints of the deleted edge and their neighboring nodes are re-evaluated"). The specific processing operations for each priority level are as follows.
[0117] Priority 1: Please refer to Figure 12Let the parent nodes of u be x and y, where y may not exist because u may have only one parent node. Then, delete node u and the edge from N.<x,u> ,<y,u> ,if<y,u> If it exists. This operation is not a branching process and takes constant time.
[0118] Priority 2: Please refer to Figure 13 Let x be the parent node of u. Then, delete node u and the edge from N.<x,u> The process involves adding a label L(u) to point x and then checking the state of point x. This operation is not a branching process and takes constant time.
[0119] Priority 3: Please refer to Figure 14 Let x be the unique parent of u, and v be its sibling. Let u' be the node corresponding to u in T, and v' be the node corresponding to v in T. If u' and v' are sibling nodes in T, and x' is the parent of u' and v' in T, then delete nodes u, v, and edges in N.<x,u> ,<x,v> And add a label t to x that did not appear before, and delete points u', v' and edges in T.<x’,u’> ,<x’,v’> Furthermore, a label t is added to point x' (i.e., "if a node or edge is deleted in the binary phylogenetic network N, the corresponding node or edge is deleted in the binary phylogenetic tree T; and if a label is added to a node in the binary phylogenetic network N, the corresponding node in the binary phylogenetic tree T is added with the same label"). If u' and v' are not sibling nodes in T, then this instance is a false instance, and the algorithm can directly return NO (i.e., "it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T", the correctness of which is guaranteed by basic fact 1). This operation is not a branching process and takes constant time.
[0120] Priority 4: Please refer to Figure 15Let x be the only parent of u, v be its sibling, and y be the other parent of the sibling. Let u' be the node corresponding to u in T, and v' be the node corresponding to v in T. If u' and v' are siblings in T, let x' be the parent of u' and v' in T. Then delete points u and v in N, and delete the edges.<x,u> ,<x,v> ,<y,v> And add a label t to x that did not appear before, and delete u', v', and edges from T.<x’,u’> ,<x’,v’> And label point x' with t; if u' and v' are not sibling nodes in T, then delete point u in N and delete the edge.<x,u> ,<x,v> And add a label L(u) to x. This operation is not a branching process and takes constant time. In the second case, the edge...<x,v> The deterministic deletion is guaranteed by the one-way equivalent transformation of basic fact 2 (i.e., "based on the sibling relationship between the label of the leaf node to be processed and the label of the sibling node in the corresponding node in the binary phylogenetic tree T, the target incoming edge to be deleted is determined from the two incoming edges of the sibling node, and only the target incoming edge is deleted").
[0121] Priority 5: Please refer to Figure 16 Let x and y be the parent nodes of u, and let x's two parent nodes be x1 and x2, and y's two parent nodes be y1 and y2. Perform the following two branch operations: Branch a, delete points u and x in N, and delete the edges.<x,u> ,<x1,x> ,<x2,x> ,<y,u> And add a label L(u) to y; in branch b, delete points u and y in N, and delete the edges.<y,u> ,<y1,y> ,<y2,y> ,<x,u> And a label L(u) is added to x. This operation is a branching process; branch a eliminates two regression nodes u and x, and branch b eliminates two regression nodes u and y. Therefore, the characteristic equation is: (6) Its largest positive real solution is approximately 1.414.
[0122] Priority 6: Please refer to Figure 17Let x and y be the parent nodes of u, and let v be the other child node of x, which is u's sibling node, satisfying that the other parent node of the sibling node is z. v must have another parent node; otherwise, according to priority 4, node v will be processed first. Let u' be the node corresponding to u in T, and v' be the node corresponding to v in T. Then u' and v' are sibling nodes in T. Let x' be the parent node of u' and v' in T. Perform the following two branch processing: Branch a, delete nodes u and v in N, and delete the edges.<x,u> ,<y,u> ,<x,z> ,<z,v> And add a label t to x that did not appear before, and delete points u' and v', as well as edges, from T.<x’,u’> ,<x’,v’> And add a label t to point x'; branch b, delete the edge in N.<x,u> ,<x,v> Its correctness lies in basic fact 2, which is that regardless of our choice to retain the edge...<x,u> and<z,v> Or keep the edge?<y,u> and<x,v> All of these contradict the one-way equivalent transformation guarantee of basic fact 2, thus preserving the edge<x,u> and<x,v> This will cover the solutions for both cases. This operation is a branching process. Branch a eliminates two regression nodes u and v, and branch b eliminates two regression nodes u and v. Therefore, the characteristic equation is the same as formula (6), and the maximum positive real solution is approximately 1.414.
[0123] Priority 7: Please refer to Figure 18 Let x and y be the parent nodes of u, v be the sibling node of u connected to x, z be the other parent node of v, o be the sibling node of u connected to y, and w be the other parent node of o. Due to priority, the node corresponding to u in T is not a sibling node of the node corresponding to v in T; otherwise, priority 6 would be used. Proceed to the following two branches: Branch a, delete node u in N and delete the edge.<x,u> ,<y,u> ,<x,v> And add a label L(u) to x; branch b, delete point u in N, and delete the edge.<x,u> ,<y,u> ,<y,o> And add a label L(u) to y. Its correctness lies in basic fact 1, in order to preserve the edge.<y,o> For example, we cannot choose to keep the edges.<y,u> The only option is to delete the edge.<y,u> It should be noted that in branch a, the priority of o may need to be recalculated due to the change in the state of y (i.e., "update the leaf nodes to be processed and their priorities according to the state recalculation results"). This operation is a branching process. Branch a eliminates two regression nodes u and v, and branch b eliminates two regression nodes u and o. Therefore, the characteristic equation is the same as formula (6), and the maximum positive real solution is approximately 1.414.
[0124] Priority 8: Please refer to Figure 19Let x and y be the parent nodes of u, where y is the regression node and its two parent nodes are y1 and y2. Let v be the sibling node of u connected to x, and z be the other parent node of v. Due to priority, the node corresponding to u in T and the node corresponding to v in T are not sibling nodes; otherwise, priority 6 would be used. Proceed to the following two branches: Branch a, delete points u and y in N, and delete the edges.<y,u> ,<y1,y> ,<y2,y> ,<x,v> ,<x,u> And add a label L(u) to x; branch b, delete point u in N, and delete the edge.<x,u> ,<y,u> And add a label L(u) to y. This operation is a branching process (i.e., "asymmetric two-way branching"). Branch a eliminates three regression nodes u, v, and y (i.e., "the first branch deletes the edges associated with the leaf node to be processed, its two parent nodes, and its only sibling node to eliminate the three regression nodes"), and branch b eliminates one regression node u (i.e., "the second branch deletes the incoming edge between the parent node and the leaf node to be processed to eliminate the one regression node"). It should be noted that point v in branch b may need to have its priority recalculated due to the state change of point x, i.e., "update the leaf node to be processed and its priority according to the state re-estimation result"). Therefore, the characteristic equation is: (7) Its largest positive real solution is approximately 1.465.
[0125] Priority 9: Operation A is performed on the sibling node of u, and its correctness is guaranteed by basic fact 3. Specifically, consider the sibling node v of u and the tree substructure S rooted at v. Let u' be the node corresponding to u in T. u' has a sibling leaf node o' in T. o' has a corresponding node o in N. It needs to be clear that v is not an ancestor of o. Therefore, if there is a leaf node with an in-degree of 1 in S, then that leaf node must not be o. According to basic fact 3, this indicates that the instance must be a false instance. If the terminal nodes in S are all returning nodes with an in-degree of 2, then according to basic fact 3, all edges in S can be deleted.
[0126] Priority 10: Please refer to Figure 20 These are its three possible scenarios, I, II, and III. Furthermore, for scenario III, based on the specific attributes of the two parent nodes of the regression parent node, we can further subdivide it into three additional scenarios: III_1, III_2, and III_3, as shown below. Figure 21It should be noted that the leaf nodes for this priority must meet the following conditions: If u has two parent nodes x and y, then x and y cannot both be regression nodes; otherwise, priority 5 applies. At least one parent node is a tree node, and u's sibling nodes cannot all be leaf nodes; otherwise, priorities 7 and 8 apply. If x has sibling nodes, then the nodes corresponding to the labels of both nodes in T are not sibling nodes; otherwise, priority 6 applies. If u has only one parent node x, then x must be a tree node, and its other child node is not a leaf node. Let u' be the node corresponding to u in T, u' have a sibling leaf node o' in T, and o'' have a node o in N. Then u's parent node must not be an ancestor of o; otherwise, priority 9 applies. At this point, it is possible to arbitrarily select a pair of sibling leaf nodes in T, and their corresponding nodes in N are u and v, because the algorithm maintains the correspondence between labels and leaf nodes in N (i.e., a "bidirectional mapping relationship"). Based on u and v in T... Figure 20 and Figure 21 In specific cases, we adopt different branching strategies. Due to symmetry, we assume that the case number of u is less than that of v. Furthermore, when representing specific nodes in the graph, the u side uses the same method as in the graph, while the v side uses the superscript '. That is, x represents the parent node of u, and x' represents the parent node of v. We consider the following cases.
[0127] Table 2. Branch Processing Table
[0128] Running a priority 10 operation may make operation A at a priority 9 and deterministic branches such as priorities 1-4 executable. In other words, after branching, we often see the emergence of new leaf nodes at priorities 1-4 or 9. Therefore, each branch at priority 10 often has a more positive impact.
[0129] V. Complete Solution Process Building upon the previous discussion, the specific steps for solving the inclusion problem of binary phylogenetic network trees are presented below. The algorithm is divided into four stages: preprocessing, main loop, remaining node processing, and termination determination.
[0130] Preprocessing stage. Let the number of nodes in N be n, and the number of regression nodes be k. Perform the following preparatory work in sequence: The first step is to perform a depth-first search traversal of N and T, and record the list of parent nodes and child nodes for each node (i.e., “perform a depth-first search traversal of the binary phylogenetic network N and the binary phylogenetic tree T, and record the parent nodes and child nodes of each node”).
[0131] The second step is global node suppression. For each node, perform node suppression operation on nodes with both in-degree and out-degree of 1, connect their parent node directly to their child node and delete the node.
[0132] The third step is to initialize the priority queues, creating eight FIFO queues numbered 1 to 8. For each leaf node in N, we only check if its priority belongs to 1-8. If it does, we add it to the corresponding priority queue. Simultaneously, we create a hash table for each priority queue to record the existing nodes, preventing a node from being added to the same priority queue multiple times. We don't consider priority 9 during initialization because determining priority 9 requires checking the ancestor relationship between two nodes, which can typically be done using a depth-first search, potentially taking O(n) time – a time-consuming operation. Therefore, we adopt a clever "lazy" approach to determining priority 9. We don't actively check if a node is priority 9 when enqueuing unless absolutely necessary. Instead, we only consider priority 9 when the first eight priorities are inapplicable. The advantage of this is that even if the selected node isn't priority 9, we can uniquely identify it as priority 10, allowing us to directly process it according to priority 10. This avoids wasting the costly operation of determining priority 9, providing direct benefit regardless of the result.
[0133] The fourth step is to establish a bidirectional label mapping by constructing two hash tables: LabelToN records the correspondence between leaf labels and nodes in N, and LabelToT records the correspondence between leaf labels and nodes in T (i.e., the "bidirectional mapping relationship"). Given a node u in N, the corresponding node u' in T can be located by using LabelToT with L(u) as the key, and vice versa.
[0134] Fifth, initialize the new label counter, setting the initial value of new_label to the total number of existing labels plus 1. Each time a label that has never appeared before needs to be generated, the value is incremented to ensure that N and T obtain the same new label value.
[0135] The main loop phase includes the following steps: The first step is to take the next node to be processed, scan the 8 queues from front to back, take the first element u of the first non-empty queue (that is, "take the first leaf node of the first non-empty first-in-first-out queue in ascending order of queue number for processing"), and modify the hash table content corresponding to the queue.
[0136] The second step is to recalculate the priority. The true priority p'(u) of u in the current states N and T is recalculated. If p'(u) is inconsistent with the priority when u was enqueued, it means that u's state has been changed by a previous operation. This record is discarded, and the next head of the queue is taken (i.e., "if the true priority is inconsistent with the priority when the head leaf node was enqueued, discard the head leaf node and take the next head leaf node"). The modified u will definitely have its priority recalculated in a subsequent state reassessment; it will not be missed.
[0137] The third step is to execute the operation corresponding to u. Whether it is deterministic processing or branch processing, explicit backtracking is used: record the change list, which edges were deleted, which nodes were deleted, and which labels were changed. The change list includes changes in both N and T. When rolling back, restore in reverse order and do not perform deep copy (i.e., "record the change list corresponding to each branch subproblem, the change list includes deleted edges, deleted nodes, and changed labels; when the branch subproblem processing is completed and rolled back, restore the binary phylogenetic network N and the binary phylogenetic tree T in the reverse order of the records in the change list").
[0138] The fourth step is to check the affected nodes. All nodes at both ends of the deleted edge, as well as nodes that become leaf nodes due to the addition of labels, need to be re-evaluated: if both in-degree and out-degree are 1, then node suppression is performed; if it becomes a leaf node (i.e., out-degree is 0), then the priority is recalculated. If the priority is 1 to 8, the tuple containing the priority and the node is attempted to be placed into the corresponding queue (i.e., "if a node becomes a leaf node, the priority of the leaf node is recalculated, and if the recalculated priority belongs to the top eight priorities, the leaf node is added to the first-in-first-out queue corresponding to the recalculated priority"). Note that when placing a node into a queue, we need to check whether the hash table corresponding to the queue records the node. Only if the node does not exist in the hash table will it be inserted into the queue and the hash table modified. In terms of synchronous maintenance, the parent-child information of the nodes at both ends is synchronously modified after the edge is deleted, and LabelToN and LabelToT are synchronously modified after the label is added (i.e., "synchronously update the parent-child relationship information and bidirectional mapping relationship of the nodes at both ends of the deleted edge").
[0139] The process after a queue is empty and the termination determination phase. When all 8 queues in the main loop are empty, N is checked and processed as follows: First, leaf nodes still exist in N, and these leaf nodes all belong to the catch-all case of priority 9 or 10. In this case, arbitrarily select a pair of sibling leaf nodes in T, and map them back to the corresponding two nodes u and v in N using LabelToN (i.e., "when all FIFO queues are empty and leaf nodes still exist in the binary phylogenetic network N, select a pair of sibling leaf nodes in the binary phylogenetic tree T, and determine the two target nodes in the binary phylogenetic network N corresponding to the labels of the pair of sibling leaf nodes according to the bidirectional mapping relationship"). Determine whether u or v belongs to priority 9. If it does, proceed directly to priority 9; otherwise, execute branch processing according to the priority 10 rule. If all branches have been processed and no inclusion conclusion has been obtained, return NO.
[0140] Secondly, if there are no remaining leaf nodes in N, then N has only one root node, and the result is YES. N then displays T (i.e., "If there are no remaining leaf nodes in the binary phylogenetic network N, then the binary phylogenetic network N contains the binary phylogenetic tree T").
[0141] VI. Time Complexity Analysis Preprocessing overhead. Preprocessing includes a depth-first search traversal of O(log n). ), global node suppression O( ), initialization of 8 priority queues and tag mapping O( Regarding the initialization of the 8 priority queues, each leaf node only needs to determine its in-degree, parent node type, sibling label mapping, etc., to determine whether its priority belongs to 1-8, which takes only O(1) time. The insertion time for a single queue is O(1), therefore the total time for this part is O( In summary, the preprocessing overhead is O( ). ).
[0142] Branch search tree size. The branch recursion relationship and eigenvalues for each priority are shown in the table below: Table 3. Branch recursion relationship and eigenvalue table for each priority level
[0143] There is a linkage between priority 10 and priorities 1-4, as well as priority 9: branches of priority 10 often make deterministic branches such as priorities 1-4 and priority 9 applicable, thereby triggering operation A and other deterministic processes. The structural elimination effect of operation A and other deterministic processes, in turn, affects the reduction amount of subsequent k. Considering the cascading effect, the worst eigenvalue of the branch search tree is 1.587, and the total number of nodes in the search tree does not exceed [a certain value]. .
[0144] Single-step branch processing overhead. This part of the time consists of two parts: the time consumed by the branch processing itself, and the time consumed by using the branch processing. For the time consumed by the branch processing itself, we divide it into two groups: the branch processing of priorities 5-8 will only delete / add a limited number of points or edges, so the time consumed is O(1); in the branch processing of priority 10, the time consumed comes from three parts: first, select a pair of sibling leaf nodes in T and find the corresponding node in N, which can be completed in O(n) time at the worst. Let's assume that the two nodes we select in N are u and v; second, delete edges, node suppression operations, etc. No matter how operation A or other operations are used, at most O(n) edges will be deleted or O(n) points will be suppressed, so this part can be completed in O(n) time; third, determine whether some points belong to priority 9. To determine whether a point belongs to priority 9, we only need to determine whether there is an ancestor relationship between at most 2 groups of points. Through priority depth search, this can be completed in O(n) time. The time-consuming branch processing, including node suppression and re-evaluating the priority levels of surrounding points (1-8), can be completed in O(n) time, since we only need to suppress nodes and evaluate O(n) points based on priority levels. For cases where the branch processing fails, since we store the specific operations and the total number of operations is on the order of O(n), the time complexity of the backoff is also O(n). In summary, within each branch processing step, we can complete the process in O(n) time.
[0145] The overall time complexity is O(n). Operations within each search tree node are all O(n). ), total search tree Each node preprocesses one-time overhead. Therefore, the total time complexity is: (8) The exponential part depends only on the number of regression nodes k, and the polynomial part depends only on the network size n, which conforms to the standard form of a fixed-parameter algorithm.
[0146] The following explains the worst-case eigenvalue of 1.587 for the case where priority 10 is linked with priorities 1-4 and priority 9. The basic principle of the analysis is: for any two nodes x and y, if x is an ancestor of y, then y is definitely not an ancestor of x. For two selected nodes u and v, their labels in T represent sibling nodes; please refer to... Figure 20Points u and v can each have only three structural scenarios: Scenario I: u has an in-degree of 1, its only parent x is a tree node, and u's sibling w is an internal node; Scenario II: u has an in-degree of 2, its parents x and y are both tree nodes, and at least one of u's two siblings w and o is an internal node; Scenario III: u has an in-degree of 2, one of u's two parents is a regression node x, and the other is a tree node y, and the sibling w connected to y is an internal node. For ease of description, nodes in the scenarios corresponding to v are distinguished by superscripts, except for those corresponding to u.
[0147] There are six possible combinations of two points: I+I, I+II, I+III, II+II, II+III, and III+III. For each combination, we examine the reduction in regression numbers by each branch and whether there necessarily exists a node after the branch where operation A can be performed. A node is considered suitable for direct deletion if it can be directly deleted using a deterministic method other than operation A; a node is considered suitable for operation A if operation A can be performed at that node. Once operation A is executed, at least one regression node will be eliminated.
[0148] Combination I+I is impossible because points x and x' cannot both be ancestors of each other. Therefore, at least one of points w or w' will be subject to direct deletion. For combinations I+II, I+III, II+II, II+III, and III+III, aside from some cases where direct deletion is applicable, the remaining cases can be calculated one by one using a classification list to determine the reduction in regression numbers and corresponding eigenvalues for each branch. Please refer to [reference needed]. Figure 21 For combinations involving scenario III, scenario III needs to be further subdivided into three sub-scenarios for discussion. Specifically, Ⅱ+Ⅲ is split into Ⅱ+Ⅲ_1, Ⅱ+Ⅲ_2, and Ⅱ+Ⅲ_3, and Ⅲ+Ⅲ is split in the same way as Ⅱ+Ⅲ. When discussing the sub-scenarios, we only need to find the worst-case scenario.
[0149] After calculating each combination individually, the worst eigenvalue for each combination does not exceed 1.587. Therefore, the worst eigenvalue for the case of priority 10 linked with priorities 1-4 and priority 9 is 1.587.
[0150] VII. Comparison with existing technologies Compared with the tree component algorithm of Gunawan et al. in 2016 and the stability algorithm of Li Hangcheng's dissertation in 2023, this application has essential differences in five aspects: information utilization method, structure detection strategy, node classification granularity, solution derivation ability and branch design.
[0151] First, the phylogenetic tree T is utilized differently. The Gunawan algorithm only calls T for auxiliary decision-making in the dissolution step, and T does not participate at all in the branching stage; the dissertation pre-compresses T into a target set and then no longer accesses T itself. This application elevates T to an equal status with N, and through the synchronous deletion and label synchronous transmission mechanism between N and T, the complete topological information of T participates in each pruning decision in real time.
[0152] Second, the computational strategies for structure detection differ. Gunawan's recursion requires traversing the entire network for related calculations, resulting in high overhead per iteration. Although the thesis optimizes this to inverse topological sorting, it still requires scanning all nodes after edge deletion to determine the subsequent operation path. This application adopts a strategy based on local incremental updates, re-evaluating only the two endpoints and their neighboring nodes of the deleted edge after each deletion, significantly reducing the range of edges that need to be traversed or deleted each time.
[0153] Third, the granularity of node state classification differs. The stability concept in academic dissertations only makes a binary judgment of stable or unstable; once stability propagation is interrupted at a certain layer, all unmarked nodes are grouped into the same state, making it impossible to further distinguish processing priorities. This application divides network leaf nodes into ten priority levels based on their structural characteristics, with higher determinism receiving higher priority.
[0154] Fourth, the derivation and transformation capabilities of solutions differ. Existing algorithms directly enumerate branches for non-derivable structures, branching independently for each non-derivable regression edge. This application introduces two additional derivation mechanisms: First, it uses the constraint judgment of the correspondence between sibling nodes in N and T, i.e., basic facts 1 to 3, to identify unsolvable instances in advance; second, it uses the one-way equivalent transformation of solutions to reduce the binary choice branch to a deterministic edge selection, reducing the number of branches.
[0155] Fifth, the finer points of the branching strategies differ. Gunawan's recursion... Characteristic equation of the thesis All degenerate to the golden ratio of 1.618. This application adopts an asymmetric strategy in the branch design, where the reduction of a single regression node in some branches is significantly greater than that in other branches. For example, the first branch with priority 8 eliminates three regression nodes while the second branch eliminates only one regression node, thereby suppressing the eigenvalues.
[0156] In summary, this application, through collaborative improvements across five dimensions—deep involvement of T, local incremental updates, refined priority sorting, multi-source derivation and transformation, and asymmetric branching—reduces the theoretical time complexity from [previous level] to [new level] while ensuring the correctness of the judgment results. and Reduced to the level shown in formula (8) .
[0157] VIII. Expansion of Technical Solutions In terms of application areas, in addition to determining the inclusion relationship between binary phylogenetic networks, this application can also be extended to the following scenarios: determining the inclusion relationship between phylogenetic networks, testing the consistency between multiple gene trees and species networks, screening candidate networks for cross-host transmission pathways of pathogens, and detecting hybridization events in population genetics. For other problems describing inclusion relationships using directed acyclic graphs, the processing approach of this application can also be used for solution.
[0158] In terms of technical solutions, the priority-driven search framework, N and T synchronous update mechanism, local incremental check strategy, and one-way equivalent transformation method of solution in this application can be embedded into other fixed-parameter algorithms based on branch search according to different problem objects; the ideas of priority partitioning, constraint determination, and asymmetric branch design can also be transferred to other combinatorial optimization problems such as graph inclusion problems.
[0159] IX. Specific Application Examples in Batch Screening of Biological Databases The method provided in this application can be integrated into a bioinformatics analysis platform for automated tree inclusion determination of large-scale phylogenetic networks and phylogenetic trees, enabling consistency verification and batch screening of candidate evolutionary models. The following describes the usage of this method in conjunction with a specific application process.
[0160] First, phylogenetic data to be analyzed is obtained from public or private biological databases, including candidate phylogenetic network datasets and target phylogenetic tree datasets (i.e., "obtain candidate phylogenetic networks and target phylogenetic trees from biological databases"). Candidate phylogenetic networks in the databases typically originate from whole-genome analysis, multi-gene joint inference, or existing evolutionary databases, and are used to describe the overall evolutionary relationships of all species or samples within a study region, covering complex evolutionary events such as hybridization, gene recombination, and horizontal gene transfer (i.e., "the candidate phylogenetic networks are used to characterize the evolutionary relationships among the multiple species that include network evolutionary events"). Target phylogenetic trees, on the other hand, originate from the phylogenetic analysis results of a gene family, gene segment, or local evolutionary event, and are used to describe the vertical genetic history of that gene in multiple species or samples (i.e., "the target phylogenetic tree is used to characterize the evolutionary history of the target gene in multiple species").
[0161] Since candidate phylogenetic networks in the database typically cover the entire study area, their leaf nodes often exceed those of the target phylogenetic tree, and they may contain evolutionary branches unrelated to the target gene. Therefore, it is necessary to screen the original network based on the leaf tag set of the target phylogenetic tree, retaining ancestral paths and regression structures related to the target gene sample, deleting irrelevant branches, and compressing redundant nodes to ultimately obtain candidate binary phylogenetic networks with the same leaf tag set as the target tree (i.e., "screening the candidate phylogenetic networks based on the leaf tag set of the target phylogenetic tree to obtain binary phylogenetic networks N with the same leaf tag set as the target phylogenetic tree"). Simultaneously, a bidirectional correspondence (i.e., "bidirectional mapping") based on leaf tags is established between the target tree and candidate networks to ensure that the same tag always represents the same biological entity in different data structures. For new sequencing data not present in the database, a corresponding phylogenetic tree can be constructed first based on the target gene sequence, and then a candidate phylogenetic network can be constructed based on whole-genome data or multi-gene joint analysis. Preprocessing should be performed in the same manner to ensure that new data and historical data use a unified data representation format, facilitating inclusion in batch analysis workflows. Through the above modeling, the global network that originally described the evolutionary history of the entire species population was transformed into a local network that only contains samples related to the target gene. While retaining key network evolutionary events, irrelevant branches were removed, providing a unified and accurate input model for subsequent tree inclusion determination.
[0162] After modeling the candidate phylogenetic network N and the target phylogenetic tree T, tree inclusion relationship determination is performed on the data of each network and tree to progressively verify whether the evolutionary history of the target gene can be explained by the species evolution framework described by the candidate network. At the biological level, the core question answered by tree inclusion determination is: can complex evolutionary events such as hybridization, gene recombination, or horizontal gene transfer described in the candidate phylogenetic network be appropriately selected so that the final evolutionary path is completely consistent with the topology of the target gene tree? The determination process starts from the leaf nodes of the network and verifies from bottom to top whether each local phylogenetic relationship is consistent with the topology of the gene tree, and performs verification according to the degree of certainty of the local phylogenetic relationship (i.e., "processing the leaf nodes in the binary phylogenetic network N according to multiple preset priorities"): for phylogenetic relationships with unique structures and direct confirmation of their correspondence with the gene tree, their evolutionary paths are locked first (i.e., "deterministic processing"); after all structures that can be determined have been processed, the network regions that still have multiple possible parental sources are systematically explored (i.e., "branch processing"). During the determination process, whenever an evolutionary path in the candidate network is confirmed or excluded, the corresponding local structure in the target gene tree is also updated synchronously (i.e., "synchronous modification of the binary phylogenetic network N and the binary phylogenetic tree T"), ensuring that the evolutionary constraints provided by the gene tree remain consistent with the currently retained network structure. After each local phylogenetic relationship determination, only the affected neighboring regions are re-evolutionarily evaluated, without re-analyzing the entire network (i.e., "state re-evaluation of the two endpoints of the deleted edge and the neighboring nodes of the two endpoints"). As the determination progresses, falsified evolutionary paths in the candidate network are gradually eliminated, and the candidate network continuously converges to an evolutionary explanation consistent with the gene evolution history. When all leaf nodes are successfully verified, the candidate network is determined to contain the target gene tree, indicating that the hybridization, gene transfer, and other events experienced by the gene can be reasonably explained by the parental origin in the candidate network. Conversely, if an irreconcilable topological conflict occurs during the verification process, or if all possible parental origin selection schemes fail to meet the topological constraints of the gene tree, it is determined not to contain the target gene tree, and the candidate model should be excluded (i.e., "determine whether the binary phylogenetic network N contains the binary phylogenetic tree T based on the processing results of each leaf node").
[0163] After determining the inclusion relationship of a single tree, the analysis platform continues to perform batch comparisons of all candidate phylogenetic networks and target phylogenetic trees in the database (i.e., "batch screening of candidate phylogenetic networks in the biological database based on the determination results"). For each target phylogenetic tree, it is sequentially compared with multiple candidate networks in the database to determine which species evolutionary models can explain the evolutionary history of the gene (i.e., "identifying candidate phylogenetic networks consistent with the gene evolutionary history represented by the target phylogenetic tree"). For each candidate network, it is also sequentially verified whether it can accommodate phylogenetic trees corresponding to multiple different gene families, thereby evaluating the rationality and coverage of the network as a global evolutionary model. The database records all determination results for each target tree, including inclusion or exclusion, the corresponding candidate network number, and the evolutionary path identifier that meets the conditions, while also recording the set of target trees that each candidate network can explain. Based on these records, the platform can output a list of candidate species networks consistent with the evolutionary history of each gene family, output the gene family coverage and consistency score that each species network can explain, and identify abnormal gene families that cannot be explained by any candidate network in most gene trees. The resulting tree and network containment relationships can serve as foundational data for bioinformatics tasks such as hybridization event identification, viral recombination analysis, horizontal gene transfer detection, and pan-genome evolution analysis. This provides phylogenetic databases with automated and consistent evolutionary model validation capabilities, thereby helping researchers to more systematically evaluate evolutionary hypotheses, reduce the subjectivity and workload of manual analysis, and improve the efficiency and reliability of large-scale evolutionary data analysis.
[0164] It should be noted that the specific application examples described above are only used to explain the technical solution of this application and are not intended to limit the scope of protection of this application. In specific implementations, those skilled in the art can adjust them according to actual needs. For example, the number of priorities is not limited to ten, but can be set to other numbers according to the degree of subdivision of structural features, and the number of queues can be adjusted accordingly; the bidirectional mapping relationship can be implemented using a hash table, or other data structures that support constant-time queries; the rule for generating new tags can be a counter increment method, or other methods that can ensure the consistency of tags at both ends of N and T. All the above adjustments do not depart from the technical concept of this application and should be covered within the scope of protection of this application.
[0165] This application also provides a device for determining the inclusion relationship of a binary phylogenetic network tree used in batch screening of biological databases. This device can execute the method embodiments described above. Please continue to refer to... Figure 1 The device includes an acquisition module, a processing module, a synchronous modification module, a state reassessment module, a judgment module, and a batch screening module.
[0166] The acquisition module is used to acquire candidate phylogenetic networks and target phylogenetic trees from biological databases, and to filter candidate phylogenetic networks based on the leaf label set of the target phylogenetic tree to obtain binary phylogenetic networks N with the same leaf label set as the target phylogenetic tree. The target phylogenetic tree is a binary phylogenetic tree T. The binary phylogenetic network N includes tree nodes and regression nodes, and each regression node has two incoming edges. The processing module is used to process the leaf nodes in the binary phylogenetic network N sequentially according to multiple preset priorities. Each priority corresponds to the structural characteristics of the leaf node. The processing includes deterministic processing and branch processing, with deterministic processing executed before branch processing. Specifically, deterministic processing includes deterministically deleting edges and / or nodes in the binary phylogenetic network N based on the local structural characteristics of the leaf node to be processed and the topological relationship of the label of the leaf node to be processed to the corresponding node in the binary phylogenetic tree T. Branch processing includes selecting one incoming edge from each of the two incoming edges of the target regression node for deletion to form multiple branch sub-problems, and recursively executing the processing of each branch sub-problem. The synchronous modification module is used to synchronously modify the binary phylogenetic network N and the binary phylogenetic tree T during the processing of leaf nodes. The synchronous modification includes deleting the corresponding node or edge in the binary phylogenetic tree T when a node or edge is deleted in the binary phylogenetic network N, and adding the same label to the corresponding node in the binary phylogenetic tree T when a label is added to a node in the binary phylogenetic network N. The state re-evaluation module is used to re-evaluate the state of the two ends of the deleted edge and the neighboring nodes of the two ends after each deletion of an edge in the binary phylogenetic network N, and update the leaf nodes to be processed and their priorities based on the state re-evaluation results. The determination module is used to determine whether the binary phylogenetic network N contains the binary phylogenetic tree T based on the processing results of each leaf node; the batch screening module is used to perform batch screening of candidate phylogenetic networks in the biological database based on the determination results, so as to identify candidate phylogenetic networks that are consistent with the gene evolution history represented by the target phylogenetic tree.
[0167] The apparatus provided in this embodiment schedules deterministic processing before branch processing through a processing module, preventing structures that can be deterministically eliminated from branch enumeration. A synchronization modification module ensures that the topological information of the binary phylogenetic tree T participates in each processing decision in real time. A state re-estimation module restricts structure detection after each edge deletion to a local range. This compresses the search space, reduces single-step computational overhead, and improves the efficiency of solving the tree inclusion problem. A batch screening module performs batch screening of candidate phylogenetic networks in the biological database based on the judgment results, enabling automated batch verification of the consistency of massive candidate evolutionary models.
[0168] It should be noted that the specific implementation methods and technical effects of the above modules can be referred to the corresponding descriptions in the aforementioned method embodiments, and will not be repeated here.
[0169] Figure 22 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Please refer to... Figure 22 The electronic device 100 includes: One or more processors 110; The memory 120 stores one or more programs that, when executed by one or more processors 110, cause the one or more processors 110 to implement the methods described in any of the above embodiments.
[0170] Memory 120, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 120 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 120 may optionally include remotely located memories 120 relative to processor 110, which can be connected to processor 110 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0171] The memory 120 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 120 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 120 and is called and executed by the processor 110.
[0172] The processor 110 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.
[0173] In some embodiments, the electronic device 100 further includes: Input / output interfaces are used to implement information input and output; The communication interface is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). A bus transmits information between various components of the device (e.g., processor 110, memory 120, input / output interfaces, and communication interfaces); The processor 110, memory 120, input / output interface, and communication interface can communicate with each other within the device via a bus.
[0174] The electronic device provided in this embodiment implements the above-mentioned method for determining the inclusion relationship of a binary phylogenetic network tree by executing computer program instructions stored in the memory through a processor. This method can make full use of the topological information of the phylogenetic tree, compress the search space, and improve the solution efficiency of the tree inclusion problem.
[0175] This application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement any of the methods for determining the inclusion relationship of a binary phylogenetic network tree in the above embodiments.
[0176] The computer-readable storage medium provided in this embodiment stores computer program instructions that, when executed by a processor, can implement the above-mentioned method for determining the inclusion relationship of a binary phylogenetic network tree, making full use of the topological information of the phylogenetic tree, compressing the search space, and improving the solution efficiency of the tree inclusion problem.
[0177] This application also provides a computer program product, wherein when the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes any of the binary system development network tree inclusion relationship determination methods in the above embodiments.
[0178] The computer program product provided in this embodiment, when its instructions are executed by the processor of an electronic device, causes the electronic device to execute the above-mentioned method for determining the inclusion relationship of a binary phylogenetic network tree, making full use of the topological information of the phylogenetic tree, compressing the search space, and improving the solution efficiency of the tree inclusion problem.
[0179] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for determining the inclusion relationship of a binary phylogenetic network tree for batch screening of biological databases, characterized in that, include: Candidate phylogenetic networks and target phylogenetic trees are obtained from biological databases. The target phylogenetic tree is used to characterize the evolutionary history of the target gene in multiple species, and the candidate phylogenetic network is used to characterize the evolutionary relationships among the multiple species that include network evolutionary events. The candidate phylogenetic networks are screened based on the leaf label set of the target phylogenetic tree to obtain a binary phylogenetic network N with the same leaf label set as the target phylogenetic tree. The target phylogenetic tree is a binary phylogenetic tree T. The binary phylogenetic network N includes tree nodes and regression nodes, and each regression node has two incoming edges. The leaf nodes in the binary phylogenetic network N are processed sequentially according to multiple preset priorities, each priority corresponding to the structural characteristics of the leaf node. The processing includes deterministic processing and branch processing, with deterministic processing performed before branch processing. Specifically, the deterministic processing includes deterministically deleting edges and / or nodes in the binary phylogenetic network N based on the local structural characteristics of the leaf node to be processed and the topological relationship of the label of the leaf node to be processed to the corresponding node in the binary phylogenetic tree T. The branch processing includes selecting one incoming edge from each of the two incoming edges of the target regression node for deletion, thereby forming multiple branch sub-problems, and recursively performing the processing on each branch sub-problem. During the processing of the leaf nodes, the binary phylogenetic network N and the binary phylogenetic tree T are synchronously modified. The synchronous modification includes deleting the corresponding node or edge in the binary phylogenetic tree T when a node or edge is deleted in the binary phylogenetic network N, and adding the same label to the corresponding node in the binary phylogenetic tree T when a label is added to a node in the binary phylogenetic network N. After each deletion of an edge in the binary phylogenetic network N, the states of the two endpoints of the deleted edge and the neighboring nodes of the two endpoints are re-estimated, and the leaf nodes to be processed and their priorities are updated according to the state re-estimated results. Based on the processing results of each leaf node, determine whether the binary phylogenetic network N contains the binary phylogenetic tree T; Based on the judgment results, candidate phylogenetic networks in the biological database are screened in batches to identify candidate phylogenetic networks that are consistent with the gene evolution history represented by the target phylogenetic tree.
2. The method according to claim 1, characterized in that, Before processing the leaf nodes in the binary phylogenetic network N according to multiple preset priorities, the process further includes: A depth-first search traversal is performed on the binary phylogenetic network N and the binary phylogenetic tree T to record the parent and child nodes of each node; Node suppression is performed on nodes in the binary phylogenetic network N that have an in-degree and an out-degree of 1. The node suppression includes directly connecting the parent node of the node to the child node of the node and deleting the node. Establish multiple priority queues corresponding to the multiple priorities, and add leaf nodes that meet the structural features of the corresponding priorities to the corresponding priority queues; A bidirectional mapping relationship is established between leaf labels and nodes. The bidirectional mapping relationship includes the correspondence between leaf labels and nodes in the binary phylogenetic network N, and the correspondence between leaf labels and nodes in the binary phylogenetic tree T.
3. The method according to claim 2, characterized in that, The multiple priorities include ten priorities determined according to the in-degree of the leaf node, the node type of the parent node of the leaf node, and the sibling relationship between the leaf node's label and the label of its sibling node in the binary phylogenetic tree T. The leaf nodes of the first eight priorities are added to eight first-in-first-out queues respectively, and the leaf nodes of the ninth and tenth priorities are not added to the queues. The step of processing the leaf nodes in the binary phylogenetic network N according to multiple preset priorities includes: taking the first leaf node from the first non-empty first-in-first-out queue in ascending order of queue number for processing, wherein the queue number of the leaf node performing the deterministic processing is less than the queue number of the leaf node performing the branch processing.
4. The method according to claim 1, characterized in that, The deterministic processing includes: If both the leaf node to be processed and its sibling node are leaf nodes with labels, and the corresponding node in the binary phylogenetic tree T is not a sibling node of the label of the leaf node to be processed and the label of the sibling node, then it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T.
5. The method according to claim 1, characterized in that, The deterministic processing also includes: A priority depth-first search is performed on the tree substructure rooted at the sibling node of the leaf node to be processed. The tree substructure is a subgraph formed by searching downwards from the sibling node along the tree edges until a leaf node or a return node is encountered. If a leaf node with an in-degree of 1 is found, and if the leaf node with an in-degree of 1 is not the target leaf node, then it is determined that the binary phylogenetic network N does not contain the binary phylogenetic tree T. The target leaf node is the leaf node in the binary phylogenetic network N that is the sibling leaf node of the leaf node to be processed in the binary phylogenetic tree T. If no leaf node with an in-degree of 1 is found, delete the edges that have been searched in the tree substructure.
6. The method according to claim 1, characterized in that, The deterministic processing also includes: When the in-degree of the leaf node to be processed is 1, the unique parent node of the leaf node to be processed is a tree node, and the sibling node of the leaf node to be processed is a leaf node with an in-degree of 2 and a label, the target in-edge to be deleted is determined from the two in-edges of the sibling node according to the sibling relationship between the label of the leaf node to be processed and the label of the sibling node in the corresponding node in the binary phylogenetic tree T, and only the target in-edge is deleted.
7. The method according to claim 1, characterized in that, The branching process includes: When the in-degree of the leaf node to be processed is 2, one of the parent nodes of the leaf node to be processed is a regression node, and the only sibling node of the leaf node to be processed is a leaf node with an in-degree of 2 and a label, perform an asymmetric two-way branch. The asymmetric two-way branch includes a first branch and a second branch. The first branch deletes the edges associated with the leaf node to be processed, the two parent nodes of the leaf node to be processed, and the unique sibling node to eliminate three regression nodes. The second branch deletes the incoming edge between the parent node and the leaf node to be processed to eliminate one regression node.
8. The method according to claim 3, characterized in that, The step of processing the leaf nodes in the binary phylogenetic network N sequentially according to multiple preset priorities also includes: When all the first-in-first-out queues are empty and leaf nodes still exist in the binary phylogenetic network N, a pair of sibling leaf nodes are selected in the binary phylogenetic tree T, and the labels of the pair of sibling leaf nodes are determined according to the bidirectional mapping relationship to the two target nodes corresponding to the labels in the binary phylogenetic network N. Determine whether the two target nodes belong to the ninth or tenth priority level. If they belong to the ninth priority level, perform the deterministic processing on the target node. If they belong to the tenth priority level, perform the branching processing on the target node.
9. The method according to claim 1, characterized in that, The branching process is executed using an explicit backtracking method, including: Record the modification list corresponding to each of the branch subproblems, the modification list including the deleted edges, the deleted nodes, and the changed labels; If the branch subproblem is resolved and rolled back, the binary phylogenetic network N and the binary phylogenetic tree T are restored in the reverse order of the records in the modification list.
10. The method according to claim 3, characterized in that, The process of re-estimating the state of the two endpoints of the deleted edge and their neighboring nodes includes: If a node satisfies that both its in-degree and out-degree are 1, then the node suppression is performed on that node. When a node becomes a leaf node, the priority of the leaf node is recalculated, and if the recalculated priority belongs to the top eight priorities, the leaf node is added to the first-in-first-out queue corresponding to the recalculated priority. In addition, the parent-child relationship information of the two ends of the deleted edge and the bidirectional mapping relationship are updated synchronously.
