Doctor recommendation method

Through the joint use of word vector representation of Word2Vec and BERT, convolutional neural network, and Transformer model, combined with self-attention mechanism and multi-dimensional matching factors, the problem of imbalance of long and short text information and incomplete doctor recommendation factors is solved, and high accuracy is achieved Sexual doctor recommendation.

CN118658596AInactive Publication Date: 2024-09-17NANTONG INST OF TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410834766.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing doctor recommendation methods have an imbalance in the amount of information when processing long texts and short texts, resulting in difficulty in feature extraction, and do not fully consider factors such as doctor work experience, professional titles, and evaluations, resulting in low recommendation accuracy.

Method used

Use Word2Vec and BERT to convert text data into word vectors, combine convolutional neural networks and Transformer models for feature extraction, introduce a self-attention mechanism, and use multi-dimensional matching factors including similarity, age, gender, and work experience between patients and doctors. , professional titles and evaluations to make accurate recommendations.

Benefits of technology

It effectively processes long text and short text information, improves the accuracy of department recommendations, and achieves the accuracy of doctor recommendations through multi-dimensional matching, improving the accuracy and reliability of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118658596A
    Figure CN118658596A
Patent Text Reader

Abstract

The invention discloses a doctor recommendation method. Comprising the following steps: collecting text data containing previous patient chief complaint symptoms and corresponding treatment departments; preprocessing the text data to obtain text vectorized data; constructing a text classification model by adopting a convolutional neural network and a Transform model; selecting and optimizing parameters of the text classification model to construct a department recommendation model; based on a department recommendation model, inputting a chief complaint symptom of the target patient to obtain a recommended department; performing multi-dimensional matching according to the matching degree of the target patient and the doctor; and positioning all doctors in the recommended department, calculating the matching degree of the target patient and the doctors by adopting a doctor-patient matching degree model, and recommending the doctors to the target patient according to the matching degree. According to the method, the complaint symptoms of the patient are analyzed by using the deep learning model, so that department recommendation is realized; and through multi-dimensional matching of the patient and the doctors in the department, a recommendation sequence is calculated, so that accurate doctor recommendation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a doctor recommendation method, and in particular to a doctor recommendation method based on deep learning and multi-dimensional matching. Background Art

[0002] During the medical treatment process, since patients do not have a professional medical background and are unable to accurately choose the treatment department and doctor based on their own symptoms, registration errors often occur, which not only delays the patient's treatment time, but also reduces the operating efficiency of medical resources.

[0003] To solve the above problems, Chinese patent CN110993081A discloses a method and system for online doctor recommendation, in which the specific steps of obtaining the preliminary recommended department according to the vectorized representation of the main complaint text of the patient's condition include: combining the features of the main complaint text of the patient's condition to be recommended to obtain the sentence vector representation of the main complaint text of the patient's condition to be recommended, inputting the sentence vector representation of the main complaint text of the patient's condition to be recommended into the pre-trained department recommendation neural network model, and outputting the preliminary recommended department. This method simply uses the main complaint text of the patient's condition with known text features and the main complaint sentence vector of the patient's condition with known final selected department as a training set, trains the Word2Vec neural network model and the TextCNN neural network model to obtain the pre-trained department recommendation neural network model. However, the main complaint text of the patient's condition contains long text and short text, and the long text usually contains more information, while the short text contains less information. In the text vectorization process, if the long text and the short text are processed without distinction, it may cause an imbalance in the amount of information, thereby affecting the accuracy of feature extraction. Secondly, there may be more contextual information in long texts, and the model needs to better understand the context of the text in order to accurately extract features. In contrast, short texts are usually more concise, with relatively less contextual information, and feature extraction is relatively easy. Therefore, when long texts are vectorized, they will be quite different from the original information, making feature extraction difficult. Directly constructing training sets without distinguishing between long texts and short texts can easily reduce the recommendation accuracy of the department recommendation model. In addition, the above method cannot effectively obtain the core features in short texts, which will also reduce the recommendation accuracy of the department recommendation model.

