Gastrointestinal tract disease model construction method and diagnosis system

By constructing a gastrointestinal disease model, using cluster analysis and knowledge graph combined with convolutional neural networks, the accurate identification and diagnosis of gastrointestinal diseases is achieved, the accuracy and objectivity of traditional diagnosis is solved, and medical efficiency is improved.

CN120413068APending Publication Date: 2025-08-01XIEHE HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI & TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510555058.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

Smart Images

  • Figure 72BP6IEBBLG450DFAKOOHAEBCCZYVY2GKKMEHFQO
    Figure 72BP6IEBBLG450DFAKOOHAEBCCZYVY2GKKMEHFQO
  • Figure D59TIDLNVRHB4QBA02SBBNQZDPASEFLOGTLUPEPC
    Figure D59TIDLNVRHB4QBA02SBBNQZDPASEFLOGTLUPEPC
  • Figure NNHDFTUBPQTTTXDXZXKCQUAEF00XRECBQZDCLIEL
    Figure NNHDFTUBPQTTTXDXZXKCQUAEF00XRECBQZDCLIEL
Patent Text Reader

Abstract

The invention relates to the technical field of gastrointestinal tract disease diagnosis, and discloses a gastrointestinal tract disease model construction method and a gastrointestinal tract disease diagnosis system.The gastrointestinal tract disease model construction method comprises the following steps that S01, data are collected; step S02, carrying out clustering analysis to obtain gastrointestinal disease categories corresponding to the gastrointestinal symptom data; s03, constructing a gastrointestinal tract disease knowledge graph, and obtaining disease information of corresponding gastrointestinal tract disease categories; step S04, constructing a convolutional neural network, and accurately identifying gastrointestinal diseases based on the gastrointestinal image data; s05, repeatedly training and verifying the model in the step S04 to obtain a stable gastrointestinal tract disease model; the method comprises the steps of S02, S03 and S04. According to the method, the gastrointestinal disease category can be diagnosed from the two aspects of symptoms and images, the diagnosis accuracy is improved, and if the two diagnosis results are consistent, the gastrointestinal image is further analyzed, and similarity analysis is performed on the gastrointestinal image and the gastrointestinal disease image in the knowledge graph to obtain accurate information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gastrointestinal disease diagnosis, and more particularly to a method for constructing a gastrointestinal disease model and a diagnosis system. Background Art

[0002] In recent years, with the improvement of people's living standards, the change of lifestyle and the aggravation of population aging, the incidence of gastrointestinal diseases has been increasing year by year. Gastrointestinal diseases are a common type of clinical diseases, including inflammatory bowel disease, gastrointestinal tumors, etc.; early diagnosis and treatment are crucial for the recovery of patients.

[0003] Traditional diagnosis of gastrointestinal diseases often relies on scanned images of the gastrointestinal tract and depends on doctors' experience and clinical examinations. Therefore, to a certain extent, it lacks objectivity and accuracy. There are many types of gastrointestinal diseases, and the symptoms of some gastrointestinal diseases are similar. It is very important to accurately judge different gastrointestinal diseases. Therefore, a method for constructing a gastrointestinal disease model is needed to construct a gastrointestinal disease model based on artificial intelligence for diagnosis, improve the accuracy and objectivity of diagnosis, improve the treatment effect, and at the same time reduce the workload of doctors and improve medical efficiency. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a method for constructing a gastrointestinal disease model and a diagnosis system to solve the problems existing in the above-mentioned background art.

[0005] The present invention provides the following technical solutions: A method for constructing a gastrointestinal disease model, comprising the following steps: Step S01: Data collection: Collect gastrointestinal disease data of n gastrointestinal disease patients; Step S02: Based on the gastrointestinal symptom data in Step S01, perform clustering analysis to obtain the corresponding gastrointestinal disease categories of the gastrointestinal symptom data; Step S03: Construct a gastrointestinal disease knowledge graph to obtain disease information of the corresponding gastrointestinal disease categories; Step S04: Construct a convolutional neural network to accurately identify gastrointestinal diseases based on gastrointestinal image data; Step S05: Repeatedly train and verify the model in Step S04 to obtain a stable gastrointestinal disease model.

[0006] Preferably, the gastrointestinal disease data includes gastrointestinal symptom data, gastrointestinal image data, and gastrointestinal disease categories; the gastrointestinal symptom data is the symptom description of gastrointestinal diseases; the gastrointestinal image data is the image of gastrointestinal diseases.

