Traditional Chinese medicine auxiliary diagnosis method and system based on artificial intelligence image recognition
Through the traditional Chinese medicine auxiliary diagnosis method based on artificial intelligence, natural language processing and deep learning models are used to extract and cluster traditional Chinese medicine electronic medical records and image data, solving the existing problems of relying on experience and time-consuming for traditional Chinese medicine diagnosis, achieving more efficient and accurate diagnosis of the condition.
Patent Information
- Application Number
- CN202410986994.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing Chinese medicine diagnosis methods rely on doctors' experience and manual analysis, which makes the diagnosis process take a long time, making it difficult for new doctors to make accurate diagnosis in a short period of time, and there may be differences in diagnosis of the same condition by different doctors, reducing the diagnosis. Efficiency and effect.
Using the Chinese medicine auxiliary diagnosis method based on artificial intelligence image recognition, by obtaining electronic medical records and image data, using natural language processing and deep learning models to extract features, combining the K-means algorithm to cluster medical records, establish case clusters, and use association functions. The characteristic vectors of new patients are analysed to the case cluster, and the disease pattern and treatment plan are generated.
It improves the efficiency and effectiveness of doctors in diagnosing patients' condition, reduces diagnosis time, and enhances the accuracy and consistency of diagnosis.
Smart Images