[0004] In the stage of matching patients and doctors, the above method only focuses on the similarity between the current patient and the historical patient, and does not pay attention to target patient preference factors such as doctor's work experience, doctor's title, and doctor's evaluation. Fewer matching dimensions will also lead to a lower accuracy rate in the final doctor recommendation.

[0005] Transformer is a neural network architecture based on the attention mechanism. Unlike traditional recurrent neural networks, Transformer relies entirely on the self-attention mechanism, which can more efficiently capture the dependencies between different positions in the sequence. BERT is a pre-trained language model. Its core innovation lies in its bidirectionality, that is, it considers both the previous and next contextual information during the training process, thereby generating a more accurate word vector representation. Summary of the invention

[0006] Purpose of the invention: The purpose of the present invention is to provide a doctor recommendation method to solve the problem of low accuracy of existing doctor recommendation methods.

[0007] Technical solution: A doctor recommendation method according to the present invention comprises the following steps:

[0008] Collect text data containing past patient complaints and corresponding treatment departments to build a data set;

[0009] Preprocess the text data to obtain text vectorized data;

[0010] Based on the text vectorized data, a text classification model is built using convolutional neural network and Transformer model;

[0011] Select and optimize the parameters of the text classification model to build a department recommendation model;

[0012] Based on the department recommendation model, the target patient's main symptoms are input to obtain the recommended department;

[0013] Perform multi-dimensional matching based on the matching degree between target patients and doctors, and build a doctor-patient matching model;

[0014] Locate all doctors in the recommended department, use the doctor-patient matching model to calculate the matching degree between the target patient and the doctor, and recommend doctors to the target patient based on the matching degree.

[0015] The present invention uses a deep learning model to analyze the patient's main symptoms to achieve department recommendation; then, through multi-dimensional matching between the patient and the doctors in the department, the recommendation ranking is calculated, thereby achieving accurate doctor recommendation.

[0016] Preferably, the preprocessing of text data includes data cleaning, text vectorization and label encoding of the text data; the text vectorization includes: using a pre-trained word embedding model to convert the text data into word vectors.

[0017] Preferably, the pre-trained word embedding model includes Word2Vec and BERT, and is expressed using Word2Vec as:

[0018]

[0019] Where W is the input text, n is the number of words in the text, is the word vector of the i-th word;

[0020] Using BERT, it is represented as:

[0021]

[0022] in, is the encoding vector of the i-th word. Finally, one-hot encoding is used to encode the department label.

[0023] Preferably, the text classification model is constructed based on the text vectorized data using a convolutional neural network and a Transformer model, including:

[0024] Use convolutional neural network and TextCNN to extract features from Word2Vec vector and BERT vector respectively, and then introduce self-attention mechanism to obtain the first feature after splicing the features extracted by convolutional neural network and TextCNN;

[0025] Use the Transformer model to extract features from the BERT vector to obtain the second feature;

[0026] The second feature is fused with the first feature and classified through the fully connected layer to build a text classification model.

[0027] Preferably, the use of a convolutional neural network and TextCNN to extract features from the Word2Vec vector and the BERT vector respectively, and the introduction of a self-attention mechanism after splicing the features extracted by the convolutional neural network and the TextCNN to obtain the first feature comprises:

[0028] Use convolutional neural network to extract features from BERT vector, expressed as:

[0029] Conv(B,k)=ReLU(W k *B+b k )

[0030] Among them, B is the input BERT vector matrix, k is the size of the convolution kernel, and W k is the convolution kernel matrix of size k, b k is the bias vector, * indicates the convolution operation, and ReLU indicates the execution of the rectified linear unit operation;

[0031] The feature representation of the BERT vector extracted by the convolutional neural network through the pooling operation is:

[0032] F Bert-CNN=Maxpooling(Conv(B,k))

[0033] Among them, Maxpooling represents the maximum pooling operation;

[0034] Use TextCNN for feature extraction and convolution operations on Word2Vec vectors using convolution kernels of different sizes, expressed as:

[0035] Conv(X,k)=ReLU(W k *X+b k )

[0036] Among them, X is the input word vector matrix;

[0037] The feature representation of the Word2Vec vector obtained by the convolutional neural network through the pooling operation is:

[0038] Pool(X,k)=Maxpooling(Conv(X,k))