[0007] Preferably, the clustering analysis in Step S02 includes the following steps: Step S11: constructing a word vector conversion model to convert the gastrointestinal symptom data of n gastrointestinal disease patients into corresponding word vectors in sequence; Step S12: Take the converted n word vectors as sample points, randomly select k sample points as initial cluster centers, and mark them as z1, z2, z3, ..., z k ; Step S13: record the sample points that are not used as cluster centers as calculation points and mark them as j1, j2, j3, ..., j n-k ; Calculate the distance D from each calculation point to each cluster center in turn ba , the calculation formula is expressed as: , where D ba is the bth calculation point j b To the ath cluster center z a The distance, where b = 1, 2, 3, ..., nk; a = 1, 2, 3, ..., k; R is the dimension of the sample point, u = 1, 2, 3, ..., R; j bu is the bth calculation point j b The coordinate of the u-th dimension, z au is the ath cluster center z a Coordinates in the u-th dimension; Step S14: establishing corresponding k′ clusters based on the k cluster centers, where k=k′; Step S15: calculate point j b The distance to each cluster center is compared, and the calculated point is assigned to the cluster corresponding to the cluster center closest to it; Step S16: Set b=b+1 and jump back to step S15; Step S17: Repeat steps S15 to S16 until b=nk, and the loop ends. All nk calculation points are assigned to corresponding clusters. Step S18: Recalculate the new cluster center coordinates of each cluster. The calculation formula is expressed as: , where z´ c is the new cluster center coordinate of the cth cluster, c=1, 2, 3, ..., k', y i is the coordinate of the i-th calculation point in the c-th cluster, i=1, 2, 3, ..., I, I is the total number of calculation points in the c-th cluster, ; Step S19: Repeat steps S13 to S18 until the new cluster center coordinates of each cluster are recalculated in step S18. The loop ends when the new cluster center coordinates of each cluster calculated in the previous loop are consistent with each cluster center coordinates calculated in the previous loop. The clusters and corresponding sample points corresponding to the k' clusters are obtained. The sample points corresponding to the k' clusters are the gastrointestinal symptom data. The gastrointestinal disease category corresponding to the new clustering center point of each cluster of gastrointestinal symptom data is taken as the gastrointestinal disease category of this cluster, which is the clustering corresponding to this cluster.

[0008] Preferably, the specific method for obtaining the disease information of the corresponding gastrointestinal disease category in step S03 is as follows: Construct a gastrointestinal disease knowledge graph based on the gastrointestinal symptom data. The knowledge graph includes entities, entity attribute information, relationships between entities, and entity types; entity attribute information is a label describing the attributes of an entity, the relationship between entities represents the semantic connection between different entities, describes various associations and interactions between entities in the knowledge graph, and the entity type defines the category to which the entity belongs and defines the general attributes and relationships between entities; Match the input gastrointestinal category with the entities in the gastrointestinal disease knowledge graph. The matching methods include string matching or semantic matching; string matching uses exact matching, and exact matching is to compare the string corresponding to the input gastrointestinal category with the string corresponding to the entity in the gastrointestinal disease knowledge graph. If they are exactly the same, the matching is successful; semantic matching uses the word embedding method. The word embedding method converts the input gastrointestinal category and the entities in the gastrointestinal disease knowledge graph into vector forms through a word embedding model, and matches by calculating the similarity between the vectors; after successful matching, mark the entity successfully matched in the gastrointestinal disease knowledge graph as the matching entity, and obtain the entity attribute information corresponding to the matching entity from the gastrointestinal disease knowledge graph; The entity attribute information is the disease information corresponding to the gastrointestinal disease category, including disease images, normal images, and symptom descriptions of each stage of this gastrointestinal disease category.

[0009] Preferably, the specific method for constructing the convolutional neural network in step S04 is as follows: Initialize the basic architecture of the convolutional neural network. The basic architecture includes an input layer, a convolutional layer, a pooling layer, an activation function, a fully connected layer, and an output layer; The input data of the input layer is the gastrointestinal image to be recognized; The convolutional layer extracts features from the input data and contains multiple convolutional kernels. After the gastrointestinal image is input into the model, it becomes a feature map in matrix form after being processed by the input layer. The convolutional layer uses the convolutional kernel matrix to extract features from the feature map; If the input feature map of the (λ + 1)-th convolutional layer is denoted as F λ , and the output feature map is denoted as F λ+1 , then the convolutional process can be expressed by the formula: , where represents the convolution operation, denotes the weights of the convolutional kernels in the (λ + 1)-th layer, and e denotes the bias; The pooling layer is located after the convolutional layer and consists of multiple pooling kernels; The activation function is located in the convolutional layer and the pooling layer. The output result of the fully connected layer is an N-dimensional vector, where N is the number of classification categories; overfitting is reduced by adding a regularization term or using Dropout; The output layer outputs the classification results of the recognized gastrointestinal tract images.

[0010] Preferably, the specific method for repeatedly training and validating the model in step S05 is as follows: The gastrointestinal tract image data of n gastrointestinal disease patients is divided into a 70% training set and a 30% validation set. The gastrointestinal tract image data of the training set is directly input into the input layer of the convolutional neural network without performing step S02 and step S03. The gastrointestinal tract image data of the validation set goes through step S02 and step S03, and the disease images and normal images of each stage of the gastrointestinal disease category are output through the knowledge graph and then input into the input layer of the convolutional neural network, thereby verifying the accuracy of the model.

