Knowledge-driven causal analysis method, device and medium for diagnosis and treatment of nasopharyngeal carcinoma
By constructing and optimizing a Bayesian network and analyzing the causal relationship of nasopharyngeal cancer diagnosis and treatment characteristic variables, it solves the shortcomings of existing technology in considering multi-dimensional factors and achieves more accurate disease understanding and treatment prediction.
Patent Information
- Application Number
- CN202410748633.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-06-12
AI Technical Summary
Existing diagnostic methods for nasopharyngeal cancer cannot fully consider the patient's genetic information, lifestyle, and environmental factors when processing and analyzing patient information, resulting in deficiencies in revealing the intrinsic connections between data and providing clinical diagnostic features.
A knowledge-driven causal analysis method for nasopharyngeal cancer diagnosis and treatment is adopted to construct an initial Bayesian network, prune the candidate parent node set, and find the optimal Bayesian network through iterative optimization to characterize the relationship between nasopharyngeal cancer diagnosis and treatment characteristic variables. cause and effect.
It achieves comprehensive analysis of complex nasopharyngeal cancer data, deeply understands the disease development mechanism, clearly identifies the causal link between diagnosis and treatment characteristics, provides important dimensions for disease prognosis assessment and scenario analysis, and improves the accuracy of long-term prediction of treatment effects.
Smart Images