[0039] The formed TextCNN feature representation is:

[0040] F TextCNN =[Pool(X,k1),Pool(X,k2),Pool(X,k3)];

[0041] The features extracted by TextCNN are concatenated with the features extracted by the convolutional neural network for the BERT vector, and the concatenated features are expressed as follows:

[0042] F Fusion =[F TextCNN ,F Bert-CNN ]

[0043] The concatenated features are weighted by self-attention, and the self-attention mechanism is expressed as:

[0044]

[0045] Among them, Q, K, and V are query, key, and value matrices respectively, and d K is the dimension of the vector, and the features weighted by the self-attention mechanism are obtained, which can be expressed as:

[0046] F Attention =( F Fusion , F Fusion , F Fusion );

[0047] The use of the Transformer model to extract features from the BERT vector to obtain the second feature includes:

[0048] Multiple Transformer models are used to further encode the BERT vector and extract text features, which are expressed as:

[0049] F Transformer =Transformer(B)

[0050] Among them, Transformer represents the Transformer model, which encodes the input vector through multiple Transformer layers.

[0051] Preferably, the second feature is integrated with the first feature

[0052] It is expressed as:

[0053] F Fusion′ =F Attention +F Transformer

[0054] Among them, F Fusion′ is the fused feature;

[0055] The classification through the fully connected layer includes:

[0056] Classify the fused features and output the corresponding department labels, expressed as:

[0057] Out = soft max (W out ·F Fusion′ +b out )

[0058] Among them, W out is the weight matrix of the output layer, b out is the bias vector.

[0059] Preferably, the selecting and optimizing the parameters of the text classification model to construct the department recommendation model includes:

[0060] Four hyperparameters, including embedding layer size, convolution kernel size, number of convolution kernels and Dropout, were selected to optimize the text classification model, and the optimal model was selected as the department recommendation model.

[0061] Preferably, the multi-dimensional matching based on the matching degree between the target patient and the doctor includes: multi-dimensional matching based on the similarity between the target patient and the doctor's historical patients and the target patient's preferences; the similarity between the target patient and the doctor's historical patients includes text similarity, age similarity and gender similarity, and the target patient's preferences include doctor's work experience, doctor's title and doctor's evaluation.

[0062] Preferably, the similarity between the patient's main complaint text and the doctor's historical case text of the patient is calculated to obtain the text similarity, which is expressed as:

[0063]

[0064] Where A and B are both n-dimensional vectors, and θ is the angle between vector A and vector B;

[0065] The gender similarity is expressed as:

[0066]

[0067] Among them, C and D are two-dimensional vectors, males are represented by vectors [0,1], and females are represented by vectors [1,0];

[0068] The age similarity is the correlation between two patients based on age, expressed as:

[0069]

[0070] Among them, ε is the age difference parameter between the two patients, Age M and Age N is the age of the patient. When the age difference between two patients is less than 5 years, the age similarity is 1. When the age difference between two patients is greater than 15 years, the age similarity is 0.

[0071] The similarity between the target patient and the doctor's historical patients is expressed as:

[0072] Sim α (M,N)=α1TextSim(M,N)+α2SexSim(M,N)+α3AgeSim(M,N)

[0073] Among them, α1, α2 and α3 are the influencing factors of text similarity, gender similarity and age similarity respectively, with a value range of (0,1), and α1+α2+α3=1;

[0074] The doctor's work experience is expressed as:

[0075]

[0076] Where t represents the index of the doctor, T t represents the working years of doctor t, and max represents the maximum value;

[0077] The doctor's professional titles are divided into chief physician, deputy chief physician and attending physician, and the weight of the chief physician title is set to 0.5, the weight of the deputy chief physician title is set to 0.3, and the weight of the attending physician title is set to 0.2;

[0078] The doctor evaluation is calculated using the ratio of positive evaluations to all evaluations, expressed as:

[0079]

[0080] Among them, X t is the number of positive comments about doctor t, Y t is the total number of comments by doctor t.

[0081] The calculation formula of the target patient preference is expressed as:

[0082] Sim β (t) = β1WorkRate t +β2PosRate t +β3FavRate t