[0011] A gastrointestinal disease diagnosis system includes a data acquisition module, a clustering analysis module, a knowledge graph output module, a gastrointestinal disease model output module, a determination module, an image comparison module, and a human-computer interaction module; The data acquisition module is used to acquire the target data of the target object. The target object is the patient to be diagnosed, and the target data is the gastrointestinal disease data of the target object, that is, the gastrointestinal symptom description and the gastrointestinal tract photographed image of the target object; it includes a symptom data acquisition unit and an image data acquisition unit; The clustering analysis module is used to receive the data of the symptom data acquisition unit, perform clustering analysis, and obtain the corresponding clusters, that is, the corresponding gastrointestinal disease categories; The knowledge graph output module is used to receive the clustering results of the clustering analysis module, perform knowledge graph matching, obtain the entity attribute information corresponding to the matching entities, and transmit it to the determination module and the image comparison module; The gastrointestinal disease model output module is used to receive the data of the image data acquisition unit, input it into the constructed gastrointestinal disease model, output the gastrointestinal disease category, and transmit it to the determination module; The determination module is used to perform a consistency determination on the gastrointestinal disease category output by the knowledge graph output module and the gastrointestinal disease category output by the gastrointestinal disease model output module. If the output results are consistent, an execution instruction is sent to the image comparison module. If the output results are inconsistent, feedback is sent to the clustering analysis module; The image comparison module is used to perform similarity analysis on the gastrointestinal tract captured images with the disease images and normal images in each period in the entity attribute information output by the knowledge graph output module, and obtain the image with the highest similarity as the diagnosis result; The human-computer interaction module is used to perform human-computer interaction display on the data and output the final diagnosis result. If the target object has not captured gastrointestinal tract images, the data of the knowledge graph output module is directly output as the final diagnosis result.

[0012] Preferably, the specific way for the clustering analysis module to obtain the corresponding clusters is as follows: Step S21: Convert the gastrointestinal tract symptom description of the target object into a corresponding word vector through the word vector conversion model, denoted as the target point; the word vector model is the same as that in step S11; Step S22: Denote the target point as M, calculate the distances from the target point to the new clustering centers of each cluster in step S02, and arrange them in ascending order from small to large. Assign the target point to the cluster corresponding to the nearest clustering center, that is, the cluster corresponding to the clustering center with the smallest distance value; The calculation formula is: , where D Mc is the distance from the target point to the new clustering center of the c-th cluster, M u is the coordinate of the target point in the u-th dimension, z´ cu is the coordinate of the new clustering center z´ of the c-th cluster c in the u-th dimension, R is the dimension in step S13, and u = 1, 2, 3,..., R; Step S23: Output the gastrointestinal disease category corresponding to the cluster where the target point is located in step S22.

[0013] Preferably, the image comparison module uses cosine similarity to perform similarity analysis, and the specific method is as follows: Take the gastrointestinal tract captured image of the target object as the target image, take the image output by the knowledge graph output module as the comparison image, adjust the sizes of the two images to the same size, obtain the grayscale histograms of the target image and the comparison image, and extract the feature vectors of the target image and the comparison image; If the feature vector is an H-dimensional vector, calculate the similarity between the target image and the comparison image. The formula is expressed as: , where, is the similarity between the target image t and the q-th comparison image, t h is the vector component of the target image in the h-th dimension, T qh is the vector component of the q-th comparison image in the h-th dimension; h = 1, 2, 3,..., H; The value range of The larger the value, the higher the similarity between the target image and the q-th comparison image; Select the gastrointestinal disease information corresponding to the q-th comparison image with the highest similarity as the final diagnosis result Technical effects and advantages of the present invention: The present invention is provided with step S02, step S03 and step S04; it is beneficial to perform cluster analysis based on gastrointestinal symptom data, obtain the corresponding gastrointestinal disease categories of gastrointestinal symptom data, construct a gastrointestinal disease knowledge graph, obtain disease information of the corresponding gastrointestinal disease categories, and obtain a preliminary diagnosis result of gastrointestinal diseases from the perspective of gastrointestinal symptoms; accurately identify gastrointestinal diseases based on the constructed convolutional neural network for gastrointestinal image data; and train and verify the model, and use the results output by step S02 and step S03 as verification set data, improving the accuracy of model training; and diagnose gastrointestinal diseases based on this model, diagnose the gastrointestinal disease categories from the two perspectives of symptoms and images, improving the diagnostic accuracy. If the two diagnostic results are consistent, further analyze the gastrointestinal images and perform similarity analysis with the gastrointestinal disease images in the knowledge graph to obtain accurate information on the corresponding disease categories and the stages of the diseases. Brief Description of the Drawings

[0014] Figure 1 It is a flowchart of the method for constructing a gastrointestinal disease model of the present invention.

[0015] Figure 2 It is a structural diagram of the gastrointestinal disease diagnosis system of the present invention. Detailed Embodiments