Figure CN119007977A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of TCM auxiliary diagnosis, and in particular to a TCM auxiliary diagnosis method and system based on artificial intelligence image recognition. Background Art
[0002] Traditional Chinese medicine is based on the theory of Yin-Yang and the Five Elements. It uses the four diagnostic methods of "looking, smelling, asking, and palpating" to understand the patient's physical condition. When making a diagnosis, the doctor will comprehensively consider the patient's constitution, condition, living habits and other factors. The TCM auxiliary diagnosis system is a tool that uses modern technology to assist TCM diagnosis. It combines TCM theory with modern information technology to improve the accuracy and efficiency of TCM diagnosis.
[0003] Existing TCM diagnostic methods rely on doctors' experience and manual analysis. Different doctors may make different diagnoses for the same condition due to differences in experience and knowledge background. First, this may cause the diagnostic process to take a long time. Second, new doctors need a long period of practical accumulation to reach a high level of diagnosis. For some complex conditions, it may be difficult for doctors to integrate a large amount of information in a short period of time to make an accurate diagnosis, thereby reducing the diagnostic effect and efficiency for patients.
[0004] Based on this, the present invention proposes a TCM auxiliary diagnosis method and system based on artificial intelligence image recognition, which matches the electronic medical records of new patients with the electronic medical records in the case cluster according to the correlation function, generates a condition pattern recommendation to the doctor based on the matching results, and improves the doctor's efficiency and diagnostic effect of the patient's condition. Summary of the invention
[0005] The purpose of the present invention is to provide a TCM auxiliary diagnosis method and system based on artificial intelligence image recognition to solve the deficiencies in the background technology.
[0006] In order to achieve the above object, the present invention provides the following technical solution: a TCM auxiliary diagnosis method based on artificial intelligence image recognition, the auxiliary diagnosis method comprising the following steps:
[0007] The auxiliary diagnosis system obtains the electronic medical record data and image data in the hospital database, pre-processes the electronic medical record data and image data, extracts medical record features from the electronic medical record text based on the natural language processing algorithm, and uses the deep learning model to extract image features from the image data;
[0008] Combine medical record features and image features to construct a comprehensive feature vector to represent the features of each medical record. Use the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divide the electronic medical records in the database into multiple case clusters, and record case cluster information.
[0009] Obtain the medical record data and image data of the new patient, and construct a comprehensive feature vector of the new patient based on the medical record data and image data, analyze the case cluster to which the comprehensive feature vector of the new patient belongs based on the correlation function, and calculate the matching score between the comprehensive feature vector of the new patient and all comprehensive feature vectors in the case cluster to which it belongs, match the new patient's condition based on the matching score, and generate a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and present the condition pattern, diagnosis and treatment plan to the doctor.
[0010] In a preferred embodiment, analyzing the new patient's comprehensive feature vector belonging to a case cluster based on the correlation function includes the following steps:
[0011] The ranking coefficient xf is obtained by comprehensively calculating the similarity of the comprehensive feature vector, the similarity of the electronic medical record format and the similarity of the image style;
[0012] Obtain the ranking coefficient of each case cluster center and the ranking coefficient of all comprehensive feature vectors in the case cluster, and comprehensively calculate the ranking assignment of the case cluster. The expression is: In the formula, fz is the sorting assignment, xf avg is the ranking coefficient of the case cluster center, xf i is the ranking coefficient of the i-th comprehensive feature vector in the case cluster, and n is the number of comprehensive feature vectors in the case cluster;
[0013] After obtaining the ranking assignments of all case clusters, the comprehensive feature vector of the new patient is analyzed to determine whether it belongs to the case cluster with the largest ranking assignment.
[0014] In a preferred embodiment, calculating the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, and matching the new patient's condition according to the matching score comprises the following steps:
[0015] The matching score is obtained through the Euclidean distance calculation formula, which is expressed as: In the formula, SD is the matching score, m is the number of samples, and x i represents the i-th sample value of the new patient, Represents the i-th sample value of the case cluster. The smaller the matching score, the more similar the new patient sample is to the case cluster sample.
[0016] All comprehensive feature vectors in the case cluster are sorted from small to large according to the matching score, and the first-ranked comprehensive feature vector is selected for matching the new patient's condition.
[0017] In a preferred embodiment, a K-means algorithm is used to perform cluster analysis on the comprehensive feature vector, the electronic medical records in the database are divided into multiple case clusters, and the case cluster information is recorded, including the following steps:
[0018] Randomly generate K-means clusters with different K values, calculate the total square error corresponding to each K value, draw a graph between K value and SSE, and find the elbow point where the SSE decreases the most in the graph. The elbow point is the optimal K value.
[0019] Using the determined K value, the K-means algorithm was applied to perform cluster analysis on the comprehensive feature vector to generate multiple case clusters. The cluster label to which each medical record belongs was recorded, and each cluster label represented a case cluster.
[0020] In a preferred embodiment, a K-means algorithm is used to perform cluster analysis on the comprehensive feature vector to generate multiple case clusters, including the following steps:
[0021] K comprehensive feature vectors are randomly selected as the initial cluster center, and the Euclidean distance from each remaining comprehensive feature vector to the initial cluster center is calculated. Each comprehensive feature vector is assigned to the cluster corresponding to the initial cluster center with the closest Euclidean distance. After all comprehensive feature vectors are divided, the mean of the comprehensive feature vectors in each cluster is calculated as the new cluster center. The cluster center of the cluster is updated repeatedly and the Euclidean distance between the new cluster center and the previous cluster center is calculated. When the Euclidean distance between the new cluster center and the previous cluster center in any iteration is less than or equal to the distance threshold, the K-means algorithm converges, stops iteration, and outputs multiple case clusters.
[0022] In a preferred embodiment, the medical record features and image features are combined to construct a comprehensive feature vector to represent the features of each medical record, including the following steps:
[0023] Standardize the text features extracted from the electronic medical records, including normalizing the numerical features to the range of [0,1] and one-hot encoding the categorical features;
[0024] Performing standardization processing on the features extracted from the image data, wherein the standardization processing includes normalization processing;
[0025] The standardized text features and image features are concatenated to form a comprehensive feature vector. Suppose the text feature vector is [t1, t2, ..., tn], the image feature vector is [i1, i2, ..., im], and the concatenated comprehensive feature vector is [t1, t2, ..., tn, i1, i2, ..., im];
[0026] Obtain the resource consumption index and fitting index of the comprehensive feature vector, generate the dimension coefficient based on the resource consumption index and the fitting index, judge whether the comprehensive feature vector needs to be reduced in dimension by comparing the dimension coefficient with the coefficient threshold, and generate the corresponding management strategy based on the judgment result.
[0027] In a preferred embodiment, a dimension coefficient is generated according to a resource consumption index and a fitting index, and a comparison result between the dimension coefficient and a coefficient threshold is used to determine whether a dimensionality reduction process is required for the comprehensive feature vector, and a corresponding management strategy is generated based on the determination result, including the following steps:
[0028] The resource consumption index and the fitting index are normalized so that their value ranges are mapped to [0,1], and the normalized value of the resource consumption index and the normalized value of the fitting index are obtained. The normalized value of the resource consumption index and the normalized value of the fitting index are summed to obtain the dimension coefficient. If the dimension coefficient is greater than the coefficient threshold, it is determined that the comprehensive feature vector needs to be reduced in dimension. If the dimension coefficient is less than or equal to the coefficient threshold, it is determined that the comprehensive feature vector does not need to be reduced in dimension. When it is determined that the comprehensive feature vector needs to be reduced in dimension, the comprehensive feature vector is reduced in dimension using the t-SNE algorithm.
[0029] A TCM auxiliary diagnosis system based on artificial intelligence image recognition, including case cluster division module, affiliation analysis module, and matching recommendation module;
[0030] Case clustering module: obtain electronic medical record data and image data from the hospital database, pre-process the electronic medical record data and image data, extract medical record features from the electronic medical record text based on the natural language processing algorithm, use the deep learning model to extract image features from the image data, combine the medical record features and image features, construct a comprehensive feature vector to represent the features of each medical record, use the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divide the electronic medical records in the database into multiple case clusters, and record case cluster information;
[0031] Membership analysis module: obtains the medical record data and image data of the new patient, constructs the comprehensive feature vector of the new patient based on the medical record data and image data, and analyzes the membership case cluster of the new patient's comprehensive feature vector based on the correlation function;
[0032] Matching recommendation module: Calculate the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, match the new patient's condition based on the matching score, and generate the condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and display the condition pattern, diagnosis and treatment plan to the doctor.
[0033] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0034] The present invention uses a K-means algorithm to perform cluster analysis on comprehensive feature vectors, divides electronic medical records in a database into multiple case clusters, records case cluster information, obtains medical record data and image data of new patients, and constructs comprehensive feature vectors of new patients based on medical record data and image data, analyzes the case cluster to which the comprehensive feature vector of the new patient belongs based on a correlation function, and calculates the matching score between the comprehensive feature vector of the new patient and all comprehensive feature vectors in the case cluster to which it belongs, matches the condition of the new patient based on the matching score, generates a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and displays the condition pattern, diagnosis and treatment plan to doctors. The auxiliary diagnosis system matches the electronic medical record of the new patient with the electronic medical record in the case cluster based on the correlation function, generates a condition pattern based on the matching result and recommends it to doctors, thereby improving the efficiency and effect of doctors' diagnosis of the patient's condition. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0036] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0038] Example 1: Please refer to Figure 1 As shown, the TCM auxiliary diagnosis method based on artificial intelligence image recognition described in this embodiment includes the following steps:
[0039] The auxiliary diagnosis system obtains the electronic medical record data and image data in the hospital database, pre-processes the electronic medical record data and image data, proposes medical record features from the electronic medical record text based on the natural language processing algorithm, uses the deep learning model to extract image features from the image data, combines the medical record features and image features, constructs a comprehensive feature vector to represent the characteristics of each medical record, uses the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divides the electronic medical records in the database into multiple case clusters, records the case cluster information, obtains the medical record data and image data of the new patient, and constructs the comprehensive feature vector of the new patient based on the medical record data and image data, analyzes the case cluster to which the comprehensive feature vector of the new patient belongs based on the correlation function, and calculates the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, matches the new patient's condition based on the matching score, generates a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and displays the condition pattern, diagnosis and treatment plan to the doctor.
[0040] This application uses the K-means algorithm to perform cluster analysis on comprehensive feature vectors, divides the electronic medical records in the database into multiple case clusters, records case cluster information, obtains the medical record data and image data of new patients, and constructs the comprehensive feature vector of new patients based on the medical record data and image data. The new patient's comprehensive feature vector belongs to the case cluster based on the correlation function, and calculates the matching score of the new patient's comprehensive feature vector and all comprehensive feature vectors in the affiliated case cluster, matches the new patient's condition based on the matching score, and generates a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and displays the condition pattern, diagnosis and treatment plan to the doctor. The auxiliary diagnosis system matches the electronic medical record of the new patient with the electronic medical record in the case cluster based on the correlation function, generates a condition pattern based on the matching result and recommends it to the doctor, thereby improving the doctor's efficiency and effect in diagnosing the patient's condition.
[0041] Embodiment 2: The auxiliary diagnosis system obtains electronic medical record data and image data in the hospital database, including the following steps:
[0042] By establishing data interfaces with the hospital information system (HIS), electronic medical record system (EMR) and picture archiving and communication system (PACS), data can be automatically collected and transmitted, ensuring that the auxiliary diagnosis system has the necessary data access rights, including patient medical records, image data, etc., ensuring compliance with relevant laws and regulations and privacy protection requirements, and integrating data from different systems to establish a unified database. This includes integrating basic patient information, medical history records, diagnostic information, treatment plans and image data.
[0043] Preprocessing of electronic medical record data and image data includes the following steps:
[0044] Clean the collected electronic medical record data, handle missing values, duplicate records, and abnormal data to ensure the accuracy and integrity of the data. Standardize the text data to unify medical terms and formats for subsequent analysis and processing. For example, unify the names of the same symptoms or diseases with different expressions.
[0045] Preprocess the image data, including denoising, normalization, size adjustment, etc., to ensure the image quality.
[0046] Store the preprocessed data in the database of the auxiliary diagnosis system to ensure the security and accessibility of the data. Store and manage the electronic medical record data and image data separately. Data management includes data addition, deletion, modification, query, permission control, backup, and recovery, etc., to ensure the security and privacy protection of the data during use.
[0047] Extract medical record features from the electronic medical record text based on natural language processing algorithms, including the following steps:
[0048] Unify synonyms and terms in different formats in the text. For example, unify "hypertension" and "hypertensive disease" into "hypertension", perform case conversion, remove stop words (such as "of", "is", "in", etc.) and punctuation marks, and use a Chinese word segmentation tool (such as Jieba segmentation) to segment the text, splitting the continuous text into individual words. For example: "The patient complained of headache, accompanied by insomnia and loss of appetite.", the segmentation result is "patient / complained of / headache / , / accompanied by / insomnia / and / loss of appetite / ", perform part-of-speech tagging (POS tagging) on the segmented words to identify the part of speech of each word (such as noun, verb, adjective, etc.). For example: "headache / noun, insomnia / verb, loss of appetite / adjective";
[0049] Use the NER algorithm to identify medical-related entities from the text, such as symptoms (headache, insomnia), diseases (hypertension), drugs (aspirin), treatment plans (acupuncture), time (two-weeks-ago), etc. For example: "The patient complained of headache, accompanied by insomnia and loss of appetite." The recognition result is "headache / symptom, insomnia / symptom, loss of appetite / symptom.", select features with diagnostic and treatment value from the identified entities. For example, the extracted features are: symptoms (headache, insomnia, loss of appetite), diseases (none), treatment plans (none);
[0050] The extracted features are constructed into feature vectors. For example, the feature vector can be expressed as: [headache, insomnia, loss of appetite, ..., symptom 1, symptom 2, ..., disease 1, disease 2, ..., treatment method 1, treatment method 2, ...], and the relationship between entities in the text is extracted, such as the relationship between symptoms and diseases, the relationship between drugs and treatment plans, etc. For example: "After taking a certain drug, the patient's headache was relieved." The extracted relationship is "drug-relief-headache".
[0051] Using a deep learning model to extract image features from image data includes the following steps:
[0052] Use the trained CNN model to extract the feature vector of the image, which is the output of a certain layer in the network (usually the output of the last convolutional layer or fully connected layer);
[0053] CNN model training includes the following steps:
[0054] Collect a large amount of tongue, pulse and facial image data to ensure the diversity and representativeness of the samples, and annotate the image data, including annotating the key features in the tongue, pulse and facial images, such as tongue coating color, pulse waveform, facial features, etc. Use the LeNet_CNN architecture to design the structure of the convolution layer, pooling layer, and fully connected layer, determine the parameters of each layer (such as convolution kernel size, step size, activation function, etc.), and add regularization layers (such as Dropout, Batch-Normalization) to prevent overfitting;
[0055] The image data is divided into training set, validation set and test set to ensure the generalization ability of the model. For example, the training set accounts for 70%, the validation set accounts for 15%, and the test set accounts for 15%. The training data is enhanced, such as rotation, translation, scaling, flipping, etc., to increase the diversity of the data and improve the robustness of the model. The training data set is used for model training. The gradient descent optimization algorithm (such as SGD, Adam, etc.) is used to update the model parameters. The loss function (such as cross entropy loss, mean square error, etc.) is set to evaluate the training effect of the model. The validation data set is used to evaluate the performance of the model. The accuracy, loss and other indicators during the training process are monitored. According to the results of the validation set, the parameters and structure of the model are adjusted. The CNN model is optimized by adjusting parameters, increasing or decreasing the number of network layers, and adjusting the learning rate.
[0056] Among them, the method of CNN model training belongs to the existing technology and will not be introduced in detail in this application.
[0057] The medical record features and image features are combined to construct a comprehensive feature vector to represent the features of each medical record, including the following steps:
[0058] Standardize the text features extracted from the electronic medical records. For example, standardize the numerical features to the same range (such as 0 to 1), and one-hot-encode the categorical features. For example, the presence or absence of symptoms can be represented by binary encoding, and the disease type can be represented by one-hot encoding;
[0059] Normalize the features extracted from the image data. Usually, the image features extracted by the CNN model are already numerical and can be used directly or normalized.
[0060] The standardized text features and image features are concatenated to form a comprehensive feature vector. For example, assuming that the text feature vector is [t1, t2, ..., tn] and the image feature vector is [i1, i2, ..., im], the concatenated comprehensive feature vector is [t1, t2, ..., tn, i1, i2, ..., im].
[0061] Obtain the resource consumption index and fitting index of the comprehensive feature vector, generate the dimension coefficient based on the resource consumption index and the fitting index, judge whether the comprehensive feature vector needs to be reduced in dimension by comparing the dimension coefficient with the coefficient threshold, and generate the corresponding management strategy based on the judgment result.
[0062] Generate a dimension coefficient based on the resource consumption index and the fitting index, and judge whether it is necessary to reduce the dimension of the comprehensive feature vector by comparing the dimension coefficient with the coefficient threshold. Generate a corresponding management strategy based on the judgment result, including the following steps:
[0063] The resource consumption index and the fitting index are normalized so that their value ranges are mapped to [0,1], and the normalized value of the resource consumption index and the normalized value of the fitting index are obtained. The normalized value of the resource consumption index and the normalized value of the fitting index are summed to obtain the dimension coefficient. If the dimension coefficient is greater than the coefficient threshold, it is determined that the comprehensive feature vector needs to be reduced in dimension. If the dimension coefficient is less than or equal to the coefficient threshold, it is determined that the comprehensive feature vector does not need to be reduced in dimension. When it is determined that the comprehensive feature vector needs to be reduced in dimension, the comprehensive feature vector is reduced in dimension using the t-SNE algorithm.
[0064] The calculation logic of the resource consumption index is as follows: obtain the training and inference time of the comprehensive feature vector applied to the model and the training and memory usage applied to the model, and calculate the resource consumption index by weighting the training and inference time applied to the model and the training and memory usage applied to the model. The larger the resource consumption index, the higher the dimension of the comprehensive feature vector, and the more dimensionality reduction processing is needed;
[0065] The calculation logic of the fit index is: get the training set fitting value, get the validation set fitting value, and then compare the training set fitting value with the validation set fitting value to get the fit index. The larger the fit index, the better the model performs on the training set, but worse on the validation set, indicating an overfitting problem.
[0066] The general calculation formula for the fitted value is: In the formula, FI is the fitting value, loss is the average loss value of the model on the data set, and the calculation methods of the training set fitting value and the validation set fitting value are the same as above, which will not be repeated here.
[0067] The t-SNE algorithm is used to reduce the dimension of the comprehensive feature vector, including the following steps:
[0068] Select the number of dimensions after dimensionality reduction, usually set to 2 or 3 for easier visualization.
[0069] This is a balance parameter that controls the t-SNE algorithm and is typically set between 5 and 50. You can try different values to find the best fit for your data.
[0070] Controls the learning rate for the t-SNE optimization process. The default value is usually suitable, but can be adjusted if needed.
[0071] Set the number of iterations, usually around 1000 is sufficient. If the result is not satisfactory, you can increase it appropriately.
[0072] Use the t-SNE algorithm to reduce high-dimensional feature vectors to low-dimensional space (2D or 3D). Use the t-SNE implementation in Python's scikit-learn library:
[0073] from_sklearn.manifold_import_TSNE
[0074] tsne=TSNE(n_components=2, perplexity=30, learning_rate=200, n_iter=1000)
[0075] reduced_features=tsne.fit_transform(comprehensive_feature_vectors).
[0076] The K-means algorithm is used to perform cluster analysis on the comprehensive feature vector, and the electronic medical records in the database are divided into multiple case clusters. The case cluster information is recorded, including the following steps:
[0077] Randomly generate K-means clusters with different K values, calculate the total square error corresponding to each K value, draw a graph of the relationship between K value and SSE, and find the elbow point in the graph where SSE begins to decrease. The elbow point is the optimal K value.
[0078] Using the determined K value, the K-means algorithm was applied to perform cluster analysis on the comprehensive feature vector to generate multiple case clusters. The cluster label to which each medical record belongs was recorded, and each cluster label represented a case cluster.
[0079] The K-means algorithm was used to perform cluster analysis on the comprehensive feature vectors to generate multiple case clusters, including the following steps:
[0080] K comprehensive feature vectors are randomly selected as the initial cluster center, and the Euclidean distance from each remaining comprehensive feature vector to the initial cluster center is calculated. Each comprehensive feature vector is assigned to the cluster corresponding to the initial cluster center with the closest Euclidean distance. After all comprehensive feature vectors are divided, the mean of the comprehensive feature vectors in each cluster is calculated as the new cluster center. The cluster center of the cluster is updated repeatedly and the Euclidean distance between the new cluster center and the previous cluster center is calculated. When the Euclidean distance between the new cluster center and the previous cluster center in any iteration is less than or equal to the distance threshold, the K-means algorithm converges, stops iteration, and outputs multiple case clusters.
[0081] Randomly generate K-means clusters with different K values, calculate the total square error corresponding to each K value, draw a relationship graph between K value and SSE, and find the elbow point in the relationship graph where SSE begins to decrease. The elbow point is the optimal K value, including the following steps:
[0082] Select a series of different K values, such as from 2 to 10. The selection of K values should cover the range of possible cluster numbers in order to find the best K value. Perform the K-means clustering algorithm for each K value (such as 2 to 10) to generate K clusters and record the total square error (SSE) of each clustering. SSE refers to the sum of the squares of the distances of all samples to their cluster centers, and the expression is:
[0083] In the formula, SSE is the total square error, K is the number of clusters, and C i is the comprehensive feature vector of all clusters, x is the comprehensive feature vector of the cluster, μ i is the cluster center of the ith cluster.
[0084] Draw a graph of the relationship between the K value and the corresponding SSE, with the X-axis representing the K value and the Y-axis representing the SSE value. Observe the graph of the relationship between SSE and K value, find the point where the SSE decreases the most, that is, the K value where the "elbow" in the graph is located, and select the K value near the elbow point as the optimal K value. The elbow point is usually the K value where the SSE begins to decrease, and at this time, the improvement effect of increasing the K value on the SSE will be significantly reduced.
[0085] Obtaining the medical record data and image data of a new patient, and constructing a comprehensive feature vector of the new patient based on the medical record data and image data, and analyzing the case cluster to which the comprehensive feature vector of the new patient belongs based on the correlation function, including the following steps:
[0086] Analyzing the comprehensive feature vector of a new patient to belong to a case cluster based on the association function includes the following steps:
[0087] The ranking coefficient is obtained by comprehensively calculating the similarity of comprehensive feature vectors, electronic medical record format similarity, and image style similarity. The expression is: Where fz is the ranking coefficient, SD z , SD b , SD p They are the comprehensive feature vector similarity, electronic medical record format similarity and picture style similarity respectively. ω1, ω2 and ω3 are weight coefficients, and ω1, ω2 and ω3 are all greater than 0. The larger the ranking coefficient is, the more similar the comprehensive feature vector of the new patient is to the comprehensive feature vector of the case cluster.
[0088] Taking the calculation of comprehensive feature vector similarity as an example, assuming that the comprehensive feature vector of the patient is x = (2.5, 3.0, 4.0), the comprehensive feature vector of the case cluster (cluster center) is Compute the difference between each eigenvector:
[0089] d1=2.5-2.0=0.5; d2=3.0-3.5=-0.5; d3=4.0-4.5=-0.5;
[0090] Squared difference:
[0091] d1 2 =0.25; d2 2 =0.25; d3 2 =0.25;
[0092] After summing and taking the square root, we get:
[0093] The calculation method of electronic medical record format similarity and image style similarity is the same as above and will not be repeated here.
[0094] Obtain the ranking coefficient of each case cluster center and the ranking coefficient of all comprehensive feature vectors in the case cluster, and comprehensively calculate the ranking assignment of the case cluster. The expression is:
[0095] In the formula, fz is the sorting assignment, xf avg is the ranking coefficient of the case cluster center, xf iis the ranking coefficient of the i-th comprehensive feature vector in the case cluster, and n is the number of comprehensive feature vectors in the case cluster. The larger the ranking value, the more similar the comprehensive feature vector of the new patient is to the center of the case cluster, and the smaller the fluctuation of the comprehensive feature vector in the entire case cluster.
[0096] After obtaining the ranking assignments of all case clusters, the comprehensive feature vector of the new patient is analyzed to determine whether it belongs to the case cluster with the largest ranking assignment.
[0097] Calculate the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, match the new patient's condition based on the matching score, generate a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and present the condition pattern, diagnosis and treatment plan to the doctor, including the following steps:
[0098] The matching score is obtained through the Euclidean distance calculation formula, which is expressed as: In the formula, SD is the matching score, m is the number of samples, and x i represents the i-th sample value of the new patient, Represents the i-th sample value of the case cluster. The smaller the matching score, the more similar the new patient sample is to the case cluster sample.
[0099] All comprehensive feature vectors in the case cluster are sorted from small to large according to the matching score, and the first-ranked comprehensive feature vector is selected for matching the new patient's condition.
[0100] Based on the matched features, extract typical disease pattern features. These features can include symptoms, signs, laboratory results, etc. Write a detailed description of the disease pattern, including typical symptoms, signs and other relevant features, and generate diagnostic suggestions based on the matched disease pattern. This can include possible disease diagnoses, symptom manifestations and possible causes, and generate treatment plans based on the disease pattern and diagnosis results. The treatment plan should include medications, therapies, lifestyle adjustments, etc., and integrate the disease pattern description, diagnostic suggestions and treatment plans into one report. Make sure the report content is clear and comprehensive for doctors to understand.
[0101] Embodiment 3: The TCM auxiliary diagnosis system based on artificial intelligence image recognition described in this embodiment includes a case cluster division module, a membership analysis module, and a matching recommendation module;
[0102] Case clustering module: obtain electronic medical record data and image data from the hospital database, pre-process the electronic medical record data and image data, extract medical record features from the electronic medical record text based on the natural language processing algorithm, use the deep learning model to extract image features from the image data, combine the medical record features and image features, construct a comprehensive feature vector to represent the features of each medical record, use the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divide the electronic medical records in the database into multiple case clusters, record the case cluster information, and send the case cluster information to the affiliation analysis module;
[0103] Affiliation analysis module: obtains the medical record data and image data of the new patient, and constructs the comprehensive feature vector of the new patient based on the medical record data and image data, analyzes the affiliation case cluster of the new patient's comprehensive feature vector based on the correlation function, and sends the new patient's affiliation case cluster information to the matching recommendation module;
[0104] Matching recommendation module: Calculate the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, match the new patient's condition based on the matching score, and generate the condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and display the condition pattern, diagnosis and treatment plan to the doctor.
[0105] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0106] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0107] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A TCM auxiliary diagnosis method based on artificial intelligence image recognition, characterized by: The auxiliary diagnosis method comprises the following steps: The auxiliary diagnosis system obtains the electronic medical record data and image data in the hospital database, pre-processes the electronic medical record data and image data, extracts medical record features from the electronic medical record text based on the natural language processing algorithm, and uses the deep learning model to extract image features from the image data; Combine medical record features and image features to construct a comprehensive feature vector to represent the features of each medical record. Use the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divide the electronic medical records in the database into multiple case clusters, and record case cluster information. Obtain the medical record data and image data of the new patient, and construct a comprehensive feature vector of the new patient based on the medical record data and image data, analyze the case cluster to which the comprehensive feature vector of the new patient belongs based on the correlation function, and calculate the matching score between the comprehensive feature vector of the new patient and all comprehensive feature vectors in the case cluster to which it belongs, match the new patient's condition based on the matching score, and generate a condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and present the condition pattern, diagnosis and treatment plan to the doctor.
2. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 1 is characterized by: Analyzing the comprehensive feature vector of a new patient to belong to a case cluster based on the association function includes the following steps: The ranking coefficient xf is obtained by comprehensively calculating the similarity of the comprehensive feature vector, the similarity of the electronic medical record format and the similarity of the image style; Obtain the ranking coefficient of each case cluster center and the ranking coefficient of all comprehensive feature vectors in the case cluster, and comprehensively calculate the ranking assignment of the case cluster. The expression is: In the formula, fz is the sorting assignment, xf avg is the ranking coefficient of the case cluster center, xf i is the ranking coefficient of the i-th comprehensive feature vector in the case cluster, and n is the number of comprehensive feature vectors in the case cluster; After obtaining the ranking assignments of all case clusters, the comprehensive feature vector of the new patient is analyzed to determine whether it belongs to the case cluster with the largest ranking assignment.
3. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 2 is characterized by: Calculate the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, and match the new patient's condition based on the matching score, including the following steps: The matching score is obtained through the Euclidean distance calculation formula, which is expressed as: In the formula, SD is the matching score, m is the number of samples, and x i represents the i-th sample value of the new patient, Represents the i-th sample value of the case cluster. The smaller the matching score, the more similar the new patient sample is to the case cluster sample. All comprehensive feature vectors in the case cluster are sorted from small to large according to the matching score, and the first-ranked comprehensive feature vector is selected for matching the new patient's condition.
4. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 3 is characterized by: The K-means algorithm is used to perform cluster analysis on the comprehensive feature vector, and the electronic medical records in the database are divided into multiple case clusters. The case cluster information is recorded, including the following steps: Randomly generate K-means clusters with different K values, calculate the total square error corresponding to each K value, draw a graph between K value and SSE, and find the elbow point where the SSE decreases the most in the graph. The elbow point is the optimal K value. Using the determined K value, the K-means algorithm was applied to perform cluster analysis on the comprehensive feature vector to generate multiple case clusters. The cluster label to which each medical record belongs was recorded, and each cluster label represented a case cluster.
5. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 4 is characterized by: The K-means algorithm was used to perform cluster analysis on the comprehensive feature vectors to generate multiple case clusters, including the following steps: K comprehensive feature vectors are randomly selected as the initial cluster center, and the Euclidean distance from each remaining comprehensive feature vector to the initial cluster center is calculated. Each comprehensive feature vector is assigned to the cluster corresponding to the initial cluster center with the closest Euclidean distance. After all comprehensive feature vectors are divided, the mean of the comprehensive feature vectors in each cluster is calculated as the new cluster center. The cluster center of the cluster is updated repeatedly and the Euclidean distance between the new cluster center and the previous cluster center is calculated. When the Euclidean distance between the new cluster center and the previous cluster center in any iteration is less than or equal to the distance threshold, the K-means algorithm converges, stops iteration, and outputs multiple case clusters.
6. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 5 is characterized by: The medical record features and image features are combined to construct a comprehensive feature vector to represent the features of each medical record, including the following steps: Standardize the text features extracted from the electronic medical records, including normalizing the numerical features to the range of [0,1] and one-hot encoding the categorical features; Performing standardization processing on the features extracted from the image data, wherein the standardization processing includes normalization processing; The standardized text features and image features are concatenated to form a comprehensive feature vector. Suppose the text feature vector is [t1, t2, ..., tn], the image feature vector is [i1, i2, ..., im], and the concatenated comprehensive feature vector is [t1, t2, ..., tn, i1, i2, ..., im]; Obtain the resource consumption index and fitting index of the comprehensive feature vector, generate the dimension coefficient based on the resource consumption index and the fitting index, judge whether the comprehensive feature vector needs to be reduced in dimension by comparing the dimension coefficient with the coefficient threshold, and generate the corresponding management strategy based on the judgment result.
7. The TCM auxiliary diagnosis method based on artificial intelligence image recognition according to claim 6 is characterized by: Generate a dimension coefficient based on the resource consumption index and the fitting index, and judge whether it is necessary to reduce the dimension of the comprehensive feature vector by comparing the dimension coefficient with the coefficient threshold. Generate a corresponding management strategy based on the judgment result, including the following steps: The resource consumption index and the fitting index are normalized so that their value ranges are mapped to [0,1], and the normalized value of the resource consumption index and the normalized value of the fitting index are obtained. The normalized value of the resource consumption index and the normalized value of the fitting index are summed to obtain the dimension coefficient. If the dimension coefficient is greater than the coefficient threshold, it is determined that the comprehensive feature vector needs to be reduced in dimension. If the dimension coefficient is less than or equal to the coefficient threshold, it is determined that the comprehensive feature vector does not need to be reduced in dimension. When it is determined that the comprehensive feature vector needs to be reduced in dimension, the comprehensive feature vector is reduced in dimension using the t-SNE algorithm.
8. A TCM auxiliary diagnosis system based on artificial intelligence image recognition, used to implement the auxiliary diagnosis method according to any one of claims 1 to 7, characterized in that: It includes case cluster division module, affiliation analysis module and matching recommendation module; Case clustering module: obtain electronic medical record data and image data from the hospital database, pre-process the electronic medical record data and image data, extract medical record features from the electronic medical record text based on the natural language processing algorithm, use the deep learning model to extract image features from the image data, combine the medical record features and image features, construct a comprehensive feature vector to represent the features of each medical record, use the K-means algorithm to perform cluster analysis on the comprehensive feature vector, divide the electronic medical records in the database into multiple case clusters, and record case cluster information; Membership analysis module: obtains the medical record data and image data of the new patient, constructs the comprehensive feature vector of the new patient based on the medical record data and image data, and analyzes the membership case cluster of the new patient's comprehensive feature vector based on the correlation function; Matching recommendation module: Calculate the matching score between the comprehensive feature vector of the new patient and all the comprehensive feature vectors in the affiliated case cluster, match the new patient's condition based on the matching score, and generate the condition pattern, diagnosis and treatment plan for the new patient based on the condition matching result, and display the condition pattern, diagnosis and treatment plan to the doctor.
Citation Information
Patent Citations
Virtual medical expert based on medical record database
CN105184103A
Clustering-based medical record document classification system and device, and storage medium
CN112233742A
Generation method of diagnosis and treatment auxiliary information, model training method and device thereof, equipment and storage medium
CN113345577A
Temporomandibular joint disorder treatment scheme recommendation equipment and device and storage medium
CN113488161A
Artificial intelligence auxiliary diagnosis and treatment method and system, storage medium and electronic equipment
CN113972005A
Cited By
Wound assessment monitoring method and device
CN119399202A
Wound assessment monitoring method and device
CN119399202B
Medical archive management method and system
CN119719041A
A medical record management method and system
CN119719041B
Electronic medical record generation method and system for general nursing
CN121565355A