[0083] Among them, β1, β2 and β3 are the influencing factors of doctor t’s work experience weight, professional title weight and score weight, respectively, with a value range of (0,1), and β1+β2+β3=1.

[0084] Preferably, the method of calculating the matching degree between the target patient and the doctor using the doctor-patient matching degree model includes:

[0085] The matching degree between target patients and doctors is calculated using the following formula:

[0086] Sim(M,N,t)=αSim α (M,N)+βSim β (t)

[0087] Among them, the target patient is M, and patient N is the historical patient that doctor t has seen. α and β are the influencing factors of patient similarity and patient preference, respectively, with a value range of (0,1), and α+β=1. Assuming that the number of patients seen by doctor t is J, the average similarity of the doctor's recommendation is expressed as:

[0088]

[0089] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0090] 1. To address the problem that the chief complaint text contains long text and short text and feature extraction is difficult, the present invention uses Word2Vec and BERT to convert text data into word vectors, thereby achieving more effective information representation and better capturing the characteristics of the patient's chief complaint text.

[0091] 2. The present invention uses CNN to extract the features of short texts and Transformer model to extract the features of long texts. CNN and Transformer are used to jointly extract text features, which can effectively process the information of long and short texts. The self-attention mechanism is introduced to enhance the model's attention to key text features, and finally achieve accurate recommendation of departments.

[0092] 3. The doctor recommendation model considers six factors: patient text similarity, patient age similarity, patient gender similarity, doctor work experience, doctor title, and doctor evaluation. By assigning appropriate weights to different influencing factors, accurate doctor recommendations can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0093] Figure 1 is a flow chart of the present invention;

[0094] Figure 2 Recommend model structure diagrams for departments;

[0095] Figure 3 The effects of embedding layer size, convolution kernel size, number of convolution kernels, and Dropout on model accuracy;

[0096] Figure 4 is the NDCG value under different weights. DETAILED DESCRIPTION

[0097] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.

[0098] like Figure 1 As shown, a doctor recommendation method comprises the following steps:

[0099] Collect text data containing past patient complaints and corresponding treatment departments to build a data set, including:

[0100] A large amount of data on patient symptoms and the departments they visited was obtained through medical records and electronic medical record systems. Four internal medicine departments (respiratory, neurological, endocrinology, and gastroenterology) were selected, with a total of 8,000 data. The data set was divided into a training set and a validation set in an 8:2 ratio.

[0101] Preprocess the text data to obtain text vectorized data. Preprocessing includes data cleaning, text vectorization and label encoding. Data cleaning includes processing the data set by removing duplicates and processing missing values ​​to ensure data quality. Text vectorization includes: using a pre-trained word embedding model to convert text data into word vectors. Pre-trained word embedding models include Word2Vec and BERT. Word2Vec is expressed as:

[0102]

[0103] Where W is the input text, n is the number of words in the text, is the word vector of the i-th word;

[0104] Using BERT, it is represented as:

[0105]

[0106] In the formula, is the encoding vector of the i-th word. Finally, one-hot encoding is used to encode the department label.

[0107] like Figure 2 As shown, a convolutional neural network (CNN) and TextCNN are used to extract features from Word2Vec vectors and BERT vectors respectively. The features extracted by the convolutional neural network and TextCNN are concatenated and then a self-attention mechanism is introduced to improve the model's attention to key features, thereby obtaining the first feature.

[0108] Use the Transformer model to extract features from the BERT vector to obtain the second feature;

[0109] The second feature is fused with the first feature and classified through the fully connected layer to build a text classification model.

[0110] The construction process of the text classification model specifically includes:

[0111] Use convolutional neural network to extract features from BERT vector, expressed as:

[0112] Conv(B,k)=ReLU(W k *B+b k )

[0113] Among them, B is the input BERT vector matrix, k is the size of the convolution kernel, and W k is the convolution kernel matrix of size k, b k is the bias vector, * indicates the convolution operation, and ReLU indicates the execution of the rectified linear unit operation;

[0114] The feature representation of the BERT vector extracted by the convolutional neural network through the pooling operation is:

[0115] F Bert-CNN =Maxpooling(Conv(B,k))

[0116] Among them, Maxpooling represents the maximum pooling operation;