[0016] Next, the technical solutions in the present invention will be clearly and completely described in conjunction with the drawings in the present invention. In addition, the forms of the various structures described in the following embodiments are merely illustrative, and a method for constructing a gastrointestinal disease model and a diagnosis system according to the present invention is not limited to the various structures described in the following embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.

[0017] As Figure 1 shown, the present invention provides a method for constructing a gastrointestinal disease model, including the following steps: Step S01: Data collection: Collect gastrointestinal disease data of n gastrointestinal disease patients, where the gastrointestinal disease data includes gastrointestinal symptom data, gastrointestinal image data, and gastrointestinal disease categories; the gastrointestinal symptom data is the symptom description of gastrointestinal diseases; the gastrointestinal image data is the image of gastrointestinal diseases; Step S02: Based on the gastrointestinal symptom data in Step S01, perform clustering analysis to obtain the corresponding gastrointestinal disease categories of the gastrointestinal symptom data; Step S03: Construct a gastrointestinal disease knowledge graph to obtain disease information for the corresponding gastrointestinal disease categories; Step S04: Construct a convolutional neural network to accurately identify gastrointestinal diseases based on gastrointestinal image data; Step S05: Repeatedly train and validate the model in Step S04 to obtain a stable gastrointestinal disease model.

[0018] In this embodiment, it should be specifically noted that the clustering analysis in Step S02 includes the following steps: Step S11: Construct a word vector conversion model to sequentially convert the gastrointestinal symptom data of n gastrointestinal disease patients into corresponding word vectors; the word vector conversion model is a BERT semantic model, which is an existing technical means and will not be elaborated here; the gastrointestinal symptom data is the symptom descriptions of various gastrointestinal diseases, so it consists of multiple words representing symptoms; Step S12: Use the n converted word vectors as sample points, randomly select k sample points as initial clustering centers, and sequentially label them as z1, z2, z3,..., z k ; Step S13: Denote the sample points that are not used as clustering centers as calculation points, and sequentially label them as j1, j2, j3,..., j n-k ; Sequentially calculate the distance D ba from each calculation point to each clustering center, and the calculation formula is expressed as: , where D ba is the distance from the b-th calculation point j b to the a-th clustering center z a , where b = 1, 2, 3,..., n - k; a = 1, 2, 3,..., k; R is the dimension of the sample points, u = 1, 2, 3,..., R; j bu is the coordinate of the b-th calculation point j b in the u-th dimension, and z au is the coordinate of the a-th clustering center z a in the u-th dimension; Step S14: Based on the k clustering centers, establish corresponding k' clusters, where k = k'; Step S15: Compare the distances from the calculation point j b to each clustering center, and assign the calculation point to the cluster corresponding to the nearest clustering center; Step S16: Let b = b + 1, and jump back to Step S15; Step S17: Repeat steps S15 to S16 until the loop ends when b = n - k, and evenly distribute the n - k calculation points to the corresponding clusters. Step S18: Recalculate the coordinates of the new cluster centers for each cluster. The calculation formula is expressed as: , where z´ c is the coordinate of the new cluster center of the c-th cluster, c = 1, 2, 3, …, k´, y i is the coordinate of the i-th calculation point in the c-th cluster, i = 1, 2, 3, …, I, and I is the total number of calculation points in the c-th cluster. ; Step S19: Repeat steps S13 to S18 until the coordinates of the new cluster centers for each cluster recalculated in step S18 are the same as those calculated in the previous loop, and then the loop ends; obtain the clusters corresponding to k´ clusters and the corresponding sample points. The sample points corresponding to the k´ clusters are the gastrointestinal symptom data. Select the gastrointestinal disease category corresponding to the gastrointestinal symptom data of the new cluster center of each cluster as the gastrointestinal disease category of the cluster, which is the cluster corresponding to the cluster.

[0019] In this embodiment, it should be specifically noted that the specific method for obtaining the disease information of the corresponding gastrointestinal disease category in step S03 is as follows: Construct a gastrointestinal disease knowledge graph based on the gastrointestinal symptom data. The knowledge graph includes entities, entity attribute information, relationships between entities, and entity types; entity attribute information is a label describing the attributes of an entity, the relationship between entities represents the semantic connection between different entities, describes various associations and interactions between entities in the knowledge graph, and the entity type defines the category to which the entity belongs and defines the general attributes and relationships between entities. Match the input gastrointestinal category with the entities in the gastrointestinal disease knowledge graph. The matching methods include string matching or semantic matching; string matching uses exact matching, and exact matching is to compare the string corresponding to the input gastrointestinal category with the string corresponding to the entity in the gastrointestinal disease knowledge graph. If they are exactly the same, the matching is successful; semantic matching uses the word embedding method. The word embedding method converts the input gastrointestinal category and the entities in the gastrointestinal disease knowledge graph into vector forms through a word embedding model, and matches them by calculating the similarity between the vectors; after successful matching, mark the entity successfully matched in the gastrointestinal disease knowledge graph as the matching entity, and obtain the entity attribute information corresponding to the matching entity from the gastrointestinal disease knowledge graph. The entity attribute information is the disease information corresponding to the gastrointestinal disease category, including disease images, normal images, and symptom descriptions at each stage of the gastrointestinal disease category.