Figure CN118335352B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of medical information technology and data analysis, and in particular to a knowledge-driven causal analysis method, device and medium for nasopharyngeal carcinoma diagnosis and treatment. Background Art
[0002] With the latest advances in medical technology, the field of diagnosis and treatment of NPC has undergone significant changes. In particular, under the guidance of the concept of precision medicine, the development of treatment methods has increasingly focused on personalization and comprehensiveness. The diagnosis process of NPC, a complex and variable disease, not only relies on traditional imaging and pathological examinations, but also should consider multiple variables such as the patient's genetic background, lifestyle habits and environmental factors. Therefore, effectively integrating and analyzing these complex and multi-dimensional medical information has become a key challenge to achieve precise diagnosis and treatment. Advances in medical information technology, especially in the field of data mining and analysis, have provided new solutions to this challenge.
[0003] Existing NPC diagnostic methods have achieved certain clinical results, but they still have limitations in processing and analyzing patient information. In particular, these methods face challenges in comprehensively considering patients' genetic information, lifestyle and other factors, which have an important impact on the development of the disease and treatment response. In addition, current data analysis methods are insufficient in revealing the intrinsic connections between data and providing clinical diagnostic features. This limitation highlights the need for a new method that can comprehensively analyze complex NPC data. This method should be able to integrate multi-dimensional data such as medical images, genetic information, lifestyle and environmental factors, analyze the causal relationship behind the data through domain knowledge, and provide a more comprehensive perspective on disease cognition. Summary of the invention
[0004] In view of the above problems, the present invention proposes a knowledge-driven causal analysis method, device and medium for nasopharyngeal carcinoma diagnosis and treatment to overcome the above problems.
[0005] One aspect of the present invention provides a knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma, the method comprising:
[0006] An initial Bayesian network is constructed according to the causal relationship between each preset nasopharyngeal carcinoma diagnosis and treatment characteristic variable, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node;
[0007] Selecting one node in the node set as the target node in turn, obtaining a candidate parent node set of the target node, and pruning the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set;
[0008] The initial Bayesian network is iteratively optimized to find the corresponding optimal parent node set in the initial parent node set of each node, and the optimal Bayesian network is selected according to the optimal parent node set of each node.
[0009] Furthermore, the pruning of the candidate parent node set of the target node based on the preset parent set pruning rule includes:
[0010] If the first candidate node is the parent node of the target node, pruning the first candidate parent node set of the target node that does not contain the first candidate node; and / or,
[0011] If the second candidate node is not the parent node of the target node, pruning the second candidate parent node set of the target node including the second candidate node; and / or,
[0012] If the topological sorting of the target node is before the third candidate node, pruning the third candidate parent node set of the target node including the third candidate node; and / or,
[0013] If the fourth candidate node is an ancestor node of the target node, and for a fourth candidate parent node set of the target node, the topological sorting of all nodes in the fourth candidate parent node set is before the fourth candidate node, then the fourth candidate parent node set is pruned.
[0014] Furthermore, the pruning of the candidate parent node set of the target node based on the preset parent set pruning rule also includes:
[0015] Constructing a local score function, wherein the local score function represents a local score function of different nodes under given conditions of different parent node sets;
[0016] Calculate the local score of the target node under each given candidate parent node set condition based on the local score function;
[0017] If there is a local score under the given fifth candidate parent node set that is less than the local score under the given sixth candidate parent node set, and the sixth candidate parent node set is a subset of the fifth candidate parent node set, then the fifth candidate parent node set is pruned.
[0018] Further, the iterative optimization of the initial Bayesian network includes:
[0019] The initial Bayesian network is used as the preferred Bayesian network of the first iteration level, and the iteration operation is performed in sequence, and the neighbor Bayesian network is searched for the preferred Bayesian network of the current iteration level in each iteration level;
[0020] During the iterative operation, the sample data in the preset training data set is substituted into the total score function under different Bayesian network conditions at a given point, and the total scores of the preferred Bayesian network and the neighbor Bayesian network at the current iteration level are calculated respectively, and the Bayesian network with the highest total score is selected as the preferred Bayesian network at the next iteration level;
[0021] If no neighbor Bayesian network has a total score higher than the total score of the preferred Bayesian network at the current iteration level, or if the preset number of iterations is reached, the iteration operation ends and the preferred Bayesian network at the current iteration level is used as the optimal Bayesian network.
[0022] Further, the searching of neighbor Bayesian networks for the preferred Bayesian network of the current iteration level in each iteration level includes:
[0023] Calculate the topological order of each node in the node set based on the depth-first search algorithm and the initial Bayesian network;
[0024] During the iterative operation, the corresponding iteration level nodes are selected for each iteration level in turn according to the topological sorting of each node;
[0025] The preferred Bayesian network of the current iteration level is replaced according to the iteration level nodes corresponding to the current iteration level and its initial parent node set, so as to obtain the neighbor Bayesian network of the preferred Bayesian network of the current iteration level.
[0026] Furthermore, the iterative optimization of the initial Bayesian network also includes:
[0027] If no neighbor Bayesian network with a total score higher than the preferred Bayesian network at the current iteration level is found in the current iteration level, a Bayesian network is randomly selected from each neighbor Bayesian network at the current iteration level with a preset probability as the preferred Bayesian network at the next iteration level; and / or,
[0028] The neighbor Bayesian network that is not selected in the current iteration level is saved in the taboo list to avoid repeated selection of the neighbor Bayesian network that is not selected in the current iteration level in the next iteration level.
[0029] Furthermore, before constructing the initial Bayesian network according to the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables, the method further includes:
[0030] Acquire a preset initial data set, wherein the initial data set includes multiple initial data samples, and each of the initial data samples includes multiple data features of the same nasopharyngeal carcinoma patient;
[0031] Performing data cleaning on the initial data samples in the initial data set, removing the initial data samples in which data features are missing and / or the values of data features deviate from the qualified range, to obtain a data set after data cleaning;
[0032] Convert the non-numerical data in each initial data sample in the data set after data cleaning into numerical data, and perform standardization on each numerical data to obtain the corresponding data sample, thereby obtaining the data set after data conversion;
[0033] Based on the preset feature selection mechanism, key features are selected for each data sample in the data set after data conversion, and the data set consisting of data samples retaining key data features is used as the data set after feature selection;
[0034] The dataset after feature selection is divided into training dataset and test dataset.
[0035] Furthermore, constructing an initial Bayesian network according to the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables includes:
[0036] Determine a feature variable combination based on nasopharyngeal carcinoma diagnosis and treatment information according to the data type of each data feature in the data sample in the data set after feature selection, wherein the feature variable combination includes different nasopharyngeal carcinoma diagnosis and treatment feature variables;
[0037] An initial Bayesian network is constructed according to the causal relationship between the characteristic variable combination and each nasopharyngeal carcinoma diagnosis and treatment characteristic variable.
[0038] Another aspect of the present invention provides a knowledge-driven causal analysis device for nasopharyngeal carcinoma diagnosis and treatment, the device comprising:
[0039] A model building module, used to construct an initial Bayesian network according to the causal relationship between each preset nasopharyngeal carcinoma diagnosis and treatment characteristic variable, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node;
[0040] A parent node set selection module is used to select one node in the node set as the target node in turn, obtain a candidate parent node set of the target node, and prune the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set;
[0041] The structure optimization module is used to iteratively optimize the initial Bayesian network to find the corresponding optimal parent node set in the initial parent node set of each node, and select the optimal Bayesian network according to the optimal parent node set of each node.
[0042] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma as described in any of the above items.
[0043] The present invention provides a knowledge-driven causal analysis method, device and medium for nasopharyngeal carcinoma diagnosis and treatment. The method constructs an initial Bayesian network that can characterize the causal relationship between nasopharyngeal carcinoma diagnosis and treatment feature variables, prunes the candidate parent node set for each node in the initial Bayesian network to obtain the initial parent node set, reduces the computational complexity in the subsequent iteration process, and selects the optimal parent node set for each node through iterative optimization to obtain the optimal Bayesian network. The construction of the optimal Bayesian network of the present invention enables medical professionals to deeply understand the development mechanism of the patient's disease and clearly identify the causal relationship between different nasopharyngeal carcinoma diagnosis and treatment features. It also provides an important dimension for the prognosis evaluation and scenario analysis of the disease, allowing doctors to prejudge the progression trend of the disease and more accurately judge the long-term outlook of the treatment effect.
[0044] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only used for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. In the accompanying drawings:
[0046] Figure 1 This is a flow chart of a knowledge-driven causal analysis method for nasopharyngeal carcinoma diagnosis and treatment according to an embodiment of the present invention;
[0047] Figure 2 This is an overall architecture diagram of a knowledge-driven causal analysis method for nasopharyngeal carcinoma diagnosis and treatment according to another embodiment of the present invention;
[0048] Figure 3 A flow chart of a method for obtaining a training data set and a test data set according to an embodiment of the present invention;
[0049] Figure 4A flow chart of a method for building an initial Bayesian network according to an embodiment of the present invention;
[0050] Figure 5 A flow chart of a method for pruning a parent node set according to an embodiment of the present invention;
[0051] Figure 6 A flow chart of a method for iteratively optimizing the initial Bayesian network based on a preset structural optimization algorithm according to an embodiment of the present invention;
[0052] Figure 7 Schematic diagram of the structure of a knowledge-driven causal analysis device for nasopharyngeal carcinoma diagnosis and treatment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0054] Those skilled in the art will understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.
[0055] Embodiment 1
[0056] The embodiment of the present invention provides a knowledge-driven causal analysis method for nasopharyngeal carcinoma diagnosis and treatment, such as Figure 1 As shown in the figure, the knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma includes the following steps:
[0057] S1. constructing an initial Bayesian network according to the preset causal relationship between each nasopharyngeal carcinoma diagnosis and treatment characteristic variable, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node;
[0058] Specifically, the initial Bayesian network can be expressed as , which is a directed acyclic graph (DAG) where represents a set of nodes, and Represents a set of directed edges between nodes. These directed edges represent the potential causal or dependency relationships between the nasopharyngeal carcinoma diagnosis and treatment characteristic variables represented by the nodes. For example, if there is a hypothesis that the node Impact Node , then in There should be one from point to edge.
[0059] S2, selecting one node in the node set as the target node in turn, obtaining a candidate parent node set of the target node, and pruning the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set;
[0060] Specifically, for each node Contains multiple nodes The corresponding candidate parent node set In order to reduce the computational complexity of subsequent iterative optimization, the nodes can be The corresponding candidate parent node set Prune nodes that are unlikely to become The optimal parent node set of Prune it in advance to reduce the amount of calculation.
[0061] S3. Iteratively optimize the initial Bayesian network to find the corresponding optimal parent node set in the initial parent node set of each node, and select the optimal Bayesian network according to the optimal parent node set of each node.
[0062] In the embodiment of the present invention, the construction of the optimal Bayesian network based on nasopharyngeal carcinoma diagnosis and treatment information enables medical professionals to deeply understand the development mechanism of the patient's disease and clearly identify the causal relationship between different nasopharyngeal carcinoma diagnosis and treatment characteristics. In addition, it also provides an important dimension for the prognosis evaluation and scenario analysis of the disease, allowing doctors to pre-judge the progression trend of the disease and more accurately judge the long-term outlook of the treatment effect.
[0063] The following is combined with Figure 2 The steps of the knowledge-driven causal analysis method for nasopharyngeal carcinoma diagnosis and treatment provided by the embodiment of the present invention are described in detail:
[0064] By the attached Figure 2 It can be seen that the knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma in an embodiment of the present invention also includes a process of data collection and data preprocessing, so as to obtain a training data set and a test data set for network structure learning. This process can be carried out simultaneously with defining the Bayesian network structure and building the initial Bayesian network, and the optimal Bayesian network can be obtained through the structural optimization learning operation of step 3.
[0065] Further, Figure 3 A flowchart of a method for obtaining a training data set and a test data set according to an embodiment of the present invention is shown. Figure 3 It can be seen that, before constructing the initial Bayesian network according to the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables, the method further includes:
[0066] S01. Obtain a preset initial data set, wherein the initial data set includes multiple initial data samples, and each of the initial data samples includes multiple data features of the same nasopharyngeal carcinoma patient;
[0067] Specifically, the embodiment of the present invention aggregates data from multiple data sources of nasopharyngeal carcinoma patients to form an initial data set, wherein the initial data set includes multiple initial data samples, and each of the initial data samples includes different data features of the same nasopharyngeal carcinoma patient aggregated from multiple data sources;
[0068] Furthermore, the data sources of the embodiments of the present invention include but are not limited to clinical records, patient surveys, laboratory test results, and imaging examinations, such as MRI or CT scan images, as well as genetic information, lifestyle data, and environmental factor data, which are integrated into a unified data set to form an initial data set. Represents the initial data set, for patients Obtain basic information about the patient , NPC stage , tumor marker levels , tumor size , the patient's information can be used as the initial data set A sample of , the corresponding initial data set .in, and They are all vectors, recording multiple indicators of the same patient. and The various indicators in Transformed into a sample Different data characteristics.
[0069] S02, performing data cleaning on the initial data samples in the initial data set, removing the initial data samples in which data features are missing and / or the values of data features deviate from the qualified range, to obtain a data set after data cleaning;
[0070] Specifically, for a specific example of missing data features, for example, a vector dimension less than 4 Cleaning is performed; examples of data features whose values deviate from the qualified range include: for example, records where the tumor size is negative After cleaning, the present invention represents the cleaned data set as .
[0071] S03, converting non-numerical data in each initial data sample in the data set after data cleaning into numerical data, and performing standardization processing on each numerical data to obtain a corresponding data sample, thereby obtaining a data set after data conversion;
[0072] Specifically, basic information of the patient Convert it into data that can be expressed in numerical values, and perform operations on these numerical data, including and Normalization is performed to ensure that the subsequent learning method can correctly process the data. The present invention represents the transformed data set as .
[0073] S04, selecting key features for each data sample in the data set after data conversion based on a preset feature selection mechanism, and using the data set consisting of data samples retaining key data features as the data set after feature selection;
[0074] Specifically, the present invention adopts a feature selection mechanism given by experts. , select tumor marker levels The most critical features for the diagnosis and treatment of nasopharyngeal carcinoma ,get Therefore, the dataset after feature selection is called .
[0075] S05. Divide the data set after feature selection into a data set to obtain a training data set and a test data set.
[0076] Specifically, in order to ensure effective training and subsequent verification of the model, the present invention selects the dataset after feature selection. Divide into training data set And the test dataset .
[0077] Further, Figure 4 The flowchart of the method for building an initial Bayesian network based on nasopharyngeal carcinoma diagnosis and treatment information according to an embodiment of the present invention is shown. Figure 4 It can be seen that in step S1, constructing an initial Bayesian network according to the preset causal relationship between each nasopharyngeal carcinoma diagnosis and treatment characteristic variable specifically includes:
[0078] S11, determining a feature variable combination based on nasopharyngeal carcinoma diagnosis and treatment information according to the data type of each data feature in the data sample in the data set after feature selection, wherein the feature variable combination includes different nasopharyngeal carcinoma diagnosis and treatment feature variables;
[0079] Specifically, the present invention represents the feature variable combination based on nasopharyngeal carcinoma diagnosis and treatment information based on the data type of each data feature in the data sample in the data set after feature selection and the knowledge of medical experts as follows: , each variable Represents a specific clinical feature, patient characteristic, treatment information or prognosis information, which may include basic patient information Gender of the patient ,age , NPC stage , tumor marker levels EBV antibody levels in , serum ferritin , SCCA squamous cell carcinoma antigen , CYFRA 21-1 cytokeratin fragment , these variables constitute the nasopharyngeal carcinoma diagnosis and treatment characteristic variables, and each data sample in the corresponding feature selection data set contains at least the specific values of each nasopharyngeal carcinoma diagnosis and treatment characteristic variable.
[0080] S12. Constructing an initial Bayesian network based on the causal relationship between the characteristic variable combination and each nasopharyngeal carcinoma diagnosis and treatment characteristic variable.
[0081] Specifically, the causal relationship between the various nasopharyngeal carcinoma diagnosis and treatment characteristic variables may be an initial dependency relationship between the various nasopharyngeal carcinoma diagnosis and treatment characteristic variables determined based on existing medical knowledge and / or assumptions.
[0082] Furthermore, if there is a dependency relationship between the NPC diagnosis and treatment characteristic variables, it is assumed that the variables Influencing variables ,but The value depends on , that is for The initial dependency relationship between the various nasopharyngeal carcinoma diagnosis and treatment feature variables refers to the basic initial dependency relationship constructed based on existing medical knowledge and assumptions before the model is optimized. The initial dependency relationship will be improved in the subsequent model optimization process.
[0083] Furthermore, the Bayesian network provided in the embodiment of the present invention is a directed acyclic graph (DAG), which is represented by ,in The representative variable set is combined with the characteristic variable based on the nasopharyngeal carcinoma diagnosis and treatment information described above Correspondingly, Represents directed edges between variables. These directed edges can represent potential causal or dependency relationships between variables. For example, if there is a hypothesis that the variable Influencing variables , then in There should be one from point to This statement is different from the previous embodiment. If there is an assumption that the node Impact Node , then in There should be one from point to The sides are equal.
[0084] Furthermore, the present invention represents the initial Bayesian network as ,in It is obtained based on the initial dependency relationship between the various nasopharyngeal carcinoma diagnosis and treatment feature variables in step S12.
[0085] The present invention constructs the causal relationship between different nasopharyngeal carcinoma diagnosis and treatment characteristic variables through the Bayesian network, so that doctors can provide more accurate and effective medical advice based on the impact of the patient's specific environment and living habits on health outcomes. This comprehensive analysis makes the treatment strategy more personalized, thereby providing patients with more accurate and effective medical services. Overall, the present invention not only improves the treatment effectiveness of nasopharyngeal carcinoma patients, but also helps to improve their quality of life, representing a major innovation in the field of precision medicine. Through this innovative diagnostic and treatment method, the present invention provides new perspectives and tools for medical practice and patient care, and promotes the development of medical technology in a more personalized and precise direction.
[0086] Furthermore, after obtaining the training data set, the test data set and the initial Bayesian network, causal structure learning can be performed in order to obtain the optimal Bayesian network.
[0087] In the embodiment of the present invention, in order to simplify the computational complexity of the subsequent structural optimization, a parent set identification process is also introduced. The goal of the parent set identification stage is to determine the possible parent node set for each node. This process involves pruning those parent sets that are unlikely to appear in the optimal solution.
[0088] Furthermore, in the embodiment of the present invention, step S2 of pruning the candidate parent node set of the target node based on the preset parent set pruning rule includes:
[0089] If the first candidate node is the parent node of the target node, then prune the first candidate parent node set of the target node that does not contain the first candidate node; and / or, if the second candidate node is not the parent node of the target node, then prune the second candidate parent node set of the target node that contains the second candidate node; and / or, if the topological sorting of the target node is before the third candidate node, then prune the third candidate parent node set of the target node that contains the third candidate node; and / or, if the fourth candidate node is the ancestor node of the target node, and for a fourth candidate parent node set of the target node, the topological sorting of all nodes in the fourth candidate parent node set are before the fourth candidate node, then prune the fourth candidate parent node set.
[0090] Specifically, the first constraint is expressed as , then any of The superset of can be pruned. The second constraint is expressed as , you can trim all the of The third constraint is expressed as , you can trim the of The fourth constraint is expressed as , and for A superset of ,all All satisfied , the parent set can be pruned. It should be noted that one or more of the above parent set pruning rules can be selected for parent set pruning.
[0091] Further, Figure 5 A flow chart of a method for pruning a parent node set according to an embodiment of the present invention is shown. Figure 5 It can be seen that the method of pruning the candidate parent node set of the target node based on the preset parent set pruning rule in the embodiment of the present invention further includes:
[0092] S21, constructing a local score function, where the local score function represents the local score function of different nodes under the condition of given different parent node sets;
[0093] In the embodiment of the present invention, the score function of the Bayesian network can be expressed as , Used to evaluate a given network structure The degree of fit to the data is expressed as:
[0094] (1)
[0095] Formula (1) is decomposable, which means that the total score of DAG is the sum of the local scores of each node. Indicates that a node is given its parent node set The score under the condition of , that is, the local score function of the node.
[0096] Further, the BIC score formula is used for calculation:
[0097] (2)
[0098] in, data, parents Is given parent node parents In this case, the variable N is the sample size, i.e., the number of patient records, and the number of parameters This is usually equal to the number of possible parent node combinations multiplied by the number of categories for that node minus 1 (since the probabilities sum to 1).
[0099] S22, calculating the local score of the target node under the conditions of each given candidate parent node set based on the local score function;
[0100] Specifically, in the initial stage, the embodiment of the present invention allocates multiple candidate parent node sets to each node. ,Through the above local score function, the local score of the target node under the conditions of each given parent node set can be calculated.
[0101] S23. If there exists a local score under the given fifth candidate parent node set that is less than the local score under the given sixth candidate parent node set, and the sixth candidate parent node set is a subset of the fifth candidate parent node set, then prune the fifth candidate parent node set.
[0102] The local score under the condition of the fifth candidate parent node set is less than the local score under the condition of the sixth candidate parent node set, and the sixth candidate parent node set is a subset of the fifth candidate parent node set, which can be expressed as:
[0103] (3)
[0104] Specifically, the explanation for the above-mentioned pruning of the parent node set of the target node according to the local score is as follows:
[0105] Suppose there is a solution set S, which contains all possible solutions s (that is, the optimal set of parent nodes). There is also a scoring function (i.e., local score function) is used to assign a score to each solution s. The goal is to find an optimal solution , so that maximize.
[0106] Now, we introduce a set of constraints , these constraints can be used to filter out infeasible solutions. It can be expressed as follows:
[0107] (4)
[0108] in, is a subset of solutions that satisfy all constraints. Our goal is to find a solution that maximizes the score while satisfying the constraints. ,Right now:
[0109] (5)
[0110] Now, consider The scores of subsets are used to prune unlikely supersets in the process of finding the optimal solution. and its subset , we can define the relationship between the subset score and the parent score:
[0111] (6)
[0112] If a subset The score of score, then it can be considered are less likely to appear in the optimal solution and can therefore be pruned.
[0113] Furthermore, the embodiment of the present invention prunes the candidate parent node set of the target node based on the preset parent set pruning rule, and further includes: if there are additional constraints , these additional constraints may affect the pruning rules. When considering the additional constraints, some parent sets s that can be pruned under unconstrained conditions may also become feasible under constrained conditions. Therefore, it is necessary to re-evaluate the score relationship between the parent set and the subset, considering the impact of the additional constraints.
[0114] The present invention aims to effectively reduce the search space through the parent set node pruning in step S2, so that the subsequent structure optimization process is more efficient and accurate. The successful implementation of this stage provides a solid foundation for finding the optimal network structure.
[0115] Further, Figure 6 FIG. 4 shows a flow chart of a method for iteratively optimizing an initial Bayesian network according to an embodiment of the present invention. Figure 6As shown, in step S3, the iterative optimization of the initial Bayesian network includes:
[0116] S31, taking the initial Bayesian network as the preferred Bayesian network of the first iteration level, and performing iteration operations in sequence, searching for neighbor Bayesian networks for the preferred Bayesian network of the current iteration level in each iteration level;
[0117] S32, during the iterative operation, substituting the sample data in the preset training data set into the total score function under the given different Bayesian network conditions, respectively calculating the total scores of the preferred Bayesian network and the neighbor Bayesian network of the current iteration level, and selecting the Bayesian network with the highest total score as the preferred Bayesian network of the next iteration level;
[0118] The present invention uses a hill climbing algorithm to achieve iterative optimization, and selects and optimizes the parent set of each node in the network through the hill climbing algorithm, thereby finding the optimal network structure and its score .
[0119] Further, in step S31, searching for neighbor Bayesian networks for the preferred Bayesian network of the current iteration level in each iteration level includes:
[0120] S311, calculating the topological order of each node in the node set based on the depth-first search algorithm and the initial Bayesian network;
[0121] In the embodiment of the present invention, the topological sorting represents the arrangement order of each node, which is expressed as .
[0122] S312, selecting corresponding iteration level nodes for each iteration level in turn according to the topological sorting of each node during the iteration operation;
[0123] S313: Replace the preferred Bayesian network of the current iteration level according to the iteration level nodes corresponding to the current iteration level and its initial parent node set, and obtain a neighbor Bayesian network of the preferred Bayesian network of the current iteration level.
[0124] Specifically, the embodiment of the present invention defines a neighbor Bayesian network as a network if and only if they are only in a single node There are some differences in the parent set distribution, which can be expressed as:
[0125] (7)
[0126] in, Representation Node In Bayesian Networks That is, each time the neighbor Bayesian network is searched, only the iteration level nodes corresponding to the current iteration level are searched. Search and get nodes The candidate parent node set is the optimal Bayesian network for the current iteration level Replace it and obtain the optimal Bayesian network of the previous iteration level Neighbor Bayesian Network.
[0127] Specifically, the selection order of the iteration level nodes in each iteration level is selected according to the order of each node in the topological sorting.
[0128] A specific example of iterative optimization in the embodiment of the present invention is: from an initial initial Bayesian network start, With the given topological sort Consistent. Then perform iterative search, in each iteration , considering the optimal Bayesian network at the current iteration level All neighbors , and choose a neighbor The preferred Bayesian network as the next iteration level makes the score is the highest. When there are no neighbors The score is better than the current High, or stop when a predetermined number of iterations is reached.
[0129] Furthermore, in the process of iterative optimization, if the total score of no neighbor Bayesian network in the current iteration level is higher than the total score of the priority Bayesian network in the current iteration level, or after reaching a preset number of iterations, the preferred Bayesian network in the previous iteration level is used as the optimal Bayesian network, and the iteration can be stopped. In the search process, in order to increase the ability to explore the solution space, the embodiment of the present invention also adds a random walk and / or taboo list mechanism.
[0130] Specifically, the iterative optimization of the initial Bayesian network based on a preset structural optimization algorithm further includes:
[0131] Random walk: If no neighbor Bayesian network with a total score higher than the preferred Bayesian network at the current iteration level is found in the current iteration level, a Bayesian network is randomly selected from each neighbor Bayesian network at the current iteration level with a preset probability as the preferred Bayesian network for the next iteration level;
[0132] Taboo list mechanism: save the neighbor Bayesian network that is not selected in the current iteration level into the taboo list to avoid repeated selection of the neighbor Bayesian network that is not selected in the current iteration level in the next iteration level.
[0133] The mathematical representation of the tabu list mechanism is:
[0134] (8)
[0135] When the algorithm stops, the resulting graph structure This is the optimal Bayesian network. The nodes in this graph are still the variables that affect nasopharyngeal carcinoma, and the edges between the nodes represent the causal relationship between the nodes. Existence , then it means yes Doctors can more quickly and accurately understand the development mechanism of the patient's disease based on the causal relationship in the optimal Bayesian network, and clearly identify the causal relationship between different nasopharyngeal carcinoma diagnosis and treatment characteristics. It also provides an important dimension for the prognosis evaluation and scenario analysis of the disease, enabling doctors to predict the progression trend of the disease and more accurately judge the long-term outlook of the treatment effect.
[0136] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0137] Embodiment 2
[0138] Figure 7 The schematic diagram of the structure of the knowledge-driven causal analysis device for nasopharyngeal carcinoma diagnosis and treatment provided by the embodiment of the present invention is shown schematically. Figure 7 The knowledge-driven causal analysis device for diagnosis and treatment of nasopharyngeal carcinoma according to the embodiment of the present invention specifically includes a model building module 701, a parent node set selection module 702 and a structure optimization module 703, wherein:
[0139] The model building module 701 is used to construct an initial Bayesian network according to the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node;
[0140] The parent node set selection module 702 is used to select one node in the node set as the target node in turn, obtain the candidate parent node set of the target node, and prune the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set;
[0141] The structure optimization module 703 is used to iteratively optimize the initial Bayesian network to find the corresponding optimal parent node set in the initial parent node set of each node, and select the optimal Bayesian network according to the optimal parent node set of each node.
[0142] Furthermore, the parent node set selection module 702 is specifically used for:
[0143] If the first candidate node is the parent node of the target node, pruning the first candidate parent node set of the target node that does not contain the first candidate node; and / or,
[0144] If the second candidate node is not the parent node of the target node, pruning the second candidate parent node set of the target node including the second candidate node; and / or,
[0145] If the topological sorting of the target node is before the third candidate node, pruning the third candidate parent node set of the target node including the third candidate node; and / or,
[0146] If the fourth candidate node is an ancestor node of the target node, and for a fourth candidate parent node set of the target node, the topological sorting of all nodes in the fourth candidate parent node set is before the fourth candidate node, then the fourth candidate parent node set is pruned.
[0147] Furthermore, the parent node set selection module 702 further includes:
[0148] A local score function construction submodule is used to construct a local score function, wherein the local score function represents the local score function of different nodes under the condition of given different parent node sets;
[0149] A local score calculation submodule, used to calculate the local score of the target node under the conditions of each given candidate parent node set based on the local score function;
[0150] The parent set pruning submodule is used to prune the fifth candidate parent node set if the local score under the condition of a given fifth candidate parent node set is less than the local score under the condition of a given sixth candidate parent node set, and the sixth candidate parent node set is a subset of the fifth candidate parent node set.
[0151] Furthermore, the structure optimization module 703 specifically includes:
[0152] A search submodule, used to use the initial Bayesian network as the preferred Bayesian network of the first iteration level, and perform iteration operations in sequence, searching for neighbor Bayesian networks for the preferred Bayesian network of the current iteration level in each iteration level;
[0153] A selection submodule is used to substitute the sample data in the preset training data set into the total score function under given different Bayesian network conditions during the iterative operation, calculate the total score of the preferred Bayesian network and the neighbor Bayesian network of the current iteration level, and select the Bayesian network with the highest total score as the preferred Bayesian network of the next iteration level;
[0154] The end control submodule is used to end the iteration operation and use the preferred Bayesian network of the current iteration level as the optimal Bayesian network when the total score of no neighbor Bayesian network in the current iteration level is higher than the total score of the preferred Bayesian network of the current iteration level, or when a preset number of iterations is reached.
[0155] Furthermore, the search submodule specifically includes:
[0156] A topological sorting calculation submodule, used for calculating the topological sorting of each node in the node set based on a depth-first search algorithm and the initial Bayesian network;
[0157] A node selection submodule is used to select corresponding iteration level nodes for each iteration level in turn according to the topological sorting of each node during the iteration operation;
[0158] The parent set replacement submodule is used to replace the preferred Bayesian network of the previous iteration level according to the iteration level nodes corresponding to the current iteration level and its initial parent node set, so as to obtain the neighbor Bayesian network of the preferred Bayesian network of the current iteration level.
[0159] Furthermore, the structure optimization module 703 also includes:
[0160] A random selection submodule is used to randomly select a Bayesian network from each neighbor Bayesian network of the current iteration level as the preferred Bayesian network of the next iteration level with a preset probability if a neighbor Bayesian network with a total score higher than the preferred Bayesian network of the current iteration level is not found in the current iteration level;
[0161] The taboo control submodule is used to save the neighbor Bayesian network that is not selected in the current iteration level into the taboo list to avoid repeated selection of the neighbor Bayesian network that is not selected in the current iteration level in the next iteration level.
[0162] The structure optimization module 703 is also used to perform iterative optimization operations based on the control of the random selection submodule and / or the taboo control submodule.
[0163] Furthermore, the device of the embodiment of the present invention further includes:
[0164] A data source collection submodule is used to obtain a preset initial data set, wherein the initial data set includes multiple initial data samples, and each of the initial data samples includes multiple data features of the same nasopharyngeal carcinoma patient;
[0165] A data cleaning submodule is used to clean the initial data samples in the initial data set, remove the initial data samples in which data features are missing and / or the values of data features deviate from the qualified range, and obtain a data set after data cleaning;
[0166] The data conversion submodule is used to convert the non-numerical data in each initial data sample in the data set after data cleaning into numerical data, and perform standardization processing on each numerical data to obtain the corresponding data sample, thereby obtaining the data set after data conversion;
[0167] A feature selection submodule is used to select key features of each data sample in the data set after data conversion based on a preset feature selection mechanism, and use the data set consisting of data samples retaining key data features as the data set after feature selection;
[0168] The data set partitioning submodule is used to partition the data set after feature selection to obtain a training data set and a test data set.
[0169] Furthermore, the model building module 701 specifically includes:
[0170] A feature variable selection submodule, for determining a feature variable combination based on nasopharyngeal carcinoma diagnosis and treatment information according to the data type of each data feature in the data sample in the data set after feature selection, wherein the feature variable combination includes different nasopharyngeal carcinoma diagnosis and treatment feature variables;
[0171] The model building submodule is used to construct an initial Bayesian network based on the causal relationship between the characteristic variable combination and each nasopharyngeal carcinoma diagnosis and treatment characteristic variable.
[0172] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0173] The embodiment of the present application provides a knowledge-driven causal analysis method and device for nasopharyngeal carcinoma diagnosis and treatment. The method constructs an initial Bayesian network that can characterize the causal relationship between nasopharyngeal carcinoma diagnosis and treatment feature variables, prunes the candidate parent node set for each node in the initial Bayesian network to obtain the initial parent node set, reduces the computational complexity in the subsequent iteration process, and selects the optimal parent node set for each node through iterative optimization to obtain the optimal Bayesian network. The construction of the optimal Bayesian network of the present invention enables medical professionals to deeply understand the development mechanism of the patient's disease and clearly identify the causal relationship between different nasopharyngeal carcinoma diagnosis and treatment features. It also provides an important dimension for the prognosis evaluation and scenario analysis of the disease, allowing doctors to prejudge the progression trend of the disease and more accurately judge the long-term outlook of the treatment effect.
[0174] Embodiment 3
[0175] In addition, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the above method are implemented.
[0176] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0177] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, any one of the claimed embodiments may be used in any combination.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma. It is characterized in that The method comprises: An initial Bayesian network is constructed according to the causal relationship between each preset nasopharyngeal carcinoma diagnosis and treatment characteristic variable, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node; Selecting one node in the node set as the target node in turn, obtaining a candidate parent node set of the target node, and pruning the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set; Iteratively optimize the initial Bayesian network to find the corresponding optimal parent node set in the initial parent node set of each node, and select the optimal Bayesian network according to the optimal parent node set of each node; wherein, The iterative optimization of the initial Bayesian network comprises: The initial Bayesian network is used as the preferred Bayesian network of the first iteration level, and the iteration operation is performed in sequence, and a neighbor Bayesian network is searched for the preferred Bayesian network of the current iteration level in each iteration level; During the iterative operation, the sample data in the preset training data set is substituted into the total score function under the given different Bayesian network conditions, and the total scores of the preferred Bayesian network and the neighbor Bayesian network of the current iteration level are calculated respectively, and the Bayesian network with the highest total score is selected as the preferred Bayesian network of the next iteration level; If no neighbor Bayesian network has a total score higher than the total score of the preferred Bayesian network at the current iteration level, or if the preset number of iterations is reached, the iteration operation ends and the preferred Bayesian network at the current iteration level is used as the optimal Bayesian network; The step of searching for a neighbor Bayesian network for the preferred Bayesian network of the current iteration level in each iteration level includes: Calculate the topological order of each node in the node set based on the depth-first search algorithm and the initial Bayesian network; During the iterative operation, the corresponding iteration level nodes are selected for each iteration level in turn according to the topological sorting of each node; The preferred Bayesian network of the current iteration level is replaced according to the iteration level nodes corresponding to the current iteration level and its initial parent node set, so as to obtain the neighbor Bayesian network of the preferred Bayesian network of the current iteration level.
2. The method according to claim 1, It is characterized in that The pruning of the candidate parent node set of the target node based on the preset parent set pruning rule includes: If the first candidate node is the parent node of the target node, pruning the first candidate parent node set of the target node that does not contain the first candidate node; and / or, If the second candidate node is not the parent node of the target node, pruning the second candidate parent node set of the target node including the second candidate node; and / or, If the topological sorting of the target node is before the third candidate node, pruning the third candidate parent node set of the target node including the third candidate node; and / or, If the fourth candidate node is an ancestor node of the target node, and for a fourth candidate parent node set of the target node, the topological sorting of all nodes in the fourth candidate parent node set is before the fourth candidate node, then the fourth candidate parent node set is pruned.
3. The method according to claim 1 or 2, It is characterized in that The pruning of the candidate parent node set of the target node based on the preset parent set pruning rule also includes: Constructing a local score function, wherein the local score function represents a local score function of different nodes under given conditions of different parent node sets; Calculate the local score of the target node under each given candidate parent node set condition based on the local score function; If there is a local score under the given fifth candidate parent node set that is less than the local score under the given sixth candidate parent node set, and the sixth candidate parent node set is a subset of the fifth candidate parent node set, then the fifth candidate parent node set is pruned.
4. The method according to claim 1, It is characterized in that The iterative optimization of the initial Bayesian network further comprises: If no neighbor Bayesian network with a total score higher than the preferred Bayesian network at the current iteration level is found in the current iteration level, a Bayesian network is randomly selected from each neighbor Bayesian network at the current iteration level with a preset probability as the preferred Bayesian network at the next iteration level; And / or save the neighbor Bayesian network that is not selected in the current iteration level into a taboo list to avoid repeated selection of the neighbor Bayesian network that is not selected in the current iteration level in the next iteration level.
5. The method according to claim 1, It is characterized in that Before constructing an initial Bayesian network based on the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables, the method further includes: Acquire a preset initial data set, wherein the initial data set includes multiple initial data samples, and each of the initial data samples includes multiple data features of the same nasopharyngeal carcinoma patient; Performing data cleaning on the initial data samples in the initial data set, removing the initial data samples in which data features are missing and / or the values of data features deviate from the qualified range, to obtain a data set after data cleaning; Convert the non-numerical data in each initial data sample in the data set after data cleaning into numerical data, and perform standardization on each numerical data to obtain the corresponding data sample, thereby obtaining the data set after data conversion; Based on the preset feature selection mechanism, key features are selected for each data sample in the data set after data conversion, and the data set consisting of data samples retaining key data features is used as the data set after feature selection; The dataset after feature selection is divided into training dataset and test dataset.
6. The method according to claim 5, It is characterized in that The initial Bayesian network is constructed according to the causal relationship between the preset nasopharyngeal carcinoma diagnosis and treatment characteristic variables, including: Determine a feature variable combination based on nasopharyngeal carcinoma diagnosis and treatment information according to the data type of each data feature in the data sample in the data set after feature selection, wherein the feature variable combination includes different nasopharyngeal carcinoma diagnosis and treatment feature variables; An initial Bayesian network is constructed according to the causal relationship between the characteristic variable combination and each nasopharyngeal carcinoma diagnosis and treatment characteristic variable.
7. A knowledge-driven causal analysis device for nasopharyngeal carcinoma diagnosis and treatment. It is characterized in that The device comprises: A model building module, used to construct an initial Bayesian network according to the causal relationship between each preset nasopharyngeal carcinoma diagnosis and treatment characteristic variable, wherein the initial Bayesian network includes a node set and an initial directed edge set, wherein each node in the node set represents a nasopharyngeal carcinoma diagnosis and treatment characteristic variable, and each directed edge in the initial directed edge set connects a starting node that is a parent node of an end node; A parent node set selection module is used to select one node in the node set as the target node in turn, obtain a candidate parent node set of the target node, and prune the candidate parent node set of the target node based on a preset parent set pruning rule to obtain an initial parent node set of each node in the node set; A structure optimization module, used for iteratively optimizing the initial Bayesian network to find the corresponding optimal parent node set in the initial parent node set of each node, and selecting the optimal Bayesian network according to the optimal parent node set of each node; The structure optimization module includes: A search submodule, used to use the initial Bayesian network as the preferred Bayesian network of the first iteration level, and perform iteration operations in sequence, searching for neighbor Bayesian networks for the preferred Bayesian network of the current iteration level in each iteration level; The selection submodule is used to substitute the sample data in the preset training data set into the total score function under the given different Bayesian network conditions during the iterative operation, calculate the total scores of the preferred Bayesian network and the neighbor Bayesian network of the current iteration level, and select the Bayesian network with the highest total score as the preferred Bayesian network of the next iteration level; The end submodule is used to end the iteration operation and use the preferred Bayesian network of the current iteration level as the optimal Bayesian network when the total score of no neighbor Bayesian network in the current iteration level is higher than the total score of the preferred Bayesian network of the current iteration level, or when a preset number of iterations is reached; The search submodule specifically includes: A topological sorting calculation submodule, used for calculating the topological sorting of each node in the node set based on a depth-first search algorithm and the initial Bayesian network; A node selection submodule is used to select corresponding iteration level nodes for each iteration level in turn according to the topological sorting of each node during the iteration operation; The parent set replacement submodule is used to replace the preferred Bayesian network of the current iteration level according to the iteration level nodes corresponding to the current iteration level and its initial parent node set, so as to obtain the neighbor Bayesian network of the preferred Bayesian network of the current iteration level.
8. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, characterized in that when the computer program is executed by a processor, the knowledge-driven causal analysis method for diagnosis and treatment of nasopharyngeal carcinoma as described in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Epistasis site mining method of an integer linear programming optimization Bayesian network
CN111833964A
Structure learning method and device of Bayesian network and electronic equipment
CN115018077A