[0117] Use TextCNN for feature extraction and convolution operations on Word2Vec vectors using convolution kernels of different sizes, expressed as:

[0118] Conv(X,k)=ReLU(W k *X+b k )

[0119] Among them, X is the input word vector matrix;

[0120] The feature representation of the Word2Vec vector obtained by the convolutional neural network through the pooling operation is:

[0121] Pool(X,k)=Maxpooling(Conv(X,k))

[0122] Since different convolution kernels are used to extract text features, the sizes of the convolution kernels are 3*3, 4*4, and 5*5 respectively, and the resulting TextCNN features are represented as: F TextCNN =[Pool(X,k1),Pool(X,k2),Pool(X,k3)].

[0123] The features extracted by TextCNN are concatenated with the features extracted by the convolutional neural network for the BERT vector, and the final concatenated features are represented as follows:

[0124] F Fusion =[F TextCNN ,F Bert-CNN ]

[0125] The concatenated features are weighted by self-attention, and the self-attention mechanism is expressed as:

[0126]

[0127] Among them, Q, K, and V are query, key, and value matrices respectively, and d K is the dimension of the vector, and the first feature weighted by the self-attention mechanism is obtained, which is expressed as:

[0128] F Attention =(F Fusion ,F Fusion ,F Fusion )

[0129] The Transformer model is used to further encode the BERT vector and extract text features, which are expressed as:

[0130] F Transformer =Transformer(B)

[0131] Among them, Transformer represents the Transformer model, where the input vector is encoded through multiple Transformer layers to obtain the second feature;

[0132] The second feature is combined with the first feature, expressed as:

[0133] F Fusion′ =F Attention +F Transformer

[0134] Among them, F Fusion′ is the fused feature;

[0135] The classification through the fully connected layer includes:

[0136] Classify the fused features and output the corresponding department labels, expressed as:

[0137] Out = soft max (W out ·F Fusion′ +b out )

[0138] Among them, W out is the weight matrix of the output layer, b out is the bias vector.

[0139] Department classification uses accuracy and F1 score as evaluation indicators. Assume that TP represents the number of positive samples correctly predicted by the model. TN represents the number of negative samples correctly predicted by the model. FP represents the number of negative samples incorrectly predicted as positive samples by the model. FN represents the number of positive samples incorrectly predicted as negative samples by the model. Accuracy is expressed as:

[0140]

[0141] The precision is expressed as:

[0142]

[0143] The recall rate is expressed as:

[0144]

[0145] The F1 score is expressed as:

[0146]

[0147] The accuracy of the department recommendation method of the present invention is 93.4%, and the F1 score is 93.5%. The accuracy obtained by using the CNN model is 84.9%, and the F1 score is 85.1%. The accuracy obtained by using the Transformer model is 85.9%, and the F1 score is 86%. The accuracy obtained by using the CNN+BiLSTM model is 90.5%, and the F1 score is 90.4%.

[0148] Select and optimize the parameters of the text classification model to build a department recommendation model. The selection of parameters for the department recommendation model is crucial, including:

[0149] The present invention selects four hyperparameters, namely, embedding layer size, convolution kernel size, number of convolution kernels and Dropout, to optimize the text classification model, and selects the optimal model as the department recommendation model. Figure 3 shown.

[0150] The main complaint of the target patient is used as the input of the department recommendation model obtained by the above training optimization, and the recommended department is output; the present invention performs multi-dimensional matching based on the six factors of the target patient and the doctor to construct a doctor-patient matching model, which specifically includes:

[0151] Multi-dimensional matching is performed based on the similarity between the target patient and the doctor's historical patients and the target patient's preferences. The similarity between the target patient and the doctor's historical patients includes three aspects: text similarity, age similarity, and gender similarity. The calculation methods for the similarity between the target patient and the doctor's historical patients are as follows:

[0152] The similarity between the patient's complaint text and the doctor's historical case text is calculated, and the cosine theorem is used to calculate the similarity between the two texts, which is expressed as:

[0153]

[0154] Where A and B are both n-dimensional vectors, and θ is the angle between vector A and vector B;

[0155] The patient gender similarity is also calculated using the cosine theorem and is expressed as:

[0156]

[0157] Among them, C and D are two-dimensional vectors, males are represented by vectors [0,1], and females are represented by vectors [1,0];

[0158] The age similarity is the correlation between two patients based on age, expressed as:

[0159]

[0160] Among them, ε is the age difference parameter between the two patients, which is generally set to 25. M and Age N is the age of the patient. When the age difference between two patients is less than 5 years, the age similarity is 1. When the age difference between two patients is greater than 15 years, the age similarity is 0.

[0161] In summary, the similarity between the target patient and the doctor's historical patients is expressed as:

[0162] Sim α (M,N)=α1TextSim(M,N)+α2SexSim(M,N)+α3AgeSim(M,N)

[0163] Among them, α1, α2 and α3 are the influencing factors of text similarity, gender similarity and age similarity respectively, with a value range of (0,1), and α1+α2+α3=1;

[0164] The target patient preference includes three aspects: doctor's work experience, doctor's title and doctor's evaluation, and the calculation method is:

[0165] The doctor's work experience is expressed as:

[0166]

[0167] Where t represents the index of the doctor, T t represents the working years of doctor t, and max represents the maximum value;

[0168] The doctor titles are divided into chief physician, deputy chief physician and attending physician. In order to ease the pressure on medical resources and balance the fairness of the impact of doctor titles on the recommendation results, the weight of the chief physician title is set to 0.5, the weight of the deputy chief physician title is set to 0.3, and the weight of the attending physician title is set to 0.2;

[0169] The doctor evaluation is calculated using the ratio of positive evaluations to all evaluations, expressed as:

[0170]

[0171] Among them, X t is the number of positive comments about doctor t, Y t is the total number of comments by doctor t.

[0172] In summary, the calculation formula of the target patient preference is expressed as:

[0173] Sim β (t) = β1WorkRate t +β2PosRate t +β3FavRatet

[0174] Among them, β1, β2 and β3 are the influencing factors of doctor t’s work experience weight, professional title weight and score weight, respectively, with a value range of (0,1), and β1+β2+β3=1.

[0175] Locate all doctors in the recommended department, use the doctor-patient matching model to calculate the matching degree between the target patient and the doctor, and recommend doctors to the target patient based on the matching degree, including:

[0176] The matching degree between target patients and doctors is calculated using the following formula:

[0177] Sim(M,N,t)=αSim α (M,N)+βSim β (t)

[0178] Among them, the target patient is M, and patient N is the historical patient that doctor t has seen. α and β are the influencing factors of patient similarity and patient preference, respectively, with a value range of (0,1), and α+β=1. Assuming that the number of patients seen by doctor t is J, the average similarity of the doctor's recommendation is expressed as:

[0179]

[0180] In order to reflect the real needs of different target users, the normalized discounted cumulative gain (NDCG) is used as the evaluation index, which is expressed as:

[0181]

[0182] Among them, DCG is the discounted cumulative gain, and IDCG is the maximum value under ideal conditions. IDCG takes into account the impact of location factors on the results. Similarly, the order of the doctor recommendation list is also crucial. Generally speaking, doctors with higher rankings have a greater influence on patient selection. DCG is expressed as:

[0183]

[0184] Among them, rel(i) is the relevance of the i-th doctor, is the discounted value.

[0185] The NDCG of the method proposed in the present invention is 90.7%.

[0186] Set different influencing factor weights to verify the accuracy of the doctor recommendation model. Select 80 target users as experimental subjects, and record the target users' age, gender, real needs and other information. Obtain doctor information and patient information from the information database. Input this information into the doctor recommendation model, calculate the top 5 recommended doctors, and then evaluate the recommended doctors through NDCG to ensure the availability and accuracy of the doctor recommendation model. Relevant research and consulting medical professionals have concluded that patient similarity has a greater impact on doctor recommendation matching. Therefore, this experiment sets the patient similarity weights to 0.5, 0.6, 0.7, 0.8, and 0.9, such as Figure 4 As shown in Figures (a)-(e) in Figure 1, the patient preference weights are set to 0.5, 0.4, 0.3, 0.2, and 0.1, respectively. The NDCG of different patient similarity weights is shown in Figure 1. Figure 4 As shown. When the horizontal axis is a different combination of parameters, the present invention does not consider the case where the influencing factor is zero. The optimal combination: the patient similarity weight is set to 0.6, and the patient preference weight is set to 0.4. That is, α=0.6, β=0.4, α1=0.5, α2=0.3, α3=0.2, β1=0.3, β2=0.3, and β3=0.4.