[0020] In this embodiment, it should be specifically noted that the specific method for constructing the convolutional neural network in step S04 is as follows: Initialize the basic architecture of the convolutional neural network, which includes an input layer, a convolutional layer, a pooling layer, an activation function, a fully connected layer, and an output layer; The input data of the input layer is the gastrointestinal tract image to be recognized; The convolutional layer is the most core part of the convolutional neural network. The convolutional layer extracts features from the input data, contains multiple convolutional kernels, and the weights between the convolutional kernels are shared. By stacking multiple convolutional kernels with different sizes, the depth and breadth of the model are changed; after the gastrointestinal tract image is input into the model, it becomes a feature map in matrix form after being processed by the input layer, and the convolutional layer uses the convolutional kernel matrix to extract features from the feature map; If the input feature map of the (λ + 1)-th convolutional layer is denoted as F λ , and the output feature map is denoted as F λ+1 , then the convolutional process can be expressed by the formula: , where represents the convolution operation, represents the weight of the convolutional kernel of the (λ + 1)-th layer, and e represents the bias; The pooling layer is located after the convolutional layer and consists of multiple pooling kernels. Common pooling methods include max pooling and average pooling, etc.; while retaining the main features, the pooling layer reduces the parameters in the input feature map, prevents the problem of excessive number of parameters and computational complexity caused by too deep network layers, and improves the training speed and generalization ability of the network; The activation function is located in the convolutional layer and the pooling layer, and is also called a non-linear mapping function; introducing the activation function increases the non-linear expression ability of the network. The activation function conditionally randomly activates the input features, making the network sparse and alleviating the overfitting problem caused by too deep network layers; any one of the Sigmoid function, Tanh function, and ReLU function is selected as the activation function; The output result of the fully connected layer is an N-dimensional vector, where N is the number of classification categories; overfitting is reduced by adding a regularization term or using Dropout; during the training process, the model automatically adjusts the weight matrix and bias term in the fully connected layer through the backpropagation algorithm to make the prediction result of the model closer to the actual result. Due to the excessive number of parameters in the fully connected layer, the model capacity shows an overfitting phenomenon, so overfitting is reduced by adding a regularization term or using Dropout; The output layer outputs the classification result of the recognized gastrointestinal tract image.

[0021] In this embodiment, it should be specifically noted that the specific method for repeatedly training and validating the model in step S05 is as follows: The gastrointestinal image data of n patients with gastrointestinal diseases are divided into a 70% training set and a 30% validation set. The gastrointestinal image data of the training set are directly input into the input layer of the convolutional neural network without performing step S02 and step S03. The gastrointestinal image data of the validation set are processed through step S02 and step S03, and the disease images and normal images of each stage of the gastrointestinal disease category are output through the knowledge graph, and then input into the input layer of the convolutional neural network to verify the model accuracy.

[0022] As Figure 2 shown, the present invention provides a gastrointestinal disease diagnosis system, including a data acquisition module, a clustering analysis module, a knowledge graph output module, a gastrointestinal disease model output module, a determination module, an image comparison module, and a human-computer interaction module; The data acquisition module is used to acquire the target data of the target object. The target object is the patient to be diagnosed, and the target data is the gastrointestinal disease data of the target object, that is, the gastrointestinal symptom description and the gastrointestinal photographed image of the target object. The data acquisition module includes a symptom data acquisition unit and an image data acquisition unit. The symptom data acquisition unit is used to acquire the gastrointestinal symptom description of the target object and transmit it to the clustering analysis module. The image data acquisition unit is used to acquire the gastrointestinal photographed image of the target object and transmit it to the gastrointestinal disease model output module; The clustering analysis module is used to receive the data of the symptom data acquisition unit, perform clustering analysis, and obtain the corresponding clustering, that is, the corresponding gastrointestinal disease category; The knowledge graph output module is used to receive the clustering result of the clustering analysis module, perform knowledge graph matching, obtain the entity attribute information corresponding to the matching entity, and transmit it to the determination module and the image comparison module; The gastrointestinal disease model output module is used to receive the data of the image data acquisition unit, input it into the constructed gastrointestinal disease model, output the gastrointestinal disease category, and transmit it to the determination module; The determination module is used to perform a consistency determination on the gastrointestinal disease category output by the knowledge graph output module and the gastrointestinal disease category output by the gastrointestinal disease model output module. If the output results are consistent, an execution instruction is sent to the image comparison module. If the output results are inconsistent, feedback is sent to the clustering analysis module; The image comparison module is used to perform a similarity analysis on the gastrointestinal photographed image and the disease images and normal images of each stage in the entity attribute information output by the knowledge graph output module, and obtain the image with the highest similarity as the diagnosis result; The human-computer interaction module is used to perform human-computer interaction display on the data, output the final diagnosis result, that is, the category and specific stage of the gastrointestinal disease. If the target object has not photographed the gastrointestinal image, the data output by the knowledge graph output module is directly output as the final diagnosis result.