Claims

1. A doctor recommendation method, characterized in that: The steps include: Collect text data containing past patient complaints and corresponding treatment departments to build a data set; Preprocess the text data to obtain text vectorized data; Based on the text vectorized data, a text classification model is built using convolutional neural network and Transformer model; Select and optimize the parameters of the text classification model to build a department recommendation model; Based on the department recommendation model, the target patient's main symptoms are input to obtain the recommended department; Perform multi-dimensional matching based on the matching degree between target patients and doctors, and build a doctor-patient matching model; Locate all doctors in the recommended department, use the doctor-patient matching model to calculate the matching degree between the target patient and the doctor, and recommend doctors to the target patient based on the matching degree.

2. The doctor recommendation method according to claim 1, characterized in that: The preprocessing of text data includes data cleaning, text vectorization and label encoding of the text data; the text vectorization includes: using a pre-trained word embedding model to convert text data into word vectors.

3. The doctor recommendation method according to claim 2, characterized in that: The pre-trained word embedding models include Word2Vec and BERT, which are expressed using Word2Vec as follows: Where W is the input text, n is the number of words in the text, is the word vector of the i-th word; Using BERT, it is represented as: in, is the encoding vector of the i-th word. Finally, one-hot encoding is used to encode the department label.

4. The doctor recommendation method according to claim 3, characterized in that: The text classification model constructed based on the text vectorized data using the convolutional neural network and the Transformer model includes: Use convolutional neural network and TextCNN to extract features from Word2Vec vector and BERT vector respectively, and then introduce self-attention mechanism to obtain the first feature after splicing the features extracted by convolutional neural network and TextCNN; Use the Transformer model to extract features from the BERT vector to obtain the second feature; The second feature is fused with the first feature and classified through the fully connected layer to build a text classification model.

5. The doctor recommendation method according to claim 4, characterized in that: The use of convolutional neural network and TextCNN to extract features from Word2Vec vectors and BERT vectors respectively, and the introduction of self-attention mechanism after splicing the features extracted by convolutional neural network and TextCNN to obtain the first feature includes: Use convolutional neural network to extract features from BERT vector, expressed as: Conv(B,k)=ReLU(W k *B+b k ) Among them, B is the input BERT vector matrix, k is the size of the convolution kernel, and W k is the convolution kernel matrix of size k, b k is the bias vector, * indicates the convolution operation, and ReLU indicates the execution of the rectified linear unit operation; The feature representation of the BERT vector extracted by the convolutional neural network through the pooling operation is: F Bert-CNN =Maxpooling(Conv(B,k)) Among them, Maxpooling represents the maximum pooling operation; Use TextCNN for feature extraction and convolution operations on Word2Vec vectors using convolution kernels of different sizes, expressed as: Conv(X,k)=ReLU(W k *X+b k ) Among them, X is the input word vector matrix; The feature representation of the Word2Vec vector obtained by the convolutional neural network through the pooling operation is: Pool(X,k)=Maxpooling(Conv(X,k)) The formed TextCNN feature representation is: F TextCNN =[Pool(X,k1),Pool(X,k2),Pool(X,k3)]; The features extracted by TextCNN are concatenated with the features extracted by the convolutional neural network for the BERT vector, and the concatenated features are expressed as follows: F Fusion =[F TextCNN ,F Bert-CNN ] The concatenated features are weighted by self-attention, and the self-attention mechanism is expressed as: Among them, Q, K, and V are query, key, and value matrices respectively, and d K is the dimension of the vector, and the features weighted by the self-attention mechanism are obtained, which can be expressed as: F Attention =(F Fusion ,F Fusion ,F Fusion ); The use of the Transformer model to extract features from the BERT vector to obtain the second feature includes: Multiple Transformer models are used to further encode the BERT vector and extract text features, which are expressed as: F Transformer =Transformer(B) Among them, Transformer represents the Transformer model, which encodes the input vector through multiple Transformer layers.