[0023] In this embodiment, it should be specifically noted that the specific manner in which the clustering analysis module obtains the corresponding clustering is as follows: Step S21: Convert the gastrointestinal symptom description of the target object into a corresponding word vector through a word vector conversion model, denoted as the target point; the word vector model is the same as that in step S11; Step S22: Denote the target point as M, calculate the distances from the target point to the new clustering centers of each cluster in step S02, and arrange them in ascending order from small to large. Assign the target point to the cluster corresponding to the clustering center with the closest distance, that is, the cluster corresponding to the clustering center with the smallest distance value; The calculation formula is: , where D Mc is the distance between the target point and the new clustering center of the c-th cluster, M u is the coordinate of the target point in the u-th dimension, z´ cu is the coordinate of the new clustering center z´ c of the c-th cluster in the u-th dimension, R is the dimension in step S13, and u = 1, 2, 3,..., R; Step S23: Output the gastrointestinal disease category corresponding to the cluster where the target point is located in step S22.

[0024] In this embodiment, it should be specifically noted that the knowledge graph output module obtains the entity attribute information corresponding to the matching entity in the same manner as in step S03, which will not be repeated here; the gastrointestinal disease output model outputs the gastrointestinal disease category based on the stable gastrointestinal disease model in step S05.

[0025] In this embodiment, it should be specifically noted that after the clustering analysis module receives the feedback information from the determination module, it removes the cluster corresponding to the previous output clustering center, and then repeats steps S22 to S23. At this time, a new cluster corresponding to the clustering center with the smallest distance value from the target point will appear.

[0026] In this embodiment, it should be specifically noted that the image comparison module uses cosine similarity to calculate the similarity analysis, and the specific manner is as follows: Take the gastrointestinal tract photographed image of the target object as the target image, take the image output by the knowledge graph output module as the comparison image, adjust the sizes of the two images to the same size, obtain the grayscale histograms of the target image and the comparison image, and extract the feature vectors of the target image and the comparison image; If the feature vector is an H-dimensional vector, calculate the similarity between the target image and the comparison image. The formula is expressed as: , where, is the similarity between the target image t and the q-th comparison image, th is the vector component of the target image in the h-th dimension, T qh is the vector component of the q-th comparison image in the h-th dimension; h = 1, 2, 3, …, H; has a value range of [-1, 1], the larger the value of, the higher the similarity between the target image and the q-th comparison image; select the gastrointestinal disease information corresponding to the q-th comparison image with the highest similarity as the final diagnosis result; The diagnosis result includes relevant information such as the category of gastrointestinal diseases and the stage of gastrointestinal diseases. Since the comparison images are all in the knowledge graph, all relevant information can be extracted from the knowledge graph. The stage of gastrointestinal diseases includes disease stages such as early stage, middle stage, late stage, and advanced stage.

[0027] The main difference between this embodiment and the prior art is that this embodiment has steps S02, S03, and S04; based on gastrointestinal symptom data, perform clustering analysis to obtain the corresponding gastrointestinal disease categories of the gastrointestinal symptom data, construct a gastrointestinal disease knowledge graph, obtain the disease information of the corresponding gastrointestinal disease categories, and obtain a preliminary diagnosis result of gastrointestinal diseases from the perspective of gastrointestinal symptoms; accurately identify gastrointestinal diseases based on the constructed convolutional neural network for gastrointestinal image data; and train and verify the model, using the results output by steps S02 and S03 as the validation set data to improve the accuracy of model training; and diagnose gastrointestinal diseases based on this model, diagnose the category of gastrointestinal diseases from both the symptom and image perspectives to improve the diagnostic accuracy. If the two diagnosis results are consistent, further analyze the gastrointestinal images and perform a similarity analysis with the gastrointestinal disease images in the knowledge graph to obtain information such as the corresponding disease category and the stage of the disease.

[0028] Finally: The above is only the preferred embodiment of the present invention and is not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

[0029] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or replacements, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claimed rights.

Claims

1. A method for constructing a gastrointestinal disease model, characterized in that: It includes the following steps: Step S01: Data collection: Collect gastrointestinal disease data of n patients with gastrointestinal diseases; Step S02: Based on the gastrointestinal symptom data in Step S01, perform clustering analysis to obtain the corresponding gastrointestinal disease categories of the gastrointestinal symptom data; Step S03: Construct a gastrointestinal disease knowledge graph to obtain disease information of the corresponding gastrointestinal disease categories; Step S04: Construct a convolutional neural network to accurately identify gastrointestinal diseases based on gastrointestinal image data; Step S05: Repeatedly train and validate the model in Step S04 to obtain a stable gastrointestinal disease model.

2. The method for constructing a gastrointestinal disease model according to claim 1, wherein: The gastrointestinal disease data includes gastrointestinal symptom data, gastrointestinal image data, and gastrointestinal disease categories; the gastrointestinal symptom data is the symptom description of gastrointestinal diseases; the gastrointestinal image data is the image of gastrointestinal diseases.

3. A method for constructing a gastrointestinal disease model according to claim 1, characterized in that: The clustering analysis in Step S02 includes the following steps: Step S11: Construct a word vector conversion model and sequentially convert the gastrointestinal symptom data of n patients with gastrointestinal diseases into corresponding word vectors; Step S12: Take the n transformed word vectors as sample points, randomly select k sample points as the initial clustering centers, and sequentially label them as z1, z2, z3, …, z k ; Step S13: Denote the sample points that are not cluster centers as calculation points, and label them as j1, j2, j3, …, j n-k ; Calculate the distance D from each calculation point to each cluster center in sequence ba , and the calculation formula is expressed as: , where D ba is the distance from the b-th calculation point j b to the a-th cluster center z a , where b = 1, 2, 3, …, n - k; a = 1, 2, 3, …, k; R is the dimension of the sample points, u = 1, 2, 3, …, R; j bu is the coordinate of the b-th calculation point j b in the u-th dimension, and z au is the coordinate of the a-th cluster center z a in the u-th dimension; Step S14: Establish k' corresponding clusters based on k clustering centers, where k = k'; Step S15: Compare the distances from the calculation point j b to each cluster center, and assign the calculation point to the cluster corresponding to the cluster center with the closest distance; Step S16: Let b = b + 1 and jump back to Step S15; Step S17: Repeat Steps S15 to S16 until the loop ends when b = n - k, and allocate the n - k calculation points to the corresponding clusters; Step S18: Recalculate the coordinates of the new cluster center points for each cluster. The calculation formula is expressed as: , where z´ c is the coordinate of the new cluster center point of the c-th cluster, c = 1, 2, 3, …, k´, y i is the coordinate of the i-th calculation point in the c-th cluster, i = 1, 2, 3, …, I, and I is the total number of calculation points in the c-th cluster, ; Step S19: Repeat Steps S13 to S18 until the new coordinates of the clustering center points of each cluster are recalculated in Step S18, and the loop ends when they are the same as the new coordinates of the clustering center points of each cluster calculated in the previous loop; Obtain the clustering corresponding to the k' clusters and the corresponding sample points; The sample points corresponding to the k' clusters are the gastrointestinal symptom data, and the gastrointestinal disease category corresponding to the gastrointestinal symptom data of the new clustering center point of each cluster is selected as the gastrointestinal disease category of the cluster, that is, the clustering corresponding to the cluster.

4. A method for constructing a gastrointestinal disease model according to claim 1, characterized in that: The specific method for obtaining disease information of the corresponding gastrointestinal disease categories in Step S03 is: Construct a gastrointestinal disease knowledge graph based on the gastrointestinal symptom data. The knowledge graph includes entities, entity attribute information, relationships between entities, and entity types; entity attribute information is the label describing entity attributes, the relationship between entities represents the semantic connection between different entities, describes various associations and interactions between entities in the knowledge graph, the entity type defines the category to which the entity belongs, and defines the general attributes and relationships between entities; Match the input gastrointestinal tract categories with the entities in the gastrointestinal disease knowledge graph. The matching methods include string matching or semantic matching. String matching uses exact matching, which means comparing the string corresponding to the input gastrointestinal tract category with the string corresponding to the entity in the gastrointestinal disease knowledge graph. If they are exactly the same, the matching is successful. Semantic matching uses the word embedding method. The word embedding method converts the input gastrointestinal tract category and the entities in the gastrointestinal disease knowledge graph into vector forms through a word embedding model, and matches them by calculating the similarity between the vectors. After successful matching, mark the entities successfully matched in the gastrointestinal disease knowledge graph as matching entities, and obtain the entity attribute information corresponding to the matching entities from the gastrointestinal disease knowledge graph. The entity attribute information is the disease information corresponding to the gastrointestinal disease category, including the disease images, normal images, and symptom descriptions of each stage of the gastrointestinal disease category.

5. A method for constructing a gastrointestinal disease model according to claim 1, wherein: The specific method for constructing the convolutional neural network in step S04 is as follows: Initialize the basic architecture of the convolutional neural network. The basic architecture includes an input layer, a convolutional layer, a pooling layer, an activation function, a fully connected layer, and an output layer. The input data of the input layer is the gastrointestinal image to be recognized. The convolutional layer extracts features from the input data and contains multiple convolutional kernels. After the gastrointestinal image is input into the model, it becomes a feature map in matrix form after being processed by the input layer. The convolutional layer uses the convolutional kernel matrix to extract features from the feature map. If the input feature map of the (λ + 1)-th convolutional layer is denoted as F λ , and the output feature map is denoted as F λ+1 , then the convolution process can be expressed by the formula: , where represents the convolution operation, represents the weights of the convolutional kernel of the (λ + 1)-th layer, and e represents the bias; The pooling layer is located after the convolutional layer and consists of multiple pooling kernels. The activation function is located in the convolutional layer and the pooling layer. The output result of the fully connected layer is an N-dimensional vector, where N is the number of classification categories. Overfitting is reduced by adding a regularization term or using Dropout. The output layer outputs the classification result of the recognized gastrointestinal image.