6. The doctor recommendation method according to claim 5, characterized in that: The fusion of the second feature and the first feature is expressed as: F Fusion′ =F Attention +F Transformer Among them, F Fusion′ is the fused feature; The classification through the fully connected layer includes: Classify the fused features and output the corresponding department labels, expressed as: Out=soft max(W out ·F Fusion′ +b out ) Among them, W out is the weight matrix of the output layer, b out is the bias vector.

7. The doctor recommendation method according to claim 1, characterized in that: The step of selecting and optimizing the parameters of the text classification model to construct a department recommendation model includes: Four hyperparameters, including embedding layer size, convolution kernel size, number of convolution kernels and Dropout, were selected to optimize the text classification model, and the optimal model was selected as the department recommendation model.

8. The doctor recommendation method according to claim 1, characterized in that: The multi-dimensional matching based on the matching degree between the target patient and the doctor includes: multi-dimensional matching based on the similarity between the target patient and the doctor's historical patients and the target patient's preferences; the similarity between the target patient and the doctor's historical patients includes text similarity, age similarity and gender similarity, and the target patient's preferences include doctor's work experience, doctor's title and doctor's evaluation.

9. The doctor recommendation method according to claim 8, characterized in that: The similarity between the patient's chief complaint text and the doctor's historical case text of the patient is calculated to obtain the text similarity, which is expressed as: Where A and B are both n-dimensional vectors, and θ is the angle between vector A and vector B; The gender similarity is expressed as: Among them, C and D are two-dimensional vectors, males are represented by vectors [0,1], and females are represented by vectors [1,0]; The age similarity is the correlation between two patients based on age, expressed as: Among them, ε is the age difference parameter between the two patients, Age M and Age N is the age of the patient. When the age difference between two patients is less than 5 years, the age similarity is 1; when the age difference between two patients is greater than 15 years, the age similarity is 0; The similarity between the target patient and the doctor's historical patients is expressed as: Sim α (M,N)=α1TextSim(M,N)+α2SexSim(M,N)+α3AgeSim(M,N) Among them, α1, α2 and α3 are the influencing factors of text similarity, gender similarity and age similarity respectively, with a value range of (0,1), and α1+α2+α3=1; The doctor's work experience is expressed as: Where t represents the index of the doctor, T t represents the working years of doctor t, and max represents the maximum value; The doctor's professional titles are divided into chief physician, deputy chief physician and attending physician, and the weight of the chief physician title is set to 0.5, the weight of the deputy chief physician title is set to 0.3, and the weight of the attending physician title is set to 0.2; The doctor evaluation is calculated using the ratio of positive evaluations to all evaluations, expressed as: Among them, X t is the number of positive comments about doctor t, Y t is the total number of comments by doctor t; The calculation formula of the target patient preference is expressed as: Sim β (t)=β1WorkRate t +β2PosRate t +β3FavRate t Among them, β1, β2 and β3 are the influencing factors of doctor t’s work experience weight, professional title weight and score weight, respectively, with a value range of (0,1), and β1+β2+β3=1.

10. The doctor recommendation method according to claim 1, characterized in that: The method of using the doctor-patient matching model to calculate the matching degree between the target patient and the doctor includes: The matching degree between target patients and doctors is calculated using the following formula: Sim(M,N,t)=αSim α (M,N)+βSim β (t) Among them, the target patient is M, and patient N is the historical patient that doctor t has seen. α and β are the influencing factors of patient similarity and patient preference, respectively, with a value range of (0,1), and α+β=1. Assuming that the number of patients seen by doctor t is J, the average similarity of the doctor's recommendation is expressed as:

Citation Information

Cited By

  • Online doctor recommendation method and system based on combined hypergraph learning

    CN118888171A

  • Intelligent clinical support decision-making system and method for emergency triage

    CN119418916A

  • Personalized physician recommendation method, system and device fusing knowledge graph and Transform and storage medium

    CN120280101A

  • A personalized physician recommendation method, system, device, and storage medium integrating knowledge graph and Transformer

    CN120280101B