6. The method for constructing a gastrointestinal disease model according to claim 1, characterized in that: The specific method for repeatedly training and validating the model in step S05 is as follows: Divide the gastrointestinal image data of n gastrointestinal disease patients into a 70% training set and a 30% validation set. Directly input the gastrointestinal image data of the training set into the input layer of the convolutional neural network without performing steps S02 and S03. Pass the gastrointestinal image data of the validation set through steps S02 and S03, output the disease images and normal images of each stage of the gastrointestinal disease category through the knowledge graph, and then input them into the input layer of the convolutional neural network to verify the accuracy of the model.

7. A gastrointestinal disease diagnosis system, characterized in that: It includes a data acquisition module, a clustering analysis module, a knowledge graph output module, a gastrointestinal disease model output module, a determination module, an image comparison module, and a human-computer interaction module. The data acquisition module is used to acquire the target data of the target object. The target object is the patient to be diagnosed, and the target data is the gastrointestinal disease data of the target object, that is, the gastrointestinal symptom description and the gastrointestinal photographed image of the target object. It includes a symptom data acquisition unit and an image data acquisition unit. The clustering analysis module is used to receive the data of the symptom data acquisition unit, perform clustering analysis, and obtain the corresponding clusters, that is, the corresponding gastrointestinal disease categories. The knowledge graph output module is used to receive the clustering results of the clustering analysis module, perform knowledge graph matching, obtain the entity attribute information corresponding to the matching entities, and transmit it to the determination module and the image comparison module; The gastrointestinal disease model output module is used to receive the data of the image data acquisition unit, input it into the constructed gastrointestinal disease model, output the gastrointestinal disease category and transmit it to the determination module; The determination module is used to determine the consistency of the gastrointestinal disease category output by the knowledge graph output module and the gastrointestinal disease category output by the gastrointestinal disease model output module. If the output results are consistent, an execution instruction is sent to the image comparison module. If the output results are inconsistent, it is fed back to the clustering analysis module; The image comparison module is used to analyze the similarity between the gastrointestinal tract captured image and the disease images and normal images in each period in the entity attribute information output by the knowledge graph output module, and obtain the image with the highest similarity as the diagnosis result; The human-computer interaction module is used to perform human-computer interaction display on the data and output the final diagnosis result. If the target object has not taken a gastrointestinal tract image, the data output by the knowledge graph output module is directly output as the final diagnosis result.

8. A gastrointestinal disease diagnosis system according to claim 7, characterized in that: The specific way for the clustering analysis module to obtain the corresponding clustering is as follows: Step S21: Convert the gastrointestinal symptom description of the target object into a corresponding word vector through the word vector conversion model, denoted as the target point; the word vector model is the same as that in step S11; Step S22: Denote the target point as M, calculate the distances from the target point to each new clustering center point in step S02, and arrange them in ascending order from small to large. Assign the target point to the cluster corresponding to the clustering center point with the closest distance, that is, the cluster corresponding to the clustering center point with the smallest distance value; The calculation formula is as follows: , where D Mc is the distance between the target point and the new clustering center of the c-th cluster, M u is the coordinate of the target point in the u-th dimension, z´ cu is the coordinate of the new clustering center z´ c of the c-th cluster in the u-th dimension, R is the dimension in step S13, and u = 1, 2, 3, …, R; Step S23: Output the gastrointestinal disease category corresponding to the cluster where the target point is located in step S22.

9. A gastrointestinal disease diagnosis system according to claim 7, characterized in that: The image comparison module uses cosine similarity to calculate the similarity analysis, and the specific method is as follows: Take the gastrointestinal tract captured image of the target object as the target image, take the image output by the knowledge graph output module as the comparison image, adjust the sizes of the two images to the same size, obtain the gray histograms of the target image and the comparison image, and extract the feature vectors of the target image and the comparison image; If the feature vector is an H-dimensional vector, the similarity between the target image and the comparison image is calculated by the formula: , where is the similarity between the target image t and the q-th comparison image, and t h is the vector component of the target image in the h-th dimension, and T qh is the vector component of the q-th comparison image in the h-th dimension; h = 1, 2, 3, …, H; ranges from [-1, 1], the larger the value of, the higher the similarity between the target image and the q-th comparison image; Select the gastrointestinal disease information corresponding to the qth comparison image with the highest similarity as the final diagnosis result